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 < 0x02040000
20 #error Cython requires Python 2.4+.
24 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
26 #if !defined(WIN32) && !defined(MS_WINDOWS)
38 #define DL_IMPORT(t) t
41 #define DL_EXPORT(t) t
44 #define PY_LONG_LONG LONG_LONG
47 #define Py_HUGE_VAL HUGE_VAL
50 #define CYTHON_COMPILING_IN_PYPY 1
51 #define CYTHON_COMPILING_IN_CPYTHON 0
53 #define CYTHON_COMPILING_IN_PYPY 0
54 #define CYTHON_COMPILING_IN_CPYTHON 1
56 #if PY_VERSION_HEX < 0x02050000
57 typedef int Py_ssize_t;
58 #define PY_SSIZE_T_MAX INT_MAX
59 #define PY_SSIZE_T_MIN INT_MIN
60 #define PY_FORMAT_SIZE_T ""
61 #define CYTHON_FORMAT_SSIZE_T ""
62 #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
63 #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o)
64 #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
65 (PyErr_Format(PyExc_TypeError, \
66 "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
68 #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
70 #define PyIndex_Check __Pyx_PyIndex_Check
71 #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
72 #define __PYX_BUILD_PY_SSIZE_T "i"
74 #define __PYX_BUILD_PY_SSIZE_T "n"
75 #define CYTHON_FORMAT_SSIZE_T "z"
76 #define __Pyx_PyIndex_Check PyIndex_Check
78 #if PY_VERSION_HEX < 0x02060000
79 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
80 #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
81 #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
82 #define PyVarObject_HEAD_INIT(type, size) \
83 PyObject_HEAD_INIT(type) size,
84 #define PyType_Modified(t)
95 Py_ssize_t *suboffsets;
98 #define PyBUF_SIMPLE 0
99 #define PyBUF_WRITABLE 0x0001
100 #define PyBUF_FORMAT 0x0004
101 #define PyBUF_ND 0x0008
102 #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
103 #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
104 #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
105 #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
106 #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
107 #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
108 #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
109 typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
110 typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
112 #if PY_MAJOR_VERSION < 3
113 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
114 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
115 PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
117 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
118 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
119 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
121 #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
122 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
124 #if PY_MAJOR_VERSION >= 3
125 #define Py_TPFLAGS_CHECKTYPES 0
126 #define Py_TPFLAGS_HAVE_INDEX 0
128 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
129 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
131 #if PY_VERSION_HEX < 0x02060000
132 #define Py_TPFLAGS_HAVE_VERSION_TAG 0
134 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
135 #define CYTHON_PEP393_ENABLED 1
136 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \
137 0 : _PyUnicode_Ready((PyObject *)(op)))
138 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
139 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
140 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
142 #define CYTHON_PEP393_ENABLED 0
143 #define __Pyx_PyUnicode_READY(op) (0)
144 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
145 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
146 #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
148 #if PY_MAJOR_VERSION >= 3
149 #define PyBaseString_Type PyUnicode_Type
150 #define PyStringObject PyUnicodeObject
151 #define PyString_Type PyUnicode_Type
152 #define PyString_Check PyUnicode_Check
153 #define PyString_CheckExact PyUnicode_CheckExact
155 #if PY_VERSION_HEX < 0x02060000
156 #define PyBytesObject PyStringObject
157 #define PyBytes_Type PyString_Type
158 #define PyBytes_Check PyString_Check
159 #define PyBytes_CheckExact PyString_CheckExact
160 #define PyBytes_FromString PyString_FromString
161 #define PyBytes_FromStringAndSize PyString_FromStringAndSize
162 #define PyBytes_FromFormat PyString_FromFormat
163 #define PyBytes_DecodeEscape PyString_DecodeEscape
164 #define PyBytes_AsString PyString_AsString
165 #define PyBytes_AsStringAndSize PyString_AsStringAndSize
166 #define PyBytes_Size PyString_Size
167 #define PyBytes_AS_STRING PyString_AS_STRING
168 #define PyBytes_GET_SIZE PyString_GET_SIZE
169 #define PyBytes_Repr PyString_Repr
170 #define PyBytes_Concat PyString_Concat
171 #define PyBytes_ConcatAndDel PyString_ConcatAndDel
173 #if PY_MAJOR_VERSION >= 3
174 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
175 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
177 #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
178 PyString_Check(obj) || PyUnicode_Check(obj))
179 #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type)
181 #if PY_VERSION_HEX < 0x02060000
182 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type)
183 #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type)
185 #ifndef PySet_CheckExact
186 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
188 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
189 #if PY_MAJOR_VERSION >= 3
190 #define PyIntObject PyLongObject
191 #define PyInt_Type PyLong_Type
192 #define PyInt_Check(op) PyLong_Check(op)
193 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
194 #define PyInt_FromString PyLong_FromString
195 #define PyInt_FromUnicode PyLong_FromUnicode
196 #define PyInt_FromLong PyLong_FromLong
197 #define PyInt_FromSize_t PyLong_FromSize_t
198 #define PyInt_FromSsize_t PyLong_FromSsize_t
199 #define PyInt_AsLong PyLong_AsLong
200 #define PyInt_AS_LONG PyLong_AS_LONG
201 #define PyInt_AsSsize_t PyLong_AsSsize_t
202 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
203 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
205 #if PY_MAJOR_VERSION >= 3
206 #define PyBoolObject PyLongObject
208 #if PY_VERSION_HEX < 0x03020000
209 typedef long Py_hash_t;
210 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
211 #define __Pyx_PyInt_AsHash_t PyInt_AsLong
213 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
214 #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
216 #if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
217 #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
218 #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
219 #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
221 #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
222 (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
223 (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
224 (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
225 #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
226 (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
227 (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
228 (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
229 #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
230 (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
231 (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
232 (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
234 #if PY_MAJOR_VERSION >= 3
235 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
237 #if PY_VERSION_HEX < 0x02050000
238 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
239 #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
240 #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
242 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
243 #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
244 #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
246 #if PY_VERSION_HEX < 0x02050000
247 #define __Pyx_NAMESTR(n) ((char *)(n))
248 #define __Pyx_DOCSTR(n) ((char *)(n))
250 #define __Pyx_NAMESTR(n) (n)
251 #define __Pyx_DOCSTR(n) (n)
253 #ifndef CYTHON_INLINE
254 #if defined(__GNUC__)
255 #define CYTHON_INLINE __inline__
256 #elif defined(_MSC_VER)
257 #define CYTHON_INLINE __inline
258 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
259 #define CYTHON_INLINE inline
261 #define CYTHON_INLINE
264 #ifndef CYTHON_RESTRICT
265 #if defined(__GNUC__)
266 #define CYTHON_RESTRICT __restrict__
267 #elif defined(_MSC_VER)
268 #define CYTHON_RESTRICT __restrict
269 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
270 #define CYTHON_RESTRICT restrict
272 #define CYTHON_RESTRICT
276 #define __PYX_NAN() ((float) NAN)
278 static CYTHON_INLINE
float __PYX_NAN() {
283 memset(&value, 0xFF,
sizeof(value));
289 #if PY_MAJOR_VERSION >= 3
290 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
291 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
293 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
294 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
297 #ifndef __PYX_EXTERN_C
299 #define __PYX_EXTERN_C extern "C"
301 #define __PYX_EXTERN_C extern
305 #if defined(WIN32) || defined(MS_WINDOWS)
306 #define _USE_MATH_DEFINES
309 #define __PYX_HAVE__PyClical
310 #define __PYX_HAVE_API__PyClical
321 #ifdef PYREX_WITHOUT_ASSERTIONS
322 #define CYTHON_WITHOUT_ASSERTIONS
325 #ifndef CYTHON_UNUSED
326 # if defined(__GNUC__)
327 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
328 # define CYTHON_UNUSED __attribute__ ((__unused__))
330 # define CYTHON_UNUSED
332 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
333 # define CYTHON_UNUSED __attribute__ ((__unused__))
335 # define CYTHON_UNUSED
338 typedef struct {PyObject **p;
char *s;
const Py_ssize_t n;
const char* encoding;
339 const char is_unicode;
const char is_str;
const char intern; } __Pyx_StringTabEntry;
341 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
342 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
343 #define __PYX_DEFAULT_STRING_ENCODING ""
344 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
345 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
346 static CYTHON_INLINE
char* __Pyx_PyObject_AsString(PyObject*);
347 static CYTHON_INLINE
char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
348 #define __Pyx_PyBytes_FromString PyBytes_FromString
349 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
350 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
char*);
351 #if PY_MAJOR_VERSION < 3
352 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
353 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
355 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
356 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
358 #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
359 #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s)
360 #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s)
361 #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s)
362 #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
363 #if PY_MAJOR_VERSION < 3
364 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *u)
366 const Py_UNICODE *u_end = u;
368 return u_end - u - 1;
371 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
373 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
374 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
375 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
376 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
377 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
378 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
379 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
380 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
381 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
382 static CYTHON_INLINE
size_t __Pyx_PyInt_AsSize_t(PyObject*);
383 #if CYTHON_COMPILING_IN_CPYTHON
384 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
386 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
388 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
389 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
390 static int __Pyx_sys_getdefaultencoding_not_ascii;
391 static int __Pyx_init_sys_getdefaultencoding_params() {
392 PyObject* sys = NULL;
393 PyObject* default_encoding = NULL;
394 PyObject* ascii_chars_u = NULL;
395 PyObject* ascii_chars_b = NULL;
396 sys = PyImport_ImportModule(
"sys");
397 if (sys == NULL)
goto bad;
398 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
399 if (default_encoding == NULL)
goto bad;
400 if (strcmp(PyBytes_AsString(default_encoding),
"ascii") == 0) {
401 __Pyx_sys_getdefaultencoding_not_ascii = 0;
403 const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
404 char ascii_chars[128];
406 for (c = 0; c < 128; c++) {
409 __Pyx_sys_getdefaultencoding_not_ascii = 1;
410 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
411 if (ascii_chars_u == NULL)
goto bad;
412 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
413 if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
416 "This module compiled with c_string_encoding=ascii, but default encoding '%s' is not a superset of ascii.",
422 Py_XDECREF(default_encoding);
423 Py_XDECREF(ascii_chars_u);
424 Py_XDECREF(ascii_chars_b);
428 Py_XDECREF(default_encoding);
429 Py_XDECREF(ascii_chars_u);
430 Py_XDECREF(ascii_chars_b);
434 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
435 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
437 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
438 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
439 static char* __PYX_DEFAULT_STRING_ENCODING;
440 static int __Pyx_init_sys_getdefaultencoding_params() {
441 PyObject* sys = NULL;
442 PyObject* default_encoding = NULL;
443 char* default_encoding_c;
444 sys = PyImport_ImportModule(
"sys");
445 if (sys == NULL)
goto bad;
446 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
447 if (default_encoding == NULL)
goto bad;
448 default_encoding_c = PyBytes_AS_STRING(default_encoding);
449 __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c));
450 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
452 Py_DECREF(default_encoding);
456 Py_XDECREF(default_encoding);
465 #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
466 #define likely(x) __builtin_expect(!!(x), 1)
467 #define unlikely(x) __builtin_expect(!!(x), 0)
469 #define likely(x) (x)
470 #define unlikely(x) (x)
473 #define likely(x) (x)
474 #define unlikely(x) (x)
477 static PyObject *__pyx_m;
478 static PyObject *__pyx_d;
479 static PyObject *__pyx_b;
480 static PyObject *__pyx_empty_tuple;
481 static PyObject *__pyx_empty_bytes;
482 static int __pyx_lineno;
483 static int __pyx_clineno = 0;
484 static const char * __pyx_cfilenm= __FILE__;
485 static const char *__pyx_filename;
488 static const char *__pyx_f[] = {
493 struct __pyx_obj_8PyClical_index_set;
494 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
495 struct __pyx_obj_8PyClical_clifford;
496 struct __pyx_opt_args_8PyClical_sqrt;
497 struct __pyx_opt_args_8PyClical_log;
498 struct __pyx_opt_args_8PyClical_cos;
499 struct __pyx_opt_args_8PyClical_acos;
500 struct __pyx_opt_args_8PyClical_acosh;
501 struct __pyx_opt_args_8PyClical_sin;
502 struct __pyx_opt_args_8PyClical_asin;
503 struct __pyx_opt_args_8PyClical_asinh;
504 struct __pyx_opt_args_8PyClical_tan;
505 struct __pyx_opt_args_8PyClical_atan;
506 struct __pyx_opt_args_8PyClical_atanh;
507 struct __pyx_opt_args_8PyClical_random_clifford;
516 struct __pyx_opt_args_8PyClical_sqrt {
528 struct __pyx_opt_args_8PyClical_log {
540 struct __pyx_opt_args_8PyClical_cos {
552 struct __pyx_opt_args_8PyClical_acos {
564 struct __pyx_opt_args_8PyClical_acosh {
576 struct __pyx_opt_args_8PyClical_sin {
588 struct __pyx_opt_args_8PyClical_asin {
600 struct __pyx_opt_args_8PyClical_asinh {
612 struct __pyx_opt_args_8PyClical_tan {
624 struct __pyx_opt_args_8PyClical_atan {
636 struct __pyx_opt_args_8PyClical_atanh {
648 struct __pyx_opt_args_8PyClical_random_clifford {
660 struct __pyx_obj_8PyClical_index_set {
662 struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
674 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
676 PyObject *__pyx_v_idx;
677 struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
679 Py_ssize_t __pyx_t_1;
680 PyObject *(*__pyx_t_2)(PyObject *);
691 struct __pyx_obj_8PyClical_clifford {
693 struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
707 struct __pyx_vtabstruct_8PyClical_clifford {
708 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
709 Clifford (*unwrap)(
struct __pyx_obj_8PyClical_clifford *);
710 PyObject *(*copy)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch);
712 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
713 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *,
Clifford);
714 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *);
725 struct __pyx_vtabstruct_8PyClical_index_set {
726 PyObject *(*wrap)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
727 IndexSet (*unwrap)(
struct __pyx_obj_8PyClical_index_set *);
728 PyObject *(*copy)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch);
730 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
731 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *,
IndexSet);
732 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *);
733 #ifndef CYTHON_REFNANNY
734 #define CYTHON_REFNANNY 0
738 void (*INCREF)(
void*, PyObject*, int);
739 void (*DECREF)(
void*, PyObject*, int);
740 void (*GOTREF)(
void*, PyObject*, int);
741 void (*GIVEREF)(
void*, PyObject*, int);
742 void* (*SetupContext)(
const char*, int,
const char*);
743 void (*FinishContext)(
void**);
744 } __Pyx_RefNannyAPIStruct;
745 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
746 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
747 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
749 #define __Pyx_RefNannySetupContext(name, acquire_gil) \
751 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
752 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
753 PyGILState_Release(__pyx_gilstate_save); \
755 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
758 #define __Pyx_RefNannySetupContext(name, acquire_gil) \
759 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
761 #define __Pyx_RefNannyFinishContext() \
762 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
763 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
764 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
765 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
766 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
767 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
768 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
769 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
770 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
772 #define __Pyx_RefNannyDeclarations
773 #define __Pyx_RefNannySetupContext(name, acquire_gil)
774 #define __Pyx_RefNannyFinishContext()
775 #define __Pyx_INCREF(r) Py_INCREF(r)
776 #define __Pyx_DECREF(r) Py_DECREF(r)
777 #define __Pyx_GOTREF(r)
778 #define __Pyx_GIVEREF(r)
779 #define __Pyx_XINCREF(r) Py_XINCREF(r)
780 #define __Pyx_XDECREF(r) Py_XDECREF(r)
781 #define __Pyx_XGOTREF(r)
782 #define __Pyx_XGIVEREF(r)
784 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
785 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
787 #if CYTHON_COMPILING_IN_CPYTHON
788 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
789 PyTypeObject* tp = Py_TYPE(obj);
790 if (likely(tp->tp_getattro))
791 return tp->tp_getattro(obj, attr_name);
792 #if PY_MAJOR_VERSION < 3
793 if (likely(tp->tp_getattr))
794 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
796 return PyObject_GetAttr(obj, attr_name);
799 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
802 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
804 static CYTHON_INLINE
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
805 static CYTHON_INLINE
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
807 static void __Pyx_WriteUnraisable(
const char *name,
int clineno,
808 int lineno,
const char *filename);
810 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
812 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
813 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
814 const char* function_name);
816 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
817 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
819 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
821 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
823 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
825 static CYTHON_INLINE
int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq,
int eq) {
826 int result = PySequence_Contains(seq, item);
827 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
830 #define __Pyx_SetItemInt(o, i, v, size, to_py_func, is_list, wraparound, boundscheck) \
831 (((size) <= sizeof(Py_ssize_t)) ? \
832 __Pyx_SetItemInt_Fast(o, i, v, is_list, wraparound, boundscheck) : \
833 __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
834 static CYTHON_INLINE
int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
835 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
836 int is_list,
int wraparound,
int boundscheck);
838 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type,
int none_allowed,
839 const char *name,
int exact);
841 #if PY_VERSION_HEX < 0x02050000
842 #ifndef PyAnySet_CheckExact
843 #define PyAnySet_CheckExact(ob) \
844 ((ob)->ob_type == &PySet_Type || \
845 (ob)->ob_type == &PyFrozenSet_Type)
846 #define PySet_New(iterable) \
847 PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
848 #define Pyx_PyFrozenSet_New(iterable) \
849 PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
850 #define PySet_Size(anyset) \
851 PyObject_Size((anyset))
852 #define PySet_Contains(anyset, key) \
853 PySequence_Contains((anyset), (key))
854 #define PySet_Pop(set) \
855 PyObject_CallMethod(set, (char *)"pop", NULL)
856 static CYTHON_INLINE
int PySet_Clear(PyObject *set) {
857 PyObject *ret = PyObject_CallMethod(set, (
char *)
"clear", NULL);
859 Py_DECREF(ret);
return 0;
861 static CYTHON_INLINE
int PySet_Discard(PyObject *set, PyObject *key) {
862 PyObject *ret = PyObject_CallMethod(set, (
char *)
"discard", (
char *)
"O", key);
864 Py_DECREF(ret);
return 0;
866 static CYTHON_INLINE
int PySet_Add(PyObject *set, PyObject *key) {
867 PyObject *ret = PyObject_CallMethod(set, (
char *)
"add", (
char *)
"O", key);
869 Py_DECREF(ret);
return 0;
876 static int __Pyx_SetVtable(PyObject *dict,
void *vtable);
878 static CYTHON_INLINE
void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
879 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
881 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
883 #ifndef __Pyx_CppExn2PyErr
888 static void __Pyx_CppExn2PyErr() {
890 if (PyErr_Occurred())
894 }
catch (
const std::bad_alloc& exn) {
895 PyErr_SetString(PyExc_MemoryError, exn.what());
896 }
catch (
const std::bad_cast& exn) {
897 PyErr_SetString(PyExc_TypeError, exn.what());
898 }
catch (
const std::domain_error& exn) {
899 PyErr_SetString(PyExc_ValueError, exn.what());
900 }
catch (
const std::invalid_argument& exn) {
901 PyErr_SetString(PyExc_ValueError, exn.what());
902 }
catch (
const std::ios_base::failure& exn) {
903 PyErr_SetString(PyExc_IOError, exn.what());
904 }
catch (
const std::out_of_range& exn) {
905 PyErr_SetString(PyExc_IndexError, exn.what());
906 }
catch (
const std::overflow_error& exn) {
907 PyErr_SetString(PyExc_OverflowError, exn.what());
908 }
catch (
const std::range_error& exn) {
909 PyErr_SetString(PyExc_ArithmeticError, exn.what());
910 }
catch (
const std::underflow_error& exn) {
911 PyErr_SetString(PyExc_ArithmeticError, exn.what());
912 }
catch (
const std::exception& exn) {
913 PyErr_SetString(PyExc_RuntimeError, exn.what());
917 PyErr_SetString(PyExc_RuntimeError,
"Unknown exception");
922 static CYTHON_INLINE
unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
924 static CYTHON_INLINE
unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
926 static CYTHON_INLINE
unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
928 static CYTHON_INLINE
char __Pyx_PyInt_AsChar(PyObject *);
930 static CYTHON_INLINE
short __Pyx_PyInt_AsShort(PyObject *);
932 static CYTHON_INLINE
int __Pyx_PyInt_AsInt(PyObject *);
934 static CYTHON_INLINE
signed char __Pyx_PyInt_AsSignedChar(PyObject *);
936 static CYTHON_INLINE
signed short __Pyx_PyInt_AsSignedShort(PyObject *);
938 static CYTHON_INLINE
signed int __Pyx_PyInt_AsSignedInt(PyObject *);
940 static CYTHON_INLINE
int __Pyx_PyInt_AsLongDouble(PyObject *);
942 static CYTHON_INLINE
unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
944 static CYTHON_INLINE
unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
946 static CYTHON_INLINE
long __Pyx_PyInt_AsLong(PyObject *);
948 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
950 static CYTHON_INLINE
signed long __Pyx_PyInt_AsSignedLong(PyObject *);
952 static CYTHON_INLINE
signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
954 static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
955 PyObject *method, *result = NULL;
956 if (unlikely(!args))
return NULL;
957 method = __Pyx_PyObject_GetAttrStr(obj, method_name);
958 if (unlikely(!method))
goto bad;
959 result = PyObject_Call(method, args, NULL);
965 #define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
966 __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
967 #define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
968 __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
969 #define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
970 __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
971 #define __Pyx_PyObject_CallMethod0(obj, name) \
972 __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))
974 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
976 #define __Pyx_Generator_USED
977 #include <structmember.h>
978 #include <frameobject.h>
979 typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
982 __pyx_generator_body_t body;
986 PyObject *exc_traceback;
987 PyObject *gi_weakreflist;
992 } __pyx_GeneratorObject;
993 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
995 static int __pyx_Generator_init(
void);
996 static int __Pyx_Generator_clear(PyObject*
self);
997 #if 1 || PY_VERSION_HEX < 0x030300B0
998 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
1000 #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
1003 static int __Pyx_check_binary_version(
void);
1007 PyCodeObject* code_object;
1008 } __Pyx_CodeObjectCacheEntry;
1009 struct __Pyx_CodeObjectCache {
1012 __Pyx_CodeObjectCacheEntry* entries;
1014 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1015 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
1016 static PyCodeObject *__pyx_find_code_object(
int code_line);
1017 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
1019 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
1020 int py_line,
const char *filename);
1022 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1030 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1031 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1032 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1033 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *);
1034 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *,
int __pyx_skip_dispatch);
1035 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *,
int __pyx_skip_dispatch);
1036 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *,
int __pyx_skip_dispatch);
1037 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *);
1038 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *);
1039 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *,
int __pyx_skip_dispatch);
1040 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *,
int __pyx_skip_dispatch);
1041 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *,
int __pyx_skip_dispatch);
1042 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *,
int __pyx_skip_dispatch);
1043 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *,
int __pyx_skip_dispatch);
1044 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *,
int __pyx_skip_dispatch);
1045 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *,
int __pyx_skip_dispatch);
1046 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *,
int __pyx_skip_dispatch);
1047 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *,
int __pyx_skip_dispatch);
1048 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *,
int __pyx_skip_dispatch);
1049 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *,
int __pyx_skip_dispatch);
1050 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *,
int __pyx_skip_dispatch);
1051 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *,
int __pyx_skip_dispatch);
1052 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *,
int __pyx_skip_dispatch);
1053 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
1054 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *,
int __pyx_skip_dispatch);
1055 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *,
int __pyx_skip_dispatch);
1056 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args);
1057 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *,
int __pyx_skip_dispatch);
1058 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_log *__pyx_optional_args);
1059 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args);
1060 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args);
1061 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *,
int __pyx_skip_dispatch);
1062 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args);
1063 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args);
1064 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args);
1065 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *,
int __pyx_skip_dispatch);
1066 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args);
1067 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args);
1068 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args);
1069 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *,
int __pyx_skip_dispatch);
1070 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *,
int __pyx_skip_dispatch,
struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args);
1071 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);
1072 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *,
int __pyx_skip_dispatch);
1073 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *,
int __pyx_skip_dispatch);
1074 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *,
int __pyx_skip_dispatch);
1075 #define __Pyx_MODULE_NAME "PyClical"
1076 int __pyx_module_is_main_PyClical = 0;
1079 static PyObject *__pyx_builtin_IndexError;
1080 static PyObject *__pyx_builtin_RuntimeError;
1081 static PyObject *__pyx_builtin_TypeError;
1082 static PyObject *__pyx_builtin_ValueError;
1083 static PyObject *__pyx_builtin_NotImplemented;
1084 static PyObject *__pyx_builtin_range;
1085 static PyObject *__pyx_builtin_xrange;
1086 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1087 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other);
1088 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1089 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
1090 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);
1091 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
1092 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx);
1093 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1094 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1095 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1096 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1097 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1098 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1099 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1100 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1101 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1102 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1103 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1104 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1105 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1106 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1107 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs);
1108 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1109 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1110 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self);
1111 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
1112 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1113 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1114 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1115 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1116 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt);
1117 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1118 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x);
1119 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1120 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
1121 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
1122 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt);
1123 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1124 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1125 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1126 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1127 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1128 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1129 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1130 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1131 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1132 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1133 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1134 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1135 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1136 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1137 #if PY_MAJOR_VERSION < 3
1138 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1140 #if PY_MAJOR_VERSION < 3
1141 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1143 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1144 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
1145 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs);
1146 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy);
1147 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
1148 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m);
1149 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade);
1150 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1151 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1152 static PyObject *__pyx_pf_8PyClical_8clifford_66even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1153 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1154 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm);
1155 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1156 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1157 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1158 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1159 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1160 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1161 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1162 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit);
1163 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1164 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1165 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1166 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self);
1167 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self);
1168 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1169 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1170 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1171 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1172 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1173 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1174 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1175 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1176 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1177 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1178 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1179 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1180 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1181 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1182 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
1183 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m);
1184 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1185 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1186 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1187 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1188 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1189 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1190 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1191 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1192 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1193 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1194 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1195 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1196 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1197 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1198 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1199 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i);
1200 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);
1201 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1202 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1203 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1204 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj);
1205 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q);
1206 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self);
1207 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k);
1208 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k);
1209 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k);
1210 static char __pyx_k_1[] =
"Cannot initialize index_set object from";
1211 static char __pyx_k_2[] =
" invalid ";
1212 static char __pyx_k_3[] =
".";
1213 static char __pyx_k_4[] =
" invalid string ";
1214 static char __pyx_k_5[] =
" ";
1215 static char __pyx_k_6[] =
"Cannot initialize clifford object from";
1216 static char __pyx_k_7[] =
" value ";
1217 static char __pyx_k_8[] =
":";
1218 static char __pyx_k_9[] =
"\n\t";
1219 static char __pyx_k_10[] =
" (";
1220 static char __pyx_k_11[] =
", ";
1221 static char __pyx_k_12[] =
").";
1222 static char __pyx_k_13[] =
"Not applicable.";
1223 static char __pyx_k_16[] =
"Cannot reframe";
1224 static char __pyx_k_17[] =
" from ";
1225 static char __pyx_k_18[] =
" to frame ";
1226 static char __pyx_k_19[] =
" using (";
1227 static char __pyx_k_20[] =
"This comparison operator is not implemented for ";
1228 static char __pyx_k_21[] =
"Cannot take vector part of ";
1229 static char __pyx_k_22[] =
" using invalid ";
1230 static char __pyx_k_23[] =
" as frame:\n\t";
1231 static char __pyx_k_25[] =
"0.8.2";
1232 static char __pyx_k_27[] =
"index_set_hidden_doctests";
1233 static char __pyx_k_28[] =
"/home/abuild/rpmbuild/BUILD/glucat-0.8.2/pyclical/PyClical.pyx";
1234 static char __pyx_k_30[] =
"clifford_hidden_doctests";
1235 static char __pyx_k_41[] =
"index_set.copy (line 64)";
1236 static char __pyx_k_42[] =
"\n Copy this index_set object.\n\n >>> s=index_set(1); t=s.copy(); print t\n {1}\n ";
1237 static char __pyx_k_43[] =
"index_set.__setitem__ (line 177)";
1238 static char __pyx_k_44[] =
"\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 ";
1239 static char __pyx_k_45[] =
"index_set.__getitem__ (line 189)";
1240 static char __pyx_k_46[] =
"\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 ";
1241 static char __pyx_k_47[] =
"index_set.__iter__ (line 227)";
1242 static char __pyx_k_48[] =
"\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 ";
1243 static char __pyx_k_49[] =
"index_set.__invert__ (line 238)";
1244 static char __pyx_k_50[] =
"\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 ";
1245 static char __pyx_k_51[] =
"index_set.__xor__ (line 247)";
1246 static char __pyx_k_52[] =
"\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 ";
1247 static char __pyx_k_53[] =
"index_set.__ixor__ (line 258)";
1248 static char __pyx_k_54[] =
"\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 ";
1249 static char __pyx_k_55[] =
"index_set.__and__ (line 269)";
1250 static char __pyx_k_56[] =
"\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 ";
1251 static char __pyx_k_57[] =
"index_set.__iand__ (line 280)";
1252 static char __pyx_k_58[] =
"\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 ";
1253 static char __pyx_k_59[] =
"index_set.__or__ (line 291)";
1254 static char __pyx_k_60[] =
"\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 ";
1255 static char __pyx_k_61[] =
"index_set.__ior__ (line 302)";
1256 static char __pyx_k_62[] =
"\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 ";
1257 static char __pyx_k_63[] =
"index_set.count (line 313)";
1258 static char __pyx_k_64[] =
"\n Cardinality: Number of indices included in set.\n\n >>> index_set({-1,1,2}).count()\n 3\n ";
1259 static char __pyx_k_65[] =
"index_set.count_neg (line 322)";
1260 static char __pyx_k_66[] =
"\n Number of negative indices included in set.\n\n >>> index_set({-1,1,2}).count_neg()\n 1\n ";
1261 static char __pyx_k_67[] =
"index_set.count_pos (line 331)";
1262 static char __pyx_k_68[] =
"\n Number of positive indices included in set.\n\n >>> index_set({-1,1,2}).count_pos()\n 2\n ";
1263 static char __pyx_k_69[] =
"index_set.min (line 340)";
1264 static char __pyx_k_70[] =
"\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
1265 static char __pyx_k_71[] =
"index_set.max (line 349)";
1266 static char __pyx_k_72[] =
"\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
1267 static char __pyx_k_73[] =
"index_set.sign_of_mult (line 364)";
1268 static char __pyx_k_74[] =
"\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 ";
1269 static char __pyx_k_75[] =
"index_set.sign_of_square (line 373)";
1270 static char __pyx_k_76[] =
"\n Sign of geometric square of a Clifford basis element.\n\n >>> s = index_set({1,2}); s.sign_of_square()\n -1\n ";
1271 static char __pyx_k_77[] =
"index_set.__repr__ (line 382)";
1272 static char __pyx_k_78[] =
"\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 ";
1273 static char __pyx_k_79[] =
"index_set.__str__ (line 393)";
1274 static char __pyx_k_80[] =
"\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 ";
1275 static char __pyx_k_81[] =
"index_set_hidden_doctests (line 404)";
1276 static char __pyx_k_82[] =
"\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 ";
1277 static char __pyx_k_83[] =
"compare (line 490)";
1278 static char __pyx_k_84[] =
"\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 ";
1279 static char __pyx_k_85[] =
"min_neg (line 502)";
1280 static char __pyx_k_86[] =
"\n Minimum negative index, or 0 if none.\n\n >>> min_neg(index_set({1,2}))\n 0\n ";
1281 static char __pyx_k_87[] =
"max_pos (line 511)";
1282 static char __pyx_k_88[] =
"\n Maximum positive index, or 0 if none.\n\n >>> max_pos(index_set({1,2}))\n 2\n ";
1283 static char __pyx_k_89[] =
"clifford.copy (line 554)";
1284 static char __pyx_k_90[] =
"\n Copy this clifford object.\n\n >>> x=clifford(\"1{2}\"); y=x.copy(); print y\n {2}\n ";
1285 static char __pyx_k_91[] =
"clifford.__iter__ (line 637)";
1286 static char __pyx_k_92[] =
"\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 ";
1287 static char __pyx_k_93[] =
"clifford.reframe (line 648)";
1288 static char __pyx_k_94[] =
"\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 ";
1289 static char __pyx_k_95[] =
"clifford.__getitem__ (line 706)";
1290 static char __pyx_k_96[] =
"\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 ";
1291 static char __pyx_k_97[] =
"clifford.__neg__ (line 721)";
1292 static char __pyx_k_98[] =
"\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1293 static char __pyx_k_99[] =
"clifford.__pos__ (line 730)";
1294 static char __pyx_k__e[] =
"e";
1295 static char __pyx_k__i[] =
"i";
1296 static char __pyx_k__m[] =
"m";
1297 static char __pyx_k__p[] =
"p";
1298 static char __pyx_k__q[] =
"q";
1299 static char __pyx_k_100[] =
"\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1300 static char __pyx_k_101[] =
"clifford.__add__ (line 739)";
1301 static char __pyx_k_102[] =
"\n Geometric sum.\n\n >>> print clifford(1) + clifford(\"{2}\")\n 1+{2}\n >>> print clifford(\"{1}\") + clifford(\"{2}\")\n {1}+{2}\n ";
1302 static char __pyx_k_103[] =
"clifford.__iadd__ (line 750)";
1303 static char __pyx_k_104[] =
"\n Geometric sum.\n\n >>> x = clifford(1); x += clifford(\"{2}\"); print x\n 1+{2}\n ";
1304 static char __pyx_k_105[] =
"clifford.__sub__ (line 759)";
1305 static char __pyx_k_106[] =
"\n Geometric difference.\n\n >>> print clifford(1) - clifford(\"{2}\")\n 1-{2}\n >>> print clifford(\"{1}\") - clifford(\"{2}\")\n {1}-{2}\n ";
1306 static char __pyx_k_107[] =
"clifford.__isub__ (line 770)";
1307 static char __pyx_k_108[] =
"\n Geometric difference.\n\n >>> x = clifford(1); x -= clifford(\"{2}\"); print x\n 1-{2}\n ";
1308 static char __pyx_k_109[] =
"clifford.__mul__ (line 779)";
1309 static char __pyx_k_110[] =
"\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 ";
1310 static char __pyx_k_111[] =
"clifford.__imul__ (line 792)";
1311 static char __pyx_k_112[] =
"\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 ";
1312 static char __pyx_k_113[] =
"clifford.__mod__ (line 805)";
1313 static char __pyx_k_114[] =
"\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 ";
1314 static char __pyx_k_115[] =
"clifford.__imod__ (line 820)";
1315 static char __pyx_k_116[] =
"\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 ";
1316 static char __pyx_k_117[] =
"clifford.__and__ (line 835)";
1317 static char __pyx_k_118[] =
"\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 ";
1318 static char __pyx_k_119[] =
"clifford.__iand__ (line 850)";
1319 static char __pyx_k_120[] =
"\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 ";
1320 static char __pyx_k_121[] =
"clifford.__xor__ (line 865)";
1321 static char __pyx_k_122[] =
"\n Outer product.\n\n >>> print clifford(\"{1}\") ^ clifford(\"{2}\")\n {1,2}\n >>> print clifford(2) ^ clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") ^ clifford(\"{1}\")\n 0\n >>> print clifford(\"{1}\") ^ clifford(\"{1,2}\")\n 0\n ";
1322 static char __pyx_k_123[] =
"clifford.__ixor__ (line 880)";
1323 static char __pyx_k_124[] =
"\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 ";
1324 static char __pyx_k_125[] =
"clifford.__div__ (line 895)";
1325 static char __pyx_k_126[] =
"\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 ";
1326 static char __pyx_k_127[] =
"clifford.__idiv__ (line 910)";
1327 static char __pyx_k_128[] =
"\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 ";
1328 static char __pyx_k_129[] =
"clifford.inv (line 925)";
1329 static char __pyx_k_130[] =
"\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 ";
1330 static char __pyx_k_131[] =
"clifford.__or__ (line 938)";
1331 static char __pyx_k_132[] =
"\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 ";
1332 static char __pyx_k_133[] =
"clifford.__ior__ (line 949)";
1333 static char __pyx_k_134[] =
"\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 ";
1334 static char __pyx_k_135[] =
"clifford.__pow__ (line 960)";
1335 static char __pyx_k_136[] =
"\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 ";
1336 static char __pyx_k_137[] =
"clifford.pow (line 979)";
1337 static char __pyx_k_138[] =
"\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 ";
1338 static char __pyx_k_139[] =
"clifford.outer_pow (line 1003)";
1339 static char __pyx_k_140[] =
"\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 ";
1340 static char __pyx_k_141[] =
"clifford.__call__ (line 1019)";
1341 static char __pyx_k_142[] =
"\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 ";
1342 static char __pyx_k_143[] =
"clifford.scalar (line 1038)";
1343 static char __pyx_k_144[] =
"\n Scalar part.\n\n >>> clifford(\"1+{1}+{1,2}\").scalar()\n 1.0\n >>> clifford(\"{1,2}\").scalar()\n 0.0\n ";
1344 static char __pyx_k_145[] =
"clifford.pure (line 1049)";
1345 static char __pyx_k_146[] =
"\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 ";
1346 static char __pyx_k_147[] =
"clifford.even (line 1060)";
1347 static char __pyx_k_148[] =
"\n Even part of multivector, sum of even grade terms.\n\n >>> print clifford(\"1+{1}+{1,2}\").even()\n 1+{1,2}\n ";
1348 static char __pyx_k_149[] =
"clifford.odd (line 1069)";
1349 static char __pyx_k_150[] =
"\n Odd part of multivector, sum of odd grade terms.\n\n >>> print clifford(\"1+{1}+{1,2}\").odd()\n {1}\n ";
1350 static char __pyx_k_151[] =
"clifford.vector_part (line 1078)";
1351 static char __pyx_k_152[] =
"\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 ";
1352 static char __pyx_k_153[] =
"clifford.involute (line 1106)";
1353 static char __pyx_k_154[] =
"\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 ";
1354 static char __pyx_k_155[] =
"clifford.reverse (line 1122)";
1355 static char __pyx_k_156[] =
"\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 ";
1356 static char __pyx_k_157[] =
"clifford.conj (line 1137)";
1357 static char __pyx_k_158[] =
"\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 ";
1358 static char __pyx_k_159[] =
"clifford.quad (line 1152)";
1359 static char __pyx_k_160[] =
"\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 ";
1360 static char __pyx_k_161[] =
"clifford.norm (line 1163)";
1361 static char __pyx_k_162[] =
"\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 ";
1362 static char __pyx_k_163[] =
"clifford.abs (line 1174)";
1363 static char __pyx_k_164[] =
"\n Absolute value: square root of norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").abs()\n 2.0\n ";
1364 static char __pyx_k_165[] =
"clifford.max_abs (line 1183)";
1365 static char __pyx_k_166[] =
"\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 ";
1366 static char __pyx_k_167[] =
"clifford.truncated (line 1194)";
1367 static char __pyx_k_168[] =
"\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 ";
1368 static char __pyx_k_169[] =
"clifford.isnan (line 1205)";
1369 static char __pyx_k_170[] =
"\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
1370 static char __pyx_k_171[] =
"clifford.frame (line 1214)";
1371 static char __pyx_k_172[] =
"\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 ";
1372 static char __pyx_k_173[] =
"clifford.__repr__ (line 1225)";
1373 static char __pyx_k_174[] =
"\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 ";
1374 static char __pyx_k_175[] =
"clifford.__str__ (line 1234)";
1375 static char __pyx_k_176[] =
"\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 ";
1376 static char __pyx_k_177[] =
"clifford_hidden_doctests (line 1243)";
1377 static char __pyx_k_178[] =
"\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 ";
1378 static char __pyx_k_179[] =
"inv (line 1329)";
1379 static char __pyx_k_180[] =
"\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 ";
1380 static char __pyx_k_181[] =
"scalar (line 1344)";
1381 static char __pyx_k_182[] =
"\n Scalar part.\n\n >>> scalar(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> scalar(clifford(\"{1,2}\"))\n 0.0\n ";
1382 static char __pyx_k_183[] =
"real (line 1355)";
1383 static char __pyx_k_184[] =
"\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 ";
1384 static char __pyx_k_185[] =
"imag (line 1366)";
1385 static char __pyx_k_186[] =
"\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 ";
1386 static char __pyx_k_187[] =
"pure (line 1377)";
1387 static char __pyx_k_188[] =
"\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 ";
1388 static char __pyx_k_189[] =
"even (line 1388)";
1389 static char __pyx_k_190[] =
"\n Even part of multivector, sum of even grade terms.\n\n >>> print even(clifford(\"1+{1}+{1,2}\"))\n 1+{1,2}\n ";
1390 static char __pyx_k_191[] =
"odd (line 1397)";
1391 static char __pyx_k_192[] =
"\n Odd part of multivector, sum of odd grade terms.\n\n >>> print odd(clifford(\"1+{1}+{1,2}\"))\n {1}\n ";
1392 static char __pyx_k_193[] =
"involute (line 1406)";
1393 static char __pyx_k_194[] =
"\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 ";
1394 static char __pyx_k_195[] =
"reverse (line 1421)";
1395 static char __pyx_k_196[] =
"\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 ";
1396 static char __pyx_k_197[] =
"conj (line 1436)";
1397 static char __pyx_k_198[] =
"\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 ";
1398 static char __pyx_k_199[] =
"quad (line 1451)";
1399 static char __pyx_k_200[] =
"\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 ";
1400 static char __pyx_k_201[] =
"norm (line 1462)";
1401 static char __pyx_k_202[] =
"\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 ";
1402 static char __pyx_k_203[] =
"abs (line 1473)";
1403 static char __pyx_k_204[] =
"\n Absolute value of multivector: multivector 2-norm.\n\n >>> abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
1404 static char __pyx_k_205[] =
"max_abs (line 1482)";
1405 static char __pyx_k_206[] =
"\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 ";
1406 static char __pyx_k_207[] =
"pow (line 1494)";
1407 static char __pyx_k_208[] =
"\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 ";
1408 static char __pyx_k_209[] =
"outer_pow (line 1518)";
1409 static char __pyx_k_210[] =
"\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 ";
1410 static char __pyx_k_211[] =
"complexifier (line 1527)";
1411 static char __pyx_k_212[] =
"\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 ";
1412 static char __pyx_k_213[] =
"sqrt (line 1542)";
1413 static char __pyx_k_214[] =
"\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 ";
1414 static char __pyx_k_215[] =
"exp (line 1565)";
1415 static char __pyx_k_216[] =
"\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 ";
1416 static char __pyx_k_217[] =
"log (line 1579)";
1417 static char __pyx_k_218[] =
"\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 ";
1418 static char __pyx_k_219[] =
"cos (line 1602)";
1419 static char __pyx_k_220[] =
"\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 ";
1420 static char __pyx_k_221[] =
"acos (line 1619)";
1421 static char __pyx_k_222[] =
"\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 ";
1422 static char __pyx_k_223[] =
"cosh (line 1640)";
1423 static char __pyx_k_224[] =
"\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 ";
1424 static char __pyx_k_225[] =
"acosh (line 1656)";
1425 static char __pyx_k_226[] =
"\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 ";
1426 static char __pyx_k_227[] =
"sin (line 1679)";
1427 static char __pyx_k_228[] =
"\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 ";
1428 static char __pyx_k_229[] =
"asin (line 1698)";
1429 static char __pyx_k_230[] =
"\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 ";
1430 static char __pyx_k_231[] =
"sinh (line 1719)";
1431 static char __pyx_k_232[] =
"\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 ";
1432 static char __pyx_k_233[] =
"asinh (line 1733)";
1433 static char __pyx_k_234[] =
"\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 ";
1434 static char __pyx_k_235[] =
"tan (line 1752)";
1435 static char __pyx_k_236[] =
"\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 ";
1436 static char __pyx_k_237[] =
"atan (line 1769)";
1437 static char __pyx_k_238[] =
"\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 ";
1438 static char __pyx_k_239[] =
"tanh (line 1786)";
1439 static char __pyx_k_240[] =
"\n Hyperbolic tangent of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print tanh(x)\n {1,2}\n ";
1440 static char __pyx_k_241[] =
"atanh (line 1798)";
1441 static char __pyx_k_242[] =
"\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 ";
1442 static char __pyx_k_243[] =
"random_clifford (line 1815)";
1443 static char __pyx_k_244[] =
"\n Random multivector within a frame.\n\n >>> print random_clifford(index_set({-3,-1,2})).frame()\n {-3,-1,2}\n ";
1444 static char __pyx_k_245[] =
"cga3 (line 1824)";
1445 static char __pyx_k_246[] =
"\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 ";
1446 static char __pyx_k_247[] =
"cga3std (line 1833)";
1447 static char __pyx_k_248[] =
"\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 ";
1448 static char __pyx_k_249[] =
"agc3 (line 1844)";
1449 static char __pyx_k_250[] =
"\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 ";
1450 static char __pyx_k_251[] =
"e (line 1887)";
1451 static char __pyx_k_252[] =
"\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 ";
1452 static char __pyx_k_253[] =
"istpq (line 1900)";
1453 static char __pyx_k_254[] =
"\n Abbreviation for index_set({-q,...p}).\n\n >>> print istpq(2,3)\n {-3,-2,-1,1,2}\n ";
1454 static char __pyx_k__cl[] =
"cl";
1455 static char __pyx_k__pi[] =
"pi";
1456 static char __pyx_k__cos[] =
"cos";
1457 static char __pyx_k__exp[] =
"exp";
1458 static char __pyx_k__frm[] =
"frm";
1459 static char __pyx_k__inv[] =
"inv";
1460 static char __pyx_k__ist[] =
"ist";
1461 static char __pyx_k__ixt[] =
"ixt";
1462 static char __pyx_k__lhs[] =
"lhs";
1463 static char __pyx_k__log[] =
"log";
1464 static char __pyx_k__max[] =
"max";
1465 static char __pyx_k__min[] =
"min";
1466 static char __pyx_k__obj[] =
"obj";
1467 static char __pyx_k__odd[] =
"odd";
1468 static char __pyx_k__pow[] =
"pow";
1469 static char __pyx_k__rhs[] =
"rhs";
1470 static char __pyx_k__sin[] =
"sin";
1471 static char __pyx_k__tan[] =
"tan";
1472 static char __pyx_k__tau[] =
"tau";
1473 static char __pyx_k__Real[] =
"Real";
1474 static char __pyx_k__acos[] =
"acos";
1475 static char __pyx_k__args[] =
"args";
1476 static char __pyx_k__asin[] =
"asin";
1477 static char __pyx_k__atan[] =
"atan";
1478 static char __pyx_k__conj[] =
"conj";
1479 static char __pyx_k__copy[] =
"copy";
1480 static char __pyx_k__cosh[] =
"cosh";
1481 static char __pyx_k__even[] =
"even";
1482 static char __pyx_k__fill[] =
"fill";
1483 static char __pyx_k__math[] =
"math";
1484 static char __pyx_k__norm[] =
"norm";
1485 static char __pyx_k__pure[] =
"pure";
1486 static char __pyx_k__quad[] =
"quad";
1487 static char __pyx_k__send[] =
"send";
1488 static char __pyx_k__sinh[] =
"sinh";
1489 static char __pyx_k__sqrt[] =
"sqrt";
1490 static char __pyx_k__tanh[] =
"tanh";
1491 static char __pyx_k___test[] =
"_test";
1492 static char __pyx_k__acosh[] =
"acosh";
1493 static char __pyx_k__asinh[] =
"asinh";
1494 static char __pyx_k__atanh[] =
"atanh";
1495 static char __pyx_k__close[] =
"close";
1496 static char __pyx_k__grade[] =
"grade";
1497 static char __pyx_k__istpq[] =
"istpq";
1498 static char __pyx_k__nbar3[] =
"nbar3";
1499 static char __pyx_k__ninf3[] =
"ninf3";
1500 static char __pyx_k__other[] =
"other";
1501 static char __pyx_k__range[] =
"range";
1502 static char __pyx_k__throw[] =
"throw";
1503 static char __pyx_k__scalar[] =
"scalar";
1504 static char __pyx_k__xrange[] =
"xrange";
1505 static char __pyx_k__doctest[] =
"doctest";
1506 static char __pyx_k__numbers[] =
"numbers";
1507 static char __pyx_k__reverse[] =
"reverse";
1508 static char __pyx_k__testmod[] =
"testmod";
1509 static char __pyx_k__Integral[] =
"Integral";
1510 static char __pyx_k__PyClical[] =
"PyClical";
1511 static char __pyx_k__Sequence[] =
"Sequence";
1512 static char __pyx_k____main__[] =
"__main__";
1513 static char __pyx_k____name__[] =
"__name__";
1514 static char __pyx_k____test__[] =
"__test__";
1515 static char __pyx_k__involute[] =
"involute";
1516 static char __pyx_k__TypeError[] =
"TypeError";
1517 static char __pyx_k__outer_pow[] =
"outer_pow";
1518 static char __pyx_k__IndexError[] =
"IndexError";
1519 static char __pyx_k__ValueError[] =
"ValueError";
1520 static char __pyx_k____import__[] =
"__import__";
1521 static char __pyx_k____version__[] =
"__version__";
1522 static char __pyx_k__collections[] =
"collections";
1523 static char __pyx_k__RuntimeError[] =
"RuntimeError";
1524 static char __pyx_k__NotImplemented[] =
"NotImplemented";
1525 static char __pyx_k____pyx_vtable__[] =
"__pyx_vtable__";
1526 static PyObject *__pyx_kp_s_1;
1527 static PyObject *__pyx_kp_s_10;
1528 static PyObject *__pyx_kp_u_100;
1529 static PyObject *__pyx_kp_u_101;
1530 static PyObject *__pyx_kp_u_102;
1531 static PyObject *__pyx_kp_u_103;
1532 static PyObject *__pyx_kp_u_104;
1533 static PyObject *__pyx_kp_u_105;
1534 static PyObject *__pyx_kp_u_106;
1535 static PyObject *__pyx_kp_u_107;
1536 static PyObject *__pyx_kp_u_108;
1537 static PyObject *__pyx_kp_u_109;
1538 static PyObject *__pyx_kp_s_11;
1539 static PyObject *__pyx_kp_u_110;
1540 static PyObject *__pyx_kp_u_111;
1541 static PyObject *__pyx_kp_u_112;
1542 static PyObject *__pyx_kp_u_113;
1543 static PyObject *__pyx_kp_u_114;
1544 static PyObject *__pyx_kp_u_115;
1545 static PyObject *__pyx_kp_u_116;
1546 static PyObject *__pyx_kp_u_117;
1547 static PyObject *__pyx_kp_u_118;
1548 static PyObject *__pyx_kp_u_119;
1549 static PyObject *__pyx_kp_s_12;
1550 static PyObject *__pyx_kp_u_120;
1551 static PyObject *__pyx_kp_u_121;
1552 static PyObject *__pyx_kp_u_122;
1553 static PyObject *__pyx_kp_u_123;
1554 static PyObject *__pyx_kp_u_124;
1555 static PyObject *__pyx_kp_u_125;
1556 static PyObject *__pyx_kp_u_126;
1557 static PyObject *__pyx_kp_u_127;
1558 static PyObject *__pyx_kp_u_128;
1559 static PyObject *__pyx_kp_u_129;
1560 static PyObject *__pyx_kp_s_13;
1561 static PyObject *__pyx_kp_u_130;
1562 static PyObject *__pyx_kp_u_131;
1563 static PyObject *__pyx_kp_u_132;
1564 static PyObject *__pyx_kp_u_133;
1565 static PyObject *__pyx_kp_u_134;
1566 static PyObject *__pyx_kp_u_135;
1567 static PyObject *__pyx_kp_u_136;
1568 static PyObject *__pyx_kp_u_137;
1569 static PyObject *__pyx_kp_u_138;
1570 static PyObject *__pyx_kp_u_139;
1571 static PyObject *__pyx_kp_u_140;
1572 static PyObject *__pyx_kp_u_141;
1573 static PyObject *__pyx_kp_u_142;
1574 static PyObject *__pyx_kp_u_143;
1575 static PyObject *__pyx_kp_u_144;
1576 static PyObject *__pyx_kp_u_145;
1577 static PyObject *__pyx_kp_u_146;
1578 static PyObject *__pyx_kp_u_147;
1579 static PyObject *__pyx_kp_u_148;
1580 static PyObject *__pyx_kp_u_149;
1581 static PyObject *__pyx_kp_u_150;
1582 static PyObject *__pyx_kp_u_151;
1583 static PyObject *__pyx_kp_u_152;
1584 static PyObject *__pyx_kp_u_153;
1585 static PyObject *__pyx_kp_u_154;
1586 static PyObject *__pyx_kp_u_155;
1587 static PyObject *__pyx_kp_u_156;
1588 static PyObject *__pyx_kp_u_157;
1589 static PyObject *__pyx_kp_u_158;
1590 static PyObject *__pyx_kp_u_159;
1591 static PyObject *__pyx_kp_s_16;
1592 static PyObject *__pyx_kp_u_160;
1593 static PyObject *__pyx_kp_u_161;
1594 static PyObject *__pyx_kp_u_162;
1595 static PyObject *__pyx_kp_u_163;
1596 static PyObject *__pyx_kp_u_164;
1597 static PyObject *__pyx_kp_u_165;
1598 static PyObject *__pyx_kp_u_166;
1599 static PyObject *__pyx_kp_u_167;
1600 static PyObject *__pyx_kp_u_168;
1601 static PyObject *__pyx_kp_u_169;
1602 static PyObject *__pyx_kp_s_17;
1603 static PyObject *__pyx_kp_u_170;
1604 static PyObject *__pyx_kp_u_171;
1605 static PyObject *__pyx_kp_u_172;
1606 static PyObject *__pyx_kp_u_173;
1607 static PyObject *__pyx_kp_u_174;
1608 static PyObject *__pyx_kp_u_175;
1609 static PyObject *__pyx_kp_u_176;
1610 static PyObject *__pyx_kp_u_177;
1611 static PyObject *__pyx_kp_u_178;
1612 static PyObject *__pyx_kp_u_179;
1613 static PyObject *__pyx_kp_s_18;
1614 static PyObject *__pyx_kp_u_180;
1615 static PyObject *__pyx_kp_u_181;
1616 static PyObject *__pyx_kp_u_182;
1617 static PyObject *__pyx_kp_u_183;
1618 static PyObject *__pyx_kp_u_184;
1619 static PyObject *__pyx_kp_u_185;
1620 static PyObject *__pyx_kp_u_186;
1621 static PyObject *__pyx_kp_u_187;
1622 static PyObject *__pyx_kp_u_188;
1623 static PyObject *__pyx_kp_u_189;
1624 static PyObject *__pyx_kp_s_19;
1625 static PyObject *__pyx_kp_u_190;
1626 static PyObject *__pyx_kp_u_191;
1627 static PyObject *__pyx_kp_u_192;
1628 static PyObject *__pyx_kp_u_193;
1629 static PyObject *__pyx_kp_u_194;
1630 static PyObject *__pyx_kp_u_195;
1631 static PyObject *__pyx_kp_u_196;
1632 static PyObject *__pyx_kp_u_197;
1633 static PyObject *__pyx_kp_u_198;
1634 static PyObject *__pyx_kp_u_199;
1635 static PyObject *__pyx_kp_s_2;
1636 static PyObject *__pyx_kp_s_20;
1637 static PyObject *__pyx_kp_u_200;
1638 static PyObject *__pyx_kp_u_201;
1639 static PyObject *__pyx_kp_u_202;
1640 static PyObject *__pyx_kp_u_203;
1641 static PyObject *__pyx_kp_u_204;
1642 static PyObject *__pyx_kp_u_205;
1643 static PyObject *__pyx_kp_u_206;
1644 static PyObject *__pyx_kp_u_207;
1645 static PyObject *__pyx_kp_u_208;
1646 static PyObject *__pyx_kp_u_209;
1647 static PyObject *__pyx_kp_s_21;
1648 static PyObject *__pyx_kp_u_210;
1649 static PyObject *__pyx_kp_u_211;
1650 static PyObject *__pyx_kp_u_212;
1651 static PyObject *__pyx_kp_u_213;
1652 static PyObject *__pyx_kp_u_214;
1653 static PyObject *__pyx_kp_u_215;
1654 static PyObject *__pyx_kp_u_216;
1655 static PyObject *__pyx_kp_u_217;
1656 static PyObject *__pyx_kp_u_218;
1657 static PyObject *__pyx_kp_u_219;
1658 static PyObject *__pyx_kp_s_22;
1659 static PyObject *__pyx_kp_u_220;
1660 static PyObject *__pyx_kp_u_221;
1661 static PyObject *__pyx_kp_u_222;
1662 static PyObject *__pyx_kp_u_223;
1663 static PyObject *__pyx_kp_u_224;
1664 static PyObject *__pyx_kp_u_225;
1665 static PyObject *__pyx_kp_u_226;
1666 static PyObject *__pyx_kp_u_227;
1667 static PyObject *__pyx_kp_u_228;
1668 static PyObject *__pyx_kp_u_229;
1669 static PyObject *__pyx_kp_s_23;
1670 static PyObject *__pyx_kp_u_230;
1671 static PyObject *__pyx_kp_u_231;
1672 static PyObject *__pyx_kp_u_232;
1673 static PyObject *__pyx_kp_u_233;
1674 static PyObject *__pyx_kp_u_234;
1675 static PyObject *__pyx_kp_u_235;
1676 static PyObject *__pyx_kp_u_236;
1677 static PyObject *__pyx_kp_u_237;
1678 static PyObject *__pyx_kp_u_238;
1679 static PyObject *__pyx_kp_u_239;
1680 static PyObject *__pyx_kp_u_240;
1681 static PyObject *__pyx_kp_u_241;
1682 static PyObject *__pyx_kp_u_242;
1683 static PyObject *__pyx_kp_u_243;
1684 static PyObject *__pyx_kp_u_244;
1685 static PyObject *__pyx_kp_u_245;
1686 static PyObject *__pyx_kp_u_246;
1687 static PyObject *__pyx_kp_u_247;
1688 static PyObject *__pyx_kp_u_248;
1689 static PyObject *__pyx_kp_u_249;
1690 static PyObject *__pyx_kp_s_25;
1691 static PyObject *__pyx_kp_u_250;
1692 static PyObject *__pyx_kp_u_251;
1693 static PyObject *__pyx_kp_u_252;
1694 static PyObject *__pyx_kp_u_253;
1695 static PyObject *__pyx_kp_u_254;
1696 static PyObject *__pyx_n_s_27;
1697 static PyObject *__pyx_kp_s_28;
1698 static PyObject *__pyx_kp_s_3;
1699 static PyObject *__pyx_n_s_30;
1700 static PyObject *__pyx_kp_s_4;
1701 static PyObject *__pyx_kp_u_41;
1702 static PyObject *__pyx_kp_u_42;
1703 static PyObject *__pyx_kp_u_43;
1704 static PyObject *__pyx_kp_u_44;
1705 static PyObject *__pyx_kp_u_45;
1706 static PyObject *__pyx_kp_u_46;
1707 static PyObject *__pyx_kp_u_47;
1708 static PyObject *__pyx_kp_u_48;
1709 static PyObject *__pyx_kp_u_49;
1710 static PyObject *__pyx_kp_s_5;
1711 static PyObject *__pyx_kp_u_50;
1712 static PyObject *__pyx_kp_u_51;
1713 static PyObject *__pyx_kp_u_52;
1714 static PyObject *__pyx_kp_u_53;
1715 static PyObject *__pyx_kp_u_54;
1716 static PyObject *__pyx_kp_u_55;
1717 static PyObject *__pyx_kp_u_56;
1718 static PyObject *__pyx_kp_u_57;
1719 static PyObject *__pyx_kp_u_58;
1720 static PyObject *__pyx_kp_u_59;
1721 static PyObject *__pyx_kp_s_6;
1722 static PyObject *__pyx_kp_u_60;
1723 static PyObject *__pyx_kp_u_61;
1724 static PyObject *__pyx_kp_u_62;
1725 static PyObject *__pyx_kp_u_63;
1726 static PyObject *__pyx_kp_u_64;
1727 static PyObject *__pyx_kp_u_65;
1728 static PyObject *__pyx_kp_u_66;
1729 static PyObject *__pyx_kp_u_67;
1730 static PyObject *__pyx_kp_u_68;
1731 static PyObject *__pyx_kp_u_69;
1732 static PyObject *__pyx_kp_s_7;
1733 static PyObject *__pyx_kp_u_70;
1734 static PyObject *__pyx_kp_u_71;
1735 static PyObject *__pyx_kp_u_72;
1736 static PyObject *__pyx_kp_u_73;
1737 static PyObject *__pyx_kp_u_74;
1738 static PyObject *__pyx_kp_u_75;
1739 static PyObject *__pyx_kp_u_76;
1740 static PyObject *__pyx_kp_u_77;
1741 static PyObject *__pyx_kp_u_78;
1742 static PyObject *__pyx_kp_u_79;
1743 static PyObject *__pyx_kp_s_8;
1744 static PyObject *__pyx_kp_u_80;
1745 static PyObject *__pyx_kp_u_81;
1746 static PyObject *__pyx_kp_u_82;
1747 static PyObject *__pyx_kp_u_83;
1748 static PyObject *__pyx_kp_u_84;
1749 static PyObject *__pyx_kp_u_85;
1750 static PyObject *__pyx_kp_u_86;
1751 static PyObject *__pyx_kp_u_87;
1752 static PyObject *__pyx_kp_u_88;
1753 static PyObject *__pyx_kp_u_89;
1754 static PyObject *__pyx_kp_s_9;
1755 static PyObject *__pyx_kp_u_90;
1756 static PyObject *__pyx_kp_u_91;
1757 static PyObject *__pyx_kp_u_92;
1758 static PyObject *__pyx_kp_u_93;
1759 static PyObject *__pyx_kp_u_94;
1760 static PyObject *__pyx_kp_u_95;
1761 static PyObject *__pyx_kp_u_96;
1762 static PyObject *__pyx_kp_u_97;
1763 static PyObject *__pyx_kp_u_98;
1764 static PyObject *__pyx_kp_u_99;
1765 static PyObject *__pyx_n_s__IndexError;
1766 static PyObject *__pyx_n_s__Integral;
1767 static PyObject *__pyx_n_s__NotImplemented;
1768 static PyObject *__pyx_n_s__PyClical;
1769 static PyObject *__pyx_n_s__Real;
1770 static PyObject *__pyx_n_s__RuntimeError;
1771 static PyObject *__pyx_n_s__Sequence;
1772 static PyObject *__pyx_n_s__TypeError;
1773 static PyObject *__pyx_n_s__ValueError;
1774 static PyObject *__pyx_n_s____import__;
1775 static PyObject *__pyx_n_s____main__;
1776 static PyObject *__pyx_n_s____name__;
1777 static PyObject *__pyx_n_s____pyx_vtable__;
1778 static PyObject *__pyx_n_s____test__;
1779 static PyObject *__pyx_n_s____version__;
1780 static PyObject *__pyx_n_s___test;
1781 static PyObject *__pyx_n_s__acos;
1782 static PyObject *__pyx_n_s__acosh;
1783 static PyObject *__pyx_n_s__args;
1784 static PyObject *__pyx_n_s__asin;
1785 static PyObject *__pyx_n_s__asinh;
1786 static PyObject *__pyx_n_s__atan;
1787 static PyObject *__pyx_n_s__atanh;
1788 static PyObject *__pyx_n_s__cl;
1789 static PyObject *__pyx_n_s__close;
1790 static PyObject *__pyx_n_s__collections;
1791 static PyObject *__pyx_n_s__conj;
1792 static PyObject *__pyx_n_s__copy;
1793 static PyObject *__pyx_n_s__cos;
1794 static PyObject *__pyx_n_s__cosh;
1795 static PyObject *__pyx_n_s__doctest;
1796 static PyObject *__pyx_n_s__e;
1797 static PyObject *__pyx_n_s__even;
1798 static PyObject *__pyx_n_s__exp;
1799 static PyObject *__pyx_n_s__fill;
1800 static PyObject *__pyx_n_s__frm;
1801 static PyObject *__pyx_n_s__grade;
1802 static PyObject *__pyx_n_s__i;
1803 static PyObject *__pyx_n_s__inv;
1804 static PyObject *__pyx_n_s__involute;
1805 static PyObject *__pyx_n_s__ist;
1806 static PyObject *__pyx_n_s__istpq;
1807 static PyObject *__pyx_n_s__ixt;
1808 static PyObject *__pyx_n_s__lhs;
1809 static PyObject *__pyx_n_s__log;
1810 static PyObject *__pyx_n_s__m;
1811 static PyObject *__pyx_n_s__math;
1812 static PyObject *__pyx_n_s__max;
1813 static PyObject *__pyx_n_s__min;
1814 static PyObject *__pyx_n_s__nbar3;
1815 static PyObject *__pyx_n_s__ninf3;
1816 static PyObject *__pyx_n_s__norm;
1817 static PyObject *__pyx_n_s__numbers;
1818 static PyObject *__pyx_n_s__obj;
1819 static PyObject *__pyx_n_s__odd;
1820 static PyObject *__pyx_n_s__other;
1821 static PyObject *__pyx_n_s__outer_pow;
1822 static PyObject *__pyx_n_s__p;
1823 static PyObject *__pyx_n_s__pi;
1824 static PyObject *__pyx_n_s__pow;
1825 static PyObject *__pyx_n_s__pure;
1826 static PyObject *__pyx_n_s__q;
1827 static PyObject *__pyx_n_s__quad;
1828 static PyObject *__pyx_n_s__range;
1829 static PyObject *__pyx_n_s__reverse;
1830 static PyObject *__pyx_n_s__rhs;
1831 static PyObject *__pyx_n_s__scalar;
1832 static PyObject *__pyx_n_s__send;
1833 static PyObject *__pyx_n_s__sin;
1834 static PyObject *__pyx_n_s__sinh;
1835 static PyObject *__pyx_n_s__sqrt;
1836 static PyObject *__pyx_n_s__tan;
1837 static PyObject *__pyx_n_s__tanh;
1838 static PyObject *__pyx_n_s__tau;
1839 static PyObject *__pyx_n_s__testmod;
1840 static PyObject *__pyx_n_s__throw;
1841 static PyObject *__pyx_n_s__xrange;
1842 static PyObject *__pyx_int_0;
1843 static PyObject *__pyx_int_1;
1844 static PyObject *__pyx_int_4;
1845 static PyObject *__pyx_int_neg_1;
1846 static PyObject *__pyx_k_24;
1847 static PyObject *__pyx_k_tuple_14;
1848 static PyObject *__pyx_k_tuple_15;
1849 static PyObject *__pyx_k_tuple_31;
1850 static PyObject *__pyx_k_tuple_33;
1851 static PyObject *__pyx_k_tuple_35;
1852 static PyObject *__pyx_k_tuple_36;
1853 static PyObject *__pyx_k_tuple_37;
1854 static PyObject *__pyx_k_tuple_38;
1855 static PyObject *__pyx_k_tuple_39;
1856 static PyObject *__pyx_k_codeobj_26;
1857 static PyObject *__pyx_k_codeobj_29;
1858 static PyObject *__pyx_k_codeobj_32;
1859 static PyObject *__pyx_k_codeobj_34;
1860 static PyObject *__pyx_k_codeobj_40;
1870 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
1872 __Pyx_RefNannyDeclarations
1873 PyObject *__pyx_t_1 = NULL;
1874 PyObject *__pyx_t_2 = NULL;
1875 int __pyx_lineno = 0;
1876 const char *__pyx_filename = NULL;
1877 int __pyx_clineno = 0;
1878 __Pyx_RefNannySetupContext(
"toIndexSet", 0);
1887 __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;}
1888 __Pyx_GOTREF(__pyx_t_1);
1889 __Pyx_INCREF(__pyx_v_obj);
1890 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
1891 __Pyx_GIVEREF(__pyx_v_obj);
1892 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
1893 __Pyx_GOTREF(__pyx_t_2);
1894 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
1895 __pyx_r = (((
struct __pyx_obj_8PyClical_index_set *)__pyx_t_2)->instance[0]);
1896 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1901 __Pyx_XDECREF(__pyx_t_1);
1902 __Pyx_XDECREF(__pyx_t_2);
1903 __Pyx_WriteUnraisable(
"PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
1905 __Pyx_RefNannyFinishContext();
1917 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
IndexSet __pyx_v_other) {
1918 PyObject *__pyx_r = NULL;
1919 __Pyx_RefNannyDeclarations
1920 __Pyx_RefNannySetupContext(
"wrap", 0);
1929 (__pyx_v_self->instance[0]) = __pyx_v_other;
1938 __Pyx_XDECREF(__pyx_r);
1939 __Pyx_INCREF(((PyObject *)__pyx_v_self));
1940 __pyx_r = ((PyObject *)__pyx_v_self);
1943 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1945 __Pyx_XGIVEREF(__pyx_r);
1946 __Pyx_RefNannyFinishContext();
1958 static CYTHON_INLINE
IndexSet __pyx_f_8PyClical_9index_set_unwrap(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
1960 __Pyx_RefNannyDeclarations
1961 __Pyx_RefNannySetupContext(
"unwrap", 0);
1970 __pyx_r = (__pyx_v_self->instance[0]);
1974 __Pyx_RefNannyFinishContext();
1986 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
1987 static PyObject *__pyx_f_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self,
int __pyx_skip_dispatch) {
1988 PyObject *__pyx_r = NULL;
1989 __Pyx_RefNannyDeclarations
1990 PyObject *__pyx_t_1 = NULL;
1991 PyObject *__pyx_t_2 = NULL;
1992 int __pyx_lineno = 0;
1993 const char *__pyx_filename = NULL;
1994 int __pyx_clineno = 0;
1995 __Pyx_RefNannySetupContext(
"copy", 0);
1997 if (unlikely(__pyx_skip_dispatch)) ;
1999 else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
2000 __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;}
2001 __Pyx_GOTREF(__pyx_t_1);
2002 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
2003 __Pyx_XDECREF(__pyx_r);
2004 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2005 __Pyx_GOTREF(__pyx_t_2);
2006 __pyx_r = __pyx_t_2;
2008 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2011 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2021 __Pyx_XDECREF(__pyx_r);
2022 __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;}
2023 __Pyx_GOTREF(__pyx_t_1);
2024 __Pyx_INCREF(((PyObject *)__pyx_v_self));
2025 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
2026 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
2027 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2028 __Pyx_GOTREF(__pyx_t_2);
2029 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2030 __pyx_r = __pyx_t_2;
2034 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2037 __Pyx_XDECREF(__pyx_t_1);
2038 __Pyx_XDECREF(__pyx_t_2);
2039 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2042 __Pyx_XGIVEREF(__pyx_r);
2043 __Pyx_RefNannyFinishContext();
2048 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
2049 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 ";
2050 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2051 PyObject *__pyx_r = 0;
2052 __Pyx_RefNannyDeclarations
2053 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
2054 __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2055 __Pyx_RefNannyFinishContext();
2067 static PyObject *__pyx_pf_8PyClical_9index_set_copy(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2068 PyObject *__pyx_r = NULL;
2069 __Pyx_RefNannyDeclarations
2070 PyObject *__pyx_t_1 = NULL;
2071 int __pyx_lineno = 0;
2072 const char *__pyx_filename = NULL;
2073 int __pyx_clineno = 0;
2074 __Pyx_RefNannySetupContext(
"copy", 0);
2075 __Pyx_XDECREF(__pyx_r);
2076 __pyx_t_1 = ((
struct __pyx_vtabstruct_8PyClical_index_set *)__pyx_v_self->__pyx_vtab)->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;}
2077 __Pyx_GOTREF(__pyx_t_1);
2078 __pyx_r = __pyx_t_1;
2082 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2085 __Pyx_XDECREF(__pyx_t_1);
2086 __Pyx_AddTraceback(
"PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2089 __Pyx_XGIVEREF(__pyx_r);
2090 __Pyx_RefNannyFinishContext();
2095 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2096 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2097 PyObject *__pyx_v_other = 0;
2098 int __pyx_lineno = 0;
2099 const char *__pyx_filename = NULL;
2100 int __pyx_clineno = 0;
2102 __Pyx_RefNannyDeclarations
2103 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
2105 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,0};
2106 PyObject* values[1] = {0};
2107 values[0] = ((PyObject *)__pyx_int_0);
2108 if (unlikely(__pyx_kwds)) {
2110 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2112 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2114 default:
goto __pyx_L5_argtuple_error;
2116 kw_args = PyDict_Size(__pyx_kwds);
2120 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other);
2121 if (value) { values[0] = value; kw_args--; }
2124 if (unlikely(kw_args > 0)) {
2125 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;}
2128 switch (PyTuple_GET_SIZE(__pyx_args)) {
2129 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2131 default:
goto __pyx_L5_argtuple_error;
2134 __pyx_v_other = values[0];
2136 goto __pyx_L4_argument_unpacking_done;
2137 __pyx_L5_argtuple_error:;
2138 __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;}
2140 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2141 __Pyx_RefNannyFinishContext();
2143 __pyx_L4_argument_unpacking_done:;
2144 __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2145 __Pyx_RefNannyFinishContext();
2157 static int __pyx_pf_8PyClical_9index_set_2__cinit__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2158 PyObject *__pyx_v_error_msg_prefix = NULL;
2159 PyObject *__pyx_v_idx = NULL;
2161 __Pyx_RefNannyDeclarations
2165 PyObject *__pyx_t_4 = NULL;
2166 PyObject *__pyx_t_5 = NULL;
2169 PyObject *__pyx_t_8 = NULL;
2170 PyObject *__pyx_t_9 = NULL;
2171 PyObject *__pyx_t_10 = NULL;
2172 Py_ssize_t __pyx_t_11;
2173 PyObject *(*__pyx_t_12)(PyObject *);
2174 PyObject *__pyx_t_13 = NULL;
2175 PyObject *__pyx_t_14 = NULL;
2176 PyObject *__pyx_t_15 = NULL;
2177 PyObject *__pyx_t_16 = NULL;
2179 int __pyx_lineno = 0;
2180 const char *__pyx_filename = NULL;
2181 int __pyx_clineno = 0;
2182 __Pyx_RefNannySetupContext(
"__cinit__", 0);
2191 __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
2192 __pyx_v_error_msg_prefix = ((PyObject *)__pyx_kp_s_1);
2201 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_index_set));
2202 __pyx_t_2 = (__pyx_t_1 != 0);
2213 __pyx_t_3 =
new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2215 __Pyx_CppExn2PyErr();
2216 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2218 __pyx_v_self->instance = __pyx_t_3;
2229 __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;}
2230 __Pyx_GOTREF(__pyx_t_4);
2231 __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;}
2232 __Pyx_GOTREF(__pyx_t_5);
2233 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2234 __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;}
2235 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2236 __pyx_t_1 = (__pyx_t_2 != 0);
2246 __pyx_t_6 = __Pyx_PyInt_AsInt(__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;}
2248 __pyx_t_3 =
new IndexSet(((
int)__pyx_t_6));
2250 __Pyx_CppExn2PyErr();
2251 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2253 __pyx_v_self->instance = __pyx_t_3;
2264 __Pyx_INCREF(__pyx_v_other);
2265 __pyx_t_5 = __pyx_v_other;
2266 __pyx_t_1 = PySet_Check(__pyx_t_5);
2268 __pyx_t_2 = PyFrozenSet_Check(__pyx_t_5);
2269 __pyx_t_7 = __pyx_t_2;
2271 __pyx_t_7 = __pyx_t_1;
2273 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2274 __pyx_t_1 = (__pyx_t_7 != 0);
2285 __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2286 __Pyx_XGOTREF(__pyx_t_8);
2287 __Pyx_XGOTREF(__pyx_t_9);
2288 __Pyx_XGOTREF(__pyx_t_10);
2298 __pyx_v_self->instance =
new IndexSet();
2307 if (PyList_CheckExact(__pyx_v_other) || PyTuple_CheckExact(__pyx_v_other)) {
2308 __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2311 __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_L4_error;}
2312 __Pyx_GOTREF(__pyx_t_5);
2313 __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext;
2316 if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_5)) {
2317 if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5))
break;
2318 #if CYTHON_COMPILING_IN_CPYTHON
2319 __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_L4_error;}
2321 __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_L4_error;}
2323 }
else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_5)) {
2324 if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5))
break;
2325 #if CYTHON_COMPILING_IN_CPYTHON
2326 __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_L4_error;}
2328 __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_L4_error;}
2331 __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2332 if (unlikely(!__pyx_t_4)) {
2333 if (PyErr_Occurred()) {
2334 if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
2335 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
2339 __Pyx_GOTREF(__pyx_t_4);
2341 __Pyx_XDECREF(__pyx_v_idx);
2342 __pyx_v_idx = __pyx_t_4;
2352 __pyx_t_4 = __Pyx_PyBool_FromLong(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
2353 __Pyx_GOTREF(__pyx_t_4);
2354 if (PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
2355 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2357 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2359 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2360 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2361 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2362 goto __pyx_L11_try_end;
2364 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2365 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2374 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2376 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2377 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_L6_except_error;}
2378 __Pyx_GOTREF(__pyx_t_5);
2379 __Pyx_GOTREF(__pyx_t_4);
2380 __Pyx_GOTREF(__pyx_t_13);
2389 __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_2));
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2390 __Pyx_GOTREF(__pyx_t_14);
2391 __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_L6_except_error;}
2392 __Pyx_GOTREF(__pyx_t_15);
2393 __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_L6_except_error;}
2394 __Pyx_GOTREF(__pyx_t_16);
2395 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2396 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2397 __pyx_t_15 = PyNumber_Add(__pyx_t_16, ((PyObject *)__pyx_kp_s_3));
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2398 __Pyx_GOTREF(__pyx_t_15);
2399 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2400 __pyx_t_16 = PyTuple_New(1);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2401 __Pyx_GOTREF(__pyx_t_16);
2402 PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
2403 __Pyx_GIVEREF(__pyx_t_15);
2405 __pyx_t_15 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_t_16), NULL);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2406 __Pyx_GOTREF(__pyx_t_15);
2407 __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
2408 __Pyx_Raise(__pyx_t_15, 0, 0, 0);
2409 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2410 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2411 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2412 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2413 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
2414 goto __pyx_L5_exception_handled;
2424 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || PyErr_ExceptionMatches(__pyx_builtin_TypeError);
2426 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2427 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_L6_except_error;}
2428 __Pyx_GOTREF(__pyx_t_13);
2429 __Pyx_GOTREF(__pyx_t_4);
2430 __Pyx_GOTREF(__pyx_t_5);
2439 __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_2));
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2440 __Pyx_GOTREF(__pyx_t_15);
2441 __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_L6_except_error;}
2442 __Pyx_GOTREF(__pyx_t_16);
2443 __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_L6_except_error;}
2444 __Pyx_GOTREF(__pyx_t_14);
2445 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2446 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2447 __pyx_t_16 = PyNumber_Add(__pyx_t_14, ((PyObject *)__pyx_kp_s_3));
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2448 __Pyx_GOTREF(__pyx_t_16);
2449 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2450 __pyx_t_14 = PyTuple_New(1);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2451 __Pyx_GOTREF(__pyx_t_14);
2452 PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_16);
2453 __Pyx_GIVEREF(__pyx_t_16);
2455 __pyx_t_16 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_14), NULL);
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2456 __Pyx_GOTREF(__pyx_t_16);
2457 __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
2458 __Pyx_Raise(__pyx_t_16, 0, 0, 0);
2459 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2460 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
2461 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
2462 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2463 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2464 goto __pyx_L5_exception_handled;
2466 __pyx_L6_except_error:;
2467 __Pyx_XGIVEREF(__pyx_t_8);
2468 __Pyx_XGIVEREF(__pyx_t_9);
2469 __Pyx_XGIVEREF(__pyx_t_10);
2470 __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
2471 goto __pyx_L1_error;
2472 __pyx_L5_exception_handled:;
2473 __Pyx_XGIVEREF(__pyx_t_8);
2474 __Pyx_XGIVEREF(__pyx_t_9);
2475 __Pyx_XGIVEREF(__pyx_t_10);
2476 __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
2489 __pyx_t_1 = PyString_Check(__pyx_v_other);
2490 __pyx_t_7 = (__pyx_t_1 != 0);
2501 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
2502 __Pyx_XGOTREF(__pyx_t_10);
2503 __Pyx_XGOTREF(__pyx_t_9);
2504 __Pyx_XGOTREF(__pyx_t_8);
2514 __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_L18_error;}
2516 __pyx_t_3 =
new IndexSet(((
char *)__pyx_t_17));
2518 __Pyx_CppExn2PyErr();
2519 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__;
goto __pyx_L18_error;}
2521 __pyx_v_self->instance = __pyx_t_3;
2523 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2524 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2525 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2526 goto __pyx_L25_try_end;
2528 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
2529 __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
2530 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
2531 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
2532 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2533 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2542 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
2544 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2545 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_L20_except_error;}
2546 __Pyx_GOTREF(__pyx_t_5);
2547 __Pyx_GOTREF(__pyx_t_4);
2548 __Pyx_GOTREF(__pyx_t_13);
2557 __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_4));
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L20_except_error;}
2558 __Pyx_GOTREF(__pyx_t_16);
2559 __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_L20_except_error;}
2560 __Pyx_GOTREF(__pyx_t_14);
2561 __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_L20_except_error;}
2562 __Pyx_GOTREF(__pyx_t_15);
2563 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2564 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2565 __pyx_t_14 = PyNumber_Add(__pyx_t_15, ((PyObject *)__pyx_kp_s_3));
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L20_except_error;}
2566 __Pyx_GOTREF(__pyx_t_14);
2567 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2568 __pyx_t_15 = PyTuple_New(1);
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L20_except_error;}
2569 __Pyx_GOTREF(__pyx_t_15);
2570 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
2571 __Pyx_GIVEREF(__pyx_t_14);
2573 __pyx_t_14 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_15), NULL);
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L20_except_error;}
2574 __Pyx_GOTREF(__pyx_t_14);
2575 __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
2576 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
2577 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2578 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__;
goto __pyx_L20_except_error;}
2579 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2580 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2581 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
2582 goto __pyx_L19_exception_handled;
2584 __pyx_L20_except_error:;
2585 __Pyx_XGIVEREF(__pyx_t_10);
2586 __Pyx_XGIVEREF(__pyx_t_9);
2587 __Pyx_XGIVEREF(__pyx_t_8);
2588 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
2589 goto __pyx_L1_error;
2590 __pyx_L19_exception_handled:;
2591 __Pyx_XGIVEREF(__pyx_t_10);
2592 __Pyx_XGIVEREF(__pyx_t_9);
2593 __Pyx_XGIVEREF(__pyx_t_8);
2594 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
2608 __pyx_t_13 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_5));
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2609 __Pyx_GOTREF(__pyx_t_13);
2610 __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;}
2611 __Pyx_GOTREF(__pyx_t_4);
2612 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2613 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
2614 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2615 __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2616 __Pyx_GOTREF(__pyx_t_5);
2617 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
2618 __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;}
2619 __Pyx_GOTREF(__pyx_t_4);
2620 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
2621 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2622 __pyx_t_5 = PyNumber_Add(__pyx_t_4, ((PyObject *)__pyx_kp_s_3));
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2623 __Pyx_GOTREF(__pyx_t_5);
2624 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2625 __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;}
2626 __Pyx_GOTREF(__pyx_t_4);
2627 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
2628 __Pyx_GIVEREF(__pyx_t_5);
2630 __pyx_t_5 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2631 __Pyx_GOTREF(__pyx_t_5);
2632 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
2633 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
2634 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2635 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2642 __Pyx_XDECREF(__pyx_t_4);
2643 __Pyx_XDECREF(__pyx_t_5);
2644 __Pyx_XDECREF(__pyx_t_13);
2645 __Pyx_XDECREF(__pyx_t_14);
2646 __Pyx_XDECREF(__pyx_t_15);
2647 __Pyx_XDECREF(__pyx_t_16);
2648 __Pyx_AddTraceback(
"PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2651 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
2652 __Pyx_XDECREF(__pyx_v_idx);
2653 __Pyx_RefNannyFinishContext();
2658 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self);
2659 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
2660 __Pyx_RefNannyDeclarations
2661 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
2662 __pyx_pf_8PyClical_9index_set_4__dealloc__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2663 __Pyx_RefNannyFinishContext();
2674 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2675 __Pyx_RefNannyDeclarations
2676 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
2685 delete __pyx_v_self->instance;
2687 __Pyx_RefNannyFinishContext();
2691 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
2692 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
2693 PyObject *__pyx_r = 0;
2694 __Pyx_RefNannyDeclarations
2695 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
2696 __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
2697 __Pyx_RefNannyFinishContext();
2709 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
2710 PyObject *__pyx_v_eq = NULL;
2711 PyObject *__pyx_v_lt = NULL;
2712 PyObject *__pyx_r = NULL;
2713 __Pyx_RefNannyDeclarations
2717 PyObject *__pyx_t_4 = NULL;
2718 int __pyx_lineno = 0;
2719 const char *__pyx_filename = NULL;
2720 int __pyx_clineno = 0;
2721 __Pyx_RefNannySetupContext(
"__richcmp__", 0);
2730 __pyx_t_1 = (__pyx_v_lhs == Py_None);
2731 if (!(__pyx_t_1 != 0)) {
2732 __pyx_t_2 = (__pyx_v_rhs == Py_None);
2733 __pyx_t_3 = (__pyx_t_2 != 0);
2735 __pyx_t_3 = (__pyx_t_1 != 0);
2746 __pyx_t_3 = (__pyx_v_lhs == __pyx_v_rhs);
2747 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_3)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2748 __Pyx_GOTREF(__pyx_t_4);
2749 __pyx_v_eq = __pyx_t_4;
2759 switch (__pyx_v_op) {
2777 __Pyx_XDECREF(__pyx_r);
2778 __Pyx_INCREF(__pyx_v_eq);
2779 __pyx_r = __pyx_v_eq;
2799 __Pyx_XDECREF(__pyx_r);
2800 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2801 __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_3));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2802 __Pyx_GOTREF(__pyx_t_4);
2803 __pyx_r = __pyx_t_4;
2816 __pyx_t_3 = ((__pyx_v_op == 0) != 0);
2826 __Pyx_XDECREF(__pyx_r);
2827 __pyx_t_4 = __Pyx_PyBool_FromLong(0);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2828 __Pyx_GOTREF(__pyx_t_4);
2829 __pyx_r = __pyx_t_4;
2842 __pyx_t_3 = ((__pyx_v_op == 1) != 0);
2852 __Pyx_XDECREF(__pyx_r);
2853 __Pyx_INCREF(__pyx_v_eq);
2854 __pyx_r = __pyx_v_eq;
2866 __pyx_t_3 = ((__pyx_v_op == 4) != 0);
2876 __Pyx_XDECREF(__pyx_r);
2877 __pyx_t_4 = __Pyx_PyBool_FromLong(0);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2878 __Pyx_GOTREF(__pyx_t_4);
2879 __pyx_r = __pyx_t_4;
2892 __pyx_t_3 = ((__pyx_v_op == 5) != 0);
2902 __Pyx_XDECREF(__pyx_r);
2903 __Pyx_INCREF(__pyx_v_eq);
2904 __pyx_r = __pyx_v_eq;
2917 __Pyx_XDECREF(__pyx_r);
2918 __Pyx_INCREF(__pyx_builtin_NotImplemented);
2919 __pyx_r = __pyx_builtin_NotImplemented;
2936 __pyx_t_3 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
2937 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_3)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2938 __Pyx_GOTREF(__pyx_t_4);
2939 __pyx_v_eq = __pyx_t_4;
2949 switch (__pyx_v_op) {
2967 __Pyx_XDECREF(__pyx_r);
2968 __Pyx_INCREF(__pyx_v_eq);
2969 __pyx_r = __pyx_v_eq;
2989 __Pyx_XDECREF(__pyx_r);
2990 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2991 __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_3));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
2992 __Pyx_GOTREF(__pyx_t_4);
2993 __pyx_r = __pyx_t_4;
3006 __pyx_t_3 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3007 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_3)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3008 __Pyx_GOTREF(__pyx_t_4);
3009 __pyx_v_lt = __pyx_t_4;
3019 __pyx_t_3 = ((__pyx_v_op == 0) != 0);
3029 __Pyx_XDECREF(__pyx_r);
3030 __Pyx_INCREF(__pyx_v_lt);
3031 __pyx_r = __pyx_v_lt;
3043 __pyx_t_3 = ((__pyx_v_op == 1) != 0);
3053 __Pyx_XDECREF(__pyx_r);
3054 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_lt);
if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3056 __Pyx_INCREF(__pyx_v_eq);
3057 __pyx_t_4 = __pyx_v_eq;
3059 __Pyx_INCREF(__pyx_v_lt);
3060 __pyx_t_4 = __pyx_v_lt;
3062 __pyx_r = __pyx_t_4;
3075 __pyx_t_3 = ((__pyx_v_op == 4) != 0);
3085 __Pyx_XDECREF(__pyx_r);
3086 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_lt);
if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3088 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq);
if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3089 __pyx_t_2 = __pyx_t_1;
3091 __pyx_t_2 = __pyx_t_3;
3093 __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_2));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3094 __Pyx_GOTREF(__pyx_t_4);
3095 __pyx_r = __pyx_t_4;
3108 __pyx_t_2 = ((__pyx_v_op == 5) != 0);
3118 __Pyx_XDECREF(__pyx_r);
3119 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt);
if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3120 __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_2));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3121 __Pyx_GOTREF(__pyx_t_4);
3122 __pyx_r = __pyx_t_4;
3136 __Pyx_XDECREF(__pyx_r);
3137 __Pyx_INCREF(__pyx_builtin_NotImplemented);
3138 __pyx_r = __pyx_builtin_NotImplemented;
3147 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3150 __Pyx_XDECREF(__pyx_t_4);
3151 __Pyx_AddTraceback(
"PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3154 __Pyx_XDECREF(__pyx_v_eq);
3155 __Pyx_XDECREF(__pyx_v_lt);
3156 __Pyx_XGIVEREF(__pyx_r);
3157 __Pyx_RefNannyFinishContext();
3162 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val);
3163 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 ";
3164 #if CYTHON_COMPILING_IN_CPYTHON
3165 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3167 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3169 __Pyx_RefNannyDeclarations
3170 __Pyx_RefNannySetupContext(
"__setitem__ (wrapper)", 0);
3171 __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));
3172 __Pyx_RefNannyFinishContext();
3184 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) {
3186 __Pyx_RefNannyDeclarations
3190 int __pyx_lineno = 0;
3191 const char *__pyx_filename = NULL;
3192 int __pyx_clineno = 0;
3193 __Pyx_RefNannySetupContext(
"__setitem__", 0);
3202 __pyx_t_1 = __Pyx_PyInt_AsInt(__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;}
3203 __pyx_t_2 = __Pyx_PyInt_AsInt(__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;}
3205 __pyx_t_3 = __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3207 __Pyx_CppExn2PyErr();
3208 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3224 __Pyx_AddTraceback(
"PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3227 __Pyx_RefNannyFinishContext();
3232 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx);
3233 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 ";
3234 #if CYTHON_COMPILING_IN_CPYTHON
3235 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3237 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3238 PyObject *__pyx_r = 0;
3239 __Pyx_RefNannyDeclarations
3240 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
3241 __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3242 __Pyx_RefNannyFinishContext();
3254 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3255 PyObject *__pyx_r = NULL;
3256 __Pyx_RefNannyDeclarations
3258 PyObject *__pyx_t_2 = NULL;
3259 int __pyx_lineno = 0;
3260 const char *__pyx_filename = NULL;
3261 int __pyx_clineno = 0;
3262 __Pyx_RefNannySetupContext(
"__getitem__", 0);
3271 __Pyx_XDECREF(__pyx_r);
3272 __pyx_t_1 = __Pyx_PyInt_AsInt(__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;}
3273 __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;}
3274 __Pyx_GOTREF(__pyx_t_2);
3275 __pyx_r = __pyx_t_2;
3279 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3282 __Pyx_XDECREF(__pyx_t_2);
3283 __Pyx_AddTraceback(
"PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3286 __Pyx_XGIVEREF(__pyx_r);
3287 __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));
3302 __Pyx_RefNannyFinishContext();
3314 static int __pyx_pf_8PyClical_9index_set_12__contains__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3316 __Pyx_RefNannyDeclarations
3318 int __pyx_lineno = 0;
3319 const char *__pyx_filename = NULL;
3320 int __pyx_clineno = 0;
3321 __Pyx_RefNannySetupContext(
"__contains__", 0);
3330 __pyx_t_1 = __Pyx_PyInt_AsInt(__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;}
3331 __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
3337 __Pyx_AddTraceback(
"PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3340 __Pyx_RefNannyFinishContext();
3343 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value);
3346 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self);
3347 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 ";
3348 #if CYTHON_COMPILING_IN_CPYTHON
3349 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
3351 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
3352 PyObject *__pyx_r = 0;
3353 __Pyx_RefNannyDeclarations
3354 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
3355 __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3356 __Pyx_RefNannyFinishContext();
3368 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3369 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
3370 PyObject *__pyx_r = NULL;
3371 __Pyx_RefNannyDeclarations
3372 int __pyx_lineno = 0;
3373 const char *__pyx_filename = NULL;
3374 int __pyx_clineno = 0;
3375 __Pyx_RefNannySetupContext(
"__iter__", 0);
3376 __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);
3377 if (unlikely(!__pyx_cur_scope)) {
3378 __Pyx_RefNannyFinishContext();
3381 __Pyx_GOTREF(__pyx_cur_scope);
3382 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
3383 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3384 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3386 __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_8PyClical_9index_set_16generator, (PyObject *) __pyx_cur_scope);
if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3387 __Pyx_DECREF(__pyx_cur_scope);
3388 __Pyx_RefNannyFinishContext();
3389 return (PyObject *) gen;
3392 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3395 __Pyx_AddTraceback(
"PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3398 __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
3399 __Pyx_XGIVEREF(__pyx_r);
3400 __Pyx_RefNannyFinishContext();
3404 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value)
3406 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
3407 PyObject *__pyx_r = NULL;
3408 PyObject *__pyx_t_1 = NULL;
3409 PyObject *__pyx_t_2 = NULL;
3410 PyObject *__pyx_t_3 = NULL;
3411 Py_ssize_t __pyx_t_4;
3412 PyObject *(*__pyx_t_5)(PyObject *);
3415 int __pyx_lineno = 0;
3416 const char *__pyx_filename = NULL;
3417 int __pyx_clineno = 0;
3418 __Pyx_RefNannyDeclarations
3419 __Pyx_RefNannySetupContext(
"None", 0);
3420 switch (__pyx_generator->resume_label) {
3421 case 0:
goto __pyx_L3_first_run;
3422 case 1:
goto __pyx_L7_resume_from_yield;
3424 __Pyx_RefNannyFinishContext();
3427 __pyx_L3_first_run:;
3428 if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3437 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__min);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3438 __Pyx_GOTREF(__pyx_t_1);
3439 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
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);
3441 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3442 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__max);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3443 __Pyx_GOTREF(__pyx_t_1);
3444 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3445 __Pyx_GOTREF(__pyx_t_3);
3446 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3447 __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_int_1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3448 __Pyx_GOTREF(__pyx_t_1);
3449 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3450 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3451 __Pyx_GOTREF(__pyx_t_3);
3452 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
3453 __Pyx_GIVEREF(__pyx_t_2);
3454 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
3455 __Pyx_GIVEREF(__pyx_t_1);
3458 __pyx_t_1 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3459 __Pyx_GOTREF(__pyx_t_1);
3460 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
3461 if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
3462 __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
3465 __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3466 __Pyx_GOTREF(__pyx_t_3);
3467 __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
3469 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3471 if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
3472 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3))
break;
3473 #if CYTHON_COMPILING_IN_CPYTHON
3474 __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3476 __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++;
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3478 }
else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
3479 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3))
break;
3480 #if CYTHON_COMPILING_IN_CPYTHON
3481 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3483 __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++;
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3486 __pyx_t_1 = __pyx_t_5(__pyx_t_3);
3487 if (unlikely(!__pyx_t_1)) {
3488 if (PyErr_Occurred()) {
3489 if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
3490 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3494 __Pyx_GOTREF(__pyx_t_1);
3496 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
3497 __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_idx);
3498 __Pyx_GIVEREF(__pyx_t_1);
3499 __pyx_cur_scope->__pyx_v_idx = __pyx_t_1;
3509 __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_idx, ((PyObject *)__pyx_cur_scope->__pyx_v_self), Py_EQ));
if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3510 __pyx_t_7 = (__pyx_t_6 != 0);
3520 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
3521 __pyx_r = __pyx_cur_scope->__pyx_v_idx;
3522 __Pyx_XGIVEREF(__pyx_t_3);
3523 __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
3524 __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
3525 __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
3526 __Pyx_XGIVEREF(__pyx_r);
3527 __Pyx_RefNannyFinishContext();
3529 __pyx_generator->resume_label = 1;
3531 __pyx_L7_resume_from_yield:;
3532 __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
3533 __pyx_cur_scope->__pyx_t_0 = 0;
3534 __Pyx_XGOTREF(__pyx_t_3);
3535 __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
3536 __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
3537 if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3542 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3543 PyErr_SetNone(PyExc_StopIteration);
3546 __Pyx_XDECREF(__pyx_t_1);
3547 __Pyx_XDECREF(__pyx_t_2);
3548 __Pyx_XDECREF(__pyx_t_3);
3549 __Pyx_AddTraceback(
"__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3551 __Pyx_XDECREF(__pyx_r);
3552 __pyx_generator->resume_label = -1;
3553 __Pyx_Generator_clear((PyObject*)__pyx_generator);
3554 __Pyx_RefNannyFinishContext();
3559 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self);
3560 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 ";
3561 #if CYTHON_COMPILING_IN_CPYTHON
3562 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
3564 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
3565 PyObject *__pyx_r = 0;
3566 __Pyx_RefNannyDeclarations
3567 __Pyx_RefNannySetupContext(
"__invert__ (wrapper)", 0);
3568 __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3569 __Pyx_RefNannyFinishContext();
3581 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3582 PyObject *__pyx_r = NULL;
3583 __Pyx_RefNannyDeclarations
3584 PyObject *__pyx_t_1 = NULL;
3585 PyObject *__pyx_t_2 = NULL;
3586 int __pyx_lineno = 0;
3587 const char *__pyx_filename = NULL;
3588 int __pyx_clineno = 0;
3589 __Pyx_RefNannySetupContext(
"__invert__", 0);
3598 __Pyx_XDECREF(__pyx_r);
3599 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3600 __Pyx_GOTREF(__pyx_t_1);
3601 __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;}
3602 __Pyx_GOTREF(__pyx_t_2);
3603 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3604 __pyx_r = __pyx_t_2;
3608 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3611 __Pyx_XDECREF(__pyx_t_1);
3612 __Pyx_XDECREF(__pyx_t_2);
3613 __Pyx_AddTraceback(
"PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3616 __Pyx_XGIVEREF(__pyx_r);
3617 __Pyx_RefNannyFinishContext();
3622 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3623 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 ";
3624 #if CYTHON_COMPILING_IN_CPYTHON
3625 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
3627 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3628 PyObject *__pyx_r = 0;
3629 __Pyx_RefNannyDeclarations
3630 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
3631 __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3632 __Pyx_RefNannyFinishContext();
3644 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3645 PyObject *__pyx_r = NULL;
3646 __Pyx_RefNannyDeclarations
3647 PyObject *__pyx_t_1 = NULL;
3648 PyObject *__pyx_t_2 = NULL;
3649 int __pyx_lineno = 0;
3650 const char *__pyx_filename = NULL;
3651 int __pyx_clineno = 0;
3652 __Pyx_RefNannySetupContext(
"__xor__", 0);
3661 __Pyx_XDECREF(__pyx_r);
3662 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3663 __Pyx_GOTREF(__pyx_t_1);
3664 __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;}
3665 __Pyx_GOTREF(__pyx_t_2);
3666 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3667 __pyx_r = __pyx_t_2;
3671 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3674 __Pyx_XDECREF(__pyx_t_1);
3675 __Pyx_XDECREF(__pyx_t_2);
3676 __Pyx_AddTraceback(
"PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3679 __Pyx_XGIVEREF(__pyx_r);
3680 __Pyx_RefNannyFinishContext();
3685 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
3686 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 ";
3687 #if CYTHON_COMPILING_IN_CPYTHON
3688 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
3690 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
3691 PyObject *__pyx_r = 0;
3692 __Pyx_RefNannyDeclarations
3693 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
3694 __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
3695 __Pyx_RefNannyFinishContext();
3707 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
3708 PyObject *__pyx_r = NULL;
3709 __Pyx_RefNannyDeclarations
3710 PyObject *__pyx_t_1 = NULL;
3711 int __pyx_lineno = 0;
3712 const char *__pyx_filename = NULL;
3713 int __pyx_clineno = 0;
3714 __Pyx_RefNannySetupContext(
"__ixor__", 0);
3723 __Pyx_XDECREF(__pyx_r);
3724 __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;}
3725 __Pyx_GOTREF(__pyx_t_1);
3726 __pyx_r = __pyx_t_1;
3730 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3733 __Pyx_XDECREF(__pyx_t_1);
3734 __Pyx_AddTraceback(
"PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3737 __Pyx_XGIVEREF(__pyx_r);
3738 __Pyx_RefNannyFinishContext();
3743 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3744 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 ";
3745 #if CYTHON_COMPILING_IN_CPYTHON
3746 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
3748 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3749 PyObject *__pyx_r = 0;
3750 __Pyx_RefNannyDeclarations
3751 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
3752 __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3753 __Pyx_RefNannyFinishContext();
3765 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3766 PyObject *__pyx_r = NULL;
3767 __Pyx_RefNannyDeclarations
3768 PyObject *__pyx_t_1 = NULL;
3769 PyObject *__pyx_t_2 = NULL;
3770 int __pyx_lineno = 0;
3771 const char *__pyx_filename = NULL;
3772 int __pyx_clineno = 0;
3773 __Pyx_RefNannySetupContext(
"__and__", 0);
3782 __Pyx_XDECREF(__pyx_r);
3783 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3784 __Pyx_GOTREF(__pyx_t_1);
3785 __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;}
3786 __Pyx_GOTREF(__pyx_t_2);
3787 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3788 __pyx_r = __pyx_t_2;
3792 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3795 __Pyx_XDECREF(__pyx_t_1);
3796 __Pyx_XDECREF(__pyx_t_2);
3797 __Pyx_AddTraceback(
"PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3800 __Pyx_XGIVEREF(__pyx_r);
3801 __Pyx_RefNannyFinishContext();
3806 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
3807 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 ";
3808 #if CYTHON_COMPILING_IN_CPYTHON
3809 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
3811 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
3812 PyObject *__pyx_r = 0;
3813 __Pyx_RefNannyDeclarations
3814 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
3815 __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
3816 __Pyx_RefNannyFinishContext();
3828 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
3829 PyObject *__pyx_r = NULL;
3830 __Pyx_RefNannyDeclarations
3831 PyObject *__pyx_t_1 = NULL;
3832 int __pyx_lineno = 0;
3833 const char *__pyx_filename = NULL;
3834 int __pyx_clineno = 0;
3835 __Pyx_RefNannySetupContext(
"__iand__", 0);
3844 __Pyx_XDECREF(__pyx_r);
3845 __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;}
3846 __Pyx_GOTREF(__pyx_t_1);
3847 __pyx_r = __pyx_t_1;
3851 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3854 __Pyx_XDECREF(__pyx_t_1);
3855 __Pyx_AddTraceback(
"PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3858 __Pyx_XGIVEREF(__pyx_r);
3859 __Pyx_RefNannyFinishContext();
3864 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
3865 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 ";
3866 #if CYTHON_COMPILING_IN_CPYTHON
3867 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
3869 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3870 PyObject *__pyx_r = 0;
3871 __Pyx_RefNannyDeclarations
3872 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
3873 __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3874 __Pyx_RefNannyFinishContext();
3886 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3887 PyObject *__pyx_r = NULL;
3888 __Pyx_RefNannyDeclarations
3889 PyObject *__pyx_t_1 = NULL;
3890 PyObject *__pyx_t_2 = NULL;
3891 int __pyx_lineno = 0;
3892 const char *__pyx_filename = NULL;
3893 int __pyx_clineno = 0;
3894 __Pyx_RefNannySetupContext(
"__or__", 0);
3903 __Pyx_XDECREF(__pyx_r);
3904 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
3905 __Pyx_GOTREF(__pyx_t_1);
3906 __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;}
3907 __Pyx_GOTREF(__pyx_t_2);
3908 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3909 __pyx_r = __pyx_t_2;
3913 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3916 __Pyx_XDECREF(__pyx_t_1);
3917 __Pyx_XDECREF(__pyx_t_2);
3918 __Pyx_AddTraceback(
"PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3921 __Pyx_XGIVEREF(__pyx_r);
3922 __Pyx_RefNannyFinishContext();
3927 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
3928 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 ";
3929 #if CYTHON_COMPILING_IN_CPYTHON
3930 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
3932 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
3933 PyObject *__pyx_r = 0;
3934 __Pyx_RefNannyDeclarations
3935 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
3936 __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
3937 __Pyx_RefNannyFinishContext();
3949 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
3950 PyObject *__pyx_r = NULL;
3951 __Pyx_RefNannyDeclarations
3952 PyObject *__pyx_t_1 = NULL;
3953 int __pyx_lineno = 0;
3954 const char *__pyx_filename = NULL;
3955 int __pyx_clineno = 0;
3956 __Pyx_RefNannySetupContext(
"__ior__", 0);
3965 __Pyx_XDECREF(__pyx_r);
3966 __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;}
3967 __Pyx_GOTREF(__pyx_t_1);
3968 __pyx_r = __pyx_t_1;
3972 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3975 __Pyx_XDECREF(__pyx_t_1);
3976 __Pyx_AddTraceback(
"PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3979 __Pyx_XGIVEREF(__pyx_r);
3980 __Pyx_RefNannyFinishContext();
3985 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
3986 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 ";
3987 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3988 PyObject *__pyx_r = 0;
3989 __Pyx_RefNannyDeclarations
3990 __Pyx_RefNannySetupContext(
"count (wrapper)", 0);
3991 __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3992 __Pyx_RefNannyFinishContext();
4004 static PyObject *__pyx_pf_8PyClical_9index_set_31count(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4005 PyObject *__pyx_r = NULL;
4006 __Pyx_RefNannyDeclarations
4007 PyObject *__pyx_t_1 = NULL;
4008 int __pyx_lineno = 0;
4009 const char *__pyx_filename = NULL;
4010 int __pyx_clineno = 0;
4011 __Pyx_RefNannySetupContext(
"count", 0);
4020 __Pyx_XDECREF(__pyx_r);
4021 __pyx_t_1 = PyInt_FromLong(__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;}
4022 __Pyx_GOTREF(__pyx_t_1);
4023 __pyx_r = __pyx_t_1;
4027 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4030 __Pyx_XDECREF(__pyx_t_1);
4031 __Pyx_AddTraceback(
"PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4034 __Pyx_XGIVEREF(__pyx_r);
4035 __Pyx_RefNannyFinishContext();
4040 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4041 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 ";
4042 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4043 PyObject *__pyx_r = 0;
4044 __Pyx_RefNannyDeclarations
4045 __Pyx_RefNannySetupContext(
"count_neg (wrapper)", 0);
4046 __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4047 __Pyx_RefNannyFinishContext();
4059 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4060 PyObject *__pyx_r = NULL;
4061 __Pyx_RefNannyDeclarations
4062 PyObject *__pyx_t_1 = NULL;
4063 int __pyx_lineno = 0;
4064 const char *__pyx_filename = NULL;
4065 int __pyx_clineno = 0;
4066 __Pyx_RefNannySetupContext(
"count_neg", 0);
4075 __Pyx_XDECREF(__pyx_r);
4076 __pyx_t_1 = PyInt_FromLong(__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;}
4077 __Pyx_GOTREF(__pyx_t_1);
4078 __pyx_r = __pyx_t_1;
4082 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4085 __Pyx_XDECREF(__pyx_t_1);
4086 __Pyx_AddTraceback(
"PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4089 __Pyx_XGIVEREF(__pyx_r);
4090 __Pyx_RefNannyFinishContext();
4095 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4096 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 ";
4097 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4098 PyObject *__pyx_r = 0;
4099 __Pyx_RefNannyDeclarations
4100 __Pyx_RefNannySetupContext(
"count_pos (wrapper)", 0);
4101 __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4102 __Pyx_RefNannyFinishContext();
4114 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4115 PyObject *__pyx_r = NULL;
4116 __Pyx_RefNannyDeclarations
4117 PyObject *__pyx_t_1 = NULL;
4118 int __pyx_lineno = 0;
4119 const char *__pyx_filename = NULL;
4120 int __pyx_clineno = 0;
4121 __Pyx_RefNannySetupContext(
"count_pos", 0);
4130 __Pyx_XDECREF(__pyx_r);
4131 __pyx_t_1 = PyInt_FromLong(__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;}
4132 __Pyx_GOTREF(__pyx_t_1);
4133 __pyx_r = __pyx_t_1;
4137 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4140 __Pyx_XDECREF(__pyx_t_1);
4141 __Pyx_AddTraceback(
"PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4144 __Pyx_XGIVEREF(__pyx_r);
4145 __Pyx_RefNannyFinishContext();
4150 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4151 static char __pyx_doc_8PyClical_9index_set_37min[] =
"\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
4152 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4153 PyObject *__pyx_r = 0;
4154 __Pyx_RefNannyDeclarations
4155 __Pyx_RefNannySetupContext(
"min (wrapper)", 0);
4156 __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4157 __Pyx_RefNannyFinishContext();
4169 static PyObject *__pyx_pf_8PyClical_9index_set_37min(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4170 PyObject *__pyx_r = NULL;
4171 __Pyx_RefNannyDeclarations
4172 PyObject *__pyx_t_1 = NULL;
4173 int __pyx_lineno = 0;
4174 const char *__pyx_filename = NULL;
4175 int __pyx_clineno = 0;
4176 __Pyx_RefNannySetupContext(
"min", 0);
4185 __Pyx_XDECREF(__pyx_r);
4186 __pyx_t_1 = PyInt_FromLong(__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;}
4187 __Pyx_GOTREF(__pyx_t_1);
4188 __pyx_r = __pyx_t_1;
4192 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4195 __Pyx_XDECREF(__pyx_t_1);
4196 __Pyx_AddTraceback(
"PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
4199 __Pyx_XGIVEREF(__pyx_r);
4200 __Pyx_RefNannyFinishContext();
4205 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4206 static char __pyx_doc_8PyClical_9index_set_39max[] =
"\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
4207 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4208 PyObject *__pyx_r = 0;
4209 __Pyx_RefNannyDeclarations
4210 __Pyx_RefNannySetupContext(
"max (wrapper)", 0);
4211 __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4212 __Pyx_RefNannyFinishContext();
4224 static PyObject *__pyx_pf_8PyClical_9index_set_39max(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4225 PyObject *__pyx_r = NULL;
4226 __Pyx_RefNannyDeclarations
4227 PyObject *__pyx_t_1 = NULL;
4228 int __pyx_lineno = 0;
4229 const char *__pyx_filename = NULL;
4230 int __pyx_clineno = 0;
4231 __Pyx_RefNannySetupContext(
"max", 0);
4240 __Pyx_XDECREF(__pyx_r);
4241 __pyx_t_1 = PyInt_FromLong(__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;}
4242 __Pyx_GOTREF(__pyx_t_1);
4243 __pyx_r = __pyx_t_1;
4247 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4250 __Pyx_XDECREF(__pyx_t_1);
4251 __Pyx_AddTraceback(
"PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
4254 __Pyx_XGIVEREF(__pyx_r);
4255 __Pyx_RefNannyFinishContext();
4260 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4261 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] =
"\n Hash function.\n ";
4262 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4263 PyObject *__pyx_r = 0;
4264 __Pyx_RefNannyDeclarations
4265 __Pyx_RefNannySetupContext(
"hash_fn (wrapper)", 0);
4266 __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4267 __Pyx_RefNannyFinishContext();
4279 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4280 PyObject *__pyx_r = NULL;
4281 __Pyx_RefNannyDeclarations
4282 PyObject *__pyx_t_1 = NULL;
4283 int __pyx_lineno = 0;
4284 const char *__pyx_filename = NULL;
4285 int __pyx_clineno = 0;
4286 __Pyx_RefNannySetupContext(
"hash_fn", 0);
4295 __Pyx_XDECREF(__pyx_r);
4296 __pyx_t_1 = PyInt_FromLong(__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;}
4297 __Pyx_GOTREF(__pyx_t_1);
4298 __pyx_r = __pyx_t_1;
4302 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4305 __Pyx_XDECREF(__pyx_t_1);
4306 __Pyx_AddTraceback(
"PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
4309 __Pyx_XGIVEREF(__pyx_r);
4310 __Pyx_RefNannyFinishContext();
4315 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
4316 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 ";
4317 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4318 PyObject *__pyx_r = 0;
4319 __Pyx_RefNannyDeclarations
4320 __Pyx_RefNannySetupContext(
"sign_of_mult (wrapper)", 0);
4321 __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4322 __Pyx_RefNannyFinishContext();
4334 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4335 PyObject *__pyx_r = NULL;
4336 __Pyx_RefNannyDeclarations
4337 PyObject *__pyx_t_1 = NULL;
4338 int __pyx_lineno = 0;
4339 const char *__pyx_filename = NULL;
4340 int __pyx_clineno = 0;
4341 __Pyx_RefNannySetupContext(
"sign_of_mult", 0);
4350 __Pyx_XDECREF(__pyx_r);
4351 __pyx_t_1 = PyInt_FromLong(__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;}
4352 __Pyx_GOTREF(__pyx_t_1);
4353 __pyx_r = __pyx_t_1;
4357 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4360 __Pyx_XDECREF(__pyx_t_1);
4361 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
4364 __Pyx_XGIVEREF(__pyx_r);
4365 __Pyx_RefNannyFinishContext();
4370 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4371 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 ";
4372 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4373 PyObject *__pyx_r = 0;
4374 __Pyx_RefNannyDeclarations
4375 __Pyx_RefNannySetupContext(
"sign_of_square (wrapper)", 0);
4376 __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4377 __Pyx_RefNannyFinishContext();
4389 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4390 PyObject *__pyx_r = NULL;
4391 __Pyx_RefNannyDeclarations
4392 PyObject *__pyx_t_1 = NULL;
4393 int __pyx_lineno = 0;
4394 const char *__pyx_filename = NULL;
4395 int __pyx_clineno = 0;
4396 __Pyx_RefNannySetupContext(
"sign_of_square", 0);
4405 __Pyx_XDECREF(__pyx_r);
4406 __pyx_t_1 = PyInt_FromLong(__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;}
4407 __Pyx_GOTREF(__pyx_t_1);
4408 __pyx_r = __pyx_t_1;
4412 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4415 __Pyx_XDECREF(__pyx_t_1);
4416 __Pyx_AddTraceback(
"PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
4419 __Pyx_XGIVEREF(__pyx_r);
4420 __Pyx_RefNannyFinishContext();
4425 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self);
4426 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 ";
4427 #if CYTHON_COMPILING_IN_CPYTHON
4428 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
4430 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
4431 PyObject *__pyx_r = 0;
4432 __Pyx_RefNannyDeclarations
4433 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
4434 __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4435 __Pyx_RefNannyFinishContext();
4447 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4448 PyObject *__pyx_r = NULL;
4449 __Pyx_RefNannyDeclarations
4450 PyObject *__pyx_t_1 = NULL;
4451 int __pyx_lineno = 0;
4452 const char *__pyx_filename = NULL;
4453 int __pyx_clineno = 0;
4454 __Pyx_RefNannySetupContext(
"__repr__", 0);
4463 __Pyx_XDECREF(__pyx_r);
4464 __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;}
4465 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4466 __pyx_r = ((PyObject *)__pyx_t_1);
4470 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4473 __Pyx_XDECREF(__pyx_t_1);
4474 __Pyx_AddTraceback(
"PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4477 __Pyx_XGIVEREF(__pyx_r);
4478 __Pyx_RefNannyFinishContext();
4483 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self);
4484 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 ";
4485 #if CYTHON_COMPILING_IN_CPYTHON
4486 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
4488 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
4489 PyObject *__pyx_r = 0;
4490 __Pyx_RefNannyDeclarations
4491 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
4492 __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4493 __Pyx_RefNannyFinishContext();
4505 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(
struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4506 PyObject *__pyx_r = NULL;
4507 __Pyx_RefNannyDeclarations
4508 PyObject *__pyx_t_1 = NULL;
4509 int __pyx_lineno = 0;
4510 const char *__pyx_filename = NULL;
4511 int __pyx_clineno = 0;
4512 __Pyx_RefNannySetupContext(
"__str__", 0);
4521 __Pyx_XDECREF(__pyx_r);
4522 __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;}
4523 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4524 __pyx_r = ((PyObject *)__pyx_t_1);
4528 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4531 __Pyx_XDECREF(__pyx_t_1);
4532 __Pyx_AddTraceback(
"PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4535 __Pyx_XGIVEREF(__pyx_r);
4536 __Pyx_RefNannyFinishContext();
4541 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
4542 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 ";
4543 static PyMethodDef __pyx_mdef_8PyClical_1index_set_hidden_doctests = {__Pyx_NAMESTR(
"index_set_hidden_doctests"), (PyCFunction)__pyx_pw_8PyClical_1index_set_hidden_doctests, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_index_set_hidden_doctests)};
4544 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
4545 PyObject *__pyx_r = 0;
4546 __Pyx_RefNannyDeclarations
4547 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests (wrapper)", 0);
4548 __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
4549 __Pyx_RefNannyFinishContext();
4561 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
4562 PyObject *__pyx_r = NULL;
4563 __Pyx_RefNannyDeclarations
4564 __Pyx_RefNannySetupContext(
"index_set_hidden_doctests", 0);
4573 __Pyx_XDECREF(__pyx_r);
4574 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4577 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4579 __Pyx_XGIVEREF(__pyx_r);
4580 __Pyx_RefNannyFinishContext();
4592 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4593 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED
int __pyx_skip_dispatch) {
4594 PyObject *__pyx_r = NULL;
4595 __Pyx_RefNannyDeclarations
4596 PyObject *__pyx_t_1 = NULL;
4597 int __pyx_lineno = 0;
4598 const char *__pyx_filename = NULL;
4599 int __pyx_clineno = 0;
4600 __Pyx_RefNannySetupContext(
"compare", 0);
4609 __Pyx_XDECREF(__pyx_r);
4610 __pyx_t_1 = PyInt_FromLong(
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;}
4611 __Pyx_GOTREF(__pyx_t_1);
4612 __pyx_r = __pyx_t_1;
4616 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4619 __Pyx_XDECREF(__pyx_t_1);
4620 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4623 __Pyx_XGIVEREF(__pyx_r);
4624 __Pyx_RefNannyFinishContext();
4629 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4630 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 ";
4631 static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4632 PyObject *__pyx_v_lhs = 0;
4633 PyObject *__pyx_v_rhs = 0;
4634 int __pyx_lineno = 0;
4635 const char *__pyx_filename = NULL;
4636 int __pyx_clineno = 0;
4637 PyObject *__pyx_r = 0;
4638 __Pyx_RefNannyDeclarations
4639 __Pyx_RefNannySetupContext(
"compare (wrapper)", 0);
4641 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lhs,&__pyx_n_s__rhs,0};
4642 PyObject* values[2] = {0,0};
4643 if (unlikely(__pyx_kwds)) {
4645 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4647 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4648 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4650 default:
goto __pyx_L5_argtuple_error;
4652 kw_args = PyDict_Size(__pyx_kwds);
4655 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs)) != 0)) kw_args--;
4656 else goto __pyx_L5_argtuple_error;
4658 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rhs)) != 0)) kw_args--;
4660 __Pyx_RaiseArgtupleInvalid(
"compare", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
4663 if (unlikely(kw_args > 0)) {
4664 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;}
4666 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
4667 goto __pyx_L5_argtuple_error;
4669 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4670 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4672 __pyx_v_lhs = values[0];
4673 __pyx_v_rhs = values[1];
4675 goto __pyx_L4_argument_unpacking_done;
4676 __pyx_L5_argtuple_error:;
4677 __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;}
4679 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4680 __Pyx_RefNannyFinishContext();
4682 __pyx_L4_argument_unpacking_done:;
4683 __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
4684 __Pyx_RefNannyFinishContext();
4696 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4697 PyObject *__pyx_r = NULL;
4698 __Pyx_RefNannyDeclarations
4699 PyObject *__pyx_t_1 = NULL;
4700 int __pyx_lineno = 0;
4701 const char *__pyx_filename = NULL;
4702 int __pyx_clineno = 0;
4703 __Pyx_RefNannySetupContext(
"compare", 0);
4704 __Pyx_XDECREF(__pyx_r);
4705 __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;}
4706 __Pyx_GOTREF(__pyx_t_1);
4707 __pyx_r = __pyx_t_1;
4711 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4714 __Pyx_XDECREF(__pyx_t_1);
4715 __Pyx_AddTraceback(
"PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4718 __Pyx_XGIVEREF(__pyx_r);
4719 __Pyx_RefNannyFinishContext();
4731 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj);
4732 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
4733 PyObject *__pyx_r = NULL;
4734 __Pyx_RefNannyDeclarations
4735 PyObject *__pyx_t_1 = NULL;
4736 int __pyx_lineno = 0;
4737 const char *__pyx_filename = NULL;
4738 int __pyx_clineno = 0;
4739 __Pyx_RefNannySetupContext(
"min_neg", 0);
4748 __Pyx_XDECREF(__pyx_r);
4749 __pyx_t_1 = PyInt_FromLong(
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;}
4750 __Pyx_GOTREF(__pyx_t_1);
4751 __pyx_r = __pyx_t_1;
4755 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4758 __Pyx_XDECREF(__pyx_t_1);
4759 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4762 __Pyx_XGIVEREF(__pyx_r);
4763 __Pyx_RefNannyFinishContext();
4768 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj);
4769 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 ";
4770 static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
4771 PyObject *__pyx_r = 0;
4772 __Pyx_RefNannyDeclarations
4773 __Pyx_RefNannySetupContext(
"min_neg (wrapper)", 0);
4774 __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
4775 __Pyx_RefNannyFinishContext();
4787 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
4788 PyObject *__pyx_r = NULL;
4789 __Pyx_RefNannyDeclarations
4790 PyObject *__pyx_t_1 = NULL;
4791 int __pyx_lineno = 0;
4792 const char *__pyx_filename = NULL;
4793 int __pyx_clineno = 0;
4794 __Pyx_RefNannySetupContext(
"min_neg", 0);
4795 __Pyx_XDECREF(__pyx_r);
4796 __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;}
4797 __Pyx_GOTREF(__pyx_t_1);
4798 __pyx_r = __pyx_t_1;
4802 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4805 __Pyx_XDECREF(__pyx_t_1);
4806 __Pyx_AddTraceback(
"PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4809 __Pyx_XGIVEREF(__pyx_r);
4810 __Pyx_RefNannyFinishContext();
4822 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj);
4823 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
4824 PyObject *__pyx_r = NULL;
4825 __Pyx_RefNannyDeclarations
4826 PyObject *__pyx_t_1 = NULL;
4827 int __pyx_lineno = 0;
4828 const char *__pyx_filename = NULL;
4829 int __pyx_clineno = 0;
4830 __Pyx_RefNannySetupContext(
"max_pos", 0);
4839 __Pyx_XDECREF(__pyx_r);
4840 __pyx_t_1 = PyInt_FromLong(
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;}
4841 __Pyx_GOTREF(__pyx_t_1);
4842 __pyx_r = __pyx_t_1;
4846 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4849 __Pyx_XDECREF(__pyx_t_1);
4850 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4853 __Pyx_XGIVEREF(__pyx_r);
4854 __Pyx_RefNannyFinishContext();
4859 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj);
4860 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 ";
4861 static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
4862 PyObject *__pyx_r = 0;
4863 __Pyx_RefNannyDeclarations
4864 __Pyx_RefNannySetupContext(
"max_pos (wrapper)", 0);
4865 __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
4866 __Pyx_RefNannyFinishContext();
4878 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
4879 PyObject *__pyx_r = NULL;
4880 __Pyx_RefNannyDeclarations
4881 PyObject *__pyx_t_1 = NULL;
4882 int __pyx_lineno = 0;
4883 const char *__pyx_filename = NULL;
4884 int __pyx_clineno = 0;
4885 __Pyx_RefNannySetupContext(
"max_pos", 0);
4886 __Pyx_XDECREF(__pyx_r);
4887 __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;}
4888 __Pyx_GOTREF(__pyx_t_1);
4889 __pyx_r = __pyx_t_1;
4893 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4896 __Pyx_XDECREF(__pyx_t_1);
4897 __Pyx_AddTraceback(
"PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4900 __Pyx_XGIVEREF(__pyx_r);
4901 __Pyx_RefNannyFinishContext();
4913 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
4914 std::vector<scalar_t> __pyx_v_v;
4915 PyObject *__pyx_v_s = NULL;
4916 std::vector<scalar_t> __pyx_r;
4917 __Pyx_RefNannyDeclarations
4918 PyObject *__pyx_t_1 = NULL;
4919 Py_ssize_t __pyx_t_2;
4920 PyObject *(*__pyx_t_3)(PyObject *);
4921 PyObject *__pyx_t_4 = NULL;
4923 int __pyx_lineno = 0;
4924 const char *__pyx_filename = NULL;
4925 int __pyx_clineno = 0;
4926 __Pyx_RefNannySetupContext(
"list_to_vector", 0);
4935 if (PyList_CheckExact(__pyx_v_lst) || PyTuple_CheckExact(__pyx_v_lst)) {
4936 __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
4939 __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;}
4940 __Pyx_GOTREF(__pyx_t_1);
4941 __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
4944 if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
4945 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1))
break;
4946 #if CYTHON_COMPILING_IN_CPYTHON
4947 __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;}
4949 __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;}
4951 }
else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
4952 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1))
break;
4953 #if CYTHON_COMPILING_IN_CPYTHON
4954 __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;}
4956 __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;}
4959 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
4960 if (unlikely(!__pyx_t_4)) {
4961 if (PyErr_Occurred()) {
4962 if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
4963 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
4967 __Pyx_GOTREF(__pyx_t_4);
4969 __Pyx_XDECREF(__pyx_v_s);
4970 __pyx_v_s = __pyx_t_4;
4980 __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;}
4981 __pyx_v_v.push_back(((
scalar_t)__pyx_t_5));
4983 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4992 __pyx_r = __pyx_v_v;
4997 __Pyx_XDECREF(__pyx_t_1);
4998 __Pyx_XDECREF(__pyx_t_4);
4999 __Pyx_WriteUnraisable(
"PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename);
5001 __Pyx_XDECREF(__pyx_v_s);
5002 __Pyx_RefNannyFinishContext();
5014 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
5016 __Pyx_RefNannyDeclarations
5017 PyObject *__pyx_t_1 = NULL;
5018 PyObject *__pyx_t_2 = NULL;
5019 int __pyx_lineno = 0;
5020 const char *__pyx_filename = NULL;
5021 int __pyx_clineno = 0;
5022 __Pyx_RefNannySetupContext(
"toClifford", 0);
5031 __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;}
5032 __Pyx_GOTREF(__pyx_t_1);
5033 __Pyx_INCREF(__pyx_v_obj);
5034 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
5035 __Pyx_GIVEREF(__pyx_v_obj);
5036 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5037 __Pyx_GOTREF(__pyx_t_2);
5038 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5039 __pyx_r = (((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance[0]);
5040 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5045 __Pyx_XDECREF(__pyx_t_1);
5046 __Pyx_XDECREF(__pyx_t_2);
5047 __Pyx_WriteUnraisable(
"PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
5049 __Pyx_RefNannyFinishContext();
5061 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
Clifford __pyx_v_other) {
5062 PyObject *__pyx_r = NULL;
5063 __Pyx_RefNannyDeclarations
5064 __Pyx_RefNannySetupContext(
"wrap", 0);
5073 (__pyx_v_self->instance[0]) = __pyx_v_other;
5082 __Pyx_XDECREF(__pyx_r);
5083 __Pyx_INCREF(((PyObject *)__pyx_v_self));
5084 __pyx_r = ((PyObject *)__pyx_v_self);
5087 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5089 __Pyx_XGIVEREF(__pyx_r);
5090 __Pyx_RefNannyFinishContext();
5102 static CYTHON_INLINE
Clifford __pyx_f_8PyClical_8clifford_unwrap(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5104 __Pyx_RefNannyDeclarations
5105 __Pyx_RefNannySetupContext(
"unwrap", 0);
5114 __pyx_r = (__pyx_v_self->instance[0]);
5118 __Pyx_RefNannyFinishContext();
5130 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
5131 static PyObject *__pyx_f_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self,
int __pyx_skip_dispatch) {
5132 PyObject *__pyx_r = NULL;
5133 __Pyx_RefNannyDeclarations
5134 PyObject *__pyx_t_1 = NULL;
5135 PyObject *__pyx_t_2 = NULL;
5136 int __pyx_lineno = 0;
5137 const char *__pyx_filename = NULL;
5138 int __pyx_clineno = 0;
5139 __Pyx_RefNannySetupContext(
"copy", 0);
5141 if (unlikely(__pyx_skip_dispatch)) ;
5143 else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
5144 __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;}
5145 __Pyx_GOTREF(__pyx_t_1);
5146 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
5147 __Pyx_XDECREF(__pyx_r);
5148 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5149 __Pyx_GOTREF(__pyx_t_2);
5150 __pyx_r = __pyx_t_2;
5152 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5155 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5165 __Pyx_XDECREF(__pyx_r);
5166 __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;}
5167 __Pyx_GOTREF(__pyx_t_1);
5168 __Pyx_INCREF(((PyObject *)__pyx_v_self));
5169 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
5170 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
5171 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5172 __Pyx_GOTREF(__pyx_t_2);
5173 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5174 __pyx_r = __pyx_t_2;
5178 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5181 __Pyx_XDECREF(__pyx_t_1);
5182 __Pyx_XDECREF(__pyx_t_2);
5183 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5186 __Pyx_XGIVEREF(__pyx_r);
5187 __Pyx_RefNannyFinishContext();
5192 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
5193 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 ";
5194 static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5195 PyObject *__pyx_r = 0;
5196 __Pyx_RefNannyDeclarations
5197 __Pyx_RefNannySetupContext(
"copy (wrapper)", 0);
5198 __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
5199 __Pyx_RefNannyFinishContext();
5211 static PyObject *__pyx_pf_8PyClical_8clifford_copy(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5212 PyObject *__pyx_r = NULL;
5213 __Pyx_RefNannyDeclarations
5214 PyObject *__pyx_t_1 = NULL;
5215 int __pyx_lineno = 0;
5216 const char *__pyx_filename = NULL;
5217 int __pyx_clineno = 0;
5218 __Pyx_RefNannySetupContext(
"copy", 0);
5219 __Pyx_XDECREF(__pyx_r);
5220 __pyx_t_1 = ((
struct __pyx_vtabstruct_8PyClical_clifford *)__pyx_v_self->__pyx_vtab)->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;}
5221 __Pyx_GOTREF(__pyx_t_1);
5222 __pyx_r = __pyx_t_1;
5226 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5229 __Pyx_XDECREF(__pyx_t_1);
5230 __Pyx_AddTraceback(
"PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5233 __Pyx_XGIVEREF(__pyx_r);
5234 __Pyx_RefNannyFinishContext();
5239 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5240 static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5241 PyObject *__pyx_v_other = 0;
5242 PyObject *__pyx_v_ixt = 0;
5243 int __pyx_lineno = 0;
5244 const char *__pyx_filename = NULL;
5245 int __pyx_clineno = 0;
5247 __Pyx_RefNannyDeclarations
5248 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
5250 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__other,&__pyx_n_s__ixt,0};
5251 PyObject* values[2] = {0,0};
5252 values[0] = ((PyObject *)__pyx_int_0);
5261 values[1] = ((PyObject *)Py_None);
5262 if (unlikely(__pyx_kwds)) {
5264 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5266 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5267 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5269 default:
goto __pyx_L5_argtuple_error;
5271 kw_args = PyDict_Size(__pyx_kwds);
5275 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other);
5276 if (value) { values[0] = value; kw_args--; }
5280 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ixt);
5281 if (value) { values[1] = value; kw_args--; }
5284 if (unlikely(kw_args > 0)) {
5285 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;}
5288 switch (PyTuple_GET_SIZE(__pyx_args)) {
5289 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5290 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5292 default:
goto __pyx_L5_argtuple_error;
5295 __pyx_v_other = values[0];
5296 __pyx_v_ixt = values[1];
5298 goto __pyx_L4_argument_unpacking_done;
5299 __pyx_L5_argtuple_error:;
5300 __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;}
5302 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5303 __Pyx_RefNannyFinishContext();
5305 __pyx_L4_argument_unpacking_done:;
5306 __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
5307 __Pyx_RefNannyFinishContext();
5311 static int __pyx_pf_8PyClical_8clifford_2__cinit__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
5312 PyObject *__pyx_v_error_msg_prefix = NULL;
5313 PyObject *__pyx_v_err = NULL;
5315 __Pyx_RefNannyDeclarations
5318 PyObject *__pyx_t_3 = NULL;
5319 PyObject *__pyx_t_4 = NULL;
5320 PyObject *__pyx_t_5 = NULL;
5322 PyObject *__pyx_t_7 = NULL;
5323 PyObject *__pyx_t_8 = NULL;
5325 PyObject *__pyx_t_10 = NULL;
5326 PyObject *__pyx_t_11 = NULL;
5327 PyObject *__pyx_t_12 = NULL;
5330 PyObject *__pyx_t_15 = NULL;
5331 PyObject *__pyx_t_16 = NULL;
5332 PyObject *__pyx_t_17 = NULL;
5333 PyObject *__pyx_t_18 = NULL;
5334 int __pyx_lineno = 0;
5335 const char *__pyx_filename = NULL;
5336 int __pyx_clineno = 0;
5337 __Pyx_RefNannySetupContext(
"__cinit__", 0);
5346 __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
5347 __pyx_v_error_msg_prefix = ((PyObject *)__pyx_kp_s_6);
5356 __pyx_t_1 = (__pyx_v_ixt == Py_None);
5357 __pyx_t_2 = (__pyx_t_1 != 0);
5368 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
5369 __Pyx_XGOTREF(__pyx_t_3);
5370 __Pyx_XGOTREF(__pyx_t_4);
5371 __Pyx_XGOTREF(__pyx_t_5);
5381 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_clifford));
5382 __pyx_t_1 = (__pyx_t_2 != 0);
5393 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
5395 __Pyx_CppExn2PyErr();
5396 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5398 __pyx_v_self->instance = __pyx_t_6;
5409 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_index_set));
5410 __pyx_t_2 = (__pyx_t_1 != 0);
5421 __pyx_t_6 =
new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((
scalar_t)1.0));
5423 __Pyx_CppExn2PyErr();
5424 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5426 __pyx_v_self->instance = __pyx_t_6;
5437 __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;}
5438 __Pyx_GOTREF(__pyx_t_7);
5439 __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;}
5440 __Pyx_GOTREF(__pyx_t_8);
5441 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5442 __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;}
5443 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5444 __pyx_t_1 = (__pyx_t_2 != 0);
5454 __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;}
5458 __Pyx_CppExn2PyErr();
5459 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5461 __pyx_v_self->instance = __pyx_t_6;
5472 __pyx_t_1 = PyString_Check(__pyx_v_other);
5473 __pyx_t_2 = (__pyx_t_1 != 0);
5484 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
5485 __Pyx_XGOTREF(__pyx_t_10);
5486 __Pyx_XGOTREF(__pyx_t_11);
5487 __Pyx_XGOTREF(__pyx_t_12);
5497 __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;}
5499 __pyx_t_6 =
new Clifford(((
char *)__pyx_t_13));
5501 __Pyx_CppExn2PyErr();
5502 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__;
goto __pyx_L13_error;}
5504 __pyx_v_self->instance = __pyx_t_6;
5506 __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
5507 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
5508 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
5509 goto __pyx_L20_try_end;
5511 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5512 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5521 __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
5523 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5524 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;}
5525 __Pyx_GOTREF(__pyx_t_8);
5526 __Pyx_GOTREF(__pyx_t_7);
5527 __Pyx_GOTREF(__pyx_t_15);
5536 __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_4));
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
5537 __Pyx_GOTREF(__pyx_t_16);
5538 __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;}
5539 __Pyx_GOTREF(__pyx_t_17);
5540 __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;}
5541 __Pyx_GOTREF(__pyx_t_18);
5542 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5543 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5544 __pyx_t_17 = PyNumber_Add(__pyx_t_18, ((PyObject *)__pyx_kp_s_3));
if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
5545 __Pyx_GOTREF(__pyx_t_17);
5546 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5547 __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;}
5548 __Pyx_GOTREF(__pyx_t_18);
5549 PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17);
5550 __Pyx_GIVEREF(__pyx_t_17);
5552 __pyx_t_17 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__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;}
5553 __Pyx_GOTREF(__pyx_t_17);
5554 __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
5555 __Pyx_Raise(__pyx_t_17, 0, 0, 0);
5556 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5557 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__;
goto __pyx_L15_except_error;}
5558 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5559 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5560 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5561 goto __pyx_L14_exception_handled;
5563 __pyx_L15_except_error:;
5564 __Pyx_XGIVEREF(__pyx_t_10);
5565 __Pyx_XGIVEREF(__pyx_t_11);
5566 __Pyx_XGIVEREF(__pyx_t_12);
5567 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
5568 goto __pyx_L4_error;
5569 __pyx_L14_exception_handled:;
5570 __Pyx_XGIVEREF(__pyx_t_10);
5571 __Pyx_XGIVEREF(__pyx_t_11);
5572 __Pyx_XGIVEREF(__pyx_t_12);
5573 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
5587 __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_5));
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5588 __Pyx_GOTREF(__pyx_t_15);
5589 __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;}
5590 __Pyx_GOTREF(__pyx_t_7);
5591 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5592 PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
5593 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5594 __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5595 __Pyx_GOTREF(__pyx_t_8);
5596 __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
5597 __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;}
5598 __Pyx_GOTREF(__pyx_t_7);
5599 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5600 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5601 __pyx_t_8 = PyNumber_Add(__pyx_t_7, ((PyObject *)__pyx_kp_s_3));
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5602 __Pyx_GOTREF(__pyx_t_8);
5603 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5604 __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;}
5605 __Pyx_GOTREF(__pyx_t_7);
5606 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
5607 __Pyx_GIVEREF(__pyx_t_8);
5609 __pyx_t_8 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_7), NULL);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5610 __Pyx_GOTREF(__pyx_t_8);
5611 __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
5612 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5613 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5614 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
5618 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5619 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5620 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
5621 goto __pyx_L11_try_end;
5623 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
5624 __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
5625 __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
5626 __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
5627 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5628 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5637 __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
5639 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5640 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;}
5641 __Pyx_GOTREF(__pyx_t_8);
5642 __Pyx_GOTREF(__pyx_t_7);
5643 __Pyx_GOTREF(__pyx_t_15);
5644 __Pyx_INCREF(__pyx_t_7);
5645 __pyx_v_err = __pyx_t_7;
5654 __pyx_t_17 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_5));
if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
5655 __Pyx_GOTREF(__pyx_t_17);
5656 __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;}
5657 __Pyx_GOTREF(__pyx_t_18);
5658 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5659 PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
5660 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5661 __pyx_t_16 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__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;}
5662 __Pyx_GOTREF(__pyx_t_16);
5663 __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
5664 __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;}
5665 __Pyx_GOTREF(__pyx_t_18);
5666 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5667 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5668 __pyx_t_16 = PyNumber_Add(__pyx_t_18, ((PyObject *)__pyx_kp_s_7));
if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
5669 __Pyx_GOTREF(__pyx_t_16);
5670 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5679 __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;}
5680 __Pyx_GOTREF(__pyx_t_18);
5681 __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;}
5682 __Pyx_GOTREF(__pyx_t_17);
5683 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5684 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5685 __pyx_t_18 = PyNumber_Add(__pyx_t_17, ((PyObject *)__pyx_kp_s_8));
if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
5686 __Pyx_GOTREF(__pyx_t_18);
5687 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5688 __pyx_t_17 = PyNumber_Add(__pyx_t_18, ((PyObject *)__pyx_kp_s_9));
if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
5689 __Pyx_GOTREF(__pyx_t_17);
5690 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5699 __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;}
5700 __Pyx_GOTREF(__pyx_t_18);
5701 __Pyx_INCREF(__pyx_v_err);
5702 PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_err);
5703 __Pyx_GIVEREF(__pyx_v_err);
5704 __pyx_t_16 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__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;}
5705 __Pyx_GOTREF(__pyx_t_16);
5706 __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
5707 __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;}
5708 __Pyx_GOTREF(__pyx_t_18);
5709 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5710 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5711 __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;}
5712 __Pyx_GOTREF(__pyx_t_16);
5713 PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18);
5714 __Pyx_GIVEREF(__pyx_t_18);
5716 __pyx_t_18 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__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;}
5717 __Pyx_GOTREF(__pyx_t_18);
5718 __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
5719 __Pyx_Raise(__pyx_t_18, 0, 0, 0);
5720 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5721 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
5722 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5723 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5724 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5725 goto __pyx_L5_exception_handled;
5727 __pyx_L6_except_error:;
5728 __Pyx_XGIVEREF(__pyx_t_3);
5729 __Pyx_XGIVEREF(__pyx_t_4);
5730 __Pyx_XGIVEREF(__pyx_t_5);
5731 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
5732 goto __pyx_L1_error;
5733 __pyx_L5_exception_handled:;
5734 __Pyx_XGIVEREF(__pyx_t_3);
5735 __Pyx_XGIVEREF(__pyx_t_4);
5736 __Pyx_XGIVEREF(__pyx_t_5);
5737 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
5750 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, ((PyObject*)__pyx_ptype_8PyClical_index_set));
5751 __pyx_t_1 = (__pyx_t_2 != 0);
5761 __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;}
5762 __Pyx_GOTREF(__pyx_t_15);
5763 __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;}
5764 __Pyx_GOTREF(__pyx_t_7);
5765 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5766 __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;}
5767 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5768 __pyx_t_2 = (__pyx_t_1 != 0);
5778 __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;}
5780 __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));
5782 __Pyx_CppExn2PyErr();
5783 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5785 __pyx_v_self->instance = __pyx_t_6;
5796 __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;}
5797 __Pyx_GOTREF(__pyx_t_7);
5798 __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;}
5799 __Pyx_GOTREF(__pyx_t_15);
5800 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5801 __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;}
5802 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5803 __pyx_t_1 = (__pyx_t_2 != 0);
5814 __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)));
5816 __Pyx_CppExn2PyErr();
5817 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5819 __pyx_v_self->instance = __pyx_t_6;
5831 __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_10));
if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5832 __Pyx_GOTREF(__pyx_t_15);
5833 __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;}
5834 __Pyx_GOTREF(__pyx_t_7);
5835 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5836 PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
5837 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5838 __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5839 __Pyx_GOTREF(__pyx_t_8);
5840 __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
5841 __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;}
5842 __Pyx_GOTREF(__pyx_t_7);
5843 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5844 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5845 __pyx_t_8 = PyNumber_Add(__pyx_t_7, ((PyObject *)__pyx_kp_s_11));
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5846 __Pyx_GOTREF(__pyx_t_8);
5847 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5856 __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;}
5857 __Pyx_GOTREF(__pyx_t_7);
5858 __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;}
5859 __Pyx_GOTREF(__pyx_t_15);
5860 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5861 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5862 __pyx_t_7 = PyNumber_Add(__pyx_t_15, ((PyObject *)__pyx_kp_s_12));
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5863 __Pyx_GOTREF(__pyx_t_7);
5864 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5865 __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;}
5866 __Pyx_GOTREF(__pyx_t_15);
5867 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
5868 __Pyx_GIVEREF(__pyx_t_7);
5870 __pyx_t_7 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_15), NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5871 __Pyx_GOTREF(__pyx_t_7);
5872 __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
5873 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
5874 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5875 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5889 __pyx_t_7 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_10));
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5890 __Pyx_GOTREF(__pyx_t_7);
5891 __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;}
5892 __Pyx_GOTREF(__pyx_t_15);
5893 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5894 PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
5895 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5896 __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_15), NULL);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5897 __Pyx_GOTREF(__pyx_t_8);
5898 __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
5899 __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;}
5900 __Pyx_GOTREF(__pyx_t_15);
5901 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5902 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5903 __pyx_t_8 = PyNumber_Add(__pyx_t_15, ((PyObject *)__pyx_kp_s_11));
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5904 __Pyx_GOTREF(__pyx_t_8);
5905 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5914 __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;}
5915 __Pyx_GOTREF(__pyx_t_15);
5916 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
5917 PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
5918 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
5919 __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_15), NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5920 __Pyx_GOTREF(__pyx_t_7);
5921 __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
5922 __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;}
5923 __Pyx_GOTREF(__pyx_t_15);
5924 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5925 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5926 __pyx_t_7 = PyNumber_Add(__pyx_t_15, ((PyObject *)__pyx_kp_s_12));
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5927 __Pyx_GOTREF(__pyx_t_7);
5928 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5929 __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;}
5930 __Pyx_GOTREF(__pyx_t_15);
5931 PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
5932 __Pyx_GIVEREF(__pyx_t_7);
5934 __pyx_t_7 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_15), NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5935 __Pyx_GOTREF(__pyx_t_7);
5936 __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
5937 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
5938 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5939 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
5946 __Pyx_XDECREF(__pyx_t_7);
5947 __Pyx_XDECREF(__pyx_t_8);
5948 __Pyx_XDECREF(__pyx_t_15);
5949 __Pyx_XDECREF(__pyx_t_16);
5950 __Pyx_XDECREF(__pyx_t_17);
5951 __Pyx_XDECREF(__pyx_t_18);
5952 __Pyx_AddTraceback(
"PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5955 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
5956 __Pyx_XDECREF(__pyx_v_err);
5957 __Pyx_RefNannyFinishContext();
5962 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self);
5963 static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
5964 __Pyx_RefNannyDeclarations
5965 __Pyx_RefNannySetupContext(
"__dealloc__ (wrapper)", 0);
5966 __pyx_pf_8PyClical_8clifford_4__dealloc__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
5967 __Pyx_RefNannyFinishContext();
5978 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5979 __Pyx_RefNannyDeclarations
5980 __Pyx_RefNannySetupContext(
"__dealloc__", 0);
5989 delete __pyx_v_self->instance;
5991 __Pyx_RefNannyFinishContext();
5995 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x);
5996 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 ";
5997 #if CYTHON_COMPILING_IN_CPYTHON
5998 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
6000 static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
6002 __Pyx_RefNannyDeclarations
6003 __Pyx_RefNannySetupContext(
"__contains__ (wrapper)", 0);
6004 __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
6005 __Pyx_RefNannyFinishContext();
6017 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
6019 __Pyx_RefNannyDeclarations
6020 PyObject *__pyx_t_1 = NULL;
6021 int __pyx_lineno = 0;
6022 const char *__pyx_filename = NULL;
6023 int __pyx_clineno = 0;
6024 __Pyx_RefNannySetupContext(
"__contains__", 0);
6033 __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_14), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6034 __Pyx_GOTREF(__pyx_t_1);
6035 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6036 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6037 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6042 __Pyx_XDECREF(__pyx_t_1);
6043 __Pyx_AddTraceback(
"PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6046 __Pyx_RefNannyFinishContext();
6051 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self);
6052 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 ";
6053 #if CYTHON_COMPILING_IN_CPYTHON
6054 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
6056 static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
6057 PyObject *__pyx_r = 0;
6058 __Pyx_RefNannyDeclarations
6059 __Pyx_RefNannySetupContext(
"__iter__ (wrapper)", 0);
6060 __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6061 __Pyx_RefNannyFinishContext();
6073 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6074 PyObject *__pyx_r = NULL;
6075 __Pyx_RefNannyDeclarations
6076 PyObject *__pyx_t_1 = NULL;
6077 int __pyx_lineno = 0;
6078 const char *__pyx_filename = NULL;
6079 int __pyx_clineno = 0;
6080 __Pyx_RefNannySetupContext(
"__iter__", 0);
6089 __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_15), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6090 __Pyx_GOTREF(__pyx_t_1);
6091 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6092 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6093 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6095 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6098 __Pyx_XDECREF(__pyx_t_1);
6099 __Pyx_AddTraceback(
"PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6102 __Pyx_XGIVEREF(__pyx_r);
6103 __Pyx_RefNannyFinishContext();
6108 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt);
6109 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 ";
6110 static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
6111 PyObject *__pyx_r = 0;
6112 __Pyx_RefNannyDeclarations
6113 __Pyx_RefNannySetupContext(
"reframe (wrapper)", 0);
6114 __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
6115 __Pyx_RefNannyFinishContext();
6127 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
6128 PyObject *__pyx_v_error_msg_prefix = NULL;
6129 struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
6130 PyObject *__pyx_v_err = NULL;
6131 PyObject *__pyx_r = NULL;
6132 __Pyx_RefNannyDeclarations
6135 PyObject *__pyx_t_3 = NULL;
6136 PyObject *__pyx_t_4 = NULL;
6137 PyObject *__pyx_t_5 = NULL;
6138 PyObject *__pyx_t_6 = NULL;
6141 PyObject *__pyx_t_9 = NULL;
6142 PyObject *__pyx_t_10 = NULL;
6143 PyObject *__pyx_t_11 = NULL;
6144 PyObject *__pyx_t_12 = NULL;
6145 PyObject *__pyx_t_13 = NULL;
6146 int __pyx_lineno = 0;
6147 const char *__pyx_filename = NULL;
6148 int __pyx_clineno = 0;
6149 __Pyx_RefNannySetupContext(
"reframe", 0);
6158 __Pyx_INCREF(((PyObject *)__pyx_kp_s_16));
6159 __pyx_v_error_msg_prefix = ((PyObject *)__pyx_kp_s_16);
6168 __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, ((PyObject*)__pyx_ptype_8PyClical_index_set));
6169 __pyx_t_2 = (__pyx_t_1 != 0);
6180 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6181 __Pyx_XGOTREF(__pyx_t_3);
6182 __Pyx_XGOTREF(__pyx_t_4);
6183 __Pyx_XGOTREF(__pyx_t_5);
6193 __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6194 __Pyx_GOTREF(__pyx_t_6);
6195 __pyx_v_result = ((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
6206 __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)));
6208 __Pyx_CppExn2PyErr();
6209 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
6211 __pyx_v_result->instance = __pyx_t_7;
6213 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6214 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6215 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6216 goto __pyx_L11_try_end;
6218 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6227 __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6229 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
6230 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;}
6231 __Pyx_GOTREF(__pyx_t_6);
6232 __Pyx_GOTREF(__pyx_t_9);
6233 __Pyx_GOTREF(__pyx_t_10);
6234 __Pyx_INCREF(__pyx_t_9);
6235 __pyx_v_err = __pyx_t_9;
6244 __pyx_t_11 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_17));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6245 __Pyx_GOTREF(__pyx_t_11);
6246 __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;}
6247 __Pyx_GOTREF(__pyx_t_12);
6248 __Pyx_INCREF(((PyObject *)__pyx_v_self));
6249 PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
6250 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6251 __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__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;}
6252 __Pyx_GOTREF(__pyx_t_13);
6253 __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
6254 __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;}
6255 __Pyx_GOTREF(__pyx_t_12);
6256 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6257 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6258 __pyx_t_13 = PyNumber_Add(__pyx_t_12, ((PyObject *)__pyx_kp_s_18));
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6259 __Pyx_GOTREF(__pyx_t_13);
6260 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6269 __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;}
6270 __Pyx_GOTREF(__pyx_t_12);
6271 __Pyx_INCREF(__pyx_v_ixt);
6272 PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_ixt);
6273 __Pyx_GIVEREF(__pyx_v_ixt);
6274 __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__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;}
6275 __Pyx_GOTREF(__pyx_t_11);
6276 __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
6277 __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;}
6278 __Pyx_GOTREF(__pyx_t_12);
6279 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6280 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6281 __pyx_t_11 = PyNumber_Add(__pyx_t_12, ((PyObject *)__pyx_kp_s_8));
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6282 __Pyx_GOTREF(__pyx_t_11);
6283 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6284 __pyx_t_12 = PyNumber_Add(__pyx_t_11, ((PyObject *)__pyx_kp_s_9));
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6285 __Pyx_GOTREF(__pyx_t_12);
6286 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6295 __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;}
6296 __Pyx_GOTREF(__pyx_t_11);
6297 __Pyx_INCREF(__pyx_v_err);
6298 PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_err);
6299 __Pyx_GIVEREF(__pyx_v_err);
6300 __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__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;}
6301 __Pyx_GOTREF(__pyx_t_13);
6302 __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
6303 __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;}
6304 __Pyx_GOTREF(__pyx_t_11);
6305 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6306 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6307 __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;}
6308 __Pyx_GOTREF(__pyx_t_13);
6309 PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
6310 __Pyx_GIVEREF(__pyx_t_11);
6312 __pyx_t_11 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__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;}
6313 __Pyx_GOTREF(__pyx_t_11);
6314 __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
6315 __Pyx_Raise(__pyx_t_11, 0, 0, 0);
6316 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6317 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
6318 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6319 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6320 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6321 goto __pyx_L5_exception_handled;
6323 __pyx_L6_except_error:;
6324 __Pyx_XGIVEREF(__pyx_t_3);
6325 __Pyx_XGIVEREF(__pyx_t_4);
6326 __Pyx_XGIVEREF(__pyx_t_5);
6327 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6328 goto __pyx_L1_error;
6329 __pyx_L5_exception_handled:;
6330 __Pyx_XGIVEREF(__pyx_t_3);
6331 __Pyx_XGIVEREF(__pyx_t_4);
6332 __Pyx_XGIVEREF(__pyx_t_5);
6333 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6347 __pyx_t_10 = PyNumber_Add(__pyx_v_error_msg_prefix, ((PyObject *)__pyx_kp_s_19));
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6348 __Pyx_GOTREF(__pyx_t_10);
6349 __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;}
6350 __Pyx_GOTREF(__pyx_t_9);
6351 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6352 PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
6353 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6354 __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_9), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6355 __Pyx_GOTREF(__pyx_t_6);
6356 __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
6357 __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;}
6358 __Pyx_GOTREF(__pyx_t_9);
6359 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6360 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6361 __pyx_t_6 = PyNumber_Add(__pyx_t_9, ((PyObject *)__pyx_kp_s_12));
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6362 __Pyx_GOTREF(__pyx_t_6);
6363 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6364 __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;}
6365 __Pyx_GOTREF(__pyx_t_9);
6366 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
6367 __Pyx_GIVEREF(__pyx_t_6);
6369 __pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_9), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6370 __Pyx_GOTREF(__pyx_t_6);
6371 __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
6372 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
6373 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6374 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6385 __Pyx_XDECREF(__pyx_r);
6386 __Pyx_INCREF(((PyObject *)__pyx_v_result));
6387 __pyx_r = ((PyObject *)__pyx_v_result);
6390 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6393 __Pyx_XDECREF(__pyx_t_6);
6394 __Pyx_XDECREF(__pyx_t_9);
6395 __Pyx_XDECREF(__pyx_t_10);
6396 __Pyx_XDECREF(__pyx_t_11);
6397 __Pyx_XDECREF(__pyx_t_12);
6398 __Pyx_XDECREF(__pyx_t_13);
6399 __Pyx_AddTraceback(
"PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
6402 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
6403 __Pyx_XDECREF((PyObject *)__pyx_v_result);
6404 __Pyx_XDECREF(__pyx_v_err);
6405 __Pyx_XGIVEREF(__pyx_r);
6406 __Pyx_RefNannyFinishContext();
6411 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op);
6412 static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
6413 PyObject *__pyx_r = 0;
6414 __Pyx_RefNannyDeclarations
6415 __Pyx_RefNannySetupContext(
"__richcmp__ (wrapper)", 0);
6416 __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((
int)__pyx_v_op));
6417 __Pyx_RefNannyFinishContext();
6429 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs,
int __pyx_v_op) {
6430 PyObject *__pyx_r = NULL;
6431 __Pyx_RefNannyDeclarations
6435 PyObject *__pyx_t_4 = NULL;
6436 PyObject *__pyx_t_5 = NULL;
6437 PyObject *__pyx_t_6 = NULL;
6438 int __pyx_lineno = 0;
6439 const char *__pyx_filename = NULL;
6440 int __pyx_clineno = 0;
6441 __Pyx_RefNannySetupContext(
"__richcmp__", 0);
6450 __pyx_t_1 = ((__pyx_v_op == 2) != 0);
6460 __pyx_t_1 = (__pyx_v_lhs == Py_None);
6461 if (!(__pyx_t_1 != 0)) {
6462 __pyx_t_2 = (__pyx_v_rhs == Py_None);
6463 __pyx_t_3 = (__pyx_t_2 != 0);
6465 __pyx_t_3 = (__pyx_t_1 != 0);
6476 __Pyx_XDECREF(__pyx_r);
6477 __pyx_t_3 = (__pyx_v_lhs == __pyx_v_rhs);
6478 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_3)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6479 __Pyx_GOTREF(__pyx_t_4);
6480 __pyx_r = __pyx_t_4;
6494 __Pyx_XDECREF(__pyx_r);
6495 __pyx_t_3 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
6496 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_3)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6497 __Pyx_GOTREF(__pyx_t_4);
6498 __pyx_r = __pyx_t_4;
6513 __pyx_t_3 = ((__pyx_v_op == 3) != 0);
6523 __pyx_t_3 = (__pyx_v_lhs == Py_None);
6524 if (!(__pyx_t_3 != 0)) {
6525 __pyx_t_1 = (__pyx_v_rhs == Py_None);
6526 __pyx_t_2 = (__pyx_t_1 != 0);
6528 __pyx_t_2 = (__pyx_t_3 != 0);
6539 __Pyx_XDECREF(__pyx_r);
6540 __pyx_t_2 = (__pyx_v_lhs == __pyx_v_rhs);
6541 __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_2)) != 0)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6542 __Pyx_GOTREF(__pyx_t_4);
6543 __pyx_r = __pyx_t_4;
6557 __Pyx_XDECREF(__pyx_r);
6558 __pyx_t_2 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
6559 __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_2)));
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6560 __Pyx_GOTREF(__pyx_t_4);
6561 __pyx_r = __pyx_t_4;
6576 __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_lhs, ((PyObject*)__pyx_ptype_8PyClical_clifford));
6577 if (!(__pyx_t_2 != 0)) {
6578 __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, ((PyObject*)__pyx_ptype_8PyClical_clifford));
6579 __pyx_t_1 = (__pyx_t_3 != 0);
6581 __pyx_t_1 = (__pyx_t_2 != 0);
6592 __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;}
6593 __Pyx_GOTREF(__pyx_t_4);
6594 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
6595 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_lhs)));
6596 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
6597 __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6598 __Pyx_GOTREF(__pyx_t_5);
6599 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
6600 __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_kp_s_20), __pyx_t_5);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6601 __Pyx_GOTREF(__pyx_t_4);
6602 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6603 __pyx_t_5 = PyNumber_Add(__pyx_t_4, ((PyObject *)__pyx_kp_s_11));
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6604 __Pyx_GOTREF(__pyx_t_5);
6605 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6606 __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;}
6607 __Pyx_GOTREF(__pyx_t_4);
6608 __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
6609 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_rhs)));
6610 __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
6611 __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6612 __Pyx_GOTREF(__pyx_t_6);
6613 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
6614 __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;}
6615 __Pyx_GOTREF(__pyx_t_4);
6616 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6617 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6618 __pyx_t_6 = PyNumber_Add(__pyx_t_4, ((PyObject *)__pyx_kp_s_3));
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6619 __Pyx_GOTREF(__pyx_t_6);
6620 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6621 __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;}
6622 __Pyx_GOTREF(__pyx_t_4);
6623 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
6624 __Pyx_GIVEREF(__pyx_t_6);
6626 __pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6627 __Pyx_GOTREF(__pyx_t_6);
6628 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
6629 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
6630 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6631 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6643 __Pyx_XDECREF(__pyx_r);
6644 __Pyx_INCREF(__pyx_builtin_NotImplemented);
6645 __pyx_r = __pyx_builtin_NotImplemented;
6650 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6653 __Pyx_XDECREF(__pyx_t_4);
6654 __Pyx_XDECREF(__pyx_t_5);
6655 __Pyx_XDECREF(__pyx_t_6);
6656 __Pyx_AddTraceback(
"PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6659 __Pyx_XGIVEREF(__pyx_r);
6660 __Pyx_RefNannyFinishContext();
6665 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt);
6666 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 ";
6667 #if CYTHON_COMPILING_IN_CPYTHON
6668 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
6670 static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
6671 PyObject *__pyx_r = 0;
6672 __Pyx_RefNannyDeclarations
6673 __Pyx_RefNannySetupContext(
"__getitem__ (wrapper)", 0);
6674 __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
6675 __Pyx_RefNannyFinishContext();
6687 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
6688 PyObject *__pyx_r = NULL;
6689 __Pyx_RefNannyDeclarations
6690 PyObject *__pyx_t_1 = NULL;
6691 int __pyx_lineno = 0;
6692 const char *__pyx_filename = NULL;
6693 int __pyx_clineno = 0;
6694 __Pyx_RefNannySetupContext(
"__getitem__", 0);
6703 __Pyx_XDECREF(__pyx_r);
6704 __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;}
6705 __Pyx_GOTREF(__pyx_t_1);
6706 __pyx_r = __pyx_t_1;
6710 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6713 __Pyx_XDECREF(__pyx_t_1);
6714 __Pyx_AddTraceback(
"PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6717 __Pyx_XGIVEREF(__pyx_r);
6718 __Pyx_RefNannyFinishContext();
6723 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self);
6724 static char __pyx_doc_8PyClical_8clifford_16__neg__[] =
"\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
6725 #if CYTHON_COMPILING_IN_CPYTHON
6726 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
6728 static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
6729 PyObject *__pyx_r = 0;
6730 __Pyx_RefNannyDeclarations
6731 __Pyx_RefNannySetupContext(
"__neg__ (wrapper)", 0);
6732 __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6733 __Pyx_RefNannyFinishContext();
6745 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6746 PyObject *__pyx_r = NULL;
6747 __Pyx_RefNannyDeclarations
6748 PyObject *__pyx_t_1 = NULL;
6749 PyObject *__pyx_t_2 = NULL;
6750 int __pyx_lineno = 0;
6751 const char *__pyx_filename = NULL;
6752 int __pyx_clineno = 0;
6753 __Pyx_RefNannySetupContext(
"__neg__", 0);
6762 __Pyx_XDECREF(__pyx_r);
6763 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6764 __Pyx_GOTREF(__pyx_t_1);
6765 __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;}
6766 __Pyx_GOTREF(__pyx_t_2);
6767 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6768 __pyx_r = __pyx_t_2;
6772 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6775 __Pyx_XDECREF(__pyx_t_1);
6776 __Pyx_XDECREF(__pyx_t_2);
6777 __Pyx_AddTraceback(
"PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6780 __Pyx_XGIVEREF(__pyx_r);
6781 __Pyx_RefNannyFinishContext();
6786 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self);
6787 static char __pyx_doc_8PyClical_8clifford_18__pos__[] =
"\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
6788 #if CYTHON_COMPILING_IN_CPYTHON
6789 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
6791 static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
6792 PyObject *__pyx_r = 0;
6793 __Pyx_RefNannyDeclarations
6794 __Pyx_RefNannySetupContext(
"__pos__ (wrapper)", 0);
6795 __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6796 __Pyx_RefNannyFinishContext();
6808 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6809 PyObject *__pyx_r = NULL;
6810 __Pyx_RefNannyDeclarations
6811 PyObject *__pyx_t_1 = NULL;
6812 PyObject *__pyx_t_2 = NULL;
6813 int __pyx_lineno = 0;
6814 const char *__pyx_filename = NULL;
6815 int __pyx_clineno = 0;
6816 __Pyx_RefNannySetupContext(
"__pos__", 0);
6825 __Pyx_XDECREF(__pyx_r);
6826 __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;}
6827 __Pyx_GOTREF(__pyx_t_1);
6828 __Pyx_INCREF(((PyObject *)__pyx_v_self));
6829 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
6830 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6831 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6832 __Pyx_GOTREF(__pyx_t_2);
6833 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
6834 __pyx_r = __pyx_t_2;
6838 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6841 __Pyx_XDECREF(__pyx_t_1);
6842 __Pyx_XDECREF(__pyx_t_2);
6843 __Pyx_AddTraceback(
"PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6846 __Pyx_XGIVEREF(__pyx_r);
6847 __Pyx_RefNannyFinishContext();
6852 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
6853 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 ";
6854 #if CYTHON_COMPILING_IN_CPYTHON
6855 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
6857 static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
6858 PyObject *__pyx_r = 0;
6859 __Pyx_RefNannyDeclarations
6860 __Pyx_RefNannySetupContext(
"__add__ (wrapper)", 0);
6861 __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
6862 __Pyx_RefNannyFinishContext();
6874 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
6875 PyObject *__pyx_r = NULL;
6876 __Pyx_RefNannyDeclarations
6877 PyObject *__pyx_t_1 = NULL;
6878 PyObject *__pyx_t_2 = NULL;
6879 int __pyx_lineno = 0;
6880 const char *__pyx_filename = NULL;
6881 int __pyx_clineno = 0;
6882 __Pyx_RefNannySetupContext(
"__add__", 0);
6891 __Pyx_XDECREF(__pyx_r);
6892 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
6893 __Pyx_GOTREF(__pyx_t_1);
6894 __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;}
6895 __Pyx_GOTREF(__pyx_t_2);
6896 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6897 __pyx_r = __pyx_t_2;
6901 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6904 __Pyx_XDECREF(__pyx_t_1);
6905 __Pyx_XDECREF(__pyx_t_2);
6906 __Pyx_AddTraceback(
"PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6909 __Pyx_XGIVEREF(__pyx_r);
6910 __Pyx_RefNannyFinishContext();
6915 static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
6916 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 ";
6917 #if CYTHON_COMPILING_IN_CPYTHON
6918 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
6920 static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
6921 PyObject *__pyx_r = 0;
6922 __Pyx_RefNannyDeclarations
6923 __Pyx_RefNannySetupContext(
"__iadd__ (wrapper)", 0);
6924 __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
6925 __Pyx_RefNannyFinishContext();
6937 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
6938 PyObject *__pyx_r = NULL;
6939 __Pyx_RefNannyDeclarations
6940 PyObject *__pyx_t_1 = NULL;
6941 int __pyx_lineno = 0;
6942 const char *__pyx_filename = NULL;
6943 int __pyx_clineno = 0;
6944 __Pyx_RefNannySetupContext(
"__iadd__", 0);
6953 __Pyx_XDECREF(__pyx_r);
6954 __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;}
6955 __Pyx_GOTREF(__pyx_t_1);
6956 __pyx_r = __pyx_t_1;
6960 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6963 __Pyx_XDECREF(__pyx_t_1);
6964 __Pyx_AddTraceback(
"PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6967 __Pyx_XGIVEREF(__pyx_r);
6968 __Pyx_RefNannyFinishContext();
6973 static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
6974 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 ";
6975 #if CYTHON_COMPILING_IN_CPYTHON
6976 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
6978 static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
6979 PyObject *__pyx_r = 0;
6980 __Pyx_RefNannyDeclarations
6981 __Pyx_RefNannySetupContext(
"__sub__ (wrapper)", 0);
6982 __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
6983 __Pyx_RefNannyFinishContext();
6995 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
6996 PyObject *__pyx_r = NULL;
6997 __Pyx_RefNannyDeclarations
6998 PyObject *__pyx_t_1 = NULL;
6999 PyObject *__pyx_t_2 = NULL;
7000 int __pyx_lineno = 0;
7001 const char *__pyx_filename = NULL;
7002 int __pyx_clineno = 0;
7003 __Pyx_RefNannySetupContext(
"__sub__", 0);
7012 __Pyx_XDECREF(__pyx_r);
7013 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7014 __Pyx_GOTREF(__pyx_t_1);
7015 __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;}
7016 __Pyx_GOTREF(__pyx_t_2);
7017 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7018 __pyx_r = __pyx_t_2;
7022 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7025 __Pyx_XDECREF(__pyx_t_1);
7026 __Pyx_XDECREF(__pyx_t_2);
7027 __Pyx_AddTraceback(
"PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7030 __Pyx_XGIVEREF(__pyx_r);
7031 __Pyx_RefNannyFinishContext();
7036 static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7037 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 ";
7038 #if CYTHON_COMPILING_IN_CPYTHON
7039 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
7041 static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7042 PyObject *__pyx_r = 0;
7043 __Pyx_RefNannyDeclarations
7044 __Pyx_RefNannySetupContext(
"__isub__ (wrapper)", 0);
7045 __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7046 __Pyx_RefNannyFinishContext();
7058 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7059 PyObject *__pyx_r = NULL;
7060 __Pyx_RefNannyDeclarations
7061 PyObject *__pyx_t_1 = NULL;
7062 int __pyx_lineno = 0;
7063 const char *__pyx_filename = NULL;
7064 int __pyx_clineno = 0;
7065 __Pyx_RefNannySetupContext(
"__isub__", 0);
7074 __Pyx_XDECREF(__pyx_r);
7075 __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;}
7076 __Pyx_GOTREF(__pyx_t_1);
7077 __pyx_r = __pyx_t_1;
7081 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7084 __Pyx_XDECREF(__pyx_t_1);
7085 __Pyx_AddTraceback(
"PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7088 __Pyx_XGIVEREF(__pyx_r);
7089 __Pyx_RefNannyFinishContext();
7094 static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7095 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 ";
7096 #if CYTHON_COMPILING_IN_CPYTHON
7097 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
7099 static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7100 PyObject *__pyx_r = 0;
7101 __Pyx_RefNannyDeclarations
7102 __Pyx_RefNannySetupContext(
"__mul__ (wrapper)", 0);
7103 __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7104 __Pyx_RefNannyFinishContext();
7116 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7117 PyObject *__pyx_r = NULL;
7118 __Pyx_RefNannyDeclarations
7119 PyObject *__pyx_t_1 = NULL;
7120 PyObject *__pyx_t_2 = NULL;
7121 int __pyx_lineno = 0;
7122 const char *__pyx_filename = NULL;
7123 int __pyx_clineno = 0;
7124 __Pyx_RefNannySetupContext(
"__mul__", 0);
7133 __Pyx_XDECREF(__pyx_r);
7134 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7135 __Pyx_GOTREF(__pyx_t_1);
7136 __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;}
7137 __Pyx_GOTREF(__pyx_t_2);
7138 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7139 __pyx_r = __pyx_t_2;
7143 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7146 __Pyx_XDECREF(__pyx_t_1);
7147 __Pyx_XDECREF(__pyx_t_2);
7148 __Pyx_AddTraceback(
"PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7151 __Pyx_XGIVEREF(__pyx_r);
7152 __Pyx_RefNannyFinishContext();
7157 static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7158 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 ";
7159 #if CYTHON_COMPILING_IN_CPYTHON
7160 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
7162 static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7163 PyObject *__pyx_r = 0;
7164 __Pyx_RefNannyDeclarations
7165 __Pyx_RefNannySetupContext(
"__imul__ (wrapper)", 0);
7166 __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7167 __Pyx_RefNannyFinishContext();
7179 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7180 PyObject *__pyx_r = NULL;
7181 __Pyx_RefNannyDeclarations
7182 PyObject *__pyx_t_1 = NULL;
7183 int __pyx_lineno = 0;
7184 const char *__pyx_filename = NULL;
7185 int __pyx_clineno = 0;
7186 __Pyx_RefNannySetupContext(
"__imul__", 0);
7195 __Pyx_XDECREF(__pyx_r);
7196 __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;}
7197 __Pyx_GOTREF(__pyx_t_1);
7198 __pyx_r = __pyx_t_1;
7202 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7205 __Pyx_XDECREF(__pyx_t_1);
7206 __Pyx_AddTraceback(
"PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7209 __Pyx_XGIVEREF(__pyx_r);
7210 __Pyx_RefNannyFinishContext();
7215 static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7216 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 ";
7217 #if CYTHON_COMPILING_IN_CPYTHON
7218 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
7220 static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7221 PyObject *__pyx_r = 0;
7222 __Pyx_RefNannyDeclarations
7223 __Pyx_RefNannySetupContext(
"__mod__ (wrapper)", 0);
7224 __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7225 __Pyx_RefNannyFinishContext();
7237 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7238 PyObject *__pyx_r = NULL;
7239 __Pyx_RefNannyDeclarations
7240 PyObject *__pyx_t_1 = NULL;
7241 PyObject *__pyx_t_2 = NULL;
7242 int __pyx_lineno = 0;
7243 const char *__pyx_filename = NULL;
7244 int __pyx_clineno = 0;
7245 __Pyx_RefNannySetupContext(
"__mod__", 0);
7254 __Pyx_XDECREF(__pyx_r);
7255 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7256 __Pyx_GOTREF(__pyx_t_1);
7257 __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;}
7258 __Pyx_GOTREF(__pyx_t_2);
7259 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7260 __pyx_r = __pyx_t_2;
7264 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7267 __Pyx_XDECREF(__pyx_t_1);
7268 __Pyx_XDECREF(__pyx_t_2);
7269 __Pyx_AddTraceback(
"PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7272 __Pyx_XGIVEREF(__pyx_r);
7273 __Pyx_RefNannyFinishContext();
7278 static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7279 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 ";
7280 #if CYTHON_COMPILING_IN_CPYTHON
7281 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
7283 static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7284 PyObject *__pyx_r = 0;
7285 __Pyx_RefNannyDeclarations
7286 __Pyx_RefNannySetupContext(
"__imod__ (wrapper)", 0);
7287 __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7288 __Pyx_RefNannyFinishContext();
7300 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7301 PyObject *__pyx_r = NULL;
7302 __Pyx_RefNannyDeclarations
7303 PyObject *__pyx_t_1 = NULL;
7304 int __pyx_lineno = 0;
7305 const char *__pyx_filename = NULL;
7306 int __pyx_clineno = 0;
7307 __Pyx_RefNannySetupContext(
"__imod__", 0);
7316 __Pyx_XDECREF(__pyx_r);
7317 __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;}
7318 __Pyx_GOTREF(__pyx_t_1);
7319 __pyx_r = __pyx_t_1;
7323 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7326 __Pyx_XDECREF(__pyx_t_1);
7327 __Pyx_AddTraceback(
"PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7330 __Pyx_XGIVEREF(__pyx_r);
7331 __Pyx_RefNannyFinishContext();
7336 static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7337 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 ";
7338 #if CYTHON_COMPILING_IN_CPYTHON
7339 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
7341 static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7342 PyObject *__pyx_r = 0;
7343 __Pyx_RefNannyDeclarations
7344 __Pyx_RefNannySetupContext(
"__and__ (wrapper)", 0);
7345 __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7346 __Pyx_RefNannyFinishContext();
7358 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7359 PyObject *__pyx_r = NULL;
7360 __Pyx_RefNannyDeclarations
7361 PyObject *__pyx_t_1 = NULL;
7362 PyObject *__pyx_t_2 = NULL;
7363 int __pyx_lineno = 0;
7364 const char *__pyx_filename = NULL;
7365 int __pyx_clineno = 0;
7366 __Pyx_RefNannySetupContext(
"__and__", 0);
7375 __Pyx_XDECREF(__pyx_r);
7376 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7377 __Pyx_GOTREF(__pyx_t_1);
7378 __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;}
7379 __Pyx_GOTREF(__pyx_t_2);
7380 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7381 __pyx_r = __pyx_t_2;
7385 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7388 __Pyx_XDECREF(__pyx_t_1);
7389 __Pyx_XDECREF(__pyx_t_2);
7390 __Pyx_AddTraceback(
"PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7393 __Pyx_XGIVEREF(__pyx_r);
7394 __Pyx_RefNannyFinishContext();
7399 static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7400 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 ";
7401 #if CYTHON_COMPILING_IN_CPYTHON
7402 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
7404 static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7405 PyObject *__pyx_r = 0;
7406 __Pyx_RefNannyDeclarations
7407 __Pyx_RefNannySetupContext(
"__iand__ (wrapper)", 0);
7408 __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7409 __Pyx_RefNannyFinishContext();
7421 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7422 PyObject *__pyx_r = NULL;
7423 __Pyx_RefNannyDeclarations
7424 PyObject *__pyx_t_1 = NULL;
7425 int __pyx_lineno = 0;
7426 const char *__pyx_filename = NULL;
7427 int __pyx_clineno = 0;
7428 __Pyx_RefNannySetupContext(
"__iand__", 0);
7437 __Pyx_XDECREF(__pyx_r);
7438 __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;}
7439 __Pyx_GOTREF(__pyx_t_1);
7440 __pyx_r = __pyx_t_1;
7444 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7447 __Pyx_XDECREF(__pyx_t_1);
7448 __Pyx_AddTraceback(
"PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7451 __Pyx_XGIVEREF(__pyx_r);
7452 __Pyx_RefNannyFinishContext();
7457 static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7458 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 ";
7459 #if CYTHON_COMPILING_IN_CPYTHON
7460 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
7462 static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7463 PyObject *__pyx_r = 0;
7464 __Pyx_RefNannyDeclarations
7465 __Pyx_RefNannySetupContext(
"__xor__ (wrapper)", 0);
7466 __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7467 __Pyx_RefNannyFinishContext();
7479 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7480 PyObject *__pyx_r = NULL;
7481 __Pyx_RefNannyDeclarations
7482 PyObject *__pyx_t_1 = NULL;
7483 PyObject *__pyx_t_2 = NULL;
7484 int __pyx_lineno = 0;
7485 const char *__pyx_filename = NULL;
7486 int __pyx_clineno = 0;
7487 __Pyx_RefNannySetupContext(
"__xor__", 0);
7496 __Pyx_XDECREF(__pyx_r);
7497 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7498 __Pyx_GOTREF(__pyx_t_1);
7499 __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;}
7500 __Pyx_GOTREF(__pyx_t_2);
7501 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7502 __pyx_r = __pyx_t_2;
7506 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7509 __Pyx_XDECREF(__pyx_t_1);
7510 __Pyx_XDECREF(__pyx_t_2);
7511 __Pyx_AddTraceback(
"PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7514 __Pyx_XGIVEREF(__pyx_r);
7515 __Pyx_RefNannyFinishContext();
7520 static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7521 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 ";
7522 #if CYTHON_COMPILING_IN_CPYTHON
7523 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
7525 static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7526 PyObject *__pyx_r = 0;
7527 __Pyx_RefNannyDeclarations
7528 __Pyx_RefNannySetupContext(
"__ixor__ (wrapper)", 0);
7529 __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7530 __Pyx_RefNannyFinishContext();
7542 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7543 PyObject *__pyx_r = NULL;
7544 __Pyx_RefNannyDeclarations
7545 PyObject *__pyx_t_1 = NULL;
7546 int __pyx_lineno = 0;
7547 const char *__pyx_filename = NULL;
7548 int __pyx_clineno = 0;
7549 __Pyx_RefNannySetupContext(
"__ixor__", 0);
7558 __Pyx_XDECREF(__pyx_r);
7559 __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;}
7560 __Pyx_GOTREF(__pyx_t_1);
7561 __pyx_r = __pyx_t_1;
7565 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7568 __Pyx_XDECREF(__pyx_t_1);
7569 __Pyx_AddTraceback(
"PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7572 __Pyx_XGIVEREF(__pyx_r);
7573 __Pyx_RefNannyFinishContext();
7578 #if PY_MAJOR_VERSION < 3
7579 static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7580 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 ";
7581 #if CYTHON_COMPILING_IN_CPYTHON
7582 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
7584 static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7585 PyObject *__pyx_r = 0;
7586 __Pyx_RefNannyDeclarations
7587 __Pyx_RefNannySetupContext(
"__div__ (wrapper)", 0);
7588 __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7589 __Pyx_RefNannyFinishContext();
7602 #if PY_MAJOR_VERSION < 3
7603 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7604 PyObject *__pyx_r = NULL;
7605 __Pyx_RefNannyDeclarations
7606 PyObject *__pyx_t_1 = NULL;
7607 PyObject *__pyx_t_2 = NULL;
7608 int __pyx_lineno = 0;
7609 const char *__pyx_filename = NULL;
7610 int __pyx_clineno = 0;
7611 __Pyx_RefNannySetupContext(
"__div__", 0);
7620 __Pyx_XDECREF(__pyx_r);
7621 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7622 __Pyx_GOTREF(__pyx_t_1);
7623 __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;}
7624 __Pyx_GOTREF(__pyx_t_2);
7625 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7626 __pyx_r = __pyx_t_2;
7630 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7633 __Pyx_XDECREF(__pyx_t_1);
7634 __Pyx_XDECREF(__pyx_t_2);
7635 __Pyx_AddTraceback(
"PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7638 __Pyx_XGIVEREF(__pyx_r);
7639 __Pyx_RefNannyFinishContext();
7645 #if PY_MAJOR_VERSION < 3
7646 static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7647 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 ";
7648 #if CYTHON_COMPILING_IN_CPYTHON
7649 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
7651 static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7652 PyObject *__pyx_r = 0;
7653 __Pyx_RefNannyDeclarations
7654 __Pyx_RefNannySetupContext(
"__idiv__ (wrapper)", 0);
7655 __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7656 __Pyx_RefNannyFinishContext();
7669 #if PY_MAJOR_VERSION < 3
7670 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7671 PyObject *__pyx_r = NULL;
7672 __Pyx_RefNannyDeclarations
7673 PyObject *__pyx_t_1 = NULL;
7674 int __pyx_lineno = 0;
7675 const char *__pyx_filename = NULL;
7676 int __pyx_clineno = 0;
7677 __Pyx_RefNannySetupContext(
"__idiv__", 0);
7686 __Pyx_XDECREF(__pyx_r);
7687 __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;}
7688 __Pyx_GOTREF(__pyx_t_1);
7689 __pyx_r = __pyx_t_1;
7693 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7696 __Pyx_XDECREF(__pyx_t_1);
7697 __Pyx_AddTraceback(
"PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7700 __Pyx_XGIVEREF(__pyx_r);
7701 __Pyx_RefNannyFinishContext();
7707 static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
7708 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 ";
7709 static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7710 PyObject *__pyx_r = 0;
7711 __Pyx_RefNannyDeclarations
7712 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
7713 __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7714 __Pyx_RefNannyFinishContext();
7726 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7727 PyObject *__pyx_r = NULL;
7728 __Pyx_RefNannyDeclarations
7729 PyObject *__pyx_t_1 = NULL;
7730 PyObject *__pyx_t_2 = NULL;
7731 int __pyx_lineno = 0;
7732 const char *__pyx_filename = NULL;
7733 int __pyx_clineno = 0;
7734 __Pyx_RefNannySetupContext(
"inv", 0);
7743 __Pyx_XDECREF(__pyx_r);
7744 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7745 __Pyx_GOTREF(__pyx_t_1);
7746 __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;}
7747 __Pyx_GOTREF(__pyx_t_2);
7748 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7749 __pyx_r = __pyx_t_2;
7753 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7756 __Pyx_XDECREF(__pyx_t_1);
7757 __Pyx_XDECREF(__pyx_t_2);
7758 __Pyx_AddTraceback(
"PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
7761 __Pyx_XGIVEREF(__pyx_r);
7762 __Pyx_RefNannyFinishContext();
7767 static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs);
7768 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 ";
7769 #if CYTHON_COMPILING_IN_CPYTHON
7770 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
7772 static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7773 PyObject *__pyx_r = 0;
7774 __Pyx_RefNannyDeclarations
7775 __Pyx_RefNannySetupContext(
"__or__ (wrapper)", 0);
7776 __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7777 __Pyx_RefNannyFinishContext();
7789 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7790 PyObject *__pyx_r = NULL;
7791 __Pyx_RefNannyDeclarations
7792 PyObject *__pyx_t_1 = NULL;
7793 PyObject *__pyx_t_2 = NULL;
7794 int __pyx_lineno = 0;
7795 const char *__pyx_filename = NULL;
7796 int __pyx_clineno = 0;
7797 __Pyx_RefNannySetupContext(
"__or__", 0);
7806 __Pyx_XDECREF(__pyx_r);
7807 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
7808 __Pyx_GOTREF(__pyx_t_1);
7809 __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;}
7810 __Pyx_GOTREF(__pyx_t_2);
7811 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7812 __pyx_r = __pyx_t_2;
7816 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7819 __Pyx_XDECREF(__pyx_t_1);
7820 __Pyx_XDECREF(__pyx_t_2);
7821 __Pyx_AddTraceback(
"PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7824 __Pyx_XGIVEREF(__pyx_r);
7825 __Pyx_RefNannyFinishContext();
7830 static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs);
7831 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 ";
7832 #if CYTHON_COMPILING_IN_CPYTHON
7833 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
7835 static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7836 PyObject *__pyx_r = 0;
7837 __Pyx_RefNannyDeclarations
7838 __Pyx_RefNannySetupContext(
"__ior__ (wrapper)", 0);
7839 __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7840 __Pyx_RefNannyFinishContext();
7852 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7853 PyObject *__pyx_r = NULL;
7854 __Pyx_RefNannyDeclarations
7855 PyObject *__pyx_t_1 = NULL;
7856 int __pyx_lineno = 0;
7857 const char *__pyx_filename = NULL;
7858 int __pyx_clineno = 0;
7859 __Pyx_RefNannySetupContext(
"__ior__", 0);
7868 __Pyx_XDECREF(__pyx_r);
7869 __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;}
7870 __Pyx_GOTREF(__pyx_t_1);
7871 __pyx_r = __pyx_t_1;
7875 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7878 __Pyx_XDECREF(__pyx_t_1);
7879 __Pyx_AddTraceback(
"PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7882 __Pyx_XGIVEREF(__pyx_r);
7883 __Pyx_RefNannyFinishContext();
7888 static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy);
7889 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 ";
7890 #if CYTHON_COMPILING_IN_CPYTHON
7891 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
7893 static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
7894 PyObject *__pyx_r = 0;
7895 __Pyx_RefNannyDeclarations
7896 __Pyx_RefNannySetupContext(
"__pow__ (wrapper)", 0);
7897 __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
7898 __Pyx_RefNannyFinishContext();
7910 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
7911 PyObject *__pyx_r = NULL;
7912 __Pyx_RefNannyDeclarations
7913 PyObject *__pyx_t_1 = NULL;
7914 int __pyx_lineno = 0;
7915 const char *__pyx_filename = NULL;
7916 int __pyx_clineno = 0;
7917 __Pyx_RefNannySetupContext(
"__pow__", 0);
7926 __Pyx_XDECREF(__pyx_r);
7927 __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;}
7928 __Pyx_GOTREF(__pyx_t_1);
7929 __pyx_r = __pyx_t_1;
7933 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7936 __Pyx_XDECREF(__pyx_t_1);
7937 __Pyx_AddTraceback(
"PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7940 __Pyx_XGIVEREF(__pyx_r);
7941 __Pyx_RefNannyFinishContext();
7946 static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m);
7947 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 ";
7948 static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
7949 PyObject *__pyx_r = 0;
7950 __Pyx_RefNannyDeclarations
7951 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
7952 __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
7953 __Pyx_RefNannyFinishContext();
7965 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
7966 PyObject *__pyx_r = NULL;
7967 __Pyx_RefNannyDeclarations
7968 PyObject *__pyx_t_1 = NULL;
7969 PyObject *__pyx_t_2 = NULL;
7973 int __pyx_lineno = 0;
7974 const char *__pyx_filename = NULL;
7975 int __pyx_clineno = 0;
7976 __Pyx_RefNannySetupContext(
"pow", 0);
7985 __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;}
7986 __Pyx_GOTREF(__pyx_t_1);
7987 __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;}
7988 __Pyx_GOTREF(__pyx_t_2);
7989 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7990 __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;}
7991 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7992 __pyx_t_4 = (__pyx_t_3 != 0);
8002 __Pyx_XDECREF(__pyx_r);
8003 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8004 __Pyx_GOTREF(__pyx_t_2);
8005 __pyx_t_5 = __Pyx_PyInt_AsInt(__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;}
8006 __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;}
8007 __Pyx_GOTREF(__pyx_t_1);
8008 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8009 __pyx_r = __pyx_t_1;
8023 __Pyx_XDECREF(__pyx_r);
8024 __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;}
8025 __Pyx_GOTREF(__pyx_t_1);
8026 __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;}
8027 __Pyx_GOTREF(__pyx_t_2);
8028 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8029 __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;}
8030 __Pyx_GOTREF(__pyx_t_1);
8031 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8032 __pyx_r = __pyx_t_1;
8038 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8041 __Pyx_XDECREF(__pyx_t_1);
8042 __Pyx_XDECREF(__pyx_t_2);
8043 __Pyx_AddTraceback(
"PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
8046 __Pyx_XGIVEREF(__pyx_r);
8047 __Pyx_RefNannyFinishContext();
8052 static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m);
8053 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 ";
8054 static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
8055 PyObject *__pyx_r = 0;
8056 __Pyx_RefNannyDeclarations
8057 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
8058 __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
8059 __Pyx_RefNannyFinishContext();
8071 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
8072 PyObject *__pyx_r = NULL;
8073 __Pyx_RefNannyDeclarations
8074 PyObject *__pyx_t_1 = NULL;
8076 PyObject *__pyx_t_3 = NULL;
8077 int __pyx_lineno = 0;
8078 const char *__pyx_filename = NULL;
8079 int __pyx_clineno = 0;
8080 __Pyx_RefNannySetupContext(
"outer_pow", 0);
8089 __Pyx_XDECREF(__pyx_r);
8090 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8091 __Pyx_GOTREF(__pyx_t_1);
8092 __pyx_t_2 = __Pyx_PyInt_AsInt(__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;}
8093 __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;}
8094 __Pyx_GOTREF(__pyx_t_3);
8095 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8096 __pyx_r = __pyx_t_3;
8100 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8103 __Pyx_XDECREF(__pyx_t_1);
8104 __Pyx_XDECREF(__pyx_t_3);
8105 __Pyx_AddTraceback(
"PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
8108 __Pyx_XGIVEREF(__pyx_r);
8109 __Pyx_RefNannyFinishContext();
8114 static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8115 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 ";
8116 #if CYTHON_COMPILING_IN_CPYTHON
8117 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
8119 static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8120 PyObject *__pyx_v_grade = 0;
8121 int __pyx_lineno = 0;
8122 const char *__pyx_filename = NULL;
8123 int __pyx_clineno = 0;
8124 PyObject *__pyx_r = 0;
8125 __Pyx_RefNannyDeclarations
8126 __Pyx_RefNannySetupContext(
"__call__ (wrapper)", 0);
8128 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__grade,0};
8129 PyObject* values[1] = {0};
8130 if (unlikely(__pyx_kwds)) {
8132 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8134 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8136 default:
goto __pyx_L5_argtuple_error;
8138 kw_args = PyDict_Size(__pyx_kwds);
8141 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__grade)) != 0)) kw_args--;
8142 else goto __pyx_L5_argtuple_error;
8144 if (unlikely(kw_args > 0)) {
8145 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;}
8147 }
else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
8148 goto __pyx_L5_argtuple_error;
8150 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8152 __pyx_v_grade = values[0];
8154 goto __pyx_L4_argument_unpacking_done;
8155 __pyx_L5_argtuple_error:;
8156 __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;}
8158 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8159 __Pyx_RefNannyFinishContext();
8161 __pyx_L4_argument_unpacking_done:;
8162 __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
8163 __Pyx_RefNannyFinishContext();
8175 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
8176 PyObject *__pyx_r = NULL;
8177 __Pyx_RefNannyDeclarations
8178 PyObject *__pyx_t_1 = NULL;
8180 PyObject *__pyx_t_3 = NULL;
8181 int __pyx_lineno = 0;
8182 const char *__pyx_filename = NULL;
8183 int __pyx_clineno = 0;
8184 __Pyx_RefNannySetupContext(
"__call__", 0);
8193 __Pyx_XDECREF(__pyx_r);
8194 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8195 __Pyx_GOTREF(__pyx_t_1);
8196 __pyx_t_2 = __Pyx_PyInt_AsInt(__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;}
8197 __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;}
8198 __Pyx_GOTREF(__pyx_t_3);
8199 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8200 __pyx_r = __pyx_t_3;
8204 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8207 __Pyx_XDECREF(__pyx_t_1);
8208 __Pyx_XDECREF(__pyx_t_3);
8209 __Pyx_AddTraceback(
"PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8212 __Pyx_XGIVEREF(__pyx_r);
8213 __Pyx_RefNannyFinishContext();
8218 static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8219 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 ";
8220 static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8221 PyObject *__pyx_r = 0;
8222 __Pyx_RefNannyDeclarations
8223 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
8224 __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8225 __Pyx_RefNannyFinishContext();
8237 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8238 PyObject *__pyx_r = NULL;
8239 __Pyx_RefNannyDeclarations
8240 PyObject *__pyx_t_1 = NULL;
8241 int __pyx_lineno = 0;
8242 const char *__pyx_filename = NULL;
8243 int __pyx_clineno = 0;
8244 __Pyx_RefNannySetupContext(
"scalar", 0);
8253 __Pyx_XDECREF(__pyx_r);
8254 __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;}
8255 __Pyx_GOTREF(__pyx_t_1);
8256 __pyx_r = __pyx_t_1;
8260 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8263 __Pyx_XDECREF(__pyx_t_1);
8264 __Pyx_AddTraceback(
"PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
8267 __Pyx_XGIVEREF(__pyx_r);
8268 __Pyx_RefNannyFinishContext();
8273 static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8274 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 ";
8275 static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8276 PyObject *__pyx_r = 0;
8277 __Pyx_RefNannyDeclarations
8278 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
8279 __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8280 __Pyx_RefNannyFinishContext();
8292 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8293 PyObject *__pyx_r = NULL;
8294 __Pyx_RefNannyDeclarations
8295 PyObject *__pyx_t_1 = NULL;
8296 PyObject *__pyx_t_2 = NULL;
8297 int __pyx_lineno = 0;
8298 const char *__pyx_filename = NULL;
8299 int __pyx_clineno = 0;
8300 __Pyx_RefNannySetupContext(
"pure", 0);
8309 __Pyx_XDECREF(__pyx_r);
8310 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8311 __Pyx_GOTREF(__pyx_t_1);
8312 __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;}
8313 __Pyx_GOTREF(__pyx_t_2);
8314 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8315 __pyx_r = __pyx_t_2;
8319 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8322 __Pyx_XDECREF(__pyx_t_1);
8323 __Pyx_XDECREF(__pyx_t_2);
8324 __Pyx_AddTraceback(
"PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
8327 __Pyx_XGIVEREF(__pyx_r);
8328 __Pyx_RefNannyFinishContext();
8333 static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8334 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 ";
8335 static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8336 PyObject *__pyx_r = 0;
8337 __Pyx_RefNannyDeclarations
8338 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
8339 __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8340 __Pyx_RefNannyFinishContext();
8352 static PyObject *__pyx_pf_8PyClical_8clifford_66even(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8353 PyObject *__pyx_r = NULL;
8354 __Pyx_RefNannyDeclarations
8355 PyObject *__pyx_t_1 = NULL;
8356 PyObject *__pyx_t_2 = NULL;
8357 int __pyx_lineno = 0;
8358 const char *__pyx_filename = NULL;
8359 int __pyx_clineno = 0;
8360 __Pyx_RefNannySetupContext(
"even", 0);
8369 __Pyx_XDECREF(__pyx_r);
8370 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8371 __Pyx_GOTREF(__pyx_t_1);
8372 __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;}
8373 __Pyx_GOTREF(__pyx_t_2);
8374 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8375 __pyx_r = __pyx_t_2;
8379 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8382 __Pyx_XDECREF(__pyx_t_1);
8383 __Pyx_XDECREF(__pyx_t_2);
8384 __Pyx_AddTraceback(
"PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
8387 __Pyx_XGIVEREF(__pyx_r);
8388 __Pyx_RefNannyFinishContext();
8393 static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8394 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 ";
8395 static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8396 PyObject *__pyx_r = 0;
8397 __Pyx_RefNannyDeclarations
8398 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
8399 __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8400 __Pyx_RefNannyFinishContext();
8412 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8413 PyObject *__pyx_r = NULL;
8414 __Pyx_RefNannyDeclarations
8415 PyObject *__pyx_t_1 = NULL;
8416 PyObject *__pyx_t_2 = NULL;
8417 int __pyx_lineno = 0;
8418 const char *__pyx_filename = NULL;
8419 int __pyx_clineno = 0;
8420 __Pyx_RefNannySetupContext(
"odd", 0);
8429 __Pyx_XDECREF(__pyx_r);
8430 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8431 __Pyx_GOTREF(__pyx_t_1);
8432 __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;}
8433 __Pyx_GOTREF(__pyx_t_2);
8434 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8435 __pyx_r = __pyx_t_2;
8439 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8442 __Pyx_XDECREF(__pyx_t_1);
8443 __Pyx_XDECREF(__pyx_t_2);
8444 __Pyx_AddTraceback(
"PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
8447 __Pyx_XGIVEREF(__pyx_r);
8448 __Pyx_RefNannyFinishContext();
8453 static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8454 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 ";
8455 static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8456 PyObject *__pyx_v_frm = 0;
8457 int __pyx_lineno = 0;
8458 const char *__pyx_filename = NULL;
8459 int __pyx_clineno = 0;
8460 PyObject *__pyx_r = 0;
8461 __Pyx_RefNannyDeclarations
8462 __Pyx_RefNannySetupContext(
"vector_part (wrapper)", 0);
8464 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__frm,0};
8465 PyObject* values[1] = {0};
8474 values[0] = ((PyObject *)Py_None);
8475 if (unlikely(__pyx_kwds)) {
8477 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8479 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8481 default:
goto __pyx_L5_argtuple_error;
8483 kw_args = PyDict_Size(__pyx_kwds);
8487 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__frm);
8488 if (value) { values[0] = value; kw_args--; }
8491 if (unlikely(kw_args > 0)) {
8492 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;}
8495 switch (PyTuple_GET_SIZE(__pyx_args)) {
8496 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8498 default:
goto __pyx_L5_argtuple_error;
8501 __pyx_v_frm = values[0];
8503 goto __pyx_L4_argument_unpacking_done;
8504 __pyx_L5_argtuple_error:;
8505 __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;}
8507 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
8508 __Pyx_RefNannyFinishContext();
8510 __pyx_L4_argument_unpacking_done:;
8511 __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
8512 __Pyx_RefNannyFinishContext();
8516 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
8517 PyObject *__pyx_v_error_msg_prefix = NULL;
8518 std::vector<scalar_t> __pyx_v_vec;
8521 PyObject *__pyx_v_lst = NULL;
8522 PyObject *__pyx_v_err = NULL;
8523 PyObject *__pyx_r = NULL;
8524 __Pyx_RefNannyDeclarations
8525 PyObject *__pyx_t_1 = NULL;
8526 PyObject *__pyx_t_2 = NULL;
8527 PyObject *__pyx_t_3 = NULL;
8530 std::vector<scalar_t> __pyx_t_6;
8531 PyObject *__pyx_t_7 = NULL;
8532 PyObject *__pyx_t_8 = NULL;
8535 PyObject *__pyx_t_11 = NULL;
8536 PyObject *__pyx_t_12 = NULL;
8537 PyObject *__pyx_t_13 = NULL;
8538 PyObject *__pyx_t_14 = NULL;
8539 int __pyx_lineno = 0;
8540 const char *__pyx_filename = NULL;
8541 int __pyx_clineno = 0;
8542 __Pyx_RefNannySetupContext(
"vector_part", 0);
8551 __Pyx_INCREF(((PyObject *)__pyx_kp_s_21));
8552 __pyx_v_error_msg_prefix = ((PyObject *)__pyx_kp_s_21);
8562 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
8563 __Pyx_XGOTREF(__pyx_t_1);
8564 __Pyx_XGOTREF(__pyx_t_2);
8565 __Pyx_XGOTREF(__pyx_t_3);
8575 __pyx_t_4 = (__pyx_v_frm == Py_None);
8576 __pyx_t_5 = (__pyx_t_4 != 0);
8586 __pyx_v_vec = __pyx_v_self->instance->vector_part();
8599 __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((
struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
8601 __Pyx_CppExn2PyErr();
8602 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
8604 __pyx_v_vec = __pyx_t_6;
8615 __pyx_v_n = __pyx_v_vec.size();
8624 __pyx_t_7 =
PyFloat_FromDouble(0.0);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
8625 __Pyx_GOTREF(__pyx_t_7);
8626 __pyx_t_8 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n));
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
8627 __Pyx_GOTREF(__pyx_t_8);
8628 { Py_ssize_t __pyx_temp;
8629 for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
8630 __Pyx_INCREF(__pyx_t_7);
8631 PyList_SET_ITEM(__pyx_t_8, __pyx_temp, __pyx_t_7);
8632 __Pyx_GIVEREF(__pyx_t_7);
8635 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8636 __pyx_v_lst = ((PyObject*)__pyx_t_8);
8646 __pyx_t_9 = __pyx_v_n;
8647 for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
8648 __pyx_v_i = __pyx_t_10;
8657 __pyx_t_8 =
PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i]));
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
8658 __Pyx_GOTREF(__pyx_t_8);
8659 if (__Pyx_SetItemInt(((PyObject *)__pyx_v_lst), __pyx_v_i, __pyx_t_8,
sizeof(
int), PyInt_FromLong, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
8660 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8670 __Pyx_XDECREF(__pyx_r);
8671 __Pyx_INCREF(((PyObject *)__pyx_v_lst));
8672 __pyx_r = ((PyObject *)__pyx_v_lst);
8673 goto __pyx_L7_try_return;
8675 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8676 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8677 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
8678 goto __pyx_L10_try_end;
8679 __pyx_L7_try_return:;
8680 __Pyx_XGIVEREF(__pyx_t_1);
8681 __Pyx_XGIVEREF(__pyx_t_2);
8682 __Pyx_XGIVEREF(__pyx_t_3);
8683 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
8686 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8687 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
8696 __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
8698 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
8699 if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
8700 __Pyx_GOTREF(__pyx_t_8);
8701 __Pyx_GOTREF(__pyx_t_7);
8702 __Pyx_GOTREF(__pyx_t_11);
8703 __Pyx_INCREF(__pyx_t_7);
8704 __pyx_v_err = __pyx_t_7;
8713 __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;}
8714 __Pyx_GOTREF(__pyx_t_12);
8715 __Pyx_INCREF(((PyObject *)__pyx_v_self));
8716 PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
8717 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
8718 __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__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;}
8719 __Pyx_GOTREF(__pyx_t_13);
8720 __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
8721 __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;}
8722 __Pyx_GOTREF(__pyx_t_12);
8723 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8724 __pyx_t_13 = PyNumber_Add(__pyx_t_12, ((PyObject *)__pyx_kp_s_22));
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
8725 __Pyx_GOTREF(__pyx_t_13);
8726 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8735 __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;}
8736 __Pyx_GOTREF(__pyx_t_12);
8737 __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;}
8738 __Pyx_GOTREF(__pyx_t_14);
8739 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8740 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8741 __pyx_t_12 = PyNumber_Add(__pyx_t_14, ((PyObject *)__pyx_kp_s_23));
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
8742 __Pyx_GOTREF(__pyx_t_12);
8743 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8752 __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;}
8753 __Pyx_GOTREF(__pyx_t_14);
8754 __Pyx_INCREF(__pyx_v_err);
8755 PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_err);
8756 __Pyx_GIVEREF(__pyx_v_err);
8757 __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__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;}
8758 __Pyx_GOTREF(__pyx_t_13);
8759 __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
8760 __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;}
8761 __Pyx_GOTREF(__pyx_t_14);
8762 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8763 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8764 __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;}
8765 __Pyx_GOTREF(__pyx_t_13);
8766 PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
8767 __Pyx_GIVEREF(__pyx_t_14);
8769 __pyx_t_14 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__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;}
8770 __Pyx_GOTREF(__pyx_t_14);
8771 __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
8772 __Pyx_Raise(__pyx_t_14, 0, 0, 0);
8773 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8774 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
8775 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8776 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8777 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
8778 goto __pyx_L4_exception_handled;
8780 __pyx_L5_except_error:;
8781 __Pyx_XGIVEREF(__pyx_t_1);
8782 __Pyx_XGIVEREF(__pyx_t_2);
8783 __Pyx_XGIVEREF(__pyx_t_3);
8784 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
8785 goto __pyx_L1_error;
8786 __pyx_L4_exception_handled:;
8787 __Pyx_XGIVEREF(__pyx_t_1);
8788 __Pyx_XGIVEREF(__pyx_t_2);
8789 __Pyx_XGIVEREF(__pyx_t_3);
8790 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
8794 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8797 __Pyx_XDECREF(__pyx_t_7);
8798 __Pyx_XDECREF(__pyx_t_8);
8799 __Pyx_XDECREF(__pyx_t_11);
8800 __Pyx_XDECREF(__pyx_t_12);
8801 __Pyx_XDECREF(__pyx_t_13);
8802 __Pyx_XDECREF(__pyx_t_14);
8803 __Pyx_AddTraceback(
"PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
8806 __Pyx_XDECREF(__pyx_v_error_msg_prefix);
8807 __Pyx_XDECREF(__pyx_v_lst);
8808 __Pyx_XDECREF(__pyx_v_err);
8809 __Pyx_XGIVEREF(__pyx_r);
8810 __Pyx_RefNannyFinishContext();
8815 static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8816 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 ";
8817 static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8818 PyObject *__pyx_r = 0;
8819 __Pyx_RefNannyDeclarations
8820 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
8821 __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8822 __Pyx_RefNannyFinishContext();
8834 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8835 PyObject *__pyx_r = NULL;
8836 __Pyx_RefNannyDeclarations
8837 PyObject *__pyx_t_1 = NULL;
8838 PyObject *__pyx_t_2 = NULL;
8839 int __pyx_lineno = 0;
8840 const char *__pyx_filename = NULL;
8841 int __pyx_clineno = 0;
8842 __Pyx_RefNannySetupContext(
"involute", 0);
8851 __Pyx_XDECREF(__pyx_r);
8852 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8853 __Pyx_GOTREF(__pyx_t_1);
8854 __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;}
8855 __Pyx_GOTREF(__pyx_t_2);
8856 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8857 __pyx_r = __pyx_t_2;
8861 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8864 __Pyx_XDECREF(__pyx_t_1);
8865 __Pyx_XDECREF(__pyx_t_2);
8866 __Pyx_AddTraceback(
"PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
8869 __Pyx_XGIVEREF(__pyx_r);
8870 __Pyx_RefNannyFinishContext();
8875 static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8876 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 ";
8877 static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8878 PyObject *__pyx_r = 0;
8879 __Pyx_RefNannyDeclarations
8880 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
8881 __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8882 __Pyx_RefNannyFinishContext();
8894 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8895 PyObject *__pyx_r = NULL;
8896 __Pyx_RefNannyDeclarations
8897 PyObject *__pyx_t_1 = NULL;
8898 PyObject *__pyx_t_2 = NULL;
8899 int __pyx_lineno = 0;
8900 const char *__pyx_filename = NULL;
8901 int __pyx_clineno = 0;
8902 __Pyx_RefNannySetupContext(
"reverse", 0);
8911 __Pyx_XDECREF(__pyx_r);
8912 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8913 __Pyx_GOTREF(__pyx_t_1);
8914 __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;}
8915 __Pyx_GOTREF(__pyx_t_2);
8916 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8917 __pyx_r = __pyx_t_2;
8921 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8924 __Pyx_XDECREF(__pyx_t_1);
8925 __Pyx_XDECREF(__pyx_t_2);
8926 __Pyx_AddTraceback(
"PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
8929 __Pyx_XGIVEREF(__pyx_r);
8930 __Pyx_RefNannyFinishContext();
8935 static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8936 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 ";
8937 static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8938 PyObject *__pyx_r = 0;
8939 __Pyx_RefNannyDeclarations
8940 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
8941 __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8942 __Pyx_RefNannyFinishContext();
8954 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8955 PyObject *__pyx_r = NULL;
8956 __Pyx_RefNannyDeclarations
8957 PyObject *__pyx_t_1 = NULL;
8958 PyObject *__pyx_t_2 = NULL;
8959 int __pyx_lineno = 0;
8960 const char *__pyx_filename = NULL;
8961 int __pyx_clineno = 0;
8962 __Pyx_RefNannySetupContext(
"conj", 0);
8971 __Pyx_XDECREF(__pyx_r);
8972 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
8973 __Pyx_GOTREF(__pyx_t_1);
8974 __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;}
8975 __Pyx_GOTREF(__pyx_t_2);
8976 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8977 __pyx_r = __pyx_t_2;
8981 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8984 __Pyx_XDECREF(__pyx_t_1);
8985 __Pyx_XDECREF(__pyx_t_2);
8986 __Pyx_AddTraceback(
"PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
8989 __Pyx_XGIVEREF(__pyx_r);
8990 __Pyx_RefNannyFinishContext();
8995 static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
8996 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 ";
8997 static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8998 PyObject *__pyx_r = 0;
8999 __Pyx_RefNannyDeclarations
9000 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
9001 __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9002 __Pyx_RefNannyFinishContext();
9014 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9015 PyObject *__pyx_r = NULL;
9016 __Pyx_RefNannyDeclarations
9017 PyObject *__pyx_t_1 = NULL;
9018 int __pyx_lineno = 0;
9019 const char *__pyx_filename = NULL;
9020 int __pyx_clineno = 0;
9021 __Pyx_RefNannySetupContext(
"quad", 0);
9030 __Pyx_XDECREF(__pyx_r);
9031 __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;}
9032 __Pyx_GOTREF(__pyx_t_1);
9033 __pyx_r = __pyx_t_1;
9037 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9040 __Pyx_XDECREF(__pyx_t_1);
9041 __Pyx_AddTraceback(
"PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
9044 __Pyx_XGIVEREF(__pyx_r);
9045 __Pyx_RefNannyFinishContext();
9050 static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9051 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 ";
9052 static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9053 PyObject *__pyx_r = 0;
9054 __Pyx_RefNannyDeclarations
9055 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
9056 __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9057 __Pyx_RefNannyFinishContext();
9069 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9070 PyObject *__pyx_r = NULL;
9071 __Pyx_RefNannyDeclarations
9072 PyObject *__pyx_t_1 = NULL;
9073 int __pyx_lineno = 0;
9074 const char *__pyx_filename = NULL;
9075 int __pyx_clineno = 0;
9076 __Pyx_RefNannySetupContext(
"norm", 0);
9085 __Pyx_XDECREF(__pyx_r);
9086 __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;}
9087 __Pyx_GOTREF(__pyx_t_1);
9088 __pyx_r = __pyx_t_1;
9092 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9095 __Pyx_XDECREF(__pyx_t_1);
9096 __Pyx_AddTraceback(
"PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
9099 __Pyx_XGIVEREF(__pyx_r);
9100 __Pyx_RefNannyFinishContext();
9105 static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9106 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 ";
9107 static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9108 PyObject *__pyx_r = 0;
9109 __Pyx_RefNannyDeclarations
9110 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
9111 __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9112 __Pyx_RefNannyFinishContext();
9124 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9125 PyObject *__pyx_r = NULL;
9126 __Pyx_RefNannyDeclarations
9127 PyObject *__pyx_t_1 = NULL;
9128 int __pyx_lineno = 0;
9129 const char *__pyx_filename = NULL;
9130 int __pyx_clineno = 0;
9131 __Pyx_RefNannySetupContext(
"abs", 0);
9140 __Pyx_XDECREF(__pyx_r);
9141 __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;}
9142 __Pyx_GOTREF(__pyx_t_1);
9143 __pyx_r = __pyx_t_1;
9147 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9150 __Pyx_XDECREF(__pyx_t_1);
9151 __Pyx_AddTraceback(
"PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
9154 __Pyx_XGIVEREF(__pyx_r);
9155 __Pyx_RefNannyFinishContext();
9160 static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9161 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 ";
9162 static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9163 PyObject *__pyx_r = 0;
9164 __Pyx_RefNannyDeclarations
9165 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
9166 __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9167 __Pyx_RefNannyFinishContext();
9179 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9180 PyObject *__pyx_r = NULL;
9181 __Pyx_RefNannyDeclarations
9182 PyObject *__pyx_t_1 = NULL;
9183 int __pyx_lineno = 0;
9184 const char *__pyx_filename = NULL;
9185 int __pyx_clineno = 0;
9186 __Pyx_RefNannySetupContext(
"max_abs", 0);
9195 __Pyx_XDECREF(__pyx_r);
9196 __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;}
9197 __Pyx_GOTREF(__pyx_t_1);
9198 __pyx_r = __pyx_t_1;
9202 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9205 __Pyx_XDECREF(__pyx_t_1);
9206 __Pyx_AddTraceback(
"PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
9209 __Pyx_XGIVEREF(__pyx_r);
9210 __Pyx_RefNannyFinishContext();
9215 static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit);
9216 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 ";
9217 static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
9218 PyObject *__pyx_r = 0;
9219 __Pyx_RefNannyDeclarations
9220 __Pyx_RefNannySetupContext(
"truncated (wrapper)", 0);
9221 __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
9222 __Pyx_RefNannyFinishContext();
9234 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
9235 PyObject *__pyx_r = NULL;
9236 __Pyx_RefNannyDeclarations
9237 PyObject *__pyx_t_1 = NULL;
9239 PyObject *__pyx_t_3 = NULL;
9240 int __pyx_lineno = 0;
9241 const char *__pyx_filename = NULL;
9242 int __pyx_clineno = 0;
9243 __Pyx_RefNannySetupContext(
"truncated", 0);
9252 __Pyx_XDECREF(__pyx_r);
9253 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9254 __Pyx_GOTREF(__pyx_t_1);
9255 __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;}
9256 __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;}
9257 __Pyx_GOTREF(__pyx_t_3);
9258 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9259 __pyx_r = __pyx_t_3;
9263 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9266 __Pyx_XDECREF(__pyx_t_1);
9267 __Pyx_XDECREF(__pyx_t_3);
9268 __Pyx_AddTraceback(
"PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
9271 __Pyx_XGIVEREF(__pyx_r);
9272 __Pyx_RefNannyFinishContext();
9277 static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9278 static char __pyx_doc_8PyClical_8clifford_88isnan[] =
"\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
9279 static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9280 PyObject *__pyx_r = 0;
9281 __Pyx_RefNannyDeclarations
9282 __Pyx_RefNannySetupContext(
"isnan (wrapper)", 0);
9283 __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9284 __Pyx_RefNannyFinishContext();
9296 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9297 PyObject *__pyx_r = NULL;
9298 __Pyx_RefNannyDeclarations
9299 PyObject *__pyx_t_1 = NULL;
9300 int __pyx_lineno = 0;
9301 const char *__pyx_filename = NULL;
9302 int __pyx_clineno = 0;
9303 __Pyx_RefNannySetupContext(
"isnan", 0);
9312 __Pyx_XDECREF(__pyx_r);
9313 __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;}
9314 __Pyx_GOTREF(__pyx_t_1);
9315 __pyx_r = __pyx_t_1;
9319 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9322 __Pyx_XDECREF(__pyx_t_1);
9323 __Pyx_AddTraceback(
"PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
9326 __Pyx_XGIVEREF(__pyx_r);
9327 __Pyx_RefNannyFinishContext();
9332 static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
9333 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 ";
9334 static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9335 PyObject *__pyx_r = 0;
9336 __Pyx_RefNannyDeclarations
9337 __Pyx_RefNannySetupContext(
"frame (wrapper)", 0);
9338 __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9339 __Pyx_RefNannyFinishContext();
9351 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9352 PyObject *__pyx_r = NULL;
9353 __Pyx_RefNannyDeclarations
9354 PyObject *__pyx_t_1 = NULL;
9355 PyObject *__pyx_t_2 = NULL;
9356 int __pyx_lineno = 0;
9357 const char *__pyx_filename = NULL;
9358 int __pyx_clineno = 0;
9359 __Pyx_RefNannySetupContext(
"frame", 0);
9368 __Pyx_XDECREF(__pyx_r);
9369 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9370 __Pyx_GOTREF(__pyx_t_1);
9371 __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;}
9372 __Pyx_GOTREF(__pyx_t_2);
9373 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9374 __pyx_r = __pyx_t_2;
9378 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9381 __Pyx_XDECREF(__pyx_t_1);
9382 __Pyx_XDECREF(__pyx_t_2);
9383 __Pyx_AddTraceback(
"PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
9386 __Pyx_XGIVEREF(__pyx_r);
9387 __Pyx_RefNannyFinishContext();
9392 static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self);
9393 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 ";
9394 #if CYTHON_COMPILING_IN_CPYTHON
9395 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
9397 static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
9398 PyObject *__pyx_r = 0;
9399 __Pyx_RefNannyDeclarations
9400 __Pyx_RefNannySetupContext(
"__repr__ (wrapper)", 0);
9401 __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9402 __Pyx_RefNannyFinishContext();
9414 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9415 PyObject *__pyx_r = NULL;
9416 __Pyx_RefNannyDeclarations
9417 PyObject *__pyx_t_1 = NULL;
9418 int __pyx_lineno = 0;
9419 const char *__pyx_filename = NULL;
9420 int __pyx_clineno = 0;
9421 __Pyx_RefNannySetupContext(
"__repr__", 0);
9430 __Pyx_XDECREF(__pyx_r);
9431 __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;}
9432 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
9433 __pyx_r = ((PyObject *)__pyx_t_1);
9437 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9440 __Pyx_XDECREF(__pyx_t_1);
9441 __Pyx_AddTraceback(
"PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9444 __Pyx_XGIVEREF(__pyx_r);
9445 __Pyx_RefNannyFinishContext();
9450 static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self);
9451 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 ";
9452 #if CYTHON_COMPILING_IN_CPYTHON
9453 struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
9455 static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
9456 PyObject *__pyx_r = 0;
9457 __Pyx_RefNannyDeclarations
9458 __Pyx_RefNannySetupContext(
"__str__ (wrapper)", 0);
9459 __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((
struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9460 __Pyx_RefNannyFinishContext();
9472 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(
struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9473 PyObject *__pyx_r = NULL;
9474 __Pyx_RefNannyDeclarations
9475 PyObject *__pyx_t_1 = NULL;
9476 int __pyx_lineno = 0;
9477 const char *__pyx_filename = NULL;
9478 int __pyx_clineno = 0;
9479 __Pyx_RefNannySetupContext(
"__str__", 0);
9488 __Pyx_XDECREF(__pyx_r);
9489 __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;}
9490 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
9491 __pyx_r = ((PyObject *)__pyx_t_1);
9495 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9498 __Pyx_XDECREF(__pyx_t_1);
9499 __Pyx_AddTraceback(
"PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9502 __Pyx_XGIVEREF(__pyx_r);
9503 __Pyx_RefNannyFinishContext();
9508 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
9509 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 ";
9510 static PyMethodDef __pyx_mdef_8PyClical_9clifford_hidden_doctests = {__Pyx_NAMESTR(
"clifford_hidden_doctests"), (PyCFunction)__pyx_pw_8PyClical_9clifford_hidden_doctests, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_hidden_doctests)};
9511 static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
9512 PyObject *__pyx_r = 0;
9513 __Pyx_RefNannyDeclarations
9514 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests (wrapper)", 0);
9515 __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
9516 __Pyx_RefNannyFinishContext();
9528 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
9529 PyObject *__pyx_r = NULL;
9530 __Pyx_RefNannyDeclarations
9531 __Pyx_RefNannySetupContext(
"clifford_hidden_doctests", 0);
9540 __Pyx_XDECREF(__pyx_r);
9541 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9544 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9546 __Pyx_XGIVEREF(__pyx_r);
9547 __Pyx_RefNannyFinishContext();
9559 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj);
9560 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
9561 PyObject *__pyx_r = NULL;
9562 __Pyx_RefNannyDeclarations
9563 PyObject *__pyx_t_1 = NULL;
9564 PyObject *__pyx_t_2 = NULL;
9565 int __pyx_lineno = 0;
9566 const char *__pyx_filename = NULL;
9567 int __pyx_clineno = 0;
9568 __Pyx_RefNannySetupContext(
"inv", 0);
9577 __Pyx_XDECREF(__pyx_r);
9578 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9579 __Pyx_GOTREF(__pyx_t_1);
9580 __Pyx_INCREF(__pyx_v_obj);
9581 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
9582 __Pyx_GIVEREF(__pyx_v_obj);
9583 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9584 __Pyx_GOTREF(__pyx_t_2);
9585 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9586 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__inv);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9587 __Pyx_GOTREF(__pyx_t_1);
9588 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9589 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9590 __Pyx_GOTREF(__pyx_t_2);
9591 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9592 __pyx_r = __pyx_t_2;
9596 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9599 __Pyx_XDECREF(__pyx_t_1);
9600 __Pyx_XDECREF(__pyx_t_2);
9601 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9604 __Pyx_XGIVEREF(__pyx_r);
9605 __Pyx_RefNannyFinishContext();
9610 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj);
9611 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 ";
9612 static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
9613 PyObject *__pyx_r = 0;
9614 __Pyx_RefNannyDeclarations
9615 __Pyx_RefNannySetupContext(
"inv (wrapper)", 0);
9616 __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
9617 __Pyx_RefNannyFinishContext();
9629 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
9630 PyObject *__pyx_r = NULL;
9631 __Pyx_RefNannyDeclarations
9632 PyObject *__pyx_t_1 = NULL;
9633 int __pyx_lineno = 0;
9634 const char *__pyx_filename = NULL;
9635 int __pyx_clineno = 0;
9636 __Pyx_RefNannySetupContext(
"inv", 0);
9637 __Pyx_XDECREF(__pyx_r);
9638 __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;}
9639 __Pyx_GOTREF(__pyx_t_1);
9640 __pyx_r = __pyx_t_1;
9644 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9647 __Pyx_XDECREF(__pyx_t_1);
9648 __Pyx_AddTraceback(
"PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9651 __Pyx_XGIVEREF(__pyx_r);
9652 __Pyx_RefNannyFinishContext();
9664 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj);
9665 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
9666 PyObject *__pyx_r = NULL;
9667 __Pyx_RefNannyDeclarations
9668 PyObject *__pyx_t_1 = NULL;
9669 PyObject *__pyx_t_2 = NULL;
9670 int __pyx_lineno = 0;
9671 const char *__pyx_filename = NULL;
9672 int __pyx_clineno = 0;
9673 __Pyx_RefNannySetupContext(
"scalar", 0);
9682 __Pyx_XDECREF(__pyx_r);
9683 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9684 __Pyx_GOTREF(__pyx_t_1);
9685 __Pyx_INCREF(__pyx_v_obj);
9686 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
9687 __Pyx_GIVEREF(__pyx_v_obj);
9688 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9689 __Pyx_GOTREF(__pyx_t_2);
9690 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9691 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__scalar);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9692 __Pyx_GOTREF(__pyx_t_1);
9693 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9694 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9695 __Pyx_GOTREF(__pyx_t_2);
9696 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9697 __pyx_r = __pyx_t_2;
9701 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9704 __Pyx_XDECREF(__pyx_t_1);
9705 __Pyx_XDECREF(__pyx_t_2);
9706 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9709 __Pyx_XGIVEREF(__pyx_r);
9710 __Pyx_RefNannyFinishContext();
9715 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj);
9716 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 ";
9717 static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
9718 PyObject *__pyx_r = 0;
9719 __Pyx_RefNannyDeclarations
9720 __Pyx_RefNannySetupContext(
"scalar (wrapper)", 0);
9721 __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
9722 __Pyx_RefNannyFinishContext();
9734 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
9735 PyObject *__pyx_r = NULL;
9736 __Pyx_RefNannyDeclarations
9737 PyObject *__pyx_t_1 = NULL;
9738 int __pyx_lineno = 0;
9739 const char *__pyx_filename = NULL;
9740 int __pyx_clineno = 0;
9741 __Pyx_RefNannySetupContext(
"scalar", 0);
9742 __Pyx_XDECREF(__pyx_r);
9743 __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;}
9744 __Pyx_GOTREF(__pyx_t_1);
9745 __pyx_r = __pyx_t_1;
9749 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9752 __Pyx_XDECREF(__pyx_t_1);
9753 __Pyx_AddTraceback(
"PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9756 __Pyx_XGIVEREF(__pyx_r);
9757 __Pyx_RefNannyFinishContext();
9769 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj);
9770 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
9771 PyObject *__pyx_r = NULL;
9772 __Pyx_RefNannyDeclarations
9773 PyObject *__pyx_t_1 = NULL;
9774 PyObject *__pyx_t_2 = NULL;
9775 int __pyx_lineno = 0;
9776 const char *__pyx_filename = NULL;
9777 int __pyx_clineno = 0;
9778 __Pyx_RefNannySetupContext(
"real", 0);
9787 __Pyx_XDECREF(__pyx_r);
9788 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9789 __Pyx_GOTREF(__pyx_t_1);
9790 __Pyx_INCREF(__pyx_v_obj);
9791 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
9792 __Pyx_GIVEREF(__pyx_v_obj);
9793 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9794 __Pyx_GOTREF(__pyx_t_2);
9795 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9796 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__scalar);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9797 __Pyx_GOTREF(__pyx_t_1);
9798 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9799 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9800 __Pyx_GOTREF(__pyx_t_2);
9801 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9802 __pyx_r = __pyx_t_2;
9806 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9809 __Pyx_XDECREF(__pyx_t_1);
9810 __Pyx_XDECREF(__pyx_t_2);
9811 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
9814 __Pyx_XGIVEREF(__pyx_r);
9815 __Pyx_RefNannyFinishContext();
9820 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj);
9821 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 ";
9822 static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
9823 PyObject *__pyx_r = 0;
9824 __Pyx_RefNannyDeclarations
9825 __Pyx_RefNannySetupContext(
"real (wrapper)", 0);
9826 __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
9827 __Pyx_RefNannyFinishContext();
9839 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
9840 PyObject *__pyx_r = NULL;
9841 __Pyx_RefNannyDeclarations
9842 PyObject *__pyx_t_1 = NULL;
9843 int __pyx_lineno = 0;
9844 const char *__pyx_filename = NULL;
9845 int __pyx_clineno = 0;
9846 __Pyx_RefNannySetupContext(
"real", 0);
9847 __Pyx_XDECREF(__pyx_r);
9848 __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;}
9849 __Pyx_GOTREF(__pyx_t_1);
9850 __pyx_r = __pyx_t_1;
9854 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9857 __Pyx_XDECREF(__pyx_t_1);
9858 __Pyx_AddTraceback(
"PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
9861 __Pyx_XGIVEREF(__pyx_r);
9862 __Pyx_RefNannyFinishContext();
9874 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj);
9875 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
9876 PyObject *__pyx_r = NULL;
9877 __Pyx_RefNannyDeclarations
9878 PyObject *__pyx_t_1 = NULL;
9879 int __pyx_lineno = 0;
9880 const char *__pyx_filename = NULL;
9881 int __pyx_clineno = 0;
9882 __Pyx_RefNannySetupContext(
"imag", 0);
9891 __Pyx_XDECREF(__pyx_r);
9892 __pyx_t_1 =
PyFloat_FromDouble(0.0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9893 __Pyx_GOTREF(__pyx_t_1);
9894 __pyx_r = __pyx_t_1;
9898 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9901 __Pyx_XDECREF(__pyx_t_1);
9902 __Pyx_AddTraceback(
"PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
9905 __Pyx_XGIVEREF(__pyx_r);
9906 __Pyx_RefNannyFinishContext();
9911 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj);
9912 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 ";
9913 static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
9914 PyObject *__pyx_r = 0;
9915 __Pyx_RefNannyDeclarations
9916 __Pyx_RefNannySetupContext(
"imag (wrapper)", 0);
9917 __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
9918 __Pyx_RefNannyFinishContext();
9930 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
9931 PyObject *__pyx_r = NULL;
9932 __Pyx_RefNannyDeclarations
9933 PyObject *__pyx_t_1 = NULL;
9934 int __pyx_lineno = 0;
9935 const char *__pyx_filename = NULL;
9936 int __pyx_clineno = 0;
9937 __Pyx_RefNannySetupContext(
"imag", 0);
9938 __Pyx_XDECREF(__pyx_r);
9939 __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;}
9940 __Pyx_GOTREF(__pyx_t_1);
9941 __pyx_r = __pyx_t_1;
9945 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9948 __Pyx_XDECREF(__pyx_t_1);
9949 __Pyx_AddTraceback(
"PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
9952 __Pyx_XGIVEREF(__pyx_r);
9953 __Pyx_RefNannyFinishContext();
9965 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj);
9966 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
9967 PyObject *__pyx_r = NULL;
9968 __Pyx_RefNannyDeclarations
9969 PyObject *__pyx_t_1 = NULL;
9970 PyObject *__pyx_t_2 = NULL;
9971 int __pyx_lineno = 0;
9972 const char *__pyx_filename = NULL;
9973 int __pyx_clineno = 0;
9974 __Pyx_RefNannySetupContext(
"pure", 0);
9983 __Pyx_XDECREF(__pyx_r);
9984 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9985 __Pyx_GOTREF(__pyx_t_1);
9986 __Pyx_INCREF(__pyx_v_obj);
9987 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
9988 __Pyx_GIVEREF(__pyx_v_obj);
9989 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9990 __Pyx_GOTREF(__pyx_t_2);
9991 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9992 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__pure);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9993 __Pyx_GOTREF(__pyx_t_1);
9994 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9995 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
9996 __Pyx_GOTREF(__pyx_t_2);
9997 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9998 __pyx_r = __pyx_t_2;
10002 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10005 __Pyx_XDECREF(__pyx_t_1);
10006 __Pyx_XDECREF(__pyx_t_2);
10007 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10010 __Pyx_XGIVEREF(__pyx_r);
10011 __Pyx_RefNannyFinishContext();
10016 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10017 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 ";
10018 static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10019 PyObject *__pyx_r = 0;
10020 __Pyx_RefNannyDeclarations
10021 __Pyx_RefNannySetupContext(
"pure (wrapper)", 0);
10022 __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
10023 __Pyx_RefNannyFinishContext();
10035 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10036 PyObject *__pyx_r = NULL;
10037 __Pyx_RefNannyDeclarations
10038 PyObject *__pyx_t_1 = NULL;
10039 int __pyx_lineno = 0;
10040 const char *__pyx_filename = NULL;
10041 int __pyx_clineno = 0;
10042 __Pyx_RefNannySetupContext(
"pure", 0);
10043 __Pyx_XDECREF(__pyx_r);
10044 __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;}
10045 __Pyx_GOTREF(__pyx_t_1);
10046 __pyx_r = __pyx_t_1;
10050 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10053 __Pyx_XDECREF(__pyx_t_1);
10054 __Pyx_AddTraceback(
"PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10057 __Pyx_XGIVEREF(__pyx_r);
10058 __Pyx_RefNannyFinishContext();
10070 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10071 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10072 PyObject *__pyx_r = NULL;
10073 __Pyx_RefNannyDeclarations
10074 PyObject *__pyx_t_1 = NULL;
10075 PyObject *__pyx_t_2 = NULL;
10076 int __pyx_lineno = 0;
10077 const char *__pyx_filename = NULL;
10078 int __pyx_clineno = 0;
10079 __Pyx_RefNannySetupContext(
"even", 0);
10088 __Pyx_XDECREF(__pyx_r);
10089 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10090 __Pyx_GOTREF(__pyx_t_1);
10091 __Pyx_INCREF(__pyx_v_obj);
10092 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
10093 __Pyx_GIVEREF(__pyx_v_obj);
10094 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10095 __Pyx_GOTREF(__pyx_t_2);
10096 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
10097 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__even);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10098 __Pyx_GOTREF(__pyx_t_1);
10099 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10100 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10101 __Pyx_GOTREF(__pyx_t_2);
10102 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10103 __pyx_r = __pyx_t_2;
10107 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10110 __Pyx_XDECREF(__pyx_t_1);
10111 __Pyx_XDECREF(__pyx_t_2);
10112 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10115 __Pyx_XGIVEREF(__pyx_r);
10116 __Pyx_RefNannyFinishContext();
10121 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10122 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 ";
10123 static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10124 PyObject *__pyx_r = 0;
10125 __Pyx_RefNannyDeclarations
10126 __Pyx_RefNannySetupContext(
"even (wrapper)", 0);
10127 __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
10128 __Pyx_RefNannyFinishContext();
10140 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10141 PyObject *__pyx_r = NULL;
10142 __Pyx_RefNannyDeclarations
10143 PyObject *__pyx_t_1 = NULL;
10144 int __pyx_lineno = 0;
10145 const char *__pyx_filename = NULL;
10146 int __pyx_clineno = 0;
10147 __Pyx_RefNannySetupContext(
"even", 0);
10148 __Pyx_XDECREF(__pyx_r);
10149 __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;}
10150 __Pyx_GOTREF(__pyx_t_1);
10151 __pyx_r = __pyx_t_1;
10155 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10158 __Pyx_XDECREF(__pyx_t_1);
10159 __Pyx_AddTraceback(
"PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10162 __Pyx_XGIVEREF(__pyx_r);
10163 __Pyx_RefNannyFinishContext();
10175 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10176 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10177 PyObject *__pyx_r = NULL;
10178 __Pyx_RefNannyDeclarations
10179 PyObject *__pyx_t_1 = NULL;
10180 PyObject *__pyx_t_2 = NULL;
10181 int __pyx_lineno = 0;
10182 const char *__pyx_filename = NULL;
10183 int __pyx_clineno = 0;
10184 __Pyx_RefNannySetupContext(
"odd", 0);
10193 __Pyx_XDECREF(__pyx_r);
10194 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10195 __Pyx_GOTREF(__pyx_t_1);
10196 __Pyx_INCREF(__pyx_v_obj);
10197 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
10198 __Pyx_GIVEREF(__pyx_v_obj);
10199 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10200 __Pyx_GOTREF(__pyx_t_2);
10201 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
10202 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__odd);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10203 __Pyx_GOTREF(__pyx_t_1);
10204 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10205 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10206 __Pyx_GOTREF(__pyx_t_2);
10207 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10208 __pyx_r = __pyx_t_2;
10212 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10215 __Pyx_XDECREF(__pyx_t_1);
10216 __Pyx_XDECREF(__pyx_t_2);
10217 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
10220 __Pyx_XGIVEREF(__pyx_r);
10221 __Pyx_RefNannyFinishContext();
10226 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10227 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 ";
10228 static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10229 PyObject *__pyx_r = 0;
10230 __Pyx_RefNannyDeclarations
10231 __Pyx_RefNannySetupContext(
"odd (wrapper)", 0);
10232 __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
10233 __Pyx_RefNannyFinishContext();
10245 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10246 PyObject *__pyx_r = NULL;
10247 __Pyx_RefNannyDeclarations
10248 PyObject *__pyx_t_1 = NULL;
10249 int __pyx_lineno = 0;
10250 const char *__pyx_filename = NULL;
10251 int __pyx_clineno = 0;
10252 __Pyx_RefNannySetupContext(
"odd", 0);
10253 __Pyx_XDECREF(__pyx_r);
10254 __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;}
10255 __Pyx_GOTREF(__pyx_t_1);
10256 __pyx_r = __pyx_t_1;
10260 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10263 __Pyx_XDECREF(__pyx_t_1);
10264 __Pyx_AddTraceback(
"PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
10267 __Pyx_XGIVEREF(__pyx_r);
10268 __Pyx_RefNannyFinishContext();
10280 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10281 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10282 PyObject *__pyx_r = NULL;
10283 __Pyx_RefNannyDeclarations
10284 PyObject *__pyx_t_1 = NULL;
10285 PyObject *__pyx_t_2 = NULL;
10286 int __pyx_lineno = 0;
10287 const char *__pyx_filename = NULL;
10288 int __pyx_clineno = 0;
10289 __Pyx_RefNannySetupContext(
"involute", 0);
10298 __Pyx_XDECREF(__pyx_r);
10299 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10300 __Pyx_GOTREF(__pyx_t_1);
10301 __Pyx_INCREF(__pyx_v_obj);
10302 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
10303 __Pyx_GIVEREF(__pyx_v_obj);
10304 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10305 __Pyx_GOTREF(__pyx_t_2);
10306 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
10307 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__involute);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10308 __Pyx_GOTREF(__pyx_t_1);
10309 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10310 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10311 __Pyx_GOTREF(__pyx_t_2);
10312 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10313 __pyx_r = __pyx_t_2;
10317 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10320 __Pyx_XDECREF(__pyx_t_1);
10321 __Pyx_XDECREF(__pyx_t_2);
10322 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10325 __Pyx_XGIVEREF(__pyx_r);
10326 __Pyx_RefNannyFinishContext();
10331 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10332 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 ";
10333 static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10334 PyObject *__pyx_r = 0;
10335 __Pyx_RefNannyDeclarations
10336 __Pyx_RefNannySetupContext(
"involute (wrapper)", 0);
10337 __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
10338 __Pyx_RefNannyFinishContext();
10350 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10351 PyObject *__pyx_r = NULL;
10352 __Pyx_RefNannyDeclarations
10353 PyObject *__pyx_t_1 = NULL;
10354 int __pyx_lineno = 0;
10355 const char *__pyx_filename = NULL;
10356 int __pyx_clineno = 0;
10357 __Pyx_RefNannySetupContext(
"involute", 0);
10358 __Pyx_XDECREF(__pyx_r);
10359 __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;}
10360 __Pyx_GOTREF(__pyx_t_1);
10361 __pyx_r = __pyx_t_1;
10365 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10368 __Pyx_XDECREF(__pyx_t_1);
10369 __Pyx_AddTraceback(
"PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10372 __Pyx_XGIVEREF(__pyx_r);
10373 __Pyx_RefNannyFinishContext();
10385 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10386 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10387 PyObject *__pyx_r = NULL;
10388 __Pyx_RefNannyDeclarations
10389 PyObject *__pyx_t_1 = NULL;
10390 PyObject *__pyx_t_2 = NULL;
10391 int __pyx_lineno = 0;
10392 const char *__pyx_filename = NULL;
10393 int __pyx_clineno = 0;
10394 __Pyx_RefNannySetupContext(
"reverse", 0);
10403 __Pyx_XDECREF(__pyx_r);
10404 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10405 __Pyx_GOTREF(__pyx_t_1);
10406 __Pyx_INCREF(__pyx_v_obj);
10407 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
10408 __Pyx_GIVEREF(__pyx_v_obj);
10409 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10410 __Pyx_GOTREF(__pyx_t_2);
10411 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
10412 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__reverse);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10413 __Pyx_GOTREF(__pyx_t_1);
10414 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10415 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10416 __Pyx_GOTREF(__pyx_t_2);
10417 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10418 __pyx_r = __pyx_t_2;
10422 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10425 __Pyx_XDECREF(__pyx_t_1);
10426 __Pyx_XDECREF(__pyx_t_2);
10427 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10430 __Pyx_XGIVEREF(__pyx_r);
10431 __Pyx_RefNannyFinishContext();
10436 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10437 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 ";
10438 static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10439 PyObject *__pyx_r = 0;
10440 __Pyx_RefNannyDeclarations
10441 __Pyx_RefNannySetupContext(
"reverse (wrapper)", 0);
10442 __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
10443 __Pyx_RefNannyFinishContext();
10455 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10456 PyObject *__pyx_r = NULL;
10457 __Pyx_RefNannyDeclarations
10458 PyObject *__pyx_t_1 = NULL;
10459 int __pyx_lineno = 0;
10460 const char *__pyx_filename = NULL;
10461 int __pyx_clineno = 0;
10462 __Pyx_RefNannySetupContext(
"reverse", 0);
10463 __Pyx_XDECREF(__pyx_r);
10464 __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;}
10465 __Pyx_GOTREF(__pyx_t_1);
10466 __pyx_r = __pyx_t_1;
10470 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10473 __Pyx_XDECREF(__pyx_t_1);
10474 __Pyx_AddTraceback(
"PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10477 __Pyx_XGIVEREF(__pyx_r);
10478 __Pyx_RefNannyFinishContext();
10490 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10491 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10492 PyObject *__pyx_r = NULL;
10493 __Pyx_RefNannyDeclarations
10494 PyObject *__pyx_t_1 = NULL;
10495 PyObject *__pyx_t_2 = NULL;
10496 int __pyx_lineno = 0;
10497 const char *__pyx_filename = NULL;
10498 int __pyx_clineno = 0;
10499 __Pyx_RefNannySetupContext(
"conj", 0);
10508 __Pyx_XDECREF(__pyx_r);
10509 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10510 __Pyx_GOTREF(__pyx_t_1);
10511 __Pyx_INCREF(__pyx_v_obj);
10512 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
10513 __Pyx_GIVEREF(__pyx_v_obj);
10514 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10515 __Pyx_GOTREF(__pyx_t_2);
10516 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
10517 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__conj);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10518 __Pyx_GOTREF(__pyx_t_1);
10519 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10520 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10521 __Pyx_GOTREF(__pyx_t_2);
10522 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10523 __pyx_r = __pyx_t_2;
10527 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10530 __Pyx_XDECREF(__pyx_t_1);
10531 __Pyx_XDECREF(__pyx_t_2);
10532 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10535 __Pyx_XGIVEREF(__pyx_r);
10536 __Pyx_RefNannyFinishContext();
10541 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10542 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 ";
10543 static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10544 PyObject *__pyx_r = 0;
10545 __Pyx_RefNannyDeclarations
10546 __Pyx_RefNannySetupContext(
"conj (wrapper)", 0);
10547 __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
10548 __Pyx_RefNannyFinishContext();
10560 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10561 PyObject *__pyx_r = NULL;
10562 __Pyx_RefNannyDeclarations
10563 PyObject *__pyx_t_1 = NULL;
10564 int __pyx_lineno = 0;
10565 const char *__pyx_filename = NULL;
10566 int __pyx_clineno = 0;
10567 __Pyx_RefNannySetupContext(
"conj", 0);
10568 __Pyx_XDECREF(__pyx_r);
10569 __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;}
10570 __Pyx_GOTREF(__pyx_t_1);
10571 __pyx_r = __pyx_t_1;
10575 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10578 __Pyx_XDECREF(__pyx_t_1);
10579 __Pyx_AddTraceback(
"PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10582 __Pyx_XGIVEREF(__pyx_r);
10583 __Pyx_RefNannyFinishContext();
10595 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10596 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10597 PyObject *__pyx_r = NULL;
10598 __Pyx_RefNannyDeclarations
10599 PyObject *__pyx_t_1 = NULL;
10600 PyObject *__pyx_t_2 = NULL;
10601 int __pyx_lineno = 0;
10602 const char *__pyx_filename = NULL;
10603 int __pyx_clineno = 0;
10604 __Pyx_RefNannySetupContext(
"quad", 0);
10613 __Pyx_XDECREF(__pyx_r);
10614 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10615 __Pyx_GOTREF(__pyx_t_1);
10616 __Pyx_INCREF(__pyx_v_obj);
10617 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
10618 __Pyx_GIVEREF(__pyx_v_obj);
10619 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10620 __Pyx_GOTREF(__pyx_t_2);
10621 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
10622 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__quad);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10623 __Pyx_GOTREF(__pyx_t_1);
10624 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10625 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10626 __Pyx_GOTREF(__pyx_t_2);
10627 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10628 __pyx_r = __pyx_t_2;
10632 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10635 __Pyx_XDECREF(__pyx_t_1);
10636 __Pyx_XDECREF(__pyx_t_2);
10637 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10640 __Pyx_XGIVEREF(__pyx_r);
10641 __Pyx_RefNannyFinishContext();
10646 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10647 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 ";
10648 static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10649 PyObject *__pyx_r = 0;
10650 __Pyx_RefNannyDeclarations
10651 __Pyx_RefNannySetupContext(
"quad (wrapper)", 0);
10652 __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
10653 __Pyx_RefNannyFinishContext();
10665 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10666 PyObject *__pyx_r = NULL;
10667 __Pyx_RefNannyDeclarations
10668 PyObject *__pyx_t_1 = NULL;
10669 int __pyx_lineno = 0;
10670 const char *__pyx_filename = NULL;
10671 int __pyx_clineno = 0;
10672 __Pyx_RefNannySetupContext(
"quad", 0);
10673 __Pyx_XDECREF(__pyx_r);
10674 __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;}
10675 __Pyx_GOTREF(__pyx_t_1);
10676 __pyx_r = __pyx_t_1;
10680 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10683 __Pyx_XDECREF(__pyx_t_1);
10684 __Pyx_AddTraceback(
"PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10687 __Pyx_XGIVEREF(__pyx_r);
10688 __Pyx_RefNannyFinishContext();
10700 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10701 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10702 PyObject *__pyx_r = NULL;
10703 __Pyx_RefNannyDeclarations
10704 PyObject *__pyx_t_1 = NULL;
10705 PyObject *__pyx_t_2 = NULL;
10706 int __pyx_lineno = 0;
10707 const char *__pyx_filename = NULL;
10708 int __pyx_clineno = 0;
10709 __Pyx_RefNannySetupContext(
"norm", 0);
10718 __Pyx_XDECREF(__pyx_r);
10719 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10720 __Pyx_GOTREF(__pyx_t_1);
10721 __Pyx_INCREF(__pyx_v_obj);
10722 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
10723 __Pyx_GIVEREF(__pyx_v_obj);
10724 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10725 __Pyx_GOTREF(__pyx_t_2);
10726 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
10727 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__norm);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10728 __Pyx_GOTREF(__pyx_t_1);
10729 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10730 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
10731 __Pyx_GOTREF(__pyx_t_2);
10732 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10733 __pyx_r = __pyx_t_2;
10737 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10740 __Pyx_XDECREF(__pyx_t_1);
10741 __Pyx_XDECREF(__pyx_t_2);
10742 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10745 __Pyx_XGIVEREF(__pyx_r);
10746 __Pyx_RefNannyFinishContext();
10751 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10752 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 ";
10753 static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10754 PyObject *__pyx_r = 0;
10755 __Pyx_RefNannyDeclarations
10756 __Pyx_RefNannySetupContext(
"norm (wrapper)", 0);
10757 __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
10758 __Pyx_RefNannyFinishContext();
10770 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10771 PyObject *__pyx_r = NULL;
10772 __Pyx_RefNannyDeclarations
10773 PyObject *__pyx_t_1 = NULL;
10774 int __pyx_lineno = 0;
10775 const char *__pyx_filename = NULL;
10776 int __pyx_clineno = 0;
10777 __Pyx_RefNannySetupContext(
"norm", 0);
10778 __Pyx_XDECREF(__pyx_r);
10779 __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;}
10780 __Pyx_GOTREF(__pyx_t_1);
10781 __pyx_r = __pyx_t_1;
10785 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10788 __Pyx_XDECREF(__pyx_t_1);
10789 __Pyx_AddTraceback(
"PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10792 __Pyx_XGIVEREF(__pyx_r);
10793 __Pyx_RefNannyFinishContext();
10805 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10806 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10807 PyObject *__pyx_r = NULL;
10808 __Pyx_RefNannyDeclarations
10809 PyObject *__pyx_t_1 = NULL;
10810 int __pyx_lineno = 0;
10811 const char *__pyx_filename = NULL;
10812 int __pyx_clineno = 0;
10813 __Pyx_RefNannySetupContext(
"abs", 0);
10822 __Pyx_XDECREF(__pyx_r);
10823 __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;}
10824 __Pyx_GOTREF(__pyx_t_1);
10825 __pyx_r = __pyx_t_1;
10829 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10832 __Pyx_XDECREF(__pyx_t_1);
10833 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10836 __Pyx_XGIVEREF(__pyx_r);
10837 __Pyx_RefNannyFinishContext();
10842 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10843 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 ";
10844 static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10845 PyObject *__pyx_r = 0;
10846 __Pyx_RefNannyDeclarations
10847 __Pyx_RefNannySetupContext(
"abs (wrapper)", 0);
10848 __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
10849 __Pyx_RefNannyFinishContext();
10861 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10862 PyObject *__pyx_r = NULL;
10863 __Pyx_RefNannyDeclarations
10864 PyObject *__pyx_t_1 = NULL;
10865 int __pyx_lineno = 0;
10866 const char *__pyx_filename = NULL;
10867 int __pyx_clineno = 0;
10868 __Pyx_RefNannySetupContext(
"abs", 0);
10869 __Pyx_XDECREF(__pyx_r);
10870 __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;}
10871 __Pyx_GOTREF(__pyx_t_1);
10872 __pyx_r = __pyx_t_1;
10876 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10879 __Pyx_XDECREF(__pyx_t_1);
10880 __Pyx_AddTraceback(
"PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10883 __Pyx_XGIVEREF(__pyx_r);
10884 __Pyx_RefNannyFinishContext();
10896 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10897 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10898 PyObject *__pyx_r = NULL;
10899 __Pyx_RefNannyDeclarations
10900 PyObject *__pyx_t_1 = NULL;
10901 int __pyx_lineno = 0;
10902 const char *__pyx_filename = NULL;
10903 int __pyx_clineno = 0;
10904 __Pyx_RefNannySetupContext(
"max_abs", 0);
10913 __Pyx_XDECREF(__pyx_r);
10914 __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;}
10915 __Pyx_GOTREF(__pyx_t_1);
10916 __pyx_r = __pyx_t_1;
10920 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10923 __Pyx_XDECREF(__pyx_t_1);
10924 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10927 __Pyx_XGIVEREF(__pyx_r);
10928 __Pyx_RefNannyFinishContext();
10933 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj);
10934 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 ";
10935 static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10936 PyObject *__pyx_r = 0;
10937 __Pyx_RefNannyDeclarations
10938 __Pyx_RefNannySetupContext(
"max_abs (wrapper)", 0);
10939 __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
10940 __Pyx_RefNannyFinishContext();
10952 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10953 PyObject *__pyx_r = NULL;
10954 __Pyx_RefNannyDeclarations
10955 PyObject *__pyx_t_1 = NULL;
10956 int __pyx_lineno = 0;
10957 const char *__pyx_filename = NULL;
10958 int __pyx_clineno = 0;
10959 __Pyx_RefNannySetupContext(
"max_abs", 0);
10960 __Pyx_XDECREF(__pyx_r);
10961 __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;}
10962 __Pyx_GOTREF(__pyx_t_1);
10963 __pyx_r = __pyx_t_1;
10967 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10970 __Pyx_XDECREF(__pyx_t_1);
10971 __Pyx_AddTraceback(
"PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10974 __Pyx_XGIVEREF(__pyx_r);
10975 __Pyx_RefNannyFinishContext();
10987 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
10988 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
10989 PyObject *__pyx_r = NULL;
10990 __Pyx_RefNannyDeclarations
10991 PyObject *__pyx_t_1 = NULL;
10992 PyObject *__pyx_t_2 = NULL;
10993 PyObject *__pyx_t_3 = NULL;
10994 PyObject *__pyx_t_4 = NULL;
10995 PyObject *__pyx_t_5 = NULL;
10996 PyObject *__pyx_t_6 = NULL;
10997 PyObject *__pyx_t_7 = NULL;
10998 PyObject *__pyx_t_8 = NULL;
10999 PyObject *__pyx_t_9 = NULL;
11000 int __pyx_lineno = 0;
11001 const char *__pyx_filename = NULL;
11002 int __pyx_clineno = 0;
11003 __Pyx_RefNannySetupContext(
"pow", 0);
11013 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
11014 __Pyx_XGOTREF(__pyx_t_1);
11015 __Pyx_XGOTREF(__pyx_t_2);
11016 __Pyx_XGOTREF(__pyx_t_3);
11026 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11027 __Pyx_GOTREF(__pyx_t_4);
11028 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__pow);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11029 __Pyx_GOTREF(__pyx_t_5);
11030 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11031 __pyx_t_4 = PyTuple_New(2);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11032 __Pyx_GOTREF(__pyx_t_4);
11033 __Pyx_INCREF(__pyx_v_obj);
11034 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_obj);
11035 __Pyx_GIVEREF(__pyx_v_obj);
11036 __Pyx_INCREF(__pyx_v_m);
11037 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_m);
11038 __Pyx_GIVEREF(__pyx_v_m);
11039 __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11040 __Pyx_GOTREF(__pyx_t_6);
11041 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11042 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
11043 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11045 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11046 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11047 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11048 goto __pyx_L10_try_end;
11050 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11051 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11052 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11062 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11063 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
11064 __Pyx_GOTREF(__pyx_t_6);
11065 __Pyx_GOTREF(__pyx_t_4);
11066 __Pyx_GOTREF(__pyx_t_5);
11075 __Pyx_XDECREF(__pyx_r);
11076 __pyx_t_7 = PyTuple_New(1);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
11077 __Pyx_GOTREF(__pyx_t_7);
11078 __Pyx_INCREF(__pyx_v_obj);
11079 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_obj);
11080 __Pyx_GIVEREF(__pyx_v_obj);
11081 __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_7), NULL);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
11082 __Pyx_GOTREF(__pyx_t_8);
11083 __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
11084 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__pow);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
11085 __Pyx_GOTREF(__pyx_t_7);
11086 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11087 __pyx_t_8 = PyTuple_New(1);
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
11088 __Pyx_GOTREF(__pyx_t_8);
11089 __Pyx_INCREF(__pyx_v_m);
11090 PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_m);
11091 __Pyx_GIVEREF(__pyx_v_m);
11092 __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
11093 __Pyx_GOTREF(__pyx_t_9);
11094 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11095 __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
11096 __pyx_r = __pyx_t_9;
11098 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11099 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11100 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11101 goto __pyx_L6_except_return;
11102 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11103 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11104 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11105 goto __pyx_L4_exception_handled;
11107 __pyx_L5_except_error:;
11108 __Pyx_XGIVEREF(__pyx_t_1);
11109 __Pyx_XGIVEREF(__pyx_t_2);
11110 __Pyx_XGIVEREF(__pyx_t_3);
11111 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
11112 goto __pyx_L1_error;
11113 __pyx_L6_except_return:;
11114 __Pyx_XGIVEREF(__pyx_t_1);
11115 __Pyx_XGIVEREF(__pyx_t_2);
11116 __Pyx_XGIVEREF(__pyx_t_3);
11117 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
11119 __pyx_L4_exception_handled:;
11120 __Pyx_XGIVEREF(__pyx_t_1);
11121 __Pyx_XGIVEREF(__pyx_t_2);
11122 __Pyx_XGIVEREF(__pyx_t_3);
11123 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
11124 __pyx_L10_try_end:;
11127 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11130 __Pyx_XDECREF(__pyx_t_4);
11131 __Pyx_XDECREF(__pyx_t_5);
11132 __Pyx_XDECREF(__pyx_t_6);
11133 __Pyx_XDECREF(__pyx_t_7);
11134 __Pyx_XDECREF(__pyx_t_8);
11135 __Pyx_XDECREF(__pyx_t_9);
11136 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11139 __Pyx_XGIVEREF(__pyx_r);
11140 __Pyx_RefNannyFinishContext();
11145 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
11146 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 ";
11147 static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11148 PyObject *__pyx_v_obj = 0;
11149 PyObject *__pyx_v_m = 0;
11150 int __pyx_lineno = 0;
11151 const char *__pyx_filename = NULL;
11152 int __pyx_clineno = 0;
11153 PyObject *__pyx_r = 0;
11154 __Pyx_RefNannyDeclarations
11155 __Pyx_RefNannySetupContext(
"pow (wrapper)", 0);
11157 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__m,0};
11158 PyObject* values[2] = {0,0};
11159 if (unlikely(__pyx_kwds)) {
11160 Py_ssize_t kw_args;
11161 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11162 switch (pos_args) {
11163 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11164 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11166 default:
goto __pyx_L5_argtuple_error;
11168 kw_args = PyDict_Size(__pyx_kwds);
11169 switch (pos_args) {
11171 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
11172 else goto __pyx_L5_argtuple_error;
11174 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__m)) != 0)) kw_args--;
11176 __Pyx_RaiseArgtupleInvalid(
"pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11179 if (unlikely(kw_args > 0)) {
11180 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;}
11182 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11183 goto __pyx_L5_argtuple_error;
11185 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11186 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11188 __pyx_v_obj = values[0];
11189 __pyx_v_m = values[1];
11191 goto __pyx_L4_argument_unpacking_done;
11192 __pyx_L5_argtuple_error:;
11193 __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;}
11195 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11196 __Pyx_RefNannyFinishContext();
11198 __pyx_L4_argument_unpacking_done:;
11199 __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
11200 __Pyx_RefNannyFinishContext();
11212 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
11213 PyObject *__pyx_r = NULL;
11214 __Pyx_RefNannyDeclarations
11215 PyObject *__pyx_t_1 = NULL;
11216 int __pyx_lineno = 0;
11217 const char *__pyx_filename = NULL;
11218 int __pyx_clineno = 0;
11219 __Pyx_RefNannySetupContext(
"pow", 0);
11220 __Pyx_XDECREF(__pyx_r);
11221 __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;}
11222 __Pyx_GOTREF(__pyx_t_1);
11223 __pyx_r = __pyx_t_1;
11227 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11230 __Pyx_XDECREF(__pyx_t_1);
11231 __Pyx_AddTraceback(
"PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11234 __Pyx_XGIVEREF(__pyx_r);
11235 __Pyx_RefNannyFinishContext();
11247 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
11248 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11249 PyObject *__pyx_r = NULL;
11250 __Pyx_RefNannyDeclarations
11251 PyObject *__pyx_t_1 = NULL;
11252 PyObject *__pyx_t_2 = NULL;
11253 PyObject *__pyx_t_3 = NULL;
11254 int __pyx_lineno = 0;
11255 const char *__pyx_filename = NULL;
11256 int __pyx_clineno = 0;
11257 __Pyx_RefNannySetupContext(
"outer_pow", 0);
11266 __Pyx_XDECREF(__pyx_r);
11267 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11268 __Pyx_GOTREF(__pyx_t_1);
11269 __Pyx_INCREF(__pyx_v_obj);
11270 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
11271 __Pyx_GIVEREF(__pyx_v_obj);
11272 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11273 __Pyx_GOTREF(__pyx_t_2);
11274 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11275 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__outer_pow);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11276 __Pyx_GOTREF(__pyx_t_1);
11277 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11278 __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;}
11279 __Pyx_GOTREF(__pyx_t_2);
11280 __Pyx_INCREF(__pyx_v_m);
11281 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_m);
11282 __Pyx_GIVEREF(__pyx_v_m);
11283 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11284 __Pyx_GOTREF(__pyx_t_3);
11285 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11286 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11287 __pyx_r = __pyx_t_3;
11291 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11294 __Pyx_XDECREF(__pyx_t_1);
11295 __Pyx_XDECREF(__pyx_t_2);
11296 __Pyx_XDECREF(__pyx_t_3);
11297 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11300 __Pyx_XGIVEREF(__pyx_r);
11301 __Pyx_RefNannyFinishContext();
11306 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
11307 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 ";
11308 static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11309 PyObject *__pyx_v_obj = 0;
11310 PyObject *__pyx_v_m = 0;
11311 int __pyx_lineno = 0;
11312 const char *__pyx_filename = NULL;
11313 int __pyx_clineno = 0;
11314 PyObject *__pyx_r = 0;
11315 __Pyx_RefNannyDeclarations
11316 __Pyx_RefNannySetupContext(
"outer_pow (wrapper)", 0);
11318 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__m,0};
11319 PyObject* values[2] = {0,0};
11320 if (unlikely(__pyx_kwds)) {
11321 Py_ssize_t kw_args;
11322 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11323 switch (pos_args) {
11324 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11325 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11327 default:
goto __pyx_L5_argtuple_error;
11329 kw_args = PyDict_Size(__pyx_kwds);
11330 switch (pos_args) {
11332 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
11333 else goto __pyx_L5_argtuple_error;
11335 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__m)) != 0)) kw_args--;
11337 __Pyx_RaiseArgtupleInvalid(
"outer_pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11340 if (unlikely(kw_args > 0)) {
11341 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;}
11343 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11344 goto __pyx_L5_argtuple_error;
11346 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11347 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11349 __pyx_v_obj = values[0];
11350 __pyx_v_m = values[1];
11352 goto __pyx_L4_argument_unpacking_done;
11353 __pyx_L5_argtuple_error:;
11354 __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;}
11356 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11357 __Pyx_RefNannyFinishContext();
11359 __pyx_L4_argument_unpacking_done:;
11360 __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
11361 __Pyx_RefNannyFinishContext();
11373 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
11374 PyObject *__pyx_r = NULL;
11375 __Pyx_RefNannyDeclarations
11376 PyObject *__pyx_t_1 = NULL;
11377 int __pyx_lineno = 0;
11378 const char *__pyx_filename = NULL;
11379 int __pyx_clineno = 0;
11380 __Pyx_RefNannySetupContext(
"outer_pow", 0);
11381 __Pyx_XDECREF(__pyx_r);
11382 __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;}
11383 __Pyx_GOTREF(__pyx_t_1);
11384 __pyx_r = __pyx_t_1;
11388 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11391 __Pyx_XDECREF(__pyx_t_1);
11392 __Pyx_AddTraceback(
"PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11395 __Pyx_XGIVEREF(__pyx_r);
11396 __Pyx_RefNannyFinishContext();
11408 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11409 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11410 PyObject *__pyx_r = NULL;
11411 __Pyx_RefNannyDeclarations
11412 PyObject *__pyx_t_1 = NULL;
11413 PyObject *__pyx_t_2 = NULL;
11414 int __pyx_lineno = 0;
11415 const char *__pyx_filename = NULL;
11416 int __pyx_clineno = 0;
11417 __Pyx_RefNannySetupContext(
"complexifier", 0);
11426 __Pyx_XDECREF(__pyx_r);
11427 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11428 __Pyx_GOTREF(__pyx_t_1);
11429 __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;}
11430 __Pyx_GOTREF(__pyx_t_2);
11431 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11432 __pyx_r = __pyx_t_2;
11436 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11439 __Pyx_XDECREF(__pyx_t_1);
11440 __Pyx_XDECREF(__pyx_t_2);
11441 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
11444 __Pyx_XGIVEREF(__pyx_r);
11445 __Pyx_RefNannyFinishContext();
11450 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11451 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 ";
11452 static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11453 PyObject *__pyx_r = 0;
11454 __Pyx_RefNannyDeclarations
11455 __Pyx_RefNannySetupContext(
"complexifier (wrapper)", 0);
11456 __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
11457 __Pyx_RefNannyFinishContext();
11469 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11470 PyObject *__pyx_r = NULL;
11471 __Pyx_RefNannyDeclarations
11472 PyObject *__pyx_t_1 = NULL;
11473 int __pyx_lineno = 0;
11474 const char *__pyx_filename = NULL;
11475 int __pyx_clineno = 0;
11476 __Pyx_RefNannySetupContext(
"complexifier", 0);
11477 __Pyx_XDECREF(__pyx_r);
11478 __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;}
11479 __Pyx_GOTREF(__pyx_t_1);
11480 __pyx_r = __pyx_t_1;
11484 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11487 __Pyx_XDECREF(__pyx_t_1);
11488 __Pyx_AddTraceback(
"PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
11491 __Pyx_XGIVEREF(__pyx_r);
11492 __Pyx_RefNannyFinishContext();
11504 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
11505 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) {
11506 PyObject *__pyx_v_i = ((PyObject *)Py_None);
11507 PyObject *__pyx_r = NULL;
11508 __Pyx_RefNannyDeclarations
11511 PyObject *__pyx_t_3 = NULL;
11513 PyObject *__pyx_t_5 = NULL;
11514 PyObject *__pyx_t_6 = NULL;
11515 PyObject *__pyx_t_7 = NULL;
11516 PyObject *__pyx_t_8 = NULL;
11517 PyObject *__pyx_t_9 = NULL;
11518 PyObject *__pyx_t_10 = NULL;
11519 PyObject *__pyx_t_11 = NULL;
11520 int __pyx_lineno = 0;
11521 const char *__pyx_filename = NULL;
11522 int __pyx_clineno = 0;
11523 __Pyx_RefNannySetupContext(
"sqrt", 0);
11524 if (__pyx_optional_args) {
11525 if (__pyx_optional_args->__pyx_n > 0) {
11526 __pyx_v_i = __pyx_optional_args->i;
11537 __pyx_t_1 = (__pyx_v_i == Py_None);
11538 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
11548 __Pyx_XDECREF(__pyx_r);
11549 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11550 __Pyx_GOTREF(__pyx_t_3);
11552 __pyx_t_4 =
sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
11554 __Pyx_CppExn2PyErr();
11555 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
11557 __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;}
11558 __Pyx_GOTREF(__pyx_t_5);
11559 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11560 __pyx_r = __pyx_t_5;
11575 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
11576 __Pyx_XGOTREF(__pyx_t_6);
11577 __Pyx_XGOTREF(__pyx_t_7);
11578 __Pyx_XGOTREF(__pyx_t_8);
11588 __Pyx_XDECREF(__pyx_r);
11589 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
11590 __Pyx_GOTREF(__pyx_t_5);
11591 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__sqrt);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
11592 __Pyx_GOTREF(__pyx_t_3);
11593 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11594 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
11595 __Pyx_GOTREF(__pyx_t_5);
11596 __Pyx_INCREF(__pyx_v_obj);
11597 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
11598 __Pyx_GIVEREF(__pyx_v_obj);
11599 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
11600 __Pyx_GOTREF(__pyx_t_9);
11601 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11602 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
11603 __pyx_r = __pyx_t_9;
11605 goto __pyx_L8_try_return;
11607 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11608 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11609 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11610 goto __pyx_L11_try_end;
11611 __pyx_L8_try_return:;
11612 __Pyx_XGIVEREF(__pyx_t_6);
11613 __Pyx_XGIVEREF(__pyx_t_7);
11614 __Pyx_XGIVEREF(__pyx_t_8);
11615 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
11618 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11619 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11620 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11630 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
11631 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
11632 __Pyx_GOTREF(__pyx_t_9);
11633 __Pyx_GOTREF(__pyx_t_5);
11634 __Pyx_GOTREF(__pyx_t_3);
11643 __Pyx_XDECREF(__pyx_r);
11644 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
11645 __Pyx_GOTREF(__pyx_t_10);
11646 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
11647 __Pyx_GOTREF(__pyx_t_11);
11648 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11649 __pyx_r = __pyx_t_11;
11651 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11652 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11653 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11654 goto __pyx_L7_except_return;
11655 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11656 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11657 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11658 goto __pyx_L5_exception_handled;
11660 __pyx_L6_except_error:;
11661 __Pyx_XGIVEREF(__pyx_t_6);
11662 __Pyx_XGIVEREF(__pyx_t_7);
11663 __Pyx_XGIVEREF(__pyx_t_8);
11664 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
11665 goto __pyx_L1_error;
11666 __pyx_L7_except_return:;
11667 __Pyx_XGIVEREF(__pyx_t_6);
11668 __Pyx_XGIVEREF(__pyx_t_7);
11669 __Pyx_XGIVEREF(__pyx_t_8);
11670 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
11672 __pyx_L5_exception_handled:;
11673 __Pyx_XGIVEREF(__pyx_t_6);
11674 __Pyx_XGIVEREF(__pyx_t_7);
11675 __Pyx_XGIVEREF(__pyx_t_8);
11676 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
11677 __pyx_L11_try_end:;
11682 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11685 __Pyx_XDECREF(__pyx_t_3);
11686 __Pyx_XDECREF(__pyx_t_5);
11687 __Pyx_XDECREF(__pyx_t_9);
11688 __Pyx_XDECREF(__pyx_t_10);
11689 __Pyx_XDECREF(__pyx_t_11);
11690 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
11693 __Pyx_XGIVEREF(__pyx_r);
11694 __Pyx_RefNannyFinishContext();
11699 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
11700 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 ";
11701 static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11702 PyObject *__pyx_v_obj = 0;
11703 PyObject *__pyx_v_i = 0;
11704 int __pyx_lineno = 0;
11705 const char *__pyx_filename = NULL;
11706 int __pyx_clineno = 0;
11707 PyObject *__pyx_r = 0;
11708 __Pyx_RefNannyDeclarations
11709 __Pyx_RefNannySetupContext(
"sqrt (wrapper)", 0);
11711 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
11712 PyObject* values[2] = {0,0};
11721 values[1] = ((PyObject *)Py_None);
11722 if (unlikely(__pyx_kwds)) {
11723 Py_ssize_t kw_args;
11724 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11725 switch (pos_args) {
11726 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11727 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11729 default:
goto __pyx_L5_argtuple_error;
11731 kw_args = PyDict_Size(__pyx_kwds);
11732 switch (pos_args) {
11734 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
11735 else goto __pyx_L5_argtuple_error;
11738 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
11739 if (value) { values[1] = value; kw_args--; }
11742 if (unlikely(kw_args > 0)) {
11743 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;}
11746 switch (PyTuple_GET_SIZE(__pyx_args)) {
11747 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11748 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11750 default:
goto __pyx_L5_argtuple_error;
11753 __pyx_v_obj = values[0];
11754 __pyx_v_i = values[1];
11756 goto __pyx_L4_argument_unpacking_done;
11757 __pyx_L5_argtuple_error:;
11758 __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;}
11760 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
11761 __Pyx_RefNannyFinishContext();
11763 __pyx_L4_argument_unpacking_done:;
11764 __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
11765 __Pyx_RefNannyFinishContext();
11769 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
11770 PyObject *__pyx_r = NULL;
11771 __Pyx_RefNannyDeclarations
11772 PyObject *__pyx_t_1 = NULL;
11773 struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
11774 int __pyx_lineno = 0;
11775 const char *__pyx_filename = NULL;
11776 int __pyx_clineno = 0;
11777 __Pyx_RefNannySetupContext(
"sqrt", 0);
11778 __Pyx_XDECREF(__pyx_r);
11779 __pyx_t_2.__pyx_n = 1;
11780 __pyx_t_2.i = __pyx_v_i;
11781 __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;}
11782 __Pyx_GOTREF(__pyx_t_1);
11783 __pyx_r = __pyx_t_1;
11787 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11790 __Pyx_XDECREF(__pyx_t_1);
11791 __Pyx_AddTraceback(
"PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
11794 __Pyx_XGIVEREF(__pyx_r);
11795 __Pyx_RefNannyFinishContext();
11807 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11808 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
11809 PyObject *__pyx_r = NULL;
11810 __Pyx_RefNannyDeclarations
11811 PyObject *__pyx_t_1 = NULL;
11812 PyObject *__pyx_t_2 = NULL;
11813 PyObject *__pyx_t_3 = NULL;
11814 PyObject *__pyx_t_4 = NULL;
11815 PyObject *__pyx_t_5 = NULL;
11816 PyObject *__pyx_t_6 = NULL;
11817 PyObject *__pyx_t_7 = NULL;
11818 PyObject *__pyx_t_8 = NULL;
11819 int __pyx_lineno = 0;
11820 const char *__pyx_filename = NULL;
11821 int __pyx_clineno = 0;
11822 __Pyx_RefNannySetupContext(
"exp", 0);
11832 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
11833 __Pyx_XGOTREF(__pyx_t_1);
11834 __Pyx_XGOTREF(__pyx_t_2);
11835 __Pyx_XGOTREF(__pyx_t_3);
11845 __Pyx_XDECREF(__pyx_r);
11846 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11847 __Pyx_GOTREF(__pyx_t_4);
11848 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__exp);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11849 __Pyx_GOTREF(__pyx_t_5);
11850 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11851 __pyx_t_4 = PyTuple_New(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11852 __Pyx_GOTREF(__pyx_t_4);
11853 __Pyx_INCREF(__pyx_v_obj);
11854 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_obj);
11855 __Pyx_GIVEREF(__pyx_v_obj);
11856 __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
11857 __Pyx_GOTREF(__pyx_t_6);
11858 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11859 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
11860 __pyx_r = __pyx_t_6;
11862 goto __pyx_L7_try_return;
11864 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11865 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11866 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11867 goto __pyx_L10_try_end;
11868 __pyx_L7_try_return:;
11869 __Pyx_XGIVEREF(__pyx_t_1);
11870 __Pyx_XGIVEREF(__pyx_t_2);
11871 __Pyx_XGIVEREF(__pyx_t_3);
11872 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
11875 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11876 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11877 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11887 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
11888 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
11889 __Pyx_GOTREF(__pyx_t_6);
11890 __Pyx_GOTREF(__pyx_t_4);
11891 __Pyx_GOTREF(__pyx_t_5);
11900 __Pyx_XDECREF(__pyx_r);
11901 __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
11902 __Pyx_GOTREF(__pyx_t_7);
11903 __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_7),
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;}
11904 __Pyx_GOTREF(__pyx_t_8);
11905 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11906 __pyx_r = __pyx_t_8;
11908 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11909 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11910 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11911 goto __pyx_L6_except_return;
11912 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11913 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11914 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11915 goto __pyx_L4_exception_handled;
11917 __pyx_L5_except_error:;
11918 __Pyx_XGIVEREF(__pyx_t_1);
11919 __Pyx_XGIVEREF(__pyx_t_2);
11920 __Pyx_XGIVEREF(__pyx_t_3);
11921 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
11922 goto __pyx_L1_error;
11923 __pyx_L6_except_return:;
11924 __Pyx_XGIVEREF(__pyx_t_1);
11925 __Pyx_XGIVEREF(__pyx_t_2);
11926 __Pyx_XGIVEREF(__pyx_t_3);
11927 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
11929 __pyx_L4_exception_handled:;
11930 __Pyx_XGIVEREF(__pyx_t_1);
11931 __Pyx_XGIVEREF(__pyx_t_2);
11932 __Pyx_XGIVEREF(__pyx_t_3);
11933 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
11934 __pyx_L10_try_end:;
11937 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11940 __Pyx_XDECREF(__pyx_t_4);
11941 __Pyx_XDECREF(__pyx_t_5);
11942 __Pyx_XDECREF(__pyx_t_6);
11943 __Pyx_XDECREF(__pyx_t_7);
11944 __Pyx_XDECREF(__pyx_t_8);
11945 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
11948 __Pyx_XGIVEREF(__pyx_r);
11949 __Pyx_RefNannyFinishContext();
11954 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj);
11955 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 ";
11956 static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11957 PyObject *__pyx_r = 0;
11958 __Pyx_RefNannyDeclarations
11959 __Pyx_RefNannySetupContext(
"exp (wrapper)", 0);
11960 __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
11961 __Pyx_RefNannyFinishContext();
11973 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11974 PyObject *__pyx_r = NULL;
11975 __Pyx_RefNannyDeclarations
11976 PyObject *__pyx_t_1 = NULL;
11977 int __pyx_lineno = 0;
11978 const char *__pyx_filename = NULL;
11979 int __pyx_clineno = 0;
11980 __Pyx_RefNannySetupContext(
"exp", 0);
11981 __Pyx_XDECREF(__pyx_r);
11982 __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;}
11983 __Pyx_GOTREF(__pyx_t_1);
11984 __pyx_r = __pyx_t_1;
11988 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11991 __Pyx_XDECREF(__pyx_t_1);
11992 __Pyx_AddTraceback(
"PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
11995 __Pyx_XGIVEREF(__pyx_r);
11996 __Pyx_RefNannyFinishContext();
12008 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12009 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) {
12010 PyObject *__pyx_v_i = ((PyObject *)Py_None);
12011 PyObject *__pyx_r = NULL;
12012 __Pyx_RefNannyDeclarations
12015 PyObject *__pyx_t_3 = NULL;
12017 PyObject *__pyx_t_5 = NULL;
12018 PyObject *__pyx_t_6 = NULL;
12019 PyObject *__pyx_t_7 = NULL;
12020 PyObject *__pyx_t_8 = NULL;
12021 PyObject *__pyx_t_9 = NULL;
12022 PyObject *__pyx_t_10 = NULL;
12023 PyObject *__pyx_t_11 = NULL;
12024 int __pyx_lineno = 0;
12025 const char *__pyx_filename = NULL;
12026 int __pyx_clineno = 0;
12027 __Pyx_RefNannySetupContext(
"log", 0);
12028 if (__pyx_optional_args) {
12029 if (__pyx_optional_args->__pyx_n > 0) {
12030 __pyx_v_i = __pyx_optional_args->i;
12041 __pyx_t_1 = (__pyx_v_i == Py_None);
12042 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
12052 __Pyx_XDECREF(__pyx_r);
12053 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12054 __Pyx_GOTREF(__pyx_t_3);
12056 __pyx_t_4 =
log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12058 __Pyx_CppExn2PyErr();
12059 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12061 __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;}
12062 __Pyx_GOTREF(__pyx_t_5);
12063 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12064 __pyx_r = __pyx_t_5;
12079 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
12080 __Pyx_XGOTREF(__pyx_t_6);
12081 __Pyx_XGOTREF(__pyx_t_7);
12082 __Pyx_XGOTREF(__pyx_t_8);
12092 __Pyx_XDECREF(__pyx_r);
12093 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12094 __Pyx_GOTREF(__pyx_t_5);
12095 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__log);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12096 __Pyx_GOTREF(__pyx_t_3);
12097 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12098 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12099 __Pyx_GOTREF(__pyx_t_5);
12100 __Pyx_INCREF(__pyx_v_obj);
12101 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
12102 __Pyx_GIVEREF(__pyx_v_obj);
12103 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12104 __Pyx_GOTREF(__pyx_t_9);
12105 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12106 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
12107 __pyx_r = __pyx_t_9;
12109 goto __pyx_L8_try_return;
12111 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12112 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12113 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12114 goto __pyx_L11_try_end;
12115 __pyx_L8_try_return:;
12116 __Pyx_XGIVEREF(__pyx_t_6);
12117 __Pyx_XGIVEREF(__pyx_t_7);
12118 __Pyx_XGIVEREF(__pyx_t_8);
12119 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12122 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12123 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12124 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12134 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
12135 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
12136 __Pyx_GOTREF(__pyx_t_9);
12137 __Pyx_GOTREF(__pyx_t_5);
12138 __Pyx_GOTREF(__pyx_t_3);
12147 __Pyx_XDECREF(__pyx_r);
12148 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
12149 __Pyx_GOTREF(__pyx_t_10);
12150 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
12151 __Pyx_GOTREF(__pyx_t_11);
12152 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12153 __pyx_r = __pyx_t_11;
12155 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12156 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12157 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12158 goto __pyx_L7_except_return;
12159 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12160 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12161 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12162 goto __pyx_L5_exception_handled;
12164 __pyx_L6_except_error:;
12165 __Pyx_XGIVEREF(__pyx_t_6);
12166 __Pyx_XGIVEREF(__pyx_t_7);
12167 __Pyx_XGIVEREF(__pyx_t_8);
12168 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12169 goto __pyx_L1_error;
12170 __pyx_L7_except_return:;
12171 __Pyx_XGIVEREF(__pyx_t_6);
12172 __Pyx_XGIVEREF(__pyx_t_7);
12173 __Pyx_XGIVEREF(__pyx_t_8);
12174 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12176 __pyx_L5_exception_handled:;
12177 __Pyx_XGIVEREF(__pyx_t_6);
12178 __Pyx_XGIVEREF(__pyx_t_7);
12179 __Pyx_XGIVEREF(__pyx_t_8);
12180 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12181 __pyx_L11_try_end:;
12186 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12189 __Pyx_XDECREF(__pyx_t_3);
12190 __Pyx_XDECREF(__pyx_t_5);
12191 __Pyx_XDECREF(__pyx_t_9);
12192 __Pyx_XDECREF(__pyx_t_10);
12193 __Pyx_XDECREF(__pyx_t_11);
12194 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
12197 __Pyx_XGIVEREF(__pyx_r);
12198 __Pyx_RefNannyFinishContext();
12203 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12204 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 ";
12205 static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12206 PyObject *__pyx_v_obj = 0;
12207 PyObject *__pyx_v_i = 0;
12208 int __pyx_lineno = 0;
12209 const char *__pyx_filename = NULL;
12210 int __pyx_clineno = 0;
12211 PyObject *__pyx_r = 0;
12212 __Pyx_RefNannyDeclarations
12213 __Pyx_RefNannySetupContext(
"log (wrapper)", 0);
12215 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
12216 PyObject* values[2] = {0,0};
12225 values[1] = ((PyObject *)Py_None);
12226 if (unlikely(__pyx_kwds)) {
12227 Py_ssize_t kw_args;
12228 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12229 switch (pos_args) {
12230 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12231 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12233 default:
goto __pyx_L5_argtuple_error;
12235 kw_args = PyDict_Size(__pyx_kwds);
12236 switch (pos_args) {
12238 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
12239 else goto __pyx_L5_argtuple_error;
12242 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
12243 if (value) { values[1] = value; kw_args--; }
12246 if (unlikely(kw_args > 0)) {
12247 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;}
12250 switch (PyTuple_GET_SIZE(__pyx_args)) {
12251 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12252 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12254 default:
goto __pyx_L5_argtuple_error;
12257 __pyx_v_obj = values[0];
12258 __pyx_v_i = values[1];
12260 goto __pyx_L4_argument_unpacking_done;
12261 __pyx_L5_argtuple_error:;
12262 __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;}
12264 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
12265 __Pyx_RefNannyFinishContext();
12267 __pyx_L4_argument_unpacking_done:;
12268 __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
12269 __Pyx_RefNannyFinishContext();
12273 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
12274 PyObject *__pyx_r = NULL;
12275 __Pyx_RefNannyDeclarations
12276 PyObject *__pyx_t_1 = NULL;
12277 struct __pyx_opt_args_8PyClical_log __pyx_t_2;
12278 int __pyx_lineno = 0;
12279 const char *__pyx_filename = NULL;
12280 int __pyx_clineno = 0;
12281 __Pyx_RefNannySetupContext(
"log", 0);
12282 __Pyx_XDECREF(__pyx_r);
12283 __pyx_t_2.__pyx_n = 1;
12284 __pyx_t_2.i = __pyx_v_i;
12285 __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;}
12286 __Pyx_GOTREF(__pyx_t_1);
12287 __pyx_r = __pyx_t_1;
12291 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12294 __Pyx_XDECREF(__pyx_t_1);
12295 __Pyx_AddTraceback(
"PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
12298 __Pyx_XGIVEREF(__pyx_r);
12299 __Pyx_RefNannyFinishContext();
12311 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12312 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) {
12313 PyObject *__pyx_v_i = ((PyObject *)Py_None);
12314 PyObject *__pyx_r = NULL;
12315 __Pyx_RefNannyDeclarations
12318 PyObject *__pyx_t_3 = NULL;
12320 PyObject *__pyx_t_5 = NULL;
12321 PyObject *__pyx_t_6 = NULL;
12322 PyObject *__pyx_t_7 = NULL;
12323 PyObject *__pyx_t_8 = NULL;
12324 PyObject *__pyx_t_9 = NULL;
12325 PyObject *__pyx_t_10 = NULL;
12326 PyObject *__pyx_t_11 = NULL;
12327 int __pyx_lineno = 0;
12328 const char *__pyx_filename = NULL;
12329 int __pyx_clineno = 0;
12330 __Pyx_RefNannySetupContext(
"cos", 0);
12331 if (__pyx_optional_args) {
12332 if (__pyx_optional_args->__pyx_n > 0) {
12333 __pyx_v_i = __pyx_optional_args->i;
12344 __pyx_t_1 = (__pyx_v_i == Py_None);
12345 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
12355 __Pyx_XDECREF(__pyx_r);
12356 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12357 __Pyx_GOTREF(__pyx_t_3);
12359 __pyx_t_4 =
cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12361 __Pyx_CppExn2PyErr();
12362 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12364 __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;}
12365 __Pyx_GOTREF(__pyx_t_5);
12366 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12367 __pyx_r = __pyx_t_5;
12382 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
12383 __Pyx_XGOTREF(__pyx_t_6);
12384 __Pyx_XGOTREF(__pyx_t_7);
12385 __Pyx_XGOTREF(__pyx_t_8);
12395 __Pyx_XDECREF(__pyx_r);
12396 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12397 __Pyx_GOTREF(__pyx_t_5);
12398 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__cos);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12399 __Pyx_GOTREF(__pyx_t_3);
12400 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12401 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12402 __Pyx_GOTREF(__pyx_t_5);
12403 __Pyx_INCREF(__pyx_v_obj);
12404 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
12405 __Pyx_GIVEREF(__pyx_v_obj);
12406 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12407 __Pyx_GOTREF(__pyx_t_9);
12408 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12409 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
12410 __pyx_r = __pyx_t_9;
12412 goto __pyx_L8_try_return;
12414 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12415 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12416 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12417 goto __pyx_L11_try_end;
12418 __pyx_L8_try_return:;
12419 __Pyx_XGIVEREF(__pyx_t_6);
12420 __Pyx_XGIVEREF(__pyx_t_7);
12421 __Pyx_XGIVEREF(__pyx_t_8);
12422 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12425 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12426 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12427 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12437 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12438 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
12439 __Pyx_GOTREF(__pyx_t_9);
12440 __Pyx_GOTREF(__pyx_t_5);
12441 __Pyx_GOTREF(__pyx_t_3);
12450 __Pyx_XDECREF(__pyx_r);
12451 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
12452 __Pyx_GOTREF(__pyx_t_10);
12453 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
12454 __Pyx_GOTREF(__pyx_t_11);
12455 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12456 __pyx_r = __pyx_t_11;
12458 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12459 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12460 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12461 goto __pyx_L7_except_return;
12462 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12463 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12464 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12465 goto __pyx_L5_exception_handled;
12467 __pyx_L6_except_error:;
12468 __Pyx_XGIVEREF(__pyx_t_6);
12469 __Pyx_XGIVEREF(__pyx_t_7);
12470 __Pyx_XGIVEREF(__pyx_t_8);
12471 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12472 goto __pyx_L1_error;
12473 __pyx_L7_except_return:;
12474 __Pyx_XGIVEREF(__pyx_t_6);
12475 __Pyx_XGIVEREF(__pyx_t_7);
12476 __Pyx_XGIVEREF(__pyx_t_8);
12477 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12479 __pyx_L5_exception_handled:;
12480 __Pyx_XGIVEREF(__pyx_t_6);
12481 __Pyx_XGIVEREF(__pyx_t_7);
12482 __Pyx_XGIVEREF(__pyx_t_8);
12483 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12484 __pyx_L11_try_end:;
12489 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12492 __Pyx_XDECREF(__pyx_t_3);
12493 __Pyx_XDECREF(__pyx_t_5);
12494 __Pyx_XDECREF(__pyx_t_9);
12495 __Pyx_XDECREF(__pyx_t_10);
12496 __Pyx_XDECREF(__pyx_t_11);
12497 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12500 __Pyx_XGIVEREF(__pyx_r);
12501 __Pyx_RefNannyFinishContext();
12506 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12507 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 ";
12508 static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12509 PyObject *__pyx_v_obj = 0;
12510 PyObject *__pyx_v_i = 0;
12511 int __pyx_lineno = 0;
12512 const char *__pyx_filename = NULL;
12513 int __pyx_clineno = 0;
12514 PyObject *__pyx_r = 0;
12515 __Pyx_RefNannyDeclarations
12516 __Pyx_RefNannySetupContext(
"cos (wrapper)", 0);
12518 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
12519 PyObject* values[2] = {0,0};
12528 values[1] = ((PyObject *)Py_None);
12529 if (unlikely(__pyx_kwds)) {
12530 Py_ssize_t kw_args;
12531 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12532 switch (pos_args) {
12533 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12534 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12536 default:
goto __pyx_L5_argtuple_error;
12538 kw_args = PyDict_Size(__pyx_kwds);
12539 switch (pos_args) {
12541 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
12542 else goto __pyx_L5_argtuple_error;
12545 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
12546 if (value) { values[1] = value; kw_args--; }
12549 if (unlikely(kw_args > 0)) {
12550 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;}
12553 switch (PyTuple_GET_SIZE(__pyx_args)) {
12554 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12555 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12557 default:
goto __pyx_L5_argtuple_error;
12560 __pyx_v_obj = values[0];
12561 __pyx_v_i = values[1];
12563 goto __pyx_L4_argument_unpacking_done;
12564 __pyx_L5_argtuple_error:;
12565 __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;}
12567 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12568 __Pyx_RefNannyFinishContext();
12570 __pyx_L4_argument_unpacking_done:;
12571 __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
12572 __Pyx_RefNannyFinishContext();
12576 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
12577 PyObject *__pyx_r = NULL;
12578 __Pyx_RefNannyDeclarations
12579 PyObject *__pyx_t_1 = NULL;
12580 struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
12581 int __pyx_lineno = 0;
12582 const char *__pyx_filename = NULL;
12583 int __pyx_clineno = 0;
12584 __Pyx_RefNannySetupContext(
"cos", 0);
12585 __Pyx_XDECREF(__pyx_r);
12586 __pyx_t_2.__pyx_n = 1;
12587 __pyx_t_2.i = __pyx_v_i;
12588 __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;}
12589 __Pyx_GOTREF(__pyx_t_1);
12590 __pyx_r = __pyx_t_1;
12594 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12597 __Pyx_XDECREF(__pyx_t_1);
12598 __Pyx_AddTraceback(
"PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12601 __Pyx_XGIVEREF(__pyx_r);
12602 __Pyx_RefNannyFinishContext();
12614 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12615 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) {
12616 PyObject *__pyx_v_i = ((PyObject *)Py_None);
12617 PyObject *__pyx_r = NULL;
12618 __Pyx_RefNannyDeclarations
12621 PyObject *__pyx_t_3 = NULL;
12623 PyObject *__pyx_t_5 = NULL;
12624 PyObject *__pyx_t_6 = NULL;
12625 PyObject *__pyx_t_7 = NULL;
12626 PyObject *__pyx_t_8 = NULL;
12627 PyObject *__pyx_t_9 = NULL;
12628 PyObject *__pyx_t_10 = NULL;
12629 PyObject *__pyx_t_11 = NULL;
12630 int __pyx_lineno = 0;
12631 const char *__pyx_filename = NULL;
12632 int __pyx_clineno = 0;
12633 __Pyx_RefNannySetupContext(
"acos", 0);
12634 if (__pyx_optional_args) {
12635 if (__pyx_optional_args->__pyx_n > 0) {
12636 __pyx_v_i = __pyx_optional_args->i;
12647 __pyx_t_1 = (__pyx_v_i == Py_None);
12648 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
12658 __Pyx_XDECREF(__pyx_r);
12659 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12660 __Pyx_GOTREF(__pyx_t_3);
12662 __pyx_t_4 =
acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12664 __Pyx_CppExn2PyErr();
12665 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
12667 __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;}
12668 __Pyx_GOTREF(__pyx_t_5);
12669 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12670 __pyx_r = __pyx_t_5;
12685 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
12686 __Pyx_XGOTREF(__pyx_t_6);
12687 __Pyx_XGOTREF(__pyx_t_7);
12688 __Pyx_XGOTREF(__pyx_t_8);
12698 __Pyx_XDECREF(__pyx_r);
12699 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12700 __Pyx_GOTREF(__pyx_t_5);
12701 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__acos);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12702 __Pyx_GOTREF(__pyx_t_3);
12703 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12704 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12705 __Pyx_GOTREF(__pyx_t_5);
12706 __Pyx_INCREF(__pyx_v_obj);
12707 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
12708 __Pyx_GIVEREF(__pyx_v_obj);
12709 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
12710 __Pyx_GOTREF(__pyx_t_9);
12711 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12712 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
12713 __pyx_r = __pyx_t_9;
12715 goto __pyx_L8_try_return;
12717 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12718 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12719 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12720 goto __pyx_L11_try_end;
12721 __pyx_L8_try_return:;
12722 __Pyx_XGIVEREF(__pyx_t_6);
12723 __Pyx_XGIVEREF(__pyx_t_7);
12724 __Pyx_XGIVEREF(__pyx_t_8);
12725 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12728 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12729 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12730 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12740 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12741 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
12742 __Pyx_GOTREF(__pyx_t_9);
12743 __Pyx_GOTREF(__pyx_t_5);
12744 __Pyx_GOTREF(__pyx_t_3);
12753 __Pyx_XDECREF(__pyx_r);
12754 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
12755 __Pyx_GOTREF(__pyx_t_10);
12756 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
12757 __Pyx_GOTREF(__pyx_t_11);
12758 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12759 __pyx_r = __pyx_t_11;
12761 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12762 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12763 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12764 goto __pyx_L7_except_return;
12765 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12766 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12767 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12768 goto __pyx_L5_exception_handled;
12770 __pyx_L6_except_error:;
12771 __Pyx_XGIVEREF(__pyx_t_6);
12772 __Pyx_XGIVEREF(__pyx_t_7);
12773 __Pyx_XGIVEREF(__pyx_t_8);
12774 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12775 goto __pyx_L1_error;
12776 __pyx_L7_except_return:;
12777 __Pyx_XGIVEREF(__pyx_t_6);
12778 __Pyx_XGIVEREF(__pyx_t_7);
12779 __Pyx_XGIVEREF(__pyx_t_8);
12780 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12782 __pyx_L5_exception_handled:;
12783 __Pyx_XGIVEREF(__pyx_t_6);
12784 __Pyx_XGIVEREF(__pyx_t_7);
12785 __Pyx_XGIVEREF(__pyx_t_8);
12786 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12787 __pyx_L11_try_end:;
12792 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12795 __Pyx_XDECREF(__pyx_t_3);
12796 __Pyx_XDECREF(__pyx_t_5);
12797 __Pyx_XDECREF(__pyx_t_9);
12798 __Pyx_XDECREF(__pyx_t_10);
12799 __Pyx_XDECREF(__pyx_t_11);
12800 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12803 __Pyx_XGIVEREF(__pyx_r);
12804 __Pyx_RefNannyFinishContext();
12809 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
12810 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 ";
12811 static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12812 PyObject *__pyx_v_obj = 0;
12813 PyObject *__pyx_v_i = 0;
12814 int __pyx_lineno = 0;
12815 const char *__pyx_filename = NULL;
12816 int __pyx_clineno = 0;
12817 PyObject *__pyx_r = 0;
12818 __Pyx_RefNannyDeclarations
12819 __Pyx_RefNannySetupContext(
"acos (wrapper)", 0);
12821 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
12822 PyObject* values[2] = {0,0};
12831 values[1] = ((PyObject *)Py_None);
12832 if (unlikely(__pyx_kwds)) {
12833 Py_ssize_t kw_args;
12834 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12835 switch (pos_args) {
12836 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12837 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12839 default:
goto __pyx_L5_argtuple_error;
12841 kw_args = PyDict_Size(__pyx_kwds);
12842 switch (pos_args) {
12844 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
12845 else goto __pyx_L5_argtuple_error;
12848 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
12849 if (value) { values[1] = value; kw_args--; }
12852 if (unlikely(kw_args > 0)) {
12853 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;}
12856 switch (PyTuple_GET_SIZE(__pyx_args)) {
12857 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12858 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12860 default:
goto __pyx_L5_argtuple_error;
12863 __pyx_v_obj = values[0];
12864 __pyx_v_i = values[1];
12866 goto __pyx_L4_argument_unpacking_done;
12867 __pyx_L5_argtuple_error:;
12868 __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;}
12870 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12871 __Pyx_RefNannyFinishContext();
12873 __pyx_L4_argument_unpacking_done:;
12874 __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
12875 __Pyx_RefNannyFinishContext();
12879 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
12880 PyObject *__pyx_r = NULL;
12881 __Pyx_RefNannyDeclarations
12882 PyObject *__pyx_t_1 = NULL;
12883 struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
12884 int __pyx_lineno = 0;
12885 const char *__pyx_filename = NULL;
12886 int __pyx_clineno = 0;
12887 __Pyx_RefNannySetupContext(
"acos", 0);
12888 __Pyx_XDECREF(__pyx_r);
12889 __pyx_t_2.__pyx_n = 1;
12890 __pyx_t_2.i = __pyx_v_i;
12891 __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;}
12892 __Pyx_GOTREF(__pyx_t_1);
12893 __pyx_r = __pyx_t_1;
12897 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12900 __Pyx_XDECREF(__pyx_t_1);
12901 __Pyx_AddTraceback(
"PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12904 __Pyx_XGIVEREF(__pyx_r);
12905 __Pyx_RefNannyFinishContext();
12917 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
12918 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
12919 PyObject *__pyx_r = NULL;
12920 __Pyx_RefNannyDeclarations
12921 PyObject *__pyx_t_1 = NULL;
12922 PyObject *__pyx_t_2 = NULL;
12923 PyObject *__pyx_t_3 = NULL;
12924 PyObject *__pyx_t_4 = NULL;
12925 PyObject *__pyx_t_5 = NULL;
12926 PyObject *__pyx_t_6 = NULL;
12927 PyObject *__pyx_t_7 = NULL;
12928 PyObject *__pyx_t_8 = NULL;
12929 int __pyx_lineno = 0;
12930 const char *__pyx_filename = NULL;
12931 int __pyx_clineno = 0;
12932 __Pyx_RefNannySetupContext(
"cosh", 0);
12942 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12943 __Pyx_XGOTREF(__pyx_t_1);
12944 __Pyx_XGOTREF(__pyx_t_2);
12945 __Pyx_XGOTREF(__pyx_t_3);
12955 __Pyx_XDECREF(__pyx_r);
12956 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12957 __Pyx_GOTREF(__pyx_t_4);
12958 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__cosh);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12959 __Pyx_GOTREF(__pyx_t_5);
12960 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12961 __pyx_t_4 = PyTuple_New(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12962 __Pyx_GOTREF(__pyx_t_4);
12963 __Pyx_INCREF(__pyx_v_obj);
12964 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_obj);
12965 __Pyx_GIVEREF(__pyx_v_obj);
12966 __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
12967 __Pyx_GOTREF(__pyx_t_6);
12968 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12969 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
12970 __pyx_r = __pyx_t_6;
12972 goto __pyx_L7_try_return;
12974 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12975 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12976 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12977 goto __pyx_L10_try_end;
12978 __pyx_L7_try_return:;
12979 __Pyx_XGIVEREF(__pyx_t_1);
12980 __Pyx_XGIVEREF(__pyx_t_2);
12981 __Pyx_XGIVEREF(__pyx_t_3);
12982 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12985 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12986 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12987 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12997 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
12998 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
12999 __Pyx_GOTREF(__pyx_t_6);
13000 __Pyx_GOTREF(__pyx_t_4);
13001 __Pyx_GOTREF(__pyx_t_5);
13010 __Pyx_XDECREF(__pyx_r);
13011 __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
13012 __Pyx_GOTREF(__pyx_t_7);
13013 __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_7),
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;}
13014 __Pyx_GOTREF(__pyx_t_8);
13015 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13016 __pyx_r = __pyx_t_8;
13018 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13019 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13020 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13021 goto __pyx_L6_except_return;
13022 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13023 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13024 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13025 goto __pyx_L4_exception_handled;
13027 __pyx_L5_except_error:;
13028 __Pyx_XGIVEREF(__pyx_t_1);
13029 __Pyx_XGIVEREF(__pyx_t_2);
13030 __Pyx_XGIVEREF(__pyx_t_3);
13031 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13032 goto __pyx_L1_error;
13033 __pyx_L6_except_return:;
13034 __Pyx_XGIVEREF(__pyx_t_1);
13035 __Pyx_XGIVEREF(__pyx_t_2);
13036 __Pyx_XGIVEREF(__pyx_t_3);
13037 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13039 __pyx_L4_exception_handled:;
13040 __Pyx_XGIVEREF(__pyx_t_1);
13041 __Pyx_XGIVEREF(__pyx_t_2);
13042 __Pyx_XGIVEREF(__pyx_t_3);
13043 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13044 __pyx_L10_try_end:;
13047 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13050 __Pyx_XDECREF(__pyx_t_4);
13051 __Pyx_XDECREF(__pyx_t_5);
13052 __Pyx_XDECREF(__pyx_t_6);
13053 __Pyx_XDECREF(__pyx_t_7);
13054 __Pyx_XDECREF(__pyx_t_8);
13055 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13058 __Pyx_XGIVEREF(__pyx_r);
13059 __Pyx_RefNannyFinishContext();
13064 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
13065 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 ";
13066 static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13067 PyObject *__pyx_r = 0;
13068 __Pyx_RefNannyDeclarations
13069 __Pyx_RefNannySetupContext(
"cosh (wrapper)", 0);
13070 __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
13071 __Pyx_RefNannyFinishContext();
13083 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13084 PyObject *__pyx_r = NULL;
13085 __Pyx_RefNannyDeclarations
13086 PyObject *__pyx_t_1 = NULL;
13087 int __pyx_lineno = 0;
13088 const char *__pyx_filename = NULL;
13089 int __pyx_clineno = 0;
13090 __Pyx_RefNannySetupContext(
"cosh", 0);
13091 __Pyx_XDECREF(__pyx_r);
13092 __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;}
13093 __Pyx_GOTREF(__pyx_t_1);
13094 __pyx_r = __pyx_t_1;
13098 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13101 __Pyx_XDECREF(__pyx_t_1);
13102 __Pyx_AddTraceback(
"PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13105 __Pyx_XGIVEREF(__pyx_r);
13106 __Pyx_RefNannyFinishContext();
13118 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13119 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) {
13120 PyObject *__pyx_v_i = ((PyObject *)Py_None);
13121 PyObject *__pyx_r = NULL;
13122 __Pyx_RefNannyDeclarations
13125 PyObject *__pyx_t_3 = NULL;
13127 PyObject *__pyx_t_5 = NULL;
13128 PyObject *__pyx_t_6 = NULL;
13129 PyObject *__pyx_t_7 = NULL;
13130 PyObject *__pyx_t_8 = NULL;
13131 PyObject *__pyx_t_9 = NULL;
13132 PyObject *__pyx_t_10 = NULL;
13133 PyObject *__pyx_t_11 = NULL;
13134 int __pyx_lineno = 0;
13135 const char *__pyx_filename = NULL;
13136 int __pyx_clineno = 0;
13137 __Pyx_RefNannySetupContext(
"acosh", 0);
13138 if (__pyx_optional_args) {
13139 if (__pyx_optional_args->__pyx_n > 0) {
13140 __pyx_v_i = __pyx_optional_args->i;
13151 __pyx_t_1 = (__pyx_v_i == Py_None);
13152 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
13162 __Pyx_XDECREF(__pyx_r);
13163 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13164 __Pyx_GOTREF(__pyx_t_3);
13166 __pyx_t_4 =
acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13168 __Pyx_CppExn2PyErr();
13169 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13171 __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;}
13172 __Pyx_GOTREF(__pyx_t_5);
13173 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13174 __pyx_r = __pyx_t_5;
13189 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13190 __Pyx_XGOTREF(__pyx_t_6);
13191 __Pyx_XGOTREF(__pyx_t_7);
13192 __Pyx_XGOTREF(__pyx_t_8);
13202 __Pyx_XDECREF(__pyx_r);
13203 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13204 __Pyx_GOTREF(__pyx_t_5);
13205 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__acosh);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13206 __Pyx_GOTREF(__pyx_t_3);
13207 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13208 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13209 __Pyx_GOTREF(__pyx_t_5);
13210 __Pyx_INCREF(__pyx_v_obj);
13211 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
13212 __Pyx_GIVEREF(__pyx_v_obj);
13213 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13214 __Pyx_GOTREF(__pyx_t_9);
13215 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13216 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
13217 __pyx_r = __pyx_t_9;
13219 goto __pyx_L8_try_return;
13221 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13222 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13223 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13224 goto __pyx_L11_try_end;
13225 __pyx_L8_try_return:;
13226 __Pyx_XGIVEREF(__pyx_t_6);
13227 __Pyx_XGIVEREF(__pyx_t_7);
13228 __Pyx_XGIVEREF(__pyx_t_8);
13229 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13232 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13233 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13234 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13244 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13245 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13246 __Pyx_GOTREF(__pyx_t_9);
13247 __Pyx_GOTREF(__pyx_t_5);
13248 __Pyx_GOTREF(__pyx_t_3);
13257 __Pyx_XDECREF(__pyx_r);
13258 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13259 __Pyx_GOTREF(__pyx_t_10);
13260 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
13261 __Pyx_GOTREF(__pyx_t_11);
13262 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13263 __pyx_r = __pyx_t_11;
13265 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13266 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13267 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13268 goto __pyx_L7_except_return;
13269 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13270 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13271 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13272 goto __pyx_L5_exception_handled;
13274 __pyx_L6_except_error:;
13275 __Pyx_XGIVEREF(__pyx_t_6);
13276 __Pyx_XGIVEREF(__pyx_t_7);
13277 __Pyx_XGIVEREF(__pyx_t_8);
13278 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13279 goto __pyx_L1_error;
13280 __pyx_L7_except_return:;
13281 __Pyx_XGIVEREF(__pyx_t_6);
13282 __Pyx_XGIVEREF(__pyx_t_7);
13283 __Pyx_XGIVEREF(__pyx_t_8);
13284 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13286 __pyx_L5_exception_handled:;
13287 __Pyx_XGIVEREF(__pyx_t_6);
13288 __Pyx_XGIVEREF(__pyx_t_7);
13289 __Pyx_XGIVEREF(__pyx_t_8);
13290 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13291 __pyx_L11_try_end:;
13296 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13299 __Pyx_XDECREF(__pyx_t_3);
13300 __Pyx_XDECREF(__pyx_t_5);
13301 __Pyx_XDECREF(__pyx_t_9);
13302 __Pyx_XDECREF(__pyx_t_10);
13303 __Pyx_XDECREF(__pyx_t_11);
13304 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13307 __Pyx_XGIVEREF(__pyx_r);
13308 __Pyx_RefNannyFinishContext();
13313 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13314 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 ";
13315 static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13316 PyObject *__pyx_v_obj = 0;
13317 PyObject *__pyx_v_i = 0;
13318 int __pyx_lineno = 0;
13319 const char *__pyx_filename = NULL;
13320 int __pyx_clineno = 0;
13321 PyObject *__pyx_r = 0;
13322 __Pyx_RefNannyDeclarations
13323 __Pyx_RefNannySetupContext(
"acosh (wrapper)", 0);
13325 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
13326 PyObject* values[2] = {0,0};
13335 values[1] = ((PyObject *)Py_None);
13336 if (unlikely(__pyx_kwds)) {
13337 Py_ssize_t kw_args;
13338 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13339 switch (pos_args) {
13340 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13341 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13343 default:
goto __pyx_L5_argtuple_error;
13345 kw_args = PyDict_Size(__pyx_kwds);
13346 switch (pos_args) {
13348 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
13349 else goto __pyx_L5_argtuple_error;
13352 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
13353 if (value) { values[1] = value; kw_args--; }
13356 if (unlikely(kw_args > 0)) {
13357 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;}
13360 switch (PyTuple_GET_SIZE(__pyx_args)) {
13361 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13362 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13364 default:
goto __pyx_L5_argtuple_error;
13367 __pyx_v_obj = values[0];
13368 __pyx_v_i = values[1];
13370 goto __pyx_L4_argument_unpacking_done;
13371 __pyx_L5_argtuple_error:;
13372 __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;}
13374 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13375 __Pyx_RefNannyFinishContext();
13377 __pyx_L4_argument_unpacking_done:;
13378 __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
13379 __Pyx_RefNannyFinishContext();
13383 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13384 PyObject *__pyx_r = NULL;
13385 __Pyx_RefNannyDeclarations
13386 PyObject *__pyx_t_1 = NULL;
13387 struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
13388 int __pyx_lineno = 0;
13389 const char *__pyx_filename = NULL;
13390 int __pyx_clineno = 0;
13391 __Pyx_RefNannySetupContext(
"acosh", 0);
13392 __Pyx_XDECREF(__pyx_r);
13393 __pyx_t_2.__pyx_n = 1;
13394 __pyx_t_2.i = __pyx_v_i;
13395 __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;}
13396 __Pyx_GOTREF(__pyx_t_1);
13397 __pyx_r = __pyx_t_1;
13401 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13404 __Pyx_XDECREF(__pyx_t_1);
13405 __Pyx_AddTraceback(
"PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13408 __Pyx_XGIVEREF(__pyx_r);
13409 __Pyx_RefNannyFinishContext();
13421 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13422 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) {
13423 PyObject *__pyx_v_i = ((PyObject *)Py_None);
13424 PyObject *__pyx_r = NULL;
13425 __Pyx_RefNannyDeclarations
13428 PyObject *__pyx_t_3 = NULL;
13430 PyObject *__pyx_t_5 = NULL;
13431 PyObject *__pyx_t_6 = NULL;
13432 PyObject *__pyx_t_7 = NULL;
13433 PyObject *__pyx_t_8 = NULL;
13434 PyObject *__pyx_t_9 = NULL;
13435 PyObject *__pyx_t_10 = NULL;
13436 PyObject *__pyx_t_11 = NULL;
13437 int __pyx_lineno = 0;
13438 const char *__pyx_filename = NULL;
13439 int __pyx_clineno = 0;
13440 __Pyx_RefNannySetupContext(
"sin", 0);
13441 if (__pyx_optional_args) {
13442 if (__pyx_optional_args->__pyx_n > 0) {
13443 __pyx_v_i = __pyx_optional_args->i;
13454 __pyx_t_1 = (__pyx_v_i == Py_None);
13455 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
13465 __Pyx_XDECREF(__pyx_r);
13466 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13467 __Pyx_GOTREF(__pyx_t_3);
13469 __pyx_t_4 =
sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13471 __Pyx_CppExn2PyErr();
13472 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13474 __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;}
13475 __Pyx_GOTREF(__pyx_t_5);
13476 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13477 __pyx_r = __pyx_t_5;
13492 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13493 __Pyx_XGOTREF(__pyx_t_6);
13494 __Pyx_XGOTREF(__pyx_t_7);
13495 __Pyx_XGOTREF(__pyx_t_8);
13505 __Pyx_XDECREF(__pyx_r);
13506 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13507 __Pyx_GOTREF(__pyx_t_5);
13508 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__sin);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13509 __Pyx_GOTREF(__pyx_t_3);
13510 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13511 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13512 __Pyx_GOTREF(__pyx_t_5);
13513 __Pyx_INCREF(__pyx_v_obj);
13514 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
13515 __Pyx_GIVEREF(__pyx_v_obj);
13516 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13517 __Pyx_GOTREF(__pyx_t_9);
13518 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13519 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
13520 __pyx_r = __pyx_t_9;
13522 goto __pyx_L8_try_return;
13524 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13525 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13526 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13527 goto __pyx_L11_try_end;
13528 __pyx_L8_try_return:;
13529 __Pyx_XGIVEREF(__pyx_t_6);
13530 __Pyx_XGIVEREF(__pyx_t_7);
13531 __Pyx_XGIVEREF(__pyx_t_8);
13532 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13535 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13536 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13537 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13547 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13548 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13549 __Pyx_GOTREF(__pyx_t_9);
13550 __Pyx_GOTREF(__pyx_t_5);
13551 __Pyx_GOTREF(__pyx_t_3);
13560 __Pyx_XDECREF(__pyx_r);
13561 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13562 __Pyx_GOTREF(__pyx_t_10);
13563 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
13564 __Pyx_GOTREF(__pyx_t_11);
13565 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13566 __pyx_r = __pyx_t_11;
13568 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13569 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13570 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13571 goto __pyx_L7_except_return;
13572 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13573 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13574 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13575 goto __pyx_L5_exception_handled;
13577 __pyx_L6_except_error:;
13578 __Pyx_XGIVEREF(__pyx_t_6);
13579 __Pyx_XGIVEREF(__pyx_t_7);
13580 __Pyx_XGIVEREF(__pyx_t_8);
13581 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13582 goto __pyx_L1_error;
13583 __pyx_L7_except_return:;
13584 __Pyx_XGIVEREF(__pyx_t_6);
13585 __Pyx_XGIVEREF(__pyx_t_7);
13586 __Pyx_XGIVEREF(__pyx_t_8);
13587 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13589 __pyx_L5_exception_handled:;
13590 __Pyx_XGIVEREF(__pyx_t_6);
13591 __Pyx_XGIVEREF(__pyx_t_7);
13592 __Pyx_XGIVEREF(__pyx_t_8);
13593 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13594 __pyx_L11_try_end:;
13599 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13602 __Pyx_XDECREF(__pyx_t_3);
13603 __Pyx_XDECREF(__pyx_t_5);
13604 __Pyx_XDECREF(__pyx_t_9);
13605 __Pyx_XDECREF(__pyx_t_10);
13606 __Pyx_XDECREF(__pyx_t_11);
13607 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13610 __Pyx_XGIVEREF(__pyx_r);
13611 __Pyx_RefNannyFinishContext();
13616 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13617 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 ";
13618 static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13619 PyObject *__pyx_v_obj = 0;
13620 PyObject *__pyx_v_i = 0;
13621 int __pyx_lineno = 0;
13622 const char *__pyx_filename = NULL;
13623 int __pyx_clineno = 0;
13624 PyObject *__pyx_r = 0;
13625 __Pyx_RefNannyDeclarations
13626 __Pyx_RefNannySetupContext(
"sin (wrapper)", 0);
13628 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
13629 PyObject* values[2] = {0,0};
13638 values[1] = ((PyObject *)Py_None);
13639 if (unlikely(__pyx_kwds)) {
13640 Py_ssize_t kw_args;
13641 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13642 switch (pos_args) {
13643 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13644 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13646 default:
goto __pyx_L5_argtuple_error;
13648 kw_args = PyDict_Size(__pyx_kwds);
13649 switch (pos_args) {
13651 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
13652 else goto __pyx_L5_argtuple_error;
13655 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
13656 if (value) { values[1] = value; kw_args--; }
13659 if (unlikely(kw_args > 0)) {
13660 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;}
13663 switch (PyTuple_GET_SIZE(__pyx_args)) {
13664 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13665 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13667 default:
goto __pyx_L5_argtuple_error;
13670 __pyx_v_obj = values[0];
13671 __pyx_v_i = values[1];
13673 goto __pyx_L4_argument_unpacking_done;
13674 __pyx_L5_argtuple_error:;
13675 __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;}
13677 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13678 __Pyx_RefNannyFinishContext();
13680 __pyx_L4_argument_unpacking_done:;
13681 __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
13682 __Pyx_RefNannyFinishContext();
13686 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13687 PyObject *__pyx_r = NULL;
13688 __Pyx_RefNannyDeclarations
13689 PyObject *__pyx_t_1 = NULL;
13690 struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
13691 int __pyx_lineno = 0;
13692 const char *__pyx_filename = NULL;
13693 int __pyx_clineno = 0;
13694 __Pyx_RefNannySetupContext(
"sin", 0);
13695 __Pyx_XDECREF(__pyx_r);
13696 __pyx_t_2.__pyx_n = 1;
13697 __pyx_t_2.i = __pyx_v_i;
13698 __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;}
13699 __Pyx_GOTREF(__pyx_t_1);
13700 __pyx_r = __pyx_t_1;
13704 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13707 __Pyx_XDECREF(__pyx_t_1);
13708 __Pyx_AddTraceback(
"PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13711 __Pyx_XGIVEREF(__pyx_r);
13712 __Pyx_RefNannyFinishContext();
13724 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13725 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) {
13726 PyObject *__pyx_v_i = ((PyObject *)Py_None);
13727 PyObject *__pyx_r = NULL;
13728 __Pyx_RefNannyDeclarations
13731 PyObject *__pyx_t_3 = NULL;
13733 PyObject *__pyx_t_5 = NULL;
13734 PyObject *__pyx_t_6 = NULL;
13735 PyObject *__pyx_t_7 = NULL;
13736 PyObject *__pyx_t_8 = NULL;
13737 PyObject *__pyx_t_9 = NULL;
13738 PyObject *__pyx_t_10 = NULL;
13739 PyObject *__pyx_t_11 = NULL;
13740 int __pyx_lineno = 0;
13741 const char *__pyx_filename = NULL;
13742 int __pyx_clineno = 0;
13743 __Pyx_RefNannySetupContext(
"asin", 0);
13744 if (__pyx_optional_args) {
13745 if (__pyx_optional_args->__pyx_n > 0) {
13746 __pyx_v_i = __pyx_optional_args->i;
13757 __pyx_t_1 = (__pyx_v_i == Py_None);
13758 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
13768 __Pyx_XDECREF(__pyx_r);
13769 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13770 __Pyx_GOTREF(__pyx_t_3);
13772 __pyx_t_4 =
asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13774 __Pyx_CppExn2PyErr();
13775 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
13777 __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;}
13778 __Pyx_GOTREF(__pyx_t_5);
13779 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13780 __pyx_r = __pyx_t_5;
13795 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13796 __Pyx_XGOTREF(__pyx_t_6);
13797 __Pyx_XGOTREF(__pyx_t_7);
13798 __Pyx_XGOTREF(__pyx_t_8);
13808 __Pyx_XDECREF(__pyx_r);
13809 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13810 __Pyx_GOTREF(__pyx_t_5);
13811 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__asin);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13812 __Pyx_GOTREF(__pyx_t_3);
13813 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13814 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13815 __Pyx_GOTREF(__pyx_t_5);
13816 __Pyx_INCREF(__pyx_v_obj);
13817 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
13818 __Pyx_GIVEREF(__pyx_v_obj);
13819 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
13820 __Pyx_GOTREF(__pyx_t_9);
13821 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13822 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
13823 __pyx_r = __pyx_t_9;
13825 goto __pyx_L8_try_return;
13827 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13828 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13829 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13830 goto __pyx_L11_try_end;
13831 __pyx_L8_try_return:;
13832 __Pyx_XGIVEREF(__pyx_t_6);
13833 __Pyx_XGIVEREF(__pyx_t_7);
13834 __Pyx_XGIVEREF(__pyx_t_8);
13835 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13838 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13839 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13840 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13850 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13851 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13852 __Pyx_GOTREF(__pyx_t_9);
13853 __Pyx_GOTREF(__pyx_t_5);
13854 __Pyx_GOTREF(__pyx_t_3);
13863 __Pyx_XDECREF(__pyx_r);
13864 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
13865 __Pyx_GOTREF(__pyx_t_10);
13866 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
13867 __Pyx_GOTREF(__pyx_t_11);
13868 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13869 __pyx_r = __pyx_t_11;
13871 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13872 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13873 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13874 goto __pyx_L7_except_return;
13875 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13876 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13877 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13878 goto __pyx_L5_exception_handled;
13880 __pyx_L6_except_error:;
13881 __Pyx_XGIVEREF(__pyx_t_6);
13882 __Pyx_XGIVEREF(__pyx_t_7);
13883 __Pyx_XGIVEREF(__pyx_t_8);
13884 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13885 goto __pyx_L1_error;
13886 __pyx_L7_except_return:;
13887 __Pyx_XGIVEREF(__pyx_t_6);
13888 __Pyx_XGIVEREF(__pyx_t_7);
13889 __Pyx_XGIVEREF(__pyx_t_8);
13890 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13892 __pyx_L5_exception_handled:;
13893 __Pyx_XGIVEREF(__pyx_t_6);
13894 __Pyx_XGIVEREF(__pyx_t_7);
13895 __Pyx_XGIVEREF(__pyx_t_8);
13896 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13897 __pyx_L11_try_end:;
13902 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13905 __Pyx_XDECREF(__pyx_t_3);
13906 __Pyx_XDECREF(__pyx_t_5);
13907 __Pyx_XDECREF(__pyx_t_9);
13908 __Pyx_XDECREF(__pyx_t_10);
13909 __Pyx_XDECREF(__pyx_t_11);
13910 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13913 __Pyx_XGIVEREF(__pyx_r);
13914 __Pyx_RefNannyFinishContext();
13919 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
13920 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 ";
13921 static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13922 PyObject *__pyx_v_obj = 0;
13923 PyObject *__pyx_v_i = 0;
13924 int __pyx_lineno = 0;
13925 const char *__pyx_filename = NULL;
13926 int __pyx_clineno = 0;
13927 PyObject *__pyx_r = 0;
13928 __Pyx_RefNannyDeclarations
13929 __Pyx_RefNannySetupContext(
"asin (wrapper)", 0);
13931 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
13932 PyObject* values[2] = {0,0};
13941 values[1] = ((PyObject *)Py_None);
13942 if (unlikely(__pyx_kwds)) {
13943 Py_ssize_t kw_args;
13944 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13945 switch (pos_args) {
13946 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13947 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13949 default:
goto __pyx_L5_argtuple_error;
13951 kw_args = PyDict_Size(__pyx_kwds);
13952 switch (pos_args) {
13954 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
13955 else goto __pyx_L5_argtuple_error;
13958 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
13959 if (value) { values[1] = value; kw_args--; }
13962 if (unlikely(kw_args > 0)) {
13963 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;}
13966 switch (PyTuple_GET_SIZE(__pyx_args)) {
13967 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13968 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13970 default:
goto __pyx_L5_argtuple_error;
13973 __pyx_v_obj = values[0];
13974 __pyx_v_i = values[1];
13976 goto __pyx_L4_argument_unpacking_done;
13977 __pyx_L5_argtuple_error:;
13978 __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;}
13980 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13981 __Pyx_RefNannyFinishContext();
13983 __pyx_L4_argument_unpacking_done:;
13984 __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
13985 __Pyx_RefNannyFinishContext();
13989 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13990 PyObject *__pyx_r = NULL;
13991 __Pyx_RefNannyDeclarations
13992 PyObject *__pyx_t_1 = NULL;
13993 struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
13994 int __pyx_lineno = 0;
13995 const char *__pyx_filename = NULL;
13996 int __pyx_clineno = 0;
13997 __Pyx_RefNannySetupContext(
"asin", 0);
13998 __Pyx_XDECREF(__pyx_r);
13999 __pyx_t_2.__pyx_n = 1;
14000 __pyx_t_2.i = __pyx_v_i;
14001 __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;}
14002 __Pyx_GOTREF(__pyx_t_1);
14003 __pyx_r = __pyx_t_1;
14007 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14010 __Pyx_XDECREF(__pyx_t_1);
14011 __Pyx_AddTraceback(
"PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14014 __Pyx_XGIVEREF(__pyx_r);
14015 __Pyx_RefNannyFinishContext();
14027 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
14028 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
14029 PyObject *__pyx_r = NULL;
14030 __Pyx_RefNannyDeclarations
14031 PyObject *__pyx_t_1 = NULL;
14032 PyObject *__pyx_t_2 = NULL;
14033 PyObject *__pyx_t_3 = NULL;
14034 PyObject *__pyx_t_4 = NULL;
14035 PyObject *__pyx_t_5 = NULL;
14036 PyObject *__pyx_t_6 = NULL;
14037 PyObject *__pyx_t_7 = NULL;
14038 PyObject *__pyx_t_8 = NULL;
14039 int __pyx_lineno = 0;
14040 const char *__pyx_filename = NULL;
14041 int __pyx_clineno = 0;
14042 __Pyx_RefNannySetupContext(
"sinh", 0);
14052 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14053 __Pyx_XGOTREF(__pyx_t_1);
14054 __Pyx_XGOTREF(__pyx_t_2);
14055 __Pyx_XGOTREF(__pyx_t_3);
14065 __Pyx_XDECREF(__pyx_r);
14066 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14067 __Pyx_GOTREF(__pyx_t_4);
14068 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__sinh);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14069 __Pyx_GOTREF(__pyx_t_5);
14070 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14071 __pyx_t_4 = PyTuple_New(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14072 __Pyx_GOTREF(__pyx_t_4);
14073 __Pyx_INCREF(__pyx_v_obj);
14074 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_obj);
14075 __Pyx_GIVEREF(__pyx_v_obj);
14076 __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
14077 __Pyx_GOTREF(__pyx_t_6);
14078 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14079 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
14080 __pyx_r = __pyx_t_6;
14082 goto __pyx_L7_try_return;
14084 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14085 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14086 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14087 goto __pyx_L10_try_end;
14088 __pyx_L7_try_return:;
14089 __Pyx_XGIVEREF(__pyx_t_1);
14090 __Pyx_XGIVEREF(__pyx_t_2);
14091 __Pyx_XGIVEREF(__pyx_t_3);
14092 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14095 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14096 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14097 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14107 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14108 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
14109 __Pyx_GOTREF(__pyx_t_6);
14110 __Pyx_GOTREF(__pyx_t_4);
14111 __Pyx_GOTREF(__pyx_t_5);
14120 __Pyx_XDECREF(__pyx_r);
14121 __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
14122 __Pyx_GOTREF(__pyx_t_7);
14123 __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_7),
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;}
14124 __Pyx_GOTREF(__pyx_t_8);
14125 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14126 __pyx_r = __pyx_t_8;
14128 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14129 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14130 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14131 goto __pyx_L6_except_return;
14132 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14133 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14134 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14135 goto __pyx_L4_exception_handled;
14137 __pyx_L5_except_error:;
14138 __Pyx_XGIVEREF(__pyx_t_1);
14139 __Pyx_XGIVEREF(__pyx_t_2);
14140 __Pyx_XGIVEREF(__pyx_t_3);
14141 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14142 goto __pyx_L1_error;
14143 __pyx_L6_except_return:;
14144 __Pyx_XGIVEREF(__pyx_t_1);
14145 __Pyx_XGIVEREF(__pyx_t_2);
14146 __Pyx_XGIVEREF(__pyx_t_3);
14147 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14149 __pyx_L4_exception_handled:;
14150 __Pyx_XGIVEREF(__pyx_t_1);
14151 __Pyx_XGIVEREF(__pyx_t_2);
14152 __Pyx_XGIVEREF(__pyx_t_3);
14153 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14154 __pyx_L10_try_end:;
14157 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14160 __Pyx_XDECREF(__pyx_t_4);
14161 __Pyx_XDECREF(__pyx_t_5);
14162 __Pyx_XDECREF(__pyx_t_6);
14163 __Pyx_XDECREF(__pyx_t_7);
14164 __Pyx_XDECREF(__pyx_t_8);
14165 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14168 __Pyx_XGIVEREF(__pyx_r);
14169 __Pyx_RefNannyFinishContext();
14174 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
14175 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 ";
14176 static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14177 PyObject *__pyx_r = 0;
14178 __Pyx_RefNannyDeclarations
14179 __Pyx_RefNannySetupContext(
"sinh (wrapper)", 0);
14180 __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
14181 __Pyx_RefNannyFinishContext();
14193 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14194 PyObject *__pyx_r = NULL;
14195 __Pyx_RefNannyDeclarations
14196 PyObject *__pyx_t_1 = NULL;
14197 int __pyx_lineno = 0;
14198 const char *__pyx_filename = NULL;
14199 int __pyx_clineno = 0;
14200 __Pyx_RefNannySetupContext(
"sinh", 0);
14201 __Pyx_XDECREF(__pyx_r);
14202 __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;}
14203 __Pyx_GOTREF(__pyx_t_1);
14204 __pyx_r = __pyx_t_1;
14208 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14211 __Pyx_XDECREF(__pyx_t_1);
14212 __Pyx_AddTraceback(
"PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14215 __Pyx_XGIVEREF(__pyx_r);
14216 __Pyx_RefNannyFinishContext();
14228 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14229 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) {
14230 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14231 PyObject *__pyx_r = NULL;
14232 __Pyx_RefNannyDeclarations
14235 PyObject *__pyx_t_3 = NULL;
14237 PyObject *__pyx_t_5 = NULL;
14238 PyObject *__pyx_t_6 = NULL;
14239 PyObject *__pyx_t_7 = NULL;
14240 PyObject *__pyx_t_8 = NULL;
14241 PyObject *__pyx_t_9 = NULL;
14242 PyObject *__pyx_t_10 = NULL;
14243 PyObject *__pyx_t_11 = NULL;
14244 int __pyx_lineno = 0;
14245 const char *__pyx_filename = NULL;
14246 int __pyx_clineno = 0;
14247 __Pyx_RefNannySetupContext(
"asinh", 0);
14248 if (__pyx_optional_args) {
14249 if (__pyx_optional_args->__pyx_n > 0) {
14250 __pyx_v_i = __pyx_optional_args->i;
14261 __pyx_t_1 = (__pyx_v_i == Py_None);
14262 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
14272 __Pyx_XDECREF(__pyx_r);
14273 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14274 __Pyx_GOTREF(__pyx_t_3);
14276 __pyx_t_4 =
asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14278 __Pyx_CppExn2PyErr();
14279 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14281 __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;}
14282 __Pyx_GOTREF(__pyx_t_5);
14283 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14284 __pyx_r = __pyx_t_5;
14299 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14300 __Pyx_XGOTREF(__pyx_t_6);
14301 __Pyx_XGOTREF(__pyx_t_7);
14302 __Pyx_XGOTREF(__pyx_t_8);
14312 __Pyx_XDECREF(__pyx_r);
14313 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14314 __Pyx_GOTREF(__pyx_t_5);
14315 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__asinh);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14316 __Pyx_GOTREF(__pyx_t_3);
14317 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14318 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14319 __Pyx_GOTREF(__pyx_t_5);
14320 __Pyx_INCREF(__pyx_v_obj);
14321 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
14322 __Pyx_GIVEREF(__pyx_v_obj);
14323 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14324 __Pyx_GOTREF(__pyx_t_9);
14325 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14326 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
14327 __pyx_r = __pyx_t_9;
14329 goto __pyx_L8_try_return;
14331 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14332 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14333 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
14334 goto __pyx_L11_try_end;
14335 __pyx_L8_try_return:;
14336 __Pyx_XGIVEREF(__pyx_t_6);
14337 __Pyx_XGIVEREF(__pyx_t_7);
14338 __Pyx_XGIVEREF(__pyx_t_8);
14339 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14342 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14343 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14344 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14354 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14355 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14356 __Pyx_GOTREF(__pyx_t_9);
14357 __Pyx_GOTREF(__pyx_t_5);
14358 __Pyx_GOTREF(__pyx_t_3);
14367 __Pyx_XDECREF(__pyx_r);
14368 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14369 __Pyx_GOTREF(__pyx_t_10);
14370 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
14371 __Pyx_GOTREF(__pyx_t_11);
14372 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14373 __pyx_r = __pyx_t_11;
14375 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14376 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14377 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14378 goto __pyx_L7_except_return;
14379 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14380 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14381 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14382 goto __pyx_L5_exception_handled;
14384 __pyx_L6_except_error:;
14385 __Pyx_XGIVEREF(__pyx_t_6);
14386 __Pyx_XGIVEREF(__pyx_t_7);
14387 __Pyx_XGIVEREF(__pyx_t_8);
14388 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14389 goto __pyx_L1_error;
14390 __pyx_L7_except_return:;
14391 __Pyx_XGIVEREF(__pyx_t_6);
14392 __Pyx_XGIVEREF(__pyx_t_7);
14393 __Pyx_XGIVEREF(__pyx_t_8);
14394 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14396 __pyx_L5_exception_handled:;
14397 __Pyx_XGIVEREF(__pyx_t_6);
14398 __Pyx_XGIVEREF(__pyx_t_7);
14399 __Pyx_XGIVEREF(__pyx_t_8);
14400 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14401 __pyx_L11_try_end:;
14406 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14409 __Pyx_XDECREF(__pyx_t_3);
14410 __Pyx_XDECREF(__pyx_t_5);
14411 __Pyx_XDECREF(__pyx_t_9);
14412 __Pyx_XDECREF(__pyx_t_10);
14413 __Pyx_XDECREF(__pyx_t_11);
14414 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14417 __Pyx_XGIVEREF(__pyx_r);
14418 __Pyx_RefNannyFinishContext();
14423 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14424 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 ";
14425 static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14426 PyObject *__pyx_v_obj = 0;
14427 PyObject *__pyx_v_i = 0;
14428 int __pyx_lineno = 0;
14429 const char *__pyx_filename = NULL;
14430 int __pyx_clineno = 0;
14431 PyObject *__pyx_r = 0;
14432 __Pyx_RefNannyDeclarations
14433 __Pyx_RefNannySetupContext(
"asinh (wrapper)", 0);
14435 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
14436 PyObject* values[2] = {0,0};
14445 values[1] = ((PyObject *)Py_None);
14446 if (unlikely(__pyx_kwds)) {
14447 Py_ssize_t kw_args;
14448 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14449 switch (pos_args) {
14450 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14451 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14453 default:
goto __pyx_L5_argtuple_error;
14455 kw_args = PyDict_Size(__pyx_kwds);
14456 switch (pos_args) {
14458 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
14459 else goto __pyx_L5_argtuple_error;
14462 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
14463 if (value) { values[1] = value; kw_args--; }
14466 if (unlikely(kw_args > 0)) {
14467 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;}
14470 switch (PyTuple_GET_SIZE(__pyx_args)) {
14471 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14472 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14474 default:
goto __pyx_L5_argtuple_error;
14477 __pyx_v_obj = values[0];
14478 __pyx_v_i = values[1];
14480 goto __pyx_L4_argument_unpacking_done;
14481 __pyx_L5_argtuple_error:;
14482 __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;}
14484 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14485 __Pyx_RefNannyFinishContext();
14487 __pyx_L4_argument_unpacking_done:;
14488 __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
14489 __Pyx_RefNannyFinishContext();
14493 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14494 PyObject *__pyx_r = NULL;
14495 __Pyx_RefNannyDeclarations
14496 PyObject *__pyx_t_1 = NULL;
14497 struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
14498 int __pyx_lineno = 0;
14499 const char *__pyx_filename = NULL;
14500 int __pyx_clineno = 0;
14501 __Pyx_RefNannySetupContext(
"asinh", 0);
14502 __Pyx_XDECREF(__pyx_r);
14503 __pyx_t_2.__pyx_n = 1;
14504 __pyx_t_2.i = __pyx_v_i;
14505 __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;}
14506 __Pyx_GOTREF(__pyx_t_1);
14507 __pyx_r = __pyx_t_1;
14511 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14514 __Pyx_XDECREF(__pyx_t_1);
14515 __Pyx_AddTraceback(
"PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14518 __Pyx_XGIVEREF(__pyx_r);
14519 __Pyx_RefNannyFinishContext();
14531 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14532 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) {
14533 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14534 PyObject *__pyx_r = NULL;
14535 __Pyx_RefNannyDeclarations
14538 PyObject *__pyx_t_3 = NULL;
14540 PyObject *__pyx_t_5 = NULL;
14541 PyObject *__pyx_t_6 = NULL;
14542 PyObject *__pyx_t_7 = NULL;
14543 PyObject *__pyx_t_8 = NULL;
14544 PyObject *__pyx_t_9 = NULL;
14545 PyObject *__pyx_t_10 = NULL;
14546 PyObject *__pyx_t_11 = NULL;
14547 int __pyx_lineno = 0;
14548 const char *__pyx_filename = NULL;
14549 int __pyx_clineno = 0;
14550 __Pyx_RefNannySetupContext(
"tan", 0);
14551 if (__pyx_optional_args) {
14552 if (__pyx_optional_args->__pyx_n > 0) {
14553 __pyx_v_i = __pyx_optional_args->i;
14564 __pyx_t_1 = (__pyx_v_i == Py_None);
14565 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
14575 __Pyx_XDECREF(__pyx_r);
14576 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14577 __Pyx_GOTREF(__pyx_t_3);
14579 __pyx_t_4 =
tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14581 __Pyx_CppExn2PyErr();
14582 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14584 __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;}
14585 __Pyx_GOTREF(__pyx_t_5);
14586 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14587 __pyx_r = __pyx_t_5;
14602 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14603 __Pyx_XGOTREF(__pyx_t_6);
14604 __Pyx_XGOTREF(__pyx_t_7);
14605 __Pyx_XGOTREF(__pyx_t_8);
14615 __Pyx_XDECREF(__pyx_r);
14616 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14617 __Pyx_GOTREF(__pyx_t_5);
14618 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__tan);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14619 __Pyx_GOTREF(__pyx_t_3);
14620 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14621 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14622 __Pyx_GOTREF(__pyx_t_5);
14623 __Pyx_INCREF(__pyx_v_obj);
14624 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
14625 __Pyx_GIVEREF(__pyx_v_obj);
14626 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14627 __Pyx_GOTREF(__pyx_t_9);
14628 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14629 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
14630 __pyx_r = __pyx_t_9;
14632 goto __pyx_L8_try_return;
14634 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14635 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14636 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
14637 goto __pyx_L11_try_end;
14638 __pyx_L8_try_return:;
14639 __Pyx_XGIVEREF(__pyx_t_6);
14640 __Pyx_XGIVEREF(__pyx_t_7);
14641 __Pyx_XGIVEREF(__pyx_t_8);
14642 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14645 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14646 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14647 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14657 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
14658 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14659 __Pyx_GOTREF(__pyx_t_9);
14660 __Pyx_GOTREF(__pyx_t_5);
14661 __Pyx_GOTREF(__pyx_t_3);
14670 __Pyx_XDECREF(__pyx_r);
14671 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14672 __Pyx_GOTREF(__pyx_t_10);
14673 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
14674 __Pyx_GOTREF(__pyx_t_11);
14675 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14676 __pyx_r = __pyx_t_11;
14678 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14679 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14680 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14681 goto __pyx_L7_except_return;
14682 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14683 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14684 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14685 goto __pyx_L5_exception_handled;
14687 __pyx_L6_except_error:;
14688 __Pyx_XGIVEREF(__pyx_t_6);
14689 __Pyx_XGIVEREF(__pyx_t_7);
14690 __Pyx_XGIVEREF(__pyx_t_8);
14691 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14692 goto __pyx_L1_error;
14693 __pyx_L7_except_return:;
14694 __Pyx_XGIVEREF(__pyx_t_6);
14695 __Pyx_XGIVEREF(__pyx_t_7);
14696 __Pyx_XGIVEREF(__pyx_t_8);
14697 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14699 __pyx_L5_exception_handled:;
14700 __Pyx_XGIVEREF(__pyx_t_6);
14701 __Pyx_XGIVEREF(__pyx_t_7);
14702 __Pyx_XGIVEREF(__pyx_t_8);
14703 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14704 __pyx_L11_try_end:;
14709 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14712 __Pyx_XDECREF(__pyx_t_3);
14713 __Pyx_XDECREF(__pyx_t_5);
14714 __Pyx_XDECREF(__pyx_t_9);
14715 __Pyx_XDECREF(__pyx_t_10);
14716 __Pyx_XDECREF(__pyx_t_11);
14717 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
14720 __Pyx_XGIVEREF(__pyx_r);
14721 __Pyx_RefNannyFinishContext();
14726 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14727 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 ";
14728 static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14729 PyObject *__pyx_v_obj = 0;
14730 PyObject *__pyx_v_i = 0;
14731 int __pyx_lineno = 0;
14732 const char *__pyx_filename = NULL;
14733 int __pyx_clineno = 0;
14734 PyObject *__pyx_r = 0;
14735 __Pyx_RefNannyDeclarations
14736 __Pyx_RefNannySetupContext(
"tan (wrapper)", 0);
14738 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
14739 PyObject* values[2] = {0,0};
14748 values[1] = ((PyObject *)Py_None);
14749 if (unlikely(__pyx_kwds)) {
14750 Py_ssize_t kw_args;
14751 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14752 switch (pos_args) {
14753 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14754 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14756 default:
goto __pyx_L5_argtuple_error;
14758 kw_args = PyDict_Size(__pyx_kwds);
14759 switch (pos_args) {
14761 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
14762 else goto __pyx_L5_argtuple_error;
14765 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
14766 if (value) { values[1] = value; kw_args--; }
14769 if (unlikely(kw_args > 0)) {
14770 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;}
14773 switch (PyTuple_GET_SIZE(__pyx_args)) {
14774 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14775 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14777 default:
goto __pyx_L5_argtuple_error;
14780 __pyx_v_obj = values[0];
14781 __pyx_v_i = values[1];
14783 goto __pyx_L4_argument_unpacking_done;
14784 __pyx_L5_argtuple_error:;
14785 __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;}
14787 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
14788 __Pyx_RefNannyFinishContext();
14790 __pyx_L4_argument_unpacking_done:;
14791 __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
14792 __Pyx_RefNannyFinishContext();
14796 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14797 PyObject *__pyx_r = NULL;
14798 __Pyx_RefNannyDeclarations
14799 PyObject *__pyx_t_1 = NULL;
14800 struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
14801 int __pyx_lineno = 0;
14802 const char *__pyx_filename = NULL;
14803 int __pyx_clineno = 0;
14804 __Pyx_RefNannySetupContext(
"tan", 0);
14805 __Pyx_XDECREF(__pyx_r);
14806 __pyx_t_2.__pyx_n = 1;
14807 __pyx_t_2.i = __pyx_v_i;
14808 __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;}
14809 __Pyx_GOTREF(__pyx_t_1);
14810 __pyx_r = __pyx_t_1;
14814 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14817 __Pyx_XDECREF(__pyx_t_1);
14818 __Pyx_AddTraceback(
"PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
14821 __Pyx_XGIVEREF(__pyx_r);
14822 __Pyx_RefNannyFinishContext();
14834 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
14835 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) {
14836 PyObject *__pyx_v_i = ((PyObject *)Py_None);
14837 PyObject *__pyx_r = NULL;
14838 __Pyx_RefNannyDeclarations
14841 PyObject *__pyx_t_3 = NULL;
14843 PyObject *__pyx_t_5 = NULL;
14844 PyObject *__pyx_t_6 = NULL;
14845 PyObject *__pyx_t_7 = NULL;
14846 PyObject *__pyx_t_8 = NULL;
14847 PyObject *__pyx_t_9 = NULL;
14848 PyObject *__pyx_t_10 = NULL;
14849 PyObject *__pyx_t_11 = NULL;
14850 int __pyx_lineno = 0;
14851 const char *__pyx_filename = NULL;
14852 int __pyx_clineno = 0;
14853 __Pyx_RefNannySetupContext(
"atan", 0);
14854 if (__pyx_optional_args) {
14855 if (__pyx_optional_args->__pyx_n > 0) {
14856 __pyx_v_i = __pyx_optional_args->i;
14867 __pyx_t_1 = (__pyx_v_i == Py_None);
14868 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
14878 __Pyx_XDECREF(__pyx_r);
14879 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14880 __Pyx_GOTREF(__pyx_t_3);
14882 __pyx_t_4 =
atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14884 __Pyx_CppExn2PyErr();
14885 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
14887 __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;}
14888 __Pyx_GOTREF(__pyx_t_5);
14889 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14890 __pyx_r = __pyx_t_5;
14905 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14906 __Pyx_XGOTREF(__pyx_t_6);
14907 __Pyx_XGOTREF(__pyx_t_7);
14908 __Pyx_XGOTREF(__pyx_t_8);
14918 __Pyx_XDECREF(__pyx_r);
14919 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14920 __Pyx_GOTREF(__pyx_t_5);
14921 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__atan);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14922 __Pyx_GOTREF(__pyx_t_3);
14923 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14924 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14925 __Pyx_GOTREF(__pyx_t_5);
14926 __Pyx_INCREF(__pyx_v_obj);
14927 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
14928 __Pyx_GIVEREF(__pyx_v_obj);
14929 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
14930 __Pyx_GOTREF(__pyx_t_9);
14931 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14932 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
14933 __pyx_r = __pyx_t_9;
14935 goto __pyx_L8_try_return;
14937 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14938 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14939 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
14940 goto __pyx_L11_try_end;
14941 __pyx_L8_try_return:;
14942 __Pyx_XGIVEREF(__pyx_t_6);
14943 __Pyx_XGIVEREF(__pyx_t_7);
14944 __Pyx_XGIVEREF(__pyx_t_8);
14945 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14948 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14949 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14950 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14960 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
14961 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14962 __Pyx_GOTREF(__pyx_t_9);
14963 __Pyx_GOTREF(__pyx_t_5);
14964 __Pyx_GOTREF(__pyx_t_3);
14973 __Pyx_XDECREF(__pyx_r);
14974 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
14975 __Pyx_GOTREF(__pyx_t_10);
14976 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
14977 __Pyx_GOTREF(__pyx_t_11);
14978 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14979 __pyx_r = __pyx_t_11;
14981 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14982 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14983 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14984 goto __pyx_L7_except_return;
14985 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14986 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14987 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14988 goto __pyx_L5_exception_handled;
14990 __pyx_L6_except_error:;
14991 __Pyx_XGIVEREF(__pyx_t_6);
14992 __Pyx_XGIVEREF(__pyx_t_7);
14993 __Pyx_XGIVEREF(__pyx_t_8);
14994 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14995 goto __pyx_L1_error;
14996 __pyx_L7_except_return:;
14997 __Pyx_XGIVEREF(__pyx_t_6);
14998 __Pyx_XGIVEREF(__pyx_t_7);
14999 __Pyx_XGIVEREF(__pyx_t_8);
15000 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15002 __pyx_L5_exception_handled:;
15003 __Pyx_XGIVEREF(__pyx_t_6);
15004 __Pyx_XGIVEREF(__pyx_t_7);
15005 __Pyx_XGIVEREF(__pyx_t_8);
15006 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15007 __pyx_L11_try_end:;
15012 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15015 __Pyx_XDECREF(__pyx_t_3);
15016 __Pyx_XDECREF(__pyx_t_5);
15017 __Pyx_XDECREF(__pyx_t_9);
15018 __Pyx_XDECREF(__pyx_t_10);
15019 __Pyx_XDECREF(__pyx_t_11);
15020 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15023 __Pyx_XGIVEREF(__pyx_r);
15024 __Pyx_RefNannyFinishContext();
15029 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15030 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 ";
15031 static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15032 PyObject *__pyx_v_obj = 0;
15033 PyObject *__pyx_v_i = 0;
15034 int __pyx_lineno = 0;
15035 const char *__pyx_filename = NULL;
15036 int __pyx_clineno = 0;
15037 PyObject *__pyx_r = 0;
15038 __Pyx_RefNannyDeclarations
15039 __Pyx_RefNannySetupContext(
"atan (wrapper)", 0);
15041 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
15042 PyObject* values[2] = {0,0};
15051 values[1] = ((PyObject *)Py_None);
15052 if (unlikely(__pyx_kwds)) {
15053 Py_ssize_t kw_args;
15054 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15055 switch (pos_args) {
15056 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15057 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15059 default:
goto __pyx_L5_argtuple_error;
15061 kw_args = PyDict_Size(__pyx_kwds);
15062 switch (pos_args) {
15064 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
15065 else goto __pyx_L5_argtuple_error;
15068 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
15069 if (value) { values[1] = value; kw_args--; }
15072 if (unlikely(kw_args > 0)) {
15073 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;}
15076 switch (PyTuple_GET_SIZE(__pyx_args)) {
15077 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15078 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15080 default:
goto __pyx_L5_argtuple_error;
15083 __pyx_v_obj = values[0];
15084 __pyx_v_i = values[1];
15086 goto __pyx_L4_argument_unpacking_done;
15087 __pyx_L5_argtuple_error:;
15088 __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;}
15090 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15091 __Pyx_RefNannyFinishContext();
15093 __pyx_L4_argument_unpacking_done:;
15094 __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
15095 __Pyx_RefNannyFinishContext();
15099 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15100 PyObject *__pyx_r = NULL;
15101 __Pyx_RefNannyDeclarations
15102 PyObject *__pyx_t_1 = NULL;
15103 struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
15104 int __pyx_lineno = 0;
15105 const char *__pyx_filename = NULL;
15106 int __pyx_clineno = 0;
15107 __Pyx_RefNannySetupContext(
"atan", 0);
15108 __Pyx_XDECREF(__pyx_r);
15109 __pyx_t_2.__pyx_n = 1;
15110 __pyx_t_2.i = __pyx_v_i;
15111 __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;}
15112 __Pyx_GOTREF(__pyx_t_1);
15113 __pyx_r = __pyx_t_1;
15117 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15120 __Pyx_XDECREF(__pyx_t_1);
15121 __Pyx_AddTraceback(
"PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15124 __Pyx_XGIVEREF(__pyx_r);
15125 __Pyx_RefNannyFinishContext();
15137 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15138 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
15139 PyObject *__pyx_r = NULL;
15140 __Pyx_RefNannyDeclarations
15141 PyObject *__pyx_t_1 = NULL;
15142 PyObject *__pyx_t_2 = NULL;
15143 PyObject *__pyx_t_3 = NULL;
15144 PyObject *__pyx_t_4 = NULL;
15145 PyObject *__pyx_t_5 = NULL;
15146 PyObject *__pyx_t_6 = NULL;
15147 PyObject *__pyx_t_7 = NULL;
15148 PyObject *__pyx_t_8 = NULL;
15149 int __pyx_lineno = 0;
15150 const char *__pyx_filename = NULL;
15151 int __pyx_clineno = 0;
15152 __Pyx_RefNannySetupContext(
"tanh", 0);
15162 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15163 __Pyx_XGOTREF(__pyx_t_1);
15164 __Pyx_XGOTREF(__pyx_t_2);
15165 __Pyx_XGOTREF(__pyx_t_3);
15175 __Pyx_XDECREF(__pyx_r);
15176 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15177 __Pyx_GOTREF(__pyx_t_4);
15178 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__tanh);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15179 __Pyx_GOTREF(__pyx_t_5);
15180 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15181 __pyx_t_4 = PyTuple_New(1);
if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15182 __Pyx_GOTREF(__pyx_t_4);
15183 __Pyx_INCREF(__pyx_v_obj);
15184 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_obj);
15185 __Pyx_GIVEREF(__pyx_v_obj);
15186 __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL);
if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
15187 __Pyx_GOTREF(__pyx_t_6);
15188 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15189 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
15190 __pyx_r = __pyx_t_6;
15192 goto __pyx_L7_try_return;
15194 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
15195 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
15196 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15197 goto __pyx_L10_try_end;
15198 __pyx_L7_try_return:;
15199 __Pyx_XGIVEREF(__pyx_t_1);
15200 __Pyx_XGIVEREF(__pyx_t_2);
15201 __Pyx_XGIVEREF(__pyx_t_3);
15202 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15205 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15206 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15207 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15217 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15218 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
15219 __Pyx_GOTREF(__pyx_t_6);
15220 __Pyx_GOTREF(__pyx_t_4);
15221 __Pyx_GOTREF(__pyx_t_5);
15230 __Pyx_XDECREF(__pyx_r);
15231 __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__;
goto __pyx_L5_except_error;}
15232 __Pyx_GOTREF(__pyx_t_7);
15233 __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_7),
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;}
15234 __Pyx_GOTREF(__pyx_t_8);
15235 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15236 __pyx_r = __pyx_t_8;
15238 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15239 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15240 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15241 goto __pyx_L6_except_return;
15242 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15243 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15244 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15245 goto __pyx_L4_exception_handled;
15247 __pyx_L5_except_error:;
15248 __Pyx_XGIVEREF(__pyx_t_1);
15249 __Pyx_XGIVEREF(__pyx_t_2);
15250 __Pyx_XGIVEREF(__pyx_t_3);
15251 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15252 goto __pyx_L1_error;
15253 __pyx_L6_except_return:;
15254 __Pyx_XGIVEREF(__pyx_t_1);
15255 __Pyx_XGIVEREF(__pyx_t_2);
15256 __Pyx_XGIVEREF(__pyx_t_3);
15257 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15259 __pyx_L4_exception_handled:;
15260 __Pyx_XGIVEREF(__pyx_t_1);
15261 __Pyx_XGIVEREF(__pyx_t_2);
15262 __Pyx_XGIVEREF(__pyx_t_3);
15263 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15264 __pyx_L10_try_end:;
15267 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15270 __Pyx_XDECREF(__pyx_t_4);
15271 __Pyx_XDECREF(__pyx_t_5);
15272 __Pyx_XDECREF(__pyx_t_6);
15273 __Pyx_XDECREF(__pyx_t_7);
15274 __Pyx_XDECREF(__pyx_t_8);
15275 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15278 __Pyx_XGIVEREF(__pyx_r);
15279 __Pyx_RefNannyFinishContext();
15284 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15285 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 ";
15286 static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15287 PyObject *__pyx_r = 0;
15288 __Pyx_RefNannyDeclarations
15289 __Pyx_RefNannySetupContext(
"tanh (wrapper)", 0);
15290 __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
15291 __Pyx_RefNannyFinishContext();
15303 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15304 PyObject *__pyx_r = NULL;
15305 __Pyx_RefNannyDeclarations
15306 PyObject *__pyx_t_1 = NULL;
15307 int __pyx_lineno = 0;
15308 const char *__pyx_filename = NULL;
15309 int __pyx_clineno = 0;
15310 __Pyx_RefNannySetupContext(
"tanh", 0);
15311 __Pyx_XDECREF(__pyx_r);
15312 __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;}
15313 __Pyx_GOTREF(__pyx_t_1);
15314 __pyx_r = __pyx_t_1;
15318 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15321 __Pyx_XDECREF(__pyx_t_1);
15322 __Pyx_AddTraceback(
"PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15325 __Pyx_XGIVEREF(__pyx_r);
15326 __Pyx_RefNannyFinishContext();
15338 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15339 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) {
15340 PyObject *__pyx_v_i = ((PyObject *)Py_None);
15341 PyObject *__pyx_r = NULL;
15342 __Pyx_RefNannyDeclarations
15345 PyObject *__pyx_t_3 = NULL;
15347 PyObject *__pyx_t_5 = NULL;
15348 PyObject *__pyx_t_6 = NULL;
15349 PyObject *__pyx_t_7 = NULL;
15350 PyObject *__pyx_t_8 = NULL;
15351 PyObject *__pyx_t_9 = NULL;
15352 PyObject *__pyx_t_10 = NULL;
15353 PyObject *__pyx_t_11 = NULL;
15354 int __pyx_lineno = 0;
15355 const char *__pyx_filename = NULL;
15356 int __pyx_clineno = 0;
15357 __Pyx_RefNannySetupContext(
"atanh", 0);
15358 if (__pyx_optional_args) {
15359 if (__pyx_optional_args->__pyx_n > 0) {
15360 __pyx_v_i = __pyx_optional_args->i;
15371 __pyx_t_1 = (__pyx_v_i == Py_None);
15372 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
15382 __Pyx_XDECREF(__pyx_r);
15383 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15384 __Pyx_GOTREF(__pyx_t_3);
15386 __pyx_t_4 =
atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15388 __Pyx_CppExn2PyErr();
15389 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15391 __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;}
15392 __Pyx_GOTREF(__pyx_t_5);
15393 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15394 __pyx_r = __pyx_t_5;
15409 __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15410 __Pyx_XGOTREF(__pyx_t_6);
15411 __Pyx_XGOTREF(__pyx_t_7);
15412 __Pyx_XGOTREF(__pyx_t_8);
15422 __Pyx_XDECREF(__pyx_r);
15423 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__math);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15424 __Pyx_GOTREF(__pyx_t_5);
15425 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__atanh);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15426 __Pyx_GOTREF(__pyx_t_3);
15427 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15428 __pyx_t_5 = PyTuple_New(1);
if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15429 __Pyx_GOTREF(__pyx_t_5);
15430 __Pyx_INCREF(__pyx_v_obj);
15431 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_obj);
15432 __Pyx_GIVEREF(__pyx_v_obj);
15433 __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL);
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__;
goto __pyx_L4_error;}
15434 __Pyx_GOTREF(__pyx_t_9);
15435 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15436 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
15437 __pyx_r = __pyx_t_9;
15439 goto __pyx_L8_try_return;
15441 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15442 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15443 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
15444 goto __pyx_L11_try_end;
15445 __pyx_L8_try_return:;
15446 __Pyx_XGIVEREF(__pyx_t_6);
15447 __Pyx_XGIVEREF(__pyx_t_7);
15448 __Pyx_XGIVEREF(__pyx_t_8);
15449 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15452 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15453 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15454 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15464 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15465 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
15466 __Pyx_GOTREF(__pyx_t_9);
15467 __Pyx_GOTREF(__pyx_t_5);
15468 __Pyx_GOTREF(__pyx_t_3);
15477 __Pyx_XDECREF(__pyx_r);
15478 __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__;
goto __pyx_L6_except_error;}
15479 __Pyx_GOTREF(__pyx_t_10);
15480 __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((
struct __pyx_obj_8PyClical_clifford *)__pyx_t_10),
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;}
15481 __Pyx_GOTREF(__pyx_t_11);
15482 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15483 __pyx_r = __pyx_t_11;
15485 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15486 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15487 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15488 goto __pyx_L7_except_return;
15489 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15490 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15491 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15492 goto __pyx_L5_exception_handled;
15494 __pyx_L6_except_error:;
15495 __Pyx_XGIVEREF(__pyx_t_6);
15496 __Pyx_XGIVEREF(__pyx_t_7);
15497 __Pyx_XGIVEREF(__pyx_t_8);
15498 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15499 goto __pyx_L1_error;
15500 __pyx_L7_except_return:;
15501 __Pyx_XGIVEREF(__pyx_t_6);
15502 __Pyx_XGIVEREF(__pyx_t_7);
15503 __Pyx_XGIVEREF(__pyx_t_8);
15504 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15506 __pyx_L5_exception_handled:;
15507 __Pyx_XGIVEREF(__pyx_t_6);
15508 __Pyx_XGIVEREF(__pyx_t_7);
15509 __Pyx_XGIVEREF(__pyx_t_8);
15510 __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15511 __pyx_L11_try_end:;
15516 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15519 __Pyx_XDECREF(__pyx_t_3);
15520 __Pyx_XDECREF(__pyx_t_5);
15521 __Pyx_XDECREF(__pyx_t_9);
15522 __Pyx_XDECREF(__pyx_t_10);
15523 __Pyx_XDECREF(__pyx_t_11);
15524 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15527 __Pyx_XGIVEREF(__pyx_r);
15528 __Pyx_RefNannyFinishContext();
15533 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15534 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 ";
15535 static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15536 PyObject *__pyx_v_obj = 0;
15537 PyObject *__pyx_v_i = 0;
15538 int __pyx_lineno = 0;
15539 const char *__pyx_filename = NULL;
15540 int __pyx_clineno = 0;
15541 PyObject *__pyx_r = 0;
15542 __Pyx_RefNannyDeclarations
15543 __Pyx_RefNannySetupContext(
"atanh (wrapper)", 0);
15545 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
15546 PyObject* values[2] = {0,0};
15555 values[1] = ((PyObject *)Py_None);
15556 if (unlikely(__pyx_kwds)) {
15557 Py_ssize_t kw_args;
15558 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15559 switch (pos_args) {
15560 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15561 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15563 default:
goto __pyx_L5_argtuple_error;
15565 kw_args = PyDict_Size(__pyx_kwds);
15566 switch (pos_args) {
15568 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
15569 else goto __pyx_L5_argtuple_error;
15572 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
15573 if (value) { values[1] = value; kw_args--; }
15576 if (unlikely(kw_args > 0)) {
15577 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;}
15580 switch (PyTuple_GET_SIZE(__pyx_args)) {
15581 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15582 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15584 default:
goto __pyx_L5_argtuple_error;
15587 __pyx_v_obj = values[0];
15588 __pyx_v_i = values[1];
15590 goto __pyx_L4_argument_unpacking_done;
15591 __pyx_L5_argtuple_error:;
15592 __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;}
15594 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15595 __Pyx_RefNannyFinishContext();
15597 __pyx_L4_argument_unpacking_done:;
15598 __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15599 __Pyx_RefNannyFinishContext();
15603 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15604 PyObject *__pyx_r = NULL;
15605 __Pyx_RefNannyDeclarations
15606 PyObject *__pyx_t_1 = NULL;
15607 struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
15608 int __pyx_lineno = 0;
15609 const char *__pyx_filename = NULL;
15610 int __pyx_clineno = 0;
15611 __Pyx_RefNannySetupContext(
"atanh", 0);
15612 __Pyx_XDECREF(__pyx_r);
15613 __pyx_t_2.__pyx_n = 1;
15614 __pyx_t_2.i = __pyx_v_i;
15615 __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;}
15616 __Pyx_GOTREF(__pyx_t_1);
15617 __pyx_r = __pyx_t_1;
15621 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15624 __Pyx_XDECREF(__pyx_t_1);
15625 __Pyx_AddTraceback(
"PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15628 __Pyx_XGIVEREF(__pyx_r);
15629 __Pyx_RefNannyFinishContext();
15641 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15642 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) {
15643 PyObject *__pyx_v_fill = __pyx_k_24;
15644 PyObject *__pyx_r = NULL;
15645 __Pyx_RefNannyDeclarations
15646 PyObject *__pyx_t_1 = NULL;
15647 PyObject *__pyx_t_2 = NULL;
15649 PyObject *__pyx_t_4 = NULL;
15650 int __pyx_lineno = 0;
15651 const char *__pyx_filename = NULL;
15652 int __pyx_clineno = 0;
15653 __Pyx_RefNannySetupContext(
"random_clifford", 0);
15654 if (__pyx_optional_args) {
15655 if (__pyx_optional_args->__pyx_n > 0) {
15656 __pyx_v_fill = __pyx_optional_args->fill;
15667 __Pyx_XDECREF(__pyx_r);
15668 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15669 __Pyx_GOTREF(__pyx_t_1);
15670 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15671 __Pyx_GOTREF(__pyx_t_2);
15672 __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;}
15673 __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;}
15674 __Pyx_GOTREF(__pyx_t_4);
15675 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15676 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15677 __pyx_r = __pyx_t_4;
15681 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15684 __Pyx_XDECREF(__pyx_t_1);
15685 __Pyx_XDECREF(__pyx_t_2);
15686 __Pyx_XDECREF(__pyx_t_4);
15687 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
15690 __Pyx_XGIVEREF(__pyx_r);
15691 __Pyx_RefNannyFinishContext();
15696 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
15697 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 ";
15698 static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15699 struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
15700 PyObject *__pyx_v_fill = 0;
15701 int __pyx_lineno = 0;
15702 const char *__pyx_filename = NULL;
15703 int __pyx_clineno = 0;
15704 PyObject *__pyx_r = 0;
15705 __Pyx_RefNannyDeclarations
15706 __Pyx_RefNannySetupContext(
"random_clifford (wrapper)", 0);
15708 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ixt,&__pyx_n_s__fill,0};
15709 PyObject* values[2] = {0,0};
15710 values[1] = __pyx_k_24;
15711 if (unlikely(__pyx_kwds)) {
15712 Py_ssize_t kw_args;
15713 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15714 switch (pos_args) {
15715 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15716 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15718 default:
goto __pyx_L5_argtuple_error;
15720 kw_args = PyDict_Size(__pyx_kwds);
15721 switch (pos_args) {
15723 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ixt)) != 0)) kw_args--;
15724 else goto __pyx_L5_argtuple_error;
15727 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill);
15728 if (value) { values[1] = value; kw_args--; }
15731 if (unlikely(kw_args > 0)) {
15732 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;}
15735 switch (PyTuple_GET_SIZE(__pyx_args)) {
15736 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15737 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15739 default:
goto __pyx_L5_argtuple_error;
15742 __pyx_v_ixt = ((
struct __pyx_obj_8PyClical_index_set *)values[0]);
15743 __pyx_v_fill = values[1];
15745 goto __pyx_L4_argument_unpacking_done;
15746 __pyx_L5_argtuple_error:;
15747 __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;}
15749 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
15750 __Pyx_RefNannyFinishContext();
15752 __pyx_L4_argument_unpacking_done:;
15753 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;}
15754 __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
15759 __Pyx_RefNannyFinishContext();
15771 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) {
15772 PyObject *__pyx_r = NULL;
15773 __Pyx_RefNannyDeclarations
15774 PyObject *__pyx_t_1 = NULL;
15775 struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
15776 int __pyx_lineno = 0;
15777 const char *__pyx_filename = NULL;
15778 int __pyx_clineno = 0;
15779 __Pyx_RefNannySetupContext(
"random_clifford", 0);
15780 __Pyx_XDECREF(__pyx_r);
15781 __pyx_t_2.__pyx_n = 1;
15782 __pyx_t_2.fill = __pyx_v_fill;
15783 __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;}
15784 __Pyx_GOTREF(__pyx_t_1);
15785 __pyx_r = __pyx_t_1;
15789 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15792 __Pyx_XDECREF(__pyx_t_1);
15793 __Pyx_AddTraceback(
"PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
15796 __Pyx_XGIVEREF(__pyx_r);
15797 __Pyx_RefNannyFinishContext();
15809 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15810 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
15811 PyObject *__pyx_r = NULL;
15812 __Pyx_RefNannyDeclarations
15813 PyObject *__pyx_t_1 = NULL;
15814 PyObject *__pyx_t_2 = NULL;
15815 int __pyx_lineno = 0;
15816 const char *__pyx_filename = NULL;
15817 int __pyx_clineno = 0;
15818 __Pyx_RefNannySetupContext(
"cga3", 0);
15827 __Pyx_XDECREF(__pyx_r);
15828 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15829 __Pyx_GOTREF(__pyx_t_1);
15830 __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;}
15831 __Pyx_GOTREF(__pyx_t_2);
15832 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15833 __pyx_r = __pyx_t_2;
15837 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15840 __Pyx_XDECREF(__pyx_t_1);
15841 __Pyx_XDECREF(__pyx_t_2);
15842 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
15845 __Pyx_XGIVEREF(__pyx_r);
15846 __Pyx_RefNannyFinishContext();
15851 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15852 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 ";
15853 static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15854 PyObject *__pyx_r = 0;
15855 __Pyx_RefNannyDeclarations
15856 __Pyx_RefNannySetupContext(
"cga3 (wrapper)", 0);
15857 __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
15858 __Pyx_RefNannyFinishContext();
15870 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15871 PyObject *__pyx_r = NULL;
15872 __Pyx_RefNannyDeclarations
15873 PyObject *__pyx_t_1 = NULL;
15874 int __pyx_lineno = 0;
15875 const char *__pyx_filename = NULL;
15876 int __pyx_clineno = 0;
15877 __Pyx_RefNannySetupContext(
"cga3", 0);
15878 __Pyx_XDECREF(__pyx_r);
15879 __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;}
15880 __Pyx_GOTREF(__pyx_t_1);
15881 __pyx_r = __pyx_t_1;
15885 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15888 __Pyx_XDECREF(__pyx_t_1);
15889 __Pyx_AddTraceback(
"PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
15892 __Pyx_XGIVEREF(__pyx_r);
15893 __Pyx_RefNannyFinishContext();
15905 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15906 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
15907 PyObject *__pyx_r = NULL;
15908 __Pyx_RefNannyDeclarations
15909 PyObject *__pyx_t_1 = NULL;
15910 PyObject *__pyx_t_2 = NULL;
15911 int __pyx_lineno = 0;
15912 const char *__pyx_filename = NULL;
15913 int __pyx_clineno = 0;
15914 __Pyx_RefNannySetupContext(
"cga3std", 0);
15923 __Pyx_XDECREF(__pyx_r);
15924 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
15925 __Pyx_GOTREF(__pyx_t_1);
15926 __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;}
15927 __Pyx_GOTREF(__pyx_t_2);
15928 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15929 __pyx_r = __pyx_t_2;
15933 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15936 __Pyx_XDECREF(__pyx_t_1);
15937 __Pyx_XDECREF(__pyx_t_2);
15938 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
15941 __Pyx_XGIVEREF(__pyx_r);
15942 __Pyx_RefNannyFinishContext();
15947 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj);
15948 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 ";
15949 static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15950 PyObject *__pyx_r = 0;
15951 __Pyx_RefNannyDeclarations
15952 __Pyx_RefNannySetupContext(
"cga3std (wrapper)", 0);
15953 __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
15954 __Pyx_RefNannyFinishContext();
15966 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15967 PyObject *__pyx_r = NULL;
15968 __Pyx_RefNannyDeclarations
15969 PyObject *__pyx_t_1 = NULL;
15970 int __pyx_lineno = 0;
15971 const char *__pyx_filename = NULL;
15972 int __pyx_clineno = 0;
15973 __Pyx_RefNannySetupContext(
"cga3std", 0);
15974 __Pyx_XDECREF(__pyx_r);
15975 __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;}
15976 __Pyx_GOTREF(__pyx_t_1);
15977 __pyx_r = __pyx_t_1;
15981 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15984 __Pyx_XDECREF(__pyx_t_1);
15985 __Pyx_AddTraceback(
"PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
15988 __Pyx_XGIVEREF(__pyx_r);
15989 __Pyx_RefNannyFinishContext();
16001 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16002 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED
int __pyx_skip_dispatch) {
16003 PyObject *__pyx_r = NULL;
16004 __Pyx_RefNannyDeclarations
16005 PyObject *__pyx_t_1 = NULL;
16006 PyObject *__pyx_t_2 = NULL;
16007 int __pyx_lineno = 0;
16008 const char *__pyx_filename = NULL;
16009 int __pyx_clineno = 0;
16010 __Pyx_RefNannySetupContext(
"agc3", 0);
16019 __Pyx_XDECREF(__pyx_r);
16020 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16021 __Pyx_GOTREF(__pyx_t_1);
16022 __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;}
16023 __Pyx_GOTREF(__pyx_t_2);
16024 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16025 __pyx_r = __pyx_t_2;
16029 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16032 __Pyx_XDECREF(__pyx_t_1);
16033 __Pyx_XDECREF(__pyx_t_2);
16034 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
16037 __Pyx_XGIVEREF(__pyx_r);
16038 __Pyx_RefNannyFinishContext();
16043 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16044 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 ";
16045 static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16046 PyObject *__pyx_r = 0;
16047 __Pyx_RefNannyDeclarations
16048 __Pyx_RefNannySetupContext(
"agc3 (wrapper)", 0);
16049 __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
16050 __Pyx_RefNannyFinishContext();
16062 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16063 PyObject *__pyx_r = NULL;
16064 __Pyx_RefNannyDeclarations
16065 PyObject *__pyx_t_1 = NULL;
16066 int __pyx_lineno = 0;
16067 const char *__pyx_filename = NULL;
16068 int __pyx_clineno = 0;
16069 __Pyx_RefNannySetupContext(
"agc3", 0);
16070 __Pyx_XDECREF(__pyx_r);
16071 __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;}
16072 __Pyx_GOTREF(__pyx_t_1);
16073 __pyx_r = __pyx_t_1;
16077 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16080 __Pyx_XDECREF(__pyx_t_1);
16081 __Pyx_AddTraceback(
"PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
16084 __Pyx_XGIVEREF(__pyx_r);
16085 __Pyx_RefNannyFinishContext();
16090 static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj);
16091 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 ";
16092 static PyMethodDef __pyx_mdef_8PyClical_83e = {__Pyx_NAMESTR(
"e"), (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_82e)};
16093 static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16094 PyObject *__pyx_r = 0;
16095 __Pyx_RefNannyDeclarations
16096 __Pyx_RefNannySetupContext(
"e (wrapper)", 0);
16097 __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
16098 __Pyx_RefNannyFinishContext();
16110 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16111 PyObject *__pyx_r = NULL;
16112 __Pyx_RefNannyDeclarations
16113 PyObject *__pyx_t_1 = NULL;
16114 PyObject *__pyx_t_2 = NULL;
16115 int __pyx_lineno = 0;
16116 const char *__pyx_filename = NULL;
16117 int __pyx_clineno = 0;
16118 __Pyx_RefNannySetupContext(
"e", 0);
16127 __Pyx_XDECREF(__pyx_r);
16128 __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;}
16129 __Pyx_GOTREF(__pyx_t_1);
16130 __Pyx_INCREF(__pyx_v_obj);
16131 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
16132 __Pyx_GIVEREF(__pyx_v_obj);
16133 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16134 __Pyx_GOTREF(__pyx_t_2);
16135 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
16136 __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;}
16137 __Pyx_GOTREF(__pyx_t_1);
16138 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
16139 __Pyx_GIVEREF(__pyx_t_2);
16141 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_1), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16142 __Pyx_GOTREF(__pyx_t_2);
16143 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
16144 __pyx_r = __pyx_t_2;
16148 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16151 __Pyx_XDECREF(__pyx_t_1);
16152 __Pyx_XDECREF(__pyx_t_2);
16153 __Pyx_AddTraceback(
"PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
16156 __Pyx_XGIVEREF(__pyx_r);
16157 __Pyx_RefNannyFinishContext();
16162 static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
16163 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 ";
16164 static PyMethodDef __pyx_mdef_8PyClical_85istpq = {__Pyx_NAMESTR(
"istpq"), (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_84istpq)};
16165 static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16166 PyObject *__pyx_v_p = 0;
16167 PyObject *__pyx_v_q = 0;
16168 int __pyx_lineno = 0;
16169 const char *__pyx_filename = NULL;
16170 int __pyx_clineno = 0;
16171 PyObject *__pyx_r = 0;
16172 __Pyx_RefNannyDeclarations
16173 __Pyx_RefNannySetupContext(
"istpq (wrapper)", 0);
16175 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__p,&__pyx_n_s__q,0};
16176 PyObject* values[2] = {0,0};
16177 if (unlikely(__pyx_kwds)) {
16178 Py_ssize_t kw_args;
16179 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16180 switch (pos_args) {
16181 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16182 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16184 default:
goto __pyx_L5_argtuple_error;
16186 kw_args = PyDict_Size(__pyx_kwds);
16187 switch (pos_args) {
16189 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p)) != 0)) kw_args--;
16190 else goto __pyx_L5_argtuple_error;
16192 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__q)) != 0)) kw_args--;
16194 __Pyx_RaiseArgtupleInvalid(
"istpq", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L3_error;}
16197 if (unlikely(kw_args > 0)) {
16198 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;}
16200 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
16201 goto __pyx_L5_argtuple_error;
16203 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16204 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16206 __pyx_v_p = values[0];
16207 __pyx_v_q = values[1];
16209 goto __pyx_L4_argument_unpacking_done;
16210 __pyx_L5_argtuple_error:;
16211 __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;}
16213 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
16214 __Pyx_RefNannyFinishContext();
16216 __pyx_L4_argument_unpacking_done:;
16217 __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
16218 __Pyx_RefNannyFinishContext();
16230 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
16231 PyObject *__pyx_r = NULL;
16232 __Pyx_RefNannyDeclarations
16233 PyObject *__pyx_t_1 = NULL;
16234 PyObject *__pyx_t_2 = NULL;
16235 PyObject *__pyx_t_3 = NULL;
16236 int __pyx_lineno = 0;
16237 const char *__pyx_filename = NULL;
16238 int __pyx_clineno = 0;
16239 __Pyx_RefNannySetupContext(
"istpq", 0);
16248 __Pyx_XDECREF(__pyx_r);
16249 __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;}
16250 __Pyx_GOTREF(__pyx_t_1);
16251 __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;}
16252 __Pyx_GOTREF(__pyx_t_2);
16253 __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;}
16254 __Pyx_GOTREF(__pyx_t_3);
16255 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
16256 __Pyx_GIVEREF(__pyx_t_1);
16257 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
16258 __Pyx_GIVEREF(__pyx_t_2);
16261 __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16262 __Pyx_GOTREF(__pyx_t_2);
16263 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
16264 __pyx_t_3 = PyTuple_New(1);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16265 __Pyx_GOTREF(__pyx_t_3);
16266 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
16267 __Pyx_GIVEREF(__pyx_t_2);
16269 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_3), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16270 __Pyx_GOTREF(__pyx_t_2);
16271 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
16272 __pyx_t_3 = PyTuple_New(1);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16273 __Pyx_GOTREF(__pyx_t_3);
16274 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
16275 __Pyx_GIVEREF(__pyx_t_2);
16277 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), ((PyObject *)__pyx_t_3), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16278 __Pyx_GOTREF(__pyx_t_2);
16279 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
16280 __pyx_r = __pyx_t_2;
16284 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16287 __Pyx_XDECREF(__pyx_t_1);
16288 __Pyx_XDECREF(__pyx_t_2);
16289 __Pyx_XDECREF(__pyx_t_3);
16290 __Pyx_AddTraceback(
"PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
16293 __Pyx_XGIVEREF(__pyx_r);
16294 __Pyx_RefNannyFinishContext();
16299 static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
16300 static PyMethodDef __pyx_mdef_8PyClical_87_test = {__Pyx_NAMESTR(
"_test"), (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, __Pyx_DOCSTR(0)};
16301 static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
16302 PyObject *__pyx_r = 0;
16303 __Pyx_RefNannyDeclarations
16304 __Pyx_RefNannySetupContext(
"_test (wrapper)", 0);
16305 __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
16306 __Pyx_RefNannyFinishContext();
16318 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
16319 PyObject *__pyx_v_PyClical = NULL;
16320 PyObject *__pyx_v_doctest = NULL;
16321 PyObject *__pyx_r = NULL;
16322 __Pyx_RefNannyDeclarations
16323 PyObject *__pyx_t_1 = NULL;
16324 PyObject *__pyx_t_2 = NULL;
16325 PyObject *__pyx_t_3 = NULL;
16326 int __pyx_lineno = 0;
16327 const char *__pyx_filename = NULL;
16328 int __pyx_clineno = 0;
16329 __Pyx_RefNannySetupContext(
"_test", 0);
16338 __pyx_t_1 = __Pyx_Import(((PyObject *)__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;}
16339 __Pyx_GOTREF(__pyx_t_1);
16340 __pyx_v_PyClical = __pyx_t_1;
16342 __pyx_t_1 = __Pyx_Import(((PyObject *)__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;}
16343 __Pyx_GOTREF(__pyx_t_1);
16344 __pyx_v_doctest = __pyx_t_1;
16354 __Pyx_XDECREF(__pyx_r);
16355 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_doctest, __pyx_n_s__testmod);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16356 __Pyx_GOTREF(__pyx_t_1);
16357 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16358 __Pyx_GOTREF(__pyx_t_2);
16359 __Pyx_INCREF(__pyx_v_PyClical);
16360 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_PyClical);
16361 __Pyx_GIVEREF(__pyx_v_PyClical);
16362 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
16363 __Pyx_GOTREF(__pyx_t_3);
16364 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16365 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
16366 __pyx_r = __pyx_t_3;
16370 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16373 __Pyx_XDECREF(__pyx_t_1);
16374 __Pyx_XDECREF(__pyx_t_2);
16375 __Pyx_XDECREF(__pyx_t_3);
16376 __Pyx_AddTraceback(
"PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
16379 __Pyx_XDECREF(__pyx_v_PyClical);
16380 __Pyx_XDECREF(__pyx_v_doctest);
16381 __Pyx_XGIVEREF(__pyx_r);
16382 __Pyx_RefNannyFinishContext();
16385 static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
16387 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
16388 struct __pyx_obj_8PyClical_index_set *p;
16390 o = (*t->tp_alloc)(t, 0);
16391 if (unlikely(!o))
return 0;
16392 p = ((
struct __pyx_obj_8PyClical_index_set *)o);
16393 p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
16394 if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) {
16395 Py_DECREF(o); o = 0;
16400 static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
16402 PyObject *etype, *eval, *etb;
16403 PyErr_Fetch(&etype, &eval, &etb);
16405 __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
16406 if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
16408 PyErr_Restore(etype, eval, etb);
16410 (*Py_TYPE(o)->tp_free)(o);
16412 static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
16414 PyObject *x = PyInt_FromSsize_t(i);
if(!x)
return 0;
16415 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
16420 static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
16422 return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
16425 PyErr_Format(PyExc_NotImplementedError,
16426 "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name);
16431 static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
16432 {__Pyx_NAMESTR(
"copy"), (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_9index_set_copy)},
16433 {__Pyx_NAMESTR(
"count"), (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_9index_set_31count)},
16434 {__Pyx_NAMESTR(
"count_neg"), (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_9index_set_33count_neg)},
16435 {__Pyx_NAMESTR(
"count_pos"), (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_9index_set_35count_pos)},
16436 {__Pyx_NAMESTR(
"min"), (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_9index_set_37min)},
16437 {__Pyx_NAMESTR(
"max"), (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_9index_set_39max)},
16438 {__Pyx_NAMESTR(
"hash_fn"), (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_9index_set_41hash_fn)},
16439 {__Pyx_NAMESTR(
"sign_of_mult"), (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_9index_set_43sign_of_mult)},
16440 {__Pyx_NAMESTR(
"sign_of_square"), (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_9index_set_45sign_of_square)},
16444 static PyNumberMethods __pyx_tp_as_number_index_set = {
16448 #if PY_MAJOR_VERSION < 3
16458 __pyx_pw_8PyClical_9index_set_18__invert__,
16461 __pyx_pw_8PyClical_9index_set_24__and__,
16462 __pyx_pw_8PyClical_9index_set_20__xor__,
16463 __pyx_pw_8PyClical_9index_set_28__or__,
16464 #if PY_MAJOR_VERSION < 3
16468 #if PY_MAJOR_VERSION < 3
16474 #if PY_MAJOR_VERSION < 3
16477 #if PY_MAJOR_VERSION < 3
16483 #if PY_MAJOR_VERSION < 3
16490 __pyx_pw_8PyClical_9index_set_26__iand__,
16491 __pyx_pw_8PyClical_9index_set_22__ixor__,
16492 __pyx_pw_8PyClical_9index_set_30__ior__,
16497 #if PY_VERSION_HEX >= 0x02050000
16502 static PySequenceMethods __pyx_tp_as_sequence_index_set = {
16506 __pyx_sq_item_8PyClical_index_set,
16510 __pyx_pw_8PyClical_9index_set_13__contains__,
16515 static PyMappingMethods __pyx_tp_as_mapping_index_set = {
16517 __pyx_pw_8PyClical_9index_set_11__getitem__,
16518 __pyx_mp_ass_subscript_8PyClical_index_set,
16521 static PyTypeObject __pyx_type_8PyClical_index_set = {
16522 PyVarObject_HEAD_INIT(0, 0)
16523 __Pyx_NAMESTR("PyClical.index_set"),
16524 sizeof(struct __pyx_obj_8PyClical_index_set),
16526 __pyx_tp_dealloc_8PyClical_index_set,
16530 #if PY_MAJOR_VERSION < 3
16535 __pyx_pw_8PyClical_9index_set_48__repr__,
16536 &__pyx_tp_as_number_index_set,
16537 &__pyx_tp_as_sequence_index_set,
16538 &__pyx_tp_as_mapping_index_set,
16541 __pyx_pw_8PyClical_9index_set_50__str__,
16545 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
16546 __Pyx_DOCSTR(
"\n Python class index_set wraps C++ class IndexSet.\n "),
16549 __pyx_pw_8PyClical_9index_set_7__richcmp__,
16551 __pyx_pw_8PyClical_9index_set_15__iter__,
16553 __pyx_methods_8PyClical_index_set,
16563 __pyx_tp_new_8PyClical_index_set,
16572 #if PY_VERSION_HEX >= 0x02060000
16577 static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
16578 static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
16580 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
16581 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p;
16583 if (likely((__pyx_freecount_8PyClical___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize ==
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__)))) {
16584 o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
16585 memset(o, 0,
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
16586 PyObject_INIT(o, t);
16587 PyObject_GC_Track(o);
16589 o = (*t->tp_alloc)(t, 0);
16590 if (unlikely(!o))
return 0;
16592 p = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
16593 p->__pyx_v_idx = 0;
16594 p->__pyx_v_self = 0;
16599 static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
16600 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
16601 PyObject_GC_UnTrack(o);
16602 Py_CLEAR(p->__pyx_v_idx);
16603 Py_CLEAR(p->__pyx_v_self);
16604 Py_CLEAR(p->__pyx_t_0);
16605 if ((__pyx_freecount_8PyClical___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize ==
sizeof(
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__))) {
16606 __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
16608 (*Py_TYPE(o)->tp_free)(o);
16612 static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v,
void *a) {
16614 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
16615 if (p->__pyx_v_idx) {
16616 e = (*v)(p->__pyx_v_idx, a);
if (e)
return e;
16618 if (p->__pyx_v_self) {
16619 e = (*v)(((PyObject*)p->__pyx_v_self), a);
if (e)
return e;
16621 if (p->__pyx_t_0) {
16622 e = (*v)(p->__pyx_t_0, a);
if (e)
return e;
16627 static int __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
16628 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (
struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
16630 tmp = ((PyObject*)p->__pyx_v_idx);
16631 p->__pyx_v_idx = Py_None; Py_INCREF(Py_None);
16633 tmp = ((PyObject*)p->__pyx_v_self);
16634 p->__pyx_v_self = ((
struct __pyx_obj_8PyClical_index_set *)Py_None); Py_INCREF(Py_None);
16636 tmp = ((PyObject*)p->__pyx_t_0);
16637 p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
16642 static PyMethodDef __pyx_methods_8PyClical___pyx_scope_struct____iter__[] = {
16646 static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
16647 PyVarObject_HEAD_INIT(0, 0)
16648 __Pyx_NAMESTR("PyClical.__pyx_scope_struct____iter__"),
16649 sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__),
16651 __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__,
16655 #if PY_MAJOR_VERSION < 3
16670 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
16672 __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__,
16673 __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__,
16678 __pyx_methods_8PyClical___pyx_scope_struct____iter__,
16688 __pyx_tp_new_8PyClical___pyx_scope_struct____iter__,
16697 #if PY_VERSION_HEX >= 0x02060000
16701 static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
16703 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
16704 struct __pyx_obj_8PyClical_clifford *p;
16706 o = (*t->tp_alloc)(t, 0);
16707 if (unlikely(!o))
return 0;
16708 p = ((
struct __pyx_obj_8PyClical_clifford *)o);
16709 p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
16710 if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) {
16711 Py_DECREF(o); o = 0;
16716 static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
16718 PyObject *etype, *eval, *etb;
16719 PyErr_Fetch(&etype, &eval, &etb);
16721 __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
16722 if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
16724 PyErr_Restore(etype, eval, etb);
16726 (*Py_TYPE(o)->tp_free)(o);
16728 static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
16730 PyObject *x = PyInt_FromSsize_t(i);
if(!x)
return 0;
16731 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
16736 static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
16737 {__Pyx_NAMESTR(
"copy"), (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_copy)},
16738 {__Pyx_NAMESTR(
"reframe"), (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_10reframe)},
16739 {__Pyx_NAMESTR(
"inv"), (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_48inv)},
16740 {__Pyx_NAMESTR(
"pow"), (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_56pow)},
16741 {__Pyx_NAMESTR(
"outer_pow"), (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_58outer_pow)},
16742 {__Pyx_NAMESTR(
"scalar"), (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_62scalar)},
16743 {__Pyx_NAMESTR(
"pure"), (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_64pure)},
16744 {__Pyx_NAMESTR(
"even"), (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_66even)},
16745 {__Pyx_NAMESTR(
"odd"), (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_68odd)},
16746 {__Pyx_NAMESTR(
"vector_part"), (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_70vector_part)},
16747 {__Pyx_NAMESTR(
"involute"), (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_72involute)},
16748 {__Pyx_NAMESTR(
"reverse"), (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_74reverse)},
16749 {__Pyx_NAMESTR(
"conj"), (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_76conj)},
16750 {__Pyx_NAMESTR(
"quad"), (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_78quad)},
16751 {__Pyx_NAMESTR(
"norm"), (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_80norm)},
16752 {__Pyx_NAMESTR(
"abs"), (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_82abs)},
16753 {__Pyx_NAMESTR(
"max_abs"), (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_84max_abs)},
16754 {__Pyx_NAMESTR(
"truncated"), (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_86truncated)},
16755 {__Pyx_NAMESTR(
"isnan"), (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_88isnan)},
16756 {__Pyx_NAMESTR(
"frame"), (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8PyClical_8clifford_90frame)},
16760 static PyNumberMethods __pyx_tp_as_number_clifford = {
16761 __pyx_pw_8PyClical_8clifford_21__add__,
16762 __pyx_pw_8PyClical_8clifford_25__sub__,
16763 __pyx_pw_8PyClical_8clifford_29__mul__,
16764 #if PY_MAJOR_VERSION < 3
16765 __pyx_pw_8PyClical_8clifford_45__div__,
16767 __pyx_pw_8PyClical_8clifford_33__mod__,
16769 __pyx_pw_8PyClical_8clifford_55__pow__,
16770 __pyx_pw_8PyClical_8clifford_17__neg__,
16771 __pyx_pw_8PyClical_8clifford_19__pos__,
16777 __pyx_pw_8PyClical_8clifford_37__and__,
16778 __pyx_pw_8PyClical_8clifford_41__xor__,
16779 __pyx_pw_8PyClical_8clifford_51__or__,
16780 #if PY_MAJOR_VERSION < 3
16784 #if PY_MAJOR_VERSION < 3
16790 #if PY_MAJOR_VERSION < 3
16793 #if PY_MAJOR_VERSION < 3
16796 __pyx_pw_8PyClical_8clifford_23__iadd__,
16797 __pyx_pw_8PyClical_8clifford_27__isub__,
16798 __pyx_pw_8PyClical_8clifford_31__imul__,
16799 #if PY_MAJOR_VERSION < 3
16800 __pyx_pw_8PyClical_8clifford_47__idiv__,
16802 __pyx_pw_8PyClical_8clifford_35__imod__,
16806 __pyx_pw_8PyClical_8clifford_39__iand__,
16807 __pyx_pw_8PyClical_8clifford_43__ixor__,
16808 __pyx_pw_8PyClical_8clifford_53__ior__,
16813 #if PY_VERSION_HEX >= 0x02050000
16818 static PySequenceMethods __pyx_tp_as_sequence_clifford = {
16822 __pyx_sq_item_8PyClical_clifford,
16826 __pyx_pw_8PyClical_8clifford_7__contains__,
16831 static PyMappingMethods __pyx_tp_as_mapping_clifford = {
16833 __pyx_pw_8PyClical_8clifford_15__getitem__,
16837 static PyTypeObject __pyx_type_8PyClical_clifford = {
16838 PyVarObject_HEAD_INIT(0, 0)
16839 __Pyx_NAMESTR("PyClical.clifford"),
16840 sizeof(struct __pyx_obj_8PyClical_clifford),
16842 __pyx_tp_dealloc_8PyClical_clifford,
16846 #if PY_MAJOR_VERSION < 3
16851 __pyx_pw_8PyClical_8clifford_93__repr__,
16852 &__pyx_tp_as_number_clifford,
16853 &__pyx_tp_as_sequence_clifford,
16854 &__pyx_tp_as_mapping_clifford,
16856 __pyx_pw_8PyClical_8clifford_61__call__,
16857 __pyx_pw_8PyClical_8clifford_95__str__,
16861 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
16862 __Pyx_DOCSTR(
"\n Python class clifford wraps C++ class Clifford.\n "),
16865 __pyx_pw_8PyClical_8clifford_13__richcmp__,
16867 __pyx_pw_8PyClical_8clifford_9__iter__,
16869 __pyx_methods_8PyClical_clifford,
16879 __pyx_tp_new_8PyClical_clifford,
16888 #if PY_VERSION_HEX >= 0x02060000
16893 static PyMethodDef __pyx_methods[] = {
16894 {__Pyx_NAMESTR(
"compare"), (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_2compare)},
16895 {__Pyx_NAMESTR(
"min_neg"), (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_4min_neg)},
16896 {__Pyx_NAMESTR(
"max_pos"), (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_6max_pos)},
16897 {__Pyx_NAMESTR(
"inv"), (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_10inv)},
16898 {__Pyx_NAMESTR(
"scalar"), (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_12scalar)},
16899 {__Pyx_NAMESTR(
"real"), (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_14real)},
16900 {__Pyx_NAMESTR(
"imag"), (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_16imag)},
16901 {__Pyx_NAMESTR(
"pure"), (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_18pure)},
16902 {__Pyx_NAMESTR(
"even"), (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_20even)},
16903 {__Pyx_NAMESTR(
"odd"), (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_22odd)},
16904 {__Pyx_NAMESTR(
"involute"), (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_24involute)},
16905 {__Pyx_NAMESTR(
"reverse"), (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_26reverse)},
16906 {__Pyx_NAMESTR(
"conj"), (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_28conj)},
16907 {__Pyx_NAMESTR(
"quad"), (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_30quad)},
16908 {__Pyx_NAMESTR(
"norm"), (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_32norm)},
16909 {__Pyx_NAMESTR(
"abs"), (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_34abs)},
16910 {__Pyx_NAMESTR(
"max_abs"), (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_36max_abs)},
16911 {__Pyx_NAMESTR(
"pow"), (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_38pow)},
16912 {__Pyx_NAMESTR(
"outer_pow"), (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_40outer_pow)},
16913 {__Pyx_NAMESTR(
"complexifier"), (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_42complexifier)},
16914 {__Pyx_NAMESTR(
"sqrt"), (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_44sqrt)},
16915 {__Pyx_NAMESTR(
"exp"), (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_46exp)},
16916 {__Pyx_NAMESTR(
"log"), (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_48log)},
16917 {__Pyx_NAMESTR(
"cos"), (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_50cos)},
16918 {__Pyx_NAMESTR(
"acos"), (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_52acos)},
16919 {__Pyx_NAMESTR(
"cosh"), (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_54cosh)},
16920 {__Pyx_NAMESTR(
"acosh"), (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_56acosh)},
16921 {__Pyx_NAMESTR(
"sin"), (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_58sin)},
16922 {__Pyx_NAMESTR(
"asin"), (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_60asin)},
16923 {__Pyx_NAMESTR(
"sinh"), (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_62sinh)},
16924 {__Pyx_NAMESTR(
"asinh"), (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_64asinh)},
16925 {__Pyx_NAMESTR(
"tan"), (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_66tan)},
16926 {__Pyx_NAMESTR(
"atan"), (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_68atan)},
16927 {__Pyx_NAMESTR(
"tanh"), (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_70tanh)},
16928 {__Pyx_NAMESTR(
"atanh"), (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_72atanh)},
16929 {__Pyx_NAMESTR(
"random_clifford"), (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8PyClical_74random_clifford)},
16930 {__Pyx_NAMESTR(
"cga3"), (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_76cga3)},
16931 {__Pyx_NAMESTR(
"cga3std"), (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_78cga3std)},
16932 {__Pyx_NAMESTR(
"agc3"), (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __Pyx_DOCSTR(__pyx_doc_8PyClical_80agc3)},
16936 #if PY_MAJOR_VERSION >= 3
16937 static struct PyModuleDef __pyx_moduledef = {
16938 #if PY_VERSION_HEX < 0x03020000
16939 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
16941 PyModuleDef_HEAD_INIT,
16943 __Pyx_NAMESTR(
"PyClical"),
16954 static __Pyx_StringTabEntry __pyx_string_tab[] = {
16955 {&__pyx_kp_s_1, __pyx_k_1,
sizeof(__pyx_k_1), 0, 0, 1, 0},
16956 {&__pyx_kp_s_10, __pyx_k_10,
sizeof(__pyx_k_10), 0, 0, 1, 0},
16957 {&__pyx_kp_u_100, __pyx_k_100,
sizeof(__pyx_k_100), 0, 1, 0, 0},
16958 {&__pyx_kp_u_101, __pyx_k_101,
sizeof(__pyx_k_101), 0, 1, 0, 0},
16959 {&__pyx_kp_u_102, __pyx_k_102,
sizeof(__pyx_k_102), 0, 1, 0, 0},
16960 {&__pyx_kp_u_103, __pyx_k_103,
sizeof(__pyx_k_103), 0, 1, 0, 0},
16961 {&__pyx_kp_u_104, __pyx_k_104,
sizeof(__pyx_k_104), 0, 1, 0, 0},
16962 {&__pyx_kp_u_105, __pyx_k_105,
sizeof(__pyx_k_105), 0, 1, 0, 0},
16963 {&__pyx_kp_u_106, __pyx_k_106,
sizeof(__pyx_k_106), 0, 1, 0, 0},
16964 {&__pyx_kp_u_107, __pyx_k_107,
sizeof(__pyx_k_107), 0, 1, 0, 0},
16965 {&__pyx_kp_u_108, __pyx_k_108,
sizeof(__pyx_k_108), 0, 1, 0, 0},
16966 {&__pyx_kp_u_109, __pyx_k_109,
sizeof(__pyx_k_109), 0, 1, 0, 0},
16967 {&__pyx_kp_s_11, __pyx_k_11,
sizeof(__pyx_k_11), 0, 0, 1, 0},
16968 {&__pyx_kp_u_110, __pyx_k_110,
sizeof(__pyx_k_110), 0, 1, 0, 0},
16969 {&__pyx_kp_u_111, __pyx_k_111,
sizeof(__pyx_k_111), 0, 1, 0, 0},
16970 {&__pyx_kp_u_112, __pyx_k_112,
sizeof(__pyx_k_112), 0, 1, 0, 0},
16971 {&__pyx_kp_u_113, __pyx_k_113,
sizeof(__pyx_k_113), 0, 1, 0, 0},
16972 {&__pyx_kp_u_114, __pyx_k_114,
sizeof(__pyx_k_114), 0, 1, 0, 0},
16973 {&__pyx_kp_u_115, __pyx_k_115,
sizeof(__pyx_k_115), 0, 1, 0, 0},
16974 {&__pyx_kp_u_116, __pyx_k_116,
sizeof(__pyx_k_116), 0, 1, 0, 0},
16975 {&__pyx_kp_u_117, __pyx_k_117,
sizeof(__pyx_k_117), 0, 1, 0, 0},
16976 {&__pyx_kp_u_118, __pyx_k_118,
sizeof(__pyx_k_118), 0, 1, 0, 0},
16977 {&__pyx_kp_u_119, __pyx_k_119,
sizeof(__pyx_k_119), 0, 1, 0, 0},
16978 {&__pyx_kp_s_12, __pyx_k_12,
sizeof(__pyx_k_12), 0, 0, 1, 0},
16979 {&__pyx_kp_u_120, __pyx_k_120,
sizeof(__pyx_k_120), 0, 1, 0, 0},
16980 {&__pyx_kp_u_121, __pyx_k_121,
sizeof(__pyx_k_121), 0, 1, 0, 0},
16981 {&__pyx_kp_u_122, __pyx_k_122,
sizeof(__pyx_k_122), 0, 1, 0, 0},
16982 {&__pyx_kp_u_123, __pyx_k_123,
sizeof(__pyx_k_123), 0, 1, 0, 0},
16983 {&__pyx_kp_u_124, __pyx_k_124,
sizeof(__pyx_k_124), 0, 1, 0, 0},
16984 {&__pyx_kp_u_125, __pyx_k_125,
sizeof(__pyx_k_125), 0, 1, 0, 0},
16985 {&__pyx_kp_u_126, __pyx_k_126,
sizeof(__pyx_k_126), 0, 1, 0, 0},
16986 {&__pyx_kp_u_127, __pyx_k_127,
sizeof(__pyx_k_127), 0, 1, 0, 0},
16987 {&__pyx_kp_u_128, __pyx_k_128,
sizeof(__pyx_k_128), 0, 1, 0, 0},
16988 {&__pyx_kp_u_129, __pyx_k_129,
sizeof(__pyx_k_129), 0, 1, 0, 0},
16989 {&__pyx_kp_s_13, __pyx_k_13,
sizeof(__pyx_k_13), 0, 0, 1, 0},
16990 {&__pyx_kp_u_130, __pyx_k_130,
sizeof(__pyx_k_130), 0, 1, 0, 0},
16991 {&__pyx_kp_u_131, __pyx_k_131,
sizeof(__pyx_k_131), 0, 1, 0, 0},
16992 {&__pyx_kp_u_132, __pyx_k_132,
sizeof(__pyx_k_132), 0, 1, 0, 0},
16993 {&__pyx_kp_u_133, __pyx_k_133,
sizeof(__pyx_k_133), 0, 1, 0, 0},
16994 {&__pyx_kp_u_134, __pyx_k_134,
sizeof(__pyx_k_134), 0, 1, 0, 0},
16995 {&__pyx_kp_u_135, __pyx_k_135,
sizeof(__pyx_k_135), 0, 1, 0, 0},
16996 {&__pyx_kp_u_136, __pyx_k_136,
sizeof(__pyx_k_136), 0, 1, 0, 0},
16997 {&__pyx_kp_u_137, __pyx_k_137,
sizeof(__pyx_k_137), 0, 1, 0, 0},
16998 {&__pyx_kp_u_138, __pyx_k_138,
sizeof(__pyx_k_138), 0, 1, 0, 0},
16999 {&__pyx_kp_u_139, __pyx_k_139,
sizeof(__pyx_k_139), 0, 1, 0, 0},
17000 {&__pyx_kp_u_140, __pyx_k_140,
sizeof(__pyx_k_140), 0, 1, 0, 0},
17001 {&__pyx_kp_u_141, __pyx_k_141,
sizeof(__pyx_k_141), 0, 1, 0, 0},
17002 {&__pyx_kp_u_142, __pyx_k_142,
sizeof(__pyx_k_142), 0, 1, 0, 0},
17003 {&__pyx_kp_u_143, __pyx_k_143,
sizeof(__pyx_k_143), 0, 1, 0, 0},
17004 {&__pyx_kp_u_144, __pyx_k_144,
sizeof(__pyx_k_144), 0, 1, 0, 0},
17005 {&__pyx_kp_u_145, __pyx_k_145,
sizeof(__pyx_k_145), 0, 1, 0, 0},
17006 {&__pyx_kp_u_146, __pyx_k_146,
sizeof(__pyx_k_146), 0, 1, 0, 0},
17007 {&__pyx_kp_u_147, __pyx_k_147,
sizeof(__pyx_k_147), 0, 1, 0, 0},
17008 {&__pyx_kp_u_148, __pyx_k_148,
sizeof(__pyx_k_148), 0, 1, 0, 0},
17009 {&__pyx_kp_u_149, __pyx_k_149,
sizeof(__pyx_k_149), 0, 1, 0, 0},
17010 {&__pyx_kp_u_150, __pyx_k_150,
sizeof(__pyx_k_150), 0, 1, 0, 0},
17011 {&__pyx_kp_u_151, __pyx_k_151,
sizeof(__pyx_k_151), 0, 1, 0, 0},
17012 {&__pyx_kp_u_152, __pyx_k_152,
sizeof(__pyx_k_152), 0, 1, 0, 0},
17013 {&__pyx_kp_u_153, __pyx_k_153,
sizeof(__pyx_k_153), 0, 1, 0, 0},
17014 {&__pyx_kp_u_154, __pyx_k_154,
sizeof(__pyx_k_154), 0, 1, 0, 0},
17015 {&__pyx_kp_u_155, __pyx_k_155,
sizeof(__pyx_k_155), 0, 1, 0, 0},
17016 {&__pyx_kp_u_156, __pyx_k_156,
sizeof(__pyx_k_156), 0, 1, 0, 0},
17017 {&__pyx_kp_u_157, __pyx_k_157,
sizeof(__pyx_k_157), 0, 1, 0, 0},
17018 {&__pyx_kp_u_158, __pyx_k_158,
sizeof(__pyx_k_158), 0, 1, 0, 0},
17019 {&__pyx_kp_u_159, __pyx_k_159,
sizeof(__pyx_k_159), 0, 1, 0, 0},
17020 {&__pyx_kp_s_16, __pyx_k_16,
sizeof(__pyx_k_16), 0, 0, 1, 0},
17021 {&__pyx_kp_u_160, __pyx_k_160,
sizeof(__pyx_k_160), 0, 1, 0, 0},
17022 {&__pyx_kp_u_161, __pyx_k_161,
sizeof(__pyx_k_161), 0, 1, 0, 0},
17023 {&__pyx_kp_u_162, __pyx_k_162,
sizeof(__pyx_k_162), 0, 1, 0, 0},
17024 {&__pyx_kp_u_163, __pyx_k_163,
sizeof(__pyx_k_163), 0, 1, 0, 0},
17025 {&__pyx_kp_u_164, __pyx_k_164,
sizeof(__pyx_k_164), 0, 1, 0, 0},
17026 {&__pyx_kp_u_165, __pyx_k_165,
sizeof(__pyx_k_165), 0, 1, 0, 0},
17027 {&__pyx_kp_u_166, __pyx_k_166,
sizeof(__pyx_k_166), 0, 1, 0, 0},
17028 {&__pyx_kp_u_167, __pyx_k_167,
sizeof(__pyx_k_167), 0, 1, 0, 0},
17029 {&__pyx_kp_u_168, __pyx_k_168,
sizeof(__pyx_k_168), 0, 1, 0, 0},
17030 {&__pyx_kp_u_169, __pyx_k_169,
sizeof(__pyx_k_169), 0, 1, 0, 0},
17031 {&__pyx_kp_s_17, __pyx_k_17,
sizeof(__pyx_k_17), 0, 0, 1, 0},
17032 {&__pyx_kp_u_170, __pyx_k_170,
sizeof(__pyx_k_170), 0, 1, 0, 0},
17033 {&__pyx_kp_u_171, __pyx_k_171,
sizeof(__pyx_k_171), 0, 1, 0, 0},
17034 {&__pyx_kp_u_172, __pyx_k_172,
sizeof(__pyx_k_172), 0, 1, 0, 0},
17035 {&__pyx_kp_u_173, __pyx_k_173,
sizeof(__pyx_k_173), 0, 1, 0, 0},
17036 {&__pyx_kp_u_174, __pyx_k_174,
sizeof(__pyx_k_174), 0, 1, 0, 0},
17037 {&__pyx_kp_u_175, __pyx_k_175,
sizeof(__pyx_k_175), 0, 1, 0, 0},
17038 {&__pyx_kp_u_176, __pyx_k_176,
sizeof(__pyx_k_176), 0, 1, 0, 0},
17039 {&__pyx_kp_u_177, __pyx_k_177,
sizeof(__pyx_k_177), 0, 1, 0, 0},
17040 {&__pyx_kp_u_178, __pyx_k_178,
sizeof(__pyx_k_178), 0, 1, 0, 0},
17041 {&__pyx_kp_u_179, __pyx_k_179,
sizeof(__pyx_k_179), 0, 1, 0, 0},
17042 {&__pyx_kp_s_18, __pyx_k_18,
sizeof(__pyx_k_18), 0, 0, 1, 0},
17043 {&__pyx_kp_u_180, __pyx_k_180,
sizeof(__pyx_k_180), 0, 1, 0, 0},
17044 {&__pyx_kp_u_181, __pyx_k_181,
sizeof(__pyx_k_181), 0, 1, 0, 0},
17045 {&__pyx_kp_u_182, __pyx_k_182,
sizeof(__pyx_k_182), 0, 1, 0, 0},
17046 {&__pyx_kp_u_183, __pyx_k_183,
sizeof(__pyx_k_183), 0, 1, 0, 0},
17047 {&__pyx_kp_u_184, __pyx_k_184,
sizeof(__pyx_k_184), 0, 1, 0, 0},
17048 {&__pyx_kp_u_185, __pyx_k_185,
sizeof(__pyx_k_185), 0, 1, 0, 0},
17049 {&__pyx_kp_u_186, __pyx_k_186,
sizeof(__pyx_k_186), 0, 1, 0, 0},
17050 {&__pyx_kp_u_187, __pyx_k_187,
sizeof(__pyx_k_187), 0, 1, 0, 0},
17051 {&__pyx_kp_u_188, __pyx_k_188,
sizeof(__pyx_k_188), 0, 1, 0, 0},
17052 {&__pyx_kp_u_189, __pyx_k_189,
sizeof(__pyx_k_189), 0, 1, 0, 0},
17053 {&__pyx_kp_s_19, __pyx_k_19,
sizeof(__pyx_k_19), 0, 0, 1, 0},
17054 {&__pyx_kp_u_190, __pyx_k_190,
sizeof(__pyx_k_190), 0, 1, 0, 0},
17055 {&__pyx_kp_u_191, __pyx_k_191,
sizeof(__pyx_k_191), 0, 1, 0, 0},
17056 {&__pyx_kp_u_192, __pyx_k_192,
sizeof(__pyx_k_192), 0, 1, 0, 0},
17057 {&__pyx_kp_u_193, __pyx_k_193,
sizeof(__pyx_k_193), 0, 1, 0, 0},
17058 {&__pyx_kp_u_194, __pyx_k_194,
sizeof(__pyx_k_194), 0, 1, 0, 0},
17059 {&__pyx_kp_u_195, __pyx_k_195,
sizeof(__pyx_k_195), 0, 1, 0, 0},
17060 {&__pyx_kp_u_196, __pyx_k_196,
sizeof(__pyx_k_196), 0, 1, 0, 0},
17061 {&__pyx_kp_u_197, __pyx_k_197,
sizeof(__pyx_k_197), 0, 1, 0, 0},
17062 {&__pyx_kp_u_198, __pyx_k_198,
sizeof(__pyx_k_198), 0, 1, 0, 0},
17063 {&__pyx_kp_u_199, __pyx_k_199,
sizeof(__pyx_k_199), 0, 1, 0, 0},
17064 {&__pyx_kp_s_2, __pyx_k_2,
sizeof(__pyx_k_2), 0, 0, 1, 0},
17065 {&__pyx_kp_s_20, __pyx_k_20,
sizeof(__pyx_k_20), 0, 0, 1, 0},
17066 {&__pyx_kp_u_200, __pyx_k_200,
sizeof(__pyx_k_200), 0, 1, 0, 0},
17067 {&__pyx_kp_u_201, __pyx_k_201,
sizeof(__pyx_k_201), 0, 1, 0, 0},
17068 {&__pyx_kp_u_202, __pyx_k_202,
sizeof(__pyx_k_202), 0, 1, 0, 0},
17069 {&__pyx_kp_u_203, __pyx_k_203,
sizeof(__pyx_k_203), 0, 1, 0, 0},
17070 {&__pyx_kp_u_204, __pyx_k_204,
sizeof(__pyx_k_204), 0, 1, 0, 0},
17071 {&__pyx_kp_u_205, __pyx_k_205,
sizeof(__pyx_k_205), 0, 1, 0, 0},
17072 {&__pyx_kp_u_206, __pyx_k_206,
sizeof(__pyx_k_206), 0, 1, 0, 0},
17073 {&__pyx_kp_u_207, __pyx_k_207,
sizeof(__pyx_k_207), 0, 1, 0, 0},
17074 {&__pyx_kp_u_208, __pyx_k_208,
sizeof(__pyx_k_208), 0, 1, 0, 0},
17075 {&__pyx_kp_u_209, __pyx_k_209,
sizeof(__pyx_k_209), 0, 1, 0, 0},
17076 {&__pyx_kp_s_21, __pyx_k_21,
sizeof(__pyx_k_21), 0, 0, 1, 0},
17077 {&__pyx_kp_u_210, __pyx_k_210,
sizeof(__pyx_k_210), 0, 1, 0, 0},
17078 {&__pyx_kp_u_211, __pyx_k_211,
sizeof(__pyx_k_211), 0, 1, 0, 0},
17079 {&__pyx_kp_u_212, __pyx_k_212,
sizeof(__pyx_k_212), 0, 1, 0, 0},
17080 {&__pyx_kp_u_213, __pyx_k_213,
sizeof(__pyx_k_213), 0, 1, 0, 0},
17081 {&__pyx_kp_u_214, __pyx_k_214,
sizeof(__pyx_k_214), 0, 1, 0, 0},
17082 {&__pyx_kp_u_215, __pyx_k_215,
sizeof(__pyx_k_215), 0, 1, 0, 0},
17083 {&__pyx_kp_u_216, __pyx_k_216,
sizeof(__pyx_k_216), 0, 1, 0, 0},
17084 {&__pyx_kp_u_217, __pyx_k_217,
sizeof(__pyx_k_217), 0, 1, 0, 0},
17085 {&__pyx_kp_u_218, __pyx_k_218,
sizeof(__pyx_k_218), 0, 1, 0, 0},
17086 {&__pyx_kp_u_219, __pyx_k_219,
sizeof(__pyx_k_219), 0, 1, 0, 0},
17087 {&__pyx_kp_s_22, __pyx_k_22,
sizeof(__pyx_k_22), 0, 0, 1, 0},
17088 {&__pyx_kp_u_220, __pyx_k_220,
sizeof(__pyx_k_220), 0, 1, 0, 0},
17089 {&__pyx_kp_u_221, __pyx_k_221,
sizeof(__pyx_k_221), 0, 1, 0, 0},
17090 {&__pyx_kp_u_222, __pyx_k_222,
sizeof(__pyx_k_222), 0, 1, 0, 0},
17091 {&__pyx_kp_u_223, __pyx_k_223,
sizeof(__pyx_k_223), 0, 1, 0, 0},
17092 {&__pyx_kp_u_224, __pyx_k_224,
sizeof(__pyx_k_224), 0, 1, 0, 0},
17093 {&__pyx_kp_u_225, __pyx_k_225,
sizeof(__pyx_k_225), 0, 1, 0, 0},
17094 {&__pyx_kp_u_226, __pyx_k_226,
sizeof(__pyx_k_226), 0, 1, 0, 0},
17095 {&__pyx_kp_u_227, __pyx_k_227,
sizeof(__pyx_k_227), 0, 1, 0, 0},
17096 {&__pyx_kp_u_228, __pyx_k_228,
sizeof(__pyx_k_228), 0, 1, 0, 0},
17097 {&__pyx_kp_u_229, __pyx_k_229,
sizeof(__pyx_k_229), 0, 1, 0, 0},
17098 {&__pyx_kp_s_23, __pyx_k_23,
sizeof(__pyx_k_23), 0, 0, 1, 0},
17099 {&__pyx_kp_u_230, __pyx_k_230,
sizeof(__pyx_k_230), 0, 1, 0, 0},
17100 {&__pyx_kp_u_231, __pyx_k_231,
sizeof(__pyx_k_231), 0, 1, 0, 0},
17101 {&__pyx_kp_u_232, __pyx_k_232,
sizeof(__pyx_k_232), 0, 1, 0, 0},
17102 {&__pyx_kp_u_233, __pyx_k_233,
sizeof(__pyx_k_233), 0, 1, 0, 0},
17103 {&__pyx_kp_u_234, __pyx_k_234,
sizeof(__pyx_k_234), 0, 1, 0, 0},
17104 {&__pyx_kp_u_235, __pyx_k_235,
sizeof(__pyx_k_235), 0, 1, 0, 0},
17105 {&__pyx_kp_u_236, __pyx_k_236,
sizeof(__pyx_k_236), 0, 1, 0, 0},
17106 {&__pyx_kp_u_237, __pyx_k_237,
sizeof(__pyx_k_237), 0, 1, 0, 0},
17107 {&__pyx_kp_u_238, __pyx_k_238,
sizeof(__pyx_k_238), 0, 1, 0, 0},
17108 {&__pyx_kp_u_239, __pyx_k_239,
sizeof(__pyx_k_239), 0, 1, 0, 0},
17109 {&__pyx_kp_u_240, __pyx_k_240,
sizeof(__pyx_k_240), 0, 1, 0, 0},
17110 {&__pyx_kp_u_241, __pyx_k_241,
sizeof(__pyx_k_241), 0, 1, 0, 0},
17111 {&__pyx_kp_u_242, __pyx_k_242,
sizeof(__pyx_k_242), 0, 1, 0, 0},
17112 {&__pyx_kp_u_243, __pyx_k_243,
sizeof(__pyx_k_243), 0, 1, 0, 0},
17113 {&__pyx_kp_u_244, __pyx_k_244,
sizeof(__pyx_k_244), 0, 1, 0, 0},
17114 {&__pyx_kp_u_245, __pyx_k_245,
sizeof(__pyx_k_245), 0, 1, 0, 0},
17115 {&__pyx_kp_u_246, __pyx_k_246,
sizeof(__pyx_k_246), 0, 1, 0, 0},
17116 {&__pyx_kp_u_247, __pyx_k_247,
sizeof(__pyx_k_247), 0, 1, 0, 0},
17117 {&__pyx_kp_u_248, __pyx_k_248,
sizeof(__pyx_k_248), 0, 1, 0, 0},
17118 {&__pyx_kp_u_249, __pyx_k_249,
sizeof(__pyx_k_249), 0, 1, 0, 0},
17119 {&__pyx_kp_s_25, __pyx_k_25,
sizeof(__pyx_k_25), 0, 0, 1, 0},
17120 {&__pyx_kp_u_250, __pyx_k_250,
sizeof(__pyx_k_250), 0, 1, 0, 0},
17121 {&__pyx_kp_u_251, __pyx_k_251,
sizeof(__pyx_k_251), 0, 1, 0, 0},
17122 {&__pyx_kp_u_252, __pyx_k_252,
sizeof(__pyx_k_252), 0, 1, 0, 0},
17123 {&__pyx_kp_u_253, __pyx_k_253,
sizeof(__pyx_k_253), 0, 1, 0, 0},
17124 {&__pyx_kp_u_254, __pyx_k_254,
sizeof(__pyx_k_254), 0, 1, 0, 0},
17125 {&__pyx_n_s_27, __pyx_k_27,
sizeof(__pyx_k_27), 0, 0, 1, 1},
17126 {&__pyx_kp_s_28, __pyx_k_28,
sizeof(__pyx_k_28), 0, 0, 1, 0},
17127 {&__pyx_kp_s_3, __pyx_k_3,
sizeof(__pyx_k_3), 0, 0, 1, 0},
17128 {&__pyx_n_s_30, __pyx_k_30,
sizeof(__pyx_k_30), 0, 0, 1, 1},
17129 {&__pyx_kp_s_4, __pyx_k_4,
sizeof(__pyx_k_4), 0, 0, 1, 0},
17130 {&__pyx_kp_u_41, __pyx_k_41,
sizeof(__pyx_k_41), 0, 1, 0, 0},
17131 {&__pyx_kp_u_42, __pyx_k_42,
sizeof(__pyx_k_42), 0, 1, 0, 0},
17132 {&__pyx_kp_u_43, __pyx_k_43,
sizeof(__pyx_k_43), 0, 1, 0, 0},
17133 {&__pyx_kp_u_44, __pyx_k_44,
sizeof(__pyx_k_44), 0, 1, 0, 0},
17134 {&__pyx_kp_u_45, __pyx_k_45,
sizeof(__pyx_k_45), 0, 1, 0, 0},
17135 {&__pyx_kp_u_46, __pyx_k_46,
sizeof(__pyx_k_46), 0, 1, 0, 0},
17136 {&__pyx_kp_u_47, __pyx_k_47,
sizeof(__pyx_k_47), 0, 1, 0, 0},
17137 {&__pyx_kp_u_48, __pyx_k_48,
sizeof(__pyx_k_48), 0, 1, 0, 0},
17138 {&__pyx_kp_u_49, __pyx_k_49,
sizeof(__pyx_k_49), 0, 1, 0, 0},
17139 {&__pyx_kp_s_5, __pyx_k_5,
sizeof(__pyx_k_5), 0, 0, 1, 0},
17140 {&__pyx_kp_u_50, __pyx_k_50,
sizeof(__pyx_k_50), 0, 1, 0, 0},
17141 {&__pyx_kp_u_51, __pyx_k_51,
sizeof(__pyx_k_51), 0, 1, 0, 0},
17142 {&__pyx_kp_u_52, __pyx_k_52,
sizeof(__pyx_k_52), 0, 1, 0, 0},
17143 {&__pyx_kp_u_53, __pyx_k_53,
sizeof(__pyx_k_53), 0, 1, 0, 0},
17144 {&__pyx_kp_u_54, __pyx_k_54,
sizeof(__pyx_k_54), 0, 1, 0, 0},
17145 {&__pyx_kp_u_55, __pyx_k_55,
sizeof(__pyx_k_55), 0, 1, 0, 0},
17146 {&__pyx_kp_u_56, __pyx_k_56,
sizeof(__pyx_k_56), 0, 1, 0, 0},
17147 {&__pyx_kp_u_57, __pyx_k_57,
sizeof(__pyx_k_57), 0, 1, 0, 0},
17148 {&__pyx_kp_u_58, __pyx_k_58,
sizeof(__pyx_k_58), 0, 1, 0, 0},
17149 {&__pyx_kp_u_59, __pyx_k_59,
sizeof(__pyx_k_59), 0, 1, 0, 0},
17150 {&__pyx_kp_s_6, __pyx_k_6,
sizeof(__pyx_k_6), 0, 0, 1, 0},
17151 {&__pyx_kp_u_60, __pyx_k_60,
sizeof(__pyx_k_60), 0, 1, 0, 0},
17152 {&__pyx_kp_u_61, __pyx_k_61,
sizeof(__pyx_k_61), 0, 1, 0, 0},
17153 {&__pyx_kp_u_62, __pyx_k_62,
sizeof(__pyx_k_62), 0, 1, 0, 0},
17154 {&__pyx_kp_u_63, __pyx_k_63,
sizeof(__pyx_k_63), 0, 1, 0, 0},
17155 {&__pyx_kp_u_64, __pyx_k_64,
sizeof(__pyx_k_64), 0, 1, 0, 0},
17156 {&__pyx_kp_u_65, __pyx_k_65,
sizeof(__pyx_k_65), 0, 1, 0, 0},
17157 {&__pyx_kp_u_66, __pyx_k_66,
sizeof(__pyx_k_66), 0, 1, 0, 0},
17158 {&__pyx_kp_u_67, __pyx_k_67,
sizeof(__pyx_k_67), 0, 1, 0, 0},
17159 {&__pyx_kp_u_68, __pyx_k_68,
sizeof(__pyx_k_68), 0, 1, 0, 0},
17160 {&__pyx_kp_u_69, __pyx_k_69,
sizeof(__pyx_k_69), 0, 1, 0, 0},
17161 {&__pyx_kp_s_7, __pyx_k_7,
sizeof(__pyx_k_7), 0, 0, 1, 0},
17162 {&__pyx_kp_u_70, __pyx_k_70,
sizeof(__pyx_k_70), 0, 1, 0, 0},
17163 {&__pyx_kp_u_71, __pyx_k_71,
sizeof(__pyx_k_71), 0, 1, 0, 0},
17164 {&__pyx_kp_u_72, __pyx_k_72,
sizeof(__pyx_k_72), 0, 1, 0, 0},
17165 {&__pyx_kp_u_73, __pyx_k_73,
sizeof(__pyx_k_73), 0, 1, 0, 0},
17166 {&__pyx_kp_u_74, __pyx_k_74,
sizeof(__pyx_k_74), 0, 1, 0, 0},
17167 {&__pyx_kp_u_75, __pyx_k_75,
sizeof(__pyx_k_75), 0, 1, 0, 0},
17168 {&__pyx_kp_u_76, __pyx_k_76,
sizeof(__pyx_k_76), 0, 1, 0, 0},
17169 {&__pyx_kp_u_77, __pyx_k_77,
sizeof(__pyx_k_77), 0, 1, 0, 0},
17170 {&__pyx_kp_u_78, __pyx_k_78,
sizeof(__pyx_k_78), 0, 1, 0, 0},
17171 {&__pyx_kp_u_79, __pyx_k_79,
sizeof(__pyx_k_79), 0, 1, 0, 0},
17172 {&__pyx_kp_s_8, __pyx_k_8,
sizeof(__pyx_k_8), 0, 0, 1, 0},
17173 {&__pyx_kp_u_80, __pyx_k_80,
sizeof(__pyx_k_80), 0, 1, 0, 0},
17174 {&__pyx_kp_u_81, __pyx_k_81,
sizeof(__pyx_k_81), 0, 1, 0, 0},
17175 {&__pyx_kp_u_82, __pyx_k_82,
sizeof(__pyx_k_82), 0, 1, 0, 0},
17176 {&__pyx_kp_u_83, __pyx_k_83,
sizeof(__pyx_k_83), 0, 1, 0, 0},
17177 {&__pyx_kp_u_84, __pyx_k_84,
sizeof(__pyx_k_84), 0, 1, 0, 0},
17178 {&__pyx_kp_u_85, __pyx_k_85,
sizeof(__pyx_k_85), 0, 1, 0, 0},
17179 {&__pyx_kp_u_86, __pyx_k_86,
sizeof(__pyx_k_86), 0, 1, 0, 0},
17180 {&__pyx_kp_u_87, __pyx_k_87,
sizeof(__pyx_k_87), 0, 1, 0, 0},
17181 {&__pyx_kp_u_88, __pyx_k_88,
sizeof(__pyx_k_88), 0, 1, 0, 0},
17182 {&__pyx_kp_u_89, __pyx_k_89,
sizeof(__pyx_k_89), 0, 1, 0, 0},
17183 {&__pyx_kp_s_9, __pyx_k_9,
sizeof(__pyx_k_9), 0, 0, 1, 0},
17184 {&__pyx_kp_u_90, __pyx_k_90,
sizeof(__pyx_k_90), 0, 1, 0, 0},
17185 {&__pyx_kp_u_91, __pyx_k_91,
sizeof(__pyx_k_91), 0, 1, 0, 0},
17186 {&__pyx_kp_u_92, __pyx_k_92,
sizeof(__pyx_k_92), 0, 1, 0, 0},
17187 {&__pyx_kp_u_93, __pyx_k_93,
sizeof(__pyx_k_93), 0, 1, 0, 0},
17188 {&__pyx_kp_u_94, __pyx_k_94,
sizeof(__pyx_k_94), 0, 1, 0, 0},
17189 {&__pyx_kp_u_95, __pyx_k_95,
sizeof(__pyx_k_95), 0, 1, 0, 0},
17190 {&__pyx_kp_u_96, __pyx_k_96,
sizeof(__pyx_k_96), 0, 1, 0, 0},
17191 {&__pyx_kp_u_97, __pyx_k_97,
sizeof(__pyx_k_97), 0, 1, 0, 0},
17192 {&__pyx_kp_u_98, __pyx_k_98,
sizeof(__pyx_k_98), 0, 1, 0, 0},
17193 {&__pyx_kp_u_99, __pyx_k_99,
sizeof(__pyx_k_99), 0, 1, 0, 0},
17194 {&__pyx_n_s__IndexError, __pyx_k__IndexError,
sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
17195 {&__pyx_n_s__Integral, __pyx_k__Integral,
sizeof(__pyx_k__Integral), 0, 0, 1, 1},
17196 {&__pyx_n_s__NotImplemented, __pyx_k__NotImplemented,
sizeof(__pyx_k__NotImplemented), 0, 0, 1, 1},
17197 {&__pyx_n_s__PyClical, __pyx_k__PyClical,
sizeof(__pyx_k__PyClical), 0, 0, 1, 1},
17198 {&__pyx_n_s__Real, __pyx_k__Real,
sizeof(__pyx_k__Real), 0, 0, 1, 1},
17199 {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError,
sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
17200 {&__pyx_n_s__Sequence, __pyx_k__Sequence,
sizeof(__pyx_k__Sequence), 0, 0, 1, 1},
17201 {&__pyx_n_s__TypeError, __pyx_k__TypeError,
sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
17202 {&__pyx_n_s__ValueError, __pyx_k__ValueError,
sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
17203 {&__pyx_n_s____import__, __pyx_k____import__,
sizeof(__pyx_k____import__), 0, 0, 1, 1},
17204 {&__pyx_n_s____main__, __pyx_k____main__,
sizeof(__pyx_k____main__), 0, 0, 1, 1},
17205 {&__pyx_n_s____name__, __pyx_k____name__,
sizeof(__pyx_k____name__), 0, 0, 1, 1},
17206 {&__pyx_n_s____pyx_vtable__, __pyx_k____pyx_vtable__,
sizeof(__pyx_k____pyx_vtable__), 0, 0, 1, 1},
17207 {&__pyx_n_s____test__, __pyx_k____test__,
sizeof(__pyx_k____test__), 0, 0, 1, 1},
17208 {&__pyx_n_s____version__, __pyx_k____version__,
sizeof(__pyx_k____version__), 0, 0, 1, 1},
17209 {&__pyx_n_s___test, __pyx_k___test,
sizeof(__pyx_k___test), 0, 0, 1, 1},
17210 {&__pyx_n_s__acos, __pyx_k__acos,
sizeof(__pyx_k__acos), 0, 0, 1, 1},
17211 {&__pyx_n_s__acosh, __pyx_k__acosh,
sizeof(__pyx_k__acosh), 0, 0, 1, 1},
17212 {&__pyx_n_s__args, __pyx_k__args,
sizeof(__pyx_k__args), 0, 0, 1, 1},
17213 {&__pyx_n_s__asin, __pyx_k__asin,
sizeof(__pyx_k__asin), 0, 0, 1, 1},
17214 {&__pyx_n_s__asinh, __pyx_k__asinh,
sizeof(__pyx_k__asinh), 0, 0, 1, 1},
17215 {&__pyx_n_s__atan, __pyx_k__atan,
sizeof(__pyx_k__atan), 0, 0, 1, 1},
17216 {&__pyx_n_s__atanh, __pyx_k__atanh,
sizeof(__pyx_k__atanh), 0, 0, 1, 1},
17217 {&__pyx_n_s__cl, __pyx_k__cl,
sizeof(__pyx_k__cl), 0, 0, 1, 1},
17218 {&__pyx_n_s__close, __pyx_k__close,
sizeof(__pyx_k__close), 0, 0, 1, 1},
17219 {&__pyx_n_s__collections, __pyx_k__collections,
sizeof(__pyx_k__collections), 0, 0, 1, 1},
17220 {&__pyx_n_s__conj, __pyx_k__conj,
sizeof(__pyx_k__conj), 0, 0, 1, 1},
17221 {&__pyx_n_s__copy, __pyx_k__copy,
sizeof(__pyx_k__copy), 0, 0, 1, 1},
17222 {&__pyx_n_s__cos, __pyx_k__cos,
sizeof(__pyx_k__cos), 0, 0, 1, 1},
17223 {&__pyx_n_s__cosh, __pyx_k__cosh,
sizeof(__pyx_k__cosh), 0, 0, 1, 1},
17224 {&__pyx_n_s__doctest, __pyx_k__doctest,
sizeof(__pyx_k__doctest), 0, 0, 1, 1},
17225 {&__pyx_n_s__e, __pyx_k__e,
sizeof(__pyx_k__e), 0, 0, 1, 1},
17226 {&__pyx_n_s__even, __pyx_k__even,
sizeof(__pyx_k__even), 0, 0, 1, 1},
17227 {&__pyx_n_s__exp, __pyx_k__exp,
sizeof(__pyx_k__exp), 0, 0, 1, 1},
17228 {&__pyx_n_s__fill, __pyx_k__fill,
sizeof(__pyx_k__fill), 0, 0, 1, 1},
17229 {&__pyx_n_s__frm, __pyx_k__frm,
sizeof(__pyx_k__frm), 0, 0, 1, 1},
17230 {&__pyx_n_s__grade, __pyx_k__grade,
sizeof(__pyx_k__grade), 0, 0, 1, 1},
17231 {&__pyx_n_s__i, __pyx_k__i,
sizeof(__pyx_k__i), 0, 0, 1, 1},
17232 {&__pyx_n_s__inv, __pyx_k__inv,
sizeof(__pyx_k__inv), 0, 0, 1, 1},
17233 {&__pyx_n_s__involute, __pyx_k__involute,
sizeof(__pyx_k__involute), 0, 0, 1, 1},
17234 {&__pyx_n_s__ist, __pyx_k__ist,
sizeof(__pyx_k__ist), 0, 0, 1, 1},
17235 {&__pyx_n_s__istpq, __pyx_k__istpq,
sizeof(__pyx_k__istpq), 0, 0, 1, 1},
17236 {&__pyx_n_s__ixt, __pyx_k__ixt,
sizeof(__pyx_k__ixt), 0, 0, 1, 1},
17237 {&__pyx_n_s__lhs, __pyx_k__lhs,
sizeof(__pyx_k__lhs), 0, 0, 1, 1},
17238 {&__pyx_n_s__log, __pyx_k__log,
sizeof(__pyx_k__log), 0, 0, 1, 1},
17239 {&__pyx_n_s__m, __pyx_k__m,
sizeof(__pyx_k__m), 0, 0, 1, 1},
17240 {&__pyx_n_s__math, __pyx_k__math,
sizeof(__pyx_k__math), 0, 0, 1, 1},
17241 {&__pyx_n_s__max, __pyx_k__max,
sizeof(__pyx_k__max), 0, 0, 1, 1},
17242 {&__pyx_n_s__min, __pyx_k__min,
sizeof(__pyx_k__min), 0, 0, 1, 1},
17243 {&__pyx_n_s__nbar3, __pyx_k__nbar3,
sizeof(__pyx_k__nbar3), 0, 0, 1, 1},
17244 {&__pyx_n_s__ninf3, __pyx_k__ninf3,
sizeof(__pyx_k__ninf3), 0, 0, 1, 1},
17245 {&__pyx_n_s__norm, __pyx_k__norm,
sizeof(__pyx_k__norm), 0, 0, 1, 1},
17246 {&__pyx_n_s__numbers, __pyx_k__numbers,
sizeof(__pyx_k__numbers), 0, 0, 1, 1},
17247 {&__pyx_n_s__obj, __pyx_k__obj,
sizeof(__pyx_k__obj), 0, 0, 1, 1},
17248 {&__pyx_n_s__odd, __pyx_k__odd,
sizeof(__pyx_k__odd), 0, 0, 1, 1},
17249 {&__pyx_n_s__other, __pyx_k__other,
sizeof(__pyx_k__other), 0, 0, 1, 1},
17250 {&__pyx_n_s__outer_pow, __pyx_k__outer_pow,
sizeof(__pyx_k__outer_pow), 0, 0, 1, 1},
17251 {&__pyx_n_s__p, __pyx_k__p,
sizeof(__pyx_k__p), 0, 0, 1, 1},
17252 {&__pyx_n_s__pi, __pyx_k__pi,
sizeof(__pyx_k__pi), 0, 0, 1, 1},
17253 {&__pyx_n_s__pow, __pyx_k__pow,
sizeof(__pyx_k__pow), 0, 0, 1, 1},
17254 {&__pyx_n_s__pure, __pyx_k__pure,
sizeof(__pyx_k__pure), 0, 0, 1, 1},
17255 {&__pyx_n_s__q, __pyx_k__q,
sizeof(__pyx_k__q), 0, 0, 1, 1},
17256 {&__pyx_n_s__quad, __pyx_k__quad,
sizeof(__pyx_k__quad), 0, 0, 1, 1},
17257 {&__pyx_n_s__range, __pyx_k__range,
sizeof(__pyx_k__range), 0, 0, 1, 1},
17258 {&__pyx_n_s__reverse, __pyx_k__reverse,
sizeof(__pyx_k__reverse), 0, 0, 1, 1},
17259 {&__pyx_n_s__rhs, __pyx_k__rhs,
sizeof(__pyx_k__rhs), 0, 0, 1, 1},
17260 {&__pyx_n_s__scalar, __pyx_k__scalar,
sizeof(__pyx_k__scalar), 0, 0, 1, 1},
17261 {&__pyx_n_s__send, __pyx_k__send,
sizeof(__pyx_k__send), 0, 0, 1, 1},
17262 {&__pyx_n_s__sin, __pyx_k__sin,
sizeof(__pyx_k__sin), 0, 0, 1, 1},
17263 {&__pyx_n_s__sinh, __pyx_k__sinh,
sizeof(__pyx_k__sinh), 0, 0, 1, 1},
17264 {&__pyx_n_s__sqrt, __pyx_k__sqrt,
sizeof(__pyx_k__sqrt), 0, 0, 1, 1},
17265 {&__pyx_n_s__tan, __pyx_k__tan,
sizeof(__pyx_k__tan), 0, 0, 1, 1},
17266 {&__pyx_n_s__tanh, __pyx_k__tanh,
sizeof(__pyx_k__tanh), 0, 0, 1, 1},
17267 {&__pyx_n_s__tau, __pyx_k__tau,
sizeof(__pyx_k__tau), 0, 0, 1, 1},
17268 {&__pyx_n_s__testmod, __pyx_k__testmod,
sizeof(__pyx_k__testmod), 0, 0, 1, 1},
17269 {&__pyx_n_s__throw, __pyx_k__throw,
sizeof(__pyx_k__throw), 0, 0, 1, 1},
17270 {&__pyx_n_s__xrange, __pyx_k__xrange,
sizeof(__pyx_k__xrange), 0, 0, 1, 1},
17271 {0, 0, 0, 0, 0, 0, 0}
17273 static int __Pyx_InitCachedBuiltins(
void) {
17274 __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;}
17275 __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;}
17276 __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;}
17277 __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;}
17278 __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;}
17279 __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;}
17280 #if PY_MAJOR_VERSION >= 3
17281 __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;}
17283 __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;}
17290 static int __Pyx_InitCachedConstants(
void) {
17291 __Pyx_RefNannyDeclarations
17292 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
17301 __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13));
if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17302 __Pyx_GOTREF(__pyx_k_tuple_14);
17303 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
17312 __pyx_k_tuple_15 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13));
if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17313 __Pyx_GOTREF(__pyx_k_tuple_15);
17314 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
17323 __pyx_k_codeobj_26 = (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_28, __pyx_n_s_27, 404, __pyx_empty_bytes);
if (unlikely(!__pyx_k_codeobj_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17332 __pyx_k_codeobj_29 = (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_28, __pyx_n_s_30, 1243, __pyx_empty_bytes);
if (unlikely(!__pyx_k_codeobj_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17341 __pyx_k_tuple_31 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__obj));
if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17342 __Pyx_GOTREF(__pyx_k_tuple_31);
17343 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));
17344 __pyx_k_codeobj_32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_28, __pyx_n_s__e, 1887, __pyx_empty_bytes);
if (unlikely(!__pyx_k_codeobj_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17353 __pyx_k_tuple_33 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__p), ((PyObject *)__pyx_n_s__q));
if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17354 __Pyx_GOTREF(__pyx_k_tuple_33);
17355 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
17356 __pyx_k_codeobj_34 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_28, __pyx_n_s__istpq, 1900, __pyx_empty_bytes);
if (unlikely(!__pyx_k_codeobj_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17365 __pyx_k_tuple_35 = PyTuple_Pack(1, __pyx_int_4);
if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17366 __Pyx_GOTREF(__pyx_k_tuple_35);
17367 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));
17368 __pyx_k_tuple_36 = PyTuple_Pack(1, __pyx_int_neg_1);
if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17369 __Pyx_GOTREF(__pyx_k_tuple_36);
17370 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));
17379 __pyx_k_tuple_37 = PyTuple_Pack(1, __pyx_int_4);
if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17380 __Pyx_GOTREF(__pyx_k_tuple_37);
17381 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));
17382 __pyx_k_tuple_38 = PyTuple_Pack(1, __pyx_int_neg_1);
if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17383 __Pyx_GOTREF(__pyx_k_tuple_38);
17384 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38));
17393 __pyx_k_tuple_39 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__PyClical), ((PyObject *)__pyx_n_s__doctest));
if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17394 __Pyx_GOTREF(__pyx_k_tuple_39);
17395 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));
17396 __pyx_k_codeobj_40 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_28, __pyx_n_s___test, 1913, __pyx_empty_bytes);
if (unlikely(!__pyx_k_codeobj_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17397 __Pyx_RefNannyFinishContext();
17400 __Pyx_RefNannyFinishContext();
17404 static int __Pyx_InitGlobals(
void) {
17405 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;};
17406 __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;};
17407 __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;};
17408 __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;};
17409 __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;};
17415 #if PY_MAJOR_VERSION < 3
17416 PyMODINIT_FUNC initPyClical(
void);
17417 PyMODINIT_FUNC initPyClical(
void)
17419 PyMODINIT_FUNC PyInit_PyClical(
void);
17420 PyMODINIT_FUNC PyInit_PyClical(
void)
17423 PyObject *__pyx_t_1 = NULL;
17424 PyObject *__pyx_t_2 = NULL;
17425 PyObject *__pyx_t_3 = NULL;
17427 int __pyx_lineno = 0;
17428 const char *__pyx_filename = NULL;
17429 int __pyx_clineno = 0;
17430 __Pyx_RefNannyDeclarations
17431 #if CYTHON_REFNANNY
17432 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
17433 if (!__Pyx_RefNanny) {
17435 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
17436 if (!__Pyx_RefNanny)
17437 Py_FatalError(
"failed to import 'refnanny' module");
17440 __Pyx_RefNannySetupContext(
"PyMODINIT_FUNC PyInit_PyClical(void)", 0);
17441 if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17442 __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;}
17443 __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;}
17444 #ifdef __Pyx_CyFunction_USED
17445 if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17447 #ifdef __Pyx_FusedFunction_USED
17448 if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17450 #ifdef __Pyx_Generator_USED
17451 if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17455 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
17457 PyEval_InitThreads();
17461 #if PY_MAJOR_VERSION < 3
17462 __pyx_m = Py_InitModule4(__Pyx_NAMESTR(
"PyClical"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
17464 __pyx_m = PyModule_Create(&__pyx_moduledef);
17466 if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17467 __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;}
17468 Py_INCREF(__pyx_d);
17469 #if PY_MAJOR_VERSION >= 3
17471 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17472 if (!PyDict_GetItemString(modules,
"PyClical")) {
17473 if (unlikely(PyDict_SetItemString(modules,
"PyClical", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17477 __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17478 #if CYTHON_COMPILING_IN_PYPY
17479 Py_INCREF(__pyx_b);
17481 if (__Pyx_SetAttrString(__pyx_m,
"__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;};
17483 if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17484 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
17485 if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17487 if (__pyx_module_is_main_PyClical) {
17488 if (__Pyx_SetAttrString(__pyx_m,
"__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;};
17491 if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17493 if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17498 __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
17499 __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
IndexSet))__pyx_f_8PyClical_9index_set_wrap;
17500 __pyx_vtable_8PyClical_index_set.unwrap = (
IndexSet (*)(
struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
17501 __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_index_set *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
17502 if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17503 #if CYTHON_COMPILING_IN_CPYTHON
17505 PyObject *wrapper = __Pyx_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;}
17506 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17507 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17508 __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
17509 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
17513 #if CYTHON_COMPILING_IN_CPYTHON
17515 PyObject *wrapper = __Pyx_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;}
17516 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17517 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17518 __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
17519 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
17523 #if CYTHON_COMPILING_IN_CPYTHON
17525 PyObject *wrapper = __Pyx_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;}
17526 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17527 __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17528 __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
17529 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
17533 #if CYTHON_COMPILING_IN_CPYTHON
17535 PyObject *wrapper = __Pyx_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;}
17536 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17537 __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17538 __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
17539 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
17543 #if CYTHON_COMPILING_IN_CPYTHON
17545 PyObject *wrapper = __Pyx_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;}
17546 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17547 __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17548 __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
17549 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
17553 #if CYTHON_COMPILING_IN_CPYTHON
17555 PyObject *wrapper = __Pyx_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;}
17556 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17557 __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17558 __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
17559 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
17563 #if CYTHON_COMPILING_IN_CPYTHON
17565 PyObject *wrapper = __Pyx_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;}
17566 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17567 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17568 __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
17569 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
17573 #if CYTHON_COMPILING_IN_CPYTHON
17575 PyObject *wrapper = __Pyx_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;}
17576 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17577 __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17578 __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
17579 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
17583 #if CYTHON_COMPILING_IN_CPYTHON
17585 PyObject *wrapper = __Pyx_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;}
17586 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17587 __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17588 __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
17589 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
17593 #if CYTHON_COMPILING_IN_CPYTHON
17595 PyObject *wrapper = __Pyx_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;}
17596 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17597 __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17598 __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
17599 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
17603 #if CYTHON_COMPILING_IN_CPYTHON
17605 PyObject *wrapper = __Pyx_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;}
17606 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17607 __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17608 __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
17609 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
17613 #if CYTHON_COMPILING_IN_CPYTHON
17615 PyObject *wrapper = __Pyx_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;}
17616 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17617 __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17618 __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
17619 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
17623 #if CYTHON_COMPILING_IN_CPYTHON
17625 PyObject *wrapper = __Pyx_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;}
17626 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17627 __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17628 __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
17629 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
17633 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;}
17634 if (__Pyx_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;}
17635 __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
17636 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;}
17637 __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
17638 __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
17639 __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
Clifford))__pyx_f_8PyClical_8clifford_wrap;
17640 __pyx_vtable_8PyClical_clifford.unwrap = (
Clifford (*)(
struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
17641 __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(
struct __pyx_obj_8PyClical_clifford *,
int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
17642 if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17643 #if CYTHON_COMPILING_IN_CPYTHON
17645 PyObject *wrapper = __Pyx_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;}
17646 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17647 __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17648 __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
17649 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
17653 #if CYTHON_COMPILING_IN_CPYTHON
17655 PyObject *wrapper = __Pyx_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;}
17656 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17657 __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17658 __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
17659 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
17663 #if CYTHON_COMPILING_IN_CPYTHON
17665 PyObject *wrapper = __Pyx_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;}
17666 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17667 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17668 __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
17669 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
17673 #if CYTHON_COMPILING_IN_CPYTHON
17675 PyObject *wrapper = __Pyx_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;}
17676 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17677 __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17678 __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
17679 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
17683 #if CYTHON_COMPILING_IN_CPYTHON
17685 PyObject *wrapper = __Pyx_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;}
17686 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17687 __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17688 __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
17689 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
17693 #if CYTHON_COMPILING_IN_CPYTHON
17695 PyObject *wrapper = __Pyx_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;}
17696 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17697 __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17698 __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
17699 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
17703 #if CYTHON_COMPILING_IN_CPYTHON
17705 PyObject *wrapper = __Pyx_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;}
17706 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17707 __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17708 __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
17709 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
17713 #if CYTHON_COMPILING_IN_CPYTHON
17715 PyObject *wrapper = __Pyx_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;}
17716 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17717 __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17718 __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
17719 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
17723 #if CYTHON_COMPILING_IN_CPYTHON
17725 PyObject *wrapper = __Pyx_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;}
17726 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17727 __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17728 __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
17729 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
17733 #if CYTHON_COMPILING_IN_CPYTHON
17735 PyObject *wrapper = __Pyx_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;}
17736 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17737 __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17738 __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
17739 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
17743 #if CYTHON_COMPILING_IN_CPYTHON
17745 PyObject *wrapper = __Pyx_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;}
17746 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17747 __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17748 __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
17749 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
17753 #if CYTHON_COMPILING_IN_CPYTHON
17755 PyObject *wrapper = __Pyx_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;}
17756 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17757 __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17758 __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
17759 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
17763 #if CYTHON_COMPILING_IN_CPYTHON
17765 PyObject *wrapper = __Pyx_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;}
17766 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17767 __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17768 __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
17769 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
17773 #if CYTHON_COMPILING_IN_CPYTHON
17775 PyObject *wrapper = __Pyx_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;}
17776 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17777 __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17778 __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
17779 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
17783 #if CYTHON_COMPILING_IN_CPYTHON
17785 PyObject *wrapper = __Pyx_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;}
17786 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17787 __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17788 __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
17789 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
17793 #if CYTHON_COMPILING_IN_CPYTHON
17795 PyObject *wrapper = __Pyx_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;}
17796 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17797 __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17798 __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
17799 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
17803 #if CYTHON_COMPILING_IN_CPYTHON
17805 PyObject *wrapper = __Pyx_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;}
17806 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17807 __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17808 __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
17809 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
17813 #if CYTHON_COMPILING_IN_CPYTHON
17815 PyObject *wrapper = __Pyx_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;}
17816 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17817 __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17818 __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
17819 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
17823 #if CYTHON_COMPILING_IN_CPYTHON
17825 PyObject *wrapper = __Pyx_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;}
17826 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17827 __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17828 __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
17829 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
17833 #if CYTHON_COMPILING_IN_CPYTHON
17835 PyObject *wrapper = __Pyx_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;}
17836 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17837 __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17838 __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
17839 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
17843 #if CYTHON_COMPILING_IN_CPYTHON
17845 PyObject *wrapper = __Pyx_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;}
17846 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17847 __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17848 __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
17849 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
17853 #if CYTHON_COMPILING_IN_CPYTHON
17855 PyObject *wrapper = __Pyx_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;}
17856 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17857 __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17858 __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
17859 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
17863 #if CYTHON_COMPILING_IN_CPYTHON
17865 PyObject *wrapper = __Pyx_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;}
17866 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17867 __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17868 __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
17869 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
17873 #if CYTHON_COMPILING_IN_CPYTHON
17875 PyObject *wrapper = __Pyx_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;}
17876 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17877 __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17878 __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
17879 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
17883 #if CYTHON_COMPILING_IN_CPYTHON
17885 PyObject *wrapper = __Pyx_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;}
17886 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
17887 __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
17888 __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
17889 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
17893 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;}
17894 if (__Pyx_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;}
17895 __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
17908 __pyx_t_1 = __Pyx_Import(((PyObject *)__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;}
17909 __Pyx_GOTREF(__pyx_t_1);
17910 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;}
17911 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17920 __pyx_t_1 = __Pyx_Import(((PyObject *)__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;}
17921 __Pyx_GOTREF(__pyx_t_1);
17922 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;}
17923 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17932 __pyx_t_1 = __Pyx_Import(((PyObject *)__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;}
17933 __Pyx_GOTREF(__pyx_t_1);
17934 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;}
17935 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17944 if (PyDict_SetItem(__pyx_d, __pyx_n_s____version__, ((PyObject *)__pyx_kp_s_25)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17953 __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;}
17954 __Pyx_GOTREF(__pyx_t_1);
17955 if (PyDict_SetItem(__pyx_d, __pyx_n_s_27, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17956 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17965 __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;}
17966 __Pyx_GOTREF(__pyx_t_1);
17967 if (PyDict_SetItem(__pyx_d, __pyx_n_s_30, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17968 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17977 __pyx_t_1 =
PyFloat_FromDouble(1.0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17978 __Pyx_GOTREF(__pyx_t_1);
17979 __pyx_k_24 = __pyx_t_1;
17980 __Pyx_GIVEREF(__pyx_t_1);
17990 __pyx_t_1 =
PyFloat_FromDouble(1.0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17991 __Pyx_GOTREF(__pyx_t_1);
17992 __pyx_t_2 = PyTuple_New(1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17993 __Pyx_GOTREF(__pyx_t_2);
17994 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
17995 __Pyx_GIVEREF(__pyx_t_1);
17997 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), ((PyObject *)__pyx_t_2), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
17998 __Pyx_GOTREF(__pyx_t_1);
17999 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18000 __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;}
18001 __Pyx_GOTREF(__pyx_t_2);
18002 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18003 __pyx_t_1 =
PyFloat_FromDouble(8.0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18004 __Pyx_GOTREF(__pyx_t_1);
18005 __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18006 __Pyx_GOTREF(__pyx_t_3);
18007 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18008 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18009 if (PyDict_SetItem(__pyx_d, __pyx_n_s__tau, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18010 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18019 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__tau);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18020 __Pyx_GOTREF(__pyx_t_3);
18021 __pyx_t_1 =
PyFloat_FromDouble(2.0);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18022 __Pyx_GOTREF(__pyx_t_1);
18023 __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_1);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18024 __Pyx_GOTREF(__pyx_t_2);
18025 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18026 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18027 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;}
18028 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18037 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;}
18046 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;}
18055 __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;}
18056 __Pyx_GOTREF(__pyx_t_2);
18057 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;}
18058 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18067 __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;}
18068 __Pyx_GOTREF(__pyx_t_2);
18069 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;}
18070 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18079 __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;}
18080 __Pyx_GOTREF(__pyx_t_2);
18081 __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_35), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18082 __Pyx_GOTREF(__pyx_t_1);
18083 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18084 __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;}
18085 __Pyx_GOTREF(__pyx_t_2);
18086 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_36), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18087 __Pyx_GOTREF(__pyx_t_3);
18088 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18089 __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;}
18090 __Pyx_GOTREF(__pyx_t_2);
18091 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18092 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18093 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;}
18094 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18103 __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;}
18104 __Pyx_GOTREF(__pyx_t_2);
18105 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_37), NULL);
if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18106 __Pyx_GOTREF(__pyx_t_3);
18107 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18108 __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;}
18109 __Pyx_GOTREF(__pyx_t_2);
18110 __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_38), NULL);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18111 __Pyx_GOTREF(__pyx_t_1);
18112 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18113 __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;}
18114 __Pyx_GOTREF(__pyx_t_2);
18115 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18116 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18117 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;}
18118 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18127 __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;}
18128 __Pyx_GOTREF(__pyx_t_2);
18129 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;}
18130 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18138 __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;}
18139 __Pyx_GOTREF(__pyx_t_2);
18140 __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s____main__), Py_EQ); __Pyx_XGOTREF(__pyx_t_1);
if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18141 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18142 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1);
if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18143 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18151 __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;}
18152 __Pyx_GOTREF(__pyx_t_1);
18153 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL);
if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18154 __Pyx_GOTREF(__pyx_t_2);
18155 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18156 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18166 __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;}
18167 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
18168 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_41), ((PyObject *)__pyx_kp_u_42)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18169 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_43), ((PyObject *)__pyx_kp_u_44)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18170 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_45), ((PyObject *)__pyx_kp_u_46)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18171 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_47), ((PyObject *)__pyx_kp_u_48)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18172 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_49), ((PyObject *)__pyx_kp_u_50)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18173 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_51), ((PyObject *)__pyx_kp_u_52)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18174 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_53), ((PyObject *)__pyx_kp_u_54)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18175 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_55), ((PyObject *)__pyx_kp_u_56)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18176 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_57), ((PyObject *)__pyx_kp_u_58)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18177 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_59), ((PyObject *)__pyx_kp_u_60)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18178 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_61), ((PyObject *)__pyx_kp_u_62)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18179 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_63), ((PyObject *)__pyx_kp_u_64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18180 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_65), ((PyObject *)__pyx_kp_u_66)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18181 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_67), ((PyObject *)__pyx_kp_u_68)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18182 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_69), ((PyObject *)__pyx_kp_u_70)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18183 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_71), ((PyObject *)__pyx_kp_u_72)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18184 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_73), ((PyObject *)__pyx_kp_u_74)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18185 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_75), ((PyObject *)__pyx_kp_u_76)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18186 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_77), ((PyObject *)__pyx_kp_u_78)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18187 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_79), ((PyObject *)__pyx_kp_u_80)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18188 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_81), ((PyObject *)__pyx_kp_u_82)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18189 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_83), ((PyObject *)__pyx_kp_u_84)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18190 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_85), ((PyObject *)__pyx_kp_u_86)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18191 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_87), ((PyObject *)__pyx_kp_u_88)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18192 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_89), ((PyObject *)__pyx_kp_u_90)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18193 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_91), ((PyObject *)__pyx_kp_u_92)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18194 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_93), ((PyObject *)__pyx_kp_u_94)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18195 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_95), ((PyObject *)__pyx_kp_u_96)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18196 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_97), ((PyObject *)__pyx_kp_u_98)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18197 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_99), ((PyObject *)__pyx_kp_u_100)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18198 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_101), ((PyObject *)__pyx_kp_u_102)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18199 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_103), ((PyObject *)__pyx_kp_u_104)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18200 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_105), ((PyObject *)__pyx_kp_u_106)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18201 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_107), ((PyObject *)__pyx_kp_u_108)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18202 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_109), ((PyObject *)__pyx_kp_u_110)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18203 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_111), ((PyObject *)__pyx_kp_u_112)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18204 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_113), ((PyObject *)__pyx_kp_u_114)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18205 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_115), ((PyObject *)__pyx_kp_u_116)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18206 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_117), ((PyObject *)__pyx_kp_u_118)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18207 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_119), ((PyObject *)__pyx_kp_u_120)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18208 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_121), ((PyObject *)__pyx_kp_u_122)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18209 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_123), ((PyObject *)__pyx_kp_u_124)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18210 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_125), ((PyObject *)__pyx_kp_u_126)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18211 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_127), ((PyObject *)__pyx_kp_u_128)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18212 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_129), ((PyObject *)__pyx_kp_u_130)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18213 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_131), ((PyObject *)__pyx_kp_u_132)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18214 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_133), ((PyObject *)__pyx_kp_u_134)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18215 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_135), ((PyObject *)__pyx_kp_u_136)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18216 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_137), ((PyObject *)__pyx_kp_u_138)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18217 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_139), ((PyObject *)__pyx_kp_u_140)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18218 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_141), ((PyObject *)__pyx_kp_u_142)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18219 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_143), ((PyObject *)__pyx_kp_u_144)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18220 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_145), ((PyObject *)__pyx_kp_u_146)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18221 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_147), ((PyObject *)__pyx_kp_u_148)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18222 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_149), ((PyObject *)__pyx_kp_u_150)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18223 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_151), ((PyObject *)__pyx_kp_u_152)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18224 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_153), ((PyObject *)__pyx_kp_u_154)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18225 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_155), ((PyObject *)__pyx_kp_u_156)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18226 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_157), ((PyObject *)__pyx_kp_u_158)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18227 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_159), ((PyObject *)__pyx_kp_u_160)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18228 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_161), ((PyObject *)__pyx_kp_u_162)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18229 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_163), ((PyObject *)__pyx_kp_u_164)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18230 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_165), ((PyObject *)__pyx_kp_u_166)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18231 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_167), ((PyObject *)__pyx_kp_u_168)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18232 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_169), ((PyObject *)__pyx_kp_u_170)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18233 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_171), ((PyObject *)__pyx_kp_u_172)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18234 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_173), ((PyObject *)__pyx_kp_u_174)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18235 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_175), ((PyObject *)__pyx_kp_u_176)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18236 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_177), ((PyObject *)__pyx_kp_u_178)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18237 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_179), ((PyObject *)__pyx_kp_u_180)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18238 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_181), ((PyObject *)__pyx_kp_u_182)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18239 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_183), ((PyObject *)__pyx_kp_u_184)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18240 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_185), ((PyObject *)__pyx_kp_u_186)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18241 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_187), ((PyObject *)__pyx_kp_u_188)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18242 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_189), ((PyObject *)__pyx_kp_u_190)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18243 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_191), ((PyObject *)__pyx_kp_u_192)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18244 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_193), ((PyObject *)__pyx_kp_u_194)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18245 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_195), ((PyObject *)__pyx_kp_u_196)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18246 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_197), ((PyObject *)__pyx_kp_u_198)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18247 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_199), ((PyObject *)__pyx_kp_u_200)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18248 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_201), ((PyObject *)__pyx_kp_u_202)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18249 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_203), ((PyObject *)__pyx_kp_u_204)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18250 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_205), ((PyObject *)__pyx_kp_u_206)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18251 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_207), ((PyObject *)__pyx_kp_u_208)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18252 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_209), ((PyObject *)__pyx_kp_u_210)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18253 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_211), ((PyObject *)__pyx_kp_u_212)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18254 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_213), ((PyObject *)__pyx_kp_u_214)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18255 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_215), ((PyObject *)__pyx_kp_u_216)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18256 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_217), ((PyObject *)__pyx_kp_u_218)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18257 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_219), ((PyObject *)__pyx_kp_u_220)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18258 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_221), ((PyObject *)__pyx_kp_u_222)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18259 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_223), ((PyObject *)__pyx_kp_u_224)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18260 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_225), ((PyObject *)__pyx_kp_u_226)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18261 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_227), ((PyObject *)__pyx_kp_u_228)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18262 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_229), ((PyObject *)__pyx_kp_u_230)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18263 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_231), ((PyObject *)__pyx_kp_u_232)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18264 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_233), ((PyObject *)__pyx_kp_u_234)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18265 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_235), ((PyObject *)__pyx_kp_u_236)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18266 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_237), ((PyObject *)__pyx_kp_u_238)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18267 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_239), ((PyObject *)__pyx_kp_u_240)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18268 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_241), ((PyObject *)__pyx_kp_u_242)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18269 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_243), ((PyObject *)__pyx_kp_u_244)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18270 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_245), ((PyObject *)__pyx_kp_u_246)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18271 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_247), ((PyObject *)__pyx_kp_u_248)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18272 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_249), ((PyObject *)__pyx_kp_u_250)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18273 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_251), ((PyObject *)__pyx_kp_u_252)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18274 if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_253), ((PyObject *)__pyx_kp_u_254)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18275 if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__;
goto __pyx_L1_error;}
18276 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18279 __Pyx_XDECREF(__pyx_t_1);
18280 __Pyx_XDECREF(__pyx_t_2);
18281 __Pyx_XDECREF(__pyx_t_3);
18283 __Pyx_AddTraceback(
"init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
18284 Py_DECREF(__pyx_m); __pyx_m = 0;
18285 }
else if (!PyErr_Occurred()) {
18286 PyErr_SetString(PyExc_ImportError,
"init PyClical");
18289 __Pyx_RefNannyFinishContext();
18290 #if PY_MAJOR_VERSION < 3
18298 #if CYTHON_REFNANNY
18299 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
18300 PyObject *m = NULL, *p = NULL;
18302 m = PyImport_ImportModule((
char *)modname);
18304 p = PyObject_GetAttrString(m, (
char *)
"RefNannyAPI");
18306 r = PyLong_AsVoidPtr(p);
18310 return (__Pyx_RefNannyAPIStruct *)r;
18314 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
18315 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
18316 if (unlikely(!result)) {
18317 PyErr_Format(PyExc_NameError,
18318 #
if PY_MAJOR_VERSION >= 3
18319 "name '%U' is not defined", name);
18321 "name '%s' is not defined", PyString_AS_STRING(name));
18327 static CYTHON_INLINE
void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
18328 #if CYTHON_COMPILING_IN_CPYTHON
18329 PyObject *tmp_type, *tmp_value, *tmp_tb;
18330 PyThreadState *tstate = PyThreadState_GET();
18331 tmp_type = tstate->curexc_type;
18332 tmp_value = tstate->curexc_value;
18333 tmp_tb = tstate->curexc_traceback;
18334 tstate->curexc_type = type;
18335 tstate->curexc_value = value;
18336 tstate->curexc_traceback = tb;
18337 Py_XDECREF(tmp_type);
18338 Py_XDECREF(tmp_value);
18339 Py_XDECREF(tmp_tb);
18341 PyErr_Restore(type, value, tb);
18344 static CYTHON_INLINE
void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
18345 #if CYTHON_COMPILING_IN_CPYTHON
18346 PyThreadState *tstate = PyThreadState_GET();
18347 *type = tstate->curexc_type;
18348 *value = tstate->curexc_value;
18349 *tb = tstate->curexc_traceback;
18350 tstate->curexc_type = 0;
18351 tstate->curexc_value = 0;
18352 tstate->curexc_traceback = 0;
18354 PyErr_Fetch(type, value, tb);
18358 static void __Pyx_WriteUnraisable(
const char *name, CYTHON_UNUSED
int clineno,
18359 CYTHON_UNUSED
int lineno, CYTHON_UNUSED
const char *filename) {
18360 PyObject *old_exc, *old_val, *old_tb;
18362 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
18363 #if PY_MAJOR_VERSION < 3
18364 ctx = PyString_FromString(name);
18366 ctx = PyUnicode_FromString(name);
18368 __Pyx_ErrRestore(old_exc, old_val, old_tb);
18370 PyErr_WriteUnraisable(Py_None);
18372 PyErr_WriteUnraisable(ctx);
18377 static void __Pyx_RaiseDoubleKeywordsError(
18378 const char* func_name,
18381 PyErr_Format(PyExc_TypeError,
18382 #
if PY_MAJOR_VERSION >= 3
18383 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
18385 "%s() got multiple values for keyword argument '%s'", func_name,
18386 PyString_AsString(kw_name));
18390 static int __Pyx_ParseOptionalKeywords(
18392 PyObject **argnames[],
18394 PyObject *values[],
18395 Py_ssize_t num_pos_args,
18396 const char* function_name)
18398 PyObject *key = 0, *value = 0;
18399 Py_ssize_t pos = 0;
18401 PyObject*** first_kw_arg = argnames + num_pos_args;
18402 while (PyDict_Next(kwds, &pos, &key, &value)) {
18403 name = first_kw_arg;
18404 while (*name && (**name != key)) name++;
18406 values[name-argnames] = value;
18409 name = first_kw_arg;
18410 #if PY_MAJOR_VERSION < 3
18411 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
18413 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
18414 && _PyString_Eq(**name, key)) {
18415 values[name-argnames] = value;
18420 if (*name)
continue;
18422 PyObject*** argname = argnames;
18423 while (argname != first_kw_arg) {
18424 if ((**argname == key) || (
18425 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
18426 && _PyString_Eq(**argname, key))) {
18427 goto arg_passed_twice;
18434 if (likely(PyUnicode_Check(key))) {
18436 int cmp = (**name == key) ? 0 :
18437 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
18438 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
18440 PyUnicode_Compare(**name, key);
18441 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
18443 values[name-argnames] = value;
18448 if (*name)
continue;
18450 PyObject*** argname = argnames;
18451 while (argname != first_kw_arg) {
18452 int cmp = (**argname == key) ? 0 :
18453 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
18454 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
18456 PyUnicode_Compare(**argname, key);
18457 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
18458 if (cmp == 0)
goto arg_passed_twice;
18463 goto invalid_keyword_type;
18465 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
18467 goto invalid_keyword;
18472 __Pyx_RaiseDoubleKeywordsError(function_name, key);
18474 invalid_keyword_type:
18475 PyErr_Format(PyExc_TypeError,
18476 "%s() keywords must be strings", function_name);
18479 PyErr_Format(PyExc_TypeError,
18480 #
if PY_MAJOR_VERSION < 3
18481 "%s() got an unexpected keyword argument '%s'",
18482 function_name, PyString_AsString(key));
18484 "%s() got an unexpected keyword argument '%U'",
18485 function_name, key);
18491 static void __Pyx_RaiseArgtupleInvalid(
18492 const char* func_name,
18494 Py_ssize_t num_min,
18495 Py_ssize_t num_max,
18496 Py_ssize_t num_found)
18498 Py_ssize_t num_expected;
18499 const char *more_or_less;
18500 if (num_found < num_min) {
18501 num_expected = num_min;
18502 more_or_less =
"at least";
18504 num_expected = num_max;
18505 more_or_less =
"at most";
18508 more_or_less =
"exactly";
18510 PyErr_Format(PyExc_TypeError,
18511 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
18512 func_name, more_or_less, num_expected,
18513 (num_expected == 1) ?
"" :
"s", num_found);
18516 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
18518 #if CYTHON_COMPILING_IN_CPYTHON
18519 result = PyDict_GetItem(__pyx_d, name);
18524 result = PyObject_GetItem(__pyx_d, name);
18528 result = __Pyx_GetBuiltinName(name);
18533 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
18534 PyObject *local_type, *local_value, *local_tb;
18535 #if CYTHON_COMPILING_IN_CPYTHON
18536 PyObject *tmp_type, *tmp_value, *tmp_tb;
18537 PyThreadState *tstate = PyThreadState_GET();
18538 local_type = tstate->curexc_type;
18539 local_value = tstate->curexc_value;
18540 local_tb = tstate->curexc_traceback;
18541 tstate->curexc_type = 0;
18542 tstate->curexc_value = 0;
18543 tstate->curexc_traceback = 0;
18545 PyErr_Fetch(&local_type, &local_value, &local_tb);
18547 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
18548 #if CYTHON_COMPILING_IN_CPYTHON
18549 if (unlikely(tstate->curexc_type))
18551 if (unlikely(PyErr_Occurred()))
18554 #if PY_MAJOR_VERSION >= 3
18555 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
18558 Py_INCREF(local_type);
18559 Py_INCREF(local_value);
18560 Py_INCREF(local_tb);
18561 *type = local_type;
18562 *value = local_value;
18564 #if CYTHON_COMPILING_IN_CPYTHON
18565 tmp_type = tstate->exc_type;
18566 tmp_value = tstate->exc_value;
18567 tmp_tb = tstate->exc_traceback;
18568 tstate->exc_type = local_type;
18569 tstate->exc_value = local_value;
18570 tstate->exc_traceback = local_tb;
18573 Py_XDECREF(tmp_type);
18574 Py_XDECREF(tmp_value);
18575 Py_XDECREF(tmp_tb);
18577 PyErr_SetExcInfo(local_type, local_value, local_tb);
18584 Py_XDECREF(local_type);
18585 Py_XDECREF(local_value);
18586 Py_XDECREF(local_tb);
18590 #if PY_MAJOR_VERSION < 3
18591 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
18592 CYTHON_UNUSED PyObject *cause) {
18594 if (!value || value == Py_None)
18598 if (!tb || tb == Py_None)
18602 if (!PyTraceBack_Check(tb)) {
18603 PyErr_SetString(PyExc_TypeError,
18604 "raise: arg 3 must be a traceback or None");
18608 #if PY_VERSION_HEX < 0x02050000
18609 if (PyClass_Check(type)) {
18611 if (PyType_Check(type)) {
18613 #if CYTHON_COMPILING_IN_PYPY
18615 Py_INCREF(Py_None);
18619 PyErr_NormalizeException(&type, &value, &tb);
18622 PyErr_SetString(PyExc_TypeError,
18623 "instance exception may not have a separate value");
18627 #if PY_VERSION_HEX < 0x02050000
18628 if (PyInstance_Check(type)) {
18629 type = (PyObject*) ((PyInstanceObject*)type)->in_class;
18633 PyErr_SetString(PyExc_TypeError,
18634 "raise: exception must be an old-style class or instance");
18638 type = (PyObject*) Py_TYPE(type);
18640 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
18641 PyErr_SetString(PyExc_TypeError,
18642 "raise: exception class must be a subclass of BaseException");
18647 __Pyx_ErrRestore(type, value, tb);
18656 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
18657 PyObject* owned_instance = NULL;
18658 if (tb == Py_None) {
18660 }
else if (tb && !PyTraceBack_Check(tb)) {
18661 PyErr_SetString(PyExc_TypeError,
18662 "raise: arg 3 must be a traceback or None");
18665 if (value == Py_None)
18667 if (PyExceptionInstance_Check(type)) {
18669 PyErr_SetString(PyExc_TypeError,
18670 "instance exception may not have a separate value");
18674 type = (PyObject*) Py_TYPE(value);
18675 }
else if (PyExceptionClass_Check(type)) {
18678 args = PyTuple_New(0);
18679 else if (PyTuple_Check(value)) {
18683 args = PyTuple_Pack(1, value);
18686 owned_instance = PyEval_CallObject(type, args);
18688 if (!owned_instance)
18690 value = owned_instance;
18691 if (!PyExceptionInstance_Check(value)) {
18692 PyErr_Format(PyExc_TypeError,
18693 "calling %R should have returned an instance of "
18694 "BaseException, not %R",
18695 type, Py_TYPE(value));
18699 PyErr_SetString(PyExc_TypeError,
18700 "raise: exception class must be a subclass of BaseException");
18703 #if PY_VERSION_HEX >= 0x03030000
18706 if (cause && cause != Py_None) {
18708 PyObject *fixed_cause;
18709 if (cause == Py_None) {
18710 fixed_cause = NULL;
18711 }
else if (PyExceptionClass_Check(cause)) {
18712 fixed_cause = PyObject_CallObject(cause, NULL);
18713 if (fixed_cause == NULL)
18715 }
else if (PyExceptionInstance_Check(cause)) {
18716 fixed_cause = cause;
18717 Py_INCREF(fixed_cause);
18719 PyErr_SetString(PyExc_TypeError,
18720 "exception causes must derive from "
18724 PyException_SetCause(value, fixed_cause);
18726 PyErr_SetObject(type, value);
18728 PyThreadState *tstate = PyThreadState_GET();
18729 PyObject* tmp_tb = tstate->curexc_traceback;
18730 if (tb != tmp_tb) {
18732 tstate->curexc_traceback = tb;
18733 Py_XDECREF(tmp_tb);
18737 Py_XDECREF(owned_instance);
18742 static CYTHON_INLINE
int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
18745 r = PyObject_SetItem(o, j, v);
18749 static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
18750 int is_list,
int wraparound,
int boundscheck) {
18751 #if CYTHON_COMPILING_IN_CPYTHON
18752 if (is_list || PyList_CheckExact(o)) {
18753 Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
18754 if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
18755 PyObject* old = PyList_GET_ITEM(o, n);
18757 PyList_SET_ITEM(o, n, v);
18762 PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
18763 if (likely(m && m->sq_ass_item)) {
18764 if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
18765 Py_ssize_t l = m->sq_length(o);
18766 if (likely(l >= 0)) {
18769 if (PyErr_ExceptionMatches(PyExc_OverflowError))
18775 return m->sq_ass_item(o, i, v);
18779 #if CYTHON_COMPILING_IN_PYPY
18780 if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
18782 if (is_list || PySequence_Check(o)) {
18784 return PySequence_SetItem(o, i, v);
18787 return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
18790 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type,
int none_allowed,
18791 const char *name,
int exact)
18794 PyErr_Format(PyExc_SystemError,
"Missing type object");
18797 if (none_allowed && obj == Py_None)
return 1;
18799 if (Py_TYPE(obj) == type)
return 1;
18802 if (PyObject_TypeCheck(obj, type))
return 1;
18804 PyErr_Format(PyExc_TypeError,
18805 "Argument '%s' has incorrect type (expected %s, got %s)",
18806 name, type->tp_name, Py_TYPE(obj)->tp_name);
18810 static int __Pyx_SetVtable(PyObject *dict,
void *vtable) {
18811 #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
18812 PyObject *ob = PyCapsule_New(vtable, 0, 0);
18814 PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
18818 if (PyDict_SetItem(dict, __pyx_n_s____pyx_vtable__, ob) < 0)
18827 static CYTHON_INLINE
void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
18828 #if CYTHON_COMPILING_IN_CPYTHON
18829 PyThreadState *tstate = PyThreadState_GET();
18830 *type = tstate->exc_type;
18831 *value = tstate->exc_value;
18832 *tb = tstate->exc_traceback;
18834 Py_XINCREF(*value);
18837 PyErr_GetExcInfo(type, value, tb);
18840 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
18841 #if CYTHON_COMPILING_IN_CPYTHON
18842 PyObject *tmp_type, *tmp_value, *tmp_tb;
18843 PyThreadState *tstate = PyThreadState_GET();
18844 tmp_type = tstate->exc_type;
18845 tmp_value = tstate->exc_value;
18846 tmp_tb = tstate->exc_traceback;
18847 tstate->exc_type = type;
18848 tstate->exc_value = value;
18849 tstate->exc_traceback = tb;
18850 Py_XDECREF(tmp_type);
18851 Py_XDECREF(tmp_value);
18852 Py_XDECREF(tmp_tb);
18854 PyErr_SetExcInfo(type, value, tb);
18858 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level) {
18859 PyObject *empty_list = 0;
18860 PyObject *module = 0;
18861 PyObject *global_dict = 0;
18862 PyObject *empty_dict = 0;
18864 #if PY_VERSION_HEX < 0x03030000
18865 PyObject *py_import;
18866 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__);
18873 empty_list = PyList_New(0);
18878 global_dict = PyModule_GetDict(__pyx_m);
18881 empty_dict = PyDict_New();
18884 #if PY_VERSION_HEX >= 0x02050000
18886 #if PY_MAJOR_VERSION >= 3
18888 if (strchr(__Pyx_MODULE_NAME,
'.')) {
18889 #if PY_VERSION_HEX < 0x03030000
18890 PyObject *py_level = PyInt_FromLong(1);
18893 module = PyObject_CallFunctionObjArgs(py_import,
18894 name, global_dict, empty_dict, list, py_level, NULL);
18895 Py_DECREF(py_level);
18897 module = PyImport_ImportModuleLevelObject(
18898 name, global_dict, empty_dict, list, 1);
18901 if (!PyErr_ExceptionMatches(PyExc_ImportError))
18910 #if PY_VERSION_HEX < 0x03030000
18911 PyObject *py_level = PyInt_FromLong(level);
18914 module = PyObject_CallFunctionObjArgs(py_import,
18915 name, global_dict, empty_dict, list, py_level, NULL);
18916 Py_DECREF(py_level);
18918 module = PyImport_ImportModuleLevelObject(
18919 name, global_dict, empty_dict, list, level);
18925 PyErr_SetString(PyExc_RuntimeError,
"Relative import is not supported for Python <=2.4.");
18928 module = PyObject_CallFunctionObjArgs(py_import,
18929 name, global_dict, empty_dict, list, NULL);
18932 #if PY_VERSION_HEX < 0x03030000
18933 Py_XDECREF(py_import);
18935 Py_XDECREF(empty_list);
18936 Py_XDECREF(empty_dict);
18940 static CYTHON_INLINE
unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
18941 const unsigned char neg_one = (
unsigned char)-1, const_zero = 0;
18942 const int is_unsigned = neg_one > const_zero;
18943 if (
sizeof(
unsigned char) <
sizeof(long)) {
18944 long val = __Pyx_PyInt_AsLong(x);
18945 if (unlikely(val != (
long)(
unsigned char)val)) {
18946 if (!unlikely(val == -1 && PyErr_Occurred())) {
18947 PyErr_SetString(PyExc_OverflowError,
18948 (is_unsigned && unlikely(val < 0)) ?
18949 "can't convert negative value to unsigned char" :
18950 "value too large to convert to unsigned char");
18952 return (
unsigned char)-1;
18954 return (
unsigned char)val;
18956 return (
unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
18959 static CYTHON_INLINE
unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
18960 const unsigned short neg_one = (
unsigned short)-1, const_zero = 0;
18961 const int is_unsigned = neg_one > const_zero;
18962 if (
sizeof(
unsigned short) <
sizeof(long)) {
18963 long val = __Pyx_PyInt_AsLong(x);
18964 if (unlikely(val != (
long)(
unsigned short)val)) {
18965 if (!unlikely(val == -1 && PyErr_Occurred())) {
18966 PyErr_SetString(PyExc_OverflowError,
18967 (is_unsigned && unlikely(val < 0)) ?
18968 "can't convert negative value to unsigned short" :
18969 "value too large to convert to unsigned short");
18971 return (
unsigned short)-1;
18973 return (
unsigned short)val;
18975 return (
unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
18978 static CYTHON_INLINE
unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
18979 const unsigned int neg_one = (
unsigned int)-1, const_zero = 0;
18980 const int is_unsigned = neg_one > const_zero;
18981 if (
sizeof(
unsigned int) <
sizeof(long)) {
18982 long val = __Pyx_PyInt_AsLong(x);
18983 if (unlikely(val != (
long)(
unsigned int)val)) {
18984 if (!unlikely(val == -1 && PyErr_Occurred())) {
18985 PyErr_SetString(PyExc_OverflowError,
18986 (is_unsigned && unlikely(val < 0)) ?
18987 "can't convert negative value to unsigned int" :
18988 "value too large to convert to unsigned int");
18990 return (
unsigned int)-1;
18992 return (
unsigned int)val;
18994 return (
unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
18997 static CYTHON_INLINE
char __Pyx_PyInt_AsChar(PyObject* x) {
18998 const char neg_one = (char)-1, const_zero = 0;
18999 const int is_unsigned = neg_one > const_zero;
19000 if (
sizeof(
char) <
sizeof(long)) {
19001 long val = __Pyx_PyInt_AsLong(x);
19002 if (unlikely(val != (
long)(
char)val)) {
19003 if (!unlikely(val == -1 && PyErr_Occurred())) {
19004 PyErr_SetString(PyExc_OverflowError,
19005 (is_unsigned && unlikely(val < 0)) ?
19006 "can't convert negative value to char" :
19007 "value too large to convert to char");
19013 return (
char)__Pyx_PyInt_AsLong(x);
19016 static CYTHON_INLINE
short __Pyx_PyInt_AsShort(PyObject* x) {
19017 const short neg_one = (short)-1, const_zero = 0;
19018 const int is_unsigned = neg_one > const_zero;
19019 if (
sizeof(
short) <
sizeof(long)) {
19020 long val = __Pyx_PyInt_AsLong(x);
19021 if (unlikely(val != (
long)(
short)val)) {
19022 if (!unlikely(val == -1 && PyErr_Occurred())) {
19023 PyErr_SetString(PyExc_OverflowError,
19024 (is_unsigned && unlikely(val < 0)) ?
19025 "can't convert negative value to short" :
19026 "value too large to convert to short");
19032 return (
short)__Pyx_PyInt_AsLong(x);
19035 static CYTHON_INLINE
int __Pyx_PyInt_AsInt(PyObject* x) {
19036 const int neg_one = (int)-1, const_zero = 0;
19037 const int is_unsigned = neg_one > const_zero;
19038 if (
sizeof(
int) <
sizeof(long)) {
19039 long val = __Pyx_PyInt_AsLong(x);
19040 if (unlikely(val != (
long)(
int)val)) {
19041 if (!unlikely(val == -1 && PyErr_Occurred())) {
19042 PyErr_SetString(PyExc_OverflowError,
19043 (is_unsigned && unlikely(val < 0)) ?
19044 "can't convert negative value to int" :
19045 "value too large to convert to int");
19051 return (
int)__Pyx_PyInt_AsLong(x);
19054 static CYTHON_INLINE
signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
19055 const signed char neg_one = (
signed char)-1, const_zero = 0;
19056 const int is_unsigned = neg_one > const_zero;
19057 if (
sizeof(
signed char) <
sizeof(long)) {
19058 long val = __Pyx_PyInt_AsLong(x);
19059 if (unlikely(val != (
long)(
signed char)val)) {
19060 if (!unlikely(val == -1 && PyErr_Occurred())) {
19061 PyErr_SetString(PyExc_OverflowError,
19062 (is_unsigned && unlikely(val < 0)) ?
19063 "can't convert negative value to signed char" :
19064 "value too large to convert to signed char");
19066 return (
signed char)-1;
19068 return (
signed char)val;
19070 return (
signed char)__Pyx_PyInt_AsSignedLong(x);
19073 static CYTHON_INLINE
signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
19074 const signed short neg_one = (
signed short)-1, const_zero = 0;
19075 const int is_unsigned = neg_one > const_zero;
19076 if (
sizeof(
signed short) <
sizeof(long)) {
19077 long val = __Pyx_PyInt_AsLong(x);
19078 if (unlikely(val != (
long)(
signed short)val)) {
19079 if (!unlikely(val == -1 && PyErr_Occurred())) {
19080 PyErr_SetString(PyExc_OverflowError,
19081 (is_unsigned && unlikely(val < 0)) ?
19082 "can't convert negative value to signed short" :
19083 "value too large to convert to signed short");
19085 return (
signed short)-1;
19087 return (
signed short)val;
19089 return (
signed short)__Pyx_PyInt_AsSignedLong(x);
19092 static CYTHON_INLINE
signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
19093 const signed int neg_one = (
signed int)-1, const_zero = 0;
19094 const int is_unsigned = neg_one > const_zero;
19095 if (
sizeof(
signed int) <
sizeof(long)) {
19096 long val = __Pyx_PyInt_AsLong(x);
19097 if (unlikely(val != (
long)(
signed int)val)) {
19098 if (!unlikely(val == -1 && PyErr_Occurred())) {
19099 PyErr_SetString(PyExc_OverflowError,
19100 (is_unsigned && unlikely(val < 0)) ?
19101 "can't convert negative value to signed int" :
19102 "value too large to convert to signed int");
19104 return (
signed int)-1;
19106 return (
signed int)val;
19108 return (
signed int)__Pyx_PyInt_AsSignedLong(x);
19111 static CYTHON_INLINE
int __Pyx_PyInt_AsLongDouble(PyObject* x) {
19112 const int neg_one = (int)-1, const_zero = 0;
19113 const int is_unsigned = neg_one > const_zero;
19114 if (
sizeof(
int) <
sizeof(long)) {
19115 long val = __Pyx_PyInt_AsLong(x);
19116 if (unlikely(val != (
long)(
int)val)) {
19117 if (!unlikely(val == -1 && PyErr_Occurred())) {
19118 PyErr_SetString(PyExc_OverflowError,
19119 (is_unsigned && unlikely(val < 0)) ?
19120 "can't convert negative value to int" :
19121 "value too large to convert to int");
19127 return (
int)__Pyx_PyInt_AsLong(x);
19130 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19131 #if CYTHON_USE_PYLONG_INTERNALS
19132 #include "longintrepr.h"
19135 static CYTHON_INLINE
unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
19136 const unsigned long neg_one = (
unsigned long)-1, const_zero = 0;
19137 const int is_unsigned = neg_one > const_zero;
19138 #if PY_MAJOR_VERSION < 3
19139 if (likely(PyInt_Check(x))) {
19140 long val = PyInt_AS_LONG(x);
19141 if (is_unsigned && unlikely(val < 0)) {
19142 PyErr_SetString(PyExc_OverflowError,
19143 "can't convert negative value to unsigned long");
19144 return (
unsigned long)-1;
19146 return (
unsigned long)val;
19149 if (likely(PyLong_Check(x))) {
19151 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19152 #if CYTHON_USE_PYLONG_INTERNALS
19153 if (
sizeof(digit) <=
sizeof(
unsigned long)) {
19154 switch (Py_SIZE(x)) {
19156 case 1:
return (
unsigned long) ((PyLongObject*)x)->ob_digit[0];
19161 if (unlikely(Py_SIZE(x) < 0)) {
19162 PyErr_SetString(PyExc_OverflowError,
19163 "can't convert negative value to unsigned long");
19164 return (
unsigned long)-1;
19166 return (
unsigned long)PyLong_AsUnsignedLong(x);
19168 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19169 #if CYTHON_USE_PYLONG_INTERNALS
19170 if (
sizeof(digit) <=
sizeof(
unsigned long)) {
19171 switch (Py_SIZE(x)) {
19173 case 1:
return +(
unsigned long) ((PyLongObject*)x)->ob_digit[0];
19174 case -1:
return -(
unsigned long) ((PyLongObject*)x)->ob_digit[0];
19179 return (
unsigned long)PyLong_AsLong(x);
19183 PyObject *tmp = __Pyx_PyNumber_Int(x);
19184 if (!tmp)
return (
unsigned long)-1;
19185 val = __Pyx_PyInt_AsUnsignedLong(tmp);
19191 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19192 #if CYTHON_USE_PYLONG_INTERNALS
19193 #include "longintrepr.h"
19196 static CYTHON_INLINE
unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
19197 const unsigned PY_LONG_LONG neg_one = (
unsigned PY_LONG_LONG)-1, const_zero = 0;
19198 const int is_unsigned = neg_one > const_zero;
19199 #if PY_MAJOR_VERSION < 3
19200 if (likely(PyInt_Check(x))) {
19201 long val = PyInt_AS_LONG(x);
19202 if (is_unsigned && unlikely(val < 0)) {
19203 PyErr_SetString(PyExc_OverflowError,
19204 "can't convert negative value to unsigned PY_LONG_LONG");
19205 return (
unsigned PY_LONG_LONG)-1;
19207 return (
unsigned PY_LONG_LONG)val;
19210 if (likely(PyLong_Check(x))) {
19212 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19213 #if CYTHON_USE_PYLONG_INTERNALS
19214 if (
sizeof(digit) <=
sizeof(
unsigned PY_LONG_LONG)) {
19215 switch (Py_SIZE(x)) {
19217 case 1:
return (
unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19222 if (unlikely(Py_SIZE(x) < 0)) {
19223 PyErr_SetString(PyExc_OverflowError,
19224 "can't convert negative value to unsigned PY_LONG_LONG");
19225 return (
unsigned PY_LONG_LONG)-1;
19227 return (
unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
19229 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19230 #if CYTHON_USE_PYLONG_INTERNALS
19231 if (
sizeof(digit) <=
sizeof(
unsigned PY_LONG_LONG)) {
19232 switch (Py_SIZE(x)) {
19234 case 1:
return +(
unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19235 case -1:
return -(
unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19240 return (
unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
19243 unsigned PY_LONG_LONG val;
19244 PyObject *tmp = __Pyx_PyNumber_Int(x);
19245 if (!tmp)
return (
unsigned PY_LONG_LONG)-1;
19246 val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
19252 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19253 #if CYTHON_USE_PYLONG_INTERNALS
19254 #include "longintrepr.h"
19257 static CYTHON_INLINE
long __Pyx_PyInt_AsLong(PyObject* x) {
19258 const long neg_one = (long)-1, const_zero = 0;
19259 const int is_unsigned = neg_one > const_zero;
19260 #if PY_MAJOR_VERSION < 3
19261 if (likely(PyInt_Check(x))) {
19262 long val = PyInt_AS_LONG(x);
19263 if (is_unsigned && unlikely(val < 0)) {
19264 PyErr_SetString(PyExc_OverflowError,
19265 "can't convert negative value to long");
19271 if (likely(PyLong_Check(x))) {
19273 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19274 #if CYTHON_USE_PYLONG_INTERNALS
19275 if (
sizeof(digit) <=
sizeof(
long)) {
19276 switch (Py_SIZE(x)) {
19278 case 1:
return (
long) ((PyLongObject*)x)->ob_digit[0];
19283 if (unlikely(Py_SIZE(x) < 0)) {
19284 PyErr_SetString(PyExc_OverflowError,
19285 "can't convert negative value to long");
19288 return (
long)PyLong_AsUnsignedLong(x);
19290 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19291 #if CYTHON_USE_PYLONG_INTERNALS
19292 if (
sizeof(digit) <=
sizeof(
long)) {
19293 switch (Py_SIZE(x)) {
19295 case 1:
return +(long) ((PyLongObject*)x)->ob_digit[0];
19296 case -1:
return -(long) ((PyLongObject*)x)->ob_digit[0];
19301 return (
long)PyLong_AsLong(x);
19305 PyObject *tmp = __Pyx_PyNumber_Int(x);
19306 if (!tmp)
return (
long)-1;
19307 val = __Pyx_PyInt_AsLong(tmp);
19313 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19314 #if CYTHON_USE_PYLONG_INTERNALS
19315 #include "longintrepr.h"
19318 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
19319 const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
19320 const int is_unsigned = neg_one > const_zero;
19321 #if PY_MAJOR_VERSION < 3
19322 if (likely(PyInt_Check(x))) {
19323 long val = PyInt_AS_LONG(x);
19324 if (is_unsigned && unlikely(val < 0)) {
19325 PyErr_SetString(PyExc_OverflowError,
19326 "can't convert negative value to PY_LONG_LONG");
19327 return (PY_LONG_LONG)-1;
19329 return (PY_LONG_LONG)val;
19332 if (likely(PyLong_Check(x))) {
19334 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19335 #if CYTHON_USE_PYLONG_INTERNALS
19336 if (
sizeof(digit) <=
sizeof(PY_LONG_LONG)) {
19337 switch (Py_SIZE(x)) {
19339 case 1:
return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19344 if (unlikely(Py_SIZE(x) < 0)) {
19345 PyErr_SetString(PyExc_OverflowError,
19346 "can't convert negative value to PY_LONG_LONG");
19347 return (PY_LONG_LONG)-1;
19349 return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
19351 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19352 #if CYTHON_USE_PYLONG_INTERNALS
19353 if (
sizeof(digit) <=
sizeof(PY_LONG_LONG)) {
19354 switch (Py_SIZE(x)) {
19356 case 1:
return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19357 case -1:
return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19362 return (PY_LONG_LONG)PyLong_AsLongLong(x);
19366 PyObject *tmp = __Pyx_PyNumber_Int(x);
19367 if (!tmp)
return (PY_LONG_LONG)-1;
19368 val = __Pyx_PyInt_AsLongLong(tmp);
19374 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19375 #if CYTHON_USE_PYLONG_INTERNALS
19376 #include "longintrepr.h"
19379 static CYTHON_INLINE
signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
19380 const signed long neg_one = (
signed long)-1, const_zero = 0;
19381 const int is_unsigned = neg_one > const_zero;
19382 #if PY_MAJOR_VERSION < 3
19383 if (likely(PyInt_Check(x))) {
19384 long val = PyInt_AS_LONG(x);
19385 if (is_unsigned && unlikely(val < 0)) {
19386 PyErr_SetString(PyExc_OverflowError,
19387 "can't convert negative value to signed long");
19388 return (
signed long)-1;
19390 return (
signed long)val;
19393 if (likely(PyLong_Check(x))) {
19395 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19396 #if CYTHON_USE_PYLONG_INTERNALS
19397 if (
sizeof(digit) <=
sizeof(
signed long)) {
19398 switch (Py_SIZE(x)) {
19400 case 1:
return (
signed long) ((PyLongObject*)x)->ob_digit[0];
19405 if (unlikely(Py_SIZE(x) < 0)) {
19406 PyErr_SetString(PyExc_OverflowError,
19407 "can't convert negative value to signed long");
19408 return (
signed long)-1;
19410 return (
signed long)PyLong_AsUnsignedLong(x);
19412 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19413 #if CYTHON_USE_PYLONG_INTERNALS
19414 if (
sizeof(digit) <=
sizeof(
signed long)) {
19415 switch (Py_SIZE(x)) {
19417 case 1:
return +(
signed long) ((PyLongObject*)x)->ob_digit[0];
19418 case -1:
return -(
signed long) ((PyLongObject*)x)->ob_digit[0];
19423 return (
signed long)PyLong_AsLong(x);
19427 PyObject *tmp = __Pyx_PyNumber_Int(x);
19428 if (!tmp)
return (
signed long)-1;
19429 val = __Pyx_PyInt_AsSignedLong(tmp);
19435 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19436 #if CYTHON_USE_PYLONG_INTERNALS
19437 #include "longintrepr.h"
19440 static CYTHON_INLINE
signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
19441 const signed PY_LONG_LONG neg_one = (
signed PY_LONG_LONG)-1, const_zero = 0;
19442 const int is_unsigned = neg_one > const_zero;
19443 #if PY_MAJOR_VERSION < 3
19444 if (likely(PyInt_Check(x))) {
19445 long val = PyInt_AS_LONG(x);
19446 if (is_unsigned && unlikely(val < 0)) {
19447 PyErr_SetString(PyExc_OverflowError,
19448 "can't convert negative value to signed PY_LONG_LONG");
19449 return (
signed PY_LONG_LONG)-1;
19451 return (
signed PY_LONG_LONG)val;
19454 if (likely(PyLong_Check(x))) {
19456 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19457 #if CYTHON_USE_PYLONG_INTERNALS
19458 if (
sizeof(digit) <=
sizeof(
signed PY_LONG_LONG)) {
19459 switch (Py_SIZE(x)) {
19461 case 1:
return (
signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19466 if (unlikely(Py_SIZE(x) < 0)) {
19467 PyErr_SetString(PyExc_OverflowError,
19468 "can't convert negative value to signed PY_LONG_LONG");
19469 return (
signed PY_LONG_LONG)-1;
19471 return (
signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
19473 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19474 #if CYTHON_USE_PYLONG_INTERNALS
19475 if (
sizeof(digit) <=
sizeof(
signed PY_LONG_LONG)) {
19476 switch (Py_SIZE(x)) {
19478 case 1:
return +(
signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19479 case -1:
return -(
signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19484 return (
signed PY_LONG_LONG)PyLong_AsLongLong(x);
19487 signed PY_LONG_LONG val;
19488 PyObject *tmp = __Pyx_PyNumber_Int(x);
19489 if (!tmp)
return (
signed PY_LONG_LONG)-1;
19490 val = __Pyx_PyInt_AsSignedLongLong(tmp);
19496 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
19497 PyObject *tmp_type, *tmp_value, *tmp_tb;
19498 #if CYTHON_COMPILING_IN_CPYTHON
19499 PyThreadState *tstate = PyThreadState_GET();
19500 tmp_type = tstate->exc_type;
19501 tmp_value = tstate->exc_value;
19502 tmp_tb = tstate->exc_traceback;
19503 tstate->exc_type = *type;
19504 tstate->exc_value = *value;
19505 tstate->exc_traceback = *tb;
19507 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
19508 PyErr_SetExcInfo(*type, *value, *tb);
19511 *value = tmp_value;
19515 static PyObject *__Pyx_Generator_Next(PyObject *
self);
19516 static PyObject *__Pyx_Generator_Send(PyObject *
self, PyObject *value);
19517 static PyObject *__Pyx_Generator_Close(PyObject *
self);
19518 static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
19519 static PyTypeObject *__pyx_GeneratorType = 0;
19520 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
19521 #define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
19522 #if 1 || PY_VERSION_HEX < 0x030300B0
19523 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
19524 PyObject *et, *ev, *tb;
19525 PyObject *value = NULL;
19526 __Pyx_ErrFetch(&et, &ev, &tb);
19530 Py_INCREF(Py_None);
19534 if (unlikely(et != PyExc_StopIteration) &&
19535 unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
19536 __Pyx_ErrRestore(et, ev, tb);
19539 if (likely(et == PyExc_StopIteration)) {
19540 if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
19542 Py_INCREF(Py_None);
19551 PyErr_NormalizeException(&et, &ev, &tb);
19552 if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
19553 __Pyx_ErrRestore(et, ev, tb);
19558 #if PY_VERSION_HEX >= 0x030300A0
19559 value = ((PyStopIterationObject *)ev)->value;
19564 PyObject* args = PyObject_GetAttr(ev, __pyx_n_s__args);
19566 if (likely(args)) {
19567 value = PyObject_GetItem(args, 0);
19570 if (unlikely(!value)) {
19571 __Pyx_ErrRestore(NULL, NULL, NULL);
19572 Py_INCREF(Py_None);
19581 static CYTHON_INLINE
19582 void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *
self) {
19583 PyObject *exc_type =
self->exc_type;
19584 PyObject *exc_value =
self->exc_value;
19585 PyObject *exc_traceback =
self->exc_traceback;
19586 self->exc_type = NULL;
19587 self->exc_value = NULL;
19588 self->exc_traceback = NULL;
19589 Py_XDECREF(exc_type);
19590 Py_XDECREF(exc_value);
19591 Py_XDECREF(exc_traceback);
19593 static CYTHON_INLINE
19594 int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
19595 if (unlikely(gen->is_running)) {
19596 PyErr_SetString(PyExc_ValueError,
19597 "generator already executing");
19602 static CYTHON_INLINE
19603 PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *
self, PyObject *value) {
19605 assert(!self->is_running);
19606 if (unlikely(self->resume_label == 0)) {
19607 if (unlikely(value && value != Py_None)) {
19608 PyErr_SetString(PyExc_TypeError,
19609 "can't send non-None value to a "
19610 "just-started generator");
19614 if (unlikely(self->resume_label == -1)) {
19615 PyErr_SetNone(PyExc_StopIteration);
19619 #if CYTHON_COMPILING_IN_PYPY
19623 if (self->exc_traceback) {
19624 PyThreadState *tstate = PyThreadState_GET();
19625 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
19626 PyFrameObject *f = tb->tb_frame;
19627 Py_XINCREF(tstate->frame);
19628 assert(f->f_back == NULL);
19629 f->f_back = tstate->frame;
19632 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
19633 &self->exc_traceback);
19635 __Pyx_Generator_ExceptionClear(
self);
19637 self->is_running = 1;
19638 retval =
self->body((PyObject *)
self, value);
19639 self->is_running = 0;
19641 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
19642 &self->exc_traceback);
19643 #if CYTHON_COMPILING_IN_PYPY
19648 if (self->exc_traceback) {
19649 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
19650 PyFrameObject *f = tb->tb_frame;
19651 Py_CLEAR(f->f_back);
19655 __Pyx_Generator_ExceptionClear(
self);
19659 static CYTHON_INLINE
19660 PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
19662 PyObject *val = NULL;
19663 __Pyx_Generator_Undelegate(gen);
19664 __Pyx_PyGen_FetchStopIterationValue(&val);
19665 ret = __Pyx_Generator_SendEx(gen, val);
19669 static PyObject *__Pyx_Generator_Next(PyObject *
self) {
19670 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*)
self;
19671 PyObject *yf = gen->yieldfrom;
19672 if (unlikely(__Pyx_Generator_CheckRunning(gen)))
19676 gen->is_running = 1;
19677 ret = Py_TYPE(yf)->tp_iternext(yf);
19678 gen->is_running = 0;
19682 return __Pyx_Generator_FinishDelegation(gen);
19684 return __Pyx_Generator_SendEx(gen, Py_None);
19686 static PyObject *__Pyx_Generator_Send(PyObject *
self, PyObject *value) {
19687 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*)
self;
19688 PyObject *yf = gen->yieldfrom;
19689 if (unlikely(__Pyx_Generator_CheckRunning(gen)))
19693 gen->is_running = 1;
19694 if (__Pyx_Generator_CheckExact(yf)) {
19695 ret = __Pyx_Generator_Send(yf, value);
19697 if (value == Py_None)
19698 ret = PyIter_Next(yf);
19700 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s__send, value);
19702 gen->is_running = 0;
19706 return __Pyx_Generator_FinishDelegation(gen);
19708 return __Pyx_Generator_SendEx(gen, value);
19710 static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
19711 PyObject *retval = NULL;
19713 if (__Pyx_Generator_CheckExact(yf)) {
19714 retval = __Pyx_Generator_Close(yf);
19719 gen->is_running = 1;
19720 meth = PyObject_GetAttr(yf, __pyx_n_s__close);
19721 if (unlikely(!meth)) {
19722 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
19723 PyErr_WriteUnraisable(yf);
19727 retval = PyObject_CallFunction(meth, NULL);
19732 gen->is_running = 0;
19734 Py_XDECREF(retval);
19737 static PyObject *__Pyx_Generator_Close(PyObject *
self) {
19738 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
19739 PyObject *retval, *raised_exception;
19740 PyObject *yf = gen->yieldfrom;
19742 if (unlikely(__Pyx_Generator_CheckRunning(gen)))
19746 err = __Pyx_Generator_CloseIter(gen, yf);
19747 __Pyx_Generator_Undelegate(gen);
19751 #if PY_VERSION_HEX < 0x02050000
19752 PyErr_SetNone(PyExc_StopIteration);
19754 PyErr_SetNone(PyExc_GeneratorExit);
19756 retval = __Pyx_Generator_SendEx(gen, NULL);
19759 PyErr_SetString(PyExc_RuntimeError,
19760 "generator ignored GeneratorExit");
19763 raised_exception = PyErr_Occurred();
19764 if (!raised_exception
19765 || raised_exception == PyExc_StopIteration
19766 #
if PY_VERSION_HEX >= 0x02050000
19767 || raised_exception == PyExc_GeneratorExit
19768 || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
19770 || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
19772 if (raised_exception) PyErr_Clear();
19773 Py_INCREF(Py_None);
19778 static PyObject *__Pyx_Generator_Throw(PyObject *
self, PyObject *args) {
19779 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
19781 PyObject *tb = NULL;
19782 PyObject *val = NULL;
19783 PyObject *yf = gen->yieldfrom;
19784 if (!PyArg_UnpackTuple(args, (
char *)
"throw", 1, 3, &typ, &val, &tb))
19786 if (unlikely(__Pyx_Generator_CheckRunning(gen)))
19791 #if PY_VERSION_HEX >= 0x02050000
19792 if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
19793 int err = __Pyx_Generator_CloseIter(gen, yf);
19795 __Pyx_Generator_Undelegate(gen);
19797 return __Pyx_Generator_SendEx(gen, NULL);
19801 gen->is_running = 1;
19802 if (__Pyx_Generator_CheckExact(yf)) {
19803 ret = __Pyx_Generator_Throw(yf, args);
19805 PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s__throw);
19806 if (unlikely(!meth)) {
19808 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
19809 gen->is_running = 0;
19813 __Pyx_Generator_Undelegate(gen);
19814 gen->is_running = 0;
19817 ret = PyObject_CallObject(meth, args);
19820 gen->is_running = 0;
19823 ret = __Pyx_Generator_FinishDelegation(gen);
19828 __Pyx_Raise(typ, val, tb, NULL);
19829 return __Pyx_Generator_SendEx(gen, NULL);
19831 static int __Pyx_Generator_traverse(PyObject *
self, visitproc visit,
void *arg) {
19832 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
19833 Py_VISIT(gen->closure);
19834 Py_VISIT(gen->classobj);
19835 Py_VISIT(gen->yieldfrom);
19836 Py_VISIT(gen->exc_type);
19837 Py_VISIT(gen->exc_value);
19838 Py_VISIT(gen->exc_traceback);
19841 static int __Pyx_Generator_clear(PyObject *
self) {
19842 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
19843 Py_CLEAR(gen->closure);
19844 Py_CLEAR(gen->classobj);
19845 Py_CLEAR(gen->yieldfrom);
19846 Py_CLEAR(gen->exc_type);
19847 Py_CLEAR(gen->exc_value);
19848 Py_CLEAR(gen->exc_traceback);
19851 static void __Pyx_Generator_dealloc(PyObject *
self) {
19852 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
19853 PyObject_GC_UnTrack(gen);
19854 if (gen->gi_weakreflist != NULL)
19855 PyObject_ClearWeakRefs(
self);
19856 PyObject_GC_Track(
self);
19857 if (gen->resume_label > 0) {
19858 Py_TYPE(gen)->tp_del(
self);
19859 if (self->ob_refcnt > 0)
19862 PyObject_GC_UnTrack(
self);
19863 __Pyx_Generator_clear(
self);
19864 PyObject_GC_Del(gen);
19866 static void __Pyx_Generator_del(PyObject *
self) {
19868 PyObject *error_type, *error_value, *error_traceback;
19869 __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *)
self;
19870 if (gen->resume_label <= 0)
19872 assert(self->ob_refcnt == 0);
19873 self->ob_refcnt = 1;
19874 __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
19875 res = __Pyx_Generator_Close(
self);
19877 PyErr_WriteUnraisable(
self);
19880 __Pyx_ErrRestore(error_type, error_value, error_traceback);
19884 assert(self->ob_refcnt > 0);
19885 if (--self->ob_refcnt == 0)
19891 Py_ssize_t refcnt =
self->ob_refcnt;
19892 _Py_NewReference(
self);
19893 self->ob_refcnt = refcnt;
19895 #if CYTHON_COMPILING_IN_CPYTHON
19896 assert(PyType_IS_GC(self->ob_type) &&
19897 _Py_AS_GC(
self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
19908 #ifdef COUNT_ALLOCS
19909 --Py_TYPE(
self)->tp_frees;
19910 --Py_TYPE(
self)->tp_allocs;
19913 static PyMemberDef __pyx_Generator_memberlist[] = {
19914 {(
char *)
"gi_running",
19915 #
if PY_VERSION_HEX >= 0x02060000
19920 offsetof(__pyx_GeneratorObject, is_running),
19925 static PyMethodDef __pyx_Generator_methods[] = {
19926 {__Pyx_NAMESTR(
"send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
19927 {__Pyx_NAMESTR(
"throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
19928 {__Pyx_NAMESTR(
"close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
19931 static PyTypeObject __pyx_GeneratorType_type = {
19932 PyVarObject_HEAD_INIT(0, 0)
19933 __Pyx_NAMESTR("generator"),
19934 sizeof(__pyx_GeneratorObject),
19936 (destructor) __Pyx_Generator_dealloc,
19940 #if PY_MAJOR_VERSION < 3
19955 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
19957 (traverseproc) __Pyx_Generator_traverse,
19960 offsetof(__pyx_GeneratorObject, gi_weakreflist),
19962 (iternextfunc) __Pyx_Generator_Next,
19963 __pyx_Generator_methods,
19964 __pyx_Generator_memberlist,
19981 __Pyx_Generator_del,
19982 #
if PY_VERSION_HEX >= 0x02060000
19986 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
19987 PyObject *closure) {
19988 __pyx_GeneratorObject *gen =
19989 PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
19993 gen->closure = closure;
19994 Py_XINCREF(closure);
19995 gen->is_running = 0;
19996 gen->resume_label = 0;
19997 gen->classobj = NULL;
19998 gen->yieldfrom = NULL;
19999 gen->exc_type = NULL;
20000 gen->exc_value = NULL;
20001 gen->exc_traceback = NULL;
20002 gen->gi_weakreflist = NULL;
20003 PyObject_GC_Track(gen);
20006 static int __pyx_Generator_init(
void) {
20007 __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
20008 __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
20009 if (PyType_Ready(&__pyx_GeneratorType_type)) {
20012 __pyx_GeneratorType = &__pyx_GeneratorType_type;
20016 static int __Pyx_check_binary_version(
void) {
20017 char ctversion[4], rtversion[4];
20018 PyOS_snprintf(ctversion, 4,
"%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
20019 PyOS_snprintf(rtversion, 4,
"%s", Py_GetVersion());
20020 if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
20022 PyOS_snprintf(message,
sizeof(message),
20023 "compiletime version %s of module '%.100s' "
20024 "does not match runtime version %s",
20025 ctversion, __Pyx_MODULE_NAME, rtversion);
20026 #if PY_VERSION_HEX < 0x02050000
20027 return PyErr_Warn(NULL, message);
20029 return PyErr_WarnEx(NULL, message, 1);
20035 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
20036 int start = 0, mid = 0, end = count - 1;
20037 if (end >= 0 && code_line > entries[end].code_line) {
20040 while (start < end) {
20041 mid = (start + end) / 2;
20042 if (code_line < entries[mid].code_line) {
20044 }
else if (code_line > entries[mid].code_line) {
20050 if (code_line <= entries[mid].code_line) {
20056 static PyCodeObject *__pyx_find_code_object(
int code_line) {
20057 PyCodeObject* code_object;
20059 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
20062 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
20063 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
20066 code_object = __pyx_code_cache.entries[pos].code_object;
20067 Py_INCREF(code_object);
20068 return code_object;
20070 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object) {
20072 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
20073 if (unlikely(!code_line)) {
20076 if (unlikely(!entries)) {
20077 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
20078 if (likely(entries)) {
20079 __pyx_code_cache.entries = entries;
20080 __pyx_code_cache.max_count = 64;
20081 __pyx_code_cache.count = 1;
20082 entries[0].code_line = code_line;
20083 entries[0].code_object = code_object;
20084 Py_INCREF(code_object);
20088 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
20089 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
20090 PyCodeObject* tmp = entries[pos].code_object;
20091 entries[pos].code_object = code_object;
20095 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
20096 int new_max = __pyx_code_cache.max_count + 64;
20097 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
20098 __pyx_code_cache.entries, new_max*
sizeof(__Pyx_CodeObjectCacheEntry));
20099 if (unlikely(!entries)) {
20102 __pyx_code_cache.entries = entries;
20103 __pyx_code_cache.max_count = new_max;
20105 for (i=__pyx_code_cache.count; i>pos; i--) {
20106 entries[i] = entries[i-1];
20108 entries[pos].code_line = code_line;
20109 entries[pos].code_object = code_object;
20110 __pyx_code_cache.count++;
20111 Py_INCREF(code_object);
20114 #include "compile.h"
20115 #include "frameobject.h"
20116 #include "traceback.h"
20117 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
20118 const char *funcname,
int c_line,
20119 int py_line,
const char *filename) {
20120 PyCodeObject *py_code = 0;
20121 PyObject *py_srcfile = 0;
20122 PyObject *py_funcname = 0;
20123 #if PY_MAJOR_VERSION < 3
20124 py_srcfile = PyString_FromString(filename);
20126 py_srcfile = PyUnicode_FromString(filename);
20128 if (!py_srcfile)
goto bad;
20130 #if PY_MAJOR_VERSION < 3
20131 py_funcname = PyString_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
20133 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
20137 #if PY_MAJOR_VERSION < 3
20138 py_funcname = PyString_FromString(funcname);
20140 py_funcname = PyUnicode_FromString(funcname);
20143 if (!py_funcname)
goto bad;
20144 py_code = __Pyx_PyCode_New(
20161 Py_DECREF(py_srcfile);
20162 Py_DECREF(py_funcname);
20165 Py_XDECREF(py_srcfile);
20166 Py_XDECREF(py_funcname);
20169 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
20170 int py_line,
const char *filename) {
20171 PyCodeObject *py_code = 0;
20172 PyObject *py_globals = 0;
20173 PyFrameObject *py_frame = 0;
20174 py_code = __pyx_find_code_object(c_line ? c_line : py_line);
20176 py_code = __Pyx_CreateCodeObjectForTraceback(
20177 funcname, c_line, py_line, filename);
20178 if (!py_code)
goto bad;
20179 __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
20181 py_globals = PyModule_GetDict(__pyx_m);
20182 if (!py_globals)
goto bad;
20183 py_frame = PyFrame_New(
20184 PyThreadState_GET(),
20189 if (!py_frame)
goto bad;
20190 py_frame->f_lineno = py_line;
20191 PyTraceBack_Here(py_frame);
20193 Py_XDECREF(py_code);
20194 Py_XDECREF(py_frame);
20197 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
20199 #if PY_MAJOR_VERSION < 3
20200 if (t->is_unicode) {
20201 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
20202 }
else if (t->intern) {
20203 *t->p = PyString_InternFromString(t->s);
20205 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
20208 if (t->is_unicode | t->is_str) {
20210 *t->p = PyUnicode_InternFromString(t->s);
20211 }
else if (t->encoding) {
20212 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
20214 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
20217 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
20227 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
char* c_str) {
20228 return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
20230 static CYTHON_INLINE
char* __Pyx_PyObject_AsString(PyObject* o) {
20232 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
20234 static CYTHON_INLINE
char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
20235 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
20237 #
if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
20238 __Pyx_sys_getdefaultencoding_not_ascii &&
20240 PyUnicode_Check(o)) {
20241 #if PY_VERSION_HEX < 0x03030000
20243 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
20244 if (!defenc)
return NULL;
20245 defenc_c = PyBytes_AS_STRING(defenc);
20246 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
20248 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
20250 for (c = defenc_c; c < end; c++) {
20251 if ((
unsigned char) (*c) >= 128) {
20252 PyUnicode_AsASCIIString(o);
20258 *length = PyBytes_GET_SIZE(defenc);
20261 if (PyUnicode_READY(o) == -1)
return NULL;
20262 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
20263 if (PyUnicode_IS_ASCII(o)) {
20264 *length = PyUnicode_GET_DATA_SIZE(o);
20265 return PyUnicode_AsUTF8(o);
20267 PyUnicode_AsASCIIString(o);
20271 return PyUnicode_AsUTF8AndSize(o, length);
20278 int r = PyBytes_AsStringAndSize(o, &result, length);
20286 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
20287 int is_true = x == Py_True;
20288 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
20289 else return PyObject_IsTrue(x);
20291 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
20292 PyNumberMethods *m;
20293 const char *name = NULL;
20294 PyObject *res = NULL;
20295 #if PY_MAJOR_VERSION < 3
20296 if (PyInt_Check(x) || PyLong_Check(x))
20298 if (PyLong_Check(x))
20300 return Py_INCREF(x), x;
20301 m = Py_TYPE(x)->tp_as_number;
20302 #if PY_MAJOR_VERSION < 3
20303 if (m && m->nb_int) {
20305 res = PyNumber_Int(x);
20307 else if (m && m->nb_long) {
20309 res = PyNumber_Long(x);
20312 if (m && m->nb_int) {
20314 res = PyNumber_Long(x);
20318 #if PY_MAJOR_VERSION < 3
20319 if (!PyInt_Check(res) && !PyLong_Check(res)) {
20321 if (!PyLong_Check(res)) {
20323 PyErr_Format(PyExc_TypeError,
20324 "__%s__ returned non-%s (type %.200s)",
20325 name, name, Py_TYPE(res)->tp_name);
20330 else if (!PyErr_Occurred()) {
20331 PyErr_SetString(PyExc_TypeError,
20332 "an integer is required");
20336 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
20338 PyObject* x = PyNumber_Index(b);
20340 ival = PyInt_AsSsize_t(x);
20344 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t ival) {
20345 #if PY_VERSION_HEX < 0x02050000
20346 if (ival <= LONG_MAX)
20347 return PyInt_FromLong((
long)ival);
20349 unsigned char *bytes = (
unsigned char *) &ival;
20350 int one = 1;
int little = (int)*(
unsigned char*)&one;
20351 return _PyLong_FromByteArray(bytes,
sizeof(
size_t), little, 0);
20354 return PyInt_FromSize_t(ival);
20357 static CYTHON_INLINE
size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
20358 unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
20359 if (unlikely(val != (
unsigned PY_LONG_LONG)(
size_t)val)) {
20360 if ((val != (
unsigned PY_LONG_LONG)-1) || !PyErr_Occurred())
20361 PyErr_SetString(PyExc_OverflowError,
20362 "value too large to convert to size_t");
20365 return (
size_t)val;
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)].