glucat  0.8.2
PyClical.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.19.1 on Sun Feb 5 14:37:51 2017 */
2 
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
7 #else
8 #include "pyconfig.h"
9 #ifdef PYLONG_BITS_IN_DIGIT
10 #define CYTHON_USE_PYLONG_INTERNALS 1
11 #else
12 #define CYTHON_USE_PYLONG_INTERNALS 0
13 #endif
14 #endif
15 #endif
16 #include "Python.h"
17 #ifndef Py_PYTHON_H
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+.
21 #else
22 #include <stddef.h> /* For offsetof */
23 #ifndef offsetof
24 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
25 #endif
26 #if !defined(WIN32) && !defined(MS_WINDOWS)
27  #ifndef __stdcall
28  #define __stdcall
29  #endif
30  #ifndef __cdecl
31  #define __cdecl
32  #endif
33  #ifndef __fastcall
34  #define __fastcall
35  #endif
36 #endif
37 #ifndef DL_IMPORT
38  #define DL_IMPORT(t) t
39 #endif
40 #ifndef DL_EXPORT
41  #define DL_EXPORT(t) t
42 #endif
43 #ifndef PY_LONG_LONG
44  #define PY_LONG_LONG LONG_LONG
45 #endif
46 #ifndef Py_HUGE_VAL
47  #define Py_HUGE_VAL HUGE_VAL
48 #endif
49 #ifdef PYPY_VERSION
50 #define CYTHON_COMPILING_IN_PYPY 1
51 #define CYTHON_COMPILING_IN_CPYTHON 0
52 #else
53 #define CYTHON_COMPILING_IN_PYPY 0
54 #define CYTHON_COMPILING_IN_CPYTHON 1
55 #endif
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), \
67  (PyObject*)0))
68  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
69  !PyComplex_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"
73 #else
74  #define __PYX_BUILD_PY_SSIZE_T "n"
75  #define CYTHON_FORMAT_SSIZE_T "z"
76  #define __Pyx_PyIndex_Check PyIndex_Check
77 #endif
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)
85  typedef struct {
86  void *buf;
87  PyObject *obj;
88  Py_ssize_t len;
89  Py_ssize_t itemsize;
90  int readonly;
91  int ndim;
92  char *format;
93  Py_ssize_t *shape;
94  Py_ssize_t *strides;
95  Py_ssize_t *suboffsets;
96  void *internal;
97  } Py_buffer;
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 *);
111 #endif
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)
116 #else
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)
120 #endif
121 #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
122  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
123 #endif
124 #if PY_MAJOR_VERSION >= 3
125  #define Py_TPFLAGS_CHECKTYPES 0
126  #define Py_TPFLAGS_HAVE_INDEX 0
127 #endif
128 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
129  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
130 #endif
131 #if PY_VERSION_HEX < 0x02060000
132  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
133 #endif
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)
141 #else
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]))
147 #endif
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
154 #endif
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
172 #endif
173 #if PY_MAJOR_VERSION >= 3
174  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
175  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
176 #else
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)
180 #endif
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)
184 #endif
185 #ifndef PySet_CheckExact
186  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
187 #endif
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
204 #endif
205 #if PY_MAJOR_VERSION >= 3
206  #define PyBoolObject PyLongObject
207 #endif
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
212 #else
213  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
214  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
215 #endif
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)
220 #else
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)))
233 #endif
234 #if PY_MAJOR_VERSION >= 3
235  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
236 #endif
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)))
241 #else
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))
245 #endif
246 #if PY_VERSION_HEX < 0x02050000
247  #define __Pyx_NAMESTR(n) ((char *)(n))
248  #define __Pyx_DOCSTR(n) ((char *)(n))
249 #else
250  #define __Pyx_NAMESTR(n) (n)
251  #define __Pyx_DOCSTR(n) (n)
252 #endif
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
260  #else
261  #define CYTHON_INLINE
262  #endif
263 #endif
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
271  #else
272  #define CYTHON_RESTRICT
273  #endif
274 #endif
275 #ifdef NAN
276 #define __PYX_NAN() ((float) NAN)
277 #else
278 static CYTHON_INLINE float __PYX_NAN() {
279  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
280  a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
281  a quiet NaN. */
282  float value;
283  memset(&value, 0xFF, sizeof(value));
284  return value;
285 }
286 #endif
287 
288 
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)
292 #else
293  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
294  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
295 #endif
296 
297 #ifndef __PYX_EXTERN_C
298  #ifdef __cplusplus
299  #define __PYX_EXTERN_C extern "C"
300  #else
301  #define __PYX_EXTERN_C extern
302  #endif
303 #endif
304 
305 #if defined(WIN32) || defined(MS_WINDOWS)
306 #define _USE_MATH_DEFINES
307 #endif
308 #include <math.h>
309 #define __PYX_HAVE__PyClical
310 #define __PYX_HAVE_API__PyClical
311 #include <vector>
312 #include "ios"
313 #include "new"
314 #include "stdexcept"
315 #include "typeinfo"
316 #include "PyClical.h"
317 #ifdef _OPENMP
318 #include <omp.h>
319 #endif /* _OPENMP */
320 
321 #ifdef PYREX_WITHOUT_ASSERTIONS
322 #define CYTHON_WITHOUT_ASSERTIONS
323 #endif
324 
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__))
329 # else
330 # define CYTHON_UNUSED
331 # endif
332 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
333 # define CYTHON_UNUSED __attribute__ ((__unused__))
334 # else
335 # define CYTHON_UNUSED
336 # endif
337 #endif
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; /*proto*/
340 
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
354 #else
355  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
356  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
357 #endif
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)
365 {
366  const Py_UNICODE *u_end = u;
367  while (*u_end++) ;
368  return u_end - u - 1;
369 }
370 #else
371 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
372 #endif
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))
385 #else
386 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
387 #endif
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;
402  } else {
403  const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
404  char ascii_chars[128];
405  int c;
406  for (c = 0; c < 128; c++) {
407  ascii_chars[c] = c;
408  }
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) {
414  PyErr_Format(
415  PyExc_ValueError,
416  "This module compiled with c_string_encoding=ascii, but default encoding '%s' is not a superset of ascii.",
417  default_encoding_c);
418  goto bad;
419  }
420  }
421  Py_XDECREF(sys);
422  Py_XDECREF(default_encoding);
423  Py_XDECREF(ascii_chars_u);
424  Py_XDECREF(ascii_chars_b);
425  return 0;
426 bad:
427  Py_XDECREF(sys);
428  Py_XDECREF(default_encoding);
429  Py_XDECREF(ascii_chars_u);
430  Py_XDECREF(ascii_chars_b);
431  return -1;
432 }
433 #endif
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)
436 #else
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);
451  Py_DECREF(sys);
452  Py_DECREF(default_encoding);
453  return 0;
454 bad:
455  Py_XDECREF(sys);
456  Py_XDECREF(default_encoding);
457  return -1;
458 }
459 #endif
460 #endif
461 
462 
463 #ifdef __GNUC__
464  /* Test for GCC > 2.95 */
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)
468  #else /* __GNUC__ > 2 ... */
469  #define likely(x) (x)
470  #define unlikely(x) (x)
471  #endif /* __GNUC__ > 2 ... */
472 #else /* __GNUC__ */
473  #define likely(x) (x)
474  #define unlikely(x) (x)
475 #endif /* __GNUC__ */
476 
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;
486 
487 
488 static const char *__pyx_f[] = {
489  "PyClical.pyx",
490 };
491 
492 /*--- Type declarations ---*/
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;
508 
509 /* "PyClical.pyx":1542
510  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
511  *
512  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
513  * """
514  * Square root of multivector with optional complexifier.
515  */
516 struct __pyx_opt_args_8PyClical_sqrt {
517  int __pyx_n;
518  PyObject *i;
519 };
520 
521 /* "PyClical.pyx":1579
522  * return clifford().wrap( glucat.exp(toClifford(obj)) )
523  *
524  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
525  * """
526  * Natural logarithm of multivector with optional complexifier.
527  */
528 struct __pyx_opt_args_8PyClical_log {
529  int __pyx_n;
530  PyObject *i;
531 };
532 
533 /* "PyClical.pyx":1602
534  * return clifford().wrap( glucat.log(toClifford(obj)) )
535  *
536  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
537  * """
538  * Cosine of multivector with optional complexifier.
539  */
540 struct __pyx_opt_args_8PyClical_cos {
541  int __pyx_n;
542  PyObject *i;
543 };
544 
545 /* "PyClical.pyx":1619
546  * return clifford().wrap( glucat.cos(toClifford(obj)) )
547  *
548  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
549  * """
550  * Inverse cosine of multivector with optional complexifier.
551  */
552 struct __pyx_opt_args_8PyClical_acos {
553  int __pyx_n;
554  PyObject *i;
555 };
556 
557 /* "PyClical.pyx":1656
558  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
559  *
560  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
561  * """
562  * Inverse hyperbolic cosine of multivector with optional complexifier.
563  */
564 struct __pyx_opt_args_8PyClical_acosh {
565  int __pyx_n;
566  PyObject *i;
567 };
568 
569 /* "PyClical.pyx":1679
570  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
571  *
572  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
573  * """
574  * Sine of multivector with optional complexifier.
575  */
576 struct __pyx_opt_args_8PyClical_sin {
577  int __pyx_n;
578  PyObject *i;
579 };
580 
581 /* "PyClical.pyx":1698
582  * return clifford().wrap( glucat.sin(toClifford(obj)) )
583  *
584  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
585  * """
586  * Inverse sine of multivector with optional complexifier.
587  */
588 struct __pyx_opt_args_8PyClical_asin {
589  int __pyx_n;
590  PyObject *i;
591 };
592 
593 /* "PyClical.pyx":1733
594  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
595  *
596  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
597  * """
598  * Inverse hyperbolic sine of multivector with optional complexifier.
599  */
600 struct __pyx_opt_args_8PyClical_asinh {
601  int __pyx_n;
602  PyObject *i;
603 };
604 
605 /* "PyClical.pyx":1752
606  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
607  *
608  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
609  * """
610  * Tangent of multivector with optional complexifier.
611  */
612 struct __pyx_opt_args_8PyClical_tan {
613  int __pyx_n;
614  PyObject *i;
615 };
616 
617 /* "PyClical.pyx":1769
618  * return clifford().wrap( glucat.tan(toClifford(obj)) )
619  *
620  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
621  * """
622  * Inverse tangent of multivector with optional complexifier.
623  */
624 struct __pyx_opt_args_8PyClical_atan {
625  int __pyx_n;
626  PyObject *i;
627 };
628 
629 /* "PyClical.pyx":1798
630  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
631  *
632  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
633  * """
634  * Inverse hyperbolic tangent of multivector with optional complexifier.
635  */
636 struct __pyx_opt_args_8PyClical_atanh {
637  int __pyx_n;
638  PyObject *i;
639 };
640 
641 /* "PyClical.pyx":1815
642  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
643  *
644  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
645  * """
646  * Random multivector within a frame.
647  */
648 struct __pyx_opt_args_8PyClical_random_clifford {
649  int __pyx_n;
650  PyObject *fill;
651 };
652 
653 /* "PyClical.pyx":37
654  *
655  * # Forward reference
656  * cdef class index_set # <<<<<<<<<<<<<<
657  *
658  * cdef inline IndexSet toIndexSet(obj):
659  */
660 struct __pyx_obj_8PyClical_index_set {
661  PyObject_HEAD
662  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
663  IndexSet *instance;
664 };
665 
666 
667 /* "PyClical.pyx":227
668  * return self.instance.getitem(idx)
669  *
670  * def __iter__(self): # <<<<<<<<<<<<<<
671  * """
672  * Iterate over the indices of an index_set.
673  */
674 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
675  PyObject_HEAD
676  PyObject *__pyx_v_idx;
677  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
678  PyObject *__pyx_t_0;
679  Py_ssize_t __pyx_t_1;
680  PyObject *(*__pyx_t_2)(PyObject *);
681 };
682 
683 
684 /* "PyClical.pyx":530
685  *
686  * # Forward reference.
687  * cdef class clifford # <<<<<<<<<<<<<<
688  *
689  * cdef inline Clifford toClifford(obj):
690  */
691 struct __pyx_obj_8PyClical_clifford {
692  PyObject_HEAD
693  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
694  Clifford *instance;
695 };
696 
697 
698 
699 /* "PyClical.pyx":535
700  * return clifford(obj).instance[0]
701  *
702  * cdef class clifford: # <<<<<<<<<<<<<<
703  * """
704  * Python class clifford wraps C++ class Clifford.
705  */
706 
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);
711 };
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 *);
715 
716 
717 /* "PyClical.pyx":45
718  * return index_set(obj).instance[0]
719  *
720  * cdef class index_set: # <<<<<<<<<<<<<<
721  * """
722  * Python class index_set wraps C++ class IndexSet.
723  */
724 
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);
729 };
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
735 #endif
736 #if CYTHON_REFNANNY
737  typedef struct {
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); /*proto*/
747  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
748 #ifdef WITH_THREAD
749  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
750  if (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); \
754  } else { \
755  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
756  }
757 #else
758  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
759  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
760 #endif
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)
771 #else
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)
783 #endif /* CYTHON_REFNANNY */
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)
786 
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));
795 #endif
796  return PyObject_GetAttr(obj, attr_name);
797 }
798 #else
799 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
800 #endif
801 
802 static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
803 
804 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
805 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
806 
807 static void __Pyx_WriteUnraisable(const char *name, int clineno,
808  int lineno, const char *filename); /*proto*/
809 
810 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
811 
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); /*proto*/
815 
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); /*proto*/
818 
819 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
820 
821 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
822 
823 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
824 
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));
828 }
829 
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);
837 
838 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
839  const char *name, int exact); /*proto*/
840 
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);
858  if (!ret) return -1;
859  Py_DECREF(ret); return 0;
860 }
861 static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
862  PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key);
863  if (!ret) return -1;
864  Py_DECREF(ret); return 0;
865 }
866 static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
867  PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key);
868  if (!ret) return -1;
869  Py_DECREF(ret); return 0;
870 }
871 #endif /* PyAnySet_CheckExact (<= Py2.4) */
872 #endif /* < Py2.5 */
873 
874 #include <string.h>
875 
876 static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
877 
878 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
879 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
880 
881 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
882 
883 #ifndef __Pyx_CppExn2PyErr
884 #include <new>
885 #include <typeinfo>
886 #include <stdexcept>
887 #include <ios>
888 static void __Pyx_CppExn2PyErr() {
889  try {
890  if (PyErr_Occurred())
891  ; // let the latest Python exn pass through and ignore the current one
892  else
893  throw;
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());
914  }
915  catch (...)
916  {
917  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
918  }
919 }
920 #endif
921 
922 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
923 
924 static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
925 
926 static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
927 
928 static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
929 
930 static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
931 
932 static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
933 
934 static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
935 
936 static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
937 
938 static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
939 
940 static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
941 
942 static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
943 
944 static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
945 
946 static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
947 
948 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
949 
950 static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
951 
952 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
953 
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);
960  Py_DECREF(method);
961 bad:
962  Py_DECREF(args);
963  return result;
964 }
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))
973 
974 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
975 
976 #define __Pyx_Generator_USED
977 #include <structmember.h>
978 #include <frameobject.h>
979 typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
980 typedef struct {
981  PyObject_HEAD
982  __pyx_generator_body_t body;
983  PyObject *closure;
984  PyObject *exc_type;
985  PyObject *exc_value;
986  PyObject *exc_traceback;
987  PyObject *gi_weakreflist;
988  PyObject *classobj;
989  PyObject *yieldfrom;
990  int resume_label;
991  char is_running; // using T_BOOL for property below requires char value
992 } __pyx_GeneratorObject;
993 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
994  PyObject *closure);
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);
999 #else
1000 #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
1001 #endif
1002 
1003 static int __Pyx_check_binary_version(void);
1004 
1005 typedef struct {
1006  int code_line;
1007  PyCodeObject* code_object;
1008 } __Pyx_CodeObjectCacheEntry;
1009 struct __Pyx_CodeObjectCache {
1010  int count;
1011  int max_count;
1012  __Pyx_CodeObjectCacheEntry* entries;
1013 };
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);
1018 
1019 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1020  int py_line, const char *filename); /*proto*/
1021 
1022 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
1023 
1024 
1025 /* Module declarations from 'libcpp.vector' */
1026 
1027 /* Module declarations from 'glucat' */
1028 
1029 /* Module declarations from 'PyClical' */
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 *); /*proto*/
1034 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1035 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1036 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1037 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1038 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1039 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1040 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1041 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1042 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1043 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1044 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1045 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1046 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1047 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1048 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1049 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1050 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1051 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1052 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1053 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1054 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1055 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1056 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1057 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1058 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1059 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1060 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1061 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1062 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1063 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1064 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1065 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1066 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1067 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1068 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1069 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1070 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
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); /*proto*/
1072 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1073 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1074 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1075 #define __Pyx_MODULE_NAME "PyClical"
1076 int __pyx_module_is_main_PyClical = 0;
1077 
1078 /* Implementation of 'PyClical' */
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); /* proto */
1087 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
1088 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1089 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
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); /* proto */
1091 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
1092 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
1093 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1094 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1095 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1096 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1097 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1098 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1099 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1100 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1101 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1102 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1103 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1104 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1105 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1106 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1107 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1108 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1109 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1110 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1111 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1112 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1113 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1114 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1115 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
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); /* proto */
1117 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
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); /* proto */
1119 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1120 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
1121 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
1122 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
1123 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1124 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1125 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1126 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1127 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1128 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1129 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1130 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1131 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1132 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1133 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1134 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1135 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1136 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1137 #if PY_MAJOR_VERSION < 3
1138 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1139 #endif
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); /* proto */
1142 #endif
1143 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1144 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1145 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1146 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
1147 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
1148 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
1149 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
1150 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1151 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1152 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1153 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1154 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
1155 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1156 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1157 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1158 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1159 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1160 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1161 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1162 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
1163 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1164 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1165 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1166 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1167 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1168 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1169 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1170 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1171 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1172 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1173 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1174 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1175 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1176 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1177 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1178 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1179 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1180 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1181 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1182 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
1183 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
1184 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1185 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1186 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1187 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1188 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1189 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1190 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1191 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1192 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1193 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1194 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1195 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1196 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1197 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1198 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1199 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
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); /* proto */
1201 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1202 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1203 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1204 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1205 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
1206 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1207 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1208 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1209 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
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;
1861 
1862 /* "PyClical.pyx":39
1863  * cdef class index_set
1864  *
1865  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
1866  * """
1867  * Return the C++ IndexSet instance wrapped by index_set(obj).
1868  */
1869 
1870 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
1871  IndexSet __pyx_r;
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);
1879 
1880  /* "PyClical.pyx":43
1881  * Return the C++ IndexSet instance wrapped by index_set(obj).
1882  * """
1883  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
1884  *
1885  * cdef class index_set:
1886  */
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;
1897  goto __pyx_L0;
1898 
1899  goto __pyx_L0;
1900  __pyx_L1_error:;
1901  __Pyx_XDECREF(__pyx_t_1);
1902  __Pyx_XDECREF(__pyx_t_2);
1903  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
1904  __pyx_L0:;
1905  __Pyx_RefNannyFinishContext();
1906  return __pyx_r;
1907 }
1908 
1909 /* "PyClical.pyx":51
1910  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
1911  *
1912  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
1913  * """
1914  * Wrap an instance of the C++ class IndexSet.
1915  */
1916 
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);
1921 
1922  /* "PyClical.pyx":55
1923  * Wrap an instance of the C++ class IndexSet.
1924  * """
1925  * self.instance[0] = other # <<<<<<<<<<<<<<
1926  * return self
1927  *
1928  */
1929  (__pyx_v_self->instance[0]) = __pyx_v_other;
1930 
1931  /* "PyClical.pyx":56
1932  * """
1933  * self.instance[0] = other
1934  * return self # <<<<<<<<<<<<<<
1935  *
1936  * cdef inline IndexSet unwrap(index_set self):
1937  */
1938  __Pyx_XDECREF(__pyx_r);
1939  __Pyx_INCREF(((PyObject *)__pyx_v_self));
1940  __pyx_r = ((PyObject *)__pyx_v_self);
1941  goto __pyx_L0;
1942 
1943  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1944  __pyx_L0:;
1945  __Pyx_XGIVEREF(__pyx_r);
1946  __Pyx_RefNannyFinishContext();
1947  return __pyx_r;
1948 }
1949 
1950 /* "PyClical.pyx":58
1951  * return self
1952  *
1953  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
1954  * """
1955  * Return the wrapped C++ IndexSet instance.
1956  */
1957 
1958 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
1959  IndexSet __pyx_r;
1960  __Pyx_RefNannyDeclarations
1961  __Pyx_RefNannySetupContext("unwrap", 0);
1962 
1963  /* "PyClical.pyx":62
1964  * Return the wrapped C++ IndexSet instance.
1965  * """
1966  * return self.instance[0] # <<<<<<<<<<<<<<
1967  *
1968  * cpdef copy(index_set self):
1969  */
1970  __pyx_r = (__pyx_v_self->instance[0]);
1971  goto __pyx_L0;
1972 
1973  __pyx_L0:;
1974  __Pyx_RefNannyFinishContext();
1975  return __pyx_r;
1976 }
1977 
1978 /* "PyClical.pyx":64
1979  * return self.instance[0]
1980  *
1981  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
1982  * """
1983  * Copy this index_set object.
1984  */
1985 
1986 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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);
1996  /* Check if called by wrapper */
1997  if (unlikely(__pyx_skip_dispatch)) ;
1998  /* Check if overridden in Python */
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;
2007  __pyx_t_2 = 0;
2008  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2009  goto __pyx_L0;
2010  }
2011  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2012  }
2013 
2014  /* "PyClical.pyx":71
2015  * {1}
2016  * """
2017  * return index_set(self) # <<<<<<<<<<<<<<
2018  *
2019  * def __cinit__(self, other = 0):
2020  */
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;
2031  __pyx_t_2 = 0;
2032  goto __pyx_L0;
2033 
2034  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2035  goto __pyx_L0;
2036  __pyx_L1_error:;
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);
2040  __pyx_r = 0;
2041  __pyx_L0:;
2042  __Pyx_XGIVEREF(__pyx_r);
2043  __Pyx_RefNannyFinishContext();
2044  return __pyx_r;
2045 }
2046 
2047 /* Python wrapper */
2048 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
2056  return __pyx_r;
2057 }
2058 
2059 /* "PyClical.pyx":64
2060  * return self.instance[0]
2061  *
2062  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2063  * """
2064  * Copy this index_set object.
2065  */
2066 
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;
2079  __pyx_t_1 = 0;
2080  goto __pyx_L0;
2081 
2082  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2083  goto __pyx_L0;
2084  __pyx_L1_error:;
2085  __Pyx_XDECREF(__pyx_t_1);
2086  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2087  __pyx_r = NULL;
2088  __pyx_L0:;
2089  __Pyx_XGIVEREF(__pyx_r);
2090  __Pyx_RefNannyFinishContext();
2091  return __pyx_r;
2092 }
2093 
2094 /* Python wrapper */
2095 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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;
2101  int __pyx_r;
2102  __Pyx_RefNannyDeclarations
2103  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2104  {
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)) {
2109  Py_ssize_t kw_args;
2110  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2111  switch (pos_args) {
2112  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2113  case 0: break;
2114  default: goto __pyx_L5_argtuple_error;
2115  }
2116  kw_args = PyDict_Size(__pyx_kwds);
2117  switch (pos_args) {
2118  case 0:
2119  if (kw_args > 0) {
2120  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other);
2121  if (value) { values[0] = value; kw_args--; }
2122  }
2123  }
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;}
2126  }
2127  } else {
2128  switch (PyTuple_GET_SIZE(__pyx_args)) {
2129  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2130  case 0: break;
2131  default: goto __pyx_L5_argtuple_error;
2132  }
2133  }
2134  __pyx_v_other = values[0];
2135  }
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;}
2139  __pyx_L3_error:;
2140  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2141  __Pyx_RefNannyFinishContext();
2142  return -1;
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();
2146  return __pyx_r;
2147 }
2148 
2149 /* "PyClical.pyx":73
2150  * return index_set(self)
2151  *
2152  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2153  * """
2154  * Construct an object of type index_set.
2155  */
2156 
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;
2160  int __pyx_r;
2161  __Pyx_RefNannyDeclarations
2162  int __pyx_t_1;
2163  int __pyx_t_2;
2164  IndexSet *__pyx_t_3;
2165  PyObject *__pyx_t_4 = NULL;
2166  PyObject *__pyx_t_5 = NULL;
2167  int __pyx_t_6;
2168  int __pyx_t_7;
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;
2178  char *__pyx_t_17;
2179  int __pyx_lineno = 0;
2180  const char *__pyx_filename = NULL;
2181  int __pyx_clineno = 0;
2182  __Pyx_RefNannySetupContext("__cinit__", 0);
2183 
2184  /* "PyClical.pyx":92
2185  * {}
2186  * """
2187  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2188  * if isinstance(other, index_set):
2189  * self.instance = new IndexSet((<index_set>other).unwrap())
2190  */
2191  __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
2192  __pyx_v_error_msg_prefix = ((PyObject *)__pyx_kp_s_1);
2193 
2194  /* "PyClical.pyx":93
2195  * """
2196  * error_msg_prefix = "Cannot initialize index_set object from"
2197  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2198  * self.instance = new IndexSet((<index_set>other).unwrap())
2199  * elif isinstance(other, numbers.Integral):
2200  */
2201  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_index_set));
2202  __pyx_t_2 = (__pyx_t_1 != 0);
2203  if (__pyx_t_2) {
2204 
2205  /* "PyClical.pyx":94
2206  * error_msg_prefix = "Cannot initialize index_set object from"
2207  * if isinstance(other, index_set):
2208  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2209  * elif isinstance(other, numbers.Integral):
2210  * self.instance = new IndexSet(<int>other)
2211  */
2212  try {
2213  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2214  } catch(...) {
2215  __Pyx_CppExn2PyErr();
2216  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2217  }
2218  __pyx_v_self->instance = __pyx_t_3;
2219  goto __pyx_L3;
2220  }
2221 
2222  /* "PyClical.pyx":95
2223  * if isinstance(other, index_set):
2224  * self.instance = new IndexSet((<index_set>other).unwrap())
2225  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2226  * self.instance = new IndexSet(<int>other)
2227  * elif isinstance(other, (set, frozenset)):
2228  */
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);
2237  if (__pyx_t_1) {
2238 
2239  /* "PyClical.pyx":96
2240  * self.instance = new IndexSet((<index_set>other).unwrap())
2241  * elif isinstance(other, numbers.Integral):
2242  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2243  * elif isinstance(other, (set, frozenset)):
2244  * try:
2245  */
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;}
2247  try {
2248  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2249  } catch(...) {
2250  __Pyx_CppExn2PyErr();
2251  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2252  }
2253  __pyx_v_self->instance = __pyx_t_3;
2254  goto __pyx_L3;
2255  }
2256 
2257  /* "PyClical.pyx":97
2258  * elif isinstance(other, numbers.Integral):
2259  * self.instance = new IndexSet(<int>other)
2260  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2261  * try:
2262  * self.instance = new IndexSet()
2263  */
2264  __Pyx_INCREF(__pyx_v_other);
2265  __pyx_t_5 = __pyx_v_other;
2266  __pyx_t_1 = PySet_Check(__pyx_t_5);
2267  if (!__pyx_t_1) {
2268  __pyx_t_2 = PyFrozenSet_Check(__pyx_t_5);
2269  __pyx_t_7 = __pyx_t_2;
2270  } else {
2271  __pyx_t_7 = __pyx_t_1;
2272  }
2273  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2274  __pyx_t_1 = (__pyx_t_7 != 0);
2275  if (__pyx_t_1) {
2276 
2277  /* "PyClical.pyx":98
2278  * self.instance = new IndexSet(<int>other)
2279  * elif isinstance(other, (set, frozenset)):
2280  * try: # <<<<<<<<<<<<<<
2281  * self.instance = new IndexSet()
2282  * for idx in other:
2283  */
2284  {
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);
2289  /*try:*/ {
2290 
2291  /* "PyClical.pyx":99
2292  * elif isinstance(other, (set, frozenset)):
2293  * try:
2294  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
2295  * for idx in other:
2296  * self[idx] = True
2297  */
2298  __pyx_v_self->instance = new IndexSet();
2299 
2300  /* "PyClical.pyx":100
2301  * try:
2302  * self.instance = new IndexSet()
2303  * for idx in other: # <<<<<<<<<<<<<<
2304  * self[idx] = True
2305  * except IndexError:
2306  */
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;
2309  __pyx_t_12 = NULL;
2310  } else {
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;
2314  }
2315  for (;;) {
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;}
2320  #else
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;}
2322  #endif
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;}
2327  #else
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;}
2329  #endif
2330  } else {
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;}
2336  }
2337  break;
2338  }
2339  __Pyx_GOTREF(__pyx_t_4);
2340  }
2341  __Pyx_XDECREF(__pyx_v_idx);
2342  __pyx_v_idx = __pyx_t_4;
2343  __pyx_t_4 = 0;
2344 
2345  /* "PyClical.pyx":101
2346  * self.instance = new IndexSet()
2347  * for idx in other:
2348  * self[idx] = True # <<<<<<<<<<<<<<
2349  * except IndexError:
2350  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2351  */
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;
2356  }
2357  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2358  }
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;
2363  __pyx_L4_error:;
2364  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2365  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2366 
2367  /* "PyClical.pyx":102
2368  * for idx in other:
2369  * self[idx] = True
2370  * except IndexError: # <<<<<<<<<<<<<<
2371  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2372  * except (RuntimeError, TypeError):
2373  */
2374  __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2375  if (__pyx_t_6) {
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);
2381 
2382  /* "PyClical.pyx":103
2383  * self[idx] = True
2384  * except IndexError:
2385  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
2386  * except (RuntimeError, TypeError):
2387  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2388  */
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);
2404  __pyx_t_15 = 0;
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;
2415  }
2416 
2417  /* "PyClical.pyx":104
2418  * except IndexError:
2419  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2420  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
2421  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2422  * elif isinstance(other, str):
2423  */
2424  __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || PyErr_ExceptionMatches(__pyx_builtin_TypeError);
2425  if (__pyx_t_6) {
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);
2431 
2432  /* "PyClical.pyx":105
2433  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2434  * except (RuntimeError, TypeError):
2435  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
2436  * elif isinstance(other, str):
2437  * try:
2438  */
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);
2454  __pyx_t_16 = 0;
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;
2465  }
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);
2477  __pyx_L11_try_end:;
2478  }
2479  goto __pyx_L3;
2480  }
2481 
2482  /* "PyClical.pyx":106
2483  * except (RuntimeError, TypeError):
2484  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2485  * elif isinstance(other, str): # <<<<<<<<<<<<<<
2486  * try:
2487  * self.instance = new IndexSet(<char *>other)
2488  */
2489  __pyx_t_1 = PyString_Check(__pyx_v_other);
2490  __pyx_t_7 = (__pyx_t_1 != 0);
2491  if (__pyx_t_7) {
2492 
2493  /* "PyClical.pyx":107
2494  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2495  * elif isinstance(other, str):
2496  * try: # <<<<<<<<<<<<<<
2497  * self.instance = new IndexSet(<char *>other)
2498  * except RuntimeError:
2499  */
2500  {
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);
2505  /*try:*/ {
2506 
2507  /* "PyClical.pyx":108
2508  * elif isinstance(other, str):
2509  * try:
2510  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
2511  * except RuntimeError:
2512  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
2513  */
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;}
2515  try {
2516  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
2517  } catch(...) {
2518  __Pyx_CppExn2PyErr();
2519  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
2520  }
2521  __pyx_v_self->instance = __pyx_t_3;
2522  }
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;
2527  __pyx_L18_error:;
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;
2534 
2535  /* "PyClical.pyx":109
2536  * try:
2537  * self.instance = new IndexSet(<char *>other)
2538  * except RuntimeError: # <<<<<<<<<<<<<<
2539  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
2540  * else:
2541  */
2542  __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
2543  if (__pyx_t_6) {
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);
2549 
2550  /* "PyClical.pyx":110
2551  * self.instance = new IndexSet(<char *>other)
2552  * except RuntimeError:
2553  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
2554  * else:
2555  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
2556  */
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);
2572  __pyx_t_14 = 0;
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;
2583  }
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);
2595  __pyx_L25_try_end:;
2596  }
2597  goto __pyx_L3;
2598  }
2599  /*else*/ {
2600 
2601  /* "PyClical.pyx":112
2602  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
2603  * else:
2604  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
2605  *
2606  * def __dealloc__(self):
2607  */
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);
2629  __pyx_t_5 = 0;
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;}
2636  }
2637  __pyx_L3:;
2638 
2639  __pyx_r = 0;
2640  goto __pyx_L0;
2641  __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);
2649  __pyx_r = -1;
2650  __pyx_L0:;
2651  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
2652  __Pyx_XDECREF(__pyx_v_idx);
2653  __Pyx_RefNannyFinishContext();
2654  return __pyx_r;
2655 }
2656 
2657 /* Python wrapper */
2658 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
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();
2664 }
2665 
2666 /* "PyClical.pyx":114
2667  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
2668  *
2669  * def __dealloc__(self): # <<<<<<<<<<<<<<
2670  * """
2671  * Clean up by deallocating the instance of C++ class IndexSet.
2672  */
2673 
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);
2677 
2678  /* "PyClical.pyx":118
2679  * Clean up by deallocating the instance of C++ class IndexSet.
2680  * """
2681  * del self.instance # <<<<<<<<<<<<<<
2682  *
2683  * def __richcmp__(lhs, rhs, int op):
2684  */
2685  delete __pyx_v_self->instance;
2686 
2687  __Pyx_RefNannyFinishContext();
2688 }
2689 
2690 /* Python wrapper */
2691 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
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();
2698  return __pyx_r;
2699 }
2700 
2701 /* "PyClical.pyx":120
2702  * del self.instance
2703  *
2704  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
2705  * """
2706  * Compare two objects of class index_set.
2707  */
2708 
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
2714  int __pyx_t_1;
2715  int __pyx_t_2;
2716  int __pyx_t_3;
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);
2722 
2723  /* "PyClical.pyx":141
2724  * False
2725  * """
2726  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
2727  * eq = bool(lhs is rhs)
2728  * if op == 2: # ==
2729  */
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);
2734  } else {
2735  __pyx_t_3 = (__pyx_t_1 != 0);
2736  }
2737  if (__pyx_t_3) {
2738 
2739  /* "PyClical.pyx":142
2740  * """
2741  * if (lhs is None) or (rhs is None):
2742  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
2743  * if op == 2: # ==
2744  * return eq
2745  */
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;
2750  __pyx_t_4 = 0;
2751 
2752  /* "PyClical.pyx":145
2753  * if op == 2: # ==
2754  * return eq
2755  * elif op == 3: # != # <<<<<<<<<<<<<<
2756  * return not eq
2757  * else:
2758  */
2759  switch (__pyx_v_op) {
2760 
2761  /* "PyClical.pyx":143
2762  * if (lhs is None) or (rhs is None):
2763  * eq = bool(lhs is rhs)
2764  * if op == 2: # == # <<<<<<<<<<<<<<
2765  * return eq
2766  * elif op == 3: # !=
2767  */
2768  case 2:
2769 
2770  /* "PyClical.pyx":144
2771  * eq = bool(lhs is rhs)
2772  * if op == 2: # ==
2773  * return eq # <<<<<<<<<<<<<<
2774  * elif op == 3: # !=
2775  * return not eq
2776  */
2777  __Pyx_XDECREF(__pyx_r);
2778  __Pyx_INCREF(__pyx_v_eq);
2779  __pyx_r = __pyx_v_eq;
2780  goto __pyx_L0;
2781  break;
2782 
2783  /* "PyClical.pyx":145
2784  * if op == 2: # ==
2785  * return eq
2786  * elif op == 3: # != # <<<<<<<<<<<<<<
2787  * return not eq
2788  * else:
2789  */
2790  case 3:
2791 
2792  /* "PyClical.pyx":146
2793  * return eq
2794  * elif op == 3: # !=
2795  * return not eq # <<<<<<<<<<<<<<
2796  * else:
2797  * if op == 0: # <
2798  */
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;
2804  __pyx_t_4 = 0;
2805  goto __pyx_L0;
2806  break;
2807  default:
2808 
2809  /* "PyClical.pyx":148
2810  * return not eq
2811  * else:
2812  * if op == 0: # < # <<<<<<<<<<<<<<
2813  * return False
2814  * elif op == 1: # <=
2815  */
2816  __pyx_t_3 = ((__pyx_v_op == 0) != 0);
2817  if (__pyx_t_3) {
2818 
2819  /* "PyClical.pyx":149
2820  * else:
2821  * if op == 0: # <
2822  * return False # <<<<<<<<<<<<<<
2823  * elif op == 1: # <=
2824  * return eq
2825  */
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;
2830  __pyx_t_4 = 0;
2831  goto __pyx_L0;
2832  goto __pyx_L4;
2833  }
2834 
2835  /* "PyClical.pyx":150
2836  * if op == 0: # <
2837  * return False
2838  * elif op == 1: # <= # <<<<<<<<<<<<<<
2839  * return eq
2840  * elif op == 4: # >
2841  */
2842  __pyx_t_3 = ((__pyx_v_op == 1) != 0);
2843  if (__pyx_t_3) {
2844 
2845  /* "PyClical.pyx":151
2846  * return False
2847  * elif op == 1: # <=
2848  * return eq # <<<<<<<<<<<<<<
2849  * elif op == 4: # >
2850  * return False
2851  */
2852  __Pyx_XDECREF(__pyx_r);
2853  __Pyx_INCREF(__pyx_v_eq);
2854  __pyx_r = __pyx_v_eq;
2855  goto __pyx_L0;
2856  goto __pyx_L4;
2857  }
2858 
2859  /* "PyClical.pyx":152
2860  * elif op == 1: # <=
2861  * return eq
2862  * elif op == 4: # > # <<<<<<<<<<<<<<
2863  * return False
2864  * elif op == 5: # >=
2865  */
2866  __pyx_t_3 = ((__pyx_v_op == 4) != 0);
2867  if (__pyx_t_3) {
2868 
2869  /* "PyClical.pyx":153
2870  * return eq
2871  * elif op == 4: # >
2872  * return False # <<<<<<<<<<<<<<
2873  * elif op == 5: # >=
2874  * return eq
2875  */
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;
2880  __pyx_t_4 = 0;
2881  goto __pyx_L0;
2882  goto __pyx_L4;
2883  }
2884 
2885  /* "PyClical.pyx":154
2886  * elif op == 4: # >
2887  * return False
2888  * elif op == 5: # >= # <<<<<<<<<<<<<<
2889  * return eq
2890  * else:
2891  */
2892  __pyx_t_3 = ((__pyx_v_op == 5) != 0);
2893  if (__pyx_t_3) {
2894 
2895  /* "PyClical.pyx":155
2896  * return False
2897  * elif op == 5: # >=
2898  * return eq # <<<<<<<<<<<<<<
2899  * else:
2900  * return NotImplemented
2901  */
2902  __Pyx_XDECREF(__pyx_r);
2903  __Pyx_INCREF(__pyx_v_eq);
2904  __pyx_r = __pyx_v_eq;
2905  goto __pyx_L0;
2906  goto __pyx_L4;
2907  }
2908  /*else*/ {
2909 
2910  /* "PyClical.pyx":157
2911  * return eq
2912  * else:
2913  * return NotImplemented # <<<<<<<<<<<<<<
2914  * else:
2915  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
2916  */
2917  __Pyx_XDECREF(__pyx_r);
2918  __Pyx_INCREF(__pyx_builtin_NotImplemented);
2919  __pyx_r = __pyx_builtin_NotImplemented;
2920  goto __pyx_L0;
2921  }
2922  __pyx_L4:;
2923  break;
2924  }
2925  goto __pyx_L3;
2926  }
2927  /*else*/ {
2928 
2929  /* "PyClical.pyx":159
2930  * return NotImplemented
2931  * else:
2932  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
2933  * if op == 2: # ==
2934  * return eq
2935  */
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;
2940  __pyx_t_4 = 0;
2941 
2942  /* "PyClical.pyx":162
2943  * if op == 2: # ==
2944  * return eq
2945  * elif op == 3: # != # <<<<<<<<<<<<<<
2946  * return not eq
2947  * else:
2948  */
2949  switch (__pyx_v_op) {
2950 
2951  /* "PyClical.pyx":160
2952  * else:
2953  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
2954  * if op == 2: # == # <<<<<<<<<<<<<<
2955  * return eq
2956  * elif op == 3: # !=
2957  */
2958  case 2:
2959 
2960  /* "PyClical.pyx":161
2961  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
2962  * if op == 2: # ==
2963  * return eq # <<<<<<<<<<<<<<
2964  * elif op == 3: # !=
2965  * return not eq
2966  */
2967  __Pyx_XDECREF(__pyx_r);
2968  __Pyx_INCREF(__pyx_v_eq);
2969  __pyx_r = __pyx_v_eq;
2970  goto __pyx_L0;
2971  break;
2972 
2973  /* "PyClical.pyx":162
2974  * if op == 2: # ==
2975  * return eq
2976  * elif op == 3: # != # <<<<<<<<<<<<<<
2977  * return not eq
2978  * else:
2979  */
2980  case 3:
2981 
2982  /* "PyClical.pyx":163
2983  * return eq
2984  * elif op == 3: # !=
2985  * return not eq # <<<<<<<<<<<<<<
2986  * else:
2987  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
2988  */
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;
2994  __pyx_t_4 = 0;
2995  goto __pyx_L0;
2996  break;
2997  default:
2998 
2999  /* "PyClical.pyx":165
3000  * return not eq
3001  * else:
3002  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3003  * if op == 0: # <
3004  * return lt
3005  */
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;
3010  __pyx_t_4 = 0;
3011 
3012  /* "PyClical.pyx":166
3013  * else:
3014  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3015  * if op == 0: # < # <<<<<<<<<<<<<<
3016  * return lt
3017  * elif op == 1: # <=
3018  */
3019  __pyx_t_3 = ((__pyx_v_op == 0) != 0);
3020  if (__pyx_t_3) {
3021 
3022  /* "PyClical.pyx":167
3023  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3024  * if op == 0: # <
3025  * return lt # <<<<<<<<<<<<<<
3026  * elif op == 1: # <=
3027  * return lt or eq
3028  */
3029  __Pyx_XDECREF(__pyx_r);
3030  __Pyx_INCREF(__pyx_v_lt);
3031  __pyx_r = __pyx_v_lt;
3032  goto __pyx_L0;
3033  goto __pyx_L5;
3034  }
3035 
3036  /* "PyClical.pyx":168
3037  * if op == 0: # <
3038  * return lt
3039  * elif op == 1: # <= # <<<<<<<<<<<<<<
3040  * return lt or eq
3041  * elif op == 4: # >
3042  */
3043  __pyx_t_3 = ((__pyx_v_op == 1) != 0);
3044  if (__pyx_t_3) {
3045 
3046  /* "PyClical.pyx":169
3047  * return lt
3048  * elif op == 1: # <=
3049  * return lt or eq # <<<<<<<<<<<<<<
3050  * elif op == 4: # >
3051  * return not (lt or eq)
3052  */
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;}
3055  if (!__pyx_t_3) {
3056  __Pyx_INCREF(__pyx_v_eq);
3057  __pyx_t_4 = __pyx_v_eq;
3058  } else {
3059  __Pyx_INCREF(__pyx_v_lt);
3060  __pyx_t_4 = __pyx_v_lt;
3061  }
3062  __pyx_r = __pyx_t_4;
3063  __pyx_t_4 = 0;
3064  goto __pyx_L0;
3065  goto __pyx_L5;
3066  }
3067 
3068  /* "PyClical.pyx":170
3069  * elif op == 1: # <=
3070  * return lt or eq
3071  * elif op == 4: # > # <<<<<<<<<<<<<<
3072  * return not (lt or eq)
3073  * elif op == 5: # >=
3074  */
3075  __pyx_t_3 = ((__pyx_v_op == 4) != 0);
3076  if (__pyx_t_3) {
3077 
3078  /* "PyClical.pyx":171
3079  * return lt or eq
3080  * elif op == 4: # >
3081  * return not (lt or eq) # <<<<<<<<<<<<<<
3082  * elif op == 5: # >=
3083  * return not lt
3084  */
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;}
3087  if (!__pyx_t_3) {
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;
3090  } else {
3091  __pyx_t_2 = __pyx_t_3;
3092  }
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;
3096  __pyx_t_4 = 0;
3097  goto __pyx_L0;
3098  goto __pyx_L5;
3099  }
3100 
3101  /* "PyClical.pyx":172
3102  * elif op == 4: # >
3103  * return not (lt or eq)
3104  * elif op == 5: # >= # <<<<<<<<<<<<<<
3105  * return not lt
3106  * else:
3107  */
3108  __pyx_t_2 = ((__pyx_v_op == 5) != 0);
3109  if (__pyx_t_2) {
3110 
3111  /* "PyClical.pyx":173
3112  * return not (lt or eq)
3113  * elif op == 5: # >=
3114  * return not lt # <<<<<<<<<<<<<<
3115  * else:
3116  * return NotImplemented
3117  */
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;
3123  __pyx_t_4 = 0;
3124  goto __pyx_L0;
3125  goto __pyx_L5;
3126  }
3127  /*else*/ {
3128 
3129  /* "PyClical.pyx":175
3130  * return not lt
3131  * else:
3132  * return NotImplemented # <<<<<<<<<<<<<<
3133  *
3134  * def __setitem__(self, idx, val):
3135  */
3136  __Pyx_XDECREF(__pyx_r);
3137  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3138  __pyx_r = __pyx_builtin_NotImplemented;
3139  goto __pyx_L0;
3140  }
3141  __pyx_L5:;
3142  break;
3143  }
3144  }
3145  __pyx_L3:;
3146 
3147  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3148  goto __pyx_L0;
3149  __pyx_L1_error:;
3150  __Pyx_XDECREF(__pyx_t_4);
3151  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3152  __pyx_r = NULL;
3153  __pyx_L0:;
3154  __Pyx_XDECREF(__pyx_v_eq);
3155  __Pyx_XDECREF(__pyx_v_lt);
3156  __Pyx_XGIVEREF(__pyx_r);
3157  __Pyx_RefNannyFinishContext();
3158  return __pyx_r;
3159 }
3160 
3161 /* Python wrapper */
3162 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
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__;
3166 #endif
3167 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3168  int __pyx_r;
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();
3173  return __pyx_r;
3174 }
3175 
3176 /* "PyClical.pyx":177
3177  * return NotImplemented
3178  *
3179  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3180  * """
3181  * Set the value of an index_set object at index idx to value val.
3182  */
3183 
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) {
3185  int __pyx_r;
3186  __Pyx_RefNannyDeclarations
3187  int __pyx_t_1;
3188  int __pyx_t_2;
3189  IndexSet __pyx_t_3;
3190  int __pyx_lineno = 0;
3191  const char *__pyx_filename = NULL;
3192  int __pyx_clineno = 0;
3193  __Pyx_RefNannySetupContext("__setitem__", 0);
3194 
3195  /* "PyClical.pyx":186
3196  * {2}
3197  * """
3198  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3199  * return
3200  *
3201  */
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;}
3204  try {
3205  __pyx_t_3 = __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3206  } catch(...) {
3207  __Pyx_CppExn2PyErr();
3208  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3209  }
3210 
3211  /* "PyClical.pyx":187
3212  * """
3213  * self.instance.set(idx, val)
3214  * return # <<<<<<<<<<<<<<
3215  *
3216  * def __getitem__(self, idx):
3217  */
3218  __pyx_r = 0;
3219  goto __pyx_L0;
3220 
3221  __pyx_r = 0;
3222  goto __pyx_L0;
3223  __pyx_L1_error:;
3224  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3225  __pyx_r = -1;
3226  __pyx_L0:;
3227  __Pyx_RefNannyFinishContext();
3228  return __pyx_r;
3229 }
3230 
3231 /* Python wrapper */
3232 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
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__;
3236 #endif
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();
3243  return __pyx_r;
3244 }
3245 
3246 /* "PyClical.pyx":189
3247  * return
3248  *
3249  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3250  * """
3251  * Get the value of an index_set object at an index.
3252  */
3253 
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
3257  int __pyx_t_1;
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);
3263 
3264  /* "PyClical.pyx":206
3265  * False
3266  * """
3267  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
3268  *
3269  * def __contains__(self, idx):
3270  */
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;
3276  __pyx_t_2 = 0;
3277  goto __pyx_L0;
3278 
3279  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3280  goto __pyx_L0;
3281  __pyx_L1_error:;
3282  __Pyx_XDECREF(__pyx_t_2);
3283  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3284  __pyx_r = NULL;
3285  __pyx_L0:;
3286  __Pyx_XGIVEREF(__pyx_r);
3287  __Pyx_RefNannyFinishContext();
3288  return __pyx_r;
3289 }
3290 
3291 /* Python wrapper */
3292 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
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__;
3296 #endif
3297 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3298  int __pyx_r;
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();
3303  return __pyx_r;
3304 }
3305 
3306 /* "PyClical.pyx":208
3307  * return self.instance.getitem(idx)
3308  *
3309  * def __contains__(self, idx): # <<<<<<<<<<<<<<
3310  * """
3311  * Check that an index_set object contains the index idx: idx in self.
3312  */
3313 
3314 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3315  int __pyx_r;
3316  __Pyx_RefNannyDeclarations
3317  int __pyx_t_1;
3318  int __pyx_lineno = 0;
3319  const char *__pyx_filename = NULL;
3320  int __pyx_clineno = 0;
3321  __Pyx_RefNannySetupContext("__contains__", 0);
3322 
3323  /* "PyClical.pyx":225
3324  * False
3325  * """
3326  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
3327  *
3328  * def __iter__(self):
3329  */
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);
3332  goto __pyx_L0;
3333 
3334  __pyx_r = 0;
3335  goto __pyx_L0;
3336  __pyx_L1_error:;
3337  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3338  __pyx_r = -1;
3339  __pyx_L0:;
3340  __Pyx_RefNannyFinishContext();
3341  return __pyx_r;
3342 }
3343 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
3344 
3345 /* Python wrapper */
3346 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
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__;
3350 #endif
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();
3357  return __pyx_r;
3358 }
3359 
3360 /* "PyClical.pyx":227
3361  * return self.instance.getitem(idx)
3362  *
3363  * def __iter__(self): # <<<<<<<<<<<<<<
3364  * """
3365  * Iterate over the indices of an index_set.
3366  */
3367 
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();
3379  return NULL;
3380  }
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);
3385  {
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;
3390  }
3391 
3392  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3393  goto __pyx_L0;
3394  __pyx_L1_error:;
3395  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3396  __pyx_r = NULL;
3397  __pyx_L0:;
3398  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
3399  __Pyx_XGIVEREF(__pyx_r);
3400  __Pyx_RefNannyFinishContext();
3401  return __pyx_r;
3402 }
3403 
3404 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
3405 {
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 *);
3413  int __pyx_t_6;
3414  int __pyx_t_7;
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;
3423  default: /* CPython raises the right error here */
3424  __Pyx_RefNannyFinishContext();
3425  return NULL;
3426  }
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;}
3429 
3430  /* "PyClical.pyx":234
3431  * -3 4 7
3432  * """
3433  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
3434  * if idx in self:
3435  * yield idx
3436  */
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);
3456  __pyx_t_2 = 0;
3457  __pyx_t_1 = 0;
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;
3463  __pyx_t_5 = NULL;
3464  } else {
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;
3468  }
3469  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3470  for (;;) {
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;}
3475  #else
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;}
3477  #endif
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;}
3482  #else
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;}
3484  #endif
3485  } else {
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;}
3491  }
3492  break;
3493  }
3494  __Pyx_GOTREF(__pyx_t_1);
3495  }
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;
3500  __pyx_t_1 = 0;
3501 
3502  /* "PyClical.pyx":235
3503  * """
3504  * for idx in range(self.min(), self.max()+1):
3505  * if idx in self: # <<<<<<<<<<<<<<
3506  * yield idx
3507  *
3508  */
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);
3511  if (__pyx_t_7) {
3512 
3513  /* "PyClical.pyx":236
3514  * for idx in range(self.min(), self.max()+1):
3515  * if idx in self:
3516  * yield idx # <<<<<<<<<<<<<<
3517  *
3518  * def __invert__(self):
3519  */
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();
3528  /* return from generator, yielding value */
3529  __pyx_generator->resume_label = 1;
3530  return __pyx_r;
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;}
3538  goto __pyx_L6;
3539  }
3540  __pyx_L6:;
3541  }
3542  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3543  PyErr_SetNone(PyExc_StopIteration);
3544  goto __pyx_L0;
3545  __pyx_L1_error:;
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);
3550  __pyx_L0:;
3551  __Pyx_XDECREF(__pyx_r);
3552  __pyx_generator->resume_label = -1;
3553  __Pyx_Generator_clear((PyObject*)__pyx_generator);
3554  __Pyx_RefNannyFinishContext();
3555  return NULL;
3556 }
3557 
3558 /* Python wrapper */
3559 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
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__;
3563 #endif
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();
3570  return __pyx_r;
3571 }
3572 
3573 /* "PyClical.pyx":238
3574  * yield idx
3575  *
3576  * def __invert__(self): # <<<<<<<<<<<<<<
3577  * """
3578  * Set complement: not.
3579  */
3580 
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);
3590 
3591  /* "PyClical.pyx":245
3592  * {-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}
3593  * """
3594  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
3595  *
3596  * def __xor__(lhs, rhs):
3597  */
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;
3605  __pyx_t_2 = 0;
3606  goto __pyx_L0;
3607 
3608  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3609  goto __pyx_L0;
3610  __pyx_L1_error:;
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);
3614  __pyx_r = NULL;
3615  __pyx_L0:;
3616  __Pyx_XGIVEREF(__pyx_r);
3617  __Pyx_RefNannyFinishContext();
3618  return __pyx_r;
3619 }
3620 
3621 /* Python wrapper */
3622 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
3626 #endif
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();
3633  return __pyx_r;
3634 }
3635 
3636 /* "PyClical.pyx":247
3637  * return index_set().wrap( self.instance.invert() )
3638  *
3639  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
3640  * """
3641  * Symmetric set difference: exclusive or.
3642  */
3643 
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);
3653 
3654  /* "PyClical.pyx":256
3655  * {1}
3656  * """
3657  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3658  *
3659  * def __ixor__(self, rhs):
3660  */
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;
3668  __pyx_t_2 = 0;
3669  goto __pyx_L0;
3670 
3671  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3672  goto __pyx_L0;
3673  __pyx_L1_error:;
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);
3677  __pyx_r = NULL;
3678  __pyx_L0:;
3679  __Pyx_XGIVEREF(__pyx_r);
3680  __Pyx_RefNannyFinishContext();
3681  return __pyx_r;
3682 }
3683 
3684 /* Python wrapper */
3685 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
3689 #endif
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();
3696  return __pyx_r;
3697 }
3698 
3699 /* "PyClical.pyx":258
3700  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
3701  *
3702  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
3703  * """
3704  * Symmetric set difference: exclusive or.
3705  */
3706 
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);
3715 
3716  /* "PyClical.pyx":267
3717  * {1}
3718  * """
3719  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3720  *
3721  * def __and__(lhs, rhs):
3722  */
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;
3727  __pyx_t_1 = 0;
3728  goto __pyx_L0;
3729 
3730  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3731  goto __pyx_L0;
3732  __pyx_L1_error:;
3733  __Pyx_XDECREF(__pyx_t_1);
3734  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3735  __pyx_r = NULL;
3736  __pyx_L0:;
3737  __Pyx_XGIVEREF(__pyx_r);
3738  __Pyx_RefNannyFinishContext();
3739  return __pyx_r;
3740 }
3741 
3742 /* Python wrapper */
3743 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
3747 #endif
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();
3754  return __pyx_r;
3755 }
3756 
3757 /* "PyClical.pyx":269
3758  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
3759  *
3760  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
3761  * """
3762  * Set intersection: and.
3763  */
3764 
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);
3774 
3775  /* "PyClical.pyx":278
3776  * {2}
3777  * """
3778  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3779  *
3780  * def __iand__(self, rhs):
3781  */
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;
3789  __pyx_t_2 = 0;
3790  goto __pyx_L0;
3791 
3792  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3793  goto __pyx_L0;
3794  __pyx_L1_error:;
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);
3798  __pyx_r = NULL;
3799  __pyx_L0:;
3800  __Pyx_XGIVEREF(__pyx_r);
3801  __Pyx_RefNannyFinishContext();
3802  return __pyx_r;
3803 }
3804 
3805 /* Python wrapper */
3806 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
3810 #endif
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();
3817  return __pyx_r;
3818 }
3819 
3820 /* "PyClical.pyx":280
3821  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
3822  *
3823  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
3824  * """
3825  * Set intersection: and.
3826  */
3827 
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);
3836 
3837  /* "PyClical.pyx":289
3838  * {2}
3839  * """
3840  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3841  *
3842  * def __or__(lhs, rhs):
3843  */
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;
3848  __pyx_t_1 = 0;
3849  goto __pyx_L0;
3850 
3851  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3852  goto __pyx_L0;
3853  __pyx_L1_error:;
3854  __Pyx_XDECREF(__pyx_t_1);
3855  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3856  __pyx_r = NULL;
3857  __pyx_L0:;
3858  __Pyx_XGIVEREF(__pyx_r);
3859  __Pyx_RefNannyFinishContext();
3860  return __pyx_r;
3861 }
3862 
3863 /* Python wrapper */
3864 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
3868 #endif
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();
3875  return __pyx_r;
3876 }
3877 
3878 /* "PyClical.pyx":291
3879  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
3880  *
3881  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
3882  * """
3883  * Set union: or.
3884  */
3885 
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);
3895 
3896  /* "PyClical.pyx":300
3897  * {1,2}
3898  * """
3899  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3900  *
3901  * def __ior__(self, rhs):
3902  */
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;
3910  __pyx_t_2 = 0;
3911  goto __pyx_L0;
3912 
3913  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3914  goto __pyx_L0;
3915  __pyx_L1_error:;
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);
3919  __pyx_r = NULL;
3920  __pyx_L0:;
3921  __Pyx_XGIVEREF(__pyx_r);
3922  __Pyx_RefNannyFinishContext();
3923  return __pyx_r;
3924 }
3925 
3926 /* Python wrapper */
3927 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
3931 #endif
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();
3938  return __pyx_r;
3939 }
3940 
3941 /* "PyClical.pyx":302
3942  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
3943  *
3944  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
3945  * """
3946  * Set union: or.
3947  */
3948 
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);
3957 
3958  /* "PyClical.pyx":311
3959  * {1,2}
3960  * """
3961  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3962  *
3963  * def count(self):
3964  */
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;
3969  __pyx_t_1 = 0;
3970  goto __pyx_L0;
3971 
3972  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3973  goto __pyx_L0;
3974  __pyx_L1_error:;
3975  __Pyx_XDECREF(__pyx_t_1);
3976  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3977  __pyx_r = NULL;
3978  __pyx_L0:;
3979  __Pyx_XGIVEREF(__pyx_r);
3980  __Pyx_RefNannyFinishContext();
3981  return __pyx_r;
3982 }
3983 
3984 /* Python wrapper */
3985 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
3993  return __pyx_r;
3994 }
3995 
3996 /* "PyClical.pyx":313
3997  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
3998  *
3999  * def count(self): # <<<<<<<<<<<<<<
4000  * """
4001  * Cardinality: Number of indices included in set.
4002  */
4003 
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);
4012 
4013  /* "PyClical.pyx":320
4014  * 3
4015  * """
4016  * return self.instance.count() # <<<<<<<<<<<<<<
4017  *
4018  * def count_neg(self):
4019  */
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;
4024  __pyx_t_1 = 0;
4025  goto __pyx_L0;
4026 
4027  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4028  goto __pyx_L0;
4029  __pyx_L1_error:;
4030  __Pyx_XDECREF(__pyx_t_1);
4031  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4032  __pyx_r = NULL;
4033  __pyx_L0:;
4034  __Pyx_XGIVEREF(__pyx_r);
4035  __Pyx_RefNannyFinishContext();
4036  return __pyx_r;
4037 }
4038 
4039 /* Python wrapper */
4040 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
4048  return __pyx_r;
4049 }
4050 
4051 /* "PyClical.pyx":322
4052  * return self.instance.count()
4053  *
4054  * def count_neg(self): # <<<<<<<<<<<<<<
4055  * """
4056  * Number of negative indices included in set.
4057  */
4058 
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);
4067 
4068  /* "PyClical.pyx":329
4069  * 1
4070  * """
4071  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4072  *
4073  * def count_pos(self):
4074  */
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;
4079  __pyx_t_1 = 0;
4080  goto __pyx_L0;
4081 
4082  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4083  goto __pyx_L0;
4084  __pyx_L1_error:;
4085  __Pyx_XDECREF(__pyx_t_1);
4086  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4087  __pyx_r = NULL;
4088  __pyx_L0:;
4089  __Pyx_XGIVEREF(__pyx_r);
4090  __Pyx_RefNannyFinishContext();
4091  return __pyx_r;
4092 }
4093 
4094 /* Python wrapper */
4095 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
4103  return __pyx_r;
4104 }
4105 
4106 /* "PyClical.pyx":331
4107  * return self.instance.count_neg()
4108  *
4109  * def count_pos(self): # <<<<<<<<<<<<<<
4110  * """
4111  * Number of positive indices included in set.
4112  */
4113 
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);
4122 
4123  /* "PyClical.pyx":338
4124  * 2
4125  * """
4126  * return self.instance.count_pos() # <<<<<<<<<<<<<<
4127  *
4128  * def min(self):
4129  */
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;
4134  __pyx_t_1 = 0;
4135  goto __pyx_L0;
4136 
4137  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4138  goto __pyx_L0;
4139  __pyx_L1_error:;
4140  __Pyx_XDECREF(__pyx_t_1);
4141  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4142  __pyx_r = NULL;
4143  __pyx_L0:;
4144  __Pyx_XGIVEREF(__pyx_r);
4145  __Pyx_RefNannyFinishContext();
4146  return __pyx_r;
4147 }
4148 
4149 /* Python wrapper */
4150 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
4158  return __pyx_r;
4159 }
4160 
4161 /* "PyClical.pyx":340
4162  * return self.instance.count_pos()
4163  *
4164  * def min(self): # <<<<<<<<<<<<<<
4165  * """
4166  * Minimum member.
4167  */
4168 
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);
4177 
4178  /* "PyClical.pyx":347
4179  * -1
4180  * """
4181  * return self.instance.min() # <<<<<<<<<<<<<<
4182  *
4183  * def max(self):
4184  */
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;
4189  __pyx_t_1 = 0;
4190  goto __pyx_L0;
4191 
4192  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4193  goto __pyx_L0;
4194  __pyx_L1_error:;
4195  __Pyx_XDECREF(__pyx_t_1);
4196  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
4197  __pyx_r = NULL;
4198  __pyx_L0:;
4199  __Pyx_XGIVEREF(__pyx_r);
4200  __Pyx_RefNannyFinishContext();
4201  return __pyx_r;
4202 }
4203 
4204 /* Python wrapper */
4205 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
4213  return __pyx_r;
4214 }
4215 
4216 /* "PyClical.pyx":349
4217  * return self.instance.min()
4218  *
4219  * def max(self): # <<<<<<<<<<<<<<
4220  * """
4221  * Maximum member.
4222  */
4223 
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);
4232 
4233  /* "PyClical.pyx":356
4234  * 2
4235  * """
4236  * return self.instance.max() # <<<<<<<<<<<<<<
4237  *
4238  * def hash_fn(self):
4239  */
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;
4244  __pyx_t_1 = 0;
4245  goto __pyx_L0;
4246 
4247  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4248  goto __pyx_L0;
4249  __pyx_L1_error:;
4250  __Pyx_XDECREF(__pyx_t_1);
4251  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
4252  __pyx_r = NULL;
4253  __pyx_L0:;
4254  __Pyx_XGIVEREF(__pyx_r);
4255  __Pyx_RefNannyFinishContext();
4256  return __pyx_r;
4257 }
4258 
4259 /* Python wrapper */
4260 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
4268  return __pyx_r;
4269 }
4270 
4271 /* "PyClical.pyx":358
4272  * return self.instance.max()
4273  *
4274  * def hash_fn(self): # <<<<<<<<<<<<<<
4275  * """
4276  * Hash function.
4277  */
4278 
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);
4287 
4288  /* "PyClical.pyx":362
4289  * Hash function.
4290  * """
4291  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
4292  *
4293  * def sign_of_mult(self, rhs):
4294  */
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;
4299  __pyx_t_1 = 0;
4300  goto __pyx_L0;
4301 
4302  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4303  goto __pyx_L0;
4304  __pyx_L1_error:;
4305  __Pyx_XDECREF(__pyx_t_1);
4306  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
4307  __pyx_r = NULL;
4308  __pyx_L0:;
4309  __Pyx_XGIVEREF(__pyx_r);
4310  __Pyx_RefNannyFinishContext();
4311  return __pyx_r;
4312 }
4313 
4314 /* Python wrapper */
4315 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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();
4323  return __pyx_r;
4324 }
4325 
4326 /* "PyClical.pyx":364
4327  * return self.instance.hash_fn()
4328  *
4329  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
4330  * """
4331  * Sign of geometric product of two Clifford basis elements.
4332  */
4333 
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);
4342 
4343  /* "PyClical.pyx":371
4344  * 1
4345  * """
4346  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
4347  *
4348  * def sign_of_square(self):
4349  */
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;
4354  __pyx_t_1 = 0;
4355  goto __pyx_L0;
4356 
4357  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4358  goto __pyx_L0;
4359  __pyx_L1_error:;
4360  __Pyx_XDECREF(__pyx_t_1);
4361  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
4362  __pyx_r = NULL;
4363  __pyx_L0:;
4364  __Pyx_XGIVEREF(__pyx_r);
4365  __Pyx_RefNannyFinishContext();
4366  return __pyx_r;
4367 }
4368 
4369 /* Python wrapper */
4370 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
4378  return __pyx_r;
4379 }
4380 
4381 /* "PyClical.pyx":373
4382  * return self.instance.sign_of_mult(toIndexSet(rhs))
4383  *
4384  * def sign_of_square(self): # <<<<<<<<<<<<<<
4385  * """
4386  * Sign of geometric square of a Clifford basis element.
4387  */
4388 
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);
4397 
4398  /* "PyClical.pyx":380
4399  * -1
4400  * """
4401  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
4402  *
4403  * def __repr__(self):
4404  */
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;
4409  __pyx_t_1 = 0;
4410  goto __pyx_L0;
4411 
4412  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4413  goto __pyx_L0;
4414  __pyx_L1_error:;
4415  __Pyx_XDECREF(__pyx_t_1);
4416  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
4417  __pyx_r = NULL;
4418  __pyx_L0:;
4419  __Pyx_XGIVEREF(__pyx_r);
4420  __Pyx_RefNannyFinishContext();
4421  return __pyx_r;
4422 }
4423 
4424 /* Python wrapper */
4425 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
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__;
4429 #endif
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();
4436  return __pyx_r;
4437 }
4438 
4439 /* "PyClical.pyx":382
4440  * return self.instance.sign_of_square()
4441  *
4442  * def __repr__(self): # <<<<<<<<<<<<<<
4443  * """
4444  * The official string representation of self.
4445  */
4446 
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);
4455 
4456  /* "PyClical.pyx":391
4457  * 'index_set({1,2})'
4458  * """
4459  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
4460  *
4461  * def __str__(self):
4462  */
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);
4467  __pyx_t_1 = 0;
4468  goto __pyx_L0;
4469 
4470  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4471  goto __pyx_L0;
4472  __pyx_L1_error:;
4473  __Pyx_XDECREF(__pyx_t_1);
4474  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4475  __pyx_r = NULL;
4476  __pyx_L0:;
4477  __Pyx_XGIVEREF(__pyx_r);
4478  __Pyx_RefNannyFinishContext();
4479  return __pyx_r;
4480 }
4481 
4482 /* Python wrapper */
4483 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
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__;
4487 #endif
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();
4494  return __pyx_r;
4495 }
4496 
4497 /* "PyClical.pyx":393
4498  * return index_set_to_repr( self.unwrap() ).c_str()
4499  *
4500  * def __str__(self): # <<<<<<<<<<<<<<
4501  * """
4502  * The informal string representation of self.
4503  */
4504 
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);
4513 
4514  /* "PyClical.pyx":402
4515  * '{1,2}'
4516  * """
4517  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
4518  *
4519  * def index_set_hidden_doctests():
4520  */
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);
4525  __pyx_t_1 = 0;
4526  goto __pyx_L0;
4527 
4528  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4529  goto __pyx_L0;
4530  __pyx_L1_error:;
4531  __Pyx_XDECREF(__pyx_t_1);
4532  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4533  __pyx_r = NULL;
4534  __pyx_L0:;
4535  __Pyx_XGIVEREF(__pyx_r);
4536  __Pyx_RefNannyFinishContext();
4537  return __pyx_r;
4538 }
4539 
4540 /* Python wrapper */
4541 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
4550  return __pyx_r;
4551  }
4552 
4553  /* "PyClical.pyx":404
4554  * return index_set_to_str( self.unwrap() ).c_str()
4555  *
4556  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
4557  * """
4558  * Tests for functions that Doctest cannot see.
4559  */
4560 
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);
4565 
4566  /* "PyClical.pyx":488
4567  * False
4568  * """
4569  * return # <<<<<<<<<<<<<<
4570  *
4571  * cpdef inline compare(lhs,rhs):
4572  */
4573  __Pyx_XDECREF(__pyx_r);
4574  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4575  goto __pyx_L0;
4576 
4577  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4578  __pyx_L0:;
4579  __Pyx_XGIVEREF(__pyx_r);
4580  __Pyx_RefNannyFinishContext();
4581  return __pyx_r;
4582  }
4583 
4584  /* "PyClical.pyx":490
4585  * return
4586  *
4587  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
4588  * """
4589  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
4590  */
4591 
4592  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
4601 
4602  /* "PyClical.pyx":500
4603  * 1
4604  * """
4605  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4606  *
4607  * cpdef inline min_neg(obj):
4608  */
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;
4613  __pyx_t_1 = 0;
4614  goto __pyx_L0;
4615 
4616  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4617  goto __pyx_L0;
4618  __pyx_L1_error:;
4619  __Pyx_XDECREF(__pyx_t_1);
4620  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4621  __pyx_r = 0;
4622  __pyx_L0:;
4623  __Pyx_XGIVEREF(__pyx_r);
4624  __Pyx_RefNannyFinishContext();
4625  return __pyx_r;
4626  }
4627 
4628  /* Python wrapper */
4629  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
4640  {
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)) {
4644  Py_ssize_t kw_args;
4645  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4646  switch (pos_args) {
4647  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4648  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4649  case 0: break;
4650  default: goto __pyx_L5_argtuple_error;
4651  }
4652  kw_args = PyDict_Size(__pyx_kwds);
4653  switch (pos_args) {
4654  case 0:
4655  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs)) != 0)) kw_args--;
4656  else goto __pyx_L5_argtuple_error;
4657  case 1:
4658  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rhs)) != 0)) kw_args--;
4659  else {
4660  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4661  }
4662  }
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;}
4665  }
4666  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
4667  goto __pyx_L5_argtuple_error;
4668  } else {
4669  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4670  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4671  }
4672  __pyx_v_lhs = values[0];
4673  __pyx_v_rhs = values[1];
4674  }
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;}
4678  __pyx_L3_error:;
4679  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4680  __Pyx_RefNannyFinishContext();
4681  return NULL;
4682  __pyx_L4_argument_unpacking_done:;
4683  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
4684  __Pyx_RefNannyFinishContext();
4685  return __pyx_r;
4686  }
4687 
4688  /* "PyClical.pyx":490
4689  * return
4690  *
4691  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
4692  * """
4693  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
4694  */
4695 
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;
4708  __pyx_t_1 = 0;
4709  goto __pyx_L0;
4710 
4711  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4712  goto __pyx_L0;
4713  __pyx_L1_error:;
4714  __Pyx_XDECREF(__pyx_t_1);
4715  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4716  __pyx_r = NULL;
4717  __pyx_L0:;
4718  __Pyx_XGIVEREF(__pyx_r);
4719  __Pyx_RefNannyFinishContext();
4720  return __pyx_r;
4721  }
4722 
4723  /* "PyClical.pyx":502
4724  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
4725  *
4726  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
4727  * """
4728  * Minimum negative index, or 0 if none.
4729  */
4730 
4731  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
4740 
4741  /* "PyClical.pyx":509
4742  * 0
4743  * """
4744  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
4745  *
4746  * cpdef inline max_pos(obj):
4747  */
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;
4752  __pyx_t_1 = 0;
4753  goto __pyx_L0;
4754 
4755  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4756  goto __pyx_L0;
4757  __pyx_L1_error:;
4758  __Pyx_XDECREF(__pyx_t_1);
4759  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4760  __pyx_r = 0;
4761  __pyx_L0:;
4762  __Pyx_XGIVEREF(__pyx_r);
4763  __Pyx_RefNannyFinishContext();
4764  return __pyx_r;
4765  }
4766 
4767  /* Python wrapper */
4768  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
4776  return __pyx_r;
4777  }
4778 
4779  /* "PyClical.pyx":502
4780  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
4781  *
4782  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
4783  * """
4784  * Minimum negative index, or 0 if none.
4785  */
4786 
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;
4799  __pyx_t_1 = 0;
4800  goto __pyx_L0;
4801 
4802  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4803  goto __pyx_L0;
4804  __pyx_L1_error:;
4805  __Pyx_XDECREF(__pyx_t_1);
4806  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4807  __pyx_r = NULL;
4808  __pyx_L0:;
4809  __Pyx_XGIVEREF(__pyx_r);
4810  __Pyx_RefNannyFinishContext();
4811  return __pyx_r;
4812  }
4813 
4814  /* "PyClical.pyx":511
4815  * return glucat.min_neg( toIndexSet(obj) )
4816  *
4817  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
4818  * """
4819  * Maximum positive index, or 0 if none.
4820  */
4821 
4822  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
4831 
4832  /* "PyClical.pyx":518
4833  * 2
4834  * """
4835  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
4836  *
4837  * cdef inline vector[scalar_t] list_to_vector(lst):
4838  */
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;
4843  __pyx_t_1 = 0;
4844  goto __pyx_L0;
4845 
4846  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4847  goto __pyx_L0;
4848  __pyx_L1_error:;
4849  __Pyx_XDECREF(__pyx_t_1);
4850  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4851  __pyx_r = 0;
4852  __pyx_L0:;
4853  __Pyx_XGIVEREF(__pyx_r);
4854  __Pyx_RefNannyFinishContext();
4855  return __pyx_r;
4856  }
4857 
4858  /* Python wrapper */
4859  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
4867  return __pyx_r;
4868  }
4869 
4870  /* "PyClical.pyx":511
4871  * return glucat.min_neg( toIndexSet(obj) )
4872  *
4873  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
4874  * """
4875  * Maximum positive index, or 0 if none.
4876  */
4877 
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;
4890  __pyx_t_1 = 0;
4891  goto __pyx_L0;
4892 
4893  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4894  goto __pyx_L0;
4895  __pyx_L1_error:;
4896  __Pyx_XDECREF(__pyx_t_1);
4897  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4898  __pyx_r = NULL;
4899  __pyx_L0:;
4900  __Pyx_XGIVEREF(__pyx_r);
4901  __Pyx_RefNannyFinishContext();
4902  return __pyx_r;
4903  }
4904 
4905  /* "PyClical.pyx":520
4906  * return glucat.max_pos( toIndexSet(obj) )
4907  *
4908  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
4909  * """
4910  * Create a C++ std:vector[scalar_t] from an iterable Python object.
4911  */
4912 
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;
4922  scalar_t __pyx_t_5;
4923  int __pyx_lineno = 0;
4924  const char *__pyx_filename = NULL;
4925  int __pyx_clineno = 0;
4926  __Pyx_RefNannySetupContext("list_to_vector", 0);
4927 
4928  /* "PyClical.pyx":525
4929  * """
4930  * cdef vector[scalar_t] v
4931  * for s in lst: # <<<<<<<<<<<<<<
4932  * v.push_back(<scalar_t>s)
4933  * return v
4934  */
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;
4937  __pyx_t_3 = NULL;
4938  } else {
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;
4942  }
4943  for (;;) {
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;}
4948  #else
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;}
4950  #endif
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;}
4955  #else
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;}
4957  #endif
4958  } else {
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;}
4964  }
4965  break;
4966  }
4967  __Pyx_GOTREF(__pyx_t_4);
4968  }
4969  __Pyx_XDECREF(__pyx_v_s);
4970  __pyx_v_s = __pyx_t_4;
4971  __pyx_t_4 = 0;
4972 
4973  /* "PyClical.pyx":526
4974  * cdef vector[scalar_t] v
4975  * for s in lst:
4976  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
4977  * return v
4978  *
4979  */
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));
4982  }
4983  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4984 
4985  /* "PyClical.pyx":527
4986  * for s in lst:
4987  * v.push_back(<scalar_t>s)
4988  * return v # <<<<<<<<<<<<<<
4989  *
4990  * # Forward reference.
4991  */
4992  __pyx_r = __pyx_v_v;
4993  goto __pyx_L0;
4994 
4995  goto __pyx_L0;
4996  __pyx_L1_error:;
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);
5000  __pyx_L0:;
5001  __Pyx_XDECREF(__pyx_v_s);
5002  __Pyx_RefNannyFinishContext();
5003  return __pyx_r;
5004  }
5005 
5006  /* "PyClical.pyx":532
5007  * cdef class clifford
5008  *
5009  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
5010  * return clifford(obj).instance[0]
5011  *
5012  */
5013 
5014  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
5015  Clifford __pyx_r;
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);
5023 
5024  /* "PyClical.pyx":533
5025  *
5026  * cdef inline Clifford toClifford(obj):
5027  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
5028  *
5029  * cdef class clifford:
5030  */
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;
5041  goto __pyx_L0;
5042 
5043  goto __pyx_L0;
5044  __pyx_L1_error:;
5045  __Pyx_XDECREF(__pyx_t_1);
5046  __Pyx_XDECREF(__pyx_t_2);
5047  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
5048  __pyx_L0:;
5049  __Pyx_RefNannyFinishContext();
5050  return __pyx_r;
5051  }
5052 
5053  /* "PyClical.pyx":541
5054  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
5055  *
5056  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
5057  * """
5058  * Wrap an instance of the C++ class Clifford.
5059  */
5060 
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);
5065 
5066  /* "PyClical.pyx":545
5067  * Wrap an instance of the C++ class Clifford.
5068  * """
5069  * self.instance[0] = other # <<<<<<<<<<<<<<
5070  * return self
5071  *
5072  */
5073  (__pyx_v_self->instance[0]) = __pyx_v_other;
5074 
5075  /* "PyClical.pyx":546
5076  * """
5077  * self.instance[0] = other
5078  * return self # <<<<<<<<<<<<<<
5079  *
5080  * cdef inline Clifford unwrap(clifford self):
5081  */
5082  __Pyx_XDECREF(__pyx_r);
5083  __Pyx_INCREF(((PyObject *)__pyx_v_self));
5084  __pyx_r = ((PyObject *)__pyx_v_self);
5085  goto __pyx_L0;
5086 
5087  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5088  __pyx_L0:;
5089  __Pyx_XGIVEREF(__pyx_r);
5090  __Pyx_RefNannyFinishContext();
5091  return __pyx_r;
5092  }
5093 
5094  /* "PyClical.pyx":548
5095  * return self
5096  *
5097  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
5098  * """
5099  * Return the wrapped C++ Clifford instance.
5100  */
5101 
5102  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5103  Clifford __pyx_r;
5104  __Pyx_RefNannyDeclarations
5105  __Pyx_RefNannySetupContext("unwrap", 0);
5106 
5107  /* "PyClical.pyx":552
5108  * Return the wrapped C++ Clifford instance.
5109  * """
5110  * return self.instance[0] # <<<<<<<<<<<<<<
5111  *
5112  * cpdef copy(clifford self):
5113  */
5114  __pyx_r = (__pyx_v_self->instance[0]);
5115  goto __pyx_L0;
5116 
5117  __pyx_L0:;
5118  __Pyx_RefNannyFinishContext();
5119  return __pyx_r;
5120  }
5121 
5122  /* "PyClical.pyx":554
5123  * return self.instance[0]
5124  *
5125  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
5126  * """
5127  * Copy this clifford object.
5128  */
5129 
5130  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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);
5140  /* Check if called by wrapper */
5141  if (unlikely(__pyx_skip_dispatch)) ;
5142  /* Check if overridden in Python */
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;
5151  __pyx_t_2 = 0;
5152  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5153  goto __pyx_L0;
5154  }
5155  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5156  }
5157 
5158  /* "PyClical.pyx":561
5159  * {2}
5160  * """
5161  * return clifford(self) # <<<<<<<<<<<<<<
5162  *
5163  * def __cinit__(self, other = 0, ixt = None):
5164  */
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;
5175  __pyx_t_2 = 0;
5176  goto __pyx_L0;
5177 
5178  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5179  goto __pyx_L0;
5180  __pyx_L1_error:;
5181  __Pyx_XDECREF(__pyx_t_1);
5182  __Pyx_XDECREF(__pyx_t_2);
5183  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5184  __pyx_r = 0;
5185  __pyx_L0:;
5186  __Pyx_XGIVEREF(__pyx_r);
5187  __Pyx_RefNannyFinishContext();
5188  return __pyx_r;
5189  }
5190 
5191  /* Python wrapper */
5192  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
5200  return __pyx_r;
5201  }
5202 
5203  /* "PyClical.pyx":554
5204  * return self.instance[0]
5205  *
5206  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
5207  * """
5208  * Copy this clifford object.
5209  */
5210 
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;
5223  __pyx_t_1 = 0;
5224  goto __pyx_L0;
5225 
5226  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5227  goto __pyx_L0;
5228  __pyx_L1_error:;
5229  __Pyx_XDECREF(__pyx_t_1);
5230  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5231  __pyx_r = NULL;
5232  __pyx_L0:;
5233  __Pyx_XGIVEREF(__pyx_r);
5234  __Pyx_RefNannyFinishContext();
5235  return __pyx_r;
5236  }
5237 
5238  /* Python wrapper */
5239  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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;
5246  int __pyx_r;
5247  __Pyx_RefNannyDeclarations
5248  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
5249  {
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);
5253 
5254  /* "PyClical.pyx":563
5255  * return clifford(self)
5256  *
5257  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
5258  * """
5259  * Construct an object of type clifford.
5260  */
5261  values[1] = ((PyObject *)Py_None);
5262  if (unlikely(__pyx_kwds)) {
5263  Py_ssize_t kw_args;
5264  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5265  switch (pos_args) {
5266  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5267  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5268  case 0: break;
5269  default: goto __pyx_L5_argtuple_error;
5270  }
5271  kw_args = PyDict_Size(__pyx_kwds);
5272  switch (pos_args) {
5273  case 0:
5274  if (kw_args > 0) {
5275  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other);
5276  if (value) { values[0] = value; kw_args--; }
5277  }
5278  case 1:
5279  if (kw_args > 0) {
5280  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ixt);
5281  if (value) { values[1] = value; kw_args--; }
5282  }
5283  }
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;}
5286  }
5287  } else {
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);
5291  case 0: break;
5292  default: goto __pyx_L5_argtuple_error;
5293  }
5294  }
5295  __pyx_v_other = values[0];
5296  __pyx_v_ixt = values[1];
5297  }
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;}
5301  __pyx_L3_error:;
5302  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5303  __Pyx_RefNannyFinishContext();
5304  return -1;
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();
5308  return __pyx_r;
5309  }
5310 
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;
5314  int __pyx_r;
5315  __Pyx_RefNannyDeclarations
5316  int __pyx_t_1;
5317  int __pyx_t_2;
5318  PyObject *__pyx_t_3 = NULL;
5319  PyObject *__pyx_t_4 = NULL;
5320  PyObject *__pyx_t_5 = NULL;
5321  Clifford *__pyx_t_6;
5322  PyObject *__pyx_t_7 = NULL;
5323  PyObject *__pyx_t_8 = NULL;
5324  scalar_t __pyx_t_9;
5325  PyObject *__pyx_t_10 = NULL;
5326  PyObject *__pyx_t_11 = NULL;
5327  PyObject *__pyx_t_12 = NULL;
5328  char *__pyx_t_13;
5329  int __pyx_t_14;
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);
5338 
5339  /* "PyClical.pyx":588
5340  * 2{1}+3{2}
5341  * """
5342  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
5343  * if ixt is None:
5344  * try:
5345  */
5346  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
5347  __pyx_v_error_msg_prefix = ((PyObject *)__pyx_kp_s_6);
5348 
5349  /* "PyClical.pyx":589
5350  * """
5351  * error_msg_prefix = "Cannot initialize clifford object from"
5352  * if ixt is None: # <<<<<<<<<<<<<<
5353  * try:
5354  * if isinstance(other, clifford):
5355  */
5356  __pyx_t_1 = (__pyx_v_ixt == Py_None);
5357  __pyx_t_2 = (__pyx_t_1 != 0);
5358  if (__pyx_t_2) {
5359 
5360  /* "PyClical.pyx":590
5361  * error_msg_prefix = "Cannot initialize clifford object from"
5362  * if ixt is None:
5363  * try: # <<<<<<<<<<<<<<
5364  * if isinstance(other, clifford):
5365  * self.instance = new Clifford((<clifford>other).unwrap())
5366  */
5367  {
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);
5372  /*try:*/ {
5373 
5374  /* "PyClical.pyx":591
5375  * if ixt is None:
5376  * try:
5377  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
5378  * self.instance = new Clifford((<clifford>other).unwrap())
5379  * elif isinstance(other, index_set):
5380  */
5381  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_clifford));
5382  __pyx_t_1 = (__pyx_t_2 != 0);
5383  if (__pyx_t_1) {
5384 
5385  /* "PyClical.pyx":592
5386  * try:
5387  * if isinstance(other, clifford):
5388  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
5389  * elif isinstance(other, index_set):
5390  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
5391  */
5392  try {
5393  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
5394  } catch(...) {
5395  __Pyx_CppExn2PyErr();
5396  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5397  }
5398  __pyx_v_self->instance = __pyx_t_6;
5399  goto __pyx_L12;
5400  }
5401 
5402  /* "PyClical.pyx":593
5403  * if isinstance(other, clifford):
5404  * self.instance = new Clifford((<clifford>other).unwrap())
5405  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
5406  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
5407  * elif isinstance(other, numbers.Real):
5408  */
5409  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_index_set));
5410  __pyx_t_2 = (__pyx_t_1 != 0);
5411  if (__pyx_t_2) {
5412 
5413  /* "PyClical.pyx":594
5414  * self.instance = new Clifford((<clifford>other).unwrap())
5415  * elif isinstance(other, index_set):
5416  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
5417  * elif isinstance(other, numbers.Real):
5418  * self.instance = new Clifford(<scalar_t>other)
5419  */
5420  try {
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));
5422  } catch(...) {
5423  __Pyx_CppExn2PyErr();
5424  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5425  }
5426  __pyx_v_self->instance = __pyx_t_6;
5427  goto __pyx_L12;
5428  }
5429 
5430  /* "PyClical.pyx":595
5431  * elif isinstance(other, index_set):
5432  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
5433  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
5434  * self.instance = new Clifford(<scalar_t>other)
5435  * elif isinstance(other, str):
5436  */
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);
5445  if (__pyx_t_1) {
5446 
5447  /* "PyClical.pyx":596
5448  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
5449  * elif isinstance(other, numbers.Real):
5450  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
5451  * elif isinstance(other, str):
5452  * try:
5453  */
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;}
5455  try {
5456  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
5457  } catch(...) {
5458  __Pyx_CppExn2PyErr();
5459  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5460  }
5461  __pyx_v_self->instance = __pyx_t_6;
5462  goto __pyx_L12;
5463  }
5464 
5465  /* "PyClical.pyx":597
5466  * elif isinstance(other, numbers.Real):
5467  * self.instance = new Clifford(<scalar_t>other)
5468  * elif isinstance(other, str): # <<<<<<<<<<<<<<
5469  * try:
5470  * self.instance = new Clifford(<char *>other)
5471  */
5472  __pyx_t_1 = PyString_Check(__pyx_v_other);
5473  __pyx_t_2 = (__pyx_t_1 != 0);
5474  if (__pyx_t_2) {
5475 
5476  /* "PyClical.pyx":598
5477  * self.instance = new Clifford(<scalar_t>other)
5478  * elif isinstance(other, str):
5479  * try: # <<<<<<<<<<<<<<
5480  * self.instance = new Clifford(<char *>other)
5481  * except RuntimeError:
5482  */
5483  {
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);
5488  /*try:*/ {
5489 
5490  /* "PyClical.pyx":599
5491  * elif isinstance(other, str):
5492  * try:
5493  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
5494  * except RuntimeError:
5495  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
5496  */
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;}
5498  try {
5499  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
5500  } catch(...) {
5501  __Pyx_CppExn2PyErr();
5502  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
5503  }
5504  __pyx_v_self->instance = __pyx_t_6;
5505  }
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;
5510  __pyx_L13_error:;
5511  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5512  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5513 
5514  /* "PyClical.pyx":600
5515  * try:
5516  * self.instance = new Clifford(<char *>other)
5517  * except RuntimeError: # <<<<<<<<<<<<<<
5518  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
5519  * else:
5520  */
5521  __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
5522  if (__pyx_t_14) {
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);
5528 
5529  /* "PyClical.pyx":601
5530  * self.instance = new Clifford(<char *>other)
5531  * except RuntimeError:
5532  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
5533  * else:
5534  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
5535  */
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);
5551  __pyx_t_17 = 0;
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;
5562  }
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);
5574  __pyx_L20_try_end:;
5575  }
5576  goto __pyx_L12;
5577  }
5578  /*else*/ {
5579 
5580  /* "PyClical.pyx":603
5581  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
5582  * else:
5583  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
5584  * except RuntimeError as err:
5585  * raise ValueError(error_msg_prefix + " " + str(type(other))
5586  */
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);
5608  __pyx_t_8 = 0;
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;}
5615  }
5616  __pyx_L12:;
5617  }
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;
5622  __pyx_L4_error:;
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;
5629 
5630  /* "PyClical.pyx":604
5631  * else:
5632  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
5633  * except RuntimeError as err: # <<<<<<<<<<<<<<
5634  * raise ValueError(error_msg_prefix + " " + str(type(other))
5635  * + " value " + repr(other) + ":"
5636  */
5637  __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
5638  if (__pyx_t_14) {
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;
5646 
5647  /* "PyClical.pyx":605
5648  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
5649  * except RuntimeError as err:
5650  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
5651  * + " value " + repr(other) + ":"
5652  * + "\n\t" + str(err))
5653  */
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;
5671 
5672  /* "PyClical.pyx":606
5673  * except RuntimeError as err:
5674  * raise ValueError(error_msg_prefix + " " + str(type(other))
5675  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
5676  * + "\n\t" + str(err))
5677  * elif isinstance(ixt, index_set):
5678  */
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;
5691 
5692  /* "PyClical.pyx":607
5693  * raise ValueError(error_msg_prefix + " " + str(type(other))
5694  * + " value " + repr(other) + ":"
5695  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
5696  * elif isinstance(ixt, index_set):
5697  * if isinstance(other, numbers.Real):
5698  */
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);
5715  __pyx_t_18 = 0;
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;
5726  }
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);
5738  __pyx_L11_try_end:;
5739  }
5740  goto __pyx_L3;
5741  }
5742 
5743  /* "PyClical.pyx":608
5744  * + " value " + repr(other) + ":"
5745  * + "\n\t" + str(err))
5746  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
5747  * if isinstance(other, numbers.Real):
5748  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
5749  */
5750  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, ((PyObject*)__pyx_ptype_8PyClical_index_set));
5751  __pyx_t_1 = (__pyx_t_2 != 0);
5752  if (__pyx_t_1) {
5753 
5754  /* "PyClical.pyx":609
5755  * + "\n\t" + str(err))
5756  * elif isinstance(ixt, index_set):
5757  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
5758  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
5759  * elif isinstance(other, collections.Sequence):
5760  */
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);
5769  if (__pyx_t_2) {
5770 
5771  /* "PyClical.pyx":610
5772  * elif isinstance(ixt, index_set):
5773  * if isinstance(other, numbers.Real):
5774  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
5775  * elif isinstance(other, collections.Sequence):
5776  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
5777  */
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;}
5779  try {
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));
5781  } catch(...) {
5782  __Pyx_CppExn2PyErr();
5783  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5784  }
5785  __pyx_v_self->instance = __pyx_t_6;
5786  goto __pyx_L25;
5787  }
5788 
5789  /* "PyClical.pyx":611
5790  * if isinstance(other, numbers.Real):
5791  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
5792  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
5793  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
5794  * else:
5795  */
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);
5804  if (__pyx_t_1) {
5805 
5806  /* "PyClical.pyx":612
5807  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
5808  * elif isinstance(other, collections.Sequence):
5809  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
5810  * else:
5811  * raise TypeError(error_msg_prefix + " (" + str(type(other))
5812  */
5813  try {
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)));
5815  } catch(...) {
5816  __Pyx_CppExn2PyErr();
5817  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5818  }
5819  __pyx_v_self->instance = __pyx_t_6;
5820  goto __pyx_L25;
5821  }
5822  /*else*/ {
5823 
5824  /* "PyClical.pyx":614
5825  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
5826  * else:
5827  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
5828  * + ", " + repr(ixt) + ").")
5829  * else:
5830  */
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;
5848 
5849  /* "PyClical.pyx":615
5850  * else:
5851  * raise TypeError(error_msg_prefix + " (" + str(type(other))
5852  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
5853  * else:
5854  * raise TypeError(error_msg_prefix + " (" + str(type(other))
5855  */
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);
5869  __pyx_t_7 = 0;
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;}
5876  }
5877  __pyx_L25:;
5878  goto __pyx_L3;
5879  }
5880  /*else*/ {
5881 
5882  /* "PyClical.pyx":617
5883  * + ", " + repr(ixt) + ").")
5884  * else:
5885  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
5886  * + ", " + str(type(ixt)) + ").")
5887  *
5888  */
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;
5906 
5907  /* "PyClical.pyx":618
5908  * else:
5909  * raise TypeError(error_msg_prefix + " (" + str(type(other))
5910  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
5911  *
5912  * def __dealloc__(self):
5913  */
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);
5933  __pyx_t_7 = 0;
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;}
5940  }
5941  __pyx_L3:;
5942 
5943  __pyx_r = 0;
5944  goto __pyx_L0;
5945  __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);
5953  __pyx_r = -1;
5954  __pyx_L0:;
5955  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
5956  __Pyx_XDECREF(__pyx_v_err);
5957  __Pyx_RefNannyFinishContext();
5958  return __pyx_r;
5959  }
5960 
5961  /* Python wrapper */
5962  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
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();
5968  }
5969 
5970  /* "PyClical.pyx":620
5971  * + ", " + str(type(ixt)) + ").")
5972  *
5973  * def __dealloc__(self): # <<<<<<<<<<<<<<
5974  * """
5975  * Clean up by deallocating the instance of C++ class Clifford.
5976  */
5977 
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);
5981 
5982  /* "PyClical.pyx":624
5983  * Clean up by deallocating the instance of C++ class Clifford.
5984  * """
5985  * del self.instance # <<<<<<<<<<<<<<
5986  *
5987  * def __contains__(self, x):
5988  */
5989  delete __pyx_v_self->instance;
5990 
5991  __Pyx_RefNannyFinishContext();
5992  }
5993 
5994  /* Python wrapper */
5995  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
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__;
5999  #endif
6000  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
6001  int __pyx_r;
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();
6006  return __pyx_r;
6007  }
6008 
6009  /* "PyClical.pyx":626
6010  * del self.instance
6011  *
6012  * def __contains__(self, x): # <<<<<<<<<<<<<<
6013  * """
6014  * Not applicable.
6015  */
6016 
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) {
6018  int __pyx_r;
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);
6025 
6026  /* "PyClical.pyx":635
6027  * TypeError: Not applicable.
6028  * """
6029  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
6030  *
6031  * def __iter__(self):
6032  */
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;}
6038 
6039  __pyx_r = 0;
6040  goto __pyx_L0;
6041  __pyx_L1_error:;
6042  __Pyx_XDECREF(__pyx_t_1);
6043  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6044  __pyx_r = -1;
6045  __pyx_L0:;
6046  __Pyx_RefNannyFinishContext();
6047  return __pyx_r;
6048  }
6049 
6050  /* Python wrapper */
6051  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
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__;
6055  #endif
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();
6062  return __pyx_r;
6063  }
6064 
6065  /* "PyClical.pyx":637
6066  * raise TypeError("Not applicable.")
6067  *
6068  * def __iter__(self): # <<<<<<<<<<<<<<
6069  * """
6070  * Not applicable.
6071  */
6072 
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);
6081 
6082  /* "PyClical.pyx":646
6083  * TypeError: Not applicable.
6084  * """
6085  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
6086  *
6087  * def reframe(self, ixt):
6088  */
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;}
6094 
6095  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6096  goto __pyx_L0;
6097  __pyx_L1_error:;
6098  __Pyx_XDECREF(__pyx_t_1);
6099  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6100  __pyx_r = NULL;
6101  __pyx_L0:;
6102  __Pyx_XGIVEREF(__pyx_r);
6103  __Pyx_RefNannyFinishContext();
6104  return __pyx_r;
6105  }
6106 
6107  /* Python wrapper */
6108  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
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();
6116  return __pyx_r;
6117  }
6118 
6119  /* "PyClical.pyx":648
6120  * raise TypeError("Not applicable.")
6121  *
6122  * def reframe(self, ixt): # <<<<<<<<<<<<<<
6123  * """
6124  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
6125  */
6126 
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
6133  int __pyx_t_1;
6134  int __pyx_t_2;
6135  PyObject *__pyx_t_3 = NULL;
6136  PyObject *__pyx_t_4 = NULL;
6137  PyObject *__pyx_t_5 = NULL;
6138  PyObject *__pyx_t_6 = NULL;
6139  Clifford *__pyx_t_7;
6140  int __pyx_t_8;
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);
6150 
6151  /* "PyClical.pyx":658
6152  * True
6153  * """
6154  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
6155  * if isinstance(ixt, index_set):
6156  * try:
6157  */
6158  __Pyx_INCREF(((PyObject *)__pyx_kp_s_16));
6159  __pyx_v_error_msg_prefix = ((PyObject *)__pyx_kp_s_16);
6160 
6161  /* "PyClical.pyx":659
6162  * """
6163  * error_msg_prefix = "Cannot reframe"
6164  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6165  * try:
6166  * result = clifford()
6167  */
6168  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, ((PyObject*)__pyx_ptype_8PyClical_index_set));
6169  __pyx_t_2 = (__pyx_t_1 != 0);
6170  if (__pyx_t_2) {
6171 
6172  /* "PyClical.pyx":660
6173  * error_msg_prefix = "Cannot reframe"
6174  * if isinstance(ixt, index_set):
6175  * try: # <<<<<<<<<<<<<<
6176  * result = clifford()
6177  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
6178  */
6179  {
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);
6184  /*try:*/ {
6185 
6186  /* "PyClical.pyx":661
6187  * if isinstance(ixt, index_set):
6188  * try:
6189  * result = clifford() # <<<<<<<<<<<<<<
6190  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
6191  * except RuntimeError as err:
6192  */
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);
6196  __pyx_t_6 = 0;
6197 
6198  /* "PyClical.pyx":662
6199  * try:
6200  * result = clifford()
6201  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6202  * except RuntimeError as err:
6203  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
6204  */
6205  try {
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)));
6207  } catch(...) {
6208  __Pyx_CppExn2PyErr();
6209  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
6210  }
6211  __pyx_v_result->instance = __pyx_t_7;
6212  }
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;
6217  __pyx_L4_error:;
6218  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6219 
6220  /* "PyClical.pyx":663
6221  * result = clifford()
6222  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
6223  * except RuntimeError as err: # <<<<<<<<<<<<<<
6224  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
6225  * + str(ixt) + ":"
6226  */
6227  __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6228  if (__pyx_t_8) {
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;
6236 
6237  /* "PyClical.pyx":664
6238  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
6239  * except RuntimeError as err:
6240  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
6241  * + str(ixt) + ":"
6242  * + "\n\t" + str(err))
6243  */
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;
6261 
6262  /* "PyClical.pyx":665
6263  * except RuntimeError as err:
6264  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
6265  * + str(ixt) + ":" # <<<<<<<<<<<<<<
6266  * + "\n\t" + str(err))
6267  * else:
6268  */
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;
6287 
6288  /* "PyClical.pyx":666
6289  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
6290  * + str(ixt) + ":"
6291  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6292  * else:
6293  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
6294  */
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);
6311  __pyx_t_11 = 0;
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;
6322  }
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);
6334  __pyx_L11_try_end:;
6335  }
6336  goto __pyx_L3;
6337  }
6338  /*else*/ {
6339 
6340  /* "PyClical.pyx":668
6341  * + "\n\t" + str(err))
6342  * else:
6343  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
6344  * return result
6345  *
6346  */
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);
6368  __pyx_t_6 = 0;
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;}
6375  }
6376  __pyx_L3:;
6377 
6378  /* "PyClical.pyx":669
6379  * else:
6380  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
6381  * return result # <<<<<<<<<<<<<<
6382  *
6383  * def __richcmp__(lhs, rhs, int op):
6384  */
6385  __Pyx_XDECREF(__pyx_r);
6386  __Pyx_INCREF(((PyObject *)__pyx_v_result));
6387  __pyx_r = ((PyObject *)__pyx_v_result);
6388  goto __pyx_L0;
6389 
6390  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6391  goto __pyx_L0;
6392  __pyx_L1_error:;
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);
6400  __pyx_r = NULL;
6401  __pyx_L0:;
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();
6407  return __pyx_r;
6408  }
6409 
6410  /* Python wrapper */
6411  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
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();
6418  return __pyx_r;
6419  }
6420 
6421  /* "PyClical.pyx":671
6422  * return result
6423  *
6424  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
6425  * """
6426  * Compare objects of type clifford.
6427  */
6428 
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
6432  int __pyx_t_1;
6433  int __pyx_t_2;
6434  int __pyx_t_3;
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);
6442 
6443  /* "PyClical.pyx":690
6444  * True
6445  * """
6446  * if op == 2: # == # <<<<<<<<<<<<<<
6447  * if (lhs is None) or (rhs is None):
6448  * return bool(lhs is rhs)
6449  */
6450  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
6451  if (__pyx_t_1) {
6452 
6453  /* "PyClical.pyx":691
6454  * """
6455  * if op == 2: # ==
6456  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
6457  * return bool(lhs is rhs)
6458  * else:
6459  */
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);
6464  } else {
6465  __pyx_t_3 = (__pyx_t_1 != 0);
6466  }
6467  if (__pyx_t_3) {
6468 
6469  /* "PyClical.pyx":692
6470  * if op == 2: # ==
6471  * if (lhs is None) or (rhs is None):
6472  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
6473  * else:
6474  * return bool( toClifford(lhs) == toClifford(rhs) )
6475  */
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;
6481  __pyx_t_4 = 0;
6482  goto __pyx_L0;
6483  goto __pyx_L4;
6484  }
6485  /*else*/ {
6486 
6487  /* "PyClical.pyx":694
6488  * return bool(lhs is rhs)
6489  * else:
6490  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
6491  * elif op == 3: # !=
6492  * if (lhs is None) or (rhs is None):
6493  */
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;
6499  __pyx_t_4 = 0;
6500  goto __pyx_L0;
6501  }
6502  __pyx_L4:;
6503  goto __pyx_L3;
6504  }
6505 
6506  /* "PyClical.pyx":695
6507  * else:
6508  * return bool( toClifford(lhs) == toClifford(rhs) )
6509  * elif op == 3: # != # <<<<<<<<<<<<<<
6510  * if (lhs is None) or (rhs is None):
6511  * return not bool(lhs is rhs)
6512  */
6513  __pyx_t_3 = ((__pyx_v_op == 3) != 0);
6514  if (__pyx_t_3) {
6515 
6516  /* "PyClical.pyx":696
6517  * return bool( toClifford(lhs) == toClifford(rhs) )
6518  * elif op == 3: # !=
6519  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
6520  * return not bool(lhs is rhs)
6521  * else:
6522  */
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);
6527  } else {
6528  __pyx_t_2 = (__pyx_t_3 != 0);
6529  }
6530  if (__pyx_t_2) {
6531 
6532  /* "PyClical.pyx":697
6533  * elif op == 3: # !=
6534  * if (lhs is None) or (rhs is None):
6535  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
6536  * else:
6537  * return bool( toClifford(lhs) != toClifford(rhs) )
6538  */
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;
6544  __pyx_t_4 = 0;
6545  goto __pyx_L0;
6546  goto __pyx_L5;
6547  }
6548  /*else*/ {
6549 
6550  /* "PyClical.pyx":699
6551  * return not bool(lhs is rhs)
6552  * else:
6553  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
6554  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
6555  * raise TypeError("This comparison operator is not implemented for "
6556  */
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;
6562  __pyx_t_4 = 0;
6563  goto __pyx_L0;
6564  }
6565  __pyx_L5:;
6566  goto __pyx_L3;
6567  }
6568 
6569  /* "PyClical.pyx":700
6570  * else:
6571  * return bool( toClifford(lhs) != toClifford(rhs) )
6572  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
6573  * raise TypeError("This comparison operator is not implemented for "
6574  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
6575  */
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);
6580  } else {
6581  __pyx_t_1 = (__pyx_t_2 != 0);
6582  }
6583  if (__pyx_t_1) {
6584 
6585  /* "PyClical.pyx":702
6586  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
6587  * raise TypeError("This comparison operator is not implemented for "
6588  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
6589  * else:
6590  * return NotImplemented
6591  */
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);
6625  __pyx_t_6 = 0;
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;}
6632  goto __pyx_L3;
6633  }
6634  /*else*/ {
6635 
6636  /* "PyClical.pyx":704
6637  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
6638  * else:
6639  * return NotImplemented # <<<<<<<<<<<<<<
6640  *
6641  * def __getitem__(self, ixt):
6642  */
6643  __Pyx_XDECREF(__pyx_r);
6644  __Pyx_INCREF(__pyx_builtin_NotImplemented);
6645  __pyx_r = __pyx_builtin_NotImplemented;
6646  goto __pyx_L0;
6647  }
6648  __pyx_L3:;
6649 
6650  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6651  goto __pyx_L0;
6652  __pyx_L1_error:;
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);
6657  __pyx_r = NULL;
6658  __pyx_L0:;
6659  __Pyx_XGIVEREF(__pyx_r);
6660  __Pyx_RefNannyFinishContext();
6661  return __pyx_r;
6662  }
6663 
6664  /* Python wrapper */
6665  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
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__;
6669  #endif
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();
6676  return __pyx_r;
6677  }
6678 
6679  /* "PyClical.pyx":706
6680  * return NotImplemented
6681  *
6682  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
6683  * """
6684  * Subscripting: map from index set to scalar coordinate.
6685  */
6686 
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);
6695 
6696  /* "PyClical.pyx":719
6697  * 2.0
6698  * """
6699  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
6700  *
6701  * def __neg__(self):
6702  */
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;
6707  __pyx_t_1 = 0;
6708  goto __pyx_L0;
6709 
6710  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6711  goto __pyx_L0;
6712  __pyx_L1_error:;
6713  __Pyx_XDECREF(__pyx_t_1);
6714  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6715  __pyx_r = NULL;
6716  __pyx_L0:;
6717  __Pyx_XGIVEREF(__pyx_r);
6718  __Pyx_RefNannyFinishContext();
6719  return __pyx_r;
6720  }
6721 
6722  /* Python wrapper */
6723  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
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__;
6727  #endif
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();
6734  return __pyx_r;
6735  }
6736 
6737  /* "PyClical.pyx":721
6738  * return self.instance.getitem(toIndexSet(ixt))
6739  *
6740  * def __neg__(self): # <<<<<<<<<<<<<<
6741  * """
6742  * Unary -.
6743  */
6744 
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);
6754 
6755  /* "PyClical.pyx":728
6756  * -{1}
6757  * """
6758  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
6759  *
6760  * def __pos__(self):
6761  */
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;
6769  __pyx_t_2 = 0;
6770  goto __pyx_L0;
6771 
6772  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6773  goto __pyx_L0;
6774  __pyx_L1_error:;
6775  __Pyx_XDECREF(__pyx_t_1);
6776  __Pyx_XDECREF(__pyx_t_2);
6777  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6778  __pyx_r = NULL;
6779  __pyx_L0:;
6780  __Pyx_XGIVEREF(__pyx_r);
6781  __Pyx_RefNannyFinishContext();
6782  return __pyx_r;
6783  }
6784 
6785  /* Python wrapper */
6786  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
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__;
6790  #endif
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();
6797  return __pyx_r;
6798  }
6799 
6800  /* "PyClical.pyx":730
6801  * return clifford().wrap( self.instance.neg() )
6802  *
6803  * def __pos__(self): # <<<<<<<<<<<<<<
6804  * """
6805  * Unary +.
6806  */
6807 
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);
6817 
6818  /* "PyClical.pyx":737
6819  * {1}
6820  * """
6821  * return clifford(self) # <<<<<<<<<<<<<<
6822  *
6823  * def __add__(lhs, rhs):
6824  */
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;
6835  __pyx_t_2 = 0;
6836  goto __pyx_L0;
6837 
6838  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6839  goto __pyx_L0;
6840  __pyx_L1_error:;
6841  __Pyx_XDECREF(__pyx_t_1);
6842  __Pyx_XDECREF(__pyx_t_2);
6843  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6844  __pyx_r = NULL;
6845  __pyx_L0:;
6846  __Pyx_XGIVEREF(__pyx_r);
6847  __Pyx_RefNannyFinishContext();
6848  return __pyx_r;
6849  }
6850 
6851  /* Python wrapper */
6852  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
6856  #endif
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();
6863  return __pyx_r;
6864  }
6865 
6866  /* "PyClical.pyx":739
6867  * return clifford(self)
6868  *
6869  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
6870  * """
6871  * Geometric sum.
6872  */
6873 
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);
6883 
6884  /* "PyClical.pyx":748
6885  * {1}+{2}
6886  * """
6887  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
6888  *
6889  * def __iadd__(self, rhs):
6890  */
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;
6898  __pyx_t_2 = 0;
6899  goto __pyx_L0;
6900 
6901  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6902  goto __pyx_L0;
6903  __pyx_L1_error:;
6904  __Pyx_XDECREF(__pyx_t_1);
6905  __Pyx_XDECREF(__pyx_t_2);
6906  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6907  __pyx_r = NULL;
6908  __pyx_L0:;
6909  __Pyx_XGIVEREF(__pyx_r);
6910  __Pyx_RefNannyFinishContext();
6911  return __pyx_r;
6912  }
6913 
6914  /* Python wrapper */
6915  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
6919  #endif
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();
6926  return __pyx_r;
6927  }
6928 
6929  /* "PyClical.pyx":750
6930  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
6931  *
6932  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
6933  * """
6934  * Geometric sum.
6935  */
6936 
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);
6945 
6946  /* "PyClical.pyx":757
6947  * 1+{2}
6948  * """
6949  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
6950  *
6951  * def __sub__(lhs, rhs):
6952  */
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;
6957  __pyx_t_1 = 0;
6958  goto __pyx_L0;
6959 
6960  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6961  goto __pyx_L0;
6962  __pyx_L1_error:;
6963  __Pyx_XDECREF(__pyx_t_1);
6964  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6965  __pyx_r = NULL;
6966  __pyx_L0:;
6967  __Pyx_XGIVEREF(__pyx_r);
6968  __Pyx_RefNannyFinishContext();
6969  return __pyx_r;
6970  }
6971 
6972  /* Python wrapper */
6973  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
6977  #endif
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();
6984  return __pyx_r;
6985  }
6986 
6987  /* "PyClical.pyx":759
6988  * return self.wrap( self.unwrap() + toClifford(rhs) )
6989  *
6990  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
6991  * """
6992  * Geometric difference.
6993  */
6994 
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);
7004 
7005  /* "PyClical.pyx":768
7006  * {1}-{2}
7007  * """
7008  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
7009  *
7010  * def __isub__(self, rhs):
7011  */
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;
7019  __pyx_t_2 = 0;
7020  goto __pyx_L0;
7021 
7022  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7023  goto __pyx_L0;
7024  __pyx_L1_error:;
7025  __Pyx_XDECREF(__pyx_t_1);
7026  __Pyx_XDECREF(__pyx_t_2);
7027  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7028  __pyx_r = NULL;
7029  __pyx_L0:;
7030  __Pyx_XGIVEREF(__pyx_r);
7031  __Pyx_RefNannyFinishContext();
7032  return __pyx_r;
7033  }
7034 
7035  /* Python wrapper */
7036  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
7040  #endif
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();
7047  return __pyx_r;
7048  }
7049 
7050  /* "PyClical.pyx":770
7051  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
7052  *
7053  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
7054  * """
7055  * Geometric difference.
7056  */
7057 
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);
7066 
7067  /* "PyClical.pyx":777
7068  * 1-{2}
7069  * """
7070  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
7071  *
7072  * def __mul__(lhs, rhs):
7073  */
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;
7078  __pyx_t_1 = 0;
7079  goto __pyx_L0;
7080 
7081  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7082  goto __pyx_L0;
7083  __pyx_L1_error:;
7084  __Pyx_XDECREF(__pyx_t_1);
7085  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7086  __pyx_r = NULL;
7087  __pyx_L0:;
7088  __Pyx_XGIVEREF(__pyx_r);
7089  __Pyx_RefNannyFinishContext();
7090  return __pyx_r;
7091  }
7092 
7093  /* Python wrapper */
7094  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
7098  #endif
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();
7105  return __pyx_r;
7106  }
7107 
7108  /* "PyClical.pyx":779
7109  * return self.wrap( self.unwrap() - toClifford(rhs) )
7110  *
7111  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
7112  * """
7113  * Geometric product.
7114  */
7115 
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);
7125 
7126  /* "PyClical.pyx":790
7127  * {2}
7128  * """
7129  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
7130  *
7131  * def __imul__(self, rhs):
7132  */
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;
7140  __pyx_t_2 = 0;
7141  goto __pyx_L0;
7142 
7143  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7144  goto __pyx_L0;
7145  __pyx_L1_error:;
7146  __Pyx_XDECREF(__pyx_t_1);
7147  __Pyx_XDECREF(__pyx_t_2);
7148  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7149  __pyx_r = NULL;
7150  __pyx_L0:;
7151  __Pyx_XGIVEREF(__pyx_r);
7152  __Pyx_RefNannyFinishContext();
7153  return __pyx_r;
7154  }
7155 
7156  /* Python wrapper */
7157  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
7161  #endif
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();
7168  return __pyx_r;
7169  }
7170 
7171  /* "PyClical.pyx":792
7172  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
7173  *
7174  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
7175  * """
7176  * Geometric product.
7177  */
7178 
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);
7187 
7188  /* "PyClical.pyx":803
7189  * {2}
7190  * """
7191  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
7192  *
7193  * def __mod__(lhs, rhs):
7194  */
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;
7199  __pyx_t_1 = 0;
7200  goto __pyx_L0;
7201 
7202  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7203  goto __pyx_L0;
7204  __pyx_L1_error:;
7205  __Pyx_XDECREF(__pyx_t_1);
7206  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7207  __pyx_r = NULL;
7208  __pyx_L0:;
7209  __Pyx_XGIVEREF(__pyx_r);
7210  __Pyx_RefNannyFinishContext();
7211  return __pyx_r;
7212  }
7213 
7214  /* Python wrapper */
7215  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
7219  #endif
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();
7226  return __pyx_r;
7227  }
7228 
7229  /* "PyClical.pyx":805
7230  * return self.wrap( self.unwrap() * toClifford(rhs) )
7231  *
7232  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
7233  * """
7234  * Contraction.
7235  */
7236 
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);
7246 
7247  /* "PyClical.pyx":818
7248  * {2}
7249  * """
7250  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
7251  *
7252  * def __imod__(self, rhs):
7253  */
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;
7261  __pyx_t_2 = 0;
7262  goto __pyx_L0;
7263 
7264  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7265  goto __pyx_L0;
7266  __pyx_L1_error:;
7267  __Pyx_XDECREF(__pyx_t_1);
7268  __Pyx_XDECREF(__pyx_t_2);
7269  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7270  __pyx_r = NULL;
7271  __pyx_L0:;
7272  __Pyx_XGIVEREF(__pyx_r);
7273  __Pyx_RefNannyFinishContext();
7274  return __pyx_r;
7275  }
7276 
7277  /* Python wrapper */
7278  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
7282  #endif
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();
7289  return __pyx_r;
7290  }
7291 
7292  /* "PyClical.pyx":820
7293  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
7294  *
7295  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
7296  * """
7297  * Contraction.
7298  */
7299 
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);
7308 
7309  /* "PyClical.pyx":833
7310  * {2}
7311  * """
7312  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
7313  *
7314  * def __and__(lhs, rhs):
7315  */
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;
7320  __pyx_t_1 = 0;
7321  goto __pyx_L0;
7322 
7323  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7324  goto __pyx_L0;
7325  __pyx_L1_error:;
7326  __Pyx_XDECREF(__pyx_t_1);
7327  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7328  __pyx_r = NULL;
7329  __pyx_L0:;
7330  __Pyx_XGIVEREF(__pyx_r);
7331  __Pyx_RefNannyFinishContext();
7332  return __pyx_r;
7333  }
7334 
7335  /* Python wrapper */
7336  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
7340  #endif
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();
7347  return __pyx_r;
7348  }
7349 
7350  /* "PyClical.pyx":835
7351  * return self.wrap( self.unwrap() % toClifford(rhs) )
7352  *
7353  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
7354  * """
7355  * Inner product.
7356  */
7357 
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);
7367 
7368  /* "PyClical.pyx":848
7369  * {2}
7370  * """
7371  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
7372  *
7373  * def __iand__(self, rhs):
7374  */
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;
7382  __pyx_t_2 = 0;
7383  goto __pyx_L0;
7384 
7385  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7386  goto __pyx_L0;
7387  __pyx_L1_error:;
7388  __Pyx_XDECREF(__pyx_t_1);
7389  __Pyx_XDECREF(__pyx_t_2);
7390  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7391  __pyx_r = NULL;
7392  __pyx_L0:;
7393  __Pyx_XGIVEREF(__pyx_r);
7394  __Pyx_RefNannyFinishContext();
7395  return __pyx_r;
7396  }
7397 
7398  /* Python wrapper */
7399  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
7403  #endif
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();
7410  return __pyx_r;
7411  }
7412 
7413  /* "PyClical.pyx":850
7414  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
7415  *
7416  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
7417  * """
7418  * Inner product.
7419  */
7420 
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);
7429 
7430  /* "PyClical.pyx":863
7431  * {2}
7432  * """
7433  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
7434  *
7435  * def __xor__(lhs, rhs):
7436  */
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;
7441  __pyx_t_1 = 0;
7442  goto __pyx_L0;
7443 
7444  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7445  goto __pyx_L0;
7446  __pyx_L1_error:;
7447  __Pyx_XDECREF(__pyx_t_1);
7448  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7449  __pyx_r = NULL;
7450  __pyx_L0:;
7451  __Pyx_XGIVEREF(__pyx_r);
7452  __Pyx_RefNannyFinishContext();
7453  return __pyx_r;
7454  }
7455 
7456  /* Python wrapper */
7457  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
7461  #endif
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();
7468  return __pyx_r;
7469  }
7470 
7471  /* "PyClical.pyx":865
7472  * return self.wrap( self.unwrap() & toClifford(rhs) )
7473  *
7474  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
7475  * """
7476  * Outer product.
7477  */
7478 
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);
7488 
7489  /* "PyClical.pyx":878
7490  * 0
7491  * """
7492  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
7493  *
7494  * def __ixor__(self, rhs):
7495  */
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;
7503  __pyx_t_2 = 0;
7504  goto __pyx_L0;
7505 
7506  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7507  goto __pyx_L0;
7508  __pyx_L1_error:;
7509  __Pyx_XDECREF(__pyx_t_1);
7510  __Pyx_XDECREF(__pyx_t_2);
7511  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7512  __pyx_r = NULL;
7513  __pyx_L0:;
7514  __Pyx_XGIVEREF(__pyx_r);
7515  __Pyx_RefNannyFinishContext();
7516  return __pyx_r;
7517  }
7518 
7519  /* Python wrapper */
7520  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
7524  #endif
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();
7531  return __pyx_r;
7532  }
7533 
7534  /* "PyClical.pyx":880
7535  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
7536  *
7537  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
7538  * """
7539  * Outer product.
7540  */
7541 
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);
7550 
7551  /* "PyClical.pyx":893
7552  * 0
7553  * """
7554  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
7555  *
7556  * def __div__(lhs, rhs):
7557  */
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;
7562  __pyx_t_1 = 0;
7563  goto __pyx_L0;
7564 
7565  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7566  goto __pyx_L0;
7567  __pyx_L1_error:;
7568  __Pyx_XDECREF(__pyx_t_1);
7569  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7570  __pyx_r = NULL;
7571  __pyx_L0:;
7572  __Pyx_XGIVEREF(__pyx_r);
7573  __Pyx_RefNannyFinishContext();
7574  return __pyx_r;
7575  }
7576 
7577  /* Python wrapper */
7578  #if PY_MAJOR_VERSION < 3
7579  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
7583  #endif
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();
7590  return __pyx_r;
7591  }
7592  #endif
7594  /* "PyClical.pyx":895
7595  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
7596  *
7597  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
7598  * """
7599  * Geometric quotient.
7600  */
7601 
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);
7612 
7613  /* "PyClical.pyx":908
7614  * -{2}
7615  * """
7616  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
7617  *
7618  * def __idiv__(self, rhs):
7619  */
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;
7627  __pyx_t_2 = 0;
7628  goto __pyx_L0;
7629 
7630  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7631  goto __pyx_L0;
7632  __pyx_L1_error:;
7633  __Pyx_XDECREF(__pyx_t_1);
7634  __Pyx_XDECREF(__pyx_t_2);
7635  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7636  __pyx_r = NULL;
7637  __pyx_L0:;
7638  __Pyx_XGIVEREF(__pyx_r);
7639  __Pyx_RefNannyFinishContext();
7640  return __pyx_r;
7641  }
7642  #endif
7644  /* Python wrapper */
7645  #if PY_MAJOR_VERSION < 3
7646  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
7650  #endif
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();
7657  return __pyx_r;
7658  }
7659  #endif
7661  /* "PyClical.pyx":910
7662  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
7663  *
7664  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
7665  * """
7666  * Geometric quotient.
7667  */
7668 
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);
7678 
7679  /* "PyClical.pyx":923
7680  * -{2}
7681  * """
7682  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
7683  *
7684  * def inv(self):
7685  */
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;
7690  __pyx_t_1 = 0;
7691  goto __pyx_L0;
7692 
7693  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7694  goto __pyx_L0;
7695  __pyx_L1_error:;
7696  __Pyx_XDECREF(__pyx_t_1);
7697  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7698  __pyx_r = NULL;
7699  __pyx_L0:;
7700  __Pyx_XGIVEREF(__pyx_r);
7701  __Pyx_RefNannyFinishContext();
7702  return __pyx_r;
7703  }
7704  #endif
7706  /* Python wrapper */
7707  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
7715  return __pyx_r;
7716  }
7717 
7718  /* "PyClical.pyx":925
7719  * return self.wrap( self.unwrap() / toClifford(rhs) )
7720  *
7721  * def inv(self): # <<<<<<<<<<<<<<
7722  * """
7723  * Geometric multiplicative inverse.
7724  */
7725 
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);
7735 
7736  /* "PyClical.pyx":936
7737  * -{1,2}
7738  * """
7739  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
7740  *
7741  * def __or__(lhs, rhs):
7742  */
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;
7750  __pyx_t_2 = 0;
7751  goto __pyx_L0;
7752 
7753  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7754  goto __pyx_L0;
7755  __pyx_L1_error:;
7756  __Pyx_XDECREF(__pyx_t_1);
7757  __Pyx_XDECREF(__pyx_t_2);
7758  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
7759  __pyx_r = NULL;
7760  __pyx_L0:;
7761  __Pyx_XGIVEREF(__pyx_r);
7762  __Pyx_RefNannyFinishContext();
7763  return __pyx_r;
7764  }
7765 
7766  /* Python wrapper */
7767  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
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__;
7771  #endif
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();
7778  return __pyx_r;
7779  }
7780 
7781  /* "PyClical.pyx":938
7782  * return clifford().wrap( self.instance.inv() )
7783  *
7784  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
7785  * """
7786  * Transform left hand side, using right hand side as a transformation.
7787  */
7788 
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);
7798 
7799  /* "PyClical.pyx":947
7800  * -{1}
7801  * """
7802  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
7803  *
7804  * def __ior__(self, rhs):
7805  */
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;
7813  __pyx_t_2 = 0;
7814  goto __pyx_L0;
7815 
7816  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7817  goto __pyx_L0;
7818  __pyx_L1_error:;
7819  __Pyx_XDECREF(__pyx_t_1);
7820  __Pyx_XDECREF(__pyx_t_2);
7821  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7822  __pyx_r = NULL;
7823  __pyx_L0:;
7824  __Pyx_XGIVEREF(__pyx_r);
7825  __Pyx_RefNannyFinishContext();
7826  return __pyx_r;
7827  }
7828 
7829  /* Python wrapper */
7830  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
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__;
7834  #endif
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();
7841  return __pyx_r;
7842  }
7843 
7844  /* "PyClical.pyx":949
7845  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
7846  *
7847  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
7848  * """
7849  * Transform left hand side, using right hand side as a transformation.
7850  */
7851 
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);
7860 
7861  /* "PyClical.pyx":958
7862  * -{1}
7863  * """
7864  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
7865  *
7866  * def __pow__(self, m, dummy):
7867  */
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;
7872  __pyx_t_1 = 0;
7873  goto __pyx_L0;
7874 
7875  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7876  goto __pyx_L0;
7877  __pyx_L1_error:;
7878  __Pyx_XDECREF(__pyx_t_1);
7879  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7880  __pyx_r = NULL;
7881  __pyx_L0:;
7882  __Pyx_XGIVEREF(__pyx_r);
7883  __Pyx_RefNannyFinishContext();
7884  return __pyx_r;
7885  }
7886 
7887  /* Python wrapper */
7888  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
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__;
7892  #endif
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();
7899  return __pyx_r;
7900  }
7901 
7902  /* "PyClical.pyx":960
7903  * return self.wrap( self.unwrap() | toClifford(rhs) )
7904  *
7905  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
7906  * """
7907  * Power: self to the m.
7908  */
7909 
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);
7918 
7919  /* "PyClical.pyx":977
7920  * 1
7921  * """
7922  * return pow(self, m) # <<<<<<<<<<<<<<
7923  *
7924  * def pow(self, m):
7925  */
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;
7930  __pyx_t_1 = 0;
7931  goto __pyx_L0;
7932 
7933  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7934  goto __pyx_L0;
7935  __pyx_L1_error:;
7936  __Pyx_XDECREF(__pyx_t_1);
7937  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7938  __pyx_r = NULL;
7939  __pyx_L0:;
7940  __Pyx_XGIVEREF(__pyx_r);
7941  __Pyx_RefNannyFinishContext();
7942  return __pyx_r;
7943  }
7944 
7945  /* Python wrapper */
7946  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
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();
7954  return __pyx_r;
7955  }
7956 
7957  /* "PyClical.pyx":979
7958  * return pow(self, m)
7959  *
7960  * def pow(self, m): # <<<<<<<<<<<<<<
7961  * """
7962  * Power: self to the m.
7963  */
7964 
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;
7970  int __pyx_t_3;
7971  int __pyx_t_4;
7972  int __pyx_t_5;
7973  int __pyx_lineno = 0;
7974  const char *__pyx_filename = NULL;
7975  int __pyx_clineno = 0;
7976  __Pyx_RefNannySetupContext("pow", 0);
7977 
7978  /* "PyClical.pyx":998
7979  * 1
7980  * """
7981  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
7982  * return clifford().wrap( self.instance.pow(m) )
7983  * else:
7984  */
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);
7993  if (__pyx_t_4) {
7994 
7995  /* "PyClical.pyx":999
7996  * """
7997  * if isinstance(m, numbers.Integral):
7998  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
7999  * else:
8000  * return exp(m * log(self))
8001  */
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;
8010  __pyx_t_1 = 0;
8011  goto __pyx_L0;
8012  goto __pyx_L3;
8013  }
8014  /*else*/ {
8015 
8016  /* "PyClical.pyx":1001
8017  * return clifford().wrap( self.instance.pow(m) )
8018  * else:
8019  * return exp(m * log(self)) # <<<<<<<<<<<<<<
8020  *
8021  * def outer_pow(self, m):
8022  */
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;
8033  __pyx_t_1 = 0;
8034  goto __pyx_L0;
8035  }
8036  __pyx_L3:;
8037 
8038  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8039  goto __pyx_L0;
8040  __pyx_L1_error:;
8041  __Pyx_XDECREF(__pyx_t_1);
8042  __Pyx_XDECREF(__pyx_t_2);
8043  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
8044  __pyx_r = NULL;
8045  __pyx_L0:;
8046  __Pyx_XGIVEREF(__pyx_r);
8047  __Pyx_RefNannyFinishContext();
8048  return __pyx_r;
8049  }
8050 
8051  /* Python wrapper */
8052  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
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();
8060  return __pyx_r;
8061  }
8062 
8063  /* "PyClical.pyx":1003
8064  * return exp(m * log(self))
8065  *
8066  * def outer_pow(self, m): # <<<<<<<<<<<<<<
8067  * """
8068  * Outer product power.
8069  */
8070 
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;
8075  int __pyx_t_2;
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);
8081 
8082  /* "PyClical.pyx":1017
8083  *
8084  * """
8085  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
8086  *
8087  * def __call__(self, grade):
8088  */
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;
8097  __pyx_t_3 = 0;
8098  goto __pyx_L0;
8099 
8100  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8101  goto __pyx_L0;
8102  __pyx_L1_error:;
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);
8106  __pyx_r = NULL;
8107  __pyx_L0:;
8108  __Pyx_XGIVEREF(__pyx_r);
8109  __Pyx_RefNannyFinishContext();
8110  return __pyx_r;
8111  }
8112 
8113  /* Python wrapper */
8114  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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__;
8118  #endif
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);
8127  {
8128  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__grade,0};
8129  PyObject* values[1] = {0};
8130  if (unlikely(__pyx_kwds)) {
8131  Py_ssize_t kw_args;
8132  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8133  switch (pos_args) {
8134  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8135  case 0: break;
8136  default: goto __pyx_L5_argtuple_error;
8137  }
8138  kw_args = PyDict_Size(__pyx_kwds);
8139  switch (pos_args) {
8140  case 0:
8141  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__grade)) != 0)) kw_args--;
8142  else goto __pyx_L5_argtuple_error;
8143  }
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;}
8146  }
8147  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
8148  goto __pyx_L5_argtuple_error;
8149  } else {
8150  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8151  }
8152  __pyx_v_grade = values[0];
8153  }
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;}
8157  __pyx_L3_error:;
8158  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8159  __Pyx_RefNannyFinishContext();
8160  return NULL;
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();
8164  return __pyx_r;
8165  }
8166 
8167  /* "PyClical.pyx":1019
8168  * return clifford().wrap( self.instance.outer_pow(m) )
8169  *
8170  * def __call__(self, grade): # <<<<<<<<<<<<<<
8171  * """
8172  * Pure grade-vector part.
8173  */
8174 
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;
8179  int __pyx_t_2;
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);
8185 
8186  /* "PyClical.pyx":1036
8187  * 0
8188  * """
8189  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
8190  *
8191  * def scalar(self):
8192  */
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;
8201  __pyx_t_3 = 0;
8202  goto __pyx_L0;
8203 
8204  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8205  goto __pyx_L0;
8206  __pyx_L1_error:;
8207  __Pyx_XDECREF(__pyx_t_1);
8208  __Pyx_XDECREF(__pyx_t_3);
8209  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8210  __pyx_r = NULL;
8211  __pyx_L0:;
8212  __Pyx_XGIVEREF(__pyx_r);
8213  __Pyx_RefNannyFinishContext();
8214  return __pyx_r;
8215  }
8216 
8217  /* Python wrapper */
8218  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
8226  return __pyx_r;
8227  }
8228 
8229  /* "PyClical.pyx":1038
8230  * return clifford().wrap( self.instance.call(grade) )
8231  *
8232  * def scalar(self): # <<<<<<<<<<<<<<
8233  * """
8234  * Scalar part.
8235  */
8236 
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);
8245 
8246  /* "PyClical.pyx":1047
8247  * 0.0
8248  * """
8249  * return self.instance.scalar() # <<<<<<<<<<<<<<
8250  *
8251  * def pure(self):
8252  */
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;
8257  __pyx_t_1 = 0;
8258  goto __pyx_L0;
8259 
8260  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8261  goto __pyx_L0;
8262  __pyx_L1_error:;
8263  __Pyx_XDECREF(__pyx_t_1);
8264  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
8265  __pyx_r = NULL;
8266  __pyx_L0:;
8267  __Pyx_XGIVEREF(__pyx_r);
8268  __Pyx_RefNannyFinishContext();
8269  return __pyx_r;
8270  }
8271 
8272  /* Python wrapper */
8273  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
8281  return __pyx_r;
8282  }
8283 
8284  /* "PyClical.pyx":1049
8285  * return self.instance.scalar()
8286  *
8287  * def pure(self): # <<<<<<<<<<<<<<
8288  * """
8289  * Pure part.
8290  */
8291 
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);
8301 
8302  /* "PyClical.pyx":1058
8303  * {1,2}
8304  * """
8305  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
8306  *
8307  * def even(self):
8308  */
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;
8316  __pyx_t_2 = 0;
8317  goto __pyx_L0;
8318 
8319  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8320  goto __pyx_L0;
8321  __pyx_L1_error:;
8322  __Pyx_XDECREF(__pyx_t_1);
8323  __Pyx_XDECREF(__pyx_t_2);
8324  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
8325  __pyx_r = NULL;
8326  __pyx_L0:;
8327  __Pyx_XGIVEREF(__pyx_r);
8328  __Pyx_RefNannyFinishContext();
8329  return __pyx_r;
8330  }
8331 
8332  /* Python wrapper */
8333  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
8341  return __pyx_r;
8342  }
8343 
8344  /* "PyClical.pyx":1060
8345  * return clifford().wrap( self.instance.pure() )
8346  *
8347  * def even(self): # <<<<<<<<<<<<<<
8348  * """
8349  * Even part of multivector, sum of even grade terms.
8350  */
8351 
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);
8361 
8362  /* "PyClical.pyx":1067
8363  * 1+{1,2}
8364  * """
8365  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
8366  *
8367  * def odd(self):
8368  */
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;
8376  __pyx_t_2 = 0;
8377  goto __pyx_L0;
8378 
8379  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8380  goto __pyx_L0;
8381  __pyx_L1_error:;
8382  __Pyx_XDECREF(__pyx_t_1);
8383  __Pyx_XDECREF(__pyx_t_2);
8384  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
8385  __pyx_r = NULL;
8386  __pyx_L0:;
8387  __Pyx_XGIVEREF(__pyx_r);
8388  __Pyx_RefNannyFinishContext();
8389  return __pyx_r;
8390  }
8391 
8392  /* Python wrapper */
8393  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
8401  return __pyx_r;
8402  }
8403 
8404  /* "PyClical.pyx":1069
8405  * return clifford().wrap( self.instance.even() )
8406  *
8407  * def odd(self): # <<<<<<<<<<<<<<
8408  * """
8409  * Odd part of multivector, sum of odd grade terms.
8410  */
8411 
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);
8421 
8422  /* "PyClical.pyx":1076
8423  * {1}
8424  * """
8425  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
8426  *
8427  * def vector_part(self, frm = None):
8428  */
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;
8436  __pyx_t_2 = 0;
8437  goto __pyx_L0;
8438 
8439  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8440  goto __pyx_L0;
8441  __pyx_L1_error:;
8442  __Pyx_XDECREF(__pyx_t_1);
8443  __Pyx_XDECREF(__pyx_t_2);
8444  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
8445  __pyx_r = NULL;
8446  __pyx_L0:;
8447  __Pyx_XGIVEREF(__pyx_r);
8448  __Pyx_RefNannyFinishContext();
8449  return __pyx_r;
8450  }
8451 
8452  /* Python wrapper */
8453  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
8463  {
8464  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__frm,0};
8465  PyObject* values[1] = {0};
8466 
8467  /* "PyClical.pyx":1078
8468  * return clifford().wrap( self.instance.odd() )
8469  *
8470  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
8471  * """
8472  * Vector part of multivector, as a Python list, with respect to frm.
8473  */
8474  values[0] = ((PyObject *)Py_None);
8475  if (unlikely(__pyx_kwds)) {
8476  Py_ssize_t kw_args;
8477  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8478  switch (pos_args) {
8479  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8480  case 0: break;
8481  default: goto __pyx_L5_argtuple_error;
8482  }
8483  kw_args = PyDict_Size(__pyx_kwds);
8484  switch (pos_args) {
8485  case 0:
8486  if (kw_args > 0) {
8487  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__frm);
8488  if (value) { values[0] = value; kw_args--; }
8489  }
8490  }
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;}
8493  }
8494  } else {
8495  switch (PyTuple_GET_SIZE(__pyx_args)) {
8496  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8497  case 0: break;
8498  default: goto __pyx_L5_argtuple_error;
8499  }
8500  }
8501  __pyx_v_frm = values[0];
8502  }
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;}
8506  __pyx_L3_error:;
8507  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
8508  __Pyx_RefNannyFinishContext();
8509  return NULL;
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();
8513  return __pyx_r;
8514  }
8515 
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;
8519  int __pyx_v_n;
8520  int __pyx_v_i;
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;
8528  int __pyx_t_4;
8529  int __pyx_t_5;
8530  std::vector<scalar_t> __pyx_t_6;
8531  PyObject *__pyx_t_7 = NULL;
8532  PyObject *__pyx_t_8 = NULL;
8533  int __pyx_t_9;
8534  int __pyx_t_10;
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);
8543 
8544  /* "PyClical.pyx":1087
8545  * [0.0, 2.0, 3.0]
8546  * """
8547  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
8548  * cdef vector[scalar_t] vec
8549  * cdef int n
8550  */
8551  __Pyx_INCREF(((PyObject *)__pyx_kp_s_21));
8552  __pyx_v_error_msg_prefix = ((PyObject *)__pyx_kp_s_21);
8553 
8554  /* "PyClical.pyx":1091
8555  * cdef int n
8556  * cdef int i
8557  * try: # <<<<<<<<<<<<<<
8558  * if frm is None:
8559  * vec = self.instance.vector_part()
8560  */
8561  {
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);
8566  /*try:*/ {
8567 
8568  /* "PyClical.pyx":1092
8569  * cdef int i
8570  * try:
8571  * if frm is None: # <<<<<<<<<<<<<<
8572  * vec = self.instance.vector_part()
8573  * else:
8574  */
8575  __pyx_t_4 = (__pyx_v_frm == Py_None);
8576  __pyx_t_5 = (__pyx_t_4 != 0);
8577  if (__pyx_t_5) {
8578 
8579  /* "PyClical.pyx":1093
8580  * try:
8581  * if frm is None:
8582  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
8583  * else:
8584  * vec = self.instance.vector_part((<index_set>frm).unwrap())
8585  */
8586  __pyx_v_vec = __pyx_v_self->instance->vector_part();
8587  goto __pyx_L11;
8588  }
8589  /*else*/ {
8590 
8591  /* "PyClical.pyx":1095
8592  * vec = self.instance.vector_part()
8593  * else:
8594  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
8595  * n = vec.size()
8596  * lst = [0.0]*n
8597  */
8598  try {
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)));
8600  } catch(...) {
8601  __Pyx_CppExn2PyErr();
8602  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8603  }
8604  __pyx_v_vec = __pyx_t_6;
8605  }
8606  __pyx_L11:;
8607 
8608  /* "PyClical.pyx":1096
8609  * else:
8610  * vec = self.instance.vector_part((<index_set>frm).unwrap())
8611  * n = vec.size() # <<<<<<<<<<<<<<
8612  * lst = [0.0]*n
8613  * for i in xrange(n):
8614  */
8615  __pyx_v_n = __pyx_v_vec.size();
8616 
8617  /* "PyClical.pyx":1097
8618  * vec = self.instance.vector_part((<index_set>frm).unwrap())
8619  * n = vec.size()
8620  * lst = [0.0]*n # <<<<<<<<<<<<<<
8621  * for i in xrange(n):
8622  * lst[i] = vec[i]
8623  */
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);
8633  }
8634  }
8635  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8636  __pyx_v_lst = ((PyObject*)__pyx_t_8);
8637  __pyx_t_8 = 0;
8638 
8639  /* "PyClical.pyx":1098
8640  * n = vec.size()
8641  * lst = [0.0]*n
8642  * for i in xrange(n): # <<<<<<<<<<<<<<
8643  * lst[i] = vec[i]
8644  * return lst
8645  */
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;
8649 
8650  /* "PyClical.pyx":1099
8651  * lst = [0.0]*n
8652  * for i in xrange(n):
8653  * lst[i] = vec[i] # <<<<<<<<<<<<<<
8654  * return lst
8655  * except RuntimeError as err:
8656  */
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;
8661  }
8662 
8663  /* "PyClical.pyx":1100
8664  * for i in xrange(n):
8665  * lst[i] = vec[i]
8666  * return lst # <<<<<<<<<<<<<<
8667  * except RuntimeError as err:
8668  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
8669  */
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;
8674  }
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);
8684  goto __pyx_L0;
8685  __pyx_L3_error:;
8686  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8687  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
8688 
8689  /* "PyClical.pyx":1101
8690  * lst[i] = vec[i]
8691  * return lst
8692  * except RuntimeError as err: # <<<<<<<<<<<<<<
8693  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
8694  * + repr(frm) + " as frame:\n\t"
8695  */
8696  __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
8697  if (__pyx_t_9) {
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;
8705 
8706  /* "PyClical.pyx":1102
8707  * return lst
8708  * except RuntimeError as err:
8709  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
8710  * + repr(frm) + " as frame:\n\t"
8711  * + str(err))
8712  */
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;
8727 
8728  /* "PyClical.pyx":1103
8729  * except RuntimeError as err:
8730  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
8731  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
8732  * + str(err))
8733  *
8734  */
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;
8744 
8745  /* "PyClical.pyx":1104
8746  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
8747  * + repr(frm) + " as frame:\n\t"
8748  * + str(err)) # <<<<<<<<<<<<<<
8749  *
8750  * def involute(self):
8751  */
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);
8768  __pyx_t_14 = 0;
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;
8779  }
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);
8791  __pyx_L10_try_end:;
8792  }
8793 
8794  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8795  goto __pyx_L0;
8796  __pyx_L1_error:;
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);
8804  __pyx_r = NULL;
8805  __pyx_L0:;
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();
8811  return __pyx_r;
8812  }
8813 
8814  /* Python wrapper */
8815  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
8823  return __pyx_r;
8824  }
8825 
8826  /* "PyClical.pyx":1106
8827  * + str(err))
8828  *
8829  * def involute(self): # <<<<<<<<<<<<<<
8830  * """
8831  * Main involution, each {i} is replaced by -{i} in each term,
8832  */
8833 
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);
8843 
8844  /* "PyClical.pyx":1120
8845  * 1-{1}+{1,2}
8846  * """
8847  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
8848  *
8849  * def reverse(self):
8850  */
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;
8858  __pyx_t_2 = 0;
8859  goto __pyx_L0;
8860 
8861  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8862  goto __pyx_L0;
8863  __pyx_L1_error:;
8864  __Pyx_XDECREF(__pyx_t_1);
8865  __Pyx_XDECREF(__pyx_t_2);
8866  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
8867  __pyx_r = NULL;
8868  __pyx_L0:;
8869  __Pyx_XGIVEREF(__pyx_r);
8870  __Pyx_RefNannyFinishContext();
8871  return __pyx_r;
8872  }
8873 
8874  /* Python wrapper */
8875  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
8883  return __pyx_r;
8884  }
8885 
8886  /* "PyClical.pyx":1122
8887  * return clifford().wrap( self.instance.involute() )
8888  *
8889  * def reverse(self): # <<<<<<<<<<<<<<
8890  * """
8891  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
8892  */
8893 
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);
8903 
8904  /* "PyClical.pyx":1135
8905  * 1+{1}-{1,2}
8906  * """
8907  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
8908  *
8909  * def conj(self):
8910  */
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;
8918  __pyx_t_2 = 0;
8919  goto __pyx_L0;
8920 
8921  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8922  goto __pyx_L0;
8923  __pyx_L1_error:;
8924  __Pyx_XDECREF(__pyx_t_1);
8925  __Pyx_XDECREF(__pyx_t_2);
8926  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
8927  __pyx_r = NULL;
8928  __pyx_L0:;
8929  __Pyx_XGIVEREF(__pyx_r);
8930  __Pyx_RefNannyFinishContext();
8931  return __pyx_r;
8932  }
8933 
8934  /* Python wrapper */
8935  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
8943  return __pyx_r;
8944  }
8945 
8946  /* "PyClical.pyx":1137
8947  * return clifford().wrap( self.instance.reverse() )
8948  *
8949  * def conj(self): # <<<<<<<<<<<<<<
8950  * """
8951  * Conjugation, reverse o involute == involute o reverse.
8952  */
8953 
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);
8963 
8964  /* "PyClical.pyx":1150
8965  * 1-{1}-{1,2}
8966  * """
8967  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
8968  *
8969  * def quad(self):
8970  */
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;
8978  __pyx_t_2 = 0;
8979  goto __pyx_L0;
8980 
8981  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8982  goto __pyx_L0;
8983  __pyx_L1_error:;
8984  __Pyx_XDECREF(__pyx_t_1);
8985  __Pyx_XDECREF(__pyx_t_2);
8986  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
8987  __pyx_r = NULL;
8988  __pyx_L0:;
8989  __Pyx_XGIVEREF(__pyx_r);
8990  __Pyx_RefNannyFinishContext();
8991  return __pyx_r;
8992  }
8993 
8994  /* Python wrapper */
8995  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
9003  return __pyx_r;
9004  }
9005 
9006  /* "PyClical.pyx":1152
9007  * return clifford().wrap( self.instance.conj() )
9008  *
9009  * def quad(self): # <<<<<<<<<<<<<<
9010  * """
9011  * Quadratic form == (rev(x)*x)(0).
9012  */
9013 
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);
9022 
9023  /* "PyClical.pyx":1161
9024  * 2.0
9025  * """
9026  * return self.instance.quad() # <<<<<<<<<<<<<<
9027  *
9028  * def norm(self):
9029  */
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;
9034  __pyx_t_1 = 0;
9035  goto __pyx_L0;
9036 
9037  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9038  goto __pyx_L0;
9039  __pyx_L1_error:;
9040  __Pyx_XDECREF(__pyx_t_1);
9041  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
9042  __pyx_r = NULL;
9043  __pyx_L0:;
9044  __Pyx_XGIVEREF(__pyx_r);
9045  __Pyx_RefNannyFinishContext();
9046  return __pyx_r;
9047  }
9048 
9049  /* Python wrapper */
9050  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
9058  return __pyx_r;
9059  }
9060 
9061  /* "PyClical.pyx":1163
9062  * return self.instance.quad()
9063  *
9064  * def norm(self): # <<<<<<<<<<<<<<
9065  * """
9066  * Norm == sum of squares of coordinates.
9067  */
9068 
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);
9077 
9078  /* "PyClical.pyx":1172
9079  * 4.0
9080  * """
9081  * return self.instance.norm() # <<<<<<<<<<<<<<
9082  *
9083  * def abs(self):
9084  */
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;
9089  __pyx_t_1 = 0;
9090  goto __pyx_L0;
9091 
9092  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9093  goto __pyx_L0;
9094  __pyx_L1_error:;
9095  __Pyx_XDECREF(__pyx_t_1);
9096  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
9097  __pyx_r = NULL;
9098  __pyx_L0:;
9099  __Pyx_XGIVEREF(__pyx_r);
9100  __Pyx_RefNannyFinishContext();
9101  return __pyx_r;
9102  }
9103 
9104  /* Python wrapper */
9105  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
9113  return __pyx_r;
9114  }
9115 
9116  /* "PyClical.pyx":1174
9117  * return self.instance.norm()
9118  *
9119  * def abs(self): # <<<<<<<<<<<<<<
9120  * """
9121  * Absolute value: square root of norm.
9122  */
9123 
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);
9132 
9133  /* "PyClical.pyx":1181
9134  * 2.0
9135  * """
9136  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
9137  *
9138  * def max_abs(self):
9139  */
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;
9144  __pyx_t_1 = 0;
9145  goto __pyx_L0;
9146 
9147  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9148  goto __pyx_L0;
9149  __pyx_L1_error:;
9150  __Pyx_XDECREF(__pyx_t_1);
9151  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
9152  __pyx_r = NULL;
9153  __pyx_L0:;
9154  __Pyx_XGIVEREF(__pyx_r);
9155  __Pyx_RefNannyFinishContext();
9156  return __pyx_r;
9157  }
9158 
9159  /* Python wrapper */
9160  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
9168  return __pyx_r;
9169  }
9170 
9171  /* "PyClical.pyx":1183
9172  * return glucat.abs( self.unwrap() )
9173  *
9174  * def max_abs(self): # <<<<<<<<<<<<<<
9175  * """
9176  * Maximum of absolute values of components of multivector: multivector infinity norm.
9177  */
9178 
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);
9187 
9188  /* "PyClical.pyx":1192
9189  * 3.0
9190  * """
9191  * return self.instance.max_abs() # <<<<<<<<<<<<<<
9192  *
9193  * def truncated(self, limit):
9194  */
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;
9199  __pyx_t_1 = 0;
9200  goto __pyx_L0;
9201 
9202  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9203  goto __pyx_L0;
9204  __pyx_L1_error:;
9205  __Pyx_XDECREF(__pyx_t_1);
9206  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
9207  __pyx_r = NULL;
9208  __pyx_L0:;
9209  __Pyx_XGIVEREF(__pyx_r);
9210  __Pyx_RefNannyFinishContext();
9211  return __pyx_r;
9212  }
9213 
9214  /* Python wrapper */
9215  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
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();
9223  return __pyx_r;
9224  }
9225 
9226  /* "PyClical.pyx":1194
9227  * return self.instance.max_abs()
9228  *
9229  * def truncated(self, limit): # <<<<<<<<<<<<<<
9230  * """
9231  * Remove all terms of self with relative size smaller than limit.
9232  */
9233 
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;
9238  scalar_t __pyx_t_2;
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);
9244 
9245  /* "PyClical.pyx":1203
9246  * clifford("10000+{1}")
9247  * """
9248  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
9249  *
9250  * def isnan(self):
9251  */
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;
9260  __pyx_t_3 = 0;
9261  goto __pyx_L0;
9262 
9263  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9264  goto __pyx_L0;
9265  __pyx_L1_error:;
9266  __Pyx_XDECREF(__pyx_t_1);
9267  __Pyx_XDECREF(__pyx_t_3);
9268  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
9269  __pyx_r = NULL;
9270  __pyx_L0:;
9271  __Pyx_XGIVEREF(__pyx_r);
9272  __Pyx_RefNannyFinishContext();
9273  return __pyx_r;
9274  }
9275 
9276  /* Python wrapper */
9277  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
9285  return __pyx_r;
9286  }
9287 
9288  /* "PyClical.pyx":1205
9289  * return clifford().wrap( self.instance.truncated(limit) )
9290  *
9291  * def isnan(self): # <<<<<<<<<<<<<<
9292  * """
9293  * Check if a multivector contains any IEEE NaN values.
9294  */
9295 
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);
9304 
9305  /* "PyClical.pyx":1212
9306  * False
9307  * """
9308  * return self.instance.isnan() # <<<<<<<<<<<<<<
9309  *
9310  * def frame(self):
9311  */
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;
9316  __pyx_t_1 = 0;
9317  goto __pyx_L0;
9318 
9319  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9320  goto __pyx_L0;
9321  __pyx_L1_error:;
9322  __Pyx_XDECREF(__pyx_t_1);
9323  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
9324  __pyx_r = NULL;
9325  __pyx_L0:;
9326  __Pyx_XGIVEREF(__pyx_r);
9327  __Pyx_RefNannyFinishContext();
9328  return __pyx_r;
9329  }
9330 
9331  /* Python wrapper */
9332  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
9340  return __pyx_r;
9341  }
9342 
9343  /* "PyClical.pyx":1214
9344  * return self.instance.isnan()
9345  *
9346  * def frame(self): # <<<<<<<<<<<<<<
9347  * """
9348  * Subalgebra generated by all generators of terms of given multivector.
9349  */
9350 
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);
9360 
9361  /* "PyClical.pyx":1223
9362  * <type 'PyClical.index_set'>
9363  * """
9364  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
9365  *
9366  * def __repr__(self):
9367  */
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;
9375  __pyx_t_2 = 0;
9376  goto __pyx_L0;
9377 
9378  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9379  goto __pyx_L0;
9380  __pyx_L1_error:;
9381  __Pyx_XDECREF(__pyx_t_1);
9382  __Pyx_XDECREF(__pyx_t_2);
9383  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
9384  __pyx_r = NULL;
9385  __pyx_L0:;
9386  __Pyx_XGIVEREF(__pyx_r);
9387  __Pyx_RefNannyFinishContext();
9388  return __pyx_r;
9389  }
9390 
9391  /* Python wrapper */
9392  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
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__;
9396  #endif
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();
9403  return __pyx_r;
9404  }
9405 
9406  /* "PyClical.pyx":1225
9407  * return index_set().wrap( self.instance.frame() )
9408  *
9409  * def __repr__(self): # <<<<<<<<<<<<<<
9410  * """
9411  * The official string representation of self.
9412  */
9413 
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);
9422 
9423  /* "PyClical.pyx":1232
9424  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
9425  * """
9426  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
9427  *
9428  * def __str__(self):
9429  */
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);
9434  __pyx_t_1 = 0;
9435  goto __pyx_L0;
9436 
9437  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9438  goto __pyx_L0;
9439  __pyx_L1_error:;
9440  __Pyx_XDECREF(__pyx_t_1);
9441  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9442  __pyx_r = NULL;
9443  __pyx_L0:;
9444  __Pyx_XGIVEREF(__pyx_r);
9445  __Pyx_RefNannyFinishContext();
9446  return __pyx_r;
9447  }
9448 
9449  /* Python wrapper */
9450  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
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__;
9454  #endif
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();
9461  return __pyx_r;
9462  }
9463 
9464  /* "PyClical.pyx":1234
9465  * return clifford_to_repr( self.unwrap() ).c_str()
9466  *
9467  * def __str__(self): # <<<<<<<<<<<<<<
9468  * """
9469  * The informal string representation of self.
9470  */
9471 
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);
9480 
9481  /* "PyClical.pyx":1241
9482  * '1+3{-1}+2{1,2}+4{-2,7}'
9483  * """
9484  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
9485  *
9486  * def clifford_hidden_doctests():
9487  */
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);
9492  __pyx_t_1 = 0;
9493  goto __pyx_L0;
9494 
9495  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9496  goto __pyx_L0;
9497  __pyx_L1_error:;
9498  __Pyx_XDECREF(__pyx_t_1);
9499  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9500  __pyx_r = NULL;
9501  __pyx_L0:;
9502  __Pyx_XGIVEREF(__pyx_r);
9503  __Pyx_RefNannyFinishContext();
9504  return __pyx_r;
9505  }
9506 
9507  /* Python wrapper */
9508  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
9517  return __pyx_r;
9518  }
9519 
9520  /* "PyClical.pyx":1243
9521  * return clifford_to_str( self.unwrap() ).c_str()
9522  *
9523  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
9524  * """
9525  * Tests for functions that Doctest cannot see.
9526  */
9527 
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);
9532 
9533  /* "PyClical.pyx":1327
9534  * True
9535  * """
9536  * return # <<<<<<<<<<<<<<
9537  *
9538  * cpdef inline inv(obj):
9539  */
9540  __Pyx_XDECREF(__pyx_r);
9541  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9542  goto __pyx_L0;
9543 
9544  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9545  __pyx_L0:;
9546  __Pyx_XGIVEREF(__pyx_r);
9547  __Pyx_RefNannyFinishContext();
9548  return __pyx_r;
9549  }
9550 
9551  /* "PyClical.pyx":1329
9552  * return
9553  *
9554  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
9555  * """
9556  * Geometric multiplicative inverse.
9557  */
9558 
9559  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
9569 
9570  /* "PyClical.pyx":1342
9571  * nan
9572  * """
9573  * return clifford(obj).inv() # <<<<<<<<<<<<<<
9574  *
9575  * cpdef inline scalar(obj):
9576  */
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;
9593  __pyx_t_2 = 0;
9594  goto __pyx_L0;
9595 
9596  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9597  goto __pyx_L0;
9598  __pyx_L1_error:;
9599  __Pyx_XDECREF(__pyx_t_1);
9600  __Pyx_XDECREF(__pyx_t_2);
9601  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9602  __pyx_r = 0;
9603  __pyx_L0:;
9604  __Pyx_XGIVEREF(__pyx_r);
9605  __Pyx_RefNannyFinishContext();
9606  return __pyx_r;
9607  }
9608 
9609  /* Python wrapper */
9610  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
9618  return __pyx_r;
9619  }
9620 
9621  /* "PyClical.pyx":1329
9622  * return
9623  *
9624  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
9625  * """
9626  * Geometric multiplicative inverse.
9627  */
9628 
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;
9641  __pyx_t_1 = 0;
9642  goto __pyx_L0;
9643 
9644  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9645  goto __pyx_L0;
9646  __pyx_L1_error:;
9647  __Pyx_XDECREF(__pyx_t_1);
9648  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9649  __pyx_r = NULL;
9650  __pyx_L0:;
9651  __Pyx_XGIVEREF(__pyx_r);
9652  __Pyx_RefNannyFinishContext();
9653  return __pyx_r;
9654  }
9655 
9656  /* "PyClical.pyx":1344
9657  * return clifford(obj).inv()
9658  *
9659  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
9660  * """
9661  * Scalar part.
9662  */
9663 
9664  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
9674 
9675  /* "PyClical.pyx":1353
9676  * 0.0
9677  * """
9678  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
9679  *
9680  * cpdef inline real(obj):
9681  */
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;
9698  __pyx_t_2 = 0;
9699  goto __pyx_L0;
9700 
9701  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9702  goto __pyx_L0;
9703  __pyx_L1_error:;
9704  __Pyx_XDECREF(__pyx_t_1);
9705  __Pyx_XDECREF(__pyx_t_2);
9706  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9707  __pyx_r = 0;
9708  __pyx_L0:;
9709  __Pyx_XGIVEREF(__pyx_r);
9710  __Pyx_RefNannyFinishContext();
9711  return __pyx_r;
9712  }
9713 
9714  /* Python wrapper */
9715  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
9723  return __pyx_r;
9724  }
9725 
9726  /* "PyClical.pyx":1344
9727  * return clifford(obj).inv()
9728  *
9729  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
9730  * """
9731  * Scalar part.
9732  */
9733 
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;
9746  __pyx_t_1 = 0;
9747  goto __pyx_L0;
9748 
9749  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9750  goto __pyx_L0;
9751  __pyx_L1_error:;
9752  __Pyx_XDECREF(__pyx_t_1);
9753  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9754  __pyx_r = NULL;
9755  __pyx_L0:;
9756  __Pyx_XGIVEREF(__pyx_r);
9757  __Pyx_RefNannyFinishContext();
9758  return __pyx_r;
9759  }
9760 
9761  /* "PyClical.pyx":1355
9762  * return clifford(obj).scalar()
9763  *
9764  * cpdef inline real(obj): # <<<<<<<<<<<<<<
9765  * """
9766  * Real part: synonym for scalar part.
9767  */
9768 
9769  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
9779 
9780  /* "PyClical.pyx":1364
9781  * 0.0
9782  * """
9783  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
9784  *
9785  * cpdef inline imag(obj):
9786  */
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;
9803  __pyx_t_2 = 0;
9804  goto __pyx_L0;
9805 
9806  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9807  goto __pyx_L0;
9808  __pyx_L1_error:;
9809  __Pyx_XDECREF(__pyx_t_1);
9810  __Pyx_XDECREF(__pyx_t_2);
9811  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
9812  __pyx_r = 0;
9813  __pyx_L0:;
9814  __Pyx_XGIVEREF(__pyx_r);
9815  __Pyx_RefNannyFinishContext();
9816  return __pyx_r;
9817  }
9818 
9819  /* Python wrapper */
9820  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
9828  return __pyx_r;
9829  }
9830 
9831  /* "PyClical.pyx":1355
9832  * return clifford(obj).scalar()
9833  *
9834  * cpdef inline real(obj): # <<<<<<<<<<<<<<
9835  * """
9836  * Real part: synonym for scalar part.
9837  */
9838 
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;
9851  __pyx_t_1 = 0;
9852  goto __pyx_L0;
9853 
9854  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9855  goto __pyx_L0;
9856  __pyx_L1_error:;
9857  __Pyx_XDECREF(__pyx_t_1);
9858  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
9859  __pyx_r = NULL;
9860  __pyx_L0:;
9861  __Pyx_XGIVEREF(__pyx_r);
9862  __Pyx_RefNannyFinishContext();
9863  return __pyx_r;
9864  }
9865 
9866  /* "PyClical.pyx":1366
9867  * return clifford(obj).scalar()
9868  *
9869  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
9870  * """
9871  * Imaginary part: deprecated (always 0).
9872  */
9873 
9874  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
9883 
9884  /* "PyClical.pyx":1375
9885  * 0.0
9886  * """
9887  * return 0.0 # <<<<<<<<<<<<<<
9888  *
9889  * cpdef inline pure(obj):
9890  */
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;
9895  __pyx_t_1 = 0;
9896  goto __pyx_L0;
9897 
9898  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9899  goto __pyx_L0;
9900  __pyx_L1_error:;
9901  __Pyx_XDECREF(__pyx_t_1);
9902  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
9903  __pyx_r = 0;
9904  __pyx_L0:;
9905  __Pyx_XGIVEREF(__pyx_r);
9906  __Pyx_RefNannyFinishContext();
9907  return __pyx_r;
9908  }
9909 
9910  /* Python wrapper */
9911  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
9919  return __pyx_r;
9920  }
9921 
9922  /* "PyClical.pyx":1366
9923  * return clifford(obj).scalar()
9924  *
9925  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
9926  * """
9927  * Imaginary part: deprecated (always 0).
9928  */
9929 
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;
9942  __pyx_t_1 = 0;
9943  goto __pyx_L0;
9944 
9945  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9946  goto __pyx_L0;
9947  __pyx_L1_error:;
9948  __Pyx_XDECREF(__pyx_t_1);
9949  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
9950  __pyx_r = NULL;
9951  __pyx_L0:;
9952  __Pyx_XGIVEREF(__pyx_r);
9953  __Pyx_RefNannyFinishContext();
9954  return __pyx_r;
9955  }
9956 
9957  /* "PyClical.pyx":1377
9958  * return 0.0
9959  *
9960  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
9961  * """
9962  * Pure part
9963  */
9964 
9965  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
9975 
9976  /* "PyClical.pyx":1386
9977  * {1,2}
9978  * """
9979  * return clifford(obj).pure() # <<<<<<<<<<<<<<
9980  *
9981  * cpdef inline even(obj):
9982  */
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;
9999  __pyx_t_2 = 0;
10000  goto __pyx_L0;
10001 
10002  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10003  goto __pyx_L0;
10004  __pyx_L1_error:;
10005  __Pyx_XDECREF(__pyx_t_1);
10006  __Pyx_XDECREF(__pyx_t_2);
10007  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10008  __pyx_r = 0;
10009  __pyx_L0:;
10010  __Pyx_XGIVEREF(__pyx_r);
10011  __Pyx_RefNannyFinishContext();
10012  return __pyx_r;
10013  }
10014 
10015  /* Python wrapper */
10016  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10024  return __pyx_r;
10025  }
10026 
10027  /* "PyClical.pyx":1377
10028  * return 0.0
10029  *
10030  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
10031  * """
10032  * Pure part
10033  */
10034 
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;
10047  __pyx_t_1 = 0;
10048  goto __pyx_L0;
10049 
10050  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10051  goto __pyx_L0;
10052  __pyx_L1_error:;
10053  __Pyx_XDECREF(__pyx_t_1);
10054  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10055  __pyx_r = NULL;
10056  __pyx_L0:;
10057  __Pyx_XGIVEREF(__pyx_r);
10058  __Pyx_RefNannyFinishContext();
10059  return __pyx_r;
10060  }
10061 
10062  /* "PyClical.pyx":1388
10063  * return clifford(obj).pure()
10064  *
10065  * cpdef inline even(obj): # <<<<<<<<<<<<<<
10066  * """
10067  * Even part of multivector, sum of even grade terms.
10068  */
10069 
10070  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
10080 
10081  /* "PyClical.pyx":1395
10082  * 1+{1,2}
10083  * """
10084  * return clifford(obj).even() # <<<<<<<<<<<<<<
10085  *
10086  * cpdef inline odd(obj):
10087  */
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;
10104  __pyx_t_2 = 0;
10105  goto __pyx_L0;
10106 
10107  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10108  goto __pyx_L0;
10109  __pyx_L1_error:;
10110  __Pyx_XDECREF(__pyx_t_1);
10111  __Pyx_XDECREF(__pyx_t_2);
10112  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10113  __pyx_r = 0;
10114  __pyx_L0:;
10115  __Pyx_XGIVEREF(__pyx_r);
10116  __Pyx_RefNannyFinishContext();
10117  return __pyx_r;
10118  }
10119 
10120  /* Python wrapper */
10121  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10129  return __pyx_r;
10130  }
10131 
10132  /* "PyClical.pyx":1388
10133  * return clifford(obj).pure()
10134  *
10135  * cpdef inline even(obj): # <<<<<<<<<<<<<<
10136  * """
10137  * Even part of multivector, sum of even grade terms.
10138  */
10139 
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;
10152  __pyx_t_1 = 0;
10153  goto __pyx_L0;
10154 
10155  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10156  goto __pyx_L0;
10157  __pyx_L1_error:;
10158  __Pyx_XDECREF(__pyx_t_1);
10159  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10160  __pyx_r = NULL;
10161  __pyx_L0:;
10162  __Pyx_XGIVEREF(__pyx_r);
10163  __Pyx_RefNannyFinishContext();
10164  return __pyx_r;
10165  }
10166 
10167  /* "PyClical.pyx":1397
10168  * return clifford(obj).even()
10169  *
10170  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
10171  * """
10172  * Odd part of multivector, sum of odd grade terms.
10173  */
10174 
10175  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
10185 
10186  /* "PyClical.pyx":1404
10187  * {1}
10188  * """
10189  * return clifford(obj).odd() # <<<<<<<<<<<<<<
10190  *
10191  * cpdef inline involute(obj):
10192  */
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;
10209  __pyx_t_2 = 0;
10210  goto __pyx_L0;
10211 
10212  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10213  goto __pyx_L0;
10214  __pyx_L1_error:;
10215  __Pyx_XDECREF(__pyx_t_1);
10216  __Pyx_XDECREF(__pyx_t_2);
10217  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
10218  __pyx_r = 0;
10219  __pyx_L0:;
10220  __Pyx_XGIVEREF(__pyx_r);
10221  __Pyx_RefNannyFinishContext();
10222  return __pyx_r;
10223  }
10224 
10225  /* Python wrapper */
10226  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10234  return __pyx_r;
10235  }
10236 
10237  /* "PyClical.pyx":1397
10238  * return clifford(obj).even()
10239  *
10240  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
10241  * """
10242  * Odd part of multivector, sum of odd grade terms.
10243  */
10244 
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;
10257  __pyx_t_1 = 0;
10258  goto __pyx_L0;
10259 
10260  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10261  goto __pyx_L0;
10262  __pyx_L1_error:;
10263  __Pyx_XDECREF(__pyx_t_1);
10264  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
10265  __pyx_r = NULL;
10266  __pyx_L0:;
10267  __Pyx_XGIVEREF(__pyx_r);
10268  __Pyx_RefNannyFinishContext();
10269  return __pyx_r;
10270  }
10271 
10272  /* "PyClical.pyx":1406
10273  * return clifford(obj).odd()
10274  *
10275  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
10276  * """
10277  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
10278  */
10279 
10280  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
10290 
10291  /* "PyClical.pyx":1419
10292  * 1-{1}+{1,2}
10293  * """
10294  * return clifford(obj).involute() # <<<<<<<<<<<<<<
10295  *
10296  * cpdef inline reverse(obj):
10297  */
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;
10314  __pyx_t_2 = 0;
10315  goto __pyx_L0;
10316 
10317  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10318  goto __pyx_L0;
10319  __pyx_L1_error:;
10320  __Pyx_XDECREF(__pyx_t_1);
10321  __Pyx_XDECREF(__pyx_t_2);
10322  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10323  __pyx_r = 0;
10324  __pyx_L0:;
10325  __Pyx_XGIVEREF(__pyx_r);
10326  __Pyx_RefNannyFinishContext();
10327  return __pyx_r;
10328  }
10329 
10330  /* Python wrapper */
10331  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10339  return __pyx_r;
10340  }
10341 
10342  /* "PyClical.pyx":1406
10343  * return clifford(obj).odd()
10344  *
10345  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
10346  * """
10347  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
10348  */
10349 
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;
10362  __pyx_t_1 = 0;
10363  goto __pyx_L0;
10364 
10365  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10366  goto __pyx_L0;
10367  __pyx_L1_error:;
10368  __Pyx_XDECREF(__pyx_t_1);
10369  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10370  __pyx_r = NULL;
10371  __pyx_L0:;
10372  __Pyx_XGIVEREF(__pyx_r);
10373  __Pyx_RefNannyFinishContext();
10374  return __pyx_r;
10375  }
10376 
10377  /* "PyClical.pyx":1421
10378  * return clifford(obj).involute()
10379  *
10380  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
10381  * """
10382  * Reversion, eg. {1}*{2} -> {2}*{1}
10383  */
10384 
10385  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
10395 
10396  /* "PyClical.pyx":1434
10397  * 1+{1}-{1,2}
10398  * """
10399  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
10400  *
10401  * cpdef inline conj(obj):
10402  */
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;
10419  __pyx_t_2 = 0;
10420  goto __pyx_L0;
10421 
10422  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10423  goto __pyx_L0;
10424  __pyx_L1_error:;
10425  __Pyx_XDECREF(__pyx_t_1);
10426  __Pyx_XDECREF(__pyx_t_2);
10427  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10428  __pyx_r = 0;
10429  __pyx_L0:;
10430  __Pyx_XGIVEREF(__pyx_r);
10431  __Pyx_RefNannyFinishContext();
10432  return __pyx_r;
10433  }
10434 
10435  /* Python wrapper */
10436  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10444  return __pyx_r;
10445  }
10446 
10447  /* "PyClical.pyx":1421
10448  * return clifford(obj).involute()
10449  *
10450  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
10451  * """
10452  * Reversion, eg. {1}*{2} -> {2}*{1}
10453  */
10454 
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;
10467  __pyx_t_1 = 0;
10468  goto __pyx_L0;
10469 
10470  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10471  goto __pyx_L0;
10472  __pyx_L1_error:;
10473  __Pyx_XDECREF(__pyx_t_1);
10474  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10475  __pyx_r = NULL;
10476  __pyx_L0:;
10477  __Pyx_XGIVEREF(__pyx_r);
10478  __Pyx_RefNannyFinishContext();
10479  return __pyx_r;
10480  }
10481 
10482  /* "PyClical.pyx":1436
10483  * return clifford(obj).reverse()
10484  *
10485  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
10486  * """
10487  * Conjugation, reverse o involute == involute o reverse.
10488  */
10489 
10490  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
10500 
10501  /* "PyClical.pyx":1449
10502  * 1-{1}-{1,2}
10503  * """
10504  * return clifford(obj).conj() # <<<<<<<<<<<<<<
10505  *
10506  * cpdef inline quad(obj):
10507  */
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;
10524  __pyx_t_2 = 0;
10525  goto __pyx_L0;
10526 
10527  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10528  goto __pyx_L0;
10529  __pyx_L1_error:;
10530  __Pyx_XDECREF(__pyx_t_1);
10531  __Pyx_XDECREF(__pyx_t_2);
10532  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10533  __pyx_r = 0;
10534  __pyx_L0:;
10535  __Pyx_XGIVEREF(__pyx_r);
10536  __Pyx_RefNannyFinishContext();
10537  return __pyx_r;
10538  }
10539 
10540  /* Python wrapper */
10541  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10549  return __pyx_r;
10550  }
10551 
10552  /* "PyClical.pyx":1436
10553  * return clifford(obj).reverse()
10554  *
10555  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
10556  * """
10557  * Conjugation, reverse o involute == involute o reverse.
10558  */
10559 
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;
10572  __pyx_t_1 = 0;
10573  goto __pyx_L0;
10574 
10575  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10576  goto __pyx_L0;
10577  __pyx_L1_error:;
10578  __Pyx_XDECREF(__pyx_t_1);
10579  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10580  __pyx_r = NULL;
10581  __pyx_L0:;
10582  __Pyx_XGIVEREF(__pyx_r);
10583  __Pyx_RefNannyFinishContext();
10584  return __pyx_r;
10585  }
10586 
10587  /* "PyClical.pyx":1451
10588  * return clifford(obj).conj()
10589  *
10590  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
10591  * """
10592  * Quadratic form == (rev(x)*x)(0).
10593  */
10594 
10595  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
10605 
10606  /* "PyClical.pyx":1460
10607  * 2.0
10608  * """
10609  * return clifford(obj).quad() # <<<<<<<<<<<<<<
10610  *
10611  * cpdef inline norm(obj):
10612  */
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;
10629  __pyx_t_2 = 0;
10630  goto __pyx_L0;
10631 
10632  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10633  goto __pyx_L0;
10634  __pyx_L1_error:;
10635  __Pyx_XDECREF(__pyx_t_1);
10636  __Pyx_XDECREF(__pyx_t_2);
10637  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10638  __pyx_r = 0;
10639  __pyx_L0:;
10640  __Pyx_XGIVEREF(__pyx_r);
10641  __Pyx_RefNannyFinishContext();
10642  return __pyx_r;
10643  }
10644 
10645  /* Python wrapper */
10646  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10654  return __pyx_r;
10655  }
10656 
10657  /* "PyClical.pyx":1451
10658  * return clifford(obj).conj()
10659  *
10660  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
10661  * """
10662  * Quadratic form == (rev(x)*x)(0).
10663  */
10664 
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;
10677  __pyx_t_1 = 0;
10678  goto __pyx_L0;
10679 
10680  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10681  goto __pyx_L0;
10682  __pyx_L1_error:;
10683  __Pyx_XDECREF(__pyx_t_1);
10684  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10685  __pyx_r = NULL;
10686  __pyx_L0:;
10687  __Pyx_XGIVEREF(__pyx_r);
10688  __Pyx_RefNannyFinishContext();
10689  return __pyx_r;
10690  }
10691 
10692  /* "PyClical.pyx":1462
10693  * return clifford(obj).quad()
10694  *
10695  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
10696  * """
10697  * norm == sum of squares of coordinates.
10698  */
10699 
10700  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
10710 
10711  /* "PyClical.pyx":1471
10712  * 4.0
10713  * """
10714  * return clifford(obj).norm() # <<<<<<<<<<<<<<
10715  *
10716  * cpdef inline abs(obj):
10717  */
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;
10734  __pyx_t_2 = 0;
10735  goto __pyx_L0;
10736 
10737  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10738  goto __pyx_L0;
10739  __pyx_L1_error:;
10740  __Pyx_XDECREF(__pyx_t_1);
10741  __Pyx_XDECREF(__pyx_t_2);
10742  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10743  __pyx_r = 0;
10744  __pyx_L0:;
10745  __Pyx_XGIVEREF(__pyx_r);
10746  __Pyx_RefNannyFinishContext();
10747  return __pyx_r;
10748  }
10749 
10750  /* Python wrapper */
10751  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10759  return __pyx_r;
10760  }
10761 
10762  /* "PyClical.pyx":1462
10763  * return clifford(obj).quad()
10764  *
10765  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
10766  * """
10767  * norm == sum of squares of coordinates.
10768  */
10769 
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;
10782  __pyx_t_1 = 0;
10783  goto __pyx_L0;
10784 
10785  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10786  goto __pyx_L0;
10787  __pyx_L1_error:;
10788  __Pyx_XDECREF(__pyx_t_1);
10789  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10790  __pyx_r = NULL;
10791  __pyx_L0:;
10792  __Pyx_XGIVEREF(__pyx_r);
10793  __Pyx_RefNannyFinishContext();
10794  return __pyx_r;
10795  }
10796 
10797  /* "PyClical.pyx":1473
10798  * return clifford(obj).norm()
10799  *
10800  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
10801  * """
10802  * Absolute value of multivector: multivector 2-norm.
10803  */
10804 
10805  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
10814 
10815  /* "PyClical.pyx":1480
10816  * 2.0
10817  * """
10818  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
10819  *
10820  * cpdef inline max_abs(obj):
10821  */
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;
10826  __pyx_t_1 = 0;
10827  goto __pyx_L0;
10828 
10829  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10830  goto __pyx_L0;
10831  __pyx_L1_error:;
10832  __Pyx_XDECREF(__pyx_t_1);
10833  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10834  __pyx_r = 0;
10835  __pyx_L0:;
10836  __Pyx_XGIVEREF(__pyx_r);
10837  __Pyx_RefNannyFinishContext();
10838  return __pyx_r;
10839  }
10840 
10841  /* Python wrapper */
10842  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10850  return __pyx_r;
10851  }
10852 
10853  /* "PyClical.pyx":1473
10854  * return clifford(obj).norm()
10855  *
10856  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
10857  * """
10858  * Absolute value of multivector: multivector 2-norm.
10859  */
10860 
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;
10873  __pyx_t_1 = 0;
10874  goto __pyx_L0;
10875 
10876  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10877  goto __pyx_L0;
10878  __pyx_L1_error:;
10879  __Pyx_XDECREF(__pyx_t_1);
10880  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10881  __pyx_r = NULL;
10882  __pyx_L0:;
10883  __Pyx_XGIVEREF(__pyx_r);
10884  __Pyx_RefNannyFinishContext();
10885  return __pyx_r;
10886  }
10887 
10888  /* "PyClical.pyx":1482
10889  * return glucat.abs(toClifford(obj))
10890  *
10891  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
10892  * """
10893  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
10894  */
10895 
10896  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
10905 
10906  /* "PyClical.pyx":1492
10907  *
10908  * """
10909  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
10910  *
10911  * cpdef inline pow(obj, m):
10912  */
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;
10917  __pyx_t_1 = 0;
10918  goto __pyx_L0;
10919 
10920  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10921  goto __pyx_L0;
10922  __pyx_L1_error:;
10923  __Pyx_XDECREF(__pyx_t_1);
10924  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10925  __pyx_r = 0;
10926  __pyx_L0:;
10927  __Pyx_XGIVEREF(__pyx_r);
10928  __Pyx_RefNannyFinishContext();
10929  return __pyx_r;
10930  }
10931 
10932  /* Python wrapper */
10933  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
10941  return __pyx_r;
10942  }
10943 
10944  /* "PyClical.pyx":1482
10945  * return glucat.abs(toClifford(obj))
10946  *
10947  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
10948  * """
10949  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
10950  */
10951 
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;
10964  __pyx_t_1 = 0;
10965  goto __pyx_L0;
10966 
10967  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10968  goto __pyx_L0;
10969  __pyx_L1_error:;
10970  __Pyx_XDECREF(__pyx_t_1);
10971  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10972  __pyx_r = NULL;
10973  __pyx_L0:;
10974  __Pyx_XGIVEREF(__pyx_r);
10975  __Pyx_RefNannyFinishContext();
10976  return __pyx_r;
10977  }
10978 
10979  /* "PyClical.pyx":1494
10980  * return glucat.max_abs(toClifford(obj))
10981  *
10982  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
10983  * """
10984  * Integer power of multivector: obj to the m.
10985  */
10986 
10987  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
11004 
11005  /* "PyClical.pyx":1513
11006  * 1
11007  * """
11008  * try: # <<<<<<<<<<<<<<
11009  * math.pow(obj, m)
11010  * except:
11011  */
11012  {
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);
11017  /*try:*/ {
11018 
11019  /* "PyClical.pyx":1514
11020  * """
11021  * try:
11022  * math.pow(obj, m) # <<<<<<<<<<<<<<
11023  * except:
11024  * return clifford(obj).pow(m)
11025  */
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;
11044  }
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;
11049  __pyx_L3_error:;
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;
11053 
11054  /* "PyClical.pyx":1515
11055  * try:
11056  * math.pow(obj, m)
11057  * except: # <<<<<<<<<<<<<<
11058  * return clifford(obj).pow(m)
11059  *
11060  */
11061  /*except:*/ {
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);
11067 
11068  /* "PyClical.pyx":1516
11069  * math.pow(obj, m)
11070  * except:
11071  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
11072  *
11073  * cpdef inline outer_pow(obj, m):
11074  */
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;
11097  __pyx_t_9 = 0;
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;
11106  }
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);
11118  goto __pyx_L0;
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:;
11125  }
11126 
11127  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11128  goto __pyx_L0;
11129  __pyx_L1_error:;
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);
11137  __pyx_r = 0;
11138  __pyx_L0:;
11139  __Pyx_XGIVEREF(__pyx_r);
11140  __Pyx_RefNannyFinishContext();
11141  return __pyx_r;
11142  }
11143 
11144  /* Python wrapper */
11145  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
11156  {
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);
11165  case 0: break;
11166  default: goto __pyx_L5_argtuple_error;
11167  }
11168  kw_args = PyDict_Size(__pyx_kwds);
11169  switch (pos_args) {
11170  case 0:
11171  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
11172  else goto __pyx_L5_argtuple_error;
11173  case 1:
11174  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__m)) != 0)) kw_args--;
11175  else {
11176  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11177  }
11178  }
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;}
11181  }
11182  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11183  goto __pyx_L5_argtuple_error;
11184  } else {
11185  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11186  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11187  }
11188  __pyx_v_obj = values[0];
11189  __pyx_v_m = values[1];
11190  }
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;}
11194  __pyx_L3_error:;
11195  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11196  __Pyx_RefNannyFinishContext();
11197  return NULL;
11198  __pyx_L4_argument_unpacking_done:;
11199  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
11200  __Pyx_RefNannyFinishContext();
11201  return __pyx_r;
11202  }
11203 
11204  /* "PyClical.pyx":1494
11205  * return glucat.max_abs(toClifford(obj))
11206  *
11207  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
11208  * """
11209  * Integer power of multivector: obj to the m.
11210  */
11211 
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;
11224  __pyx_t_1 = 0;
11225  goto __pyx_L0;
11226 
11227  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11228  goto __pyx_L0;
11229  __pyx_L1_error:;
11230  __Pyx_XDECREF(__pyx_t_1);
11231  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11232  __pyx_r = NULL;
11233  __pyx_L0:;
11234  __Pyx_XGIVEREF(__pyx_r);
11235  __Pyx_RefNannyFinishContext();
11236  return __pyx_r;
11237  }
11238 
11239  /* "PyClical.pyx":1518
11240  * return clifford(obj).pow(m)
11241  *
11242  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
11243  * """
11244  * Outer product power of multivector.
11245  */
11246 
11247  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
11258 
11259  /* "PyClical.pyx":1525
11260  * 1+3{1}+3{1,2}
11261  * """
11262  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
11263  *
11264  * cpdef inline complexifier(obj):
11265  */
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;
11288  __pyx_t_3 = 0;
11289  goto __pyx_L0;
11290 
11291  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11292  goto __pyx_L0;
11293  __pyx_L1_error:;
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);
11298  __pyx_r = 0;
11299  __pyx_L0:;
11300  __Pyx_XGIVEREF(__pyx_r);
11301  __Pyx_RefNannyFinishContext();
11302  return __pyx_r;
11303  }
11304 
11305  /* Python wrapper */
11306  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
11317  {
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);
11326  case 0: break;
11327  default: goto __pyx_L5_argtuple_error;
11328  }
11329  kw_args = PyDict_Size(__pyx_kwds);
11330  switch (pos_args) {
11331  case 0:
11332  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
11333  else goto __pyx_L5_argtuple_error;
11334  case 1:
11335  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__m)) != 0)) kw_args--;
11336  else {
11337  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11338  }
11339  }
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;}
11342  }
11343  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11344  goto __pyx_L5_argtuple_error;
11345  } else {
11346  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11347  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11348  }
11349  __pyx_v_obj = values[0];
11350  __pyx_v_m = values[1];
11351  }
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;}
11355  __pyx_L3_error:;
11356  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11357  __Pyx_RefNannyFinishContext();
11358  return NULL;
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();
11362  return __pyx_r;
11363  }
11364 
11365  /* "PyClical.pyx":1518
11366  * return clifford(obj).pow(m)
11367  *
11368  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
11369  * """
11370  * Outer product power of multivector.
11371  */
11372 
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;
11385  __pyx_t_1 = 0;
11386  goto __pyx_L0;
11387 
11388  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11389  goto __pyx_L0;
11390  __pyx_L1_error:;
11391  __Pyx_XDECREF(__pyx_t_1);
11392  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11393  __pyx_r = NULL;
11394  __pyx_L0:;
11395  __Pyx_XGIVEREF(__pyx_r);
11396  __Pyx_RefNannyFinishContext();
11397  return __pyx_r;
11398  }
11399 
11400  /* "PyClical.pyx":1527
11401  * return clifford(obj).outer_pow(m)
11402  *
11403  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
11404  * """
11405  * Square root of -1 which commutes with all members of the frame of the given multivector.
11406  */
11407 
11408  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
11418 
11419  /* "PyClical.pyx":1540
11420  * {-1}
11421  * """
11422  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
11423  *
11424  * cpdef inline sqrt(obj, i = None):
11425  */
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;
11433  __pyx_t_2 = 0;
11434  goto __pyx_L0;
11435 
11436  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11437  goto __pyx_L0;
11438  __pyx_L1_error:;
11439  __Pyx_XDECREF(__pyx_t_1);
11440  __Pyx_XDECREF(__pyx_t_2);
11441  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
11442  __pyx_r = 0;
11443  __pyx_L0:;
11444  __Pyx_XGIVEREF(__pyx_r);
11445  __Pyx_RefNannyFinishContext();
11446  return __pyx_r;
11447  }
11448 
11449  /* Python wrapper */
11450  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
11458  return __pyx_r;
11459  }
11460 
11461  /* "PyClical.pyx":1527
11462  * return clifford(obj).outer_pow(m)
11463  *
11464  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
11465  * """
11466  * Square root of -1 which commutes with all members of the frame of the given multivector.
11467  */
11468 
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;
11481  __pyx_t_1 = 0;
11482  goto __pyx_L0;
11483 
11484  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11485  goto __pyx_L0;
11486  __pyx_L1_error:;
11487  __Pyx_XDECREF(__pyx_t_1);
11488  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
11489  __pyx_r = NULL;
11490  __pyx_L0:;
11491  __Pyx_XGIVEREF(__pyx_r);
11492  __Pyx_RefNannyFinishContext();
11493  return __pyx_r;
11494  }
11495 
11496  /* "PyClical.pyx":1542
11497  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
11498  *
11499  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
11500  * """
11501  * Square root of multivector with optional complexifier.
11502  */
11503 
11504  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
11509  int __pyx_t_1;
11510  int __pyx_t_2;
11511  PyObject *__pyx_t_3 = NULL;
11512  Clifford __pyx_t_4;
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;
11527  }
11528  }
11529 
11530  /* "PyClical.pyx":1557
11531  * -1
11532  * """
11533  * if not (i is None): # <<<<<<<<<<<<<<
11534  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
11535  * else:
11536  */
11537  __pyx_t_1 = (__pyx_v_i == Py_None);
11538  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
11539  if (__pyx_t_2) {
11540 
11541  /* "PyClical.pyx":1558
11542  * """
11543  * if not (i is None):
11544  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
11545  * else:
11546  * try:
11547  */
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);
11551  try {
11552  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
11553  } catch(...) {
11554  __Pyx_CppExn2PyErr();
11555  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11556  }
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;
11561  __pyx_t_5 = 0;
11562  goto __pyx_L0;
11563  goto __pyx_L3;
11564  }
11565  /*else*/ {
11566 
11567  /* "PyClical.pyx":1560
11568  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
11569  * else:
11570  * try: # <<<<<<<<<<<<<<
11571  * return math.sqrt(obj)
11572  * except:
11573  */
11574  {
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);
11579  /*try:*/ {
11580 
11581  /* "PyClical.pyx":1561
11582  * else:
11583  * try:
11584  * return math.sqrt(obj) # <<<<<<<<<<<<<<
11585  * except:
11586  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
11587  */
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;
11604  __pyx_t_9 = 0;
11605  goto __pyx_L8_try_return;
11606  }
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);
11616  goto __pyx_L0;
11617  __pyx_L4_error:;
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;
11621 
11622  /* "PyClical.pyx":1562
11623  * try:
11624  * return math.sqrt(obj)
11625  * except: # <<<<<<<<<<<<<<
11626  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
11627  *
11628  */
11629  /*except:*/ {
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);
11635 
11636  /* "PyClical.pyx":1563
11637  * return math.sqrt(obj)
11638  * except:
11639  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
11640  *
11641  * cpdef inline exp(obj):
11642  */
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;
11650  __pyx_t_11 = 0;
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;
11659  }
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);
11671  goto __pyx_L0;
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:;
11678  }
11679  }
11680  __pyx_L3:;
11681 
11682  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11683  goto __pyx_L0;
11684  __pyx_L1_error:;
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);
11691  __pyx_r = 0;
11692  __pyx_L0:;
11693  __Pyx_XGIVEREF(__pyx_r);
11694  __Pyx_RefNannyFinishContext();
11695  return __pyx_r;
11696  }
11697 
11698  /* Python wrapper */
11699  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
11710  {
11711  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
11712  PyObject* values[2] = {0,0};
11713 
11714  /* "PyClical.pyx":1542
11715  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
11716  *
11717  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
11718  * """
11719  * Square root of multivector with optional complexifier.
11720  */
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);
11728  case 0: break;
11729  default: goto __pyx_L5_argtuple_error;
11730  }
11731  kw_args = PyDict_Size(__pyx_kwds);
11732  switch (pos_args) {
11733  case 0:
11734  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
11735  else goto __pyx_L5_argtuple_error;
11736  case 1:
11737  if (kw_args > 0) {
11738  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
11739  if (value) { values[1] = value; kw_args--; }
11740  }
11741  }
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;}
11744  }
11745  } else {
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);
11749  break;
11750  default: goto __pyx_L5_argtuple_error;
11751  }
11752  }
11753  __pyx_v_obj = values[0];
11754  __pyx_v_i = values[1];
11755  }
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;}
11759  __pyx_L3_error:;
11760  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
11761  __Pyx_RefNannyFinishContext();
11762  return NULL;
11763  __pyx_L4_argument_unpacking_done:;
11764  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
11765  __Pyx_RefNannyFinishContext();
11766  return __pyx_r;
11767  }
11768 
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;
11784  __pyx_t_1 = 0;
11785  goto __pyx_L0;
11786 
11787  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11788  goto __pyx_L0;
11789  __pyx_L1_error:;
11790  __Pyx_XDECREF(__pyx_t_1);
11791  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
11792  __pyx_r = NULL;
11793  __pyx_L0:;
11794  __Pyx_XGIVEREF(__pyx_r);
11795  __Pyx_RefNannyFinishContext();
11796  return __pyx_r;
11797  }
11798 
11799  /* "PyClical.pyx":1565
11800  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
11801  *
11802  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
11803  * """
11804  * Exponential of multivector.
11805  */
11806 
11807  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
11823 
11824  /* "PyClical.pyx":1574
11825  * {1,2}
11826  * """
11827  * try: # <<<<<<<<<<<<<<
11828  * return math.exp(obj)
11829  * except:
11830  */
11831  {
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);
11836  /*try:*/ {
11837 
11838  /* "PyClical.pyx":1575
11839  * """
11840  * try:
11841  * return math.exp(obj) # <<<<<<<<<<<<<<
11842  * except:
11843  * return clifford().wrap( glucat.exp(toClifford(obj)) )
11844  */
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;
11861  __pyx_t_6 = 0;
11862  goto __pyx_L7_try_return;
11863  }
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);
11873  goto __pyx_L0;
11874  __pyx_L3_error:;
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;
11878 
11879  /* "PyClical.pyx":1576
11880  * try:
11881  * return math.exp(obj)
11882  * except: # <<<<<<<<<<<<<<
11883  * return clifford().wrap( glucat.exp(toClifford(obj)) )
11884  *
11885  */
11886  /*except:*/ {
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);
11892 
11893  /* "PyClical.pyx":1577
11894  * return math.exp(obj)
11895  * except:
11896  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
11897  *
11898  * cpdef inline log(obj,i = None):
11899  */
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;
11907  __pyx_t_8 = 0;
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;
11916  }
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);
11928  goto __pyx_L0;
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:;
11935  }
11936 
11937  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11938  goto __pyx_L0;
11939  __pyx_L1_error:;
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);
11946  __pyx_r = 0;
11947  __pyx_L0:;
11948  __Pyx_XGIVEREF(__pyx_r);
11949  __Pyx_RefNannyFinishContext();
11950  return __pyx_r;
11951  }
11952 
11953  /* Python wrapper */
11954  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
11962  return __pyx_r;
11963  }
11964 
11965  /* "PyClical.pyx":1565
11966  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
11967  *
11968  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
11969  * """
11970  * Exponential of multivector.
11971  */
11972 
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;
11985  __pyx_t_1 = 0;
11986  goto __pyx_L0;
11987 
11988  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11989  goto __pyx_L0;
11990  __pyx_L1_error:;
11991  __Pyx_XDECREF(__pyx_t_1);
11992  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
11993  __pyx_r = NULL;
11994  __pyx_L0:;
11995  __Pyx_XGIVEREF(__pyx_r);
11996  __Pyx_RefNannyFinishContext();
11997  return __pyx_r;
11998  }
11999 
12000  /* "PyClical.pyx":1579
12001  * return clifford().wrap( glucat.exp(toClifford(obj)) )
12002  *
12003  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
12004  * """
12005  * Natural logarithm of multivector with optional complexifier.
12006  */
12007 
12008  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
12013  int __pyx_t_1;
12014  int __pyx_t_2;
12015  PyObject *__pyx_t_3 = NULL;
12016  Clifford __pyx_t_4;
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;
12031  }
12032  }
12033 
12034  /* "PyClical.pyx":1594
12035  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
12036  * """
12037  * if not (i is None): # <<<<<<<<<<<<<<
12038  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
12039  * else:
12040  */
12041  __pyx_t_1 = (__pyx_v_i == Py_None);
12042  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
12043  if (__pyx_t_2) {
12044 
12045  /* "PyClical.pyx":1595
12046  * """
12047  * if not (i is None):
12048  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
12049  * else:
12050  * try:
12051  */
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);
12055  try {
12056  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12057  } catch(...) {
12058  __Pyx_CppExn2PyErr();
12059  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12060  }
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;
12065  __pyx_t_5 = 0;
12066  goto __pyx_L0;
12067  goto __pyx_L3;
12068  }
12069  /*else*/ {
12070 
12071  /* "PyClical.pyx":1597
12072  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
12073  * else:
12074  * try: # <<<<<<<<<<<<<<
12075  * return math.log(obj)
12076  * except:
12077  */
12078  {
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);
12083  /*try:*/ {
12084 
12085  /* "PyClical.pyx":1598
12086  * else:
12087  * try:
12088  * return math.log(obj) # <<<<<<<<<<<<<<
12089  * except:
12090  * return clifford().wrap( glucat.log(toClifford(obj)) )
12091  */
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;
12108  __pyx_t_9 = 0;
12109  goto __pyx_L8_try_return;
12110  }
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);
12120  goto __pyx_L0;
12121  __pyx_L4_error:;
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;
12125 
12126  /* "PyClical.pyx":1599
12127  * try:
12128  * return math.log(obj)
12129  * except: # <<<<<<<<<<<<<<
12130  * return clifford().wrap( glucat.log(toClifford(obj)) )
12131  *
12132  */
12133  /*except:*/ {
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);
12139 
12140  /* "PyClical.pyx":1600
12141  * return math.log(obj)
12142  * except:
12143  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
12144  *
12145  * cpdef inline cos(obj,i = None):
12146  */
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;
12154  __pyx_t_11 = 0;
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;
12163  }
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);
12175  goto __pyx_L0;
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:;
12182  }
12183  }
12184  __pyx_L3:;
12185 
12186  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12187  goto __pyx_L0;
12188  __pyx_L1_error:;
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);
12195  __pyx_r = 0;
12196  __pyx_L0:;
12197  __Pyx_XGIVEREF(__pyx_r);
12198  __Pyx_RefNannyFinishContext();
12199  return __pyx_r;
12200  }
12201 
12202  /* Python wrapper */
12203  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
12214  {
12215  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
12216  PyObject* values[2] = {0,0};
12217 
12218  /* "PyClical.pyx":1579
12219  * return clifford().wrap( glucat.exp(toClifford(obj)) )
12220  *
12221  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
12222  * """
12223  * Natural logarithm of multivector with optional complexifier.
12224  */
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);
12232  case 0: break;
12233  default: goto __pyx_L5_argtuple_error;
12234  }
12235  kw_args = PyDict_Size(__pyx_kwds);
12236  switch (pos_args) {
12237  case 0:
12238  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
12239  else goto __pyx_L5_argtuple_error;
12240  case 1:
12241  if (kw_args > 0) {
12242  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
12243  if (value) { values[1] = value; kw_args--; }
12244  }
12245  }
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;}
12248  }
12249  } else {
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);
12253  break;
12254  default: goto __pyx_L5_argtuple_error;
12255  }
12256  }
12257  __pyx_v_obj = values[0];
12258  __pyx_v_i = values[1];
12259  }
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;}
12263  __pyx_L3_error:;
12264  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
12265  __Pyx_RefNannyFinishContext();
12266  return NULL;
12267  __pyx_L4_argument_unpacking_done:;
12268  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
12269  __Pyx_RefNannyFinishContext();
12270  return __pyx_r;
12271  }
12272 
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;
12288  __pyx_t_1 = 0;
12289  goto __pyx_L0;
12290 
12291  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12292  goto __pyx_L0;
12293  __pyx_L1_error:;
12294  __Pyx_XDECREF(__pyx_t_1);
12295  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
12296  __pyx_r = NULL;
12297  __pyx_L0:;
12298  __Pyx_XGIVEREF(__pyx_r);
12299  __Pyx_RefNannyFinishContext();
12300  return __pyx_r;
12301  }
12302 
12303  /* "PyClical.pyx":1602
12304  * return clifford().wrap( glucat.log(toClifford(obj)) )
12305  *
12306  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
12307  * """
12308  * Cosine of multivector with optional complexifier.
12309  */
12310 
12311  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
12316  int __pyx_t_1;
12317  int __pyx_t_2;
12318  PyObject *__pyx_t_3 = NULL;
12319  Clifford __pyx_t_4;
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;
12334  }
12335  }
12336 
12337  /* "PyClical.pyx":1611
12338  * {1,2}
12339  * """
12340  * if not (i is None): # <<<<<<<<<<<<<<
12341  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
12342  * else:
12343  */
12344  __pyx_t_1 = (__pyx_v_i == Py_None);
12345  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
12346  if (__pyx_t_2) {
12347 
12348  /* "PyClical.pyx":1612
12349  * """
12350  * if not (i is None):
12351  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
12352  * else:
12353  * try:
12354  */
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);
12358  try {
12359  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12360  } catch(...) {
12361  __Pyx_CppExn2PyErr();
12362  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12363  }
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;
12368  __pyx_t_5 = 0;
12369  goto __pyx_L0;
12370  goto __pyx_L3;
12371  }
12372  /*else*/ {
12373 
12374  /* "PyClical.pyx":1614
12375  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
12376  * else:
12377  * try: # <<<<<<<<<<<<<<
12378  * return math.cos(obj)
12379  * except:
12380  */
12381  {
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);
12386  /*try:*/ {
12387 
12388  /* "PyClical.pyx":1615
12389  * else:
12390  * try:
12391  * return math.cos(obj) # <<<<<<<<<<<<<<
12392  * except:
12393  * return clifford().wrap( glucat.cos(toClifford(obj)) )
12394  */
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;
12411  __pyx_t_9 = 0;
12412  goto __pyx_L8_try_return;
12413  }
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);
12423  goto __pyx_L0;
12424  __pyx_L4_error:;
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;
12428 
12429  /* "PyClical.pyx":1616
12430  * try:
12431  * return math.cos(obj)
12432  * except: # <<<<<<<<<<<<<<
12433  * return clifford().wrap( glucat.cos(toClifford(obj)) )
12434  *
12435  */
12436  /*except:*/ {
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);
12442 
12443  /* "PyClical.pyx":1617
12444  * return math.cos(obj)
12445  * except:
12446  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
12447  *
12448  * cpdef inline acos(obj,i = None):
12449  */
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;
12457  __pyx_t_11 = 0;
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;
12466  }
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);
12478  goto __pyx_L0;
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:;
12485  }
12486  }
12487  __pyx_L3:;
12488 
12489  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12490  goto __pyx_L0;
12491  __pyx_L1_error:;
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);
12498  __pyx_r = 0;
12499  __pyx_L0:;
12500  __Pyx_XGIVEREF(__pyx_r);
12501  __Pyx_RefNannyFinishContext();
12502  return __pyx_r;
12503  }
12504 
12505  /* Python wrapper */
12506  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
12517  {
12518  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
12519  PyObject* values[2] = {0,0};
12520 
12521  /* "PyClical.pyx":1602
12522  * return clifford().wrap( glucat.log(toClifford(obj)) )
12523  *
12524  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
12525  * """
12526  * Cosine of multivector with optional complexifier.
12527  */
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);
12535  case 0: break;
12536  default: goto __pyx_L5_argtuple_error;
12537  }
12538  kw_args = PyDict_Size(__pyx_kwds);
12539  switch (pos_args) {
12540  case 0:
12541  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
12542  else goto __pyx_L5_argtuple_error;
12543  case 1:
12544  if (kw_args > 0) {
12545  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
12546  if (value) { values[1] = value; kw_args--; }
12547  }
12548  }
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;}
12551  }
12552  } else {
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);
12556  break;
12557  default: goto __pyx_L5_argtuple_error;
12558  }
12559  }
12560  __pyx_v_obj = values[0];
12561  __pyx_v_i = values[1];
12562  }
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;}
12566  __pyx_L3_error:;
12567  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12568  __Pyx_RefNannyFinishContext();
12569  return NULL;
12570  __pyx_L4_argument_unpacking_done:;
12571  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
12572  __Pyx_RefNannyFinishContext();
12573  return __pyx_r;
12574  }
12575 
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;
12591  __pyx_t_1 = 0;
12592  goto __pyx_L0;
12593 
12594  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12595  goto __pyx_L0;
12596  __pyx_L1_error:;
12597  __Pyx_XDECREF(__pyx_t_1);
12598  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12599  __pyx_r = NULL;
12600  __pyx_L0:;
12601  __Pyx_XGIVEREF(__pyx_r);
12602  __Pyx_RefNannyFinishContext();
12603  return __pyx_r;
12604  }
12605 
12606  /* "PyClical.pyx":1619
12607  * return clifford().wrap( glucat.cos(toClifford(obj)) )
12608  *
12609  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
12610  * """
12611  * Inverse cosine of multivector with optional complexifier.
12612  */
12613 
12614  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
12619  int __pyx_t_1;
12620  int __pyx_t_2;
12621  PyObject *__pyx_t_3 = NULL;
12622  Clifford __pyx_t_4;
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;
12637  }
12638  }
12639 
12640  /* "PyClical.pyx":1632
12641  * {1,2}
12642  * """
12643  * if not (i is None): # <<<<<<<<<<<<<<
12644  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
12645  * else:
12646  */
12647  __pyx_t_1 = (__pyx_v_i == Py_None);
12648  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
12649  if (__pyx_t_2) {
12650 
12651  /* "PyClical.pyx":1633
12652  * """
12653  * if not (i is None):
12654  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
12655  * else:
12656  * try:
12657  */
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);
12661  try {
12662  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12663  } catch(...) {
12664  __Pyx_CppExn2PyErr();
12665  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12666  }
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;
12671  __pyx_t_5 = 0;
12672  goto __pyx_L0;
12673  goto __pyx_L3;
12674  }
12675  /*else*/ {
12676 
12677  /* "PyClical.pyx":1635
12678  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
12679  * else:
12680  * try: # <<<<<<<<<<<<<<
12681  * return math.acos(obj)
12682  * except:
12683  */
12684  {
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);
12689  /*try:*/ {
12690 
12691  /* "PyClical.pyx":1636
12692  * else:
12693  * try:
12694  * return math.acos(obj) # <<<<<<<<<<<<<<
12695  * except:
12696  * return clifford().wrap( glucat.acos(toClifford(obj)) )
12697  */
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;
12714  __pyx_t_9 = 0;
12715  goto __pyx_L8_try_return;
12716  }
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);
12726  goto __pyx_L0;
12727  __pyx_L4_error:;
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;
12731 
12732  /* "PyClical.pyx":1637
12733  * try:
12734  * return math.acos(obj)
12735  * except: # <<<<<<<<<<<<<<
12736  * return clifford().wrap( glucat.acos(toClifford(obj)) )
12737  *
12738  */
12739  /*except:*/ {
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);
12745 
12746  /* "PyClical.pyx":1638
12747  * return math.acos(obj)
12748  * except:
12749  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
12750  *
12751  * cpdef inline cosh(obj):
12752  */
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;
12760  __pyx_t_11 = 0;
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;
12769  }
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);
12781  goto __pyx_L0;
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:;
12788  }
12789  }
12790  __pyx_L3:;
12791 
12792  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12793  goto __pyx_L0;
12794  __pyx_L1_error:;
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);
12801  __pyx_r = 0;
12802  __pyx_L0:;
12803  __Pyx_XGIVEREF(__pyx_r);
12804  __Pyx_RefNannyFinishContext();
12805  return __pyx_r;
12806  }
12807 
12808  /* Python wrapper */
12809  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
12820  {
12821  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
12822  PyObject* values[2] = {0,0};
12823 
12824  /* "PyClical.pyx":1619
12825  * return clifford().wrap( glucat.cos(toClifford(obj)) )
12826  *
12827  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
12828  * """
12829  * Inverse cosine of multivector with optional complexifier.
12830  */
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);
12838  case 0: break;
12839  default: goto __pyx_L5_argtuple_error;
12840  }
12841  kw_args = PyDict_Size(__pyx_kwds);
12842  switch (pos_args) {
12843  case 0:
12844  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
12845  else goto __pyx_L5_argtuple_error;
12846  case 1:
12847  if (kw_args > 0) {
12848  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
12849  if (value) { values[1] = value; kw_args--; }
12850  }
12851  }
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;}
12854  }
12855  } else {
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);
12859  break;
12860  default: goto __pyx_L5_argtuple_error;
12861  }
12862  }
12863  __pyx_v_obj = values[0];
12864  __pyx_v_i = values[1];
12865  }
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;}
12869  __pyx_L3_error:;
12870  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12871  __Pyx_RefNannyFinishContext();
12872  return NULL;
12873  __pyx_L4_argument_unpacking_done:;
12874  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
12875  __Pyx_RefNannyFinishContext();
12876  return __pyx_r;
12877  }
12878 
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;
12894  __pyx_t_1 = 0;
12895  goto __pyx_L0;
12896 
12897  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12898  goto __pyx_L0;
12899  __pyx_L1_error:;
12900  __Pyx_XDECREF(__pyx_t_1);
12901  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
12902  __pyx_r = NULL;
12903  __pyx_L0:;
12904  __Pyx_XGIVEREF(__pyx_r);
12905  __Pyx_RefNannyFinishContext();
12906  return __pyx_r;
12907  }
12908 
12909  /* "PyClical.pyx":1640
12910  * return clifford().wrap( glucat.acos(toClifford(obj)) )
12911  *
12912  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
12913  * """
12914  * Hyperbolic cosine of multivector.
12915  */
12916 
12917  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
12933 
12934  /* "PyClical.pyx":1651
12935  * {1,2}
12936  * """
12937  * try: # <<<<<<<<<<<<<<
12938  * return math.cosh(obj)
12939  * except:
12940  */
12941  {
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);
12946  /*try:*/ {
12947 
12948  /* "PyClical.pyx":1652
12949  * """
12950  * try:
12951  * return math.cosh(obj) # <<<<<<<<<<<<<<
12952  * except:
12953  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
12954  */
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;
12971  __pyx_t_6 = 0;
12972  goto __pyx_L7_try_return;
12973  }
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);
12983  goto __pyx_L0;
12984  __pyx_L3_error:;
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;
12988 
12989  /* "PyClical.pyx":1653
12990  * try:
12991  * return math.cosh(obj)
12992  * except: # <<<<<<<<<<<<<<
12993  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
12994  *
12995  */
12996  /*except:*/ {
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);
13002 
13003  /* "PyClical.pyx":1654
13004  * return math.cosh(obj)
13005  * except:
13006  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
13007  *
13008  * cpdef inline acosh(obj,i = None):
13009  */
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;
13017  __pyx_t_8 = 0;
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;
13026  }
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);
13038  goto __pyx_L0;
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:;
13045  }
13046 
13047  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13048  goto __pyx_L0;
13049  __pyx_L1_error:;
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);
13056  __pyx_r = 0;
13057  __pyx_L0:;
13058  __Pyx_XGIVEREF(__pyx_r);
13059  __Pyx_RefNannyFinishContext();
13060  return __pyx_r;
13061  }
13062 
13063  /* Python wrapper */
13064  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
13072  return __pyx_r;
13073  }
13074 
13075  /* "PyClical.pyx":1640
13076  * return clifford().wrap( glucat.acos(toClifford(obj)) )
13077  *
13078  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
13079  * """
13080  * Hyperbolic cosine of multivector.
13081  */
13082 
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;
13095  __pyx_t_1 = 0;
13096  goto __pyx_L0;
13097 
13098  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13099  goto __pyx_L0;
13100  __pyx_L1_error:;
13101  __Pyx_XDECREF(__pyx_t_1);
13102  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13103  __pyx_r = NULL;
13104  __pyx_L0:;
13105  __Pyx_XGIVEREF(__pyx_r);
13106  __Pyx_RefNannyFinishContext();
13107  return __pyx_r;
13108  }
13109 
13110  /* "PyClical.pyx":1656
13111  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
13112  *
13113  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
13114  * """
13115  * Inverse hyperbolic cosine of multivector with optional complexifier.
13116  */
13117 
13118  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
13123  int __pyx_t_1;
13124  int __pyx_t_2;
13125  PyObject *__pyx_t_3 = NULL;
13126  Clifford __pyx_t_4;
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;
13141  }
13142  }
13143 
13144  /* "PyClical.pyx":1671
13145  * {1,2}
13146  * """
13147  * if not (i is None): # <<<<<<<<<<<<<<
13148  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
13149  * else:
13150  */
13151  __pyx_t_1 = (__pyx_v_i == Py_None);
13152  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
13153  if (__pyx_t_2) {
13154 
13155  /* "PyClical.pyx":1672
13156  * """
13157  * if not (i is None):
13158  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13159  * else:
13160  * try:
13161  */
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);
13165  try {
13166  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13167  } catch(...) {
13168  __Pyx_CppExn2PyErr();
13169  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13170  }
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;
13175  __pyx_t_5 = 0;
13176  goto __pyx_L0;
13177  goto __pyx_L3;
13178  }
13179  /*else*/ {
13180 
13181  /* "PyClical.pyx":1674
13182  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
13183  * else:
13184  * try: # <<<<<<<<<<<<<<
13185  * return math.acosh(obj)
13186  * except:
13187  */
13188  {
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);
13193  /*try:*/ {
13194 
13195  /* "PyClical.pyx":1675
13196  * else:
13197  * try:
13198  * return math.acosh(obj) # <<<<<<<<<<<<<<
13199  * except:
13200  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
13201  */
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;
13218  __pyx_t_9 = 0;
13219  goto __pyx_L8_try_return;
13220  }
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);
13230  goto __pyx_L0;
13231  __pyx_L4_error:;
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;
13235 
13236  /* "PyClical.pyx":1676
13237  * try:
13238  * return math.acosh(obj)
13239  * except: # <<<<<<<<<<<<<<
13240  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
13241  *
13242  */
13243  /*except:*/ {
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);
13249 
13250  /* "PyClical.pyx":1677
13251  * return math.acosh(obj)
13252  * except:
13253  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
13254  *
13255  * cpdef inline sin(obj,i = None):
13256  */
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;
13264  __pyx_t_11 = 0;
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;
13273  }
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);
13285  goto __pyx_L0;
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:;
13292  }
13293  }
13294  __pyx_L3:;
13295 
13296  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13297  goto __pyx_L0;
13298  __pyx_L1_error:;
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);
13305  __pyx_r = 0;
13306  __pyx_L0:;
13307  __Pyx_XGIVEREF(__pyx_r);
13308  __Pyx_RefNannyFinishContext();
13309  return __pyx_r;
13310  }
13311 
13312  /* Python wrapper */
13313  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
13324  {
13325  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
13326  PyObject* values[2] = {0,0};
13327 
13328  /* "PyClical.pyx":1656
13329  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
13330  *
13331  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
13332  * """
13333  * Inverse hyperbolic cosine of multivector with optional complexifier.
13334  */
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);
13342  case 0: break;
13343  default: goto __pyx_L5_argtuple_error;
13344  }
13345  kw_args = PyDict_Size(__pyx_kwds);
13346  switch (pos_args) {
13347  case 0:
13348  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
13349  else goto __pyx_L5_argtuple_error;
13350  case 1:
13351  if (kw_args > 0) {
13352  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
13353  if (value) { values[1] = value; kw_args--; }
13354  }
13355  }
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;}
13358  }
13359  } else {
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);
13363  break;
13364  default: goto __pyx_L5_argtuple_error;
13365  }
13366  }
13367  __pyx_v_obj = values[0];
13368  __pyx_v_i = values[1];
13369  }
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;}
13373  __pyx_L3_error:;
13374  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13375  __Pyx_RefNannyFinishContext();
13376  return NULL;
13377  __pyx_L4_argument_unpacking_done:;
13378  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
13379  __Pyx_RefNannyFinishContext();
13380  return __pyx_r;
13381  }
13382 
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;
13398  __pyx_t_1 = 0;
13399  goto __pyx_L0;
13400 
13401  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13402  goto __pyx_L0;
13403  __pyx_L1_error:;
13404  __Pyx_XDECREF(__pyx_t_1);
13405  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13406  __pyx_r = NULL;
13407  __pyx_L0:;
13408  __Pyx_XGIVEREF(__pyx_r);
13409  __Pyx_RefNannyFinishContext();
13410  return __pyx_r;
13411  }
13412 
13413  /* "PyClical.pyx":1679
13414  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
13415  *
13416  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
13417  * """
13418  * Sine of multivector with optional complexifier.
13419  */
13420 
13421  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
13426  int __pyx_t_1;
13427  int __pyx_t_2;
13428  PyObject *__pyx_t_3 = NULL;
13429  Clifford __pyx_t_4;
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;
13444  }
13445  }
13446 
13447  /* "PyClical.pyx":1690
13448  * {1,2,3}
13449  * """
13450  * if not (i is None): # <<<<<<<<<<<<<<
13451  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
13452  * else:
13453  */
13454  __pyx_t_1 = (__pyx_v_i == Py_None);
13455  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
13456  if (__pyx_t_2) {
13457 
13458  /* "PyClical.pyx":1691
13459  * """
13460  * if not (i is None):
13461  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13462  * else:
13463  * try:
13464  */
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);
13468  try {
13469  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13470  } catch(...) {
13471  __Pyx_CppExn2PyErr();
13472  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13473  }
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;
13478  __pyx_t_5 = 0;
13479  goto __pyx_L0;
13480  goto __pyx_L3;
13481  }
13482  /*else*/ {
13483 
13484  /* "PyClical.pyx":1693
13485  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
13486  * else:
13487  * try: # <<<<<<<<<<<<<<
13488  * return math.sin(obj)
13489  * except:
13490  */
13491  {
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);
13496  /*try:*/ {
13497 
13498  /* "PyClical.pyx":1694
13499  * else:
13500  * try:
13501  * return math.sin(obj) # <<<<<<<<<<<<<<
13502  * except:
13503  * return clifford().wrap( glucat.sin(toClifford(obj)) )
13504  */
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;
13521  __pyx_t_9 = 0;
13522  goto __pyx_L8_try_return;
13523  }
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);
13533  goto __pyx_L0;
13534  __pyx_L4_error:;
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;
13538 
13539  /* "PyClical.pyx":1695
13540  * try:
13541  * return math.sin(obj)
13542  * except: # <<<<<<<<<<<<<<
13543  * return clifford().wrap( glucat.sin(toClifford(obj)) )
13544  *
13545  */
13546  /*except:*/ {
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);
13552 
13553  /* "PyClical.pyx":1696
13554  * return math.sin(obj)
13555  * except:
13556  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
13557  *
13558  * cpdef inline asin(obj,i = None):
13559  */
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;
13567  __pyx_t_11 = 0;
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;
13576  }
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);
13588  goto __pyx_L0;
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:;
13595  }
13596  }
13597  __pyx_L3:;
13598 
13599  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13600  goto __pyx_L0;
13601  __pyx_L1_error:;
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);
13608  __pyx_r = 0;
13609  __pyx_L0:;
13610  __Pyx_XGIVEREF(__pyx_r);
13611  __Pyx_RefNannyFinishContext();
13612  return __pyx_r;
13613  }
13614 
13615  /* Python wrapper */
13616  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
13627  {
13628  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
13629  PyObject* values[2] = {0,0};
13630 
13631  /* "PyClical.pyx":1679
13632  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
13633  *
13634  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
13635  * """
13636  * Sine of multivector with optional complexifier.
13637  */
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);
13645  case 0: break;
13646  default: goto __pyx_L5_argtuple_error;
13647  }
13648  kw_args = PyDict_Size(__pyx_kwds);
13649  switch (pos_args) {
13650  case 0:
13651  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
13652  else goto __pyx_L5_argtuple_error;
13653  case 1:
13654  if (kw_args > 0) {
13655  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
13656  if (value) { values[1] = value; kw_args--; }
13657  }
13658  }
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;}
13661  }
13662  } else {
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);
13666  break;
13667  default: goto __pyx_L5_argtuple_error;
13668  }
13669  }
13670  __pyx_v_obj = values[0];
13671  __pyx_v_i = values[1];
13672  }
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;}
13676  __pyx_L3_error:;
13677  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13678  __Pyx_RefNannyFinishContext();
13679  return NULL;
13680  __pyx_L4_argument_unpacking_done:;
13681  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
13682  __Pyx_RefNannyFinishContext();
13683  return __pyx_r;
13684  }
13685 
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;
13701  __pyx_t_1 = 0;
13702  goto __pyx_L0;
13703 
13704  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13705  goto __pyx_L0;
13706  __pyx_L1_error:;
13707  __Pyx_XDECREF(__pyx_t_1);
13708  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13709  __pyx_r = NULL;
13710  __pyx_L0:;
13711  __Pyx_XGIVEREF(__pyx_r);
13712  __Pyx_RefNannyFinishContext();
13713  return __pyx_r;
13714  }
13715 
13716  /* "PyClical.pyx":1698
13717  * return clifford().wrap( glucat.sin(toClifford(obj)) )
13718  *
13719  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
13720  * """
13721  * Inverse sine of multivector with optional complexifier.
13722  */
13723 
13724  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
13729  int __pyx_t_1;
13730  int __pyx_t_2;
13731  PyObject *__pyx_t_3 = NULL;
13732  Clifford __pyx_t_4;
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;
13747  }
13748  }
13749 
13750  /* "PyClical.pyx":1711
13751  * {1,2,3}
13752  * """
13753  * if not (i is None): # <<<<<<<<<<<<<<
13754  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
13755  * else:
13756  */
13757  __pyx_t_1 = (__pyx_v_i == Py_None);
13758  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
13759  if (__pyx_t_2) {
13760 
13761  /* "PyClical.pyx":1712
13762  * """
13763  * if not (i is None):
13764  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13765  * else:
13766  * try:
13767  */
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);
13771  try {
13772  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13773  } catch(...) {
13774  __Pyx_CppExn2PyErr();
13775  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13776  }
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;
13781  __pyx_t_5 = 0;
13782  goto __pyx_L0;
13783  goto __pyx_L3;
13784  }
13785  /*else*/ {
13786 
13787  /* "PyClical.pyx":1714
13788  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
13789  * else:
13790  * try: # <<<<<<<<<<<<<<
13791  * return math.asin(obj)
13792  * except:
13793  */
13794  {
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);
13799  /*try:*/ {
13800 
13801  /* "PyClical.pyx":1715
13802  * else:
13803  * try:
13804  * return math.asin(obj) # <<<<<<<<<<<<<<
13805  * except:
13806  * return clifford().wrap( glucat.asin(toClifford(obj)) )
13807  */
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;
13824  __pyx_t_9 = 0;
13825  goto __pyx_L8_try_return;
13826  }
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);
13836  goto __pyx_L0;
13837  __pyx_L4_error:;
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;
13841 
13842  /* "PyClical.pyx":1716
13843  * try:
13844  * return math.asin(obj)
13845  * except: # <<<<<<<<<<<<<<
13846  * return clifford().wrap( glucat.asin(toClifford(obj)) )
13847  *
13848  */
13849  /*except:*/ {
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);
13855 
13856  /* "PyClical.pyx":1717
13857  * return math.asin(obj)
13858  * except:
13859  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
13860  *
13861  * cpdef inline sinh(obj):
13862  */
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;
13870  __pyx_t_11 = 0;
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;
13879  }
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);
13891  goto __pyx_L0;
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:;
13898  }
13899  }
13900  __pyx_L3:;
13901 
13902  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13903  goto __pyx_L0;
13904  __pyx_L1_error:;
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);
13911  __pyx_r = 0;
13912  __pyx_L0:;
13913  __Pyx_XGIVEREF(__pyx_r);
13914  __Pyx_RefNannyFinishContext();
13915  return __pyx_r;
13916  }
13917 
13918  /* Python wrapper */
13919  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
13930  {
13931  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
13932  PyObject* values[2] = {0,0};
13933 
13934  /* "PyClical.pyx":1698
13935  * return clifford().wrap( glucat.sin(toClifford(obj)) )
13936  *
13937  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
13938  * """
13939  * Inverse sine of multivector with optional complexifier.
13940  */
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);
13948  case 0: break;
13949  default: goto __pyx_L5_argtuple_error;
13950  }
13951  kw_args = PyDict_Size(__pyx_kwds);
13952  switch (pos_args) {
13953  case 0:
13954  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
13955  else goto __pyx_L5_argtuple_error;
13956  case 1:
13957  if (kw_args > 0) {
13958  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
13959  if (value) { values[1] = value; kw_args--; }
13960  }
13961  }
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;}
13964  }
13965  } else {
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);
13969  break;
13970  default: goto __pyx_L5_argtuple_error;
13971  }
13972  }
13973  __pyx_v_obj = values[0];
13974  __pyx_v_i = values[1];
13975  }
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;}
13979  __pyx_L3_error:;
13980  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
13981  __Pyx_RefNannyFinishContext();
13982  return NULL;
13983  __pyx_L4_argument_unpacking_done:;
13984  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
13985  __Pyx_RefNannyFinishContext();
13986  return __pyx_r;
13987  }
13988 
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;
14004  __pyx_t_1 = 0;
14005  goto __pyx_L0;
14006 
14007  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14008  goto __pyx_L0;
14009  __pyx_L1_error:;
14010  __Pyx_XDECREF(__pyx_t_1);
14011  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14012  __pyx_r = NULL;
14013  __pyx_L0:;
14014  __Pyx_XGIVEREF(__pyx_r);
14015  __Pyx_RefNannyFinishContext();
14016  return __pyx_r;
14017  }
14018 
14019  /* "PyClical.pyx":1719
14020  * return clifford().wrap( glucat.asin(toClifford(obj)) )
14021  *
14022  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
14023  * """
14024  * Hyperbolic sine of multivector.
14025  */
14026 
14027  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
14043 
14044  /* "PyClical.pyx":1728
14045  * 0.5{1,2}
14046  * """
14047  * try: # <<<<<<<<<<<<<<
14048  * return math.sinh(obj)
14049  * except:
14050  */
14051  {
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);
14056  /*try:*/ {
14057 
14058  /* "PyClical.pyx":1729
14059  * """
14060  * try:
14061  * return math.sinh(obj) # <<<<<<<<<<<<<<
14062  * except:
14063  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
14064  */
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;
14081  __pyx_t_6 = 0;
14082  goto __pyx_L7_try_return;
14083  }
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);
14093  goto __pyx_L0;
14094  __pyx_L3_error:;
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;
14098 
14099  /* "PyClical.pyx":1730
14100  * try:
14101  * return math.sinh(obj)
14102  * except: # <<<<<<<<<<<<<<
14103  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
14104  *
14105  */
14106  /*except:*/ {
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);
14112 
14113  /* "PyClical.pyx":1731
14114  * return math.sinh(obj)
14115  * except:
14116  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14117  *
14118  * cpdef inline asinh(obj,i = None):
14119  */
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;
14127  __pyx_t_8 = 0;
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;
14136  }
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);
14148  goto __pyx_L0;
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:;
14155  }
14156 
14157  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14158  goto __pyx_L0;
14159  __pyx_L1_error:;
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);
14166  __pyx_r = 0;
14167  __pyx_L0:;
14168  __Pyx_XGIVEREF(__pyx_r);
14169  __Pyx_RefNannyFinishContext();
14170  return __pyx_r;
14171  }
14172 
14173  /* Python wrapper */
14174  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
14182  return __pyx_r;
14183  }
14184 
14185  /* "PyClical.pyx":1719
14186  * return clifford().wrap( glucat.asin(toClifford(obj)) )
14187  *
14188  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
14189  * """
14190  * Hyperbolic sine of multivector.
14191  */
14192 
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;
14205  __pyx_t_1 = 0;
14206  goto __pyx_L0;
14207 
14208  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14209  goto __pyx_L0;
14210  __pyx_L1_error:;
14211  __Pyx_XDECREF(__pyx_t_1);
14212  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14213  __pyx_r = NULL;
14214  __pyx_L0:;
14215  __Pyx_XGIVEREF(__pyx_r);
14216  __Pyx_RefNannyFinishContext();
14217  return __pyx_r;
14218  }
14219 
14220  /* "PyClical.pyx":1733
14221  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
14222  *
14223  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
14224  * """
14225  * Inverse hyperbolic sine of multivector with optional complexifier.
14226  */
14227 
14228  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
14233  int __pyx_t_1;
14234  int __pyx_t_2;
14235  PyObject *__pyx_t_3 = NULL;
14236  Clifford __pyx_t_4;
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;
14251  }
14252  }
14253 
14254  /* "PyClical.pyx":1744
14255  * {1,2}
14256  * """
14257  * if not (i is None): # <<<<<<<<<<<<<<
14258  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
14259  * else:
14260  */
14261  __pyx_t_1 = (__pyx_v_i == Py_None);
14262  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
14263  if (__pyx_t_2) {
14264 
14265  /* "PyClical.pyx":1745
14266  * """
14267  * if not (i is None):
14268  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14269  * else:
14270  * try:
14271  */
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);
14275  try {
14276  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14277  } catch(...) {
14278  __Pyx_CppExn2PyErr();
14279  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14280  }
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;
14285  __pyx_t_5 = 0;
14286  goto __pyx_L0;
14287  goto __pyx_L3;
14288  }
14289  /*else*/ {
14290 
14291  /* "PyClical.pyx":1747
14292  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
14293  * else:
14294  * try: # <<<<<<<<<<<<<<
14295  * return math.asinh(obj)
14296  * except:
14297  */
14298  {
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);
14303  /*try:*/ {
14304 
14305  /* "PyClical.pyx":1748
14306  * else:
14307  * try:
14308  * return math.asinh(obj) # <<<<<<<<<<<<<<
14309  * except:
14310  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
14311  */
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;
14328  __pyx_t_9 = 0;
14329  goto __pyx_L8_try_return;
14330  }
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);
14340  goto __pyx_L0;
14341  __pyx_L4_error:;
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;
14345 
14346  /* "PyClical.pyx":1749
14347  * try:
14348  * return math.asinh(obj)
14349  * except: # <<<<<<<<<<<<<<
14350  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
14351  *
14352  */
14353  /*except:*/ {
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);
14359 
14360  /* "PyClical.pyx":1750
14361  * return math.asinh(obj)
14362  * except:
14363  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14364  *
14365  * cpdef inline tan(obj,i = None):
14366  */
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;
14374  __pyx_t_11 = 0;
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;
14383  }
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);
14395  goto __pyx_L0;
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:;
14402  }
14403  }
14404  __pyx_L3:;
14405 
14406  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14407  goto __pyx_L0;
14408  __pyx_L1_error:;
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);
14415  __pyx_r = 0;
14416  __pyx_L0:;
14417  __Pyx_XGIVEREF(__pyx_r);
14418  __Pyx_RefNannyFinishContext();
14419  return __pyx_r;
14420  }
14421 
14422  /* Python wrapper */
14423  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
14434  {
14435  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
14436  PyObject* values[2] = {0,0};
14437 
14438  /* "PyClical.pyx":1733
14439  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
14440  *
14441  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
14442  * """
14443  * Inverse hyperbolic sine of multivector with optional complexifier.
14444  */
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);
14452  case 0: break;
14453  default: goto __pyx_L5_argtuple_error;
14454  }
14455  kw_args = PyDict_Size(__pyx_kwds);
14456  switch (pos_args) {
14457  case 0:
14458  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
14459  else goto __pyx_L5_argtuple_error;
14460  case 1:
14461  if (kw_args > 0) {
14462  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
14463  if (value) { values[1] = value; kw_args--; }
14464  }
14465  }
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;}
14468  }
14469  } else {
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);
14473  break;
14474  default: goto __pyx_L5_argtuple_error;
14475  }
14476  }
14477  __pyx_v_obj = values[0];
14478  __pyx_v_i = values[1];
14479  }
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;}
14483  __pyx_L3_error:;
14484  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14485  __Pyx_RefNannyFinishContext();
14486  return NULL;
14487  __pyx_L4_argument_unpacking_done:;
14488  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
14489  __Pyx_RefNannyFinishContext();
14490  return __pyx_r;
14491  }
14492 
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;
14508  __pyx_t_1 = 0;
14509  goto __pyx_L0;
14510 
14511  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14512  goto __pyx_L0;
14513  __pyx_L1_error:;
14514  __Pyx_XDECREF(__pyx_t_1);
14515  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14516  __pyx_r = NULL;
14517  __pyx_L0:;
14518  __Pyx_XGIVEREF(__pyx_r);
14519  __Pyx_RefNannyFinishContext();
14520  return __pyx_r;
14521  }
14522 
14523  /* "PyClical.pyx":1752
14524  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
14525  *
14526  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
14527  * """
14528  * Tangent of multivector with optional complexifier.
14529  */
14530 
14531  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
14536  int __pyx_t_1;
14537  int __pyx_t_2;
14538  PyObject *__pyx_t_3 = NULL;
14539  Clifford __pyx_t_4;
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;
14554  }
14555  }
14556 
14557  /* "PyClical.pyx":1761
14558  * 0.7616{1,2}
14559  * """
14560  * if not (i is None): # <<<<<<<<<<<<<<
14561  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
14562  * else:
14563  */
14564  __pyx_t_1 = (__pyx_v_i == Py_None);
14565  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
14566  if (__pyx_t_2) {
14567 
14568  /* "PyClical.pyx":1762
14569  * """
14570  * if not (i is None):
14571  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14572  * else:
14573  * try:
14574  */
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);
14578  try {
14579  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14580  } catch(...) {
14581  __Pyx_CppExn2PyErr();
14582  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14583  }
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;
14588  __pyx_t_5 = 0;
14589  goto __pyx_L0;
14590  goto __pyx_L3;
14591  }
14592  /*else*/ {
14593 
14594  /* "PyClical.pyx":1764
14595  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
14596  * else:
14597  * try: # <<<<<<<<<<<<<<
14598  * return math.tan(obj)
14599  * except:
14600  */
14601  {
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);
14606  /*try:*/ {
14607 
14608  /* "PyClical.pyx":1765
14609  * else:
14610  * try:
14611  * return math.tan(obj) # <<<<<<<<<<<<<<
14612  * except:
14613  * return clifford().wrap( glucat.tan(toClifford(obj)) )
14614  */
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;
14631  __pyx_t_9 = 0;
14632  goto __pyx_L8_try_return;
14633  }
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);
14643  goto __pyx_L0;
14644  __pyx_L4_error:;
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;
14648 
14649  /* "PyClical.pyx":1766
14650  * try:
14651  * return math.tan(obj)
14652  * except: # <<<<<<<<<<<<<<
14653  * return clifford().wrap( glucat.tan(toClifford(obj)) )
14654  *
14655  */
14656  /*except:*/ {
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);
14662 
14663  /* "PyClical.pyx":1767
14664  * return math.tan(obj)
14665  * except:
14666  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
14667  *
14668  * cpdef inline atan(obj,i = None):
14669  */
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;
14677  __pyx_t_11 = 0;
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;
14686  }
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);
14698  goto __pyx_L0;
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:;
14705  }
14706  }
14707  __pyx_L3:;
14708 
14709  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14710  goto __pyx_L0;
14711  __pyx_L1_error:;
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);
14718  __pyx_r = 0;
14719  __pyx_L0:;
14720  __Pyx_XGIVEREF(__pyx_r);
14721  __Pyx_RefNannyFinishContext();
14722  return __pyx_r;
14723  }
14724 
14725  /* Python wrapper */
14726  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
14737  {
14738  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
14739  PyObject* values[2] = {0,0};
14740 
14741  /* "PyClical.pyx":1752
14742  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
14743  *
14744  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
14745  * """
14746  * Tangent of multivector with optional complexifier.
14747  */
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);
14755  case 0: break;
14756  default: goto __pyx_L5_argtuple_error;
14757  }
14758  kw_args = PyDict_Size(__pyx_kwds);
14759  switch (pos_args) {
14760  case 0:
14761  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
14762  else goto __pyx_L5_argtuple_error;
14763  case 1:
14764  if (kw_args > 0) {
14765  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
14766  if (value) { values[1] = value; kw_args--; }
14767  }
14768  }
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;}
14771  }
14772  } else {
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);
14776  break;
14777  default: goto __pyx_L5_argtuple_error;
14778  }
14779  }
14780  __pyx_v_obj = values[0];
14781  __pyx_v_i = values[1];
14782  }
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;}
14786  __pyx_L3_error:;
14787  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
14788  __Pyx_RefNannyFinishContext();
14789  return NULL;
14790  __pyx_L4_argument_unpacking_done:;
14791  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
14792  __Pyx_RefNannyFinishContext();
14793  return __pyx_r;
14794  }
14795 
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;
14811  __pyx_t_1 = 0;
14812  goto __pyx_L0;
14813 
14814  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14815  goto __pyx_L0;
14816  __pyx_L1_error:;
14817  __Pyx_XDECREF(__pyx_t_1);
14818  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
14819  __pyx_r = NULL;
14820  __pyx_L0:;
14821  __Pyx_XGIVEREF(__pyx_r);
14822  __Pyx_RefNannyFinishContext();
14823  return __pyx_r;
14824  }
14825 
14826  /* "PyClical.pyx":1769
14827  * return clifford().wrap( glucat.tan(toClifford(obj)) )
14828  *
14829  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
14830  * """
14831  * Inverse tangent of multivector with optional complexifier.
14832  */
14833 
14834  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
14839  int __pyx_t_1;
14840  int __pyx_t_2;
14841  PyObject *__pyx_t_3 = NULL;
14842  Clifford __pyx_t_4;
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;
14857  }
14858  }
14859 
14860  /* "PyClical.pyx":1778
14861  * {1}
14862  * """
14863  * if not (i is None): # <<<<<<<<<<<<<<
14864  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
14865  * else:
14866  */
14867  __pyx_t_1 = (__pyx_v_i == Py_None);
14868  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
14869  if (__pyx_t_2) {
14870 
14871  /* "PyClical.pyx":1779
14872  * """
14873  * if not (i is None):
14874  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14875  * else:
14876  * try:
14877  */
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);
14881  try {
14882  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14883  } catch(...) {
14884  __Pyx_CppExn2PyErr();
14885  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14886  }
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;
14891  __pyx_t_5 = 0;
14892  goto __pyx_L0;
14893  goto __pyx_L3;
14894  }
14895  /*else*/ {
14896 
14897  /* "PyClical.pyx":1781
14898  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
14899  * else:
14900  * try: # <<<<<<<<<<<<<<
14901  * return math.atan(obj)
14902  * except:
14903  */
14904  {
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);
14909  /*try:*/ {
14910 
14911  /* "PyClical.pyx":1782
14912  * else:
14913  * try:
14914  * return math.atan(obj) # <<<<<<<<<<<<<<
14915  * except:
14916  * return clifford().wrap( glucat.atan(toClifford(obj)) )
14917  */
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;
14934  __pyx_t_9 = 0;
14935  goto __pyx_L8_try_return;
14936  }
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);
14946  goto __pyx_L0;
14947  __pyx_L4_error:;
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;
14951 
14952  /* "PyClical.pyx":1783
14953  * try:
14954  * return math.atan(obj)
14955  * except: # <<<<<<<<<<<<<<
14956  * return clifford().wrap( glucat.atan(toClifford(obj)) )
14957  *
14958  */
14959  /*except:*/ {
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);
14965 
14966  /* "PyClical.pyx":1784
14967  * return math.atan(obj)
14968  * except:
14969  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
14970  *
14971  * cpdef inline tanh(obj):
14972  */
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;
14980  __pyx_t_11 = 0;
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;
14989  }
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);
15001  goto __pyx_L0;
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:;
15008  }
15009  }
15010  __pyx_L3:;
15011 
15012  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15013  goto __pyx_L0;
15014  __pyx_L1_error:;
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);
15021  __pyx_r = 0;
15022  __pyx_L0:;
15023  __Pyx_XGIVEREF(__pyx_r);
15024  __Pyx_RefNannyFinishContext();
15025  return __pyx_r;
15026  }
15027 
15028  /* Python wrapper */
15029  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
15040  {
15041  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
15042  PyObject* values[2] = {0,0};
15043 
15044  /* "PyClical.pyx":1769
15045  * return clifford().wrap( glucat.tan(toClifford(obj)) )
15046  *
15047  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
15048  * """
15049  * Inverse tangent of multivector with optional complexifier.
15050  */
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);
15058  case 0: break;
15059  default: goto __pyx_L5_argtuple_error;
15060  }
15061  kw_args = PyDict_Size(__pyx_kwds);
15062  switch (pos_args) {
15063  case 0:
15064  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
15065  else goto __pyx_L5_argtuple_error;
15066  case 1:
15067  if (kw_args > 0) {
15068  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
15069  if (value) { values[1] = value; kw_args--; }
15070  }
15071  }
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;}
15074  }
15075  } else {
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);
15079  break;
15080  default: goto __pyx_L5_argtuple_error;
15081  }
15082  }
15083  __pyx_v_obj = values[0];
15084  __pyx_v_i = values[1];
15085  }
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;}
15089  __pyx_L3_error:;
15090  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15091  __Pyx_RefNannyFinishContext();
15092  return NULL;
15093  __pyx_L4_argument_unpacking_done:;
15094  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
15095  __Pyx_RefNannyFinishContext();
15096  return __pyx_r;
15097  }
15098 
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;
15114  __pyx_t_1 = 0;
15115  goto __pyx_L0;
15116 
15117  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15118  goto __pyx_L0;
15119  __pyx_L1_error:;
15120  __Pyx_XDECREF(__pyx_t_1);
15121  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15122  __pyx_r = NULL;
15123  __pyx_L0:;
15124  __Pyx_XGIVEREF(__pyx_r);
15125  __Pyx_RefNannyFinishContext();
15126  return __pyx_r;
15127  }
15128 
15129  /* "PyClical.pyx":1786
15130  * return clifford().wrap( glucat.atan(toClifford(obj)) )
15131  *
15132  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
15133  * """
15134  * Hyperbolic tangent of multivector.
15135  */
15136 
15137  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
15153 
15154  /* "PyClical.pyx":1793
15155  * {1,2}
15156  * """
15157  * try: # <<<<<<<<<<<<<<
15158  * return math.tanh(obj)
15159  * except:
15160  */
15161  {
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);
15166  /*try:*/ {
15167 
15168  /* "PyClical.pyx":1794
15169  * """
15170  * try:
15171  * return math.tanh(obj) # <<<<<<<<<<<<<<
15172  * except:
15173  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
15174  */
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;
15191  __pyx_t_6 = 0;
15192  goto __pyx_L7_try_return;
15193  }
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);
15203  goto __pyx_L0;
15204  __pyx_L3_error:;
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;
15208 
15209  /* "PyClical.pyx":1795
15210  * try:
15211  * return math.tanh(obj)
15212  * except: # <<<<<<<<<<<<<<
15213  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
15214  *
15215  */
15216  /*except:*/ {
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);
15222 
15223  /* "PyClical.pyx":1796
15224  * return math.tanh(obj)
15225  * except:
15226  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15227  *
15228  * cpdef inline atanh(obj,i = None):
15229  */
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;
15237  __pyx_t_8 = 0;
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;
15246  }
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);
15258  goto __pyx_L0;
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:;
15265  }
15266 
15267  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15268  goto __pyx_L0;
15269  __pyx_L1_error:;
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);
15276  __pyx_r = 0;
15277  __pyx_L0:;
15278  __Pyx_XGIVEREF(__pyx_r);
15279  __Pyx_RefNannyFinishContext();
15280  return __pyx_r;
15281  }
15282 
15283  /* Python wrapper */
15284  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
15292  return __pyx_r;
15293  }
15294 
15295  /* "PyClical.pyx":1786
15296  * return clifford().wrap( glucat.atan(toClifford(obj)) )
15297  *
15298  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
15299  * """
15300  * Hyperbolic tangent of multivector.
15301  */
15302 
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;
15315  __pyx_t_1 = 0;
15316  goto __pyx_L0;
15317 
15318  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15319  goto __pyx_L0;
15320  __pyx_L1_error:;
15321  __Pyx_XDECREF(__pyx_t_1);
15322  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15323  __pyx_r = NULL;
15324  __pyx_L0:;
15325  __Pyx_XGIVEREF(__pyx_r);
15326  __Pyx_RefNannyFinishContext();
15327  return __pyx_r;
15328  }
15329 
15330  /* "PyClical.pyx":1798
15331  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
15332  *
15333  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
15334  * """
15335  * Inverse hyperbolic tangent of multivector with optional complexifier.
15336  */
15337 
15338  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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
15343  int __pyx_t_1;
15344  int __pyx_t_2;
15345  PyObject *__pyx_t_3 = NULL;
15346  Clifford __pyx_t_4;
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;
15361  }
15362  }
15363 
15364  /* "PyClical.pyx":1807
15365  * {1,2}
15366  * """
15367  * if not (i is None): # <<<<<<<<<<<<<<
15368  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
15369  * else:
15370  */
15371  __pyx_t_1 = (__pyx_v_i == Py_None);
15372  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
15373  if (__pyx_t_2) {
15374 
15375  /* "PyClical.pyx":1808
15376  * """
15377  * if not (i is None):
15378  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15379  * else:
15380  * try:
15381  */
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);
15385  try {
15386  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15387  } catch(...) {
15388  __Pyx_CppExn2PyErr();
15389  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15390  }
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;
15395  __pyx_t_5 = 0;
15396  goto __pyx_L0;
15397  goto __pyx_L3;
15398  }
15399  /*else*/ {
15400 
15401  /* "PyClical.pyx":1810
15402  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
15403  * else:
15404  * try: # <<<<<<<<<<<<<<
15405  * return math.atanh(obj)
15406  * except:
15407  */
15408  {
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);
15413  /*try:*/ {
15414 
15415  /* "PyClical.pyx":1811
15416  * else:
15417  * try:
15418  * return math.atanh(obj) # <<<<<<<<<<<<<<
15419  * except:
15420  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
15421  */
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;
15438  __pyx_t_9 = 0;
15439  goto __pyx_L8_try_return;
15440  }
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);
15450  goto __pyx_L0;
15451  __pyx_L4_error:;
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;
15455 
15456  /* "PyClical.pyx":1812
15457  * try:
15458  * return math.atanh(obj)
15459  * except: # <<<<<<<<<<<<<<
15460  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
15461  *
15462  */
15463  /*except:*/ {
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);
15469 
15470  /* "PyClical.pyx":1813
15471  * return math.atanh(obj)
15472  * except:
15473  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15474  *
15475  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
15476  */
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;
15484  __pyx_t_11 = 0;
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;
15493  }
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);
15505  goto __pyx_L0;
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:;
15512  }
15513  }
15514  __pyx_L3:;
15515 
15516  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15517  goto __pyx_L0;
15518  __pyx_L1_error:;
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);
15525  __pyx_r = 0;
15526  __pyx_L0:;
15527  __Pyx_XGIVEREF(__pyx_r);
15528  __Pyx_RefNannyFinishContext();
15529  return __pyx_r;
15530  }
15531 
15532  /* Python wrapper */
15533  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
15544  {
15545  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__obj,&__pyx_n_s__i,0};
15546  PyObject* values[2] = {0,0};
15547 
15548  /* "PyClical.pyx":1798
15549  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
15550  *
15551  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
15552  * """
15553  * Inverse hyperbolic tangent of multivector with optional complexifier.
15554  */
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);
15562  case 0: break;
15563  default: goto __pyx_L5_argtuple_error;
15564  }
15565  kw_args = PyDict_Size(__pyx_kwds);
15566  switch (pos_args) {
15567  case 0:
15568  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
15569  else goto __pyx_L5_argtuple_error;
15570  case 1:
15571  if (kw_args > 0) {
15572  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
15573  if (value) { values[1] = value; kw_args--; }
15574  }
15575  }
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;}
15578  }
15579  } else {
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);
15583  break;
15584  default: goto __pyx_L5_argtuple_error;
15585  }
15586  }
15587  __pyx_v_obj = values[0];
15588  __pyx_v_i = values[1];
15589  }
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;}
15593  __pyx_L3_error:;
15594  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15595  __Pyx_RefNannyFinishContext();
15596  return NULL;
15597  __pyx_L4_argument_unpacking_done:;
15598  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15599  __Pyx_RefNannyFinishContext();
15600  return __pyx_r;
15601  }
15602 
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;
15618  __pyx_t_1 = 0;
15619  goto __pyx_L0;
15620 
15621  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15622  goto __pyx_L0;
15623  __pyx_L1_error:;
15624  __Pyx_XDECREF(__pyx_t_1);
15625  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15626  __pyx_r = NULL;
15627  __pyx_L0:;
15628  __Pyx_XGIVEREF(__pyx_r);
15629  __Pyx_RefNannyFinishContext();
15630  return __pyx_r;
15631  }
15632 
15633  /* "PyClical.pyx":1815
15634  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
15635  *
15636  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
15637  * """
15638  * Random multivector within a frame.
15639  */
15640 
15641  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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;
15648  scalar_t __pyx_t_3;
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;
15657  }
15658  }
15659 
15660  /* "PyClical.pyx":1822
15661  * {-3,-1,2}
15662  * """
15663  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
15664  *
15665  * cpdef inline cga3(obj):
15666  */
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;
15678  __pyx_t_4 = 0;
15679  goto __pyx_L0;
15680 
15681  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15682  goto __pyx_L0;
15683  __pyx_L1_error:;
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);
15688  __pyx_r = 0;
15689  __pyx_L0:;
15690  __Pyx_XGIVEREF(__pyx_r);
15691  __Pyx_RefNannyFinishContext();
15692  return __pyx_r;
15693  }
15694 
15695  /* Python wrapper */
15696  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
15707  {
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);
15717  case 0: break;
15718  default: goto __pyx_L5_argtuple_error;
15719  }
15720  kw_args = PyDict_Size(__pyx_kwds);
15721  switch (pos_args) {
15722  case 0:
15723  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ixt)) != 0)) kw_args--;
15724  else goto __pyx_L5_argtuple_error;
15725  case 1:
15726  if (kw_args > 0) {
15727  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill);
15728  if (value) { values[1] = value; kw_args--; }
15729  }
15730  }
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;}
15733  }
15734  } else {
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);
15738  break;
15739  default: goto __pyx_L5_argtuple_error;
15740  }
15741  }
15742  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
15743  __pyx_v_fill = values[1];
15744  }
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;}
15748  __pyx_L3_error:;
15749  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
15750  __Pyx_RefNannyFinishContext();
15751  return NULL;
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);
15755  goto __pyx_L0;
15756  __pyx_L1_error:;
15757  __pyx_r = NULL;
15758  __pyx_L0:;
15759  __Pyx_RefNannyFinishContext();
15760  return __pyx_r;
15761  }
15762 
15763  /* "PyClical.pyx":1815
15764  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
15765  *
15766  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
15767  * """
15768  * Random multivector within a frame.
15769  */
15770 
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;
15786  __pyx_t_1 = 0;
15787  goto __pyx_L0;
15788 
15789  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15790  goto __pyx_L0;
15791  __pyx_L1_error:;
15792  __Pyx_XDECREF(__pyx_t_1);
15793  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
15794  __pyx_r = NULL;
15795  __pyx_L0:;
15796  __Pyx_XGIVEREF(__pyx_r);
15797  __Pyx_RefNannyFinishContext();
15798  return __pyx_r;
15799  }
15800 
15801  /* "PyClical.pyx":1824
15802  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
15803  *
15804  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
15805  * """
15806  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
15807  */
15808 
15809  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
15819 
15820  /* "PyClical.pyx":1831
15821  * 87{-1}+4{1}+18{2}+2{3}+85{4}
15822  * """
15823  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
15824  *
15825  * cpdef inline cga3std(obj):
15826  */
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;
15834  __pyx_t_2 = 0;
15835  goto __pyx_L0;
15836 
15837  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15838  goto __pyx_L0;
15839  __pyx_L1_error:;
15840  __Pyx_XDECREF(__pyx_t_1);
15841  __Pyx_XDECREF(__pyx_t_2);
15842  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
15843  __pyx_r = 0;
15844  __pyx_L0:;
15845  __Pyx_XGIVEREF(__pyx_r);
15846  __Pyx_RefNannyFinishContext();
15847  return __pyx_r;
15848  }
15849 
15850  /* Python wrapper */
15851  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
15859  return __pyx_r;
15860  }
15861 
15862  /* "PyClical.pyx":1824
15863  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
15864  *
15865  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
15866  * """
15867  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
15868  */
15869 
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;
15882  __pyx_t_1 = 0;
15883  goto __pyx_L0;
15884 
15885  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15886  goto __pyx_L0;
15887  __pyx_L1_error:;
15888  __Pyx_XDECREF(__pyx_t_1);
15889  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
15890  __pyx_r = NULL;
15891  __pyx_L0:;
15892  __Pyx_XGIVEREF(__pyx_r);
15893  __Pyx_RefNannyFinishContext();
15894  return __pyx_r;
15895  }
15896 
15897  /* "PyClical.pyx":1833
15898  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
15899  *
15900  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
15901  * """
15902  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
15903  */
15904 
15905  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
15915 
15916  /* "PyClical.pyx":1842
15917  * 0
15918  * """
15919  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
15920  *
15921  * cpdef inline agc3(obj):
15922  */
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;
15930  __pyx_t_2 = 0;
15931  goto __pyx_L0;
15932 
15933  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15934  goto __pyx_L0;
15935  __pyx_L1_error:;
15936  __Pyx_XDECREF(__pyx_t_1);
15937  __Pyx_XDECREF(__pyx_t_2);
15938  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
15939  __pyx_r = 0;
15940  __pyx_L0:;
15941  __Pyx_XGIVEREF(__pyx_r);
15942  __Pyx_RefNannyFinishContext();
15943  return __pyx_r;
15944  }
15945 
15946  /* Python wrapper */
15947  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
15955  return __pyx_r;
15956  }
15957 
15958  /* "PyClical.pyx":1833
15959  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
15960  *
15961  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
15962  * """
15963  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
15964  */
15965 
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;
15978  __pyx_t_1 = 0;
15979  goto __pyx_L0;
15980 
15981  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15982  goto __pyx_L0;
15983  __pyx_L1_error:;
15984  __Pyx_XDECREF(__pyx_t_1);
15985  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
15986  __pyx_r = NULL;
15987  __pyx_L0:;
15988  __Pyx_XGIVEREF(__pyx_r);
15989  __Pyx_RefNannyFinishContext();
15990  return __pyx_r;
15991  }
15992 
15993  /* "PyClical.pyx":1844
15994  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
15995  *
15996  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
15997  * """
15998  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
15999  */
16000 
16001  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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);
16011 
16012  /* "PyClical.pyx":1853
16013  * 0
16014  * """
16015  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
16016  *
16017  * # Some abbreviations.
16018  */
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;
16026  __pyx_t_2 = 0;
16027  goto __pyx_L0;
16028 
16029  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16030  goto __pyx_L0;
16031  __pyx_L1_error:;
16032  __Pyx_XDECREF(__pyx_t_1);
16033  __Pyx_XDECREF(__pyx_t_2);
16034  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
16035  __pyx_r = 0;
16036  __pyx_L0:;
16037  __Pyx_XGIVEREF(__pyx_r);
16038  __Pyx_RefNannyFinishContext();
16039  return __pyx_r;
16040  }
16041 
16042  /* Python wrapper */
16043  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
16051  return __pyx_r;
16052  }
16053 
16054  /* "PyClical.pyx":1844
16055  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
16056  *
16057  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
16058  * """
16059  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
16060  */
16061 
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;
16074  __pyx_t_1 = 0;
16075  goto __pyx_L0;
16076 
16077  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16078  goto __pyx_L0;
16079  __pyx_L1_error:;
16080  __Pyx_XDECREF(__pyx_t_1);
16081  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
16082  __pyx_r = NULL;
16083  __pyx_L0:;
16084  __Pyx_XGIVEREF(__pyx_r);
16085  __Pyx_RefNannyFinishContext();
16086  return __pyx_r;
16087  }
16088 
16089  /* Python wrapper */
16090  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
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();
16099  return __pyx_r;
16100  }
16101 
16102  /* "PyClical.pyx":1887
16103  * """
16104  *
16105  * def e(obj): # <<<<<<<<<<<<<<
16106  * """
16107  * Abbreviation for clifford(index_set(obj)).
16108  */
16109 
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);
16119 
16120  /* "PyClical.pyx":1898
16121  * 1
16122  * """
16123  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
16124  *
16125  * def istpq(p, q):
16126  */
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);
16140  __pyx_t_2 = 0;
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;
16145  __pyx_t_2 = 0;
16146  goto __pyx_L0;
16147 
16148  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16149  goto __pyx_L0;
16150  __pyx_L1_error:;
16151  __Pyx_XDECREF(__pyx_t_1);
16152  __Pyx_XDECREF(__pyx_t_2);
16153  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
16154  __pyx_r = NULL;
16155  __pyx_L0:;
16156  __Pyx_XGIVEREF(__pyx_r);
16157  __Pyx_RefNannyFinishContext();
16158  return __pyx_r;
16159  }
16160 
16161  /* Python wrapper */
16162  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
16174  {
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);
16183  case 0: break;
16184  default: goto __pyx_L5_argtuple_error;
16185  }
16186  kw_args = PyDict_Size(__pyx_kwds);
16187  switch (pos_args) {
16188  case 0:
16189  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p)) != 0)) kw_args--;
16190  else goto __pyx_L5_argtuple_error;
16191  case 1:
16192  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__q)) != 0)) kw_args--;
16193  else {
16194  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16195  }
16196  }
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;}
16199  }
16200  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
16201  goto __pyx_L5_argtuple_error;
16202  } else {
16203  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16204  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16205  }
16206  __pyx_v_p = values[0];
16207  __pyx_v_q = values[1];
16208  }
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;}
16212  __pyx_L3_error:;
16213  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
16214  __Pyx_RefNannyFinishContext();
16215  return NULL;
16216  __pyx_L4_argument_unpacking_done:;
16217  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
16218  __Pyx_RefNannyFinishContext();
16219  return __pyx_r;
16220  }
16221 
16222  /* "PyClical.pyx":1900
16223  * return clifford(index_set(obj))
16224  *
16225  * def istpq(p, q): # <<<<<<<<<<<<<<
16226  * """
16227  * Abbreviation for index_set({-q,...p}).
16228  */
16229 
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);
16240 
16241  /* "PyClical.pyx":1907
16242  * {-3,-2,-1,1,2}
16243  * """
16244  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
16245  *
16246  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
16247  */
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);
16259  __pyx_t_1 = 0;
16260  __pyx_t_2 = 0;
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);
16268  __pyx_t_2 = 0;
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);
16276  __pyx_t_2 = 0;
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;
16281  __pyx_t_2 = 0;
16282  goto __pyx_L0;
16283 
16284  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16285  goto __pyx_L0;
16286  __pyx_L1_error:;
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);
16291  __pyx_r = NULL;
16292  __pyx_L0:;
16293  __Pyx_XGIVEREF(__pyx_r);
16294  __Pyx_RefNannyFinishContext();
16295  return __pyx_r;
16296  }
16297 
16298  /* Python wrapper */
16299  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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();
16307  return __pyx_r;
16308  }
16309 
16310  /* "PyClical.pyx":1913
16311  *
16312  * # Doctest interface.
16313  * def _test(): # <<<<<<<<<<<<<<
16314  * import PyClical, doctest
16315  * return doctest.testmod(PyClical)
16316  */
16317 
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);
16330 
16331  /* "PyClical.pyx":1914
16332  * # Doctest interface.
16333  * def _test():
16334  * import PyClical, doctest # <<<<<<<<<<<<<<
16335  * return doctest.testmod(PyClical)
16336  *
16337  */
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;
16341  __pyx_t_1 = 0;
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;
16345  __pyx_t_1 = 0;
16346 
16347  /* "PyClical.pyx":1915
16348  * def _test():
16349  * import PyClical, doctest
16350  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
16351  *
16352  * if __name__ == "__main__":
16353  */
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;
16367  __pyx_t_3 = 0;
16368  goto __pyx_L0;
16369 
16370  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16371  goto __pyx_L0;
16372  __pyx_L1_error:;
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);
16377  __pyx_r = NULL;
16378  __pyx_L0:;
16379  __Pyx_XDECREF(__pyx_v_PyClical);
16380  __Pyx_XDECREF(__pyx_v_doctest);
16381  __Pyx_XGIVEREF(__pyx_r);
16382  __Pyx_RefNannyFinishContext();
16383  return __pyx_r;
16384  }
16385  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
16386 
16387  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
16388  struct __pyx_obj_8PyClical_index_set *p;
16389  PyObject *o;
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;
16396  }
16397  return o;
16398  }
16399 
16400  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
16401  {
16402  PyObject *etype, *eval, *etb;
16403  PyErr_Fetch(&etype, &eval, &etb);
16404  ++Py_REFCNT(o);
16405  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
16406  if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
16407  --Py_REFCNT(o);
16408  PyErr_Restore(etype, eval, etb);
16409  }
16410  (*Py_TYPE(o)->tp_free)(o);
16411  }
16412  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
16413  PyObject *r;
16414  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
16415  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
16416  Py_DECREF(x);
16417  return r;
16418  }
16419 
16420  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
16421  if (v) {
16422  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
16423  }
16424  else {
16425  PyErr_Format(PyExc_NotImplementedError,
16426  "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name);
16427  return -1;
16428  }
16429  }
16430 
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)},
16441  {0, 0, 0, 0}
16442  };
16443 
16444  static PyNumberMethods __pyx_tp_as_number_index_set = {
16445  0, /*nb_add*/
16446  0, /*nb_subtract*/
16447  0, /*nb_multiply*/
16448  #if PY_MAJOR_VERSION < 3
16449  0, /*nb_divide*/
16450  #endif
16451  0, /*nb_remainder*/
16452  0, /*nb_divmod*/
16453  0, /*nb_power*/
16454  0, /*nb_negative*/
16455  0, /*nb_positive*/
16456  0, /*nb_absolute*/
16457  0, /*nb_nonzero*/
16458  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
16459  0, /*nb_lshift*/
16460  0, /*nb_rshift*/
16461  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
16462  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
16463  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
16464  #if PY_MAJOR_VERSION < 3
16465  0, /*nb_coerce*/
16466  #endif
16467  0, /*nb_int*/
16468  #if PY_MAJOR_VERSION < 3
16469  0, /*nb_long*/
16470  #else
16471  0, /*reserved*/
16472  #endif
16473  0, /*nb_float*/
16474  #if PY_MAJOR_VERSION < 3
16475  0, /*nb_oct*/
16476  #endif
16477  #if PY_MAJOR_VERSION < 3
16478  0, /*nb_hex*/
16479  #endif
16480  0, /*nb_inplace_add*/
16481  0, /*nb_inplace_subtract*/
16482  0, /*nb_inplace_multiply*/
16483  #if PY_MAJOR_VERSION < 3
16484  0, /*nb_inplace_divide*/
16485  #endif
16486  0, /*nb_inplace_remainder*/
16487  0, /*nb_inplace_power*/
16488  0, /*nb_inplace_lshift*/
16489  0, /*nb_inplace_rshift*/
16490  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
16491  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
16492  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
16493  0, /*nb_floor_divide*/
16494  0, /*nb_true_divide*/
16495  0, /*nb_inplace_floor_divide*/
16496  0, /*nb_inplace_true_divide*/
16497  #if PY_VERSION_HEX >= 0x02050000
16498  0, /*nb_index*/
16499  #endif
16500  };
16501 
16502  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
16503  0, /*sq_length*/
16504  0, /*sq_concat*/
16505  0, /*sq_repeat*/
16506  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
16507  0, /*sq_slice*/
16508  0, /*sq_ass_item*/
16509  0, /*sq_ass_slice*/
16510  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
16511  0, /*sq_inplace_concat*/
16512  0, /*sq_inplace_repeat*/
16513  };
16514 
16515  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
16516  0, /*mp_length*/
16517  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
16518  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
16519  };
16520 
16521  static PyTypeObject __pyx_type_8PyClical_index_set = {
16522  PyVarObject_HEAD_INIT(0, 0)
16523  __Pyx_NAMESTR("PyClical.index_set"), /*tp_name*/
16524  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
16525  0, /*tp_itemsize*/
16526  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
16527  0, /*tp_print*/
16528  0, /*tp_getattr*/
16529  0, /*tp_setattr*/
16530  #if PY_MAJOR_VERSION < 3
16531  0, /*tp_compare*/
16532  #else
16533  0, /*reserved*/
16534  #endif
16535  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
16536  &__pyx_tp_as_number_index_set, /*tp_as_number*/
16537  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
16538  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
16539  0, /*tp_hash*/
16540  0, /*tp_call*/
16541  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
16542  0, /*tp_getattro*/
16543  0, /*tp_setattro*/
16544  0, /*tp_as_buffer*/
16545  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
16546  __Pyx_DOCSTR("\n Python class index_set wraps C++ class IndexSet.\n "), /*tp_doc*/
16547  0, /*tp_traverse*/
16548  0, /*tp_clear*/
16549  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
16550  0, /*tp_weaklistoffset*/
16551  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
16552  0, /*tp_iternext*/
16553  __pyx_methods_8PyClical_index_set, /*tp_methods*/
16554  0, /*tp_members*/
16555  0, /*tp_getset*/
16556  0, /*tp_base*/
16557  0, /*tp_dict*/
16558  0, /*tp_descr_get*/
16559  0, /*tp_descr_set*/
16560  0, /*tp_dictoffset*/
16561  0, /*tp_init*/
16562  0, /*tp_alloc*/
16563  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
16564  0, /*tp_free*/
16565  0, /*tp_is_gc*/
16566  0, /*tp_bases*/
16567  0, /*tp_mro*/
16568  0, /*tp_cache*/
16569  0, /*tp_subclasses*/
16570  0, /*tp_weaklist*/
16571  0, /*tp_del*/
16572  #if PY_VERSION_HEX >= 0x02060000
16573  0, /*tp_version_tag*/
16574  #endif
16575  };
16576 
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;
16579 
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;
16582  PyObject *o;
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);
16588  } else {
16589  o = (*t->tp_alloc)(t, 0);
16590  if (unlikely(!o)) return 0;
16591  }
16592  p = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
16593  p->__pyx_v_idx = 0;
16594  p->__pyx_v_self = 0;
16595  p->__pyx_t_0 = 0;
16596  return o;
16597  }
16598 
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);
16607  } else {
16608  (*Py_TYPE(o)->tp_free)(o);
16609  }
16610  }
16611 
16612  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
16613  int e;
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;
16617  }
16618  if (p->__pyx_v_self) {
16619  e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
16620  }
16621  if (p->__pyx_t_0) {
16622  e = (*v)(p->__pyx_t_0, a); if (e) return e;
16623  }
16624  return 0;
16625  }
16626 
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;
16629  PyObject* tmp;
16630  tmp = ((PyObject*)p->__pyx_v_idx);
16631  p->__pyx_v_idx = Py_None; Py_INCREF(Py_None);
16632  Py_XDECREF(tmp);
16633  tmp = ((PyObject*)p->__pyx_v_self);
16634  p->__pyx_v_self = ((struct __pyx_obj_8PyClical_index_set *)Py_None); Py_INCREF(Py_None);
16635  Py_XDECREF(tmp);
16636  tmp = ((PyObject*)p->__pyx_t_0);
16637  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
16638  Py_XDECREF(tmp);
16639  return 0;
16640  }
16641 
16642  static PyMethodDef __pyx_methods_8PyClical___pyx_scope_struct____iter__[] = {
16643  {0, 0, 0, 0}
16644  };
16645 
16646  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
16647  PyVarObject_HEAD_INIT(0, 0)
16648  __Pyx_NAMESTR("PyClical.__pyx_scope_struct____iter__"), /*tp_name*/
16649  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
16650  0, /*tp_itemsize*/
16651  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
16652  0, /*tp_print*/
16653  0, /*tp_getattr*/
16654  0, /*tp_setattr*/
16655  #if PY_MAJOR_VERSION < 3
16656  0, /*tp_compare*/
16657  #else
16658  0, /*reserved*/
16659  #endif
16660  0, /*tp_repr*/
16661  0, /*tp_as_number*/
16662  0, /*tp_as_sequence*/
16663  0, /*tp_as_mapping*/
16664  0, /*tp_hash*/
16665  0, /*tp_call*/
16666  0, /*tp_str*/
16667  0, /*tp_getattro*/
16668  0, /*tp_setattro*/
16669  0, /*tp_as_buffer*/
16670  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
16671  0, /*tp_doc*/
16672  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
16673  __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__, /*tp_clear*/
16674  0, /*tp_richcompare*/
16675  0, /*tp_weaklistoffset*/
16676  0, /*tp_iter*/
16677  0, /*tp_iternext*/
16678  __pyx_methods_8PyClical___pyx_scope_struct____iter__, /*tp_methods*/
16679  0, /*tp_members*/
16680  0, /*tp_getset*/
16681  0, /*tp_base*/
16682  0, /*tp_dict*/
16683  0, /*tp_descr_get*/
16684  0, /*tp_descr_set*/
16685  0, /*tp_dictoffset*/
16686  0, /*tp_init*/
16687  0, /*tp_alloc*/
16688  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
16689  0, /*tp_free*/
16690  0, /*tp_is_gc*/
16691  0, /*tp_bases*/
16692  0, /*tp_mro*/
16693  0, /*tp_cache*/
16694  0, /*tp_subclasses*/
16695  0, /*tp_weaklist*/
16696  0, /*tp_del*/
16697  #if PY_VERSION_HEX >= 0x02060000
16698  0, /*tp_version_tag*/
16699  #endif
16700  };
16701  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
16702 
16703  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
16704  struct __pyx_obj_8PyClical_clifford *p;
16705  PyObject *o;
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;
16712  }
16713  return o;
16714  }
16715 
16716  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
16717  {
16718  PyObject *etype, *eval, *etb;
16719  PyErr_Fetch(&etype, &eval, &etb);
16720  ++Py_REFCNT(o);
16721  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
16722  if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
16723  --Py_REFCNT(o);
16724  PyErr_Restore(etype, eval, etb);
16725  }
16726  (*Py_TYPE(o)->tp_free)(o);
16727  }
16728  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
16729  PyObject *r;
16730  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
16731  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
16732  Py_DECREF(x);
16733  return r;
16734  }
16735 
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)},
16757  {0, 0, 0, 0}
16758  };
16759 
16760  static PyNumberMethods __pyx_tp_as_number_clifford = {
16761  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
16762  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
16763  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
16764  #if PY_MAJOR_VERSION < 3
16765  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
16766  #endif
16767  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
16768  0, /*nb_divmod*/
16769  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
16770  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
16771  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
16772  0, /*nb_absolute*/
16773  0, /*nb_nonzero*/
16774  0, /*nb_invert*/
16775  0, /*nb_lshift*/
16776  0, /*nb_rshift*/
16777  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
16778  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
16779  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
16780  #if PY_MAJOR_VERSION < 3
16781  0, /*nb_coerce*/
16782  #endif
16783  0, /*nb_int*/
16784  #if PY_MAJOR_VERSION < 3
16785  0, /*nb_long*/
16786  #else
16787  0, /*reserved*/
16788  #endif
16789  0, /*nb_float*/
16790  #if PY_MAJOR_VERSION < 3
16791  0, /*nb_oct*/
16792  #endif
16793  #if PY_MAJOR_VERSION < 3
16794  0, /*nb_hex*/
16795  #endif
16796  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
16797  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
16798  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
16799  #if PY_MAJOR_VERSION < 3
16800  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
16801  #endif
16802  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
16803  0, /*nb_inplace_power*/
16804  0, /*nb_inplace_lshift*/
16805  0, /*nb_inplace_rshift*/
16806  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
16807  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
16808  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
16809  0, /*nb_floor_divide*/
16810  0, /*nb_true_divide*/
16811  0, /*nb_inplace_floor_divide*/
16812  0, /*nb_inplace_true_divide*/
16813  #if PY_VERSION_HEX >= 0x02050000
16814  0, /*nb_index*/
16815  #endif
16816  };
16817 
16818  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
16819  0, /*sq_length*/
16820  0, /*sq_concat*/
16821  0, /*sq_repeat*/
16822  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
16823  0, /*sq_slice*/
16824  0, /*sq_ass_item*/
16825  0, /*sq_ass_slice*/
16826  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
16827  0, /*sq_inplace_concat*/
16828  0, /*sq_inplace_repeat*/
16829  };
16830 
16831  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
16832  0, /*mp_length*/
16833  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
16834  0, /*mp_ass_subscript*/
16835  };
16836 
16837  static PyTypeObject __pyx_type_8PyClical_clifford = {
16838  PyVarObject_HEAD_INIT(0, 0)
16839  __Pyx_NAMESTR("PyClical.clifford"), /*tp_name*/
16840  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
16841  0, /*tp_itemsize*/
16842  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
16843  0, /*tp_print*/
16844  0, /*tp_getattr*/
16845  0, /*tp_setattr*/
16846  #if PY_MAJOR_VERSION < 3
16847  0, /*tp_compare*/
16848  #else
16849  0, /*reserved*/
16850  #endif
16851  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
16852  &__pyx_tp_as_number_clifford, /*tp_as_number*/
16853  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
16854  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
16855  0, /*tp_hash*/
16856  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
16857  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
16858  0, /*tp_getattro*/
16859  0, /*tp_setattro*/
16860  0, /*tp_as_buffer*/
16861  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
16862  __Pyx_DOCSTR("\n Python class clifford wraps C++ class Clifford.\n "), /*tp_doc*/
16863  0, /*tp_traverse*/
16864  0, /*tp_clear*/
16865  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
16866  0, /*tp_weaklistoffset*/
16867  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
16868  0, /*tp_iternext*/
16869  __pyx_methods_8PyClical_clifford, /*tp_methods*/
16870  0, /*tp_members*/
16871  0, /*tp_getset*/
16872  0, /*tp_base*/
16873  0, /*tp_dict*/
16874  0, /*tp_descr_get*/
16875  0, /*tp_descr_set*/
16876  0, /*tp_dictoffset*/
16877  0, /*tp_init*/
16878  0, /*tp_alloc*/
16879  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
16880  0, /*tp_free*/
16881  0, /*tp_is_gc*/
16882  0, /*tp_bases*/
16883  0, /*tp_mro*/
16884  0, /*tp_cache*/
16885  0, /*tp_subclasses*/
16886  0, /*tp_weaklist*/
16887  0, /*tp_del*/
16888  #if PY_VERSION_HEX >= 0x02060000
16889  0, /*tp_version_tag*/
16890  #endif
16891  };
16892 
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)},
16933  {0, 0, 0, 0}
16934  };
16935 
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 },
16940  #else
16941  PyModuleDef_HEAD_INIT,
16942  #endif
16943  __Pyx_NAMESTR("PyClical"),
16944  0, /* m_doc */
16945  -1, /* m_size */
16946  __pyx_methods /* m_methods */,
16947  NULL, /* m_reload */
16948  NULL, /* m_traverse */
16949  NULL, /* m_clear */
16950  NULL /* m_free */
16951  };
16952  #endif
16953 
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}
17272 };
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;}
17282  #else
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;}
17284  #endif
17285  return 0;
17286  __pyx_L1_error:;
17287  return -1;
17288 }
17289 
17290 static int __Pyx_InitCachedConstants(void) {
17291  __Pyx_RefNannyDeclarations
17292  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
17293 
17294  /* "PyClical.pyx":635
17295  * TypeError: Not applicable.
17296  * """
17297  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
17298  *
17299  * def __iter__(self):
17300  */
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));
17304 
17305  /* "PyClical.pyx":646
17306  * TypeError: Not applicable.
17307  * """
17308  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
17309  *
17310  * def reframe(self, ixt):
17311  */
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));
17315 
17316  /* "PyClical.pyx":404
17317  * return index_set_to_str( self.unwrap() ).c_str()
17318  *
17319  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
17320  * """
17321  * Tests for functions that Doctest cannot see.
17322  */
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;}
17324 
17325  /* "PyClical.pyx":1243
17326  * return clifford_to_str( self.unwrap() ).c_str()
17327  *
17328  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
17329  * """
17330  * Tests for functions that Doctest cannot see.
17331  */
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;}
17333 
17334  /* "PyClical.pyx":1887
17335  * """
17336  *
17337  * def e(obj): # <<<<<<<<<<<<<<
17338  * """
17339  * Abbreviation for clifford(index_set(obj)).
17340  */
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;}
17345 
17346  /* "PyClical.pyx":1900
17347  * return clifford(index_set(obj))
17348  *
17349  * def istpq(p, q): # <<<<<<<<<<<<<<
17350  * """
17351  * Abbreviation for index_set({-q,...p}).
17352  */
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;}
17357 
17358  /* "PyClical.pyx":1909
17359  * return index_set(set(range(-q,p+1)))
17360  *
17361  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
17362  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
17363  *
17364  */
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));
17371 
17372  /* "PyClical.pyx":1910
17373  *
17374  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
17375  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
17376  *
17377  * # Doctest interface.
17378  */
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));
17385 
17386  /* "PyClical.pyx":1913
17387  *
17388  * # Doctest interface.
17389  * def _test(): # <<<<<<<<<<<<<<
17390  * import PyClical, doctest
17391  * return doctest.testmod(PyClical)
17392  */
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();
17398  return 0;
17399  __pyx_L1_error:;
17400  __Pyx_RefNannyFinishContext();
17401  return -1;
17402 }
17403 
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;};
17410  return 0;
17411  __pyx_L1_error:;
17412  return -1;
17413 }
17414 
17415 #if PY_MAJOR_VERSION < 3
17416 PyMODINIT_FUNC initPyClical(void); /*proto*/
17417 PyMODINIT_FUNC initPyClical(void)
17418 #else
17419 PyMODINIT_FUNC PyInit_PyClical(void); /*proto*/
17420 PyMODINIT_FUNC PyInit_PyClical(void)
17421 #endif
17422 {
17423  PyObject *__pyx_t_1 = NULL;
17424  PyObject *__pyx_t_2 = NULL;
17425  PyObject *__pyx_t_3 = NULL;
17426  int __pyx_t_4;
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) {
17434  PyErr_Clear();
17435  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
17436  if (!__Pyx_RefNanny)
17437  Py_FatalError("failed to import 'refnanny' module");
17438  }
17439  #endif
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;}
17446  #endif
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;}
17449  #endif
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;}
17452  #endif
17453  /*--- Library function declarations ---*/
17454  /*--- Threads initialization code ---*/
17455  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
17456  #ifdef WITH_THREAD /* Python build with threading support? */
17457  PyEval_InitThreads();
17458  #endif
17459  #endif
17460  /*--- Module creation code ---*/
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);
17463  #else
17464  __pyx_m = PyModule_Create(&__pyx_moduledef);
17465  #endif
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
17470  {
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;}
17474  }
17475  }
17476  #endif
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);
17480  #endif
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;};
17482  /*--- Initialize various global constants etc. ---*/
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;}
17486  #endif
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;};
17489  }
17490  /*--- Builtin init code ---*/
17491  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17492  /*--- Constants init code ---*/
17493  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17494  /*--- Global init code ---*/
17495  /*--- Variable export code ---*/
17496  /*--- Function export code ---*/
17497  /*--- Type init code ---*/
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
17504  {
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__;
17510  }
17511  }
17512  #endif
17513  #if CYTHON_COMPILING_IN_CPYTHON
17514  {
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__;
17520  }
17521  }
17522  #endif
17523  #if CYTHON_COMPILING_IN_CPYTHON
17524  {
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__;
17530  }
17531  }
17532  #endif
17533  #if CYTHON_COMPILING_IN_CPYTHON
17534  {
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__;
17540  }
17541  }
17542  #endif
17543  #if CYTHON_COMPILING_IN_CPYTHON
17544  {
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__;
17550  }
17551  }
17552  #endif
17553  #if CYTHON_COMPILING_IN_CPYTHON
17554  {
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__;
17560  }
17561  }
17562  #endif
17563  #if CYTHON_COMPILING_IN_CPYTHON
17564  {
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__;
17570  }
17571  }
17572  #endif
17573  #if CYTHON_COMPILING_IN_CPYTHON
17574  {
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__;
17580  }
17581  }
17582  #endif
17583  #if CYTHON_COMPILING_IN_CPYTHON
17584  {
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__;
17590  }
17591  }
17592  #endif
17593  #if CYTHON_COMPILING_IN_CPYTHON
17594  {
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__;
17600  }
17601  }
17602  #endif
17603  #if CYTHON_COMPILING_IN_CPYTHON
17604  {
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__;
17610  }
17611  }
17612  #endif
17613  #if CYTHON_COMPILING_IN_CPYTHON
17614  {
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__;
17620  }
17621  }
17622  #endif
17623  #if CYTHON_COMPILING_IN_CPYTHON
17624  {
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__;
17630  }
17631  }
17632  #endif
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
17644  {
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__;
17650  }
17651  }
17652  #endif
17653  #if CYTHON_COMPILING_IN_CPYTHON
17654  {
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__;
17660  }
17661  }
17662  #endif
17663  #if CYTHON_COMPILING_IN_CPYTHON
17664  {
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__;
17670  }
17671  }
17672  #endif
17673  #if CYTHON_COMPILING_IN_CPYTHON
17674  {
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__;
17680  }
17681  }
17682  #endif
17683  #if CYTHON_COMPILING_IN_CPYTHON
17684  {
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__;
17690  }
17691  }
17692  #endif
17693  #if CYTHON_COMPILING_IN_CPYTHON
17694  {
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__;
17700  }
17701  }
17702  #endif
17703  #if CYTHON_COMPILING_IN_CPYTHON
17704  {
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__;
17710  }
17711  }
17712  #endif
17713  #if CYTHON_COMPILING_IN_CPYTHON
17714  {
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__;
17720  }
17721  }
17722  #endif
17723  #if CYTHON_COMPILING_IN_CPYTHON
17724  {
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__;
17730  }
17731  }
17732  #endif
17733  #if CYTHON_COMPILING_IN_CPYTHON
17734  {
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__;
17740  }
17741  }
17742  #endif
17743  #if CYTHON_COMPILING_IN_CPYTHON
17744  {
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__;
17750  }
17751  }
17752  #endif
17753  #if CYTHON_COMPILING_IN_CPYTHON
17754  {
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__;
17760  }
17761  }
17762  #endif
17763  #if CYTHON_COMPILING_IN_CPYTHON
17764  {
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__;
17770  }
17771  }
17772  #endif
17773  #if CYTHON_COMPILING_IN_CPYTHON
17774  {
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__;
17780  }
17781  }
17782  #endif
17783  #if CYTHON_COMPILING_IN_CPYTHON
17784  {
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__;
17790  }
17791  }
17792  #endif
17793  #if CYTHON_COMPILING_IN_CPYTHON
17794  {
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__;
17800  }
17801  }
17802  #endif
17803  #if CYTHON_COMPILING_IN_CPYTHON
17804  {
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__;
17810  }
17811  }
17812  #endif
17813  #if CYTHON_COMPILING_IN_CPYTHON
17814  {
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__;
17820  }
17821  }
17822  #endif
17823  #if CYTHON_COMPILING_IN_CPYTHON
17824  {
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__;
17830  }
17831  }
17832  #endif
17833  #if CYTHON_COMPILING_IN_CPYTHON
17834  {
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__;
17840  }
17841  }
17842  #endif
17843  #if CYTHON_COMPILING_IN_CPYTHON
17844  {
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__;
17850  }
17851  }
17852  #endif
17853  #if CYTHON_COMPILING_IN_CPYTHON
17854  {
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__;
17860  }
17861  }
17862  #endif
17863  #if CYTHON_COMPILING_IN_CPYTHON
17864  {
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__;
17870  }
17871  }
17872  #endif
17873  #if CYTHON_COMPILING_IN_CPYTHON
17874  {
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__;
17880  }
17881  }
17882  #endif
17883  #if CYTHON_COMPILING_IN_CPYTHON
17884  {
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__;
17890  }
17891  }
17892  #endif
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;
17896  /*--- Type import code ---*/
17897  /*--- Variable import code ---*/
17898  /*--- Function import code ---*/
17899  /*--- Execution code ---*/
17900 
17901  /* "PyClical.pyx":28
17902  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
17903  *
17904  * import math # <<<<<<<<<<<<<<
17905  * import numbers
17906  * import collections
17907  */
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;
17912 
17913  /* "PyClical.pyx":29
17914  *
17915  * import math
17916  * import numbers # <<<<<<<<<<<<<<
17917  * import collections
17918  *
17919  */
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;
17924 
17925  /* "PyClical.pyx":30
17926  * import math
17927  * import numbers
17928  * import collections # <<<<<<<<<<<<<<
17929  *
17930  * __version__ = "0.8.2"
17931  */
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;
17936 
17937  /* "PyClical.pyx":32
17938  * import collections
17939  *
17940  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
17941  *
17942  * from PyClical cimport *
17943  */
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;}
17945 
17946  /* "PyClical.pyx":404
17947  * return index_set_to_str( self.unwrap() ).c_str()
17948  *
17949  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
17950  * """
17951  * Tests for functions that Doctest cannot see.
17952  */
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;
17957 
17958  /* "PyClical.pyx":1243
17959  * return clifford_to_str( self.unwrap() ).c_str()
17960  *
17961  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
17962  * """
17963  * Tests for functions that Doctest cannot see.
17964  */
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;
17969 
17970  /* "PyClical.pyx":1815
17971  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17972  *
17973  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17974  * """
17975  * Random multivector within a frame.
17976  */
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);
17981  __pyx_t_1 = 0;
17982 
17983  /* "PyClical.pyx":1856
17984  *
17985  * # Some abbreviations.
17986  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
17987  * pi = tau / 2.0
17988  *
17989  */
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);
17996  __pyx_t_1 = 0;
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;
18011 
18012  /* "PyClical.pyx":1857
18013  * # Some abbreviations.
18014  * tau = atan(clifford(1.0)) * 8.0
18015  * pi = tau / 2.0 # <<<<<<<<<<<<<<
18016  *
18017  * cl = clifford
18018  */
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;
18029 
18030  /* "PyClical.pyx":1859
18031  * pi = tau / 2.0
18032  *
18033  * cl = clifford # <<<<<<<<<<<<<<
18034  * """
18035  * Abbreviation for clifford.
18036  */
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;}
18038 
18039  /* "PyClical.pyx":1879
18040  * """
18041  *
18042  * ist = index_set # <<<<<<<<<<<<<<
18043  * """
18044  * Abbreviation for index_set.
18045  */
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;}
18047 
18048  /* "PyClical.pyx":1887
18049  * """
18050  *
18051  * def e(obj): # <<<<<<<<<<<<<<
18052  * """
18053  * Abbreviation for clifford(index_set(obj)).
18054  */
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;
18059 
18060  /* "PyClical.pyx":1900
18061  * return clifford(index_set(obj))
18062  *
18063  * def istpq(p, q): # <<<<<<<<<<<<<<
18064  * """
18065  * Abbreviation for index_set({-q,...p}).
18066  */
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;
18071 
18072  /* "PyClical.pyx":1909
18073  * return index_set(set(range(-q,p+1)))
18074  *
18075  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
18076  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
18077  *
18078  */
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;
18095 
18096  /* "PyClical.pyx":1910
18097  *
18098  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18099  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
18100  *
18101  * # Doctest interface.
18102  */
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;
18119 
18120  /* "PyClical.pyx":1913
18121  *
18122  * # Doctest interface.
18123  * def _test(): # <<<<<<<<<<<<<<
18124  * import PyClical, doctest
18125  * return doctest.testmod(PyClical)
18126  */
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;
18131 
18132  /* "PyClical.pyx":1917
18133  * return doctest.testmod(PyClical)
18134  *
18135  * if __name__ == "__main__": # <<<<<<<<<<<<<<
18136  * _test()
18137  */
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;
18144  if (__pyx_t_4) {
18145 
18146  /* "PyClical.pyx":1918
18147  *
18148  * if __name__ == "__main__":
18149  * _test() # <<<<<<<<<<<<<<
18150  */
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;
18157  goto __pyx_L2;
18158  }
18159  __pyx_L2:;
18160 
18161  /* "PyClical.pyx":1
18162  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
18163  * # distutils: language = c++
18164  * #
18165  */
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;
18277  goto __pyx_L0;
18278  __pyx_L1_error:;
18279  __Pyx_XDECREF(__pyx_t_1);
18280  __Pyx_XDECREF(__pyx_t_2);
18281  __Pyx_XDECREF(__pyx_t_3);
18282  if (__pyx_m) {
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");
18287  }
18288  __pyx_L0:;
18289  __Pyx_RefNannyFinishContext();
18290  #if PY_MAJOR_VERSION < 3
18291  return;
18292  #else
18293  return __pyx_m;
18294  #endif
18295 }
18296 
18297 /* Runtime support code */
18298 #if CYTHON_REFNANNY
18299 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
18300  PyObject *m = NULL, *p = NULL;
18301  void *r = NULL;
18302  m = PyImport_ImportModule((char *)modname);
18303  if (!m) goto end;
18304  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
18305  if (!p) goto end;
18306  r = PyLong_AsVoidPtr(p);
18307 end:
18308  Py_XDECREF(p);
18309  Py_XDECREF(m);
18310  return (__Pyx_RefNannyAPIStruct *)r;
18311 }
18312 #endif /* CYTHON_REFNANNY */
18313 
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);
18320 #else
18321  "name '%s' is not defined", PyString_AS_STRING(name));
18322 #endif
18323  }
18324  return result;
18325 }
18326 
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);
18340 #else
18341  PyErr_Restore(type, value, tb);
18342 #endif
18343 }
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;
18353 #else
18354  PyErr_Fetch(type, value, tb);
18355 #endif
18356 }
18357 
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;
18361  PyObject *ctx;
18362  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
18363  #if PY_MAJOR_VERSION < 3
18364  ctx = PyString_FromString(name);
18365  #else
18366  ctx = PyUnicode_FromString(name);
18367  #endif
18368  __Pyx_ErrRestore(old_exc, old_val, old_tb);
18369  if (!ctx) {
18370  PyErr_WriteUnraisable(Py_None);
18371  } else {
18372  PyErr_WriteUnraisable(ctx);
18373  Py_DECREF(ctx);
18374  }
18375 }
18376 
18377 static void __Pyx_RaiseDoubleKeywordsError(
18378  const char* func_name,
18379  PyObject* kw_name)
18380 {
18381  PyErr_Format(PyExc_TypeError,
18382  #if PY_MAJOR_VERSION >= 3
18383  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
18384  #else
18385  "%s() got multiple values for keyword argument '%s'", func_name,
18386  PyString_AsString(kw_name));
18387  #endif
18388 }
18389 
18390 static int __Pyx_ParseOptionalKeywords(
18391  PyObject *kwds,
18392  PyObject **argnames[],
18393  PyObject *kwds2,
18394  PyObject *values[],
18395  Py_ssize_t num_pos_args,
18396  const char* function_name)
18397 {
18398  PyObject *key = 0, *value = 0;
18399  Py_ssize_t pos = 0;
18400  PyObject*** name;
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++;
18405  if (*name) {
18406  values[name-argnames] = value;
18407  continue;
18408  }
18409  name = first_kw_arg;
18410  #if PY_MAJOR_VERSION < 3
18411  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
18412  while (*name) {
18413  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
18414  && _PyString_Eq(**name, key)) {
18415  values[name-argnames] = value;
18416  break;
18417  }
18418  name++;
18419  }
18420  if (*name) continue;
18421  else {
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;
18428  }
18429  argname++;
18430  }
18431  }
18432  } else
18433  #endif
18434  if (likely(PyUnicode_Check(key))) {
18435  while (*name) {
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 :
18439  #endif
18440  PyUnicode_Compare(**name, key);
18441  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
18442  if (cmp == 0) {
18443  values[name-argnames] = value;
18444  break;
18445  }
18446  name++;
18447  }
18448  if (*name) continue;
18449  else {
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 :
18455  #endif
18456  PyUnicode_Compare(**argname, key);
18457  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
18458  if (cmp == 0) goto arg_passed_twice;
18459  argname++;
18460  }
18461  }
18462  } else
18463  goto invalid_keyword_type;
18464  if (kwds2) {
18465  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
18466  } else {
18467  goto invalid_keyword;
18468  }
18469  }
18470  return 0;
18471 arg_passed_twice:
18472  __Pyx_RaiseDoubleKeywordsError(function_name, key);
18473  goto bad;
18474 invalid_keyword_type:
18475  PyErr_Format(PyExc_TypeError,
18476  "%s() keywords must be strings", function_name);
18477  goto bad;
18478 invalid_keyword:
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));
18483  #else
18484  "%s() got an unexpected keyword argument '%U'",
18485  function_name, key);
18486  #endif
18487 bad:
18488  return -1;
18489 }
18490 
18491 static void __Pyx_RaiseArgtupleInvalid(
18492  const char* func_name,
18493  int exact,
18494  Py_ssize_t num_min,
18495  Py_ssize_t num_max,
18496  Py_ssize_t num_found)
18497 {
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";
18503  } else {
18504  num_expected = num_max;
18505  more_or_less = "at most";
18506  }
18507  if (exact) {
18508  more_or_less = "exactly";
18509  }
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);
18514 }
18515 
18516 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
18517  PyObject *result;
18518 #if CYTHON_COMPILING_IN_CPYTHON
18519  result = PyDict_GetItem(__pyx_d, name);
18520  if (result) {
18521  Py_INCREF(result);
18522  } else {
18523 #else
18524  result = PyObject_GetItem(__pyx_d, name);
18525  if (!result) {
18526  PyErr_Clear();
18527 #endif
18528  result = __Pyx_GetBuiltinName(name);
18529  }
18530  return result;
18531 }
18532 
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;
18544 #else
18545  PyErr_Fetch(&local_type, &local_value, &local_tb);
18546 #endif
18547  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
18548 #if CYTHON_COMPILING_IN_CPYTHON
18549  if (unlikely(tstate->curexc_type))
18550 #else
18551  if (unlikely(PyErr_Occurred()))
18552 #endif
18553  goto bad;
18554  #if PY_MAJOR_VERSION >= 3
18555  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
18556  goto bad;
18557  #endif
18558  Py_INCREF(local_type);
18559  Py_INCREF(local_value);
18560  Py_INCREF(local_tb);
18561  *type = local_type;
18562  *value = local_value;
18563  *tb = local_tb;
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;
18571  /* Make sure tstate is in a consistent state when we XDECREF
18572  these objects (DECREF may run arbitrary code). */
18573  Py_XDECREF(tmp_type);
18574  Py_XDECREF(tmp_value);
18575  Py_XDECREF(tmp_tb);
18576 #else
18577  PyErr_SetExcInfo(local_type, local_value, local_tb);
18578 #endif
18579  return 0;
18580 bad:
18581  *type = 0;
18582  *value = 0;
18583  *tb = 0;
18584  Py_XDECREF(local_type);
18585  Py_XDECREF(local_value);
18586  Py_XDECREF(local_tb);
18587  return -1;
18588 }
18589 
18590 #if PY_MAJOR_VERSION < 3
18591 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
18592  CYTHON_UNUSED PyObject *cause) {
18593  Py_XINCREF(type);
18594  if (!value || value == Py_None)
18595  value = NULL;
18596  else
18597  Py_INCREF(value);
18598  if (!tb || tb == Py_None)
18599  tb = NULL;
18600  else {
18601  Py_INCREF(tb);
18602  if (!PyTraceBack_Check(tb)) {
18603  PyErr_SetString(PyExc_TypeError,
18604  "raise: arg 3 must be a traceback or None");
18605  goto raise_error;
18606  }
18607  }
18608  #if PY_VERSION_HEX < 0x02050000
18609  if (PyClass_Check(type)) {
18610  #else
18611  if (PyType_Check(type)) {
18612  #endif
18613 #if CYTHON_COMPILING_IN_PYPY
18614  if (!value) {
18615  Py_INCREF(Py_None);
18616  value = Py_None;
18617  }
18618 #endif
18619  PyErr_NormalizeException(&type, &value, &tb);
18620  } else {
18621  if (value) {
18622  PyErr_SetString(PyExc_TypeError,
18623  "instance exception may not have a separate value");
18624  goto raise_error;
18625  }
18626  value = type;
18627  #if PY_VERSION_HEX < 0x02050000
18628  if (PyInstance_Check(type)) {
18629  type = (PyObject*) ((PyInstanceObject*)type)->in_class;
18630  Py_INCREF(type);
18631  } else {
18632  type = 0;
18633  PyErr_SetString(PyExc_TypeError,
18634  "raise: exception must be an old-style class or instance");
18635  goto raise_error;
18636  }
18637  #else
18638  type = (PyObject*) Py_TYPE(type);
18639  Py_INCREF(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");
18643  goto raise_error;
18644  }
18645  #endif
18646  }
18647  __Pyx_ErrRestore(type, value, tb);
18648  return;
18649 raise_error:
18650  Py_XDECREF(value);
18651  Py_XDECREF(type);
18652  Py_XDECREF(tb);
18653  return;
18654 }
18655 #else /* Python 3+ */
18656 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
18657  PyObject* owned_instance = NULL;
18658  if (tb == Py_None) {
18659  tb = 0;
18660  } else if (tb && !PyTraceBack_Check(tb)) {
18661  PyErr_SetString(PyExc_TypeError,
18662  "raise: arg 3 must be a traceback or None");
18663  goto bad;
18664  }
18665  if (value == Py_None)
18666  value = 0;
18667  if (PyExceptionInstance_Check(type)) {
18668  if (value) {
18669  PyErr_SetString(PyExc_TypeError,
18670  "instance exception may not have a separate value");
18671  goto bad;
18672  }
18673  value = type;
18674  type = (PyObject*) Py_TYPE(value);
18675  } else if (PyExceptionClass_Check(type)) {
18676  PyObject *args;
18677  if (!value)
18678  args = PyTuple_New(0);
18679  else if (PyTuple_Check(value)) {
18680  Py_INCREF(value);
18681  args = value;
18682  } else
18683  args = PyTuple_Pack(1, value);
18684  if (!args)
18685  goto bad;
18686  owned_instance = PyEval_CallObject(type, args);
18687  Py_DECREF(args);
18688  if (!owned_instance)
18689  goto bad;
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));
18696  goto bad;
18697  }
18698  } else {
18699  PyErr_SetString(PyExc_TypeError,
18700  "raise: exception class must be a subclass of BaseException");
18701  goto bad;
18702  }
18703 #if PY_VERSION_HEX >= 0x03030000
18704  if (cause) {
18705 #else
18706  if (cause && cause != Py_None) {
18707 #endif
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)
18714  goto bad;
18715  } else if (PyExceptionInstance_Check(cause)) {
18716  fixed_cause = cause;
18717  Py_INCREF(fixed_cause);
18718  } else {
18719  PyErr_SetString(PyExc_TypeError,
18720  "exception causes must derive from "
18721  "BaseException");
18722  goto bad;
18723  }
18724  PyException_SetCause(value, fixed_cause);
18725  }
18726  PyErr_SetObject(type, value);
18727  if (tb) {
18728  PyThreadState *tstate = PyThreadState_GET();
18729  PyObject* tmp_tb = tstate->curexc_traceback;
18730  if (tb != tmp_tb) {
18731  Py_INCREF(tb);
18732  tstate->curexc_traceback = tb;
18733  Py_XDECREF(tmp_tb);
18734  }
18735  }
18736 bad:
18737  Py_XDECREF(owned_instance);
18738  return;
18739 }
18740 #endif
18741 
18742 static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
18743  int r;
18744  if (!j) return -1;
18745  r = PyObject_SetItem(o, j, v);
18746  Py_DECREF(j);
18747  return r;
18748 }
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);
18756  Py_INCREF(v);
18757  PyList_SET_ITEM(o, n, v);
18758  Py_DECREF(old);
18759  return 1;
18760  }
18761  } else {
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)) {
18767  i += l;
18768  } else {
18769  if (PyErr_ExceptionMatches(PyExc_OverflowError))
18770  PyErr_Clear();
18771  else
18772  return -1;
18773  }
18774  }
18775  return m->sq_ass_item(o, i, v);
18776  }
18777  }
18778 #else
18779 #if CYTHON_COMPILING_IN_PYPY
18780  if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
18781 #else
18782  if (is_list || PySequence_Check(o)) {
18783 #endif
18784  return PySequence_SetItem(o, i, v);
18785  }
18786 #endif
18787  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
18788 }
18789 
18790 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
18791  const char *name, int exact)
18792 {
18793  if (!type) {
18794  PyErr_Format(PyExc_SystemError, "Missing type object");
18795  return 0;
18796  }
18797  if (none_allowed && obj == Py_None) return 1;
18798  else if (exact) {
18799  if (Py_TYPE(obj) == type) return 1;
18800  }
18801  else {
18802  if (PyObject_TypeCheck(obj, type)) return 1;
18803  }
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);
18807  return 0;
18808 }
18809 
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);
18813 #else
18814  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
18815 #endif
18816  if (!ob)
18817  goto bad;
18818  if (PyDict_SetItem(dict, __pyx_n_s____pyx_vtable__, ob) < 0)
18819  goto bad;
18820  Py_DECREF(ob);
18821  return 0;
18822 bad:
18823  Py_XDECREF(ob);
18824  return -1;
18825 }
18826 
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;
18833  Py_XINCREF(*type);
18834  Py_XINCREF(*value);
18835  Py_XINCREF(*tb);
18836 #else
18837  PyErr_GetExcInfo(type, value, tb);
18838 #endif
18839 }
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);
18853 #else
18854  PyErr_SetExcInfo(type, value, tb);
18855 #endif
18856 }
18857 
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;
18863  PyObject *list;
18864  #if PY_VERSION_HEX < 0x03030000
18865  PyObject *py_import;
18866  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__);
18867  if (!py_import)
18868  goto bad;
18869  #endif
18870  if (from_list)
18871  list = from_list;
18872  else {
18873  empty_list = PyList_New(0);
18874  if (!empty_list)
18875  goto bad;
18876  list = empty_list;
18877  }
18878  global_dict = PyModule_GetDict(__pyx_m);
18879  if (!global_dict)
18880  goto bad;
18881  empty_dict = PyDict_New();
18882  if (!empty_dict)
18883  goto bad;
18884  #if PY_VERSION_HEX >= 0x02050000
18885  {
18886  #if PY_MAJOR_VERSION >= 3
18887  if (level == -1) {
18888  if (strchr(__Pyx_MODULE_NAME, '.')) {
18889  #if PY_VERSION_HEX < 0x03030000
18890  PyObject *py_level = PyInt_FromLong(1);
18891  if (!py_level)
18892  goto bad;
18893  module = PyObject_CallFunctionObjArgs(py_import,
18894  name, global_dict, empty_dict, list, py_level, NULL);
18895  Py_DECREF(py_level);
18896  #else
18897  module = PyImport_ImportModuleLevelObject(
18898  name, global_dict, empty_dict, list, 1);
18899  #endif
18900  if (!module) {
18901  if (!PyErr_ExceptionMatches(PyExc_ImportError))
18902  goto bad;
18903  PyErr_Clear();
18904  }
18905  }
18906  level = 0; /* try absolute import on failure */
18907  }
18908  #endif
18909  if (!module) {
18910  #if PY_VERSION_HEX < 0x03030000
18911  PyObject *py_level = PyInt_FromLong(level);
18912  if (!py_level)
18913  goto bad;
18914  module = PyObject_CallFunctionObjArgs(py_import,
18915  name, global_dict, empty_dict, list, py_level, NULL);
18916  Py_DECREF(py_level);
18917  #else
18918  module = PyImport_ImportModuleLevelObject(
18919  name, global_dict, empty_dict, list, level);
18920  #endif
18921  }
18922  }
18923  #else
18924  if (level>0) {
18925  PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
18926  goto bad;
18927  }
18928  module = PyObject_CallFunctionObjArgs(py_import,
18929  name, global_dict, empty_dict, list, NULL);
18930  #endif
18931 bad:
18932  #if PY_VERSION_HEX < 0x03030000
18933  Py_XDECREF(py_import);
18934  #endif
18935  Py_XDECREF(empty_list);
18936  Py_XDECREF(empty_dict);
18937  return module;
18938 }
18939 
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");
18951  }
18952  return (unsigned char)-1;
18953  }
18954  return (unsigned char)val;
18955  }
18956  return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
18957 }
18958 
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");
18970  }
18971  return (unsigned short)-1;
18972  }
18973  return (unsigned short)val;
18974  }
18975  return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
18976 }
18977 
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");
18989  }
18990  return (unsigned int)-1;
18991  }
18992  return (unsigned int)val;
18993  }
18994  return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
18995 }
18996 
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");
19008  }
19009  return (char)-1;
19010  }
19011  return (char)val;
19012  }
19013  return (char)__Pyx_PyInt_AsLong(x);
19014 }
19015 
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");
19027  }
19028  return (short)-1;
19029  }
19030  return (short)val;
19031  }
19032  return (short)__Pyx_PyInt_AsLong(x);
19033 }
19034 
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");
19046  }
19047  return (int)-1;
19048  }
19049  return (int)val;
19050  }
19051  return (int)__Pyx_PyInt_AsLong(x);
19052 }
19053 
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");
19065  }
19066  return (signed char)-1;
19067  }
19068  return (signed char)val;
19069  }
19070  return (signed char)__Pyx_PyInt_AsSignedLong(x);
19071 }
19072 
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");
19084  }
19085  return (signed short)-1;
19086  }
19087  return (signed short)val;
19088  }
19089  return (signed short)__Pyx_PyInt_AsSignedLong(x);
19090 }
19091 
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");
19103  }
19104  return (signed int)-1;
19105  }
19106  return (signed int)val;
19107  }
19108  return (signed int)__Pyx_PyInt_AsSignedLong(x);
19109 }
19110 
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");
19122  }
19123  return (int)-1;
19124  }
19125  return (int)val;
19126  }
19127  return (int)__Pyx_PyInt_AsLong(x);
19128 }
19129 
19130 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19131 #if CYTHON_USE_PYLONG_INTERNALS
19132 #include "longintrepr.h"
19133 #endif
19134 #endif
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;
19145  }
19146  return (unsigned long)val;
19147  } else
19148 #endif
19149  if (likely(PyLong_Check(x))) {
19150  if (is_unsigned) {
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)) {
19155  case 0: return 0;
19156  case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0];
19157  }
19158  }
19159 #endif
19160 #endif
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;
19165  }
19166  return (unsigned long)PyLong_AsUnsignedLong(x);
19167  } else {
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)) {
19172  case 0: return 0;
19173  case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0];
19174  case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0];
19175  }
19176  }
19177 #endif
19178 #endif
19179  return (unsigned long)PyLong_AsLong(x);
19180  }
19181  } else {
19182  unsigned long val;
19183  PyObject *tmp = __Pyx_PyNumber_Int(x);
19184  if (!tmp) return (unsigned long)-1;
19185  val = __Pyx_PyInt_AsUnsignedLong(tmp);
19186  Py_DECREF(tmp);
19187  return val;
19188  }
19189 }
19190 
19191 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19192 #if CYTHON_USE_PYLONG_INTERNALS
19193 #include "longintrepr.h"
19194 #endif
19195 #endif
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;
19206  }
19207  return (unsigned PY_LONG_LONG)val;
19208  } else
19209 #endif
19210  if (likely(PyLong_Check(x))) {
19211  if (is_unsigned) {
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)) {
19216  case 0: return 0;
19217  case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19218  }
19219  }
19220 #endif
19221 #endif
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;
19226  }
19227  return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
19228  } else {
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)) {
19233  case 0: return 0;
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];
19236  }
19237  }
19238 #endif
19239 #endif
19240  return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
19241  }
19242  } else {
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);
19247  Py_DECREF(tmp);
19248  return val;
19249  }
19250 }
19251 
19252 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19253 #if CYTHON_USE_PYLONG_INTERNALS
19254 #include "longintrepr.h"
19255 #endif
19256 #endif
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");
19266  return (long)-1;
19267  }
19268  return (long)val;
19269  } else
19270 #endif
19271  if (likely(PyLong_Check(x))) {
19272  if (is_unsigned) {
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)) {
19277  case 0: return 0;
19278  case 1: return (long) ((PyLongObject*)x)->ob_digit[0];
19279  }
19280  }
19281 #endif
19282 #endif
19283  if (unlikely(Py_SIZE(x) < 0)) {
19284  PyErr_SetString(PyExc_OverflowError,
19285  "can't convert negative value to long");
19286  return (long)-1;
19287  }
19288  return (long)PyLong_AsUnsignedLong(x);
19289  } else {
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)) {
19294  case 0: return 0;
19295  case 1: return +(long) ((PyLongObject*)x)->ob_digit[0];
19296  case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
19297  }
19298  }
19299 #endif
19300 #endif
19301  return (long)PyLong_AsLong(x);
19302  }
19303  } else {
19304  long val;
19305  PyObject *tmp = __Pyx_PyNumber_Int(x);
19306  if (!tmp) return (long)-1;
19307  val = __Pyx_PyInt_AsLong(tmp);
19308  Py_DECREF(tmp);
19309  return val;
19310  }
19311 }
19312 
19313 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19314 #if CYTHON_USE_PYLONG_INTERNALS
19315 #include "longintrepr.h"
19316 #endif
19317 #endif
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;
19328  }
19329  return (PY_LONG_LONG)val;
19330  } else
19331 #endif
19332  if (likely(PyLong_Check(x))) {
19333  if (is_unsigned) {
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)) {
19338  case 0: return 0;
19339  case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19340  }
19341  }
19342 #endif
19343 #endif
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;
19348  }
19349  return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
19350  } else {
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)) {
19355  case 0: return 0;
19356  case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19357  case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19358  }
19359  }
19360 #endif
19361 #endif
19362  return (PY_LONG_LONG)PyLong_AsLongLong(x);
19363  }
19364  } else {
19365  PY_LONG_LONG val;
19366  PyObject *tmp = __Pyx_PyNumber_Int(x);
19367  if (!tmp) return (PY_LONG_LONG)-1;
19368  val = __Pyx_PyInt_AsLongLong(tmp);
19369  Py_DECREF(tmp);
19370  return val;
19371  }
19372 }
19373 
19374 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19375 #if CYTHON_USE_PYLONG_INTERNALS
19376 #include "longintrepr.h"
19377 #endif
19378 #endif
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;
19389  }
19390  return (signed long)val;
19391  } else
19392 #endif
19393  if (likely(PyLong_Check(x))) {
19394  if (is_unsigned) {
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)) {
19399  case 0: return 0;
19400  case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0];
19401  }
19402  }
19403 #endif
19404 #endif
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;
19409  }
19410  return (signed long)PyLong_AsUnsignedLong(x);
19411  } else {
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)) {
19416  case 0: return 0;
19417  case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0];
19418  case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0];
19419  }
19420  }
19421 #endif
19422 #endif
19423  return (signed long)PyLong_AsLong(x);
19424  }
19425  } else {
19426  signed long val;
19427  PyObject *tmp = __Pyx_PyNumber_Int(x);
19428  if (!tmp) return (signed long)-1;
19429  val = __Pyx_PyInt_AsSignedLong(tmp);
19430  Py_DECREF(tmp);
19431  return val;
19432  }
19433 }
19434 
19435 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
19436 #if CYTHON_USE_PYLONG_INTERNALS
19437 #include "longintrepr.h"
19438 #endif
19439 #endif
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;
19450  }
19451  return (signed PY_LONG_LONG)val;
19452  } else
19453 #endif
19454  if (likely(PyLong_Check(x))) {
19455  if (is_unsigned) {
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)) {
19460  case 0: return 0;
19461  case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
19462  }
19463  }
19464 #endif
19465 #endif
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;
19470  }
19471  return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
19472  } else {
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)) {
19477  case 0: return 0;
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];
19480  }
19481  }
19482 #endif
19483 #endif
19484  return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
19485  }
19486  } else {
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);
19491  Py_DECREF(tmp);
19492  return val;
19493  }
19494 }
19495 
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;
19506 #else
19507  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
19508  PyErr_SetExcInfo(*type, *value, *tb);
19509 #endif
19510  *type = tmp_type;
19511  *value = tmp_value;
19512  *tb = tmp_tb;
19513 }
19514 
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);
19527  if (!et) {
19528  Py_XDECREF(tb);
19529  Py_XDECREF(ev);
19530  Py_INCREF(Py_None);
19531  *pvalue = Py_None;
19532  return 0;
19533  }
19534  if (unlikely(et != PyExc_StopIteration) &&
19535  unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
19536  __Pyx_ErrRestore(et, ev, tb);
19537  return -1;
19538  }
19539  if (likely(et == PyExc_StopIteration)) {
19540  if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
19541  if (!ev) {
19542  Py_INCREF(Py_None);
19543  ev = Py_None;
19544  }
19545  Py_XDECREF(tb);
19546  Py_DECREF(et);
19547  *pvalue = ev;
19548  return 0;
19549  }
19550  }
19551  PyErr_NormalizeException(&et, &ev, &tb);
19552  if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
19553  __Pyx_ErrRestore(et, ev, tb);
19554  return -1;
19555  }
19556  Py_XDECREF(tb);
19557  Py_DECREF(et);
19558 #if PY_VERSION_HEX >= 0x030300A0
19559  value = ((PyStopIterationObject *)ev)->value;
19560  Py_INCREF(value);
19561  Py_DECREF(ev);
19562 #else
19563  {
19564  PyObject* args = PyObject_GetAttr(ev, __pyx_n_s__args);
19565  Py_DECREF(ev);
19566  if (likely(args)) {
19567  value = PyObject_GetItem(args, 0);
19568  Py_DECREF(args);
19569  }
19570  if (unlikely(!value)) {
19571  __Pyx_ErrRestore(NULL, NULL, NULL);
19572  Py_INCREF(Py_None);
19573  value = Py_None;
19574  }
19575  }
19576 #endif
19577  *pvalue = value;
19578  return 0;
19579 }
19580 #endif
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);
19592 }
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");
19598  return 1;
19599  }
19600  return 0;
19601 }
19602 static CYTHON_INLINE
19603 PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
19604  PyObject *retval;
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");
19611  return NULL;
19612  }
19613  }
19614  if (unlikely(self->resume_label == -1)) {
19615  PyErr_SetNone(PyExc_StopIteration);
19616  return NULL;
19617  }
19618  if (value) {
19619 #if CYTHON_COMPILING_IN_PYPY
19620 #else
19621  /* Generators always return to their most recent caller, not
19622  * necessarily their creator. */
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;
19630  }
19631 #endif
19632  __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
19633  &self->exc_traceback);
19634  } else {
19635  __Pyx_Generator_ExceptionClear(self);
19636  }
19637  self->is_running = 1;
19638  retval = self->body((PyObject *) self, value);
19639  self->is_running = 0;
19640  if (retval) {
19641  __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
19642  &self->exc_traceback);
19643 #if CYTHON_COMPILING_IN_PYPY
19644 #else
19645  /* Don't keep the reference to f_back any longer than necessary. It
19646  * may keep a chain of frames alive or it could create a reference
19647  * cycle. */
19648  if (self->exc_traceback) {
19649  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
19650  PyFrameObject *f = tb->tb_frame;
19651  Py_CLEAR(f->f_back);
19652  }
19653 #endif
19654  } else {
19655  __Pyx_Generator_ExceptionClear(self);
19656  }
19657  return retval;
19658 }
19659 static CYTHON_INLINE
19660 PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
19661  PyObject *ret;
19662  PyObject *val = NULL;
19663  __Pyx_Generator_Undelegate(gen);
19664  __Pyx_PyGen_FetchStopIterationValue(&val);
19665  ret = __Pyx_Generator_SendEx(gen, val);
19666  Py_XDECREF(val);
19667  return ret;
19668 }
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)))
19673  return NULL;
19674  if (yf) {
19675  PyObject *ret;
19676  gen->is_running = 1;
19677  ret = Py_TYPE(yf)->tp_iternext(yf);
19678  gen->is_running = 0;
19679  if (likely(ret)) {
19680  return ret;
19681  }
19682  return __Pyx_Generator_FinishDelegation(gen);
19683  }
19684  return __Pyx_Generator_SendEx(gen, Py_None);
19685 }
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)))
19690  return NULL;
19691  if (yf) {
19692  PyObject *ret;
19693  gen->is_running = 1;
19694  if (__Pyx_Generator_CheckExact(yf)) {
19695  ret = __Pyx_Generator_Send(yf, value);
19696  } else {
19697  if (value == Py_None)
19698  ret = PyIter_Next(yf);
19699  else
19700  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s__send, value);
19701  }
19702  gen->is_running = 0;
19703  if (likely(ret)) {
19704  return ret;
19705  }
19706  return __Pyx_Generator_FinishDelegation(gen);
19707  }
19708  return __Pyx_Generator_SendEx(gen, value);
19709 }
19710 static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
19711  PyObject *retval = NULL;
19712  int err = 0;
19713  if (__Pyx_Generator_CheckExact(yf)) {
19714  retval = __Pyx_Generator_Close(yf);
19715  if (!retval)
19716  return -1;
19717  } else {
19718  PyObject *meth;
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);
19724  }
19725  PyErr_Clear();
19726  } else {
19727  retval = PyObject_CallFunction(meth, NULL);
19728  Py_DECREF(meth);
19729  if (!retval)
19730  err = -1;
19731  }
19732  gen->is_running = 0;
19733  }
19734  Py_XDECREF(retval);
19735  return err;
19736 }
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;
19741  int err = 0;
19742  if (unlikely(__Pyx_Generator_CheckRunning(gen)))
19743  return NULL;
19744  if (yf) {
19745  Py_INCREF(yf);
19746  err = __Pyx_Generator_CloseIter(gen, yf);
19747  __Pyx_Generator_Undelegate(gen);
19748  Py_DECREF(yf);
19749  }
19750  if (err == 0)
19751 #if PY_VERSION_HEX < 0x02050000
19752  PyErr_SetNone(PyExc_StopIteration);
19753 #else
19754  PyErr_SetNone(PyExc_GeneratorExit);
19755 #endif
19756  retval = __Pyx_Generator_SendEx(gen, NULL);
19757  if (retval) {
19758  Py_DECREF(retval);
19759  PyErr_SetString(PyExc_RuntimeError,
19760  "generator ignored GeneratorExit");
19761  return NULL;
19762  }
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)
19769 #endif
19770  || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
19771  {
19772  if (raised_exception) PyErr_Clear(); /* ignore these errors */
19773  Py_INCREF(Py_None);
19774  return Py_None;
19775  }
19776  return NULL;
19777 }
19778 static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
19779  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
19780  PyObject *typ;
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))
19785  return NULL;
19786  if (unlikely(__Pyx_Generator_CheckRunning(gen)))
19787  return NULL;
19788  if (yf) {
19789  PyObject *ret;
19790  Py_INCREF(yf);
19791 #if PY_VERSION_HEX >= 0x02050000
19792  if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
19793  int err = __Pyx_Generator_CloseIter(gen, yf);
19794  Py_DECREF(yf);
19795  __Pyx_Generator_Undelegate(gen);
19796  if (err < 0)
19797  return __Pyx_Generator_SendEx(gen, NULL);
19798  goto throw_here;
19799  }
19800 #endif
19801  gen->is_running = 1;
19802  if (__Pyx_Generator_CheckExact(yf)) {
19803  ret = __Pyx_Generator_Throw(yf, args);
19804  } else {
19805  PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s__throw);
19806  if (unlikely(!meth)) {
19807  Py_DECREF(yf);
19808  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
19809  gen->is_running = 0;
19810  return NULL;
19811  }
19812  PyErr_Clear();
19813  __Pyx_Generator_Undelegate(gen);
19814  gen->is_running = 0;
19815  goto throw_here;
19816  }
19817  ret = PyObject_CallObject(meth, args);
19818  Py_DECREF(meth);
19819  }
19820  gen->is_running = 0;
19821  Py_DECREF(yf);
19822  if (!ret) {
19823  ret = __Pyx_Generator_FinishDelegation(gen);
19824  }
19825  return ret;
19826  }
19827 throw_here:
19828  __Pyx_Raise(typ, val, tb, NULL);
19829  return __Pyx_Generator_SendEx(gen, NULL);
19830 }
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);
19839  return 0;
19840 }
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);
19849  return 0;
19850 }
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)
19860  return; /* resurrected. :( */
19861  }
19862  PyObject_GC_UnTrack(self);
19863  __Pyx_Generator_clear(self);
19864  PyObject_GC_Del(gen);
19865 }
19866 static void __Pyx_Generator_del(PyObject *self) {
19867  PyObject *res;
19868  PyObject *error_type, *error_value, *error_traceback;
19869  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
19870  if (gen->resume_label <= 0)
19871  return ;
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);
19876  if (res == NULL)
19877  PyErr_WriteUnraisable(self);
19878  else
19879  Py_DECREF(res);
19880  __Pyx_ErrRestore(error_type, error_value, error_traceback);
19881  /* Undo the temporary resurrection; can't use DECREF here, it would
19882  * cause a recursive call.
19883  */
19884  assert(self->ob_refcnt > 0);
19885  if (--self->ob_refcnt == 0)
19886  return; /* this is the normal path out */
19887  /* close() resurrected it! Make it look like the original Py_DECREF
19888  * never happened.
19889  */
19890  {
19891  Py_ssize_t refcnt = self->ob_refcnt;
19892  _Py_NewReference(self);
19893  self->ob_refcnt = refcnt;
19894  }
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);
19898  /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
19899  * we need to undo that. */
19900  _Py_DEC_REFTOTAL;
19901 #endif
19902  /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
19903  * chain, so no more to do there.
19904  * If COUNT_ALLOCS, the original decref bumped tp_frees, and
19905  * _Py_NewReference bumped tp_allocs: both of those need to be
19906  * undone.
19907  */
19908 #ifdef COUNT_ALLOCS
19909  --Py_TYPE(self)->tp_frees;
19910  --Py_TYPE(self)->tp_allocs;
19911 #endif
19912 }
19913 static PyMemberDef __pyx_Generator_memberlist[] = {
19914  {(char *) "gi_running",
19915 #if PY_VERSION_HEX >= 0x02060000
19916  T_BOOL,
19917 #else
19918  T_BYTE,
19919 #endif
19920  offsetof(__pyx_GeneratorObject, is_running),
19921  READONLY,
19922  NULL},
19923  {0, 0, 0, 0, 0}
19924 };
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},
19929  {0, 0, 0, 0}
19930 };
19931 static PyTypeObject __pyx_GeneratorType_type = {
19932  PyVarObject_HEAD_INIT(0, 0)
19933  __Pyx_NAMESTR("generator"), /*tp_name*/
19934  sizeof(__pyx_GeneratorObject), /*tp_basicsize*/
19935  0, /*tp_itemsize*/
19936  (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/
19937  0, /*tp_print*/
19938  0, /*tp_getattr*/
19939  0, /*tp_setattr*/
19940 #if PY_MAJOR_VERSION < 3
19941  0, /*tp_compare*/
19942 #else
19943  0, /*reserved*/
19944 #endif
19945  0, /*tp_repr*/
19946  0, /*tp_as_number*/
19947  0, /*tp_as_sequence*/
19948  0, /*tp_as_mapping*/
19949  0, /*tp_hash*/
19950  0, /*tp_call*/
19951  0, /*tp_str*/
19952  0, /*tp_getattro*/
19953  0, /*tp_setattro*/
19954  0, /*tp_as_buffer*/
19955  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
19956  0, /*tp_doc*/
19957  (traverseproc) __Pyx_Generator_traverse, /*tp_traverse*/
19958  0, /*tp_clear*/
19959  0, /*tp_richcompare*/
19960  offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
19961  0, /*tp_iter*/
19962  (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
19963  __pyx_Generator_methods, /*tp_methods*/
19964  __pyx_Generator_memberlist, /*tp_members*/
19965  0, /*tp_getset*/
19966  0, /*tp_base*/
19967  0, /*tp_dict*/
19968  0, /*tp_descr_get*/
19969  0, /*tp_descr_set*/
19970  0, /*tp_dictoffset*/
19971  0, /*tp_init*/
19972  0, /*tp_alloc*/
19973  0, /*tp_new*/
19974  0, /*tp_free*/
19975  0, /*tp_is_gc*/
19976  0, /*tp_bases*/
19977  0, /*tp_mro*/
19978  0, /*tp_cache*/
19979  0, /*tp_subclasses*/
19980  0, /*tp_weaklist*/
19981  __Pyx_Generator_del, /*tp_del*/
19982 #if PY_VERSION_HEX >= 0x02060000
19983  0, /*tp_version_tag*/
19984 #endif
19985 };
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);
19990  if (gen == NULL)
19991  return NULL;
19992  gen->body = body;
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);
20004  return gen;
20005 }
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)) {
20010  return -1;
20011  }
20012  __pyx_GeneratorType = &__pyx_GeneratorType_type;
20013  return 0;
20014 }
20015 
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]) {
20021  char message[200];
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);
20028  #else
20029  return PyErr_WarnEx(NULL, message, 1);
20030  #endif
20031  }
20032  return 0;
20033 }
20034 
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) {
20038  return count;
20039  }
20040  while (start < end) {
20041  mid = (start + end) / 2;
20042  if (code_line < entries[mid].code_line) {
20043  end = mid;
20044  } else if (code_line > entries[mid].code_line) {
20045  start = mid + 1;
20046  } else {
20047  return mid;
20048  }
20049  }
20050  if (code_line <= entries[mid].code_line) {
20051  return mid;
20052  } else {
20053  return mid + 1;
20054  }
20055 }
20056 static PyCodeObject *__pyx_find_code_object(int code_line) {
20057  PyCodeObject* code_object;
20058  int pos;
20059  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
20060  return NULL;
20061  }
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)) {
20064  return NULL;
20065  }
20066  code_object = __pyx_code_cache.entries[pos].code_object;
20067  Py_INCREF(code_object);
20068  return code_object;
20069 }
20070 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
20071  int pos, i;
20072  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
20073  if (unlikely(!code_line)) {
20074  return;
20075  }
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);
20085  }
20086  return;
20087  }
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;
20092  Py_DECREF(tmp);
20093  return;
20094  }
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)) {
20100  return;
20101  }
20102  __pyx_code_cache.entries = entries;
20103  __pyx_code_cache.max_count = new_max;
20104  }
20105  for (i=__pyx_code_cache.count; i>pos; i--) {
20106  entries[i] = entries[i-1];
20107  }
20108  entries[pos].code_line = code_line;
20109  entries[pos].code_object = code_object;
20110  __pyx_code_cache.count++;
20111  Py_INCREF(code_object);
20112 }
20113 
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);
20125  #else
20126  py_srcfile = PyUnicode_FromString(filename);
20127  #endif
20128  if (!py_srcfile) goto bad;
20129  if (c_line) {
20130  #if PY_MAJOR_VERSION < 3
20131  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
20132  #else
20133  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
20134  #endif
20135  }
20136  else {
20137  #if PY_MAJOR_VERSION < 3
20138  py_funcname = PyString_FromString(funcname);
20139  #else
20140  py_funcname = PyUnicode_FromString(funcname);
20141  #endif
20142  }
20143  if (!py_funcname) goto bad;
20144  py_code = __Pyx_PyCode_New(
20145  0, /*int argcount,*/
20146  0, /*int kwonlyargcount,*/
20147  0, /*int nlocals,*/
20148  0, /*int stacksize,*/
20149  0, /*int flags,*/
20150  __pyx_empty_bytes, /*PyObject *code,*/
20151  __pyx_empty_tuple, /*PyObject *consts,*/
20152  __pyx_empty_tuple, /*PyObject *names,*/
20153  __pyx_empty_tuple, /*PyObject *varnames,*/
20154  __pyx_empty_tuple, /*PyObject *freevars,*/
20155  __pyx_empty_tuple, /*PyObject *cellvars,*/
20156  py_srcfile, /*PyObject *filename,*/
20157  py_funcname, /*PyObject *name,*/
20158  py_line, /*int firstlineno,*/
20159  __pyx_empty_bytes /*PyObject *lnotab*/
20160  );
20161  Py_DECREF(py_srcfile);
20162  Py_DECREF(py_funcname);
20163  return py_code;
20164 bad:
20165  Py_XDECREF(py_srcfile);
20166  Py_XDECREF(py_funcname);
20167  return NULL;
20168 }
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);
20175  if (!py_code) {
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);
20180  }
20181  py_globals = PyModule_GetDict(__pyx_m);
20182  if (!py_globals) goto bad;
20183  py_frame = PyFrame_New(
20184  PyThreadState_GET(), /*PyThreadState *tstate,*/
20185  py_code, /*PyCodeObject *code,*/
20186  py_globals, /*PyObject *globals,*/
20187  0 /*PyObject *locals*/
20188  );
20189  if (!py_frame) goto bad;
20190  py_frame->f_lineno = py_line;
20191  PyTraceBack_Here(py_frame);
20192 bad:
20193  Py_XDECREF(py_code);
20194  Py_XDECREF(py_frame);
20195 }
20196 
20197 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
20198  while (t->p) {
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);
20204  } else {
20205  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
20206  }
20207  #else /* Python 3+ has unicode identifiers */
20208  if (t->is_unicode | t->is_str) {
20209  if (t->intern) {
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);
20213  } else {
20214  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
20215  }
20216  } else {
20217  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
20218  }
20219  #endif
20220  if (!*t->p)
20221  return -1;
20222  ++t;
20223  }
20224  return 0;
20225 }
20226 
20227 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
20228  return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
20229 }
20230 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
20231  Py_ssize_t ignore;
20232  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
20233 }
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
20236  if (
20237 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
20238  __Pyx_sys_getdefaultencoding_not_ascii &&
20239 #endif
20240  PyUnicode_Check(o)) {
20241 #if PY_VERSION_HEX < 0x03030000
20242  char* defenc_c;
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
20247  {
20248  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
20249  char* c;
20250  for (c = defenc_c; c < end; c++) {
20251  if ((unsigned char) (*c) >= 128) {
20252  PyUnicode_AsASCIIString(o);
20253  return NULL;
20254  }
20255  }
20256  }
20257 #endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
20258  *length = PyBytes_GET_SIZE(defenc);
20259  return defenc_c;
20260 #else /* PY_VERSION_HEX < 0x03030000 */
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);
20266  } else {
20267  PyUnicode_AsASCIIString(o);
20268  return NULL;
20269  }
20270 #else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
20271  return PyUnicode_AsUTF8AndSize(o, length);
20272 #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
20273 #endif /* PY_VERSION_HEX < 0x03030000 */
20274  } else
20275 #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
20276  {
20277  char* result;
20278  int r = PyBytes_AsStringAndSize(o, &result, length);
20279  if (r < 0) {
20280  return NULL;
20281  } else {
20282  return result;
20283  }
20284  }
20285 }
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);
20290 }
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))
20297 #else
20298  if (PyLong_Check(x))
20299 #endif
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) {
20304  name = "int";
20305  res = PyNumber_Int(x);
20306  }
20307  else if (m && m->nb_long) {
20308  name = "long";
20309  res = PyNumber_Long(x);
20310  }
20311 #else
20312  if (m && m->nb_int) {
20313  name = "int";
20314  res = PyNumber_Long(x);
20315  }
20316 #endif
20317  if (res) {
20318 #if PY_MAJOR_VERSION < 3
20319  if (!PyInt_Check(res) && !PyLong_Check(res)) {
20320 #else
20321  if (!PyLong_Check(res)) {
20322 #endif
20323  PyErr_Format(PyExc_TypeError,
20324  "__%s__ returned non-%s (type %.200s)",
20325  name, name, Py_TYPE(res)->tp_name);
20326  Py_DECREF(res);
20327  return NULL;
20328  }
20329  }
20330  else if (!PyErr_Occurred()) {
20331  PyErr_SetString(PyExc_TypeError,
20332  "an integer is required");
20333  }
20334  return res;
20335 }
20336 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
20337  Py_ssize_t ival;
20338  PyObject* x = PyNumber_Index(b);
20339  if (!x) return -1;
20340  ival = PyInt_AsSsize_t(x);
20341  Py_DECREF(x);
20342  return ival;
20343 }
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);
20348  else {
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);
20352  }
20353 #else
20354  return PyInt_FromSize_t(ival);
20355 #endif
20356 }
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");
20363  return (size_t)-1;
20364  }
20365  return (size_t)val;
20366 }
20367 
20368 
20369 #endif /* Py_PYTHON_H */
int compare(const index_set< LO, HI > &a, const index_set< LO, HI > &b)
&quot;lexicographic compare&quot; 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 &quot;informal&quot; string representation of Multivector_T mv.
Definition: PyClical.h:98
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.
Definition: PyClical.h:69
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
Definition: PyClical.h:157
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.
Definition: PyClical.h:87
Multivector_T cga3(const Multivector_T &x)
Convert Euclidean 3D vector to Conformal Geometric Algebra null vector [DL (10.50)].
Definition: PyClical.h:115
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
Definition: PyClical.h:160
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)
Definition: PyClical.h:59
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.
double scalar_t
Definition: PyClical.h:159
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 &quot;informal&quot; string representation of Index_Set_T ist.
Definition: PyClical.h:78
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)].
Definition: PyClical.h:126
Multivector_T agc3(const Multivector_T &X)
Convert CGA3 null vector to Euclidean 3D vector [DL (10.50)].
Definition: PyClical.h:138