glucat  0.8.4
PyClical_nocython.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.10 */
2 
3 /* BEGIN: Cython Metadata
4 {
5  "distutils": {
6  "depends": [
7  "PyClical.h"
8  ],
9  "extra_compile_args": [
10  "-I.",
11  "-I..",
12  "-I/home/leopardi/src-downloaded/numeric_bindings",
13  "-fno-strict-aliasing",
14  "-Wno-unused",
15  "-Wall",
16  "-std=c++11",
17  "-g",
18  "-O3",
19  "-march=native",
20  "-finline-limit=8000",
21  "--param",
22  "large-function-insns=8000",
23  "--param",
24  "max-inline-insns-auto=8000",
25  "--param",
26  "max-inline-insns-single=8000",
27  "--param",
28  "inline-unit-growth=200",
29  "--param",
30  "large-function-growth=200",
31  "-funroll-loops",
32  "-fvariable-expansion-in-unroller",
33  "-DNDEBUG",
34  "-DHAVE_BITS_WORDSIZE_H",
35  "-D_GLUCAT_HAVE_BOOST_SERIALIZATION_ARRAY_WRAPPER_H",
36  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
37  "-D_GLUCAT_USE_EIGENVALUES",
38  "-D_GLUCAT_USE_BINDINGS",
39  "-D_GLUCAT_USE_DENSE_MATRICES",
40  "-D_GLUCAT_CHECK_ISNAN",
41  "-Wno-misleading-indentation",
42  "-Wno-self-assign-overloaded",
43  "-Wno-unused-local-typedefs",
44  "-Wno-deprecated-register",
45  "-fno-check-new",
46  "-fexceptions"
47  ],
48  "extra_link_args": [
49  "-llapack",
50  "-lblas"
51  ],
52  "include_dirs": [
53  ".",
54  ".."
55  ],
56  "language": "c++",
57  "name": "PyClical",
58  "sources": [
59  "PyClical.pyx"
60  ]
61  },
62  "module_name": "PyClical"
63 }
64 END: Cython Metadata */
65 
66 #define PY_SSIZE_T_CLEAN
67 #include "Python.h"
68 #ifndef Py_PYTHON_H
69  #error Python headers needed to compile C extensions, please install development version of Python.
70 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
71  #error Cython requires Python 2.6+ or Python 3.3+.
72 #else
73 #define CYTHON_ABI "0_29_10"
74 #define CYTHON_HEX_VERSION 0x001D0AF0
75 #define CYTHON_FUTURE_DIVISION 1
76 #include <stddef.h>
77 #ifndef offsetof
78  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
79 #endif
80 #if !defined(WIN32) && !defined(MS_WINDOWS)
81  #ifndef __stdcall
82  #define __stdcall
83  #endif
84  #ifndef __cdecl
85  #define __cdecl
86  #endif
87  #ifndef __fastcall
88  #define __fastcall
89  #endif
90 #endif
91 #ifndef DL_IMPORT
92  #define DL_IMPORT(t) t
93 #endif
94 #ifndef DL_EXPORT
95  #define DL_EXPORT(t) t
96 #endif
97 #define __PYX_COMMA ,
98 #ifndef HAVE_LONG_LONG
99  #if PY_VERSION_HEX >= 0x02070000
100  #define HAVE_LONG_LONG
101  #endif
102 #endif
103 #ifndef PY_LONG_LONG
104  #define PY_LONG_LONG LONG_LONG
105 #endif
106 #ifndef Py_HUGE_VAL
107  #define Py_HUGE_VAL HUGE_VAL
108 #endif
109 #ifdef PYPY_VERSION
110  #define CYTHON_COMPILING_IN_PYPY 1
111  #define CYTHON_COMPILING_IN_PYSTON 0
112  #define CYTHON_COMPILING_IN_CPYTHON 0
113  #undef CYTHON_USE_TYPE_SLOTS
114  #define CYTHON_USE_TYPE_SLOTS 0
115  #undef CYTHON_USE_PYTYPE_LOOKUP
116  #define CYTHON_USE_PYTYPE_LOOKUP 0
117  #if PY_VERSION_HEX < 0x03050000
118  #undef CYTHON_USE_ASYNC_SLOTS
119  #define CYTHON_USE_ASYNC_SLOTS 0
120  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
121  #define CYTHON_USE_ASYNC_SLOTS 1
122  #endif
123  #undef CYTHON_USE_PYLIST_INTERNALS
124  #define CYTHON_USE_PYLIST_INTERNALS 0
125  #undef CYTHON_USE_UNICODE_INTERNALS
126  #define CYTHON_USE_UNICODE_INTERNALS 0
127  #undef CYTHON_USE_UNICODE_WRITER
128  #define CYTHON_USE_UNICODE_WRITER 0
129  #undef CYTHON_USE_PYLONG_INTERNALS
130  #define CYTHON_USE_PYLONG_INTERNALS 0
131  #undef CYTHON_AVOID_BORROWED_REFS
132  #define CYTHON_AVOID_BORROWED_REFS 1
133  #undef CYTHON_ASSUME_SAFE_MACROS
134  #define CYTHON_ASSUME_SAFE_MACROS 0
135  #undef CYTHON_UNPACK_METHODS
136  #define CYTHON_UNPACK_METHODS 0
137  #undef CYTHON_FAST_THREAD_STATE
138  #define CYTHON_FAST_THREAD_STATE 0
139  #undef CYTHON_FAST_PYCALL
140  #define CYTHON_FAST_PYCALL 0
141  #undef CYTHON_PEP489_MULTI_PHASE_INIT
142  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
143  #undef CYTHON_USE_TP_FINALIZE
144  #define CYTHON_USE_TP_FINALIZE 0
145  #undef CYTHON_USE_DICT_VERSIONS
146  #define CYTHON_USE_DICT_VERSIONS 0
147  #undef CYTHON_USE_EXC_INFO_STACK
148  #define CYTHON_USE_EXC_INFO_STACK 0
149 #elif defined(PYSTON_VERSION)
150  #define CYTHON_COMPILING_IN_PYPY 0
151  #define CYTHON_COMPILING_IN_PYSTON 1
152  #define CYTHON_COMPILING_IN_CPYTHON 0
153  #ifndef CYTHON_USE_TYPE_SLOTS
154  #define CYTHON_USE_TYPE_SLOTS 1
155  #endif
156  #undef CYTHON_USE_PYTYPE_LOOKUP
157  #define CYTHON_USE_PYTYPE_LOOKUP 0
158  #undef CYTHON_USE_ASYNC_SLOTS
159  #define CYTHON_USE_ASYNC_SLOTS 0
160  #undef CYTHON_USE_PYLIST_INTERNALS
161  #define CYTHON_USE_PYLIST_INTERNALS 0
162  #ifndef CYTHON_USE_UNICODE_INTERNALS
163  #define CYTHON_USE_UNICODE_INTERNALS 1
164  #endif
165  #undef CYTHON_USE_UNICODE_WRITER
166  #define CYTHON_USE_UNICODE_WRITER 0
167  #undef CYTHON_USE_PYLONG_INTERNALS
168  #define CYTHON_USE_PYLONG_INTERNALS 0
169  #ifndef CYTHON_AVOID_BORROWED_REFS
170  #define CYTHON_AVOID_BORROWED_REFS 0
171  #endif
172  #ifndef CYTHON_ASSUME_SAFE_MACROS
173  #define CYTHON_ASSUME_SAFE_MACROS 1
174  #endif
175  #ifndef CYTHON_UNPACK_METHODS
176  #define CYTHON_UNPACK_METHODS 1
177  #endif
178  #undef CYTHON_FAST_THREAD_STATE
179  #define CYTHON_FAST_THREAD_STATE 0
180  #undef CYTHON_FAST_PYCALL
181  #define CYTHON_FAST_PYCALL 0
182  #undef CYTHON_PEP489_MULTI_PHASE_INIT
183  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
184  #undef CYTHON_USE_TP_FINALIZE
185  #define CYTHON_USE_TP_FINALIZE 0
186  #undef CYTHON_USE_DICT_VERSIONS
187  #define CYTHON_USE_DICT_VERSIONS 0
188  #undef CYTHON_USE_EXC_INFO_STACK
189  #define CYTHON_USE_EXC_INFO_STACK 0
190 #else
191  #define CYTHON_COMPILING_IN_PYPY 0
192  #define CYTHON_COMPILING_IN_PYSTON 0
193  #define CYTHON_COMPILING_IN_CPYTHON 1
194  #ifndef CYTHON_USE_TYPE_SLOTS
195  #define CYTHON_USE_TYPE_SLOTS 1
196  #endif
197  #if PY_VERSION_HEX < 0x02070000
198  #undef CYTHON_USE_PYTYPE_LOOKUP
199  #define CYTHON_USE_PYTYPE_LOOKUP 0
200  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
201  #define CYTHON_USE_PYTYPE_LOOKUP 1
202  #endif
203  #if PY_MAJOR_VERSION < 3
204  #undef CYTHON_USE_ASYNC_SLOTS
205  #define CYTHON_USE_ASYNC_SLOTS 0
206  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
207  #define CYTHON_USE_ASYNC_SLOTS 1
208  #endif
209  #if PY_VERSION_HEX < 0x02070000
210  #undef CYTHON_USE_PYLONG_INTERNALS
211  #define CYTHON_USE_PYLONG_INTERNALS 0
212  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
213  #define CYTHON_USE_PYLONG_INTERNALS 1
214  #endif
215  #ifndef CYTHON_USE_PYLIST_INTERNALS
216  #define CYTHON_USE_PYLIST_INTERNALS 1
217  #endif
218  #ifndef CYTHON_USE_UNICODE_INTERNALS
219  #define CYTHON_USE_UNICODE_INTERNALS 1
220  #endif
221  #if PY_VERSION_HEX < 0x030300F0
222  #undef CYTHON_USE_UNICODE_WRITER
223  #define CYTHON_USE_UNICODE_WRITER 0
224  #elif !defined(CYTHON_USE_UNICODE_WRITER)
225  #define CYTHON_USE_UNICODE_WRITER 1
226  #endif
227  #ifndef CYTHON_AVOID_BORROWED_REFS
228  #define CYTHON_AVOID_BORROWED_REFS 0
229  #endif
230  #ifndef CYTHON_ASSUME_SAFE_MACROS
231  #define CYTHON_ASSUME_SAFE_MACROS 1
232  #endif
233  #ifndef CYTHON_UNPACK_METHODS
234  #define CYTHON_UNPACK_METHODS 1
235  #endif
236  #ifndef CYTHON_FAST_THREAD_STATE
237  #define CYTHON_FAST_THREAD_STATE 1
238  #endif
239  #ifndef CYTHON_FAST_PYCALL
240  #define CYTHON_FAST_PYCALL 1
241  #endif
242  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
243  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
244  #endif
245  #ifndef CYTHON_USE_TP_FINALIZE
246  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
247  #endif
248  #ifndef CYTHON_USE_DICT_VERSIONS
249  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
250  #endif
251  #ifndef CYTHON_USE_EXC_INFO_STACK
252  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
253  #endif
254 #endif
255 #if !defined(CYTHON_FAST_PYCCALL)
256 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
257 #endif
258 #if CYTHON_USE_PYLONG_INTERNALS
259  #include "longintrepr.h"
260  #undef SHIFT
261  #undef BASE
262  #undef MASK
263  #ifdef SIZEOF_VOID_P
264  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
265  #endif
266 #endif
267 #ifndef __has_attribute
268  #define __has_attribute(x) 0
269 #endif
270 #ifndef __has_cpp_attribute
271  #define __has_cpp_attribute(x) 0
272 #endif
273 #ifndef CYTHON_RESTRICT
274  #if defined(__GNUC__)
275  #define CYTHON_RESTRICT __restrict__
276  #elif defined(_MSC_VER) && _MSC_VER >= 1400
277  #define CYTHON_RESTRICT __restrict
278  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
279  #define CYTHON_RESTRICT restrict
280  #else
281  #define CYTHON_RESTRICT
282  #endif
283 #endif
284 #ifndef CYTHON_UNUSED
285 # if defined(__GNUC__)
286 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
287 # define CYTHON_UNUSED __attribute__ ((__unused__))
288 # else
289 # define CYTHON_UNUSED
290 # endif
291 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
292 # define CYTHON_UNUSED __attribute__ ((__unused__))
293 # else
294 # define CYTHON_UNUSED
295 # endif
296 #endif
297 #ifndef CYTHON_MAYBE_UNUSED_VAR
298 # if defined(__cplusplus)
299  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
300 # else
301 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
302 # endif
303 #endif
304 #ifndef CYTHON_NCP_UNUSED
305 # if CYTHON_COMPILING_IN_CPYTHON
306 # define CYTHON_NCP_UNUSED
307 # else
308 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
309 # endif
310 #endif
311 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
312 #ifdef _MSC_VER
313  #ifndef _MSC_STDINT_H_
314  #if _MSC_VER < 1300
315  typedef unsigned char uint8_t;
316  typedef unsigned int uint32_t;
317  #else
318  typedef unsigned __int8 uint8_t;
319  typedef unsigned __int32 uint32_t;
320  #endif
321  #endif
322 #else
323  #include <stdint.h>
324 #endif
325 #ifndef CYTHON_FALLTHROUGH
326  #if defined(__cplusplus) && __cplusplus >= 201103L
327  #if __has_cpp_attribute(fallthrough)
328  #define CYTHON_FALLTHROUGH [[fallthrough]]
329  #elif __has_cpp_attribute(clang::fallthrough)
330  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
331  #elif __has_cpp_attribute(gnu::fallthrough)
332  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
333  #endif
334  #endif
335  #ifndef CYTHON_FALLTHROUGH
336  #if __has_attribute(fallthrough)
337  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
338  #else
339  #define CYTHON_FALLTHROUGH
340  #endif
341  #endif
342  #if defined(__clang__ ) && defined(__apple_build_version__)
343  #if __apple_build_version__ < 7000000
344  #undef CYTHON_FALLTHROUGH
345  #define CYTHON_FALLTHROUGH
346  #endif
347  #endif
348 #endif
349 
350 #ifndef __cplusplus
351  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
352 #endif
353 #ifndef CYTHON_INLINE
354  #if defined(__clang__)
355  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
356  #else
357  #define CYTHON_INLINE inline
358  #endif
359 #endif
360 template<typename T>
361 void __Pyx_call_destructor(T& x) {
362  x.~T();
363 }
364 template<typename T>
365 class __Pyx_FakeReference {
366  public:
367  __Pyx_FakeReference() : ptr(NULL) { }
368  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
369  T *operator->() { return ptr; }
370  T *operator&() { return ptr; }
371  operator T&() { return *ptr; }
372  template<typename U> bool operator ==(U other) { return *ptr == other; }
373  template<typename U> bool operator !=(U other) { return *ptr != other; }
374  private:
375  T *ptr;
376 };
377 
378 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
379  #define Py_OptimizeFlag 0
380 #endif
381 #define __PYX_BUILD_PY_SSIZE_T "n"
382 #define CYTHON_FORMAT_SSIZE_T "z"
383 #if PY_MAJOR_VERSION < 3
384  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
385  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
386  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
387  #define __Pyx_DefaultClassType PyClass_Type
388 #else
389  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
390 #if PY_VERSION_HEX < 0x030800A4
391  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
392  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
393 #else
394  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
395  PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
396 #endif
397  #define __Pyx_DefaultClassType PyType_Type
398 #endif
399 #ifndef Py_TPFLAGS_CHECKTYPES
400  #define Py_TPFLAGS_CHECKTYPES 0
401 #endif
402 #ifndef Py_TPFLAGS_HAVE_INDEX
403  #define Py_TPFLAGS_HAVE_INDEX 0
404 #endif
405 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
406  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
407 #endif
408 #ifndef Py_TPFLAGS_HAVE_FINALIZE
409  #define Py_TPFLAGS_HAVE_FINALIZE 0
410 #endif
411 #ifndef METH_STACKLESS
412  #define METH_STACKLESS 0
413 #endif
414 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
415  #ifndef METH_FASTCALL
416  #define METH_FASTCALL 0x80
417  #endif
418  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
419  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
420  Py_ssize_t nargs, PyObject *kwnames);
421 #else
422  #define __Pyx_PyCFunctionFast _PyCFunctionFast
423  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
424 #endif
425 #if CYTHON_FAST_PYCCALL
426 #define __Pyx_PyFastCFunction_Check(func)\
427  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
428 #else
429 #define __Pyx_PyFastCFunction_Check(func) 0
430 #endif
431 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
432  #define PyObject_Malloc(s) PyMem_Malloc(s)
433  #define PyObject_Free(p) PyMem_Free(p)
434  #define PyObject_Realloc(p) PyMem_Realloc(p)
435 #endif
436 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
437  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
438  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
439  #define PyMem_RawFree(p) PyMem_Free(p)
440 #endif
441 #if CYTHON_COMPILING_IN_PYSTON
442  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
443  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
444 #else
445  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
446  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
447 #endif
448 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
449  #define __Pyx_PyThreadState_Current PyThreadState_GET()
450 #elif PY_VERSION_HEX >= 0x03060000
451  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
452 #elif PY_VERSION_HEX >= 0x03000000
453  #define __Pyx_PyThreadState_Current PyThreadState_GET()
454 #else
455  #define __Pyx_PyThreadState_Current _PyThreadState_Current
456 #endif
457 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
458 #include "pythread.h"
459 #define Py_tss_NEEDS_INIT 0
460 typedef int Py_tss_t;
461 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
462  *key = PyThread_create_key();
463  return 0;
464 }
465 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
466  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
467  *key = Py_tss_NEEDS_INIT;
468  return key;
469 }
470 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
471  PyObject_Free(key);
472 }
473 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
474  return *key != Py_tss_NEEDS_INIT;
475 }
476 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
477  PyThread_delete_key(*key);
478  *key = Py_tss_NEEDS_INIT;
479 }
480 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
481  return PyThread_set_key_value(*key, value);
482 }
483 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
484  return PyThread_get_key_value(*key);
485 }
486 #endif
487 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
488 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
489 #else
490 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
491 #endif
492 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
493  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
494  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
495 #else
496  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
497  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
498 #endif
499 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
500 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
501 #else
502 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
503 #endif
504 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
505  #define CYTHON_PEP393_ENABLED 1
506  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
507  0 : _PyUnicode_Ready((PyObject *)(op)))
508  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
509  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
510  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
511  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
512  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
513  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
514  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
515  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
516 #else
517  #define CYTHON_PEP393_ENABLED 0
518  #define PyUnicode_1BYTE_KIND 1
519  #define PyUnicode_2BYTE_KIND 2
520  #define PyUnicode_4BYTE_KIND 4
521  #define __Pyx_PyUnicode_READY(op) (0)
522  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
523  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
524  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
525  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
526  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
527  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
528  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
529  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
530 #endif
531 #if CYTHON_COMPILING_IN_PYPY
532  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
533  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
534 #else
535  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
536  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
537  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
538 #endif
539 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
540  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
541 #endif
542 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
543  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
544 #endif
545 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
546  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
547 #endif
548 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
549 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
550 #if PY_MAJOR_VERSION >= 3
551  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
552 #else
553  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
554 #endif
555 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
556  #define PyObject_ASCII(o) PyObject_Repr(o)
557 #endif
558 #if PY_MAJOR_VERSION >= 3
559  #define PyBaseString_Type PyUnicode_Type
560  #define PyStringObject PyUnicodeObject
561  #define PyString_Type PyUnicode_Type
562  #define PyString_Check PyUnicode_Check
563  #define PyString_CheckExact PyUnicode_CheckExact
564  #define PyObject_Unicode PyObject_Str
565 #endif
566 #if PY_MAJOR_VERSION >= 3
567  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
568  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
569 #else
570  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
571  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
572 #endif
573 #ifndef PySet_CheckExact
574  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
575 #endif
576 #if CYTHON_ASSUME_SAFE_MACROS
577  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
578 #else
579  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
580 #endif
581 #if PY_MAJOR_VERSION >= 3
582  #define PyIntObject PyLongObject
583  #define PyInt_Type PyLong_Type
584  #define PyInt_Check(op) PyLong_Check(op)
585  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
586  #define PyInt_FromString PyLong_FromString
587  #define PyInt_FromUnicode PyLong_FromUnicode
588  #define PyInt_FromLong PyLong_FromLong
589  #define PyInt_FromSize_t PyLong_FromSize_t
590  #define PyInt_FromSsize_t PyLong_FromSsize_t
591  #define PyInt_AsLong PyLong_AsLong
592  #define PyInt_AS_LONG PyLong_AS_LONG
593  #define PyInt_AsSsize_t PyLong_AsSsize_t
594  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
595  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
596  #define PyNumber_Int PyNumber_Long
597 #endif
598 #if PY_MAJOR_VERSION >= 3
599  #define PyBoolObject PyLongObject
600 #endif
601 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
602  #ifndef PyUnicode_InternFromString
603  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
604  #endif
605 #endif
606 #if PY_VERSION_HEX < 0x030200A4
607  typedef long Py_hash_t;
608  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
609  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
610 #else
611  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
612  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
613 #endif
614 #if PY_MAJOR_VERSION >= 3
615  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
616 #else
617  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
618 #endif
619 #if CYTHON_USE_ASYNC_SLOTS
620  #if PY_VERSION_HEX >= 0x030500B1
621  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
622  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
623  #else
624  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
625  #endif
626 #else
627  #define __Pyx_PyType_AsAsync(obj) NULL
628 #endif
629 #ifndef __Pyx_PyAsyncMethodsStruct
630  typedef struct {
631  unaryfunc am_await;
632  unaryfunc am_aiter;
633  unaryfunc am_anext;
634  } __Pyx_PyAsyncMethodsStruct;
635 #endif
636 
637 #if defined(WIN32) || defined(MS_WINDOWS)
638  #define _USE_MATH_DEFINES
639 #endif
640 #include <math.h>
641 #ifdef NAN
642 #define __PYX_NAN() ((float) NAN)
643 #else
644 static CYTHON_INLINE float __PYX_NAN() {
645  float value;
646  memset(&value, 0xFF, sizeof(value));
647  return value;
648 }
649 #endif
650 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
651 #define __Pyx_truncl trunc
652 #else
653 #define __Pyx_truncl truncl
654 #endif
655 
656 
657 #define __PYX_ERR(f_index, lineno, Ln_error) \
658 { \
659  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
660 }
661 
662 #ifndef __PYX_EXTERN_C
663  #ifdef __cplusplus
664  #define __PYX_EXTERN_C extern "C"
665  #else
666  #define __PYX_EXTERN_C extern
667  #endif
668 #endif
669 
670 #define __PYX_HAVE__PyClical
671 #define __PYX_HAVE_API__PyClical
672 /* Early includes */
673 #include "ios"
674 #include "new"
675 #include "stdexcept"
676 #include "typeinfo"
677 #include <vector>
678 #include "PyClical.h"
679 #include <string.h>
680 #include <string>
681 #ifdef _OPENMP
682 #include <omp.h>
683 #endif /* _OPENMP */
684 
685 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
686 #define CYTHON_WITHOUT_ASSERTIONS
687 #endif
688 
689 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
690  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
691 
692 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
693 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
694 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
695 #define __PYX_DEFAULT_STRING_ENCODING ""
696 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
697 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
698 #define __Pyx_uchar_cast(c) ((unsigned char)c)
699 #define __Pyx_long_cast(x) ((long)x)
700 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
701  (sizeof(type) < sizeof(Py_ssize_t)) ||\
702  (sizeof(type) > sizeof(Py_ssize_t) &&\
703  likely(v < (type)PY_SSIZE_T_MAX ||\
704  v == (type)PY_SSIZE_T_MAX) &&\
705  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
706  v == (type)PY_SSIZE_T_MIN))) ||\
707  (sizeof(type) == sizeof(Py_ssize_t) &&\
708  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
709  v == (type)PY_SSIZE_T_MAX))) )
710 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
711  return (size_t) i < (size_t) limit;
712 }
713 #if defined (__cplusplus) && __cplusplus >= 201103L
714  #include <cstdlib>
715  #define __Pyx_sst_abs(value) std::abs(value)
716 #elif SIZEOF_INT >= SIZEOF_SIZE_T
717  #define __Pyx_sst_abs(value) abs(value)
718 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
719  #define __Pyx_sst_abs(value) labs(value)
720 #elif defined (_MSC_VER)
721  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
722 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
723  #define __Pyx_sst_abs(value) llabs(value)
724 #elif defined (__GNUC__)
725  #define __Pyx_sst_abs(value) __builtin_llabs(value)
726 #else
727  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
728 #endif
729 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
730 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
731 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
732 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
733 #define __Pyx_PyBytes_FromString PyBytes_FromString
734 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
735 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
736 #if PY_MAJOR_VERSION < 3
737  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
738  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
739 #else
740  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
741  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
742 #endif
743 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
744 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
745 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
746 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
747 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
748 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
749 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
750 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
751 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
752 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
753 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
754 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
755 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
756 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
757 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
758 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
759 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
760  const Py_UNICODE *u_end = u;
761  while (*u_end++) ;
762  return (size_t)(u_end - u - 1);
763 }
764 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
765 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
766 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
767 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
768 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
769 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
770 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
771 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
772 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
773 #define __Pyx_PySequence_Tuple(obj)\
774  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
775 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
776 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
777 #if CYTHON_ASSUME_SAFE_MACROS
778 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
779 #else
780 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
781 #endif
782 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
783 #if PY_MAJOR_VERSION >= 3
784 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
785 #else
786 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
787 #endif
788 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
789 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
790 static int __Pyx_sys_getdefaultencoding_not_ascii;
791 static int __Pyx_init_sys_getdefaultencoding_params(void) {
792  PyObject* sys;
793  PyObject* default_encoding = NULL;
794  PyObject* ascii_chars_u = NULL;
795  PyObject* ascii_chars_b = NULL;
796  const char* default_encoding_c;
797  sys = PyImport_ImportModule("sys");
798  if (!sys) goto bad;
799  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
800  Py_DECREF(sys);
801  if (!default_encoding) goto bad;
802  default_encoding_c = PyBytes_AsString(default_encoding);
803  if (!default_encoding_c) goto bad;
804  if (strcmp(default_encoding_c, "ascii") == 0) {
805  __Pyx_sys_getdefaultencoding_not_ascii = 0;
806  } else {
807  char ascii_chars[128];
808  int c;
809  for (c = 0; c < 128; c++) {
810  ascii_chars[c] = c;
811  }
812  __Pyx_sys_getdefaultencoding_not_ascii = 1;
813  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
814  if (!ascii_chars_u) goto bad;
815  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
816  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
817  PyErr_Format(
818  PyExc_ValueError,
819  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
820  default_encoding_c);
821  goto bad;
822  }
823  Py_DECREF(ascii_chars_u);
824  Py_DECREF(ascii_chars_b);
825  }
826  Py_DECREF(default_encoding);
827  return 0;
828 bad:
829  Py_XDECREF(default_encoding);
830  Py_XDECREF(ascii_chars_u);
831  Py_XDECREF(ascii_chars_b);
832  return -1;
833 }
834 #endif
835 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
836 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
837 #else
838 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
839 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
840 static char* __PYX_DEFAULT_STRING_ENCODING;
841 static int __Pyx_init_sys_getdefaultencoding_params(void) {
842  PyObject* sys;
843  PyObject* default_encoding = NULL;
844  char* default_encoding_c;
845  sys = PyImport_ImportModule("sys");
846  if (!sys) goto bad;
847  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
848  Py_DECREF(sys);
849  if (!default_encoding) goto bad;
850  default_encoding_c = PyBytes_AsString(default_encoding);
851  if (!default_encoding_c) goto bad;
852  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
853  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
854  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
855  Py_DECREF(default_encoding);
856  return 0;
857 bad:
858  Py_XDECREF(default_encoding);
859  return -1;
860 }
861 #endif
862 #endif
863 
864 
865 /* Test for GCC > 2.95 */
866 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
867  #define likely(x) __builtin_expect(!!(x), 1)
868  #define unlikely(x) __builtin_expect(!!(x), 0)
869 #else /* !__GNUC__ or GCC < 2.95 */
870  #define likely(x) (x)
871  #define unlikely(x) (x)
872 #endif /* __GNUC__ */
873 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
874 
875 static PyObject *__pyx_m = NULL;
876 static PyObject *__pyx_d;
877 static PyObject *__pyx_b;
878 static PyObject *__pyx_cython_runtime = NULL;
879 static PyObject *__pyx_empty_tuple;
880 static PyObject *__pyx_empty_bytes;
881 static PyObject *__pyx_empty_unicode;
882 static int __pyx_lineno;
883 static int __pyx_clineno = 0;
884 static const char * __pyx_cfilenm= __FILE__;
885 static const char *__pyx_filename;
886 
887 
888 static const char *__pyx_f[] = {
889  "PyClical.pyx",
890  "stringsource",
891 };
892 
893 /*--- Type declarations ---*/
894 struct __pyx_obj_8PyClical_index_set;
895 struct __pyx_obj_8PyClical_clifford;
896 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
897 struct __pyx_opt_args_8PyClical_sqrt;
898 struct __pyx_opt_args_8PyClical_log;
899 struct __pyx_opt_args_8PyClical_cos;
900 struct __pyx_opt_args_8PyClical_acos;
901 struct __pyx_opt_args_8PyClical_acosh;
902 struct __pyx_opt_args_8PyClical_sin;
903 struct __pyx_opt_args_8PyClical_asin;
904 struct __pyx_opt_args_8PyClical_asinh;
905 struct __pyx_opt_args_8PyClical_tan;
906 struct __pyx_opt_args_8PyClical_atan;
907 struct __pyx_opt_args_8PyClical_atanh;
908 struct __pyx_opt_args_8PyClical_random_clifford;
909 
910 /* "PyClical.pyx":1541
911  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
912  *
913  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
914  * """
915  * Square root of multivector with optional complexifier.
916  */
917 struct __pyx_opt_args_8PyClical_sqrt {
918  int __pyx_n;
919  PyObject *i;
920 };
921 
922 /* "PyClical.pyx":1578
923  * return clifford().wrap( glucat.exp(toClifford(obj)) )
924  *
925  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
926  * """
927  * Natural logarithm of multivector with optional complexifier.
928  */
929 struct __pyx_opt_args_8PyClical_log {
930  int __pyx_n;
931  PyObject *i;
932 };
933 
934 /* "PyClical.pyx":1601
935  * return clifford().wrap( glucat.log(toClifford(obj)) )
936  *
937  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
938  * """
939  * Cosine of multivector with optional complexifier.
940  */
941 struct __pyx_opt_args_8PyClical_cos {
942  int __pyx_n;
943  PyObject *i;
944 };
945 
946 /* "PyClical.pyx":1618
947  * return clifford().wrap( glucat.cos(toClifford(obj)) )
948  *
949  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
950  * """
951  * Inverse cosine of multivector with optional complexifier.
952  */
953 struct __pyx_opt_args_8PyClical_acos {
954  int __pyx_n;
955  PyObject *i;
956 };
957 
958 /* "PyClical.pyx":1655
959  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
960  *
961  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
962  * """
963  * Inverse hyperbolic cosine of multivector with optional complexifier.
964  */
965 struct __pyx_opt_args_8PyClical_acosh {
966  int __pyx_n;
967  PyObject *i;
968 };
969 
970 /* "PyClical.pyx":1678
971  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
972  *
973  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
974  * """
975  * Sine of multivector with optional complexifier.
976  */
977 struct __pyx_opt_args_8PyClical_sin {
978  int __pyx_n;
979  PyObject *i;
980 };
981 
982 /* "PyClical.pyx":1697
983  * return clifford().wrap( glucat.sin(toClifford(obj)) )
984  *
985  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
986  * """
987  * Inverse sine of multivector with optional complexifier.
988  */
989 struct __pyx_opt_args_8PyClical_asin {
990  int __pyx_n;
991  PyObject *i;
992 };
993 
994 /* "PyClical.pyx":1732
995  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
996  *
997  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
998  * """
999  * Inverse hyperbolic sine of multivector with optional complexifier.
1000  */
1001 struct __pyx_opt_args_8PyClical_asinh {
1002  int __pyx_n;
1003  PyObject *i;
1004 };
1005 
1006 /* "PyClical.pyx":1751
1007  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
1008  *
1009  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
1010  * """
1011  * Tangent of multivector with optional complexifier.
1012  */
1013 struct __pyx_opt_args_8PyClical_tan {
1014  int __pyx_n;
1015  PyObject *i;
1016 };
1017 
1018 /* "PyClical.pyx":1768
1019  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1020  *
1021  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1022  * """
1023  * Inverse tangent of multivector with optional complexifier.
1024  */
1025 struct __pyx_opt_args_8PyClical_atan {
1026  int __pyx_n;
1027  PyObject *i;
1028 };
1029 
1030 /* "PyClical.pyx":1797
1031  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1032  *
1033  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1034  * """
1035  * Inverse hyperbolic tangent of multivector with optional complexifier.
1036  */
1037 struct __pyx_opt_args_8PyClical_atanh {
1038  int __pyx_n;
1039  PyObject *i;
1040 };
1041 
1042 /* "PyClical.pyx":1814
1043  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1044  *
1045  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1046  * """
1047  * Random multivector within a frame.
1048  */
1049 struct __pyx_opt_args_8PyClical_random_clifford {
1050  int __pyx_n;
1051  PyObject *fill;
1052 };
1053 
1054 /* "PyClical.pyx":38
1055  *
1056  * # Forward reference
1057  * cdef class index_set # <<<<<<<<<<<<<<
1058  *
1059  * cdef inline IndexSet toIndexSet(obj):
1060  */
1061 struct __pyx_obj_8PyClical_index_set {
1062  PyObject_HEAD
1063  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1064  IndexSet *instance;
1065 };
1066 
1067 
1068 /* "PyClical.pyx":532
1069  *
1070  * # Forward reference.
1071  * cdef class clifford # <<<<<<<<<<<<<<
1072  *
1073  * cdef inline Clifford toClifford(obj):
1074  */
1075 struct __pyx_obj_8PyClical_clifford {
1076  PyObject_HEAD
1077  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1078  Clifford *instance;
1079 };
1080 
1081 
1082 /* "PyClical.pyx":229
1083  * return self.instance.getitem(idx)
1084  *
1085  * def __iter__(self): # <<<<<<<<<<<<<<
1086  * """
1087  * Iterate over the indices of an index_set.
1088  */
1089 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1090  PyObject_HEAD
1091  PyObject *__pyx_v_idx;
1092  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1093  PyObject *__pyx_t_0;
1094  Py_ssize_t __pyx_t_1;
1095  PyObject *(*__pyx_t_2)(PyObject *);
1096 };
1097 
1098 
1099 
1100 /* "PyClical.pyx":46
1101  * return index_set(obj).instance[0]
1102  *
1103  * cdef class index_set: # <<<<<<<<<<<<<<
1104  * """
1105  * Python class index_set wraps C++ class IndexSet.
1106  */
1107 
1108 struct __pyx_vtabstruct_8PyClical_index_set {
1109  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1110  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1111  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1112 };
1113 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1114 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1115 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1116 
1117 
1118 /* "PyClical.pyx":537
1119  * return clifford(obj).instance[0]
1120  *
1121  * cdef class clifford: # <<<<<<<<<<<<<<
1122  * """
1123  * Python class clifford wraps C++ class Clifford.
1124  */
1125 
1126 struct __pyx_vtabstruct_8PyClical_clifford {
1127  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1128  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1129  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1130 };
1131 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1132 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1133 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1134 
1135 /* --- Runtime support code (head) --- */
1136 /* Refnanny.proto */
1137 #ifndef CYTHON_REFNANNY
1138  #define CYTHON_REFNANNY 0
1139 #endif
1140 #if CYTHON_REFNANNY
1141  typedef struct {
1142  void (*INCREF)(void*, PyObject*, int);
1143  void (*DECREF)(void*, PyObject*, int);
1144  void (*GOTREF)(void*, PyObject*, int);
1145  void (*GIVEREF)(void*, PyObject*, int);
1146  void* (*SetupContext)(const char*, int, const char*);
1147  void (*FinishContext)(void**);
1148  } __Pyx_RefNannyAPIStruct;
1149  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1150  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1151  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1152 #ifdef WITH_THREAD
1153  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1154  if (acquire_gil) {\
1155  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1156  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1157  PyGILState_Release(__pyx_gilstate_save);\
1158  } else {\
1159  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1160  }
1161 #else
1162  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1163  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1164 #endif
1165  #define __Pyx_RefNannyFinishContext()\
1166  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1167  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1168  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1169  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1170  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1171  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1172  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1173  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1174  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1175 #else
1176  #define __Pyx_RefNannyDeclarations
1177  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1178  #define __Pyx_RefNannyFinishContext()
1179  #define __Pyx_INCREF(r) Py_INCREF(r)
1180  #define __Pyx_DECREF(r) Py_DECREF(r)
1181  #define __Pyx_GOTREF(r)
1182  #define __Pyx_GIVEREF(r)
1183  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1184  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1185  #define __Pyx_XGOTREF(r)
1186  #define __Pyx_XGIVEREF(r)
1187 #endif
1188 #define __Pyx_XDECREF_SET(r, v) do {\
1189  PyObject *tmp = (PyObject *) r;\
1190  r = v; __Pyx_XDECREF(tmp);\
1191  } while (0)
1192 #define __Pyx_DECREF_SET(r, v) do {\
1193  PyObject *tmp = (PyObject *) r;\
1194  r = v; __Pyx_DECREF(tmp);\
1195  } while (0)
1196 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1197 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1198 
1199 /* PyObjectGetAttrStr.proto */
1200 #if CYTHON_USE_TYPE_SLOTS
1201 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1202 #else
1203 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1204 #endif
1205 
1206 /* GetBuiltinName.proto */
1207 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1208 
1209 /* PyCFunctionFastCall.proto */
1210 #if CYTHON_FAST_PYCCALL
1211 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1212 #else
1213 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1214 #endif
1215 
1216 /* PyFunctionFastCall.proto */
1217 #if CYTHON_FAST_PYCALL
1218 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1219  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1220 #if 1 || PY_VERSION_HEX < 0x030600B1
1221 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1222 #else
1223 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1224 #endif
1225 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1226  (sizeof(char [1 - 2*!(cond)]) - 1)
1227 #ifndef Py_MEMBER_SIZE
1228 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1229 #endif
1230  static size_t __pyx_pyframe_localsplus_offset = 0;
1231  #include "frameobject.h"
1232  #define __Pxy_PyFrame_Initialize_Offsets()\
1233  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1234  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1235  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1236  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1237 #endif
1238 
1239 /* PyObjectCall.proto */
1240 #if CYTHON_COMPILING_IN_CPYTHON
1241 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1242 #else
1243 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1244 #endif
1245 
1246 /* PyObjectCallMethO.proto */
1247 #if CYTHON_COMPILING_IN_CPYTHON
1248 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1249 #endif
1250 
1251 /* PyObjectCallOneArg.proto */
1252 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1253 
1254 /* PyThreadStateGet.proto */
1255 #if CYTHON_FAST_THREAD_STATE
1256 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1257 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1258 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1259 #else
1260 #define __Pyx_PyThreadState_declare
1261 #define __Pyx_PyThreadState_assign
1262 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1263 #endif
1264 
1265 /* PyErrFetchRestore.proto */
1266 #if CYTHON_FAST_THREAD_STATE
1267 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1268 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1269 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1270 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1271 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1272 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1273 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1274 #if CYTHON_COMPILING_IN_CPYTHON
1275 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1276 #else
1277 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1278 #endif
1279 #else
1280 #define __Pyx_PyErr_Clear() PyErr_Clear()
1281 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1282 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1283 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1284 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1285 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1286 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1287 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1288 #endif
1289 
1290 /* WriteUnraisableException.proto */
1291 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1292  int lineno, const char *filename,
1293  int full_traceback, int nogil);
1294 
1295 /* PyDictVersioning.proto */
1296 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1297 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1298 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1299 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1300  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1301  (cache_var) = (value);
1302 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1303  static PY_UINT64_T __pyx_dict_version = 0;\
1304  static PyObject *__pyx_dict_cached_value = NULL;\
1305  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1306  (VAR) = __pyx_dict_cached_value;\
1307  } else {\
1308  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1309  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1310  }\
1311 }
1312 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1313 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1314 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1315 #else
1316 #define __PYX_GET_DICT_VERSION(dict) (0)
1317 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1318 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1319 #endif
1320 
1321 /* PyObjectCallNoArg.proto */
1322 #if CYTHON_COMPILING_IN_CPYTHON
1323 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1324 #else
1325 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1326 #endif
1327 
1328 /* RaiseDoubleKeywords.proto */
1329 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1330 
1331 /* ParseKeywords.proto */
1332 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1333  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1334  const char* function_name);
1335 
1336 /* RaiseArgTupleInvalid.proto */
1337 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1338  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1339 
1340 /* GetModuleGlobalName.proto */
1341 #if CYTHON_USE_DICT_VERSIONS
1342 #define __Pyx_GetModuleGlobalName(var, name) {\
1343  static PY_UINT64_T __pyx_dict_version = 0;\
1344  static PyObject *__pyx_dict_cached_value = NULL;\
1345  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1346  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1347  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1348 }
1349 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1350  PY_UINT64_T __pyx_dict_version;\
1351  PyObject *__pyx_dict_cached_value;\
1352  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1353 }
1354 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1355 #else
1356 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1357 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1358 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1359 #endif
1360 
1361 /* GetTopmostException.proto */
1362 #if CYTHON_USE_EXC_INFO_STACK
1363 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1364 #endif
1365 
1366 /* SaveResetException.proto */
1367 #if CYTHON_FAST_THREAD_STATE
1368 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1369 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1370 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1371 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1372 #else
1373 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1374 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1375 #endif
1376 
1377 /* PyErrExceptionMatches.proto */
1378 #if CYTHON_FAST_THREAD_STATE
1379 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1380 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1381 #else
1382 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1383 #endif
1384 
1385 /* GetException.proto */
1386 #if CYTHON_FAST_THREAD_STATE
1387 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1388 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1389 #else
1390 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1391 #endif
1392 
1393 /* RaiseException.proto */
1394 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1395 
1396 /* PyObjectCall2Args.proto */
1397 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1398 
1399 /* PyIntBinop.proto */
1400 #if !CYTHON_COMPILING_IN_PYPY
1401 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1402 #else
1403 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1404  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1405 #endif
1406 
1407 /* PySequenceContains.proto */
1408 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1409  int result = PySequence_Contains(seq, item);
1410  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1411 }
1412 
1413 /* IncludeCppStringH.proto */
1414 #include <string>
1415 
1416 /* decode_c_string_utf16.proto */
1417 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1418  int byteorder = 0;
1419  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1420 }
1421 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1422  int byteorder = -1;
1423  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1424 }
1425 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1426  int byteorder = 1;
1427  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1428 }
1429 
1430 /* decode_c_bytes.proto */
1431 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
1432  const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
1433  const char* encoding, const char* errors,
1434  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1435 
1436 /* decode_cpp_string.proto */
1437 static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string(
1438  std::string cppstring, Py_ssize_t start, Py_ssize_t stop,
1439  const char* encoding, const char* errors,
1440  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
1441  return __Pyx_decode_c_bytes(
1442  cppstring.data(), cppstring.size(), start, stop, encoding, errors, decode_func);
1443 }
1444 
1445 /* SwapException.proto */
1446 #if CYTHON_FAST_THREAD_STATE
1447 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1448 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1449 #else
1450 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1451 #endif
1452 
1453 /* SetItemInt.proto */
1454 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1455  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1456  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1457  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1458  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1459 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1460 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1461  int is_list, int wraparound, int boundscheck);
1462 
1463 /* ArgTypeTest.proto */
1464 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1465  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1466  __Pyx__ArgTypeTest(obj, type, name, exact))
1467 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1468 
1469 /* Import.proto */
1470 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1471 
1472 /* IncludeStringH.proto */
1473 #include <string.h>
1474 
1475 /* PyObject_GenericGetAttrNoDict.proto */
1476 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1477 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1478 #else
1479 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1480 #endif
1481 
1482 /* PyObject_GenericGetAttr.proto */
1483 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1484 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1485 #else
1486 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1487 #endif
1488 
1489 /* SetVTable.proto */
1490 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1491 
1492 /* SetupReduce.proto */
1493 static int __Pyx_setup_reduce(PyObject* type_obj);
1494 
1495 /* BytesEquals.proto */
1496 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1497 
1498 /* UnicodeEquals.proto */
1499 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1500 
1501 /* CLineInTraceback.proto */
1502 #ifdef CYTHON_CLINE_IN_TRACEBACK
1503 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1504 #else
1505 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1506 #endif
1507 
1508 /* CodeObjectCache.proto */
1509 typedef struct {
1510  PyCodeObject* code_object;
1511  int code_line;
1512 } __Pyx_CodeObjectCacheEntry;
1513 struct __Pyx_CodeObjectCache {
1514  int count;
1515  int max_count;
1516  __Pyx_CodeObjectCacheEntry* entries;
1517 };
1518 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1519 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1520 static PyCodeObject *__pyx_find_code_object(int code_line);
1521 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1522 
1523 /* AddTraceback.proto */
1524 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1525  int py_line, const char *filename);
1526 
1527 /* CppExceptionConversion.proto */
1528 #ifndef __Pyx_CppExn2PyErr
1529 #include <new>
1530 #include <typeinfo>
1531 #include <stdexcept>
1532 #include <ios>
1533 static void __Pyx_CppExn2PyErr() {
1534  try {
1535  if (PyErr_Occurred())
1536  ; // let the latest Python exn pass through and ignore the current one
1537  else
1538  throw;
1539  } catch (const std::bad_alloc& exn) {
1540  PyErr_SetString(PyExc_MemoryError, exn.what());
1541  } catch (const std::bad_cast& exn) {
1542  PyErr_SetString(PyExc_TypeError, exn.what());
1543  } catch (const std::bad_typeid& exn) {
1544  PyErr_SetString(PyExc_TypeError, exn.what());
1545  } catch (const std::domain_error& exn) {
1546  PyErr_SetString(PyExc_ValueError, exn.what());
1547  } catch (const std::invalid_argument& exn) {
1548  PyErr_SetString(PyExc_ValueError, exn.what());
1549  } catch (const std::ios_base::failure& exn) {
1550  PyErr_SetString(PyExc_IOError, exn.what());
1551  } catch (const std::out_of_range& exn) {
1552  PyErr_SetString(PyExc_IndexError, exn.what());
1553  } catch (const std::overflow_error& exn) {
1554  PyErr_SetString(PyExc_OverflowError, exn.what());
1555  } catch (const std::range_error& exn) {
1556  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1557  } catch (const std::underflow_error& exn) {
1558  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1559  } catch (const std::exception& exn) {
1560  PyErr_SetString(PyExc_RuntimeError, exn.what());
1561  }
1562  catch (...)
1563  {
1564  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1565  }
1566 }
1567 #endif
1568 
1569 /* CIntToPy.proto */
1570 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1571 
1572 /* CIntFromPy.proto */
1573 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1574 
1575 /* CIntToPy.proto */
1576 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1577 
1578 /* CIntFromPy.proto */
1579 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1580 
1581 /* FastTypeChecks.proto */
1582 #if CYTHON_COMPILING_IN_CPYTHON
1583 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1584 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1585 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1586 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1587 #else
1588 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1589 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1590 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1591 #endif
1592 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1593 
1594 /* FetchCommonType.proto */
1595 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1596 
1597 /* PyObjectGetMethod.proto */
1598 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1599 
1600 /* PyObjectCallMethod1.proto */
1601 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1602 
1603 /* CoroutineBase.proto */
1604 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1605 #if CYTHON_USE_EXC_INFO_STACK
1606 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1607 #else
1608 typedef struct {
1609  PyObject *exc_type;
1610  PyObject *exc_value;
1611  PyObject *exc_traceback;
1612 } __Pyx_ExcInfoStruct;
1613 #endif
1614 typedef struct {
1615  PyObject_HEAD
1616  __pyx_coroutine_body_t body;
1617  PyObject *closure;
1618  __Pyx_ExcInfoStruct gi_exc_state;
1619  PyObject *gi_weakreflist;
1620  PyObject *classobj;
1621  PyObject *yieldfrom;
1622  PyObject *gi_name;
1623  PyObject *gi_qualname;
1624  PyObject *gi_modulename;
1625  PyObject *gi_code;
1626  int resume_label;
1627  char is_running;
1628 } __pyx_CoroutineObject;
1629 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1630  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1631  PyObject *name, PyObject *qualname, PyObject *module_name);
1632 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1633  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1634  PyObject *name, PyObject *qualname, PyObject *module_name);
1635 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1636 static int __Pyx_Coroutine_clear(PyObject *self);
1637 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1638 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1639 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1640 #if CYTHON_USE_EXC_INFO_STACK
1641 #define __Pyx_Coroutine_SwapException(self)
1642 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1643 #else
1644 #define __Pyx_Coroutine_SwapException(self) {\
1645  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1646  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1647  }
1648 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1649  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1650  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1651  }
1652 #endif
1653 #if CYTHON_FAST_THREAD_STATE
1654 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1655  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1656 #else
1657 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1658  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1659 #endif
1660 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1661 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1662 
1663 /* PatchModuleWithCoroutine.proto */
1664 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1665 
1666 /* PatchGeneratorABC.proto */
1667 static int __Pyx_patch_abc(void);
1668 
1669 /* Generator.proto */
1670 #define __Pyx_Generator_USED
1671 static PyTypeObject *__pyx_GeneratorType = 0;
1672 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1673 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1674  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1675 static PyObject *__Pyx_Generator_Next(PyObject *self);
1676 static int __pyx_Generator_init(void);
1677 
1678 /* CheckBinaryVersion.proto */
1679 static int __Pyx_check_binary_version(void);
1680 
1681 /* InitStrings.proto */
1682 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1683 
1684 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1685 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1686 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1687 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1688 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1689 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1690 
1691 /* Module declarations from 'libcpp.vector' */
1692 
1693 /* Module declarations from 'glucat' */
1694 
1695 /* Module declarations from 'libc.string' */
1696 
1697 /* Module declarations from 'libcpp.string' */
1698 
1699 /* Module declarations from 'PyClical' */
1700 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1701 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1702 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1703 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1704 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1705 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1706 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1707 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1708 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1709 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1710 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1711 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1712 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1713 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1714 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1715 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1716 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1717 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1718 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1719 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1720 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1721 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1722 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1723 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1724 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1725 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1726 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1727 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1728 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1729 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1730 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1731 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1732 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1733 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1734 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1735 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1736 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1737 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1738 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1739 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1740 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1741 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*/
1742 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1743 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1744 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1745 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/
1746 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/
1747 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/
1748 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/
1749 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/
1750 #define __Pyx_MODULE_NAME "PyClical"
1751 extern int __pyx_module_is_main_PyClical;
1752 int __pyx_module_is_main_PyClical = 0;
1753 
1754 /* Implementation of 'PyClical' */
1755 static PyObject *__pyx_builtin_IndexError;
1756 static PyObject *__pyx_builtin_RuntimeError;
1757 static PyObject *__pyx_builtin_TypeError;
1758 static PyObject *__pyx_builtin_ValueError;
1759 static PyObject *__pyx_builtin_NotImplemented;
1760 static PyObject *__pyx_builtin_range;
1761 static PyObject *__pyx_builtin_xrange;
1762 static const char __pyx_k_[] = ".";
1763 static const char __pyx_k_e[] = "e";
1764 static const char __pyx_k_i[] = "i";
1765 static const char __pyx_k_m[] = "m";
1766 static const char __pyx_k_p[] = "p";
1767 static const char __pyx_k_q[] = "q";
1768 static const char __pyx_k__2[] = " ";
1769 static const char __pyx_k__5[] = ":";
1770 static const char __pyx_k__6[] = "\n\t";
1771 static const char __pyx_k__7[] = " (";
1772 static const char __pyx_k__8[] = ", ";
1773 static const char __pyx_k__9[] = ").";
1774 static const char __pyx_k_cl[] = "cl";
1775 static const char __pyx_k_pi[] = "pi";
1776 static const char __pyx_k_abc[] = "abc";
1777 static const char __pyx_k_cos[] = "cos";
1778 static const char __pyx_k_exp[] = "exp";
1779 static const char __pyx_k_frm[] = "frm";
1780 static const char __pyx_k_inv[] = "inv";
1781 static const char __pyx_k_ist[] = "ist";
1782 static const char __pyx_k_ixt[] = "ixt";
1783 static const char __pyx_k_lhs[] = "lhs";
1784 static const char __pyx_k_log[] = "log";
1785 static const char __pyx_k_max[] = "max";
1786 static const char __pyx_k_min[] = "min";
1787 static const char __pyx_k_obj[] = "obj";
1788 static const char __pyx_k_odd[] = "odd";
1789 static const char __pyx_k_pow[] = "pow";
1790 static const char __pyx_k_rhs[] = "rhs";
1791 static const char __pyx_k_sin[] = "sin";
1792 static const char __pyx_k_tan[] = "tan";
1793 static const char __pyx_k_tau[] = "tau";
1794 static const char __pyx_k_Real[] = "Real";
1795 static const char __pyx_k_acos[] = "acos";
1796 static const char __pyx_k_args[] = "args";
1797 static const char __pyx_k_asin[] = "asin";
1798 static const char __pyx_k_atan[] = "atan";
1799 static const char __pyx_k_conj[] = "conj";
1800 static const char __pyx_k_copy[] = "copy";
1801 static const char __pyx_k_cosh[] = "cosh";
1802 static const char __pyx_k_even[] = "even";
1803 static const char __pyx_k_fill[] = "fill";
1804 static const char __pyx_k_from[] = " from ";
1805 static const char __pyx_k_iter[] = "__iter__";
1806 static const char __pyx_k_main[] = "__main__";
1807 static const char __pyx_k_math[] = "math";
1808 static const char __pyx_k_name[] = "__name__";
1809 static const char __pyx_k_norm[] = "norm";
1810 static const char __pyx_k_pure[] = "pure";
1811 static const char __pyx_k_quad[] = "quad";
1812 static const char __pyx_k_send[] = "send";
1813 static const char __pyx_k_sinh[] = "sinh";
1814 static const char __pyx_k_sqrt[] = "sqrt";
1815 static const char __pyx_k_tanh[] = "tanh";
1816 static const char __pyx_k_test[] = "_test";
1817 static const char __pyx_k_0_8_4[] = "0.8.4";
1818 static const char __pyx_k_UTF_8[] = "UTF-8";
1819 static const char __pyx_k_acosh[] = "acosh";
1820 static const char __pyx_k_asinh[] = "asinh";
1821 static const char __pyx_k_atanh[] = "atanh";
1822 static const char __pyx_k_close[] = "close";
1823 static const char __pyx_k_grade[] = "grade";
1824 static const char __pyx_k_istpq[] = "istpq";
1825 static const char __pyx_k_nbar3[] = "nbar3";
1826 static const char __pyx_k_ninf3[] = "ninf3";
1827 static const char __pyx_k_other[] = "other";
1828 static const char __pyx_k_range[] = "range";
1829 static const char __pyx_k_throw[] = "throw";
1830 static const char __pyx_k_using[] = " using (";
1831 static const char __pyx_k_value[] = " value ";
1832 static const char __pyx_k_encode[] = "encode";
1833 static const char __pyx_k_import[] = "__import__";
1834 static const char __pyx_k_reduce[] = "__reduce__";
1835 static const char __pyx_k_scalar[] = "scalar";
1836 static const char __pyx_k_test_2[] = "__test__";
1837 static const char __pyx_k_xrange[] = "xrange";
1838 static const char __pyx_k_doctest[] = "doctest";
1839 static const char __pyx_k_invalid[] = " invalid ";
1840 static const char __pyx_k_numbers[] = "numbers";
1841 static const char __pyx_k_reverse[] = "reverse";
1842 static const char __pyx_k_testmod[] = "testmod";
1843 static const char __pyx_k_version[] = "__version__";
1844 static const char __pyx_k_Integral[] = "Integral";
1845 static const char __pyx_k_PyClical[] = "PyClical";
1846 static const char __pyx_k_Sequence[] = "Sequence";
1847 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1848 static const char __pyx_k_clifford[] = "clifford";
1849 static const char __pyx_k_getstate[] = "__getstate__";
1850 static const char __pyx_k_involute[] = "involute";
1851 static const char __pyx_k_setstate[] = "__setstate__";
1852 static const char __pyx_k_to_frame[] = " to frame ";
1853 static const char __pyx_k_TypeError[] = "TypeError";
1854 static const char __pyx_k_index_set[] = "index_set";
1855 static const char __pyx_k_outer_pow[] = "outer_pow";
1856 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1857 static const char __pyx_k_IndexError[] = "IndexError";
1858 static const char __pyx_k_ValueError[] = "ValueError";
1859 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1860 static const char __pyx_k_collections[] = "collections";
1861 static const char __pyx_k_e_line_1886[] = "e (line 1886)";
1862 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1863 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1864 static const char __pyx_k_abs_line_1472[] = "abs (line 1472)";
1865 static const char __pyx_k_cos_line_1601[] = "cos (line 1601)";
1866 static const char __pyx_k_exp_line_1564[] = "exp (line 1564)";
1867 static const char __pyx_k_inv_line_1328[] = "inv (line 1328)";
1868 static const char __pyx_k_log_line_1578[] = "log (line 1578)";
1869 static const char __pyx_k_odd_line_1396[] = "odd (line 1396)";
1870 static const char __pyx_k_pow_line_1493[] = "pow (line 1493)";
1871 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1872 static const char __pyx_k_sin_line_1678[] = "sin (line 1678)";
1873 static const char __pyx_k_tan_line_1751[] = "tan (line 1751)";
1874 static const char __pyx_k_using_invalid[] = " using invalid ";
1875 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1876 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1877 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1878 static const char __pyx_k_acos_line_1618[] = "acos (line 1618)";
1879 static const char __pyx_k_agc3_line_1843[] = "agc3 (line 1843)";
1880 static const char __pyx_k_asin_line_1697[] = "asin (line 1697)";
1881 static const char __pyx_k_atan_line_1768[] = "atan (line 1768)";
1882 static const char __pyx_k_cga3_line_1823[] = "cga3 (line 1823)";
1883 static const char __pyx_k_conj_line_1435[] = "conj (line 1435)";
1884 static const char __pyx_k_cosh_line_1639[] = "cosh (line 1639)";
1885 static const char __pyx_k_even_line_1387[] = "even (line 1387)";
1886 static const char __pyx_k_imag_line_1365[] = "imag (line 1365)";
1887 static const char __pyx_k_invalid_string[] = " invalid string ";
1888 static const char __pyx_k_norm_line_1461[] = "norm (line 1461)";
1889 static const char __pyx_k_pure_line_1376[] = "pure (line 1376)";
1890 static const char __pyx_k_quad_line_1450[] = "quad (line 1450)";
1891 static const char __pyx_k_real_line_1354[] = "real (line 1354)";
1892 static const char __pyx_k_scalar_epsilon[] = "scalar_epsilon";
1893 static const char __pyx_k_sinh_line_1718[] = "sinh (line 1718)";
1894 static const char __pyx_k_sqrt_line_1541[] = "sqrt (line 1541)";
1895 static const char __pyx_k_tanh_line_1785[] = "tanh (line 1785)";
1896 static const char __pyx_k_acosh_line_1655[] = "acosh (line 1655)";
1897 static const char __pyx_k_asinh_line_1732[] = "asinh (line 1732)";
1898 static const char __pyx_k_atanh_line_1797[] = "atanh (line 1797)";
1899 static const char __pyx_k_istpq_line_1899[] = "istpq (line 1899)";
1900 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1901 static const char __pyx_k_compare_line_492[] = "compare (line 492)";
1902 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1903 static const char __pyx_k_max_pos_line_513[] = "max_pos (line 513)";
1904 static const char __pyx_k_min_neg_line_504[] = "min_neg (line 504)";
1905 static const char __pyx_k_scalar_line_1343[] = "scalar (line 1343)";
1906 static const char __pyx_k_cga3std_line_1832[] = "cga3std (line 1832)";
1907 static const char __pyx_k_max_abs_line_1481[] = "max_abs (line 1481)";
1908 static const char __pyx_k_reverse_line_1420[] = "reverse (line 1420)";
1909 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1910 static const char __pyx_k_involute_line_1405[] = "involute (line 1405)";
1911 static const char __pyx_k_outer_pow_line_1517[] = "outer_pow (line 1517)";
1912 static const char __pyx_k_clifford_inv_line_926[] = "clifford.inv (line 926)";
1913 static const char __pyx_k_clifford_pow_line_980[] = "clifford.pow (line 980)";
1914 static const char __pyx_k_clifford_abs_line_1175[] = "clifford.abs (line 1175)";
1915 static const char __pyx_k_clifford_copy_line_556[] = "clifford.copy (line 556)";
1916 static const char __pyx_k_clifford_odd_line_1070[] = "clifford.odd (line 1070)";
1917 static const char __pyx_k_complexifier_line_1526[] = "complexifier (line 1526)";
1918 static const char __pyx_k_index_set_copy_line_65[] = "index_set.copy (line 65)";
1919 static const char __pyx_k_index_set_max_line_351[] = "index_set.max (line 351)";
1920 static const char __pyx_k_index_set_min_line_342[] = "index_set.min (line 342)";
1921 static const char __pyx_k_clifford_conj_line_1138[] = "clifford.conj (line 1138)";
1922 static const char __pyx_k_clifford_even_line_1061[] = "clifford.even (line 1061)";
1923 static const char __pyx_k_clifford_norm_line_1164[] = "clifford.norm (line 1164)";
1924 static const char __pyx_k_clifford_pure_line_1050[] = "clifford.pure (line 1050)";
1925 static const char __pyx_k_clifford_quad_line_1153[] = "clifford.quad (line 1153)";
1926 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ";
1927 static const char __pyx_k_clifford___or___line_939[] = "clifford.__or__ (line 939)";
1928 static const char __pyx_k_clifford_frame_line_1215[] = "clifford.frame (line 1215)";
1929 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1930 static const char __pyx_k_clifford_isnan_line_1206[] = "clifford.isnan (line 1206)";
1931 static const char __pyx_k_index_set_count_line_315[] = "index_set.count (line 315)";
1932 static const char __pyx_k_clifford___add___line_740[] = "clifford.__add__ (line 740)";
1933 static const char __pyx_k_clifford___and___line_836[] = "clifford.__and__ (line 836)";
1934 static const char __pyx_k_clifford___ior___line_950[] = "clifford.__ior__ (line 950)";
1935 static const char __pyx_k_clifford___mod___line_806[] = "clifford.__mod__ (line 806)";
1936 static const char __pyx_k_clifford___mul___line_780[] = "clifford.__mul__ (line 780)";
1937 static const char __pyx_k_clifford___neg___line_722[] = "clifford.__neg__ (line 722)";
1938 static const char __pyx_k_clifford___pos___line_731[] = "clifford.__pos__ (line 731)";
1939 static const char __pyx_k_clifford___pow___line_961[] = "clifford.__pow__ (line 961)";
1940 static const char __pyx_k_clifford___sub___line_760[] = "clifford.__sub__ (line 760)";
1941 static const char __pyx_k_clifford___xor___line_866[] = "clifford.__xor__ (line 866)";
1942 static const char __pyx_k_clifford_reframe_line_649[] = "clifford.reframe (line 649)";
1943 static const char __pyx_k_clifford_scalar_line_1039[] = "clifford.scalar (line 1039)";
1944 static const char __pyx_k_index_set___or___line_293[] = "index_set.__or__ (line 293)";
1945 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1946 static const char __pyx_k_random_clifford_line_1814[] = "random_clifford (line 1814)";
1947 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1948 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ";
1949 static const char __pyx_k_clifford___iadd___line_751[] = "clifford.__iadd__ (line 751)";
1950 static const char __pyx_k_clifford___iand___line_851[] = "clifford.__iand__ (line 851)";
1951 static const char __pyx_k_clifford___idiv___line_911[] = "clifford.__idiv__ (line 911)";
1952 static const char __pyx_k_clifford___imod___line_821[] = "clifford.__imod__ (line 821)";
1953 static const char __pyx_k_clifford___imul___line_793[] = "clifford.__imul__ (line 793)";
1954 static const char __pyx_k_clifford___isub___line_771[] = "clifford.__isub__ (line 771)";
1955 static const char __pyx_k_clifford___iter___line_638[] = "clifford.__iter__ (line 638)";
1956 static const char __pyx_k_clifford___ixor___line_881[] = "clifford.__ixor__ (line 881)";
1957 static const char __pyx_k_clifford___str___line_1235[] = "clifford.__str__ (line 1235)";
1958 static const char __pyx_k_clifford_max_abs_line_1184[] = "clifford.max_abs (line 1184)";
1959 static const char __pyx_k_clifford_reverse_line_1123[] = "clifford.reverse (line 1123)";
1960 static const char __pyx_k_index_set___and___line_271[] = "index_set.__and__ (line 271)";
1961 static const char __pyx_k_index_set___ior___line_304[] = "index_set.__ior__ (line 304)";
1962 static const char __pyx_k_index_set___str___line_395[] = "index_set.__str__ (line 395)";
1963 static const char __pyx_k_index_set___xor___line_249[] = "index_set.__xor__ (line 249)";
1964 static const char __pyx_k_clifford___call___line_1020[] = "clifford.__call__ (line 1020)";
1965 static const char __pyx_k_clifford___repr___line_1226[] = "clifford.__repr__ (line 1226)";
1966 static const char __pyx_k_clifford_involute_line_1107[] = "clifford.involute (line 1107)";
1967 static const char __pyx_k_index_set___iand___line_282[] = "index_set.__iand__ (line 282)";
1968 static const char __pyx_k_index_set___iter___line_229[] = "index_set.__iter__ (line 229)";
1969 static const char __pyx_k_index_set___ixor___line_260[] = "index_set.__ixor__ (line 260)";
1970 static const char __pyx_k_index_set___repr___line_384[] = "index_set.__repr__ (line 384)";
1971 static const char __pyx_k_clifford_outer_pow_line_1004[] = "clifford.outer_pow (line 1004)";
1972 static const char __pyx_k_clifford_truncated_line_1195[] = "clifford.truncated (line 1195)";
1973 static const char __pyx_k_index_set_count_neg_line_324[] = "index_set.count_neg (line 324)";
1974 static const char __pyx_k_index_set_count_pos_line_333[] = "index_set.count_pos (line 333)";
1975 static const char __pyx_k_clifford___getitem___line_707[] = "clifford.__getitem__ (line 707)";
1976 static const char __pyx_k_clifford___truediv___line_896[] = "clifford.__truediv__ (line 896)";
1977 static const char __pyx_k_index_set___invert___line_240[] = "index_set.__invert__ (line 240)";
1978 static const char __pyx_k_Abbreviation_for_index_set_q_p[] = "\n Abbreviation for index_set({-q,...p}).\n\n >>> print(istpq(2,3))\n {-3,-2,-1,1,2}\n ";
1979 static const char __pyx_k_Conjugation_reverse_o_involute[] = "\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print((clifford(\"{1}\")).conj())\n -{1}\n >>> print((clifford(\"{2}\") * clifford(\"{1}\")).conj())\n {1,2}\n >>> print((clifford(\"{1}\") * clifford(\"{2}\")).conj())\n -{1,2}\n >>> print(clifford(\"1+{1}+{1,2}\").conj())\n 1-{1}-{1,2}\n ";
1980 static const char __pyx_k_Geometric_product_x_clifford_2[] = "\n Geometric product.\n\n >>> x = clifford(2); x *= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{2}\"); print(x)\n {1,2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{1,2}\"); print(x)\n {2}\n ";
1981 static const char __pyx_k_Geometric_sum_print_clifford_1[] = "\n Geometric sum.\n\n >>> print(clifford(1) + clifford(\"{2}\"))\n 1+{2}\n >>> print(clifford(\"{1}\") + clifford(\"{2}\"))\n {1}+{2}\n ";
1982 static const char __pyx_k_Hyperbolic_sine_of_multivector[] = "\n Hyperbolic sine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/2; print(sinh(x))\n {1,2}\n >>> x=clifford(\"{1,2}\") * pi/6; print(sinh(x))\n 0.5{1,2}\n ";
1983 static const char __pyx_k_Inner_product_print_clifford_1[] = "\n Inner product.\n\n >>> print(clifford(\"{1}\") & clifford(\"{2}\"))\n 0\n >>> print(clifford(2) & clifford(\"{2}\"))\n 0\n >>> print(clifford(\"{1}\") & clifford(\"{1}\"))\n 1\n >>> print(clifford(\"{1}\") & clifford(\"{1,2}\"))\n {2}\n ";
1984 static const char __pyx_k_Inverse_tangent_of_multivector[] = "\n Inverse tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1}\"); print(tan(atan(x,s),s))\n {1}\n >>> x=clifford(\"{1}\"); print(tan(atan(x)))\n {1}\n ";
1985 static const char __pyx_k_Iterate_over_the_indices_of_an[] = "\n Iterate over the indices of an index_set.\n\n >>> for i in index_set({-3,4,7}):print(i, end=\",\")\n -3,4,7,\n ";
1986 static const char __pyx_k_Maximum_member_index_set_1_1_2[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
1987 static const char __pyx_k_Maximum_positive_index_or_0_if[] = "\n Maximum positive index, or 0 if none.\n\n >>> max_pos(index_set({1,2}))\n 2\n ";
1988 static const char __pyx_k_Minimum_member_index_set_1_1_2[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
1989 static const char __pyx_k_Minimum_negative_index_or_0_if[] = "\n Minimum negative index, or 0 if none.\n\n >>> min_neg(index_set({1,2}))\n 0\n ";
1990 static const char __pyx_k_Odd_part_of_multivector_sum_of[] = "\n Odd part of multivector, sum of odd grade terms.\n\n >>> print(clifford(\"1+{1}+{1,2}\").odd())\n {1}\n ";
1991 static const char __pyx_k_Outer_product_power_x_clifford[] = "\n Outer product power.\n\n >>> x=clifford(\"2+{1}\"); print(x.outer_pow(0))\n 1\n >>> x=clifford(\"2+{1}\"); print(x.outer_pow(1))\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(x.outer_pow(2))\n 4+4{1}\n >>> print(clifford(\"1+{1}+{1,2}\").outer_pow(3))\n 1+3{1}+3{1,2}\n\n ";
1992 static const char __pyx_k_Outer_product_print_clifford_1[] = "\n Outer product.\n\n >>> print(clifford(\"{1}\") ^ clifford(\"{2}\"))\n {1,2}\n >>> print(clifford(2) ^ clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") ^ clifford(\"{1}\"))\n 0\n >>> print(clifford(\"{1}\") ^ clifford(\"{1,2}\"))\n 0\n ";
1993 static const char __pyx_k_Power_self_to_the_m_x_clifford[] = "\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print(x ** 2)\n 1\n >>> x=clifford(\"2\"); print(x ** 2)\n 4\n >>> x=clifford(\"2+{1}\"); print(x ** 0)\n 1\n >>> x=clifford(\"2+{1}\"); print(x ** 1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(x ** 2)\n 5+4{1}\n >>> i=clifford(\"{1,2}\"); print(exp(pi/2) * (i ** i))\n 1\n ";
1994 static const char __pyx_k_Pure_part_print_clifford_1_1_1[] = "\n Pure part.\n\n >>> print(clifford(\"1+{1}+{1,2}\").pure())\n {1}+{1,2}\n >>> print(clifford(\"{1,2}\").pure())\n {1,2}\n ";
1995 static const char __pyx_k_Quadratic_form_rev_x_x_0_print[] = "\n Quadratic form == (rev(x)*x)(0).\n\n >>> print(clifford(\"1+{1}+{1,2}\").quad())\n 3.0\n >>> print(clifford(\"1+{-1}+{1,2}+{1,2,3}\").quad())\n 2.0\n ";
1996 static const char __pyx_k_Set_complement_not_print_index[] = "\n Set complement: not.\n\n >>> print(~index_set({-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}))\n {-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32}\n ";
1997 static const char __pyx_k_Set_union_or_print_index_set_1[] = "\n Set union: or.\n\n >>> print(index_set({1}) | index_set({2}))\n {1,2}\n >>> print(index_set({1,2}) | index_set({2}))\n {1,2}\n ";
1998 static const char __pyx_k_Transform_left_hand_side_using[] = "\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print(y|x)\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print(y|exp(x))\n -{1}\n ";
1999 static const char __pyx_k_clifford_vector_part_line_1079[] = "clifford.vector_part (line 1079)";
2000 static const char __pyx_k_index_set___getitem___line_191[] = "index_set.__getitem__ (line 191)";
2001 static const char __pyx_k_index_set___setitem___line_179[] = "index_set.__setitem__ (line 179)";
2002 static const char __pyx_k_lexicographic_compare_eg_3_4_5[] = "\n \"lexicographic compare\" eg. {3,4,5} is less than {3,7,8};\n -1 if a<b, +1 if a>b, 0 if a==b.\n\n >>> compare(index_set({1,2}),index_set({-1,3}))\n -1\n >>> compare(index_set({-1,4}),index_set({-1,3}))\n 1\n ";
2003 static const char __pyx_k_Abbreviation_for_clifford_index[] = "\n Abbreviation for clifford(index_set(obj)).\n\n >>> print(e(1))\n {1}\n >>> print(e(-1))\n {-1}\n >>> print(e(0))\n 1\n ";
2004 static const char __pyx_k_Absolute_value_of_multivector_m[] = "\n Absolute value of multivector: multivector 2-norm.\n\n >>> abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
2005 static const char __pyx_k_Absolute_value_square_root_of_n[] = "\n Absolute value: square root of norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").abs()\n 2.0\n ";
2006 static const char __pyx_k_Cardinality_Number_of_indices_i[] = "\n Cardinality: Number of indices included in set.\n\n >>> index_set({-1,1,2}).count()\n 3\n ";
2007 static const char __pyx_k_Check_if_a_multivector_contains[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
2008 static const char __pyx_k_Contraction_print_clifford_1_cl[] = "\n Contraction.\n\n >>> print(clifford(\"{1}\") % clifford(\"{2}\"))\n 0\n >>> print(clifford(2) % clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") % clifford(\"{1}\"))\n 1\n >>> print(clifford(\"{1}\") % clifford(\"{1,2}\"))\n {2}\n ";
2009 static const char __pyx_k_Contraction_x_clifford_1_x_clif[] = "\n Contraction.\n\n >>> x = clifford(\"{1}\"); x %= clifford(\"{2}\"); print(x)\n 0\n >>> x = clifford(2); x %= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1}\"); print(x)\n 1\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1,2}\"); print(x)\n {2}\n ";
2010 static const char __pyx_k_Convert_CGA3_null_vector_to_Euc[] = "\n Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(agc3(cga3(x)))\n 2{1}+9{2}+{3}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(agc3(cga3(x))-x)\n 0\n ";
2011 static const char __pyx_k_Convert_CGA3_null_vector_to_sta[] = "\n Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(cga3std(cga3(x)))\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(cga3std(cga3(x))-cga3(x))\n 0\n ";
2012 static const char __pyx_k_Convert_Euclidean_3D_multivecto[] = "\n Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print(cga3(x))\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n ";
2013 static const char __pyx_k_Copy_this_clifford_object_x_cli[] = "\n Copy this clifford object.\n\n >>> x=clifford(\"1{2}\"); y=x.copy(); print(y)\n {2}\n ";
2014 static const char __pyx_k_Copy_this_index_set_object_s_in[] = "\n Copy this index_set object.\n\n >>> s=index_set(1); t=s.copy(); print(t)\n {1}\n ";
2015 static const char __pyx_k_Cosine_of_multivector_with_opti[] = "\n Cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x),\"{1,2,3}\"))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x)))\n {1,2}\n ";
2016 static const char __pyx_k_Even_part_of_multivector_sum_of[] = "\n Even part of multivector, sum of even grade terms.\n\n >>> print(clifford(\"1+{1}+{1,2}\").even())\n 1+{1,2}\n ";
2017 static const char __pyx_k_Exponential_of_multivector_x_cl[] = "\n Exponential of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print(exp(x))\n 0.7071+0.7071{1,2}\n >>> x=clifford(\"{1,2}\") * pi/2; print(exp(x))\n {1,2}\n ";
2018 static const char __pyx_k_Geometric_difference_print_clif[] = "\n Geometric difference.\n\n >>> print(clifford(1) - clifford(\"{2}\"))\n 1-{2}\n >>> print(clifford(\"{1}\") - clifford(\"{2}\"))\n {1}-{2}\n ";
2019 static const char __pyx_k_Geometric_difference_x_clifford[] = "\n Geometric difference.\n\n >>> x = clifford(1); x -= clifford(\"{2}\"); print(x)\n 1-{2}\n ";
2020 static const char __pyx_k_Geometric_multiplicative_invers[] = "\n Geometric multiplicative inverse.\n\n >>> x = clifford(\"{1}\"); print(x.inv())\n {1}\n >>> x = clifford(2); print(x.inv())\n 0.5\n >>> x = clifford(\"{1,2}\"); print(x.inv())\n -{1,2}\n ";
2021 static const char __pyx_k_Geometric_product_print_cliffor[] = "\n Geometric product.\n\n >>> print(clifford(\"{1}\") * clifford(\"{2}\"))\n {1,2}\n >>> print(clifford(2) * clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") * clifford(\"{1,2}\"))\n {2}\n ";
2022 static const char __pyx_k_Geometric_quotient_print_cliffo[] = "\n Geometric quotient.\n\n >>> print(clifford(\"{1}\") / clifford(\"{2}\"))\n {1,2}\n >>> print(clifford(2) / clifford(\"{2}\"))\n 2{2}\n >>> print(clifford(\"{1}\") / clifford(\"{1}\"))\n 1\n >>> print(clifford(\"{1}\") / clifford(\"{1,2}\"))\n -{2}\n ";
2023 static const char __pyx_k_Geometric_quotient_x_clifford_1[] = "\n Geometric quotient.\n\n >>> x = clifford(\"{1}\"); x /= clifford(\"{2}\"); print(x)\n {1,2}\n >>> x = clifford(2); x /= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1}\"); print(x)\n 1\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1,2}\"); print(x)\n -{2}\n ";
2024 static const char __pyx_k_Geometric_sum_x_clifford_1_x_cl[] = "\n Geometric sum.\n\n >>> x = clifford(1); x += clifford(\"{2}\"); print(x)\n 1+{2}\n ";
2025 static const char __pyx_k_Get_the_value_of_an_index_set_o[] = "\n Get the value of an index_set object at an index.\n\n >>> index_set({1})[1]\n True\n >>> index_set({1})[2]\n False\n >>> index_set({2})[-1]\n False\n >>> index_set({2})[1]\n False\n >>> index_set({2})[2]\n True\n >>> index_set({2})[33]\n False\n ";
2026 static const char __pyx_k_Hyperbolic_cosine_of_multivecto[] = "\n Hyperbolic cosine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi; print(cosh(x))\n -1\n >>> x=clifford(\"{1,2,3}\"); print(cosh(acosh(x)))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print(cosh(acosh(x)))\n {1,2}\n ";
2027 static const char __pyx_k_Hyperbolic_tangent_of_multivect[] = "\n Hyperbolic tangent of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print(tanh(x))\n {1,2}\n ";
2028 static const char __pyx_k_Imaginary_part_deprecated_alway[] = "\n Imaginary part: deprecated (always 0).\n\n >>> imag(clifford(\"1+{1}+{1,2}\"))\n 0.0\n >>> imag(clifford(\"{1,2}\"))\n 0.0\n ";
2029 static const char __pyx_k_Inner_product_x_clifford_1_x_cl[] = "\n Inner product.\n\n >>> x = clifford(\"{1}\"); x &= clifford(\"{2}\"); print(x)\n 0\n >>> x = clifford(2); x &= clifford(\"{2}\"); print(x)\n 0\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1}\"); print(x)\n 1\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1,2}\"); print(x)\n {2}\n ";
2030 static const char __pyx_k_Integer_power_of_multivector_ob[] = "\n Integer power of multivector: obj to the m.\n\n >>> x=clifford(\"{1}\"); print(pow(x,2))\n 1\n >>> x=clifford(\"2\"); print(pow(x,2))\n 4\n >>> x=clifford(\"2+{1}\"); print(pow(x,0))\n 1\n >>> x=clifford(\"2+{1}\"); print(pow(x,1))\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(pow(x,2))\n 5+4{1}\n >>> print(pow(clifford(\"1+{1}+{1,2}\"),3))\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\"); print(exp(pi/2) * pow(i, i))\n 1\n ";
2031 static const char __pyx_k_Inverse_cosine_of_multivector_w[] = "\n Inverse cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x),\"{1,2,3}\"))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x),\"{-1,1,2,3,4}\"))\n {1,2}\n >>> print(acos(0) / pi)\n 0.5\n >>> x=clifford(\"{1,2}\"); print(cos(acos(x)))\n {1,2}\n ";
2032 static const char __pyx_k_Inverse_hyperbolic_cosine_of_mu[] = "\n Inverse hyperbolic cosine of multivector with optional complexifier.\n\n >>> print(acosh(0,\"{-2,-1,1}\"))\n 1.571{-2,-1,1}\n >>> x=clifford(\"{1,2,3}\"); print(cosh(acosh(x,\"{-1,1,2,3,4}\")))\n {1,2,3}\n >>> print(acosh(0))\n 1.571{-1}\n >>> x=clifford(\"{1,2,3}\"); print(cosh(acosh(x)))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print(cosh(acosh(x)))\n {1,2}\n ";
2033 static const char __pyx_k_Inverse_hyperbolic_sine_of_mult[] = "\n Inverse hyperbolic sine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(asinh(x,\"{1,2,3}\") * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(asinh(x) * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\") / 2; print(asinh(x) * 6/pi)\n {1,2}\n ";
2034 static const char __pyx_k_Inverse_hyperbolic_tangent_of_m[] = "\n Inverse hyperbolic tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1,2}\"); print(tanh(atanh(x,s)))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print(tanh(atanh(x)))\n {1,2}\n ";
2035 static const char __pyx_k_Inverse_sine_of_multivector_wit[] = "\n Inverse sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),s))\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),\"{-2,-1,1}\"))\n {-1}\n >>> print(asin(1) / pi)\n 0.5\n >>> x=clifford(\"{1,2,3}\"); print(asin(sin(x)))\n {1,2,3}\n ";
2036 static const char __pyx_k_Main_involution_each_i_is_repla[] = "\n Main involution, each {i} is replaced by -{i} in each term,\n eg. clifford(\"{1}\") -> -clifford(\"{1}\").\n\n >>> print(clifford(\"{1}\").involute())\n -{1}\n >>> print((clifford(\"{2}\") * clifford(\"{1}\")).involute())\n -{1,2}\n >>> print((clifford(\"{1}\") * clifford(\"{2}\")).involute())\n {1,2}\n >>> print(clifford(\"1+{1}+{1,2}\").involute())\n 1-{1}+{1,2}\n ";
2037 static const char __pyx_k_Maximum_absolute_value_of_coord[] = "\n Maximum absolute value of coordinates multivector: multivector infinity-norm.\n\n >>> max_abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 1.0\n >>> max_abs(clifford(\"3+2{1}+{1,2}\"))\n 3.0\n\n ";
2038 static const char __pyx_k_Maximum_of_absolute_values_of_c[] = "\n Maximum of absolute values of components of multivector: multivector infinity norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").max_abs()\n 1.0\n >>> clifford(\"3+2{1}+{1,2}\").max_abs()\n 3.0\n ";
2039 static const char __pyx_k_Natural_logarithm_of_multivecto[] = "\n Natural logarithm of multivector with optional complexifier.\n\n >>> x=clifford(\"{-1}\"); print((log(x,\"{-1}\") * 2/pi))\n {-1}\n >>> x=clifford(\"{1,2}\"); print((log(x,\"{1,2,3}\") * 2/pi))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print((log(x) * 2/pi))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print((log(x,\"{1,2}\") * 2/pi))\n Traceback (most recent call last):\n ...\n RuntimeError: check_complex(val, i): i is not a valid complexifier for val\n ";
2040 static const char __pyx_k_Norm_sum_of_squares_of_coordina[] = "\n Norm == sum of squares of coordinates.\n\n >>> clifford(\"1+{1}+{1,2}\").norm()\n 3.0\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").norm()\n 4.0\n ";
2041 static const char __pyx_k_Not_applicable_for_a_in_cliffor[] = "\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})):print(a, end=\",\")\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
2042 static const char __pyx_k_Number_of_negative_indices_incl[] = "\n Number of negative indices included in set.\n\n >>> index_set({-1,1,2}).count_neg()\n 1\n ";
2043 static const char __pyx_k_Number_of_positive_indices_incl[] = "\n Number of positive indices included in set.\n\n >>> index_set({-1,1,2}).count_pos()\n 2\n ";
2044 static const char __pyx_k_Outer_product_power_of_multivec[] = "\n Outer product power of multivector.\n\n >>> print(outer_pow(clifford(\"1+{1}+{1,2}\"),3))\n 1+3{1}+3{1,2}\n ";
2045 static const char __pyx_k_Outer_product_x_clifford_1_x_cl[] = "\n Outer product.\n\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{2}\"); print(x)\n {1,2}\n >>> x = clifford(2); x ^= clifford(\"{2}\"); print(x)\n 2{2}\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1}\"); print(x)\n 0\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1,2}\"); print(x)\n 0\n ";
2046 static const char __pyx_k_Pure_grade_vector_part_print_cl[] = "\n Pure grade-vector part.\n\n >>> print(clifford(\"{1}\")(1))\n {1}\n >>> print(clifford(\"{1}\")(0))\n 0\n >>> print(clifford(\"1+{1}+{1,2}\")(0))\n 1\n >>> print(clifford(\"1+{1}+{1,2}\")(1))\n {1}\n >>> print(clifford(\"1+{1}+{1,2}\")(2))\n {1,2}\n >>> print(clifford(\"1+{1}+{1,2}\")(3))\n 0\n ";
2047 static const char __pyx_k_Pure_part_print_pure_clifford_1[] = "\n Pure part\n\n >>> print(pure(clifford(\"1+{1}+{1,2}\")))\n {1}+{1,2}\n >>> print(pure(clifford(\"{1,2}\")))\n {1,2}\n ";
2048 static const char __pyx_k_Put_self_into_a_larger_frame_co[] = "\n Put self into a larger frame, containing the union of self.frame() and index set ixt.\n This can be used to make multiplication faster, by multiplying within a common frame.\n\n >>> clifford(\"2+3{1}\").reframe(index_set({1,2,3}))\n clifford(\"2+3{1}\")\n >>> s=index_set({1,2,3});t=index_set({-3,-2,-1});x=random_clifford(s); x.reframe(t).frame() == (s|t);\n True\n ";
2049 static const char __pyx_k_Random_multivector_within_a_fra[] = "\n Random multivector within a frame.\n\n >>> print(random_clifford(index_set({-3,-1,2})).frame())\n {-3,-1,2}\n ";
2050 static const char __pyx_k_Real_part_synonym_for_scalar_pa[] = "\n Real part: synonym for scalar part.\n\n >>> real(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> real(clifford(\"{1,2}\"))\n 0.0\n ";
2051 static const char __pyx_k_Remove_all_terms_of_self_with_r[] = "\n Remove all terms of self with relative size smaller than limit.\n\n >>> clifford(\"1e8+{1}+1e-8{1,2}\").truncated(1.0e-6)\n clifford(\"100000000\")\n >>> clifford(\"1e4+{1}+1e-4{1,2}\").truncated(1.0e-6)\n clifford(\"10000+{1}\")\n ";
2052 static const char __pyx_k_Reversion_eg_1_2_2_1_print_reve[] = "\n Reversion, eg. {1}*{2} -> {2}*{1}\n\n >>> print(reverse(clifford(\"{1}\")))\n {1}\n >>> print(reverse(clifford(\"{2}\") * clifford(\"{1}\")))\n {1,2}\n >>> print(reverse(clifford(\"{1}\") * clifford(\"{2}\")))\n -{1,2}\n >>> print(reverse(clifford(\"1+{1}+{1,2}\")))\n 1+{1}-{1,2}\n ";
2053 static const char __pyx_k_Reversion_eg_clifford_1_cliffor[] = "\n Reversion, eg. clifford(\"{1}\")*clifford(\"{2}\") -> clifford(\"{2}\")*clifford(\"{1}\").\n\n >>> print(clifford(\"{1}\").reverse())\n {1}\n >>> print((clifford(\"{2}\") * clifford(\"{1}\")).reverse())\n {1,2}\n >>> print((clifford(\"{1}\") * clifford(\"{2}\")).reverse())\n -{1,2}\n >>> print(clifford(\"1+{1}+{1,2}\").reverse())\n 1+{1}-{1,2}\n ";
2054 static const char __pyx_k_Scalar_part_clifford_1_1_1_2_sc[] = "\n Scalar part.\n\n >>> clifford(\"1+{1}+{1,2}\").scalar()\n 1.0\n >>> clifford(\"{1,2}\").scalar()\n 0.0\n ";
2055 static const char __pyx_k_Scalar_part_scalar_clifford_1_1[] = "\n Scalar part.\n\n >>> scalar(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> scalar(clifford(\"{1,2}\"))\n 0.0\n ";
2056 static const char __pyx_k_Set_intersection_and_print_inde[] = "\n Set intersection: and.\n\n >>> print(index_set({1}) & index_set({2}))\n {}\n >>> print(index_set({1,2}) & index_set({2}))\n {2}\n ";
2057 static const char __pyx_k_Set_intersection_and_x_index_se[] = "\n Set intersection: and.\n\n >>> x = index_set({1}); x &= index_set({2}); print(x)\n {}\n >>> x = index_set({1,2}); x &= index_set({2}); print(x)\n {2}\n ";
2058 static const char __pyx_k_Set_the_value_of_an_index_set_o[] = "\n Set the value of an index_set object at index idx to value val.\n\n >>> s=index_set({1}); s[2] = True; print(s)\n {1,2}\n >>> s=index_set({1,2}); s[1] = False; print(s)\n {2}\n ";
2059 static const char __pyx_k_Set_union_or_x_index_set_1_x_in[] = "\n Set union: or.\n\n >>> x = index_set({1}); x |= index_set({2}); print(x)\n {1,2}\n >>> x = index_set({1,2}); x |= index_set({2}); print(x)\n {1,2}\n ";
2060 static const char __pyx_k_Sign_of_geometric_product_of_tw[] = "\n Sign of geometric product of two Clifford basis elements.\n\n >>> s = index_set({1,2}); t=index_set({-1}); s.sign_of_mult(t)\n 1\n ";
2061 static const char __pyx_k_Sign_of_geometric_square_of_a_C[] = "\n Sign of geometric square of a Clifford basis element.\n\n >>> s = index_set({1,2}); s.sign_of_square()\n -1\n ";
2062 static const char __pyx_k_Sine_of_multivector_with_option[] = "\n Sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),s))\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print(asin(sin(x,s),\"{-2,-1,1}\"))\n {-1}\n >>> x=clifford(\"{1,2,3}\"); print(asin(sin(x)))\n {1,2,3}\n ";
2063 static const char __pyx_k_Square_root_of_1_which_commutes[] = "\n Square root of -1 which commutes with all members of the frame of the given multivector.\n\n >>> print(complexifier(clifford(index_set({1}))))\n {1,2,3}\n >>> print(complexifier(clifford(index_set({-1}))))\n {-1}\n >>> print(complexifier(index_set({1})))\n {1,2,3}\n >>> print(complexifier(index_set({-1})))\n {-1}\n ";
2064 static const char __pyx_k_Square_root_of_multivector_with[] = "\n Square root of multivector with optional complexifier.\n\n >>> print(sqrt(-1))\n {-1}\n >>> print(sqrt(clifford(\"2{-1}\")))\n 1+{-1}\n >>> j=sqrt(-1,complexifier(index_set({1}))); print(j); print(j*j)\n {1,2,3}\n -1\n >>> j=sqrt(-1,\"{1,2,3}\"); print(j); print(j*j)\n {1,2,3}\n -1\n ";
2065 static const char __pyx_k_Subalgebra_generated_by_all_gen[] = "\n Subalgebra generated by all generators of terms of given multivector.\n\n >>> print(clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame())\n {-2,-1,1,2,7}\n >>> s=clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame(); type(s)\n <class 'PyClical.index_set'>\n ";
2066 static const char __pyx_k_Subscripting_map_from_index_set[] = "\n Subscripting: map from index set to scalar coordinate.\n\n >>> clifford(\"{1}\")[index_set(1)]\n 1.0\n >>> clifford(\"{1}\")[index_set({1})]\n 1.0\n >>> clifford(\"{1}\")[index_set({1,2})]\n 0.0\n >>> clifford(\"2{1,2}\")[index_set({1,2})]\n 2.0\n ";
2067 static const char __pyx_k_Symmetric_set_difference_exclus[] = "\n Symmetric set difference: exclusive or.\n\n >>> print(index_set({1}) ^ index_set({2}))\n {1,2}\n >>> print(index_set({1,2}) ^ index_set({2}))\n {1}\n ";
2068 static const char __pyx_k_Tangent_of_multivector_with_opt[] = "\n Tangent of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print(tan(x,\"{1,2,3}\"))\n 0.7616{1,2}\n >>> x=clifford(\"{1,2}\"); print(tan(x))\n 0.7616{1,2}\n ";
2069 static const char __pyx_k_Tests_for_functions_that_Doctes[] = "\n Tests for functions that Doctest cannot see.\n\n For index_set.__cinit__: Construct index_set.\n\n >>> print(index_set(1))\n {1}\n >>> print(index_set({1,2}))\n {1,2}\n >>> print(index_set(index_set({1,2})))\n {1,2}\n >>> print(index_set({1,2}))\n {1,2}\n >>> print(index_set({1,2,1}))\n {1,2}\n >>> print(index_set({1,2,1}))\n {1,2}\n >>> print(index_set(\"\"))\n {}\n >>> print(index_set(\"{\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{'.\n >>> print(index_set(\"{1\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1'.\n >>> print(index_set(\"{1,2,100}\"))\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1,2,100}'.\n >>> print(index_set({1,2,100}))\n Traceback (most recent call last):\n ...\n IndexError: Cannot initialize index_set object from invalid {1, 2, 100}.\n >>> print(index_set([1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <class '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_set({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 ";
2070  static const char __pyx_k_The_informal_string_representat[] = "\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__str__()\n '{1,2}'\n >>> str(index_set({1,2}))\n '{1,2}'\n ";
2071  static const char __pyx_k_The_official_string_representat[] = "\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__repr__()\n 'index_set({1,2})'\n >>> repr(index_set({1,2}))\n 'index_set({1,2})'\n ";
2072  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2073  static const char __pyx_k_Vector_part_of_multivector_as_a[] = "\n Vector part of multivector, as a Python list, with respect to frm.\n\n >>> print(clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part())\n [2.0, 3.0]\n >>> print(clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part(index_set({-1,1,2})))\n [0.0, 2.0, 3.0]\n ";
2074  static const char __pyx_k_index_set_sign_of_mult_line_366[] = "index_set.sign_of_mult (line 366)";
2075  static const char __pyx_k_norm_sum_of_squares_of_coordina[] = "\n norm == sum of squares of coordinates.\n\n >>> norm(clifford(\"1+{1}+{1,2}\"))\n 3.0\n >>> norm(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 4.0\n ";
2076  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2077  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2078  static const char __pyx_k_Conjugation_reverse_o_involute_2[] = "\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print(conj(clifford(\"{1}\")))\n -{1}\n >>> print(conj(clifford(\"{2}\") * clifford(\"{1}\")))\n {1,2}\n >>> print(conj(clifford(\"{1}\") * clifford(\"{2}\")))\n -{1,2}\n >>> print(conj(clifford(\"1+{1}+{1,2}\")))\n 1-{1}-{1,2}\n ";
2079  static const char __pyx_k_Odd_part_of_multivector_sum_of_2[] = "\n Odd part of multivector, sum of odd grade terms.\n\n >>> print(odd(clifford(\"1+{1}+{1,2}\")))\n {1}\n ";
2080  static const char __pyx_k_Power_self_to_the_m_x_clifford_2[] = "\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print(x.pow(2))\n 1\n >>> x=clifford(\"2\"); print(x.pow(2))\n 4\n >>> x=clifford(\"2+{1}\"); print(x.pow(0))\n 1\n >>> x=clifford(\"2+{1}\"); print(x.pow(1))\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print(x.pow(2))\n 5+4{1}\n >>> print(clifford(\"1+{1}+{1,2}\").pow(3))\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\"); print(exp(pi/2) * i.pow(i))\n 1\n ";
2081  static const char __pyx_k_Quadratic_form_rev_x_x_0_print_2[] = "\n Quadratic form == (rev(x)*x)(0).\n\n >>> print(quad(clifford(\"1+{1}+{1,2}\")))\n 3.0\n >>> print(quad(clifford(\"1+{-1}+{1,2}+{1,2,3}\")))\n 2.0\n ";
2082  static const char __pyx_k_Transform_left_hand_side_using_2[] = "\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=x; print(y)\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=exp(x); print(y)\n -{1}\n ";
2083  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1244)";
2084  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 406)";
2085  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 375)";
2086  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2087  static const char __pyx_k_Even_part_of_multivector_sum_of_2[] = "\n Even part of multivector, sum of even grade terms.\n\n >>> print(even(clifford(\"1+{1}+{1,2}\")))\n 1+{1,2}\n ";
2088  static const char __pyx_k_Geometric_multiplicative_invers_2[] = "\n Geometric multiplicative inverse.\n\n >>> print(inv(clifford(\"{1}\")))\n {1}\n >>> print(inv(clifford(\"{-1}\")))\n -{-1}\n >>> print(inv(clifford(\"{-2,-1}\")))\n -{-2,-1}\n >>> print(inv(clifford(\"{-1}+{1}\")))\n nan\n ";
2089  static const char __pyx_k_Main_involution_each_i_is_repla_2[] = "\n Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})\n\n >>> print(involute(clifford(\"{1}\")))\n -{1}\n >>> print(involute(clifford(\"{2}\") * clifford(\"{1}\")))\n -{1,2}\n >>> print(involute(clifford(\"{1}\") * clifford(\"{2}\")))\n {1,2}\n >>> print(involute(clifford(\"1+{1}+{1,2}\")))\n 1-{1}+{1,2}\n ";
2090  static const char __pyx_k_Symmetric_set_difference_exclus_2[] = "\n Symmetric set difference: exclusive or.\n\n >>> x = index_set({1}); x ^= index_set({2}); print(x)\n {1,2}\n >>> x = index_set({1,2}); x ^= index_set({2}); print(x)\n {1}\n ";
2091  static const char __pyx_k_Tests_for_functions_that_Doctes_2[] = "\n Tests for functions that Doctest cannot see.\n\n For clifford.__cinit__: Construct an object of type clifford.\n\n >>> print(clifford(2))\n 2\n >>> print(clifford(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 <class 'list'>.\n >>> print(clifford(None))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <class 'NoneType'>.\n >>> print(clifford(None,[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'NoneType'>, <class 'list'>).\n >>> print(clifford([1,2],[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'list'>, <class '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 fro""m 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 ";
2092  static const char __pyx_k_The_informal_string_representat_2[] = "\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__str__()\n '1+3{-1}+2{1,2}+4{-2,7}'\n ";
2093  static const char __pyx_k_The_official_string_representat_2[] = "\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__repr__()\n 'clifford(\"1+3{-1}+2{1,2}+4{-2,7}\")'\n ";
2094  static PyObject *__pyx_kp_u_;
2095  static PyObject *__pyx_kp_u_0_8_4;
2096  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2097  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2098  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2099  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2100  static PyObject *__pyx_kp_u_Cannot_initialize_clifford_objec;
2101  static PyObject *__pyx_kp_u_Cannot_initialize_index_set_obje;
2102  static PyObject *__pyx_kp_u_Cannot_reframe;
2103  static PyObject *__pyx_kp_u_Cannot_take_vector_part_of;
2104  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2105  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2106  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2107  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2108  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2109  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2110  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2111  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2112  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2113  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2114  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2115  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2116  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2117  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2118  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2119  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2120  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2121  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2122  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2123  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2124  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2125  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2126  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2127  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2128  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2129  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2130  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2131  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2132  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2133  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2134  static PyObject *__pyx_n_s_IndexError;
2135  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2136  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2137  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2138  static PyObject *__pyx_n_s_Integral;
2139  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2140  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2141  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2142  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2143  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2144  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2145  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2146  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2147  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2148  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2149  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2150  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2151  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2152  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2153  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2154  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2155  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2156  static PyObject *__pyx_n_s_NotImplemented;
2157  static PyObject *__pyx_kp_u_Not_applicable;
2158  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2159  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2160  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2161  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2162  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2163  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2164  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2165  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2166  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2167  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2168  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2169  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2170  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2171  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2172  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2173  static PyObject *__pyx_n_s_PyClical;
2174  static PyObject *__pyx_kp_s_PyClical_pyx;
2175  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2176  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2177  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2178  static PyObject *__pyx_n_s_Real;
2179  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2180  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2181  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2182  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2183  static PyObject *__pyx_n_s_RuntimeError;
2184  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2185  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2186  static PyObject *__pyx_n_s_Sequence;
2187  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2188  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2189  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2190  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2191  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2192  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2193  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2194  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2195  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2196  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2197  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2198  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2199  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2200  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2201  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2202  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2203  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2204  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2205  static PyObject *__pyx_kp_u_The_informal_string_representat;
2206  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2207  static PyObject *__pyx_kp_u_The_official_string_representat;
2208  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2209  static PyObject *__pyx_kp_u_This_comparison_operator_is_not;
2210  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2211  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2212  static PyObject *__pyx_n_s_TypeError;
2213  static PyObject *__pyx_kp_u_UTF_8;
2214  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2215  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2216  static PyObject *__pyx_n_s_ValueError;
2217  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2218  static PyObject *__pyx_kp_u__2;
2219  static PyObject *__pyx_kp_u__5;
2220  static PyObject *__pyx_kp_u__6;
2221  static PyObject *__pyx_kp_u__7;
2222  static PyObject *__pyx_kp_u__8;
2223  static PyObject *__pyx_kp_u__9;
2224  static PyObject *__pyx_n_s_abc;
2225  static PyObject *__pyx_kp_u_abs_line_1472;
2226  static PyObject *__pyx_n_s_acos;
2227  static PyObject *__pyx_kp_u_acos_line_1618;
2228  static PyObject *__pyx_n_s_acosh;
2229  static PyObject *__pyx_kp_u_acosh_line_1655;
2230  static PyObject *__pyx_kp_u_agc3_line_1843;
2231  static PyObject *__pyx_n_s_args;
2232  static PyObject *__pyx_kp_u_as_frame;
2233  static PyObject *__pyx_n_s_asin;
2234  static PyObject *__pyx_kp_u_asin_line_1697;
2235  static PyObject *__pyx_n_s_asinh;
2236  static PyObject *__pyx_kp_u_asinh_line_1732;
2237  static PyObject *__pyx_n_s_atan;
2238  static PyObject *__pyx_kp_u_atan_line_1768;
2239  static PyObject *__pyx_n_s_atanh;
2240  static PyObject *__pyx_kp_u_atanh_line_1797;
2241  static PyObject *__pyx_kp_u_cga3_line_1823;
2242  static PyObject *__pyx_kp_u_cga3std_line_1832;
2243  static PyObject *__pyx_n_s_cl;
2244  static PyObject *__pyx_n_s_clifford;
2245  static PyObject *__pyx_kp_u_clifford___add___line_740;
2246  static PyObject *__pyx_kp_u_clifford___and___line_836;
2247  static PyObject *__pyx_kp_u_clifford___call___line_1020;
2248  static PyObject *__pyx_kp_u_clifford___getitem___line_707;
2249  static PyObject *__pyx_kp_u_clifford___iadd___line_751;
2250  static PyObject *__pyx_kp_u_clifford___iand___line_851;
2251  static PyObject *__pyx_kp_u_clifford___idiv___line_911;
2252  static PyObject *__pyx_kp_u_clifford___imod___line_821;
2253  static PyObject *__pyx_kp_u_clifford___imul___line_793;
2254  static PyObject *__pyx_kp_u_clifford___ior___line_950;
2255  static PyObject *__pyx_kp_u_clifford___isub___line_771;
2256  static PyObject *__pyx_kp_u_clifford___iter___line_638;
2257  static PyObject *__pyx_kp_u_clifford___ixor___line_881;
2258  static PyObject *__pyx_kp_u_clifford___mod___line_806;
2259  static PyObject *__pyx_kp_u_clifford___mul___line_780;
2260  static PyObject *__pyx_kp_u_clifford___neg___line_722;
2261  static PyObject *__pyx_kp_u_clifford___or___line_939;
2262  static PyObject *__pyx_kp_u_clifford___pos___line_731;
2263  static PyObject *__pyx_kp_u_clifford___pow___line_961;
2264  static PyObject *__pyx_kp_u_clifford___repr___line_1226;
2265  static PyObject *__pyx_kp_u_clifford___str___line_1235;
2266  static PyObject *__pyx_kp_u_clifford___sub___line_760;
2267  static PyObject *__pyx_kp_u_clifford___truediv___line_896;
2268  static PyObject *__pyx_kp_u_clifford___xor___line_866;
2269  static PyObject *__pyx_kp_u_clifford_abs_line_1175;
2270  static PyObject *__pyx_kp_u_clifford_conj_line_1138;
2271  static PyObject *__pyx_kp_u_clifford_copy_line_556;
2272  static PyObject *__pyx_kp_u_clifford_even_line_1061;
2273  static PyObject *__pyx_kp_u_clifford_frame_line_1215;
2274  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2275  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2276  static PyObject *__pyx_kp_u_clifford_inv_line_926;
2277  static PyObject *__pyx_kp_u_clifford_involute_line_1107;
2278  static PyObject *__pyx_kp_u_clifford_isnan_line_1206;
2279  static PyObject *__pyx_kp_u_clifford_max_abs_line_1184;
2280  static PyObject *__pyx_kp_u_clifford_norm_line_1164;
2281  static PyObject *__pyx_kp_u_clifford_odd_line_1070;
2282  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1004;
2283  static PyObject *__pyx_kp_u_clifford_pow_line_980;
2284  static PyObject *__pyx_kp_u_clifford_pure_line_1050;
2285  static PyObject *__pyx_kp_u_clifford_quad_line_1153;
2286  static PyObject *__pyx_kp_u_clifford_reframe_line_649;
2287  static PyObject *__pyx_kp_u_clifford_reverse_line_1123;
2288  static PyObject *__pyx_kp_u_clifford_scalar_line_1039;
2289  static PyObject *__pyx_kp_u_clifford_truncated_line_1195;
2290  static PyObject *__pyx_kp_u_clifford_vector_part_line_1079;
2291  static PyObject *__pyx_n_s_cline_in_traceback;
2292  static PyObject *__pyx_n_s_close;
2293  static PyObject *__pyx_n_s_collections;
2294  static PyObject *__pyx_kp_u_compare_line_492;
2295  static PyObject *__pyx_kp_u_complexifier_line_1526;
2296  static PyObject *__pyx_n_s_conj;
2297  static PyObject *__pyx_kp_u_conj_line_1435;
2298  static PyObject *__pyx_n_s_copy;
2299  static PyObject *__pyx_n_s_cos;
2300  static PyObject *__pyx_kp_u_cos_line_1601;
2301  static PyObject *__pyx_n_s_cosh;
2302  static PyObject *__pyx_kp_u_cosh_line_1639;
2303  static PyObject *__pyx_n_s_doctest;
2304  static PyObject *__pyx_n_s_e;
2305  static PyObject *__pyx_kp_u_e_line_1886;
2306  static PyObject *__pyx_n_s_encode;
2307  static PyObject *__pyx_n_s_even;
2308  static PyObject *__pyx_kp_u_even_line_1387;
2309  static PyObject *__pyx_n_s_exp;
2310  static PyObject *__pyx_kp_u_exp_line_1564;
2311  static PyObject *__pyx_n_s_fill;
2312  static PyObject *__pyx_n_s_frm;
2313  static PyObject *__pyx_kp_u_from;
2314  static PyObject *__pyx_n_s_getstate;
2315  static PyObject *__pyx_n_s_grade;
2316  static PyObject *__pyx_n_s_i;
2317  static PyObject *__pyx_kp_u_imag_line_1365;
2318  static PyObject *__pyx_n_s_import;
2319  static PyObject *__pyx_n_s_index_set;
2320  static PyObject *__pyx_kp_u_index_set___and___line_271;
2321  static PyObject *__pyx_kp_u_index_set___getitem___line_191;
2322  static PyObject *__pyx_kp_u_index_set___iand___line_282;
2323  static PyObject *__pyx_kp_u_index_set___invert___line_240;
2324  static PyObject *__pyx_kp_u_index_set___ior___line_304;
2325  static PyObject *__pyx_n_s_index_set___iter;
2326  static PyObject *__pyx_kp_u_index_set___iter___line_229;
2327  static PyObject *__pyx_kp_u_index_set___ixor___line_260;
2328  static PyObject *__pyx_kp_u_index_set___or___line_293;
2329  static PyObject *__pyx_kp_u_index_set___repr___line_384;
2330  static PyObject *__pyx_kp_u_index_set___setitem___line_179;
2331  static PyObject *__pyx_kp_u_index_set___str___line_395;
2332  static PyObject *__pyx_kp_u_index_set___xor___line_249;
2333  static PyObject *__pyx_kp_u_index_set_copy_line_65;
2334  static PyObject *__pyx_kp_u_index_set_count_line_315;
2335  static PyObject *__pyx_kp_u_index_set_count_neg_line_324;
2336  static PyObject *__pyx_kp_u_index_set_count_pos_line_333;
2337  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2338  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2339  static PyObject *__pyx_kp_u_index_set_max_line_351;
2340  static PyObject *__pyx_kp_u_index_set_min_line_342;
2341  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_366;
2342  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2343  static PyObject *__pyx_n_s_inv;
2344  static PyObject *__pyx_kp_u_inv_line_1328;
2345  static PyObject *__pyx_kp_u_invalid;
2346  static PyObject *__pyx_kp_u_invalid_string;
2347  static PyObject *__pyx_n_s_involute;
2348  static PyObject *__pyx_kp_u_involute_line_1405;
2349  static PyObject *__pyx_n_s_ist;
2350  static PyObject *__pyx_n_s_istpq;
2351  static PyObject *__pyx_kp_u_istpq_line_1899;
2352  static PyObject *__pyx_n_s_iter;
2353  static PyObject *__pyx_n_s_ixt;
2354  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2355  static PyObject *__pyx_n_s_lhs;
2356  static PyObject *__pyx_n_s_log;
2357  static PyObject *__pyx_kp_u_log_line_1578;
2358  static PyObject *__pyx_n_s_m;
2359  static PyObject *__pyx_n_s_main;
2360  static PyObject *__pyx_n_u_main;
2361  static PyObject *__pyx_n_s_math;
2362  static PyObject *__pyx_n_s_max;
2363  static PyObject *__pyx_kp_u_max_abs_line_1481;
2364  static PyObject *__pyx_kp_u_max_pos_line_513;
2365  static PyObject *__pyx_n_s_min;
2366  static PyObject *__pyx_kp_u_min_neg_line_504;
2367  static PyObject *__pyx_n_s_name;
2368  static PyObject *__pyx_n_s_nbar3;
2369  static PyObject *__pyx_n_s_ninf3;
2370  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2371  static PyObject *__pyx_n_s_norm;
2372  static PyObject *__pyx_kp_u_norm_line_1461;
2373  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2374  static PyObject *__pyx_n_s_numbers;
2375  static PyObject *__pyx_n_s_obj;
2376  static PyObject *__pyx_n_s_odd;
2377  static PyObject *__pyx_kp_u_odd_line_1396;
2378  static PyObject *__pyx_n_s_other;
2379  static PyObject *__pyx_n_s_outer_pow;
2380  static PyObject *__pyx_kp_u_outer_pow_line_1517;
2381  static PyObject *__pyx_n_s_p;
2382  static PyObject *__pyx_n_s_pi;
2383  static PyObject *__pyx_n_s_pow;
2384  static PyObject *__pyx_kp_u_pow_line_1493;
2385  static PyObject *__pyx_n_s_pure;
2386  static PyObject *__pyx_kp_u_pure_line_1376;
2387  static PyObject *__pyx_n_s_pyx_vtable;
2388  static PyObject *__pyx_n_s_q;
2389  static PyObject *__pyx_n_s_quad;
2390  static PyObject *__pyx_kp_u_quad_line_1450;
2391  static PyObject *__pyx_kp_u_random_clifford_line_1814;
2392  static PyObject *__pyx_n_s_range;
2393  static PyObject *__pyx_kp_u_real_line_1354;
2394  static PyObject *__pyx_n_s_reduce;
2395  static PyObject *__pyx_n_s_reduce_cython;
2396  static PyObject *__pyx_n_s_reduce_ex;
2397  static PyObject *__pyx_n_s_reverse;
2398  static PyObject *__pyx_kp_u_reverse_line_1420;
2399  static PyObject *__pyx_n_s_rhs;
2400  static PyObject *__pyx_n_s_scalar;
2401  static PyObject *__pyx_n_s_scalar_epsilon;
2402  static PyObject *__pyx_kp_u_scalar_line_1343;
2403  static PyObject *__pyx_n_s_send;
2404  static PyObject *__pyx_n_s_setstate;
2405  static PyObject *__pyx_n_s_setstate_cython;
2406  static PyObject *__pyx_n_s_sin;
2407  static PyObject *__pyx_kp_u_sin_line_1678;
2408  static PyObject *__pyx_n_s_sinh;
2409  static PyObject *__pyx_kp_u_sinh_line_1718;
2410  static PyObject *__pyx_n_s_sqrt;
2411  static PyObject *__pyx_kp_u_sqrt_line_1541;
2412  static PyObject *__pyx_n_s_tan;
2413  static PyObject *__pyx_kp_u_tan_line_1751;
2414  static PyObject *__pyx_n_s_tanh;
2415  static PyObject *__pyx_kp_u_tanh_line_1785;
2416  static PyObject *__pyx_n_s_tau;
2417  static PyObject *__pyx_n_s_test;
2418  static PyObject *__pyx_n_s_test_2;
2419  static PyObject *__pyx_n_s_testmod;
2420  static PyObject *__pyx_n_s_throw;
2421  static PyObject *__pyx_kp_u_to_frame;
2422  static PyObject *__pyx_kp_u_using;
2423  static PyObject *__pyx_kp_u_using_invalid;
2424  static PyObject *__pyx_kp_u_value;
2425  static PyObject *__pyx_n_s_version;
2426  static PyObject *__pyx_n_s_xrange;
2427 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2428 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2429 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2430 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2431 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 */
2432 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2433 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2434 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2435 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2436 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2437 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2438 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2439 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2440 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2441 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2442 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2443 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2444 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2445 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2446 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2447 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2448 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2449 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2450 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2451 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2452 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2453 static PyObject *__pyx_pf_8PyClical_9index_set_53__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2454 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2455 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2456 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2457 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2458 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2459 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 */
2460 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2461 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 */
2462 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2463 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2464 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2465 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2466 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2467 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2468 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2469 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2470 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2471 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2472 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2473 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2474 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2475 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2476 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2477 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2478 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2479 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2480 static PyObject *__pyx_pf_8PyClical_8clifford_44__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2481 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2482 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2483 #endif
2484 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2485 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2486 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2487 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2488 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2489 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2490 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2491 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2492 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2493 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2494 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2495 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2496 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2497 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2498 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2499 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2500 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2501 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2502 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2503 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2504 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2505 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2506 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2507 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2508 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2509 static PyObject *__pyx_pf_8PyClical_8clifford_98__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2510 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2511 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2512 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2513 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2514 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2515 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2516 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2517 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2518 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2519 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2520 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2521 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2522 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2523 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2524 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2525 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2526 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2527 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2528 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2529 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2530 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2531 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2532 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2533 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2534 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2535 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2536 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2537 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2538 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2539 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2540 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2541 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2542 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2543 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 */
2544 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2545 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2546 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2547 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2548 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2549 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2550 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2551 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2552 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2553 static PyObject *__pyx_float_0_0;
2554 static PyObject *__pyx_float_1_0;
2555 static PyObject *__pyx_float_4_0;
2556 static PyObject *__pyx_float_8_0;
2557 static PyObject *__pyx_int_0;
2558 static PyObject *__pyx_int_1;
2559 static PyObject *__pyx_int_4;
2560 static PyObject *__pyx_int_neg_1;
2561 static PyObject *__pyx_tuple__3;
2562 static PyObject *__pyx_tuple__4;
2563 static PyObject *__pyx_tuple__10;
2564 static PyObject *__pyx_tuple__11;
2565 static PyObject *__pyx_tuple__12;
2566 static PyObject *__pyx_tuple__15;
2567 static PyObject *__pyx_tuple__16;
2568 static PyObject *__pyx_tuple__18;
2569 static PyObject *__pyx_tuple__20;
2570 static PyObject *__pyx_tuple__21;
2571 static PyObject *__pyx_tuple__22;
2572 static PyObject *__pyx_codeobj__13;
2573 static PyObject *__pyx_codeobj__14;
2574 static PyObject *__pyx_codeobj__17;
2575 static PyObject *__pyx_codeobj__19;
2576 static PyObject *__pyx_codeobj__23;
2577 /* Late includes */
2578 
2579 /* "PyClical.pyx":40
2580  * cdef class index_set
2581  *
2582  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2583  * """
2584  * Return the C++ IndexSet instance wrapped by index_set(obj).
2585  */
2586 
2587 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2588  IndexSet __pyx_r;
2589  __Pyx_RefNannyDeclarations
2590  PyObject *__pyx_t_1 = NULL;
2591  __Pyx_RefNannySetupContext("toIndexSet", 0);
2592 
2593  /* "PyClical.pyx":44
2594  * Return the C++ IndexSet instance wrapped by index_set(obj).
2595  * """
2596  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2597  *
2598  * cdef class index_set:
2599  */
2600  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
2601  __Pyx_GOTREF(__pyx_t_1);
2602  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2603  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2604  goto __pyx_L0;
2605 
2606  /* "PyClical.pyx":40
2607  * cdef class index_set
2608  *
2609  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2610  * """
2611  * Return the C++ IndexSet instance wrapped by index_set(obj).
2612  */
2613 
2614  /* function exit code */
2615  __pyx_L1_error:;
2616  __Pyx_XDECREF(__pyx_t_1);
2617  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2618  __Pyx_pretend_to_initialize(&__pyx_r);
2619  __pyx_L0:;
2620  __Pyx_RefNannyFinishContext();
2621  return __pyx_r;
2622 }
2623 
2624 /* "PyClical.pyx":52
2625  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2626  *
2627  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2628  * """
2629  * Wrap an instance of the C++ class IndexSet.
2630  */
2631 
2632 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2633  PyObject *__pyx_r = NULL;
2634  __Pyx_RefNannyDeclarations
2635  __Pyx_RefNannySetupContext("wrap", 0);
2636 
2637  /* "PyClical.pyx":56
2638  * Wrap an instance of the C++ class IndexSet.
2639  * """
2640  * self.instance[0] = other # <<<<<<<<<<<<<<
2641  * return self
2642  *
2643  */
2644  (__pyx_v_self->instance[0]) = __pyx_v_other;
2645 
2646  /* "PyClical.pyx":57
2647  * """
2648  * self.instance[0] = other
2649  * return self # <<<<<<<<<<<<<<
2650  *
2651  * cdef inline IndexSet unwrap(index_set self):
2652  */
2653  __Pyx_XDECREF(__pyx_r);
2654  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2655  __pyx_r = ((PyObject *)__pyx_v_self);
2656  goto __pyx_L0;
2657 
2658  /* "PyClical.pyx":52
2659  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2660  *
2661  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2662  * """
2663  * Wrap an instance of the C++ class IndexSet.
2664  */
2665 
2666  /* function exit code */
2667  __pyx_L0:;
2668  __Pyx_XGIVEREF(__pyx_r);
2669  __Pyx_RefNannyFinishContext();
2670  return __pyx_r;
2671 }
2672 
2673 /* "PyClical.pyx":59
2674  * return self
2675  *
2676  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2677  * """
2678  * Return the wrapped C++ IndexSet instance.
2679  */
2680 
2681 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2682  IndexSet __pyx_r;
2683  __Pyx_RefNannyDeclarations
2684  __Pyx_RefNannySetupContext("unwrap", 0);
2685 
2686  /* "PyClical.pyx":63
2687  * Return the wrapped C++ IndexSet instance.
2688  * """
2689  * return self.instance[0] # <<<<<<<<<<<<<<
2690  *
2691  * cpdef copy(index_set self):
2692  */
2693  __pyx_r = (__pyx_v_self->instance[0]);
2694  goto __pyx_L0;
2695 
2696  /* "PyClical.pyx":59
2697  * return self
2698  *
2699  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2700  * """
2701  * Return the wrapped C++ IndexSet instance.
2702  */
2703 
2704  /* function exit code */
2705  __pyx_L0:;
2706  __Pyx_RefNannyFinishContext();
2707  return __pyx_r;
2708 }
2709 
2710 /* "PyClical.pyx":65
2711  * return self.instance[0]
2712  *
2713  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2714  * """
2715  * Copy this index_set object.
2716  */
2717 
2718 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2719 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2720  PyObject *__pyx_r = NULL;
2721  __Pyx_RefNannyDeclarations
2722  PyObject *__pyx_t_1 = NULL;
2723  PyObject *__pyx_t_2 = NULL;
2724  PyObject *__pyx_t_3 = NULL;
2725  PyObject *__pyx_t_4 = NULL;
2726  __Pyx_RefNannySetupContext("copy", 0);
2727  /* Check if called by wrapper */
2728  if (unlikely(__pyx_skip_dispatch)) ;
2729  /* Check if overridden in Python */
2730  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
2731  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2732  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2733  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2734  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2735  #endif
2736  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
2737  __Pyx_GOTREF(__pyx_t_1);
2738  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2739  __Pyx_XDECREF(__pyx_r);
2740  __Pyx_INCREF(__pyx_t_1);
2741  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2742  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2743  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2744  if (likely(__pyx_t_4)) {
2745  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2746  __Pyx_INCREF(__pyx_t_4);
2747  __Pyx_INCREF(function);
2748  __Pyx_DECREF_SET(__pyx_t_3, function);
2749  }
2750  }
2751  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2752  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2753  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
2754  __Pyx_GOTREF(__pyx_t_2);
2755  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2756  __pyx_r = __pyx_t_2;
2757  __pyx_t_2 = 0;
2758  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2759  goto __pyx_L0;
2760  }
2761  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2762  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2763  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2764  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2765  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2766  }
2767  #endif
2768  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2769  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2770  }
2771  #endif
2772  }
2773 
2774  /* "PyClical.pyx":72
2775  * {1}
2776  * """
2777  * return index_set(self) # <<<<<<<<<<<<<<
2778  *
2779  * def __cinit__(self, other = 0):
2780  */
2781  __Pyx_XDECREF(__pyx_r);
2782  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
2783  __Pyx_GOTREF(__pyx_t_1);
2784  __pyx_r = __pyx_t_1;
2785  __pyx_t_1 = 0;
2786  goto __pyx_L0;
2787 
2788  /* "PyClical.pyx":65
2789  * return self.instance[0]
2790  *
2791  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2792  * """
2793  * Copy this index_set object.
2794  */
2795 
2796  /* function exit code */
2797  __pyx_L1_error:;
2798  __Pyx_XDECREF(__pyx_t_1);
2799  __Pyx_XDECREF(__pyx_t_2);
2800  __Pyx_XDECREF(__pyx_t_3);
2801  __Pyx_XDECREF(__pyx_t_4);
2802  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2803  __pyx_r = 0;
2804  __pyx_L0:;
2805  __Pyx_XGIVEREF(__pyx_r);
2806  __Pyx_RefNannyFinishContext();
2807  return __pyx_r;
2808 }
2809 
2810 /* Python wrapper */
2811 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2812 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 ";
2813 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2814  PyObject *__pyx_r = 0;
2815  __Pyx_RefNannyDeclarations
2816  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2817  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2818 
2819  /* function exit code */
2820  __Pyx_RefNannyFinishContext();
2821  return __pyx_r;
2822 }
2823 
2824 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2825  PyObject *__pyx_r = NULL;
2826  __Pyx_RefNannyDeclarations
2827  PyObject *__pyx_t_1 = NULL;
2828  __Pyx_RefNannySetupContext("copy", 0);
2829  __Pyx_XDECREF(__pyx_r);
2830  __pyx_t_1 = __pyx_f_8PyClical_9index_set_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
2831  __Pyx_GOTREF(__pyx_t_1);
2832  __pyx_r = __pyx_t_1;
2833  __pyx_t_1 = 0;
2834  goto __pyx_L0;
2835 
2836  /* function exit code */
2837  __pyx_L1_error:;
2838  __Pyx_XDECREF(__pyx_t_1);
2839  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2840  __pyx_r = NULL;
2841  __pyx_L0:;
2842  __Pyx_XGIVEREF(__pyx_r);
2843  __Pyx_RefNannyFinishContext();
2844  return __pyx_r;
2845 }
2846 
2847 /* "PyClical.pyx":74
2848  * return index_set(self)
2849  *
2850  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2851  * """
2852  * Construct an object of type index_set.
2853  */
2854 
2855 /* Python wrapper */
2856 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2857 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2858  PyObject *__pyx_v_other = 0;
2859  int __pyx_r;
2860  __Pyx_RefNannyDeclarations
2861  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2862  {
2863  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2864  PyObject* values[1] = {0};
2865  values[0] = ((PyObject *)__pyx_int_0);
2866  if (unlikely(__pyx_kwds)) {
2867  Py_ssize_t kw_args;
2868  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2869  switch (pos_args) {
2870  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2871  CYTHON_FALLTHROUGH;
2872  case 0: break;
2873  default: goto __pyx_L5_argtuple_error;
2874  }
2875  kw_args = PyDict_Size(__pyx_kwds);
2876  switch (pos_args) {
2877  case 0:
2878  if (kw_args > 0) {
2879  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2880  if (value) { values[0] = value; kw_args--; }
2881  }
2882  }
2883  if (unlikely(kw_args > 0)) {
2884  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 74, __pyx_L3_error)
2885  }
2886  } else {
2887  switch (PyTuple_GET_SIZE(__pyx_args)) {
2888  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2889  CYTHON_FALLTHROUGH;
2890  case 0: break;
2891  default: goto __pyx_L5_argtuple_error;
2892  }
2893  }
2894  __pyx_v_other = values[0];
2895  }
2896  goto __pyx_L4_argument_unpacking_done;
2897  __pyx_L5_argtuple_error:;
2898  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 74, __pyx_L3_error)
2899  __pyx_L3_error:;
2900  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2901  __Pyx_RefNannyFinishContext();
2902  return -1;
2903  __pyx_L4_argument_unpacking_done:;
2904  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2905 
2906  /* function exit code */
2907  __Pyx_RefNannyFinishContext();
2908  return __pyx_r;
2909 }
2910 
2911 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2912  PyObject *__pyx_v_error_msg_prefix = NULL;
2913  PyObject *__pyx_v_idx = NULL;
2914  PyObject *__pyx_v_bother = NULL;
2915  int __pyx_r;
2916  __Pyx_RefNannyDeclarations
2917  int __pyx_t_1;
2918  int __pyx_t_2;
2919  IndexSet *__pyx_t_3;
2920  PyObject *__pyx_t_4 = NULL;
2921  PyObject *__pyx_t_5 = NULL;
2922  int __pyx_t_6;
2923  int __pyx_t_7;
2924  PyObject *__pyx_t_8 = NULL;
2925  PyObject *__pyx_t_9 = NULL;
2926  PyObject *__pyx_t_10 = NULL;
2927  Py_ssize_t __pyx_t_11;
2928  PyObject *(*__pyx_t_12)(PyObject *);
2929  PyObject *__pyx_t_13 = NULL;
2930  PyObject *__pyx_t_14 = NULL;
2931  PyObject *__pyx_t_15 = NULL;
2932  PyObject *__pyx_t_16 = NULL;
2933  char *__pyx_t_17;
2934  __Pyx_RefNannySetupContext("__cinit__", 0);
2935 
2936  /* "PyClical.pyx":93
2937  * {}
2938  * """
2939  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2940  * if isinstance(other, index_set):
2941  * self.instance = new IndexSet((<index_set>other).unwrap())
2942  */
2943  __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_index_set_obje);
2944  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_index_set_obje;
2945 
2946  /* "PyClical.pyx":94
2947  * """
2948  * error_msg_prefix = "Cannot initialize index_set object from"
2949  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2950  * self.instance = new IndexSet((<index_set>other).unwrap())
2951  * elif isinstance(other, numbers.Integral):
2952  */
2953  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2954  __pyx_t_2 = (__pyx_t_1 != 0);
2955  if (__pyx_t_2) {
2956 
2957  /* "PyClical.pyx":95
2958  * error_msg_prefix = "Cannot initialize index_set object from"
2959  * if isinstance(other, index_set):
2960  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2961  * elif isinstance(other, numbers.Integral):
2962  * self.instance = new IndexSet(<int>other)
2963  */
2964  try {
2965  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2966  } catch(...) {
2967  __Pyx_CppExn2PyErr();
2968  __PYX_ERR(0, 95, __pyx_L1_error)
2969  }
2970  __pyx_v_self->instance = __pyx_t_3;
2971 
2972  /* "PyClical.pyx":94
2973  * """
2974  * error_msg_prefix = "Cannot initialize index_set object from"
2975  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2976  * self.instance = new IndexSet((<index_set>other).unwrap())
2977  * elif isinstance(other, numbers.Integral):
2978  */
2979  goto __pyx_L3;
2980  }
2981 
2982  /* "PyClical.pyx":96
2983  * if isinstance(other, index_set):
2984  * self.instance = new IndexSet((<index_set>other).unwrap())
2985  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2986  * self.instance = new IndexSet(<int>other)
2987  * elif isinstance(other, (set, frozenset)):
2988  */
2989  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
2990  __Pyx_GOTREF(__pyx_t_4);
2991  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Integral); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error)
2992  __Pyx_GOTREF(__pyx_t_5);
2993  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2994  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_5); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 96, __pyx_L1_error)
2995  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2996  __pyx_t_1 = (__pyx_t_2 != 0);
2997  if (__pyx_t_1) {
2998 
2999  /* "PyClical.pyx":97
3000  * self.instance = new IndexSet((<index_set>other).unwrap())
3001  * elif isinstance(other, numbers.Integral):
3002  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
3003  * elif isinstance(other, (set, frozenset)):
3004  * try:
3005  */
3006  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_other); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L1_error)
3007  try {
3008  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
3009  } catch(...) {
3010  __Pyx_CppExn2PyErr();
3011  __PYX_ERR(0, 97, __pyx_L1_error)
3012  }
3013  __pyx_v_self->instance = __pyx_t_3;
3014 
3015  /* "PyClical.pyx":96
3016  * if isinstance(other, index_set):
3017  * self.instance = new IndexSet((<index_set>other).unwrap())
3018  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
3019  * self.instance = new IndexSet(<int>other)
3020  * elif isinstance(other, (set, frozenset)):
3021  */
3022  goto __pyx_L3;
3023  }
3024 
3025  /* "PyClical.pyx":98
3026  * elif isinstance(other, numbers.Integral):
3027  * self.instance = new IndexSet(<int>other)
3028  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3029  * try:
3030  * self.instance = new IndexSet()
3031  */
3032  __pyx_t_2 = PySet_Check(__pyx_v_other);
3033  __pyx_t_7 = (__pyx_t_2 != 0);
3034  if (!__pyx_t_7) {
3035  } else {
3036  __pyx_t_1 = __pyx_t_7;
3037  goto __pyx_L4_bool_binop_done;
3038  }
3039  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
3040  __pyx_t_2 = (__pyx_t_7 != 0);
3041  __pyx_t_1 = __pyx_t_2;
3042  __pyx_L4_bool_binop_done:;
3043  __pyx_t_2 = (__pyx_t_1 != 0);
3044  if (__pyx_t_2) {
3045 
3046  /* "PyClical.pyx":99
3047  * self.instance = new IndexSet(<int>other)
3048  * elif isinstance(other, (set, frozenset)):
3049  * try: # <<<<<<<<<<<<<<
3050  * self.instance = new IndexSet()
3051  * for idx in other:
3052  */
3053  {
3054  __Pyx_PyThreadState_declare
3055  __Pyx_PyThreadState_assign
3056  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3057  __Pyx_XGOTREF(__pyx_t_8);
3058  __Pyx_XGOTREF(__pyx_t_9);
3059  __Pyx_XGOTREF(__pyx_t_10);
3060  /*try:*/ {
3061 
3062  /* "PyClical.pyx":100
3063  * elif isinstance(other, (set, frozenset)):
3064  * try:
3065  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3066  * for idx in other:
3067  * self[idx] = True
3068  */
3069  __pyx_t_3 = new IndexSet();
3070  __pyx_v_self->instance = __pyx_t_3;
3071 
3072  /* "PyClical.pyx":101
3073  * try:
3074  * self.instance = new IndexSet()
3075  * for idx in other: # <<<<<<<<<<<<<<
3076  * self[idx] = True
3077  * except IndexError:
3078  */
3079  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3080  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3081  __pyx_t_12 = NULL;
3082  } else {
3083  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L6_error)
3084  __Pyx_GOTREF(__pyx_t_5);
3085  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 101, __pyx_L6_error)
3086  }
3087  for (;;) {
3088  if (likely(!__pyx_t_12)) {
3089  if (likely(PyList_CheckExact(__pyx_t_5))) {
3090  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3091  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3092  __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_ERR(0, 101, __pyx_L6_error)
3093  #else
3094  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L6_error)
3095  __Pyx_GOTREF(__pyx_t_4);
3096  #endif
3097  } else {
3098  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3099  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3100  __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_ERR(0, 101, __pyx_L6_error)
3101  #else
3102  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L6_error)
3103  __Pyx_GOTREF(__pyx_t_4);
3104  #endif
3105  }
3106  } else {
3107  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3108  if (unlikely(!__pyx_t_4)) {
3109  PyObject* exc_type = PyErr_Occurred();
3110  if (exc_type) {
3111  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3112  else __PYX_ERR(0, 101, __pyx_L6_error)
3113  }
3114  break;
3115  }
3116  __Pyx_GOTREF(__pyx_t_4);
3117  }
3118  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3119  __pyx_t_4 = 0;
3120 
3121  /* "PyClical.pyx":102
3122  * self.instance = new IndexSet()
3123  * for idx in other:
3124  * self[idx] = True # <<<<<<<<<<<<<<
3125  * except IndexError:
3126  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3127  */
3128  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 102, __pyx_L6_error)
3129 
3130  /* "PyClical.pyx":101
3131  * try:
3132  * self.instance = new IndexSet()
3133  * for idx in other: # <<<<<<<<<<<<<<
3134  * self[idx] = True
3135  * except IndexError:
3136  */
3137  }
3138  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3139 
3140  /* "PyClical.pyx":99
3141  * self.instance = new IndexSet(<int>other)
3142  * elif isinstance(other, (set, frozenset)):
3143  * try: # <<<<<<<<<<<<<<
3144  * self.instance = new IndexSet()
3145  * for idx in other:
3146  */
3147  }
3148  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3149  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3150  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3151  goto __pyx_L11_try_end;
3152  __pyx_L6_error:;
3153  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3154  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3155 
3156  /* "PyClical.pyx":103
3157  * for idx in other:
3158  * self[idx] = True
3159  * except IndexError: # <<<<<<<<<<<<<<
3160  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3161  * except (RuntimeError, TypeError):
3162  */
3163  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3164  if (__pyx_t_6) {
3165  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3166  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 103, __pyx_L8_except_error)
3167  __Pyx_GOTREF(__pyx_t_5);
3168  __Pyx_GOTREF(__pyx_t_4);
3169  __Pyx_GOTREF(__pyx_t_13);
3170 
3171  /* "PyClical.pyx":104
3172  * self[idx] = True
3173  * except IndexError:
3174  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3175  * except (RuntimeError, TypeError):
3176  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3177  */
3178  __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3179  __Pyx_GOTREF(__pyx_t_14);
3180  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3181  __Pyx_GOTREF(__pyx_t_15);
3182  __pyx_t_16 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3183  __Pyx_GOTREF(__pyx_t_16);
3184  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3185  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3186  __pyx_t_15 = __Pyx_PyUnicode_Concat(__pyx_t_16, __pyx_kp_u_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3187  __Pyx_GOTREF(__pyx_t_15);
3188  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3189  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3190  __Pyx_GOTREF(__pyx_t_16);
3191  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3192  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3193  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3194  __PYX_ERR(0, 104, __pyx_L8_except_error)
3195  }
3196 
3197  /* "PyClical.pyx":105
3198  * except IndexError:
3199  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3200  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3201  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3202  * elif isinstance(other, str):
3203  */
3204  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3205  if (__pyx_t_6) {
3206  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3207  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 105, __pyx_L8_except_error)
3208  __Pyx_GOTREF(__pyx_t_13);
3209  __Pyx_GOTREF(__pyx_t_4);
3210  __Pyx_GOTREF(__pyx_t_5);
3211 
3212  /* "PyClical.pyx":106
3213  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3214  * except (RuntimeError, TypeError):
3215  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3216  * elif isinstance(other, str):
3217  * try:
3218  */
3219  __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3220  __Pyx_GOTREF(__pyx_t_16);
3221  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3222  __Pyx_GOTREF(__pyx_t_15);
3223  __pyx_t_14 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3224  __Pyx_GOTREF(__pyx_t_14);
3225  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3226  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3227  __pyx_t_15 = __Pyx_PyUnicode_Concat(__pyx_t_14, __pyx_kp_u_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3228  __Pyx_GOTREF(__pyx_t_15);
3229  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3230  __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3231  __Pyx_GOTREF(__pyx_t_14);
3232  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3233  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3234  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3235  __PYX_ERR(0, 106, __pyx_L8_except_error)
3236  }
3237  goto __pyx_L8_except_error;
3238  __pyx_L8_except_error:;
3239 
3240  /* "PyClical.pyx":99
3241  * self.instance = new IndexSet(<int>other)
3242  * elif isinstance(other, (set, frozenset)):
3243  * try: # <<<<<<<<<<<<<<
3244  * self.instance = new IndexSet()
3245  * for idx in other:
3246  */
3247  __Pyx_XGIVEREF(__pyx_t_8);
3248  __Pyx_XGIVEREF(__pyx_t_9);
3249  __Pyx_XGIVEREF(__pyx_t_10);
3250  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3251  goto __pyx_L1_error;
3252  __pyx_L11_try_end:;
3253  }
3254 
3255  /* "PyClical.pyx":98
3256  * elif isinstance(other, numbers.Integral):
3257  * self.instance = new IndexSet(<int>other)
3258  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3259  * try:
3260  * self.instance = new IndexSet()
3261  */
3262  goto __pyx_L3;
3263  }
3264 
3265  /* "PyClical.pyx":107
3266  * except (RuntimeError, TypeError):
3267  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3268  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3269  * try:
3270  * bother = other.encode("UTF-8")
3271  */
3272  __pyx_t_2 = PyUnicode_Check(__pyx_v_other);
3273  __pyx_t_1 = (__pyx_t_2 != 0);
3274  if (likely(__pyx_t_1)) {
3275 
3276  /* "PyClical.pyx":108
3277  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3278  * elif isinstance(other, str):
3279  * try: # <<<<<<<<<<<<<<
3280  * bother = other.encode("UTF-8")
3281  * self.instance = new IndexSet(<char *>bother)
3282  */
3283  {
3284  __Pyx_PyThreadState_declare
3285  __Pyx_PyThreadState_assign
3286  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3287  __Pyx_XGOTREF(__pyx_t_10);
3288  __Pyx_XGOTREF(__pyx_t_9);
3289  __Pyx_XGOTREF(__pyx_t_8);
3290  /*try:*/ {
3291 
3292  /* "PyClical.pyx":109
3293  * elif isinstance(other, str):
3294  * try:
3295  * bother = other.encode("UTF-8") # <<<<<<<<<<<<<<
3296  * self.instance = new IndexSet(<char *>bother)
3297  * except RuntimeError:
3298  */
3299  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L18_error)
3300  __Pyx_GOTREF(__pyx_t_4);
3301  __pyx_t_13 = NULL;
3302  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
3303  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
3304  if (likely(__pyx_t_13)) {
3305  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3306  __Pyx_INCREF(__pyx_t_13);
3307  __Pyx_INCREF(function);
3308  __Pyx_DECREF_SET(__pyx_t_4, function);
3309  }
3310  }
3311  __pyx_t_5 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_13, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_UTF_8);
3312  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3313  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L18_error)
3314  __Pyx_GOTREF(__pyx_t_5);
3315  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3316  __pyx_v_bother = __pyx_t_5;
3317  __pyx_t_5 = 0;
3318 
3319  /* "PyClical.pyx":110
3320  * try:
3321  * bother = other.encode("UTF-8")
3322  * self.instance = new IndexSet(<char *>bother) # <<<<<<<<<<<<<<
3323  * except RuntimeError:
3324  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3325  */
3326  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_bother); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L18_error)
3327  try {
3328  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3329  } catch(...) {
3330  __Pyx_CppExn2PyErr();
3331  __PYX_ERR(0, 110, __pyx_L18_error)
3332  }
3333  __pyx_v_self->instance = __pyx_t_3;
3334 
3335  /* "PyClical.pyx":108
3336  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3337  * elif isinstance(other, str):
3338  * try: # <<<<<<<<<<<<<<
3339  * bother = other.encode("UTF-8")
3340  * self.instance = new IndexSet(<char *>bother)
3341  */
3342  }
3343  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3344  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3345  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3346  goto __pyx_L23_try_end;
3347  __pyx_L18_error:;
3348  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3349  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3350  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3351  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3352  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3353  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3354 
3355  /* "PyClical.pyx":111
3356  * bother = other.encode("UTF-8")
3357  * self.instance = new IndexSet(<char *>bother)
3358  * except RuntimeError: # <<<<<<<<<<<<<<
3359  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3360  * else:
3361  */
3362  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3363  if (__pyx_t_6) {
3364  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3365  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 111, __pyx_L20_except_error)
3366  __Pyx_GOTREF(__pyx_t_5);
3367  __Pyx_GOTREF(__pyx_t_4);
3368  __Pyx_GOTREF(__pyx_t_13);
3369 
3370  /* "PyClical.pyx":112
3371  * self.instance = new IndexSet(<char *>bother)
3372  * except RuntimeError:
3373  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3374  * else:
3375  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3376  */
3377  __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid_string); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3378  __Pyx_GOTREF(__pyx_t_14);
3379  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3380  __Pyx_GOTREF(__pyx_t_15);
3381  __pyx_t_16 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3382  __Pyx_GOTREF(__pyx_t_16);
3383  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3384  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3385  __pyx_t_15 = __Pyx_PyUnicode_Concat(__pyx_t_16, __pyx_kp_u_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3386  __Pyx_GOTREF(__pyx_t_15);
3387  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3388  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3389  __Pyx_GOTREF(__pyx_t_16);
3390  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3391  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3392  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3393  __PYX_ERR(0, 112, __pyx_L20_except_error)
3394  }
3395  goto __pyx_L20_except_error;
3396  __pyx_L20_except_error:;
3397 
3398  /* "PyClical.pyx":108
3399  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3400  * elif isinstance(other, str):
3401  * try: # <<<<<<<<<<<<<<
3402  * bother = other.encode("UTF-8")
3403  * self.instance = new IndexSet(<char *>bother)
3404  */
3405  __Pyx_XGIVEREF(__pyx_t_10);
3406  __Pyx_XGIVEREF(__pyx_t_9);
3407  __Pyx_XGIVEREF(__pyx_t_8);
3408  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3409  goto __pyx_L1_error;
3410  __pyx_L23_try_end:;
3411  }
3412 
3413  /* "PyClical.pyx":107
3414  * except (RuntimeError, TypeError):
3415  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3416  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3417  * try:
3418  * bother = other.encode("UTF-8")
3419  */
3420  goto __pyx_L3;
3421  }
3422 
3423  /* "PyClical.pyx":114
3424  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3425  * else:
3426  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3427  *
3428  * def __dealloc__(self):
3429  */
3430  /*else*/ {
3431  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 114, __pyx_L1_error)
3432  __Pyx_GOTREF(__pyx_t_13);
3433  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
3434  __Pyx_GOTREF(__pyx_t_4);
3435  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
3436  __Pyx_GOTREF(__pyx_t_5);
3437  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3438  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3439  __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
3440  __Pyx_GOTREF(__pyx_t_4);
3441  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3442  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
3443  __Pyx_GOTREF(__pyx_t_5);
3444  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3445  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3446  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3447  __PYX_ERR(0, 114, __pyx_L1_error)
3448  }
3449  __pyx_L3:;
3450 
3451  /* "PyClical.pyx":74
3452  * return index_set(self)
3453  *
3454  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3455  * """
3456  * Construct an object of type index_set.
3457  */
3458 
3459  /* function exit code */
3460  __pyx_r = 0;
3461  goto __pyx_L0;
3462  __pyx_L1_error:;
3463  __Pyx_XDECREF(__pyx_t_4);
3464  __Pyx_XDECREF(__pyx_t_5);
3465  __Pyx_XDECREF(__pyx_t_13);
3466  __Pyx_XDECREF(__pyx_t_14);
3467  __Pyx_XDECREF(__pyx_t_15);
3468  __Pyx_XDECREF(__pyx_t_16);
3469  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3470  __pyx_r = -1;
3471  __pyx_L0:;
3472  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3473  __Pyx_XDECREF(__pyx_v_idx);
3474  __Pyx_XDECREF(__pyx_v_bother);
3475  __Pyx_RefNannyFinishContext();
3476  return __pyx_r;
3477 }
3478 
3479 /* "PyClical.pyx":116
3480  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3481  *
3482  * def __dealloc__(self): # <<<<<<<<<<<<<<
3483  * """
3484  * Clean up by deallocating the instance of C++ class IndexSet.
3485  */
3486 
3487 /* Python wrapper */
3488 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3489 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3490  __Pyx_RefNannyDeclarations
3491  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3492  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3493 
3494  /* function exit code */
3495  __Pyx_RefNannyFinishContext();
3496 }
3497 
3498 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3499  __Pyx_RefNannyDeclarations
3500  __Pyx_RefNannySetupContext("__dealloc__", 0);
3501 
3502  /* "PyClical.pyx":120
3503  * Clean up by deallocating the instance of C++ class IndexSet.
3504  * """
3505  * del self.instance # <<<<<<<<<<<<<<
3506  *
3507  * def __richcmp__(lhs, rhs, int op):
3508  */
3509  delete __pyx_v_self->instance;
3510 
3511  /* "PyClical.pyx":116
3512  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3513  *
3514  * def __dealloc__(self): # <<<<<<<<<<<<<<
3515  * """
3516  * Clean up by deallocating the instance of C++ class IndexSet.
3517  */
3518 
3519  /* function exit code */
3520  __Pyx_RefNannyFinishContext();
3521 }
3522 
3523 /* "PyClical.pyx":122
3524  * del self.instance
3525  *
3526  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3527  * """
3528  * Compare two objects of class index_set.
3529  */
3530 
3531 /* Python wrapper */
3532 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3533 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3534  PyObject *__pyx_r = 0;
3535  __Pyx_RefNannyDeclarations
3536  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3537  __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
3538 
3539  /* function exit code */
3540  __Pyx_RefNannyFinishContext();
3541  return __pyx_r;
3542 }
3543 
3544 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3545  PyObject *__pyx_v_eq = NULL;
3546  PyObject *__pyx_v_lt = NULL;
3547  PyObject *__pyx_r = NULL;
3548  __Pyx_RefNannyDeclarations
3549  int __pyx_t_1;
3550  int __pyx_t_2;
3551  int __pyx_t_3;
3552  PyObject *__pyx_t_4 = NULL;
3553  __Pyx_RefNannySetupContext("__richcmp__", 0);
3554 
3555  /* "PyClical.pyx":143
3556  * False
3557  * """
3558  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3559  * eq = bool(lhs is rhs)
3560  * if op == 2: # ==
3561  */
3562  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3563  __pyx_t_3 = (__pyx_t_2 != 0);
3564  if (!__pyx_t_3) {
3565  } else {
3566  __pyx_t_1 = __pyx_t_3;
3567  goto __pyx_L4_bool_binop_done;
3568  }
3569  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3570  __pyx_t_2 = (__pyx_t_3 != 0);
3571  __pyx_t_1 = __pyx_t_2;
3572  __pyx_L4_bool_binop_done:;
3573  if (__pyx_t_1) {
3574 
3575  /* "PyClical.pyx":144
3576  * """
3577  * if (lhs is None) or (rhs is None):
3578  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3579  * if op == 2: # ==
3580  * return eq
3581  */
3582  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3583  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
3584  __Pyx_GOTREF(__pyx_t_4);
3585  __pyx_v_eq = __pyx_t_4;
3586  __pyx_t_4 = 0;
3587 
3588  /* "PyClical.pyx":145
3589  * if (lhs is None) or (rhs is None):
3590  * eq = bool(lhs is rhs)
3591  * if op == 2: # == # <<<<<<<<<<<<<<
3592  * return eq
3593  * elif op == 3: # !=
3594  */
3595  switch (__pyx_v_op) {
3596  case 2:
3597 
3598  /* "PyClical.pyx":146
3599  * eq = bool(lhs is rhs)
3600  * if op == 2: # ==
3601  * return eq # <<<<<<<<<<<<<<
3602  * elif op == 3: # !=
3603  * return not eq
3604  */
3605  __Pyx_XDECREF(__pyx_r);
3606  __Pyx_INCREF(__pyx_v_eq);
3607  __pyx_r = __pyx_v_eq;
3608  goto __pyx_L0;
3609 
3610  /* "PyClical.pyx":145
3611  * if (lhs is None) or (rhs is None):
3612  * eq = bool(lhs is rhs)
3613  * if op == 2: # == # <<<<<<<<<<<<<<
3614  * return eq
3615  * elif op == 3: # !=
3616  */
3617  break;
3618  case 3:
3619 
3620  /* "PyClical.pyx":148
3621  * return eq
3622  * elif op == 3: # !=
3623  * return not eq # <<<<<<<<<<<<<<
3624  * else:
3625  * if op == 0: # <
3626  */
3627  __Pyx_XDECREF(__pyx_r);
3628  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 148, __pyx_L1_error)
3629  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
3630  __Pyx_GOTREF(__pyx_t_4);
3631  __pyx_r = __pyx_t_4;
3632  __pyx_t_4 = 0;
3633  goto __pyx_L0;
3634 
3635  /* "PyClical.pyx":147
3636  * if op == 2: # ==
3637  * return eq
3638  * elif op == 3: # != # <<<<<<<<<<<<<<
3639  * return not eq
3640  * else:
3641  */
3642  break;
3643  default:
3644 
3645  /* "PyClical.pyx":150
3646  * return not eq
3647  * else:
3648  * if op == 0: # < # <<<<<<<<<<<<<<
3649  * return False
3650  * elif op == 1: # <=
3651  */
3652  switch (__pyx_v_op) {
3653  case 0:
3654 
3655  /* "PyClical.pyx":151
3656  * else:
3657  * if op == 0: # <
3658  * return False # <<<<<<<<<<<<<<
3659  * elif op == 1: # <=
3660  * return eq
3661  */
3662  __Pyx_XDECREF(__pyx_r);
3663  __Pyx_INCREF(Py_False);
3664  __pyx_r = Py_False;
3665  goto __pyx_L0;
3666 
3667  /* "PyClical.pyx":150
3668  * return not eq
3669  * else:
3670  * if op == 0: # < # <<<<<<<<<<<<<<
3671  * return False
3672  * elif op == 1: # <=
3673  */
3674  break;
3675  case 1:
3676 
3677  /* "PyClical.pyx":153
3678  * return False
3679  * elif op == 1: # <=
3680  * return eq # <<<<<<<<<<<<<<
3681  * elif op == 4: # >
3682  * return False
3683  */
3684  __Pyx_XDECREF(__pyx_r);
3685  __Pyx_INCREF(__pyx_v_eq);
3686  __pyx_r = __pyx_v_eq;
3687  goto __pyx_L0;
3688 
3689  /* "PyClical.pyx":152
3690  * if op == 0: # <
3691  * return False
3692  * elif op == 1: # <= # <<<<<<<<<<<<<<
3693  * return eq
3694  * elif op == 4: # >
3695  */
3696  break;
3697  case 4:
3698 
3699  /* "PyClical.pyx":155
3700  * return eq
3701  * elif op == 4: # >
3702  * return False # <<<<<<<<<<<<<<
3703  * elif op == 5: # >=
3704  * return eq
3705  */
3706  __Pyx_XDECREF(__pyx_r);
3707  __Pyx_INCREF(Py_False);
3708  __pyx_r = Py_False;
3709  goto __pyx_L0;
3710 
3711  /* "PyClical.pyx":154
3712  * elif op == 1: # <=
3713  * return eq
3714  * elif op == 4: # > # <<<<<<<<<<<<<<
3715  * return False
3716  * elif op == 5: # >=
3717  */
3718  break;
3719  case 5:
3720 
3721  /* "PyClical.pyx":157
3722  * return False
3723  * elif op == 5: # >=
3724  * return eq # <<<<<<<<<<<<<<
3725  * else:
3726  * return NotImplemented
3727  */
3728  __Pyx_XDECREF(__pyx_r);
3729  __Pyx_INCREF(__pyx_v_eq);
3730  __pyx_r = __pyx_v_eq;
3731  goto __pyx_L0;
3732 
3733  /* "PyClical.pyx":156
3734  * elif op == 4: # >
3735  * return False
3736  * elif op == 5: # >= # <<<<<<<<<<<<<<
3737  * return eq
3738  * else:
3739  */
3740  break;
3741  default:
3742 
3743  /* "PyClical.pyx":159
3744  * return eq
3745  * else:
3746  * return NotImplemented # <<<<<<<<<<<<<<
3747  * else:
3748  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3749  */
3750  __Pyx_XDECREF(__pyx_r);
3751  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3752  __pyx_r = __pyx_builtin_NotImplemented;
3753  goto __pyx_L0;
3754  break;
3755  }
3756  break;
3757  }
3758 
3759  /* "PyClical.pyx":143
3760  * False
3761  * """
3762  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3763  * eq = bool(lhs is rhs)
3764  * if op == 2: # ==
3765  */
3766  }
3767 
3768  /* "PyClical.pyx":161
3769  * return NotImplemented
3770  * else:
3771  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3772  * if op == 2: # ==
3773  * return eq
3774  */
3775  /*else*/ {
3776  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3777  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
3778  __Pyx_GOTREF(__pyx_t_4);
3779  __pyx_v_eq = __pyx_t_4;
3780  __pyx_t_4 = 0;
3781 
3782  /* "PyClical.pyx":162
3783  * else:
3784  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3785  * if op == 2: # == # <<<<<<<<<<<<<<
3786  * return eq
3787  * elif op == 3: # !=
3788  */
3789  switch (__pyx_v_op) {
3790  case 2:
3791 
3792  /* "PyClical.pyx":163
3793  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3794  * if op == 2: # ==
3795  * return eq # <<<<<<<<<<<<<<
3796  * elif op == 3: # !=
3797  * return not eq
3798  */
3799  __Pyx_XDECREF(__pyx_r);
3800  __Pyx_INCREF(__pyx_v_eq);
3801  __pyx_r = __pyx_v_eq;
3802  goto __pyx_L0;
3803 
3804  /* "PyClical.pyx":162
3805  * else:
3806  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3807  * if op == 2: # == # <<<<<<<<<<<<<<
3808  * return eq
3809  * elif op == 3: # !=
3810  */
3811  break;
3812  case 3:
3813 
3814  /* "PyClical.pyx":165
3815  * return eq
3816  * elif op == 3: # !=
3817  * return not eq # <<<<<<<<<<<<<<
3818  * else:
3819  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3820  */
3821  __Pyx_XDECREF(__pyx_r);
3822  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 165, __pyx_L1_error)
3823  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3824  __Pyx_GOTREF(__pyx_t_4);
3825  __pyx_r = __pyx_t_4;
3826  __pyx_t_4 = 0;
3827  goto __pyx_L0;
3828 
3829  /* "PyClical.pyx":164
3830  * if op == 2: # ==
3831  * return eq
3832  * elif op == 3: # != # <<<<<<<<<<<<<<
3833  * return not eq
3834  * else:
3835  */
3836  break;
3837  default:
3838 
3839  /* "PyClical.pyx":167
3840  * return not eq
3841  * else:
3842  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3843  * if op == 0: # <
3844  * return lt
3845  */
3846  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3847  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
3848  __Pyx_GOTREF(__pyx_t_4);
3849  __pyx_v_lt = __pyx_t_4;
3850  __pyx_t_4 = 0;
3851 
3852  /* "PyClical.pyx":168
3853  * else:
3854  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3855  * if op == 0: # < # <<<<<<<<<<<<<<
3856  * return lt
3857  * elif op == 1: # <=
3858  */
3859  switch (__pyx_v_op) {
3860  case 0:
3861 
3862  /* "PyClical.pyx":169
3863  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3864  * if op == 0: # <
3865  * return lt # <<<<<<<<<<<<<<
3866  * elif op == 1: # <=
3867  * return lt or eq
3868  */
3869  __Pyx_XDECREF(__pyx_r);
3870  __Pyx_INCREF(__pyx_v_lt);
3871  __pyx_r = __pyx_v_lt;
3872  goto __pyx_L0;
3873 
3874  /* "PyClical.pyx":168
3875  * else:
3876  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3877  * if op == 0: # < # <<<<<<<<<<<<<<
3878  * return lt
3879  * elif op == 1: # <=
3880  */
3881  break;
3882  case 1:
3883 
3884  /* "PyClical.pyx":171
3885  * return lt
3886  * elif op == 1: # <=
3887  * return lt or eq # <<<<<<<<<<<<<<
3888  * elif op == 4: # >
3889  * return not (lt or eq)
3890  */
3891  __Pyx_XDECREF(__pyx_r);
3892  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3893  if (!__pyx_t_1) {
3894  } else {
3895  __Pyx_INCREF(__pyx_v_lt);
3896  __pyx_t_4 = __pyx_v_lt;
3897  goto __pyx_L6_bool_binop_done;
3898  }
3899  __Pyx_INCREF(__pyx_v_eq);
3900  __pyx_t_4 = __pyx_v_eq;
3901  __pyx_L6_bool_binop_done:;
3902  __pyx_r = __pyx_t_4;
3903  __pyx_t_4 = 0;
3904  goto __pyx_L0;
3905 
3906  /* "PyClical.pyx":170
3907  * if op == 0: # <
3908  * return lt
3909  * elif op == 1: # <= # <<<<<<<<<<<<<<
3910  * return lt or eq
3911  * elif op == 4: # >
3912  */
3913  break;
3914  case 4:
3915 
3916  /* "PyClical.pyx":173
3917  * return lt or eq
3918  * elif op == 4: # >
3919  * return not (lt or eq) # <<<<<<<<<<<<<<
3920  * elif op == 5: # >=
3921  * return not lt
3922  */
3923  __Pyx_XDECREF(__pyx_r);
3924  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3925  if (!__pyx_t_2) {
3926  } else {
3927  __pyx_t_1 = __pyx_t_2;
3928  goto __pyx_L8_bool_binop_done;
3929  }
3930  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3931  __pyx_t_1 = __pyx_t_2;
3932  __pyx_L8_bool_binop_done:;
3933  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3934  __Pyx_GOTREF(__pyx_t_4);
3935  __pyx_r = __pyx_t_4;
3936  __pyx_t_4 = 0;
3937  goto __pyx_L0;
3938 
3939  /* "PyClical.pyx":172
3940  * elif op == 1: # <=
3941  * return lt or eq
3942  * elif op == 4: # > # <<<<<<<<<<<<<<
3943  * return not (lt or eq)
3944  * elif op == 5: # >=
3945  */
3946  break;
3947  case 5:
3948 
3949  /* "PyClical.pyx":175
3950  * return not (lt or eq)
3951  * elif op == 5: # >=
3952  * return not lt # <<<<<<<<<<<<<<
3953  * else:
3954  * return NotImplemented
3955  */
3956  __Pyx_XDECREF(__pyx_r);
3957  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 175, __pyx_L1_error)
3958  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
3959  __Pyx_GOTREF(__pyx_t_4);
3960  __pyx_r = __pyx_t_4;
3961  __pyx_t_4 = 0;
3962  goto __pyx_L0;
3963 
3964  /* "PyClical.pyx":174
3965  * elif op == 4: # >
3966  * return not (lt or eq)
3967  * elif op == 5: # >= # <<<<<<<<<<<<<<
3968  * return not lt
3969  * else:
3970  */
3971  break;
3972  default:
3973 
3974  /* "PyClical.pyx":177
3975  * return not lt
3976  * else:
3977  * return NotImplemented # <<<<<<<<<<<<<<
3978  *
3979  * def __setitem__(self, idx, val):
3980  */
3981  __Pyx_XDECREF(__pyx_r);
3982  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3983  __pyx_r = __pyx_builtin_NotImplemented;
3984  goto __pyx_L0;
3985  break;
3986  }
3987  break;
3988  }
3989  }
3990 
3991  /* "PyClical.pyx":122
3992  * del self.instance
3993  *
3994  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3995  * """
3996  * Compare two objects of class index_set.
3997  */
3998 
3999  /* function exit code */
4000  __pyx_L1_error:;
4001  __Pyx_XDECREF(__pyx_t_4);
4002  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4003  __pyx_r = NULL;
4004  __pyx_L0:;
4005  __Pyx_XDECREF(__pyx_v_eq);
4006  __Pyx_XDECREF(__pyx_v_lt);
4007  __Pyx_XGIVEREF(__pyx_r);
4008  __Pyx_RefNannyFinishContext();
4009  return __pyx_r;
4010 }
4011 
4012 /* "PyClical.pyx":179
4013  * return NotImplemented
4014  *
4015  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4016  * """
4017  * Set the value of an index_set object at index idx to value val.
4018  */
4019 
4020 /* Python wrapper */
4021 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
4022 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 ";
4023 #if CYTHON_COMPILING_IN_CPYTHON
4024 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
4025 #endif
4026 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
4027  int __pyx_r;
4028  __Pyx_RefNannyDeclarations
4029  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
4030  __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));
4031 
4032  /* function exit code */
4033  __Pyx_RefNannyFinishContext();
4034  return __pyx_r;
4035 }
4036 
4037 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) {
4038  int __pyx_r;
4039  __Pyx_RefNannyDeclarations
4040  int __pyx_t_1;
4041  int __pyx_t_2;
4042  __Pyx_RefNannySetupContext("__setitem__", 0);
4043 
4044  /* "PyClical.pyx":188
4045  * {2}
4046  * """
4047  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
4048  * return
4049  *
4050  */
4051  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L1_error)
4052  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_val); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L1_error)
4053  try {
4054  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
4055  } catch(...) {
4056  __Pyx_CppExn2PyErr();
4057  __PYX_ERR(0, 188, __pyx_L1_error)
4058  }
4059 
4060  /* "PyClical.pyx":189
4061  * """
4062  * self.instance.set(idx, val)
4063  * return # <<<<<<<<<<<<<<
4064  *
4065  * def __getitem__(self, idx):
4066  */
4067  __pyx_r = 0;
4068  goto __pyx_L0;
4069 
4070  /* "PyClical.pyx":179
4071  * return NotImplemented
4072  *
4073  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4074  * """
4075  * Set the value of an index_set object at index idx to value val.
4076  */
4077 
4078  /* function exit code */
4079  __pyx_L1_error:;
4080  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4081  __pyx_r = -1;
4082  __pyx_L0:;
4083  __Pyx_RefNannyFinishContext();
4084  return __pyx_r;
4085 }
4086 
4087 /* "PyClical.pyx":191
4088  * return
4089  *
4090  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4091  * """
4092  * Get the value of an index_set object at an index.
4093  */
4094 
4095 /* Python wrapper */
4096 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4097 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 ";
4098 #if CYTHON_COMPILING_IN_CPYTHON
4099 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4100 #endif
4101 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4102  PyObject *__pyx_r = 0;
4103  __Pyx_RefNannyDeclarations
4104  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4105  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4106 
4107  /* function exit code */
4108  __Pyx_RefNannyFinishContext();
4109  return __pyx_r;
4110 }
4111 
4112 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4113  PyObject *__pyx_r = NULL;
4114  __Pyx_RefNannyDeclarations
4115  int __pyx_t_1;
4116  PyObject *__pyx_t_2 = NULL;
4117  __Pyx_RefNannySetupContext("__getitem__", 0);
4118 
4119  /* "PyClical.pyx":208
4120  * False
4121  * """
4122  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4123  *
4124  * def __contains__(self, idx):
4125  */
4126  __Pyx_XDECREF(__pyx_r);
4127  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L1_error)
4128  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->operator[](__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
4129  __Pyx_GOTREF(__pyx_t_2);
4130  __pyx_r = __pyx_t_2;
4131  __pyx_t_2 = 0;
4132  goto __pyx_L0;
4133 
4134  /* "PyClical.pyx":191
4135  * return
4136  *
4137  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4138  * """
4139  * Get the value of an index_set object at an index.
4140  */
4141 
4142  /* function exit code */
4143  __pyx_L1_error:;
4144  __Pyx_XDECREF(__pyx_t_2);
4145  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4146  __pyx_r = NULL;
4147  __pyx_L0:;
4148  __Pyx_XGIVEREF(__pyx_r);
4149  __Pyx_RefNannyFinishContext();
4150  return __pyx_r;
4151 }
4152 
4153 /* "PyClical.pyx":210
4154  * return self.instance.getitem(idx)
4155  *
4156  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4157  * """
4158  * Check that an index_set object contains the index idx: idx in self.
4159  */
4160 
4161 /* Python wrapper */
4162 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4163 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 ";
4164 #if CYTHON_COMPILING_IN_CPYTHON
4165 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4166 #endif
4167 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4168  int __pyx_r;
4169  __Pyx_RefNannyDeclarations
4170  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4171  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4172 
4173  /* function exit code */
4174  __Pyx_RefNannyFinishContext();
4175  return __pyx_r;
4176 }
4177 
4178 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4179  int __pyx_r;
4180  __Pyx_RefNannyDeclarations
4181  int __pyx_t_1;
4182  __Pyx_RefNannySetupContext("__contains__", 0);
4183 
4184  /* "PyClical.pyx":227
4185  * False
4186  * """
4187  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4188  *
4189  * def __iter__(self):
4190  */
4191  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L1_error)
4192  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4193  goto __pyx_L0;
4194 
4195  /* "PyClical.pyx":210
4196  * return self.instance.getitem(idx)
4197  *
4198  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4199  * """
4200  * Check that an index_set object contains the index idx: idx in self.
4201  */
4202 
4203  /* function exit code */
4204  __pyx_L1_error:;
4205  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4206  __pyx_r = -1;
4207  __pyx_L0:;
4208  __Pyx_RefNannyFinishContext();
4209  return __pyx_r;
4210 }
4211 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4212 
4213 /* "PyClical.pyx":229
4214  * return self.instance.getitem(idx)
4215  *
4216  * def __iter__(self): # <<<<<<<<<<<<<<
4217  * """
4218  * Iterate over the indices of an index_set.
4219  */
4220 
4221 /* Python wrapper */
4222 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4223 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, end=\",\")\n -3,4,7,\n ";
4224 #if CYTHON_COMPILING_IN_CPYTHON
4225 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4226 #endif
4227 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4228  PyObject *__pyx_r = 0;
4229  __Pyx_RefNannyDeclarations
4230  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4231  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4232 
4233  /* function exit code */
4234  __Pyx_RefNannyFinishContext();
4235  return __pyx_r;
4236 }
4237 
4238 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4239  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4240  PyObject *__pyx_r = NULL;
4241  __Pyx_RefNannyDeclarations
4242  __Pyx_RefNannySetupContext("__iter__", 0);
4243  __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);
4244  if (unlikely(!__pyx_cur_scope)) {
4245  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4246  __Pyx_INCREF(Py_None);
4247  __PYX_ERR(0, 229, __pyx_L1_error)
4248  } else {
4249  __Pyx_GOTREF(__pyx_cur_scope);
4250  }
4251  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4252  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4253  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4254  {
4255  __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8PyClical_9index_set_16generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_index_set___iter, __pyx_n_s_PyClical); if (unlikely(!gen)) __PYX_ERR(0, 229, __pyx_L1_error)
4256  __Pyx_DECREF(__pyx_cur_scope);
4257  __Pyx_RefNannyFinishContext();
4258  return (PyObject *) gen;
4259  }
4260 
4261  /* function exit code */
4262  __pyx_L1_error:;
4263  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4264  __pyx_r = NULL;
4265  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4266  __Pyx_XGIVEREF(__pyx_r);
4267  __Pyx_RefNannyFinishContext();
4268  return __pyx_r;
4269 }
4270 
4271 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4272 {
4273  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4274  PyObject *__pyx_r = NULL;
4275  PyObject *__pyx_t_1 = NULL;
4276  PyObject *__pyx_t_2 = NULL;
4277  PyObject *__pyx_t_3 = NULL;
4278  PyObject *__pyx_t_4 = NULL;
4279  Py_ssize_t __pyx_t_5;
4280  PyObject *(*__pyx_t_6)(PyObject *);
4281  int __pyx_t_7;
4282  int __pyx_t_8;
4283  __Pyx_RefNannyDeclarations
4284  __Pyx_RefNannySetupContext("__iter__", 0);
4285  switch (__pyx_generator->resume_label) {
4286  case 0: goto __pyx_L3_first_run;
4287  case 1: goto __pyx_L7_resume_from_yield;
4288  default: /* CPython raises the right error here */
4289  __Pyx_RefNannyFinishContext();
4290  return NULL;
4291  }
4292  __pyx_L3_first_run:;
4293  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 229, __pyx_L1_error)
4294 
4295  /* "PyClical.pyx":236
4296  * -3,4,7,
4297  * """
4298  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4299  * if idx in self:
4300  * yield idx
4301  */
4302  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4303  __Pyx_GOTREF(__pyx_t_2);
4304  __pyx_t_3 = NULL;
4305  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4306  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4307  if (likely(__pyx_t_3)) {
4308  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4309  __Pyx_INCREF(__pyx_t_3);
4310  __Pyx_INCREF(function);
4311  __Pyx_DECREF_SET(__pyx_t_2, function);
4312  }
4313  }
4314  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4315  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4316  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
4317  __Pyx_GOTREF(__pyx_t_1);
4318  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4319  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
4320  __Pyx_GOTREF(__pyx_t_3);
4321  __pyx_t_4 = NULL;
4322  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4323  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4324  if (likely(__pyx_t_4)) {
4325  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4326  __Pyx_INCREF(__pyx_t_4);
4327  __Pyx_INCREF(function);
4328  __Pyx_DECREF_SET(__pyx_t_3, function);
4329  }
4330  }
4331  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4332  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4333  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4334  __Pyx_GOTREF(__pyx_t_2);
4335  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4336  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
4337  __Pyx_GOTREF(__pyx_t_3);
4338  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4339  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4340  __Pyx_GOTREF(__pyx_t_2);
4341  __Pyx_GIVEREF(__pyx_t_1);
4342  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4343  __Pyx_GIVEREF(__pyx_t_3);
4344  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4345  __pyx_t_1 = 0;
4346  __pyx_t_3 = 0;
4347  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
4348  __Pyx_GOTREF(__pyx_t_3);
4349  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4350  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4351  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4352  __pyx_t_6 = NULL;
4353  } else {
4354  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4355  __Pyx_GOTREF(__pyx_t_2);
4356  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error)
4357  }
4358  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4359  for (;;) {
4360  if (likely(!__pyx_t_6)) {
4361  if (likely(PyList_CheckExact(__pyx_t_2))) {
4362  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4363  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4364  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 236, __pyx_L1_error)
4365  #else
4366  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
4367  __Pyx_GOTREF(__pyx_t_3);
4368  #endif
4369  } else {
4370  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4371  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4372  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 236, __pyx_L1_error)
4373  #else
4374  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
4375  __Pyx_GOTREF(__pyx_t_3);
4376  #endif
4377  }
4378  } else {
4379  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4380  if (unlikely(!__pyx_t_3)) {
4381  PyObject* exc_type = PyErr_Occurred();
4382  if (exc_type) {
4383  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4384  else __PYX_ERR(0, 236, __pyx_L1_error)
4385  }
4386  break;
4387  }
4388  __Pyx_GOTREF(__pyx_t_3);
4389  }
4390  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4391  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4392  __Pyx_GIVEREF(__pyx_t_3);
4393  __pyx_t_3 = 0;
4394 
4395  /* "PyClical.pyx":237
4396  * """
4397  * for idx in range(self.min(), self.max()+1):
4398  * if idx in self: # <<<<<<<<<<<<<<
4399  * yield idx
4400  *
4401  */
4402  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_idx, ((PyObject *)__pyx_cur_scope->__pyx_v_self), Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 237, __pyx_L1_error)
4403  __pyx_t_8 = (__pyx_t_7 != 0);
4404  if (__pyx_t_8) {
4405 
4406  /* "PyClical.pyx":238
4407  * for idx in range(self.min(), self.max()+1):
4408  * if idx in self:
4409  * yield idx # <<<<<<<<<<<<<<
4410  *
4411  * def __invert__(self):
4412  */
4413  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4414  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4415  __Pyx_XGIVEREF(__pyx_t_2);
4416  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4417  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4418  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4419  __Pyx_XGIVEREF(__pyx_r);
4420  __Pyx_RefNannyFinishContext();
4421  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4422  /* return from generator, yielding value */
4423  __pyx_generator->resume_label = 1;
4424  return __pyx_r;
4425  __pyx_L7_resume_from_yield:;
4426  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4427  __pyx_cur_scope->__pyx_t_0 = 0;
4428  __Pyx_XGOTREF(__pyx_t_2);
4429  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4430  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4431  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error)
4432 
4433  /* "PyClical.pyx":237
4434  * """
4435  * for idx in range(self.min(), self.max()+1):
4436  * if idx in self: # <<<<<<<<<<<<<<
4437  * yield idx
4438  *
4439  */
4440  }
4441 
4442  /* "PyClical.pyx":236
4443  * -3,4,7,
4444  * """
4445  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4446  * if idx in self:
4447  * yield idx
4448  */
4449  }
4450  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4451  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4452 
4453  /* "PyClical.pyx":229
4454  * return self.instance.getitem(idx)
4455  *
4456  * def __iter__(self): # <<<<<<<<<<<<<<
4457  * """
4458  * Iterate over the indices of an index_set.
4459  */
4460 
4461  /* function exit code */
4462  PyErr_SetNone(PyExc_StopIteration);
4463  goto __pyx_L0;
4464  __pyx_L1_error:;
4465  __Pyx_XDECREF(__pyx_t_1);
4466  __Pyx_XDECREF(__pyx_t_2);
4467  __Pyx_XDECREF(__pyx_t_3);
4468  __Pyx_XDECREF(__pyx_t_4);
4469  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4470  __pyx_L0:;
4471  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4472  #if !CYTHON_USE_EXC_INFO_STACK
4473  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4474  #endif
4475  __pyx_generator->resume_label = -1;
4476  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4477  __Pyx_RefNannyFinishContext();
4478  return __pyx_r;
4479 }
4480 
4481 /* "PyClical.pyx":240
4482  * yield idx
4483  *
4484  * def __invert__(self): # <<<<<<<<<<<<<<
4485  * """
4486  * Set complement: not.
4487  */
4488 
4489 /* Python wrapper */
4490 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4491 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 ";
4492 #if CYTHON_COMPILING_IN_CPYTHON
4493 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4494 #endif
4495 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4496  PyObject *__pyx_r = 0;
4497  __Pyx_RefNannyDeclarations
4498  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4499  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4500 
4501  /* function exit code */
4502  __Pyx_RefNannyFinishContext();
4503  return __pyx_r;
4504 }
4505 
4506 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4507  PyObject *__pyx_r = NULL;
4508  __Pyx_RefNannyDeclarations
4509  PyObject *__pyx_t_1 = NULL;
4510  PyObject *__pyx_t_2 = NULL;
4511  __Pyx_RefNannySetupContext("__invert__", 0);
4512 
4513  /* "PyClical.pyx":247
4514  * {-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}
4515  * """
4516  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4517  *
4518  * def __xor__(lhs, rhs):
4519  */
4520  __Pyx_XDECREF(__pyx_r);
4521  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
4522  __Pyx_GOTREF(__pyx_t_1);
4523  __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_ERR(0, 247, __pyx_L1_error)
4524  __Pyx_GOTREF(__pyx_t_2);
4525  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4526  __pyx_r = __pyx_t_2;
4527  __pyx_t_2 = 0;
4528  goto __pyx_L0;
4529 
4530  /* "PyClical.pyx":240
4531  * yield idx
4532  *
4533  * def __invert__(self): # <<<<<<<<<<<<<<
4534  * """
4535  * Set complement: not.
4536  */
4537 
4538  /* function exit code */
4539  __pyx_L1_error:;
4540  __Pyx_XDECREF(__pyx_t_1);
4541  __Pyx_XDECREF(__pyx_t_2);
4542  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4543  __pyx_r = NULL;
4544  __pyx_L0:;
4545  __Pyx_XGIVEREF(__pyx_r);
4546  __Pyx_RefNannyFinishContext();
4547  return __pyx_r;
4548 }
4549 
4550 /* "PyClical.pyx":249
4551  * return index_set().wrap( self.instance.invert() )
4552  *
4553  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4554  * """
4555  * Symmetric set difference: exclusive or.
4556  */
4557 
4558 /* Python wrapper */
4559 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4560 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 ";
4561 #if CYTHON_COMPILING_IN_CPYTHON
4562 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4563 #endif
4564 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4565  PyObject *__pyx_r = 0;
4566  __Pyx_RefNannyDeclarations
4567  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4568  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4569 
4570  /* function exit code */
4571  __Pyx_RefNannyFinishContext();
4572  return __pyx_r;
4573 }
4574 
4575 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4576  PyObject *__pyx_r = NULL;
4577  __Pyx_RefNannyDeclarations
4578  PyObject *__pyx_t_1 = NULL;
4579  PyObject *__pyx_t_2 = NULL;
4580  __Pyx_RefNannySetupContext("__xor__", 0);
4581 
4582  /* "PyClical.pyx":258
4583  * {1}
4584  * """
4585  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4586  *
4587  * def __ixor__(self, rhs):
4588  */
4589  __Pyx_XDECREF(__pyx_r);
4590  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
4591  __Pyx_GOTREF(__pyx_t_1);
4592  __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_ERR(0, 258, __pyx_L1_error)
4593  __Pyx_GOTREF(__pyx_t_2);
4594  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4595  __pyx_r = __pyx_t_2;
4596  __pyx_t_2 = 0;
4597  goto __pyx_L0;
4598 
4599  /* "PyClical.pyx":249
4600  * return index_set().wrap( self.instance.invert() )
4601  *
4602  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4603  * """
4604  * Symmetric set difference: exclusive or.
4605  */
4606 
4607  /* function exit code */
4608  __pyx_L1_error:;
4609  __Pyx_XDECREF(__pyx_t_1);
4610  __Pyx_XDECREF(__pyx_t_2);
4611  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4612  __pyx_r = NULL;
4613  __pyx_L0:;
4614  __Pyx_XGIVEREF(__pyx_r);
4615  __Pyx_RefNannyFinishContext();
4616  return __pyx_r;
4617 }
4618 
4619 /* "PyClical.pyx":260
4620  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4621  *
4622  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4623  * """
4624  * Symmetric set difference: exclusive or.
4625  */
4626 
4627 /* Python wrapper */
4628 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4629 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 ";
4630 #if CYTHON_COMPILING_IN_CPYTHON
4631 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4632 #endif
4633 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4634  PyObject *__pyx_r = 0;
4635  __Pyx_RefNannyDeclarations
4636  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4637  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4638 
4639  /* function exit code */
4640  __Pyx_RefNannyFinishContext();
4641  return __pyx_r;
4642 }
4643 
4644 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4645  PyObject *__pyx_r = NULL;
4646  __Pyx_RefNannyDeclarations
4647  PyObject *__pyx_t_1 = NULL;
4648  __Pyx_RefNannySetupContext("__ixor__", 0);
4649 
4650  /* "PyClical.pyx":269
4651  * {1}
4652  * """
4653  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4654  *
4655  * def __and__(lhs, rhs):
4656  */
4657  __Pyx_XDECREF(__pyx_r);
4658  __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_ERR(0, 269, __pyx_L1_error)
4659  __Pyx_GOTREF(__pyx_t_1);
4660  __pyx_r = __pyx_t_1;
4661  __pyx_t_1 = 0;
4662  goto __pyx_L0;
4663 
4664  /* "PyClical.pyx":260
4665  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4666  *
4667  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4668  * """
4669  * Symmetric set difference: exclusive or.
4670  */
4671 
4672  /* function exit code */
4673  __pyx_L1_error:;
4674  __Pyx_XDECREF(__pyx_t_1);
4675  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4676  __pyx_r = NULL;
4677  __pyx_L0:;
4678  __Pyx_XGIVEREF(__pyx_r);
4679  __Pyx_RefNannyFinishContext();
4680  return __pyx_r;
4681 }
4682 
4683 /* "PyClical.pyx":271
4684  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4685  *
4686  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4687  * """
4688  * Set intersection: and.
4689  */
4690 
4691 /* Python wrapper */
4692 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4693 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 ";
4694 #if CYTHON_COMPILING_IN_CPYTHON
4695 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4696 #endif
4697 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4698  PyObject *__pyx_r = 0;
4699  __Pyx_RefNannyDeclarations
4700  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4701  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4702 
4703  /* function exit code */
4704  __Pyx_RefNannyFinishContext();
4705  return __pyx_r;
4706 }
4707 
4708 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4709  PyObject *__pyx_r = NULL;
4710  __Pyx_RefNannyDeclarations
4711  PyObject *__pyx_t_1 = NULL;
4712  PyObject *__pyx_t_2 = NULL;
4713  __Pyx_RefNannySetupContext("__and__", 0);
4714 
4715  /* "PyClical.pyx":280
4716  * {2}
4717  * """
4718  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4719  *
4720  * def __iand__(self, rhs):
4721  */
4722  __Pyx_XDECREF(__pyx_r);
4723  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
4724  __Pyx_GOTREF(__pyx_t_1);
4725  __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_ERR(0, 280, __pyx_L1_error)
4726  __Pyx_GOTREF(__pyx_t_2);
4727  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4728  __pyx_r = __pyx_t_2;
4729  __pyx_t_2 = 0;
4730  goto __pyx_L0;
4731 
4732  /* "PyClical.pyx":271
4733  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4734  *
4735  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4736  * """
4737  * Set intersection: and.
4738  */
4739 
4740  /* function exit code */
4741  __pyx_L1_error:;
4742  __Pyx_XDECREF(__pyx_t_1);
4743  __Pyx_XDECREF(__pyx_t_2);
4744  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4745  __pyx_r = NULL;
4746  __pyx_L0:;
4747  __Pyx_XGIVEREF(__pyx_r);
4748  __Pyx_RefNannyFinishContext();
4749  return __pyx_r;
4750 }
4751 
4752 /* "PyClical.pyx":282
4753  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4754  *
4755  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4756  * """
4757  * Set intersection: and.
4758  */
4759 
4760 /* Python wrapper */
4761 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4762 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 ";
4763 #if CYTHON_COMPILING_IN_CPYTHON
4764 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4765 #endif
4766 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4767  PyObject *__pyx_r = 0;
4768  __Pyx_RefNannyDeclarations
4769  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4770  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4771 
4772  /* function exit code */
4773  __Pyx_RefNannyFinishContext();
4774  return __pyx_r;
4775 }
4776 
4777 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4778  PyObject *__pyx_r = NULL;
4779  __Pyx_RefNannyDeclarations
4780  PyObject *__pyx_t_1 = NULL;
4781  __Pyx_RefNannySetupContext("__iand__", 0);
4782 
4783  /* "PyClical.pyx":291
4784  * {2}
4785  * """
4786  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4787  *
4788  * def __or__(lhs, rhs):
4789  */
4790  __Pyx_XDECREF(__pyx_r);
4791  __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_ERR(0, 291, __pyx_L1_error)
4792  __Pyx_GOTREF(__pyx_t_1);
4793  __pyx_r = __pyx_t_1;
4794  __pyx_t_1 = 0;
4795  goto __pyx_L0;
4796 
4797  /* "PyClical.pyx":282
4798  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4799  *
4800  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4801  * """
4802  * Set intersection: and.
4803  */
4804 
4805  /* function exit code */
4806  __pyx_L1_error:;
4807  __Pyx_XDECREF(__pyx_t_1);
4808  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4809  __pyx_r = NULL;
4810  __pyx_L0:;
4811  __Pyx_XGIVEREF(__pyx_r);
4812  __Pyx_RefNannyFinishContext();
4813  return __pyx_r;
4814 }
4815 
4816 /* "PyClical.pyx":293
4817  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4818  *
4819  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4820  * """
4821  * Set union: or.
4822  */
4823 
4824 /* Python wrapper */
4825 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4826 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 ";
4827 #if CYTHON_COMPILING_IN_CPYTHON
4828 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4829 #endif
4830 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4831  PyObject *__pyx_r = 0;
4832  __Pyx_RefNannyDeclarations
4833  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4834  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4835 
4836  /* function exit code */
4837  __Pyx_RefNannyFinishContext();
4838  return __pyx_r;
4839 }
4840 
4841 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4842  PyObject *__pyx_r = NULL;
4843  __Pyx_RefNannyDeclarations
4844  PyObject *__pyx_t_1 = NULL;
4845  PyObject *__pyx_t_2 = NULL;
4846  __Pyx_RefNannySetupContext("__or__", 0);
4847 
4848  /* "PyClical.pyx":302
4849  * {1,2}
4850  * """
4851  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4852  *
4853  * def __ior__(self, rhs):
4854  */
4855  __Pyx_XDECREF(__pyx_r);
4856  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
4857  __Pyx_GOTREF(__pyx_t_1);
4858  __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_ERR(0, 302, __pyx_L1_error)
4859  __Pyx_GOTREF(__pyx_t_2);
4860  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4861  __pyx_r = __pyx_t_2;
4862  __pyx_t_2 = 0;
4863  goto __pyx_L0;
4864 
4865  /* "PyClical.pyx":293
4866  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4867  *
4868  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4869  * """
4870  * Set union: or.
4871  */
4872 
4873  /* function exit code */
4874  __pyx_L1_error:;
4875  __Pyx_XDECREF(__pyx_t_1);
4876  __Pyx_XDECREF(__pyx_t_2);
4877  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4878  __pyx_r = NULL;
4879  __pyx_L0:;
4880  __Pyx_XGIVEREF(__pyx_r);
4881  __Pyx_RefNannyFinishContext();
4882  return __pyx_r;
4883 }
4884 
4885 /* "PyClical.pyx":304
4886  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4887  *
4888  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4889  * """
4890  * Set union: or.
4891  */
4892 
4893 /* Python wrapper */
4894 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4895 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 ";
4896 #if CYTHON_COMPILING_IN_CPYTHON
4897 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4898 #endif
4899 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4900  PyObject *__pyx_r = 0;
4901  __Pyx_RefNannyDeclarations
4902  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4903  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4904 
4905  /* function exit code */
4906  __Pyx_RefNannyFinishContext();
4907  return __pyx_r;
4908 }
4909 
4910 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4911  PyObject *__pyx_r = NULL;
4912  __Pyx_RefNannyDeclarations
4913  PyObject *__pyx_t_1 = NULL;
4914  __Pyx_RefNannySetupContext("__ior__", 0);
4915 
4916  /* "PyClical.pyx":313
4917  * {1,2}
4918  * """
4919  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4920  *
4921  * def count(self):
4922  */
4923  __Pyx_XDECREF(__pyx_r);
4924  __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_ERR(0, 313, __pyx_L1_error)
4925  __Pyx_GOTREF(__pyx_t_1);
4926  __pyx_r = __pyx_t_1;
4927  __pyx_t_1 = 0;
4928  goto __pyx_L0;
4929 
4930  /* "PyClical.pyx":304
4931  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4932  *
4933  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4934  * """
4935  * Set union: or.
4936  */
4937 
4938  /* function exit code */
4939  __pyx_L1_error:;
4940  __Pyx_XDECREF(__pyx_t_1);
4941  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4942  __pyx_r = NULL;
4943  __pyx_L0:;
4944  __Pyx_XGIVEREF(__pyx_r);
4945  __Pyx_RefNannyFinishContext();
4946  return __pyx_r;
4947 }
4948 
4949 /* "PyClical.pyx":315
4950  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4951  *
4952  * def count(self): # <<<<<<<<<<<<<<
4953  * """
4954  * Cardinality: Number of indices included in set.
4955  */
4956 
4957 /* Python wrapper */
4958 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4959 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 ";
4960 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4961  PyObject *__pyx_r = 0;
4962  __Pyx_RefNannyDeclarations
4963  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4964  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4965 
4966  /* function exit code */
4967  __Pyx_RefNannyFinishContext();
4968  return __pyx_r;
4969 }
4970 
4971 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4972  PyObject *__pyx_r = NULL;
4973  __Pyx_RefNannyDeclarations
4974  PyObject *__pyx_t_1 = NULL;
4975  __Pyx_RefNannySetupContext("count", 0);
4976 
4977  /* "PyClical.pyx":322
4978  * 3
4979  * """
4980  * return self.instance.count() # <<<<<<<<<<<<<<
4981  *
4982  * def count_neg(self):
4983  */
4984  __Pyx_XDECREF(__pyx_r);
4985  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
4986  __Pyx_GOTREF(__pyx_t_1);
4987  __pyx_r = __pyx_t_1;
4988  __pyx_t_1 = 0;
4989  goto __pyx_L0;
4990 
4991  /* "PyClical.pyx":315
4992  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4993  *
4994  * def count(self): # <<<<<<<<<<<<<<
4995  * """
4996  * Cardinality: Number of indices included in set.
4997  */
4998 
4999  /* function exit code */
5000  __pyx_L1_error:;
5001  __Pyx_XDECREF(__pyx_t_1);
5002  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
5003  __pyx_r = NULL;
5004  __pyx_L0:;
5005  __Pyx_XGIVEREF(__pyx_r);
5006  __Pyx_RefNannyFinishContext();
5007  return __pyx_r;
5008 }
5009 
5010 /* "PyClical.pyx":324
5011  * return self.instance.count()
5012  *
5013  * def count_neg(self): # <<<<<<<<<<<<<<
5014  * """
5015  * Number of negative indices included in set.
5016  */
5017 
5018 /* Python wrapper */
5019 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5020 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 ";
5021 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5022  PyObject *__pyx_r = 0;
5023  __Pyx_RefNannyDeclarations
5024  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
5025  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5026 
5027  /* function exit code */
5028  __Pyx_RefNannyFinishContext();
5029  return __pyx_r;
5030 }
5031 
5032 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5033  PyObject *__pyx_r = NULL;
5034  __Pyx_RefNannyDeclarations
5035  PyObject *__pyx_t_1 = NULL;
5036  __Pyx_RefNannySetupContext("count_neg", 0);
5037 
5038  /* "PyClical.pyx":331
5039  * 1
5040  * """
5041  * return self.instance.count_neg() # <<<<<<<<<<<<<<
5042  *
5043  * def count_pos(self):
5044  */
5045  __Pyx_XDECREF(__pyx_r);
5046  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_neg()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
5047  __Pyx_GOTREF(__pyx_t_1);
5048  __pyx_r = __pyx_t_1;
5049  __pyx_t_1 = 0;
5050  goto __pyx_L0;
5051 
5052  /* "PyClical.pyx":324
5053  * return self.instance.count()
5054  *
5055  * def count_neg(self): # <<<<<<<<<<<<<<
5056  * """
5057  * Number of negative indices included in set.
5058  */
5059 
5060  /* function exit code */
5061  __pyx_L1_error:;
5062  __Pyx_XDECREF(__pyx_t_1);
5063  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5064  __pyx_r = NULL;
5065  __pyx_L0:;
5066  __Pyx_XGIVEREF(__pyx_r);
5067  __Pyx_RefNannyFinishContext();
5068  return __pyx_r;
5069 }
5070 
5071 /* "PyClical.pyx":333
5072  * return self.instance.count_neg()
5073  *
5074  * def count_pos(self): # <<<<<<<<<<<<<<
5075  * """
5076  * Number of positive indices included in set.
5077  */
5078 
5079 /* Python wrapper */
5080 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5081 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 ";
5082 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5083  PyObject *__pyx_r = 0;
5084  __Pyx_RefNannyDeclarations
5085  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5086  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5087 
5088  /* function exit code */
5089  __Pyx_RefNannyFinishContext();
5090  return __pyx_r;
5091 }
5092 
5093 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5094  PyObject *__pyx_r = NULL;
5095  __Pyx_RefNannyDeclarations
5096  PyObject *__pyx_t_1 = NULL;
5097  __Pyx_RefNannySetupContext("count_pos", 0);
5098 
5099  /* "PyClical.pyx":340
5100  * 2
5101  * """
5102  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5103  *
5104  * def min(self):
5105  */
5106  __Pyx_XDECREF(__pyx_r);
5107  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_pos()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
5108  __Pyx_GOTREF(__pyx_t_1);
5109  __pyx_r = __pyx_t_1;
5110  __pyx_t_1 = 0;
5111  goto __pyx_L0;
5112 
5113  /* "PyClical.pyx":333
5114  * return self.instance.count_neg()
5115  *
5116  * def count_pos(self): # <<<<<<<<<<<<<<
5117  * """
5118  * Number of positive indices included in set.
5119  */
5120 
5121  /* function exit code */
5122  __pyx_L1_error:;
5123  __Pyx_XDECREF(__pyx_t_1);
5124  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5125  __pyx_r = NULL;
5126  __pyx_L0:;
5127  __Pyx_XGIVEREF(__pyx_r);
5128  __Pyx_RefNannyFinishContext();
5129  return __pyx_r;
5130 }
5131 
5132 /* "PyClical.pyx":342
5133  * return self.instance.count_pos()
5134  *
5135  * def min(self): # <<<<<<<<<<<<<<
5136  * """
5137  * Minimum member.
5138  */
5139 
5140 /* Python wrapper */
5141 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5142 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5143 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5144  PyObject *__pyx_r = 0;
5145  __Pyx_RefNannyDeclarations
5146  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5147  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5148 
5149  /* function exit code */
5150  __Pyx_RefNannyFinishContext();
5151  return __pyx_r;
5152 }
5153 
5154 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5155  PyObject *__pyx_r = NULL;
5156  __Pyx_RefNannyDeclarations
5157  PyObject *__pyx_t_1 = NULL;
5158  __Pyx_RefNannySetupContext("min", 0);
5159 
5160  /* "PyClical.pyx":349
5161  * -1
5162  * """
5163  * return self.instance.min() # <<<<<<<<<<<<<<
5164  *
5165  * def max(self):
5166  */
5167  __Pyx_XDECREF(__pyx_r);
5168  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
5169  __Pyx_GOTREF(__pyx_t_1);
5170  __pyx_r = __pyx_t_1;
5171  __pyx_t_1 = 0;
5172  goto __pyx_L0;
5173 
5174  /* "PyClical.pyx":342
5175  * return self.instance.count_pos()
5176  *
5177  * def min(self): # <<<<<<<<<<<<<<
5178  * """
5179  * Minimum member.
5180  */
5181 
5182  /* function exit code */
5183  __pyx_L1_error:;
5184  __Pyx_XDECREF(__pyx_t_1);
5185  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5186  __pyx_r = NULL;
5187  __pyx_L0:;
5188  __Pyx_XGIVEREF(__pyx_r);
5189  __Pyx_RefNannyFinishContext();
5190  return __pyx_r;
5191 }
5192 
5193 /* "PyClical.pyx":351
5194  * return self.instance.min()
5195  *
5196  * def max(self): # <<<<<<<<<<<<<<
5197  * """
5198  * Maximum member.
5199  */
5200 
5201 /* Python wrapper */
5202 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5203 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5204 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5205  PyObject *__pyx_r = 0;
5206  __Pyx_RefNannyDeclarations
5207  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5208  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5209 
5210  /* function exit code */
5211  __Pyx_RefNannyFinishContext();
5212  return __pyx_r;
5213 }
5214 
5215 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5216  PyObject *__pyx_r = NULL;
5217  __Pyx_RefNannyDeclarations
5218  PyObject *__pyx_t_1 = NULL;
5219  __Pyx_RefNannySetupContext("max", 0);
5220 
5221  /* "PyClical.pyx":358
5222  * 2
5223  * """
5224  * return self.instance.max() # <<<<<<<<<<<<<<
5225  *
5226  * def hash_fn(self):
5227  */
5228  __Pyx_XDECREF(__pyx_r);
5229  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
5230  __Pyx_GOTREF(__pyx_t_1);
5231  __pyx_r = __pyx_t_1;
5232  __pyx_t_1 = 0;
5233  goto __pyx_L0;
5234 
5235  /* "PyClical.pyx":351
5236  * return self.instance.min()
5237  *
5238  * def max(self): # <<<<<<<<<<<<<<
5239  * """
5240  * Maximum member.
5241  */
5242 
5243  /* function exit code */
5244  __pyx_L1_error:;
5245  __Pyx_XDECREF(__pyx_t_1);
5246  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5247  __pyx_r = NULL;
5248  __pyx_L0:;
5249  __Pyx_XGIVEREF(__pyx_r);
5250  __Pyx_RefNannyFinishContext();
5251  return __pyx_r;
5252 }
5253 
5254 /* "PyClical.pyx":360
5255  * return self.instance.max()
5256  *
5257  * def hash_fn(self): # <<<<<<<<<<<<<<
5258  * """
5259  * Hash function.
5260  */
5261 
5262 /* Python wrapper */
5263 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5264 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5265 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5266  PyObject *__pyx_r = 0;
5267  __Pyx_RefNannyDeclarations
5268  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5269  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5270 
5271  /* function exit code */
5272  __Pyx_RefNannyFinishContext();
5273  return __pyx_r;
5274 }
5275 
5276 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5277  PyObject *__pyx_r = NULL;
5278  __Pyx_RefNannyDeclarations
5279  PyObject *__pyx_t_1 = NULL;
5280  __Pyx_RefNannySetupContext("hash_fn", 0);
5281 
5282  /* "PyClical.pyx":364
5283  * Hash function.
5284  * """
5285  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5286  *
5287  * def sign_of_mult(self, rhs):
5288  */
5289  __Pyx_XDECREF(__pyx_r);
5290  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->hash_fn()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
5291  __Pyx_GOTREF(__pyx_t_1);
5292  __pyx_r = __pyx_t_1;
5293  __pyx_t_1 = 0;
5294  goto __pyx_L0;
5295 
5296  /* "PyClical.pyx":360
5297  * return self.instance.max()
5298  *
5299  * def hash_fn(self): # <<<<<<<<<<<<<<
5300  * """
5301  * Hash function.
5302  */
5303 
5304  /* function exit code */
5305  __pyx_L1_error:;
5306  __Pyx_XDECREF(__pyx_t_1);
5307  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5308  __pyx_r = NULL;
5309  __pyx_L0:;
5310  __Pyx_XGIVEREF(__pyx_r);
5311  __Pyx_RefNannyFinishContext();
5312  return __pyx_r;
5313 }
5314 
5315 /* "PyClical.pyx":366
5316  * return self.instance.hash_fn()
5317  *
5318  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5319  * """
5320  * Sign of geometric product of two Clifford basis elements.
5321  */
5322 
5323 /* Python wrapper */
5324 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5325 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 ";
5326 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5327  PyObject *__pyx_r = 0;
5328  __Pyx_RefNannyDeclarations
5329  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5330  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5331 
5332  /* function exit code */
5333  __Pyx_RefNannyFinishContext();
5334  return __pyx_r;
5335 }
5336 
5337 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5338  PyObject *__pyx_r = NULL;
5339  __Pyx_RefNannyDeclarations
5340  PyObject *__pyx_t_1 = NULL;
5341  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5342 
5343  /* "PyClical.pyx":373
5344  * 1
5345  * """
5346  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5347  *
5348  * def sign_of_square(self):
5349  */
5350  __Pyx_XDECREF(__pyx_r);
5351  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_mult(__pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
5352  __Pyx_GOTREF(__pyx_t_1);
5353  __pyx_r = __pyx_t_1;
5354  __pyx_t_1 = 0;
5355  goto __pyx_L0;
5356 
5357  /* "PyClical.pyx":366
5358  * return self.instance.hash_fn()
5359  *
5360  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5361  * """
5362  * Sign of geometric product of two Clifford basis elements.
5363  */
5364 
5365  /* function exit code */
5366  __pyx_L1_error:;
5367  __Pyx_XDECREF(__pyx_t_1);
5368  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5369  __pyx_r = NULL;
5370  __pyx_L0:;
5371  __Pyx_XGIVEREF(__pyx_r);
5372  __Pyx_RefNannyFinishContext();
5373  return __pyx_r;
5374 }
5375 
5376 /* "PyClical.pyx":375
5377  * return self.instance.sign_of_mult(toIndexSet(rhs))
5378  *
5379  * def sign_of_square(self): # <<<<<<<<<<<<<<
5380  * """
5381  * Sign of geometric square of a Clifford basis element.
5382  */
5383 
5384 /* Python wrapper */
5385 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5386 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 ";
5387 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5388  PyObject *__pyx_r = 0;
5389  __Pyx_RefNannyDeclarations
5390  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5391  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5392 
5393  /* function exit code */
5394  __Pyx_RefNannyFinishContext();
5395  return __pyx_r;
5396 }
5397 
5398 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5399  PyObject *__pyx_r = NULL;
5400  __Pyx_RefNannyDeclarations
5401  PyObject *__pyx_t_1 = NULL;
5402  __Pyx_RefNannySetupContext("sign_of_square", 0);
5403 
5404  /* "PyClical.pyx":382
5405  * -1
5406  * """
5407  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5408  *
5409  * def __repr__(self):
5410  */
5411  __Pyx_XDECREF(__pyx_r);
5412  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_square()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
5413  __Pyx_GOTREF(__pyx_t_1);
5414  __pyx_r = __pyx_t_1;
5415  __pyx_t_1 = 0;
5416  goto __pyx_L0;
5417 
5418  /* "PyClical.pyx":375
5419  * return self.instance.sign_of_mult(toIndexSet(rhs))
5420  *
5421  * def sign_of_square(self): # <<<<<<<<<<<<<<
5422  * """
5423  * Sign of geometric square of a Clifford basis element.
5424  */
5425 
5426  /* function exit code */
5427  __pyx_L1_error:;
5428  __Pyx_XDECREF(__pyx_t_1);
5429  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5430  __pyx_r = NULL;
5431  __pyx_L0:;
5432  __Pyx_XGIVEREF(__pyx_r);
5433  __Pyx_RefNannyFinishContext();
5434  return __pyx_r;
5435 }
5436 
5437 /* "PyClical.pyx":384
5438  * return self.instance.sign_of_square()
5439  *
5440  * def __repr__(self): # <<<<<<<<<<<<<<
5441  * """
5442  * The official string representation of self.
5443  */
5444 
5445 /* Python wrapper */
5446 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5447 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 ";
5448 #if CYTHON_COMPILING_IN_CPYTHON
5449 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5450 #endif
5451 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5452  PyObject *__pyx_r = 0;
5453  __Pyx_RefNannyDeclarations
5454  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5455  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5456 
5457  /* function exit code */
5458  __Pyx_RefNannyFinishContext();
5459  return __pyx_r;
5460 }
5461 
5462 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5463  PyObject *__pyx_r = NULL;
5464  __Pyx_RefNannyDeclarations
5465  PyObject *__pyx_t_1 = NULL;
5466  __Pyx_RefNannySetupContext("__repr__", 0);
5467 
5468  /* "PyClical.pyx":393
5469  * 'index_set({1,2})'
5470  * """
5471  * return index_set_to_repr( self.unwrap() ).decode() # <<<<<<<<<<<<<<
5472  *
5473  * def __str__(self):
5474  */
5475  __Pyx_XDECREF(__pyx_r);
5476  __pyx_t_1 = __Pyx_decode_cpp_string(index_set_to_repr(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)
5477  __Pyx_GOTREF(__pyx_t_1);
5478  __pyx_r = __pyx_t_1;
5479  __pyx_t_1 = 0;
5480  goto __pyx_L0;
5481 
5482  /* "PyClical.pyx":384
5483  * return self.instance.sign_of_square()
5484  *
5485  * def __repr__(self): # <<<<<<<<<<<<<<
5486  * """
5487  * The official string representation of self.
5488  */
5489 
5490  /* function exit code */
5491  __pyx_L1_error:;
5492  __Pyx_XDECREF(__pyx_t_1);
5493  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5494  __pyx_r = NULL;
5495  __pyx_L0:;
5496  __Pyx_XGIVEREF(__pyx_r);
5497  __Pyx_RefNannyFinishContext();
5498  return __pyx_r;
5499 }
5500 
5501 /* "PyClical.pyx":395
5502  * return index_set_to_repr( self.unwrap() ).decode()
5503  *
5504  * def __str__(self): # <<<<<<<<<<<<<<
5505  * """
5506  * The informal string representation of self.
5507  */
5508 
5509 /* Python wrapper */
5510 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5511 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 ";
5512 #if CYTHON_COMPILING_IN_CPYTHON
5513 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5514 #endif
5515 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5516  PyObject *__pyx_r = 0;
5517  __Pyx_RefNannyDeclarations
5518  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5519  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5520 
5521  /* function exit code */
5522  __Pyx_RefNannyFinishContext();
5523  return __pyx_r;
5524 }
5525 
5526 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5527  PyObject *__pyx_r = NULL;
5528  __Pyx_RefNannyDeclarations
5529  PyObject *__pyx_t_1 = NULL;
5530  __Pyx_RefNannySetupContext("__str__", 0);
5531 
5532  /* "PyClical.pyx":404
5533  * '{1,2}'
5534  * """
5535  * return index_set_to_str( self.unwrap() ).decode() # <<<<<<<<<<<<<<
5536  *
5537  * def index_set_hidden_doctests():
5538  */
5539  __Pyx_XDECREF(__pyx_r);
5540  __pyx_t_1 = __Pyx_decode_cpp_string(index_set_to_str(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
5541  __Pyx_GOTREF(__pyx_t_1);
5542  __pyx_r = __pyx_t_1;
5543  __pyx_t_1 = 0;
5544  goto __pyx_L0;
5545 
5546  /* "PyClical.pyx":395
5547  * return index_set_to_repr( self.unwrap() ).decode()
5548  *
5549  * def __str__(self): # <<<<<<<<<<<<<<
5550  * """
5551  * The informal string representation of self.
5552  */
5553 
5554  /* function exit code */
5555  __pyx_L1_error:;
5556  __Pyx_XDECREF(__pyx_t_1);
5557  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5558  __pyx_r = NULL;
5559  __pyx_L0:;
5560  __Pyx_XGIVEREF(__pyx_r);
5561  __Pyx_RefNannyFinishContext();
5562  return __pyx_r;
5563 }
5564 
5565 /* "(tree fragment)":1
5566  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5567  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5568  * def __setstate_cython__(self, __pyx_state):
5569  */
5570 
5571 /* Python wrapper */
5572 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5573 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5574  PyObject *__pyx_r = 0;
5575  __Pyx_RefNannyDeclarations
5576  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5577  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5578 
5579  /* function exit code */
5580  __Pyx_RefNannyFinishContext();
5581  return __pyx_r;
5582 }
5583 
5584 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5585  PyObject *__pyx_r = NULL;
5586  __Pyx_RefNannyDeclarations
5587  PyObject *__pyx_t_1 = NULL;
5588  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5589 
5590  /* "(tree fragment)":2
5591  * def __reduce_cython__(self):
5592  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5593  * def __setstate_cython__(self, __pyx_state):
5594  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5595  */
5596  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
5597  __Pyx_GOTREF(__pyx_t_1);
5598  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5599  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5600  __PYX_ERR(1, 2, __pyx_L1_error)
5601 
5602  /* "(tree fragment)":1
5603  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5604  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5605  * def __setstate_cython__(self, __pyx_state):
5606  */
5607 
5608  /* function exit code */
5609  __pyx_L1_error:;
5610  __Pyx_XDECREF(__pyx_t_1);
5611  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5612  __pyx_r = NULL;
5613  __Pyx_XGIVEREF(__pyx_r);
5614  __Pyx_RefNannyFinishContext();
5615  return __pyx_r;
5616 }
5617 
5618 /* "(tree fragment)":3
5619  * def __reduce_cython__(self):
5620  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5621  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5622  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5623  */
5624 
5625 /* Python wrapper */
5626 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5627 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5628  PyObject *__pyx_r = 0;
5629  __Pyx_RefNannyDeclarations
5630  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5631  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5632 
5633  /* function exit code */
5634  __Pyx_RefNannyFinishContext();
5635  return __pyx_r;
5636 }
5637 
5638 static PyObject *__pyx_pf_8PyClical_9index_set_53__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
5639  PyObject *__pyx_r = NULL;
5640  __Pyx_RefNannyDeclarations
5641  PyObject *__pyx_t_1 = NULL;
5642  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5643 
5644  /* "(tree fragment)":4
5645  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5646  * def __setstate_cython__(self, __pyx_state):
5647  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5648  */
5649  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
5650  __Pyx_GOTREF(__pyx_t_1);
5651  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5652  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5653  __PYX_ERR(1, 4, __pyx_L1_error)
5654 
5655  /* "(tree fragment)":3
5656  * def __reduce_cython__(self):
5657  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5658  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5659  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5660  */
5661 
5662  /* function exit code */
5663  __pyx_L1_error:;
5664  __Pyx_XDECREF(__pyx_t_1);
5665  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5666  __pyx_r = NULL;
5667  __Pyx_XGIVEREF(__pyx_r);
5668  __Pyx_RefNannyFinishContext();
5669  return __pyx_r;
5670 }
5671 
5672 /* "PyClical.pyx":406
5673  * return index_set_to_str( self.unwrap() ).decode()
5674  *
5675  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5676  * """
5677  * Tests for functions that Doctest cannot see.
5678  */
5679 
5680 /* Python wrapper */
5681 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5682 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 {1, 2, 100}.\n >>> print(index_set([1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <class '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_set({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 ";
5683  static PyMethodDef __pyx_mdef_8PyClical_1index_set_hidden_doctests = {"index_set_hidden_doctests", (PyCFunction)__pyx_pw_8PyClical_1index_set_hidden_doctests, METH_NOARGS, __pyx_doc_8PyClical_index_set_hidden_doctests};
5684  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5685  PyObject *__pyx_r = 0;
5686  __Pyx_RefNannyDeclarations
5687  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5688  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5689 
5690  /* function exit code */
5691  __Pyx_RefNannyFinishContext();
5692  return __pyx_r;
5693  }
5694 
5695  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5696  PyObject *__pyx_r = NULL;
5697  __Pyx_RefNannyDeclarations
5698  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5699 
5700  /* "PyClical.pyx":490
5701  * False
5702  * """
5703  * return # <<<<<<<<<<<<<<
5704  *
5705  * cpdef inline compare(lhs,rhs):
5706  */
5707  __Pyx_XDECREF(__pyx_r);
5708  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5709  goto __pyx_L0;
5710 
5711  /* "PyClical.pyx":406
5712  * return index_set_to_str( self.unwrap() ).decode()
5713  *
5714  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5715  * """
5716  * Tests for functions that Doctest cannot see.
5717  */
5718 
5719  /* function exit code */
5720  __pyx_L0:;
5721  __Pyx_XGIVEREF(__pyx_r);
5722  __Pyx_RefNannyFinishContext();
5723  return __pyx_r;
5724  }
5725 
5726  /* "PyClical.pyx":492
5727  * return
5728  *
5729  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5730  * """
5731  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5732  */
5733 
5734  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5735  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5736  PyObject *__pyx_r = NULL;
5737  __Pyx_RefNannyDeclarations
5738  PyObject *__pyx_t_1 = NULL;
5739  __Pyx_RefNannySetupContext("compare", 0);
5740 
5741  /* "PyClical.pyx":502
5742  * 1
5743  * """
5744  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5745  *
5746  * cpdef inline min_neg(obj):
5747  */
5748  __Pyx_XDECREF(__pyx_r);
5749  __pyx_t_1 = __Pyx_PyInt_From_int(compare(__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs), __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5750  __Pyx_GOTREF(__pyx_t_1);
5751  __pyx_r = __pyx_t_1;
5752  __pyx_t_1 = 0;
5753  goto __pyx_L0;
5754 
5755  /* "PyClical.pyx":492
5756  * return
5757  *
5758  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5759  * """
5760  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5761  */
5762 
5763  /* function exit code */
5764  __pyx_L1_error:;
5765  __Pyx_XDECREF(__pyx_t_1);
5766  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5767  __pyx_r = 0;
5768  __pyx_L0:;
5769  __Pyx_XGIVEREF(__pyx_r);
5770  __Pyx_RefNannyFinishContext();
5771  return __pyx_r;
5772  }
5773 
5774  /* Python wrapper */
5775  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5776  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 ";
5777  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5778  PyObject *__pyx_v_lhs = 0;
5779  PyObject *__pyx_v_rhs = 0;
5780  PyObject *__pyx_r = 0;
5781  __Pyx_RefNannyDeclarations
5782  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5783  {
5784  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5785  PyObject* values[2] = {0,0};
5786  if (unlikely(__pyx_kwds)) {
5787  Py_ssize_t kw_args;
5788  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5789  switch (pos_args) {
5790  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5791  CYTHON_FALLTHROUGH;
5792  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5793  CYTHON_FALLTHROUGH;
5794  case 0: break;
5795  default: goto __pyx_L5_argtuple_error;
5796  }
5797  kw_args = PyDict_Size(__pyx_kwds);
5798  switch (pos_args) {
5799  case 0:
5800  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5801  else goto __pyx_L5_argtuple_error;
5802  CYTHON_FALLTHROUGH;
5803  case 1:
5804  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5805  else {
5806  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 492, __pyx_L3_error)
5807  }
5808  }
5809  if (unlikely(kw_args > 0)) {
5810  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 492, __pyx_L3_error)
5811  }
5812  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5813  goto __pyx_L5_argtuple_error;
5814  } else {
5815  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5816  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5817  }
5818  __pyx_v_lhs = values[0];
5819  __pyx_v_rhs = values[1];
5820  }
5821  goto __pyx_L4_argument_unpacking_done;
5822  __pyx_L5_argtuple_error:;
5823  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 492, __pyx_L3_error)
5824  __pyx_L3_error:;
5825  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5826  __Pyx_RefNannyFinishContext();
5827  return NULL;
5828  __pyx_L4_argument_unpacking_done:;
5829  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5830 
5831  /* function exit code */
5832  __Pyx_RefNannyFinishContext();
5833  return __pyx_r;
5834  }
5835 
5836  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5837  PyObject *__pyx_r = NULL;
5838  __Pyx_RefNannyDeclarations
5839  PyObject *__pyx_t_1 = NULL;
5840  __Pyx_RefNannySetupContext("compare", 0);
5841  __Pyx_XDECREF(__pyx_r);
5842  __pyx_t_1 = __pyx_f_8PyClical_compare(__pyx_v_lhs, __pyx_v_rhs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error)
5843  __Pyx_GOTREF(__pyx_t_1);
5844  __pyx_r = __pyx_t_1;
5845  __pyx_t_1 = 0;
5846  goto __pyx_L0;
5847 
5848  /* function exit code */
5849  __pyx_L1_error:;
5850  __Pyx_XDECREF(__pyx_t_1);
5851  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5852  __pyx_r = NULL;
5853  __pyx_L0:;
5854  __Pyx_XGIVEREF(__pyx_r);
5855  __Pyx_RefNannyFinishContext();
5856  return __pyx_r;
5857  }
5858 
5859  /* "PyClical.pyx":504
5860  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5861  *
5862  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5863  * """
5864  * Minimum negative index, or 0 if none.
5865  */
5866 
5867  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5868  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5869  PyObject *__pyx_r = NULL;
5870  __Pyx_RefNannyDeclarations
5871  PyObject *__pyx_t_1 = NULL;
5872  __Pyx_RefNannySetupContext("min_neg", 0);
5873 
5874  /* "PyClical.pyx":511
5875  * 0
5876  * """
5877  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5878  *
5879  * cpdef inline max_pos(obj):
5880  */
5881  __Pyx_XDECREF(__pyx_r);
5882  __pyx_t_1 = __Pyx_PyInt_From_int(min_neg(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5883  __Pyx_GOTREF(__pyx_t_1);
5884  __pyx_r = __pyx_t_1;
5885  __pyx_t_1 = 0;
5886  goto __pyx_L0;
5887 
5888  /* "PyClical.pyx":504
5889  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5890  *
5891  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5892  * """
5893  * Minimum negative index, or 0 if none.
5894  */
5895 
5896  /* function exit code */
5897  __pyx_L1_error:;
5898  __Pyx_XDECREF(__pyx_t_1);
5899  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5900  __pyx_r = 0;
5901  __pyx_L0:;
5902  __Pyx_XGIVEREF(__pyx_r);
5903  __Pyx_RefNannyFinishContext();
5904  return __pyx_r;
5905  }
5906 
5907  /* Python wrapper */
5908  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5909  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 ";
5910  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5911  PyObject *__pyx_r = 0;
5912  __Pyx_RefNannyDeclarations
5913  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5914  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5915 
5916  /* function exit code */
5917  __Pyx_RefNannyFinishContext();
5918  return __pyx_r;
5919  }
5920 
5921  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5922  PyObject *__pyx_r = NULL;
5923  __Pyx_RefNannyDeclarations
5924  PyObject *__pyx_t_1 = NULL;
5925  __Pyx_RefNannySetupContext("min_neg", 0);
5926  __Pyx_XDECREF(__pyx_r);
5927  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
5928  __Pyx_GOTREF(__pyx_t_1);
5929  __pyx_r = __pyx_t_1;
5930  __pyx_t_1 = 0;
5931  goto __pyx_L0;
5932 
5933  /* function exit code */
5934  __pyx_L1_error:;
5935  __Pyx_XDECREF(__pyx_t_1);
5936  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5937  __pyx_r = NULL;
5938  __pyx_L0:;
5939  __Pyx_XGIVEREF(__pyx_r);
5940  __Pyx_RefNannyFinishContext();
5941  return __pyx_r;
5942  }
5943 
5944  /* "PyClical.pyx":513
5945  * return glucat.min_neg( toIndexSet(obj) )
5946  *
5947  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5948  * """
5949  * Maximum positive index, or 0 if none.
5950  */
5951 
5952  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5953  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5954  PyObject *__pyx_r = NULL;
5955  __Pyx_RefNannyDeclarations
5956  PyObject *__pyx_t_1 = NULL;
5957  __Pyx_RefNannySetupContext("max_pos", 0);
5958 
5959  /* "PyClical.pyx":520
5960  * 2
5961  * """
5962  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5963  *
5964  * cdef inline vector[scalar_t] list_to_vector(lst):
5965  */
5966  __Pyx_XDECREF(__pyx_r);
5967  __pyx_t_1 = __Pyx_PyInt_From_int(max_pos(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
5968  __Pyx_GOTREF(__pyx_t_1);
5969  __pyx_r = __pyx_t_1;
5970  __pyx_t_1 = 0;
5971  goto __pyx_L0;
5972 
5973  /* "PyClical.pyx":513
5974  * return glucat.min_neg( toIndexSet(obj) )
5975  *
5976  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5977  * """
5978  * Maximum positive index, or 0 if none.
5979  */
5980 
5981  /* function exit code */
5982  __pyx_L1_error:;
5983  __Pyx_XDECREF(__pyx_t_1);
5984  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5985  __pyx_r = 0;
5986  __pyx_L0:;
5987  __Pyx_XGIVEREF(__pyx_r);
5988  __Pyx_RefNannyFinishContext();
5989  return __pyx_r;
5990  }
5991 
5992  /* Python wrapper */
5993  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5994  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 ";
5995  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5996  PyObject *__pyx_r = 0;
5997  __Pyx_RefNannyDeclarations
5998  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5999  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
6000 
6001  /* function exit code */
6002  __Pyx_RefNannyFinishContext();
6003  return __pyx_r;
6004  }
6005 
6006  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6007  PyObject *__pyx_r = NULL;
6008  __Pyx_RefNannyDeclarations
6009  PyObject *__pyx_t_1 = NULL;
6010  __Pyx_RefNannySetupContext("max_pos", 0);
6011  __Pyx_XDECREF(__pyx_r);
6012  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
6013  __Pyx_GOTREF(__pyx_t_1);
6014  __pyx_r = __pyx_t_1;
6015  __pyx_t_1 = 0;
6016  goto __pyx_L0;
6017 
6018  /* function exit code */
6019  __pyx_L1_error:;
6020  __Pyx_XDECREF(__pyx_t_1);
6021  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
6022  __pyx_r = NULL;
6023  __pyx_L0:;
6024  __Pyx_XGIVEREF(__pyx_r);
6025  __Pyx_RefNannyFinishContext();
6026  return __pyx_r;
6027  }
6028 
6029  /* "PyClical.pyx":522
6030  * return glucat.max_pos( toIndexSet(obj) )
6031  *
6032  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6033  * """
6034  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6035  */
6036 
6037  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
6038  std::vector<scalar_t> __pyx_v_v;
6039  PyObject *__pyx_v_s = NULL;
6040  std::vector<scalar_t> __pyx_r;
6041  __Pyx_RefNannyDeclarations
6042  PyObject *__pyx_t_1 = NULL;
6043  Py_ssize_t __pyx_t_2;
6044  PyObject *(*__pyx_t_3)(PyObject *);
6045  PyObject *__pyx_t_4 = NULL;
6046  scalar_t __pyx_t_5;
6047  __Pyx_RefNannySetupContext("list_to_vector", 0);
6048 
6049  /* "PyClical.pyx":527
6050  * """
6051  * cdef vector[scalar_t] v
6052  * for s in lst: # <<<<<<<<<<<<<<
6053  * v.push_back(<scalar_t>s)
6054  * return v
6055  */
6056  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
6057  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
6058  __pyx_t_3 = NULL;
6059  } else {
6060  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
6061  __Pyx_GOTREF(__pyx_t_1);
6062  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
6063  }
6064  for (;;) {
6065  if (likely(!__pyx_t_3)) {
6066  if (likely(PyList_CheckExact(__pyx_t_1))) {
6067  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
6068  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6069  __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_ERR(0, 527, __pyx_L1_error)
6070  #else
6071  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
6072  __Pyx_GOTREF(__pyx_t_4);
6073  #endif
6074  } else {
6075  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
6076  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6077  __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_ERR(0, 527, __pyx_L1_error)
6078  #else
6079  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
6080  __Pyx_GOTREF(__pyx_t_4);
6081  #endif
6082  }
6083  } else {
6084  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6085  if (unlikely(!__pyx_t_4)) {
6086  PyObject* exc_type = PyErr_Occurred();
6087  if (exc_type) {
6088  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6089  else __PYX_ERR(0, 527, __pyx_L1_error)
6090  }
6091  break;
6092  }
6093  __Pyx_GOTREF(__pyx_t_4);
6094  }
6095  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6096  __pyx_t_4 = 0;
6097 
6098  /* "PyClical.pyx":528
6099  * cdef vector[scalar_t] v
6100  * for s in lst:
6101  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6102  * return v
6103  *
6104  */
6105  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_s); if (unlikely((__pyx_t_5 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 528, __pyx_L1_error)
6106  try {
6107  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6108  } catch(...) {
6109  __Pyx_CppExn2PyErr();
6110  __PYX_ERR(0, 528, __pyx_L1_error)
6111  }
6112 
6113  /* "PyClical.pyx":527
6114  * """
6115  * cdef vector[scalar_t] v
6116  * for s in lst: # <<<<<<<<<<<<<<
6117  * v.push_back(<scalar_t>s)
6118  * return v
6119  */
6120  }
6121  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6122 
6123  /* "PyClical.pyx":529
6124  * for s in lst:
6125  * v.push_back(<scalar_t>s)
6126  * return v # <<<<<<<<<<<<<<
6127  *
6128  * # Forward reference.
6129  */
6130  __pyx_r = __pyx_v_v;
6131  goto __pyx_L0;
6132 
6133  /* "PyClical.pyx":522
6134  * return glucat.max_pos( toIndexSet(obj) )
6135  *
6136  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6137  * """
6138  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6139  */
6140 
6141  /* function exit code */
6142  __pyx_L1_error:;
6143  __Pyx_XDECREF(__pyx_t_1);
6144  __Pyx_XDECREF(__pyx_t_4);
6145  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6146  __Pyx_pretend_to_initialize(&__pyx_r);
6147  __pyx_L0:;
6148  __Pyx_XDECREF(__pyx_v_s);
6149  __Pyx_RefNannyFinishContext();
6150  return __pyx_r;
6151  }
6152 
6153  /* "PyClical.pyx":534
6154  * cdef class clifford
6155  *
6156  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6157  * return clifford(obj).instance[0]
6158  *
6159  */
6160 
6161  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6162  Clifford __pyx_r;
6163  __Pyx_RefNannyDeclarations
6164  PyObject *__pyx_t_1 = NULL;
6165  __Pyx_RefNannySetupContext("toClifford", 0);
6166 
6167  /* "PyClical.pyx":535
6168  *
6169  * cdef inline Clifford toClifford(obj):
6170  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6171  *
6172  * cdef class clifford:
6173  */
6174  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
6175  __Pyx_GOTREF(__pyx_t_1);
6176  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6177  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6178  goto __pyx_L0;
6179 
6180  /* "PyClical.pyx":534
6181  * cdef class clifford
6182  *
6183  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6184  * return clifford(obj).instance[0]
6185  *
6186  */
6187 
6188  /* function exit code */
6189  __pyx_L1_error:;
6190  __Pyx_XDECREF(__pyx_t_1);
6191  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6192  __Pyx_pretend_to_initialize(&__pyx_r);
6193  __pyx_L0:;
6194  __Pyx_RefNannyFinishContext();
6195  return __pyx_r;
6196  }
6197 
6198  /* "PyClical.pyx":543
6199  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6200  *
6201  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6202  * """
6203  * Wrap an instance of the C++ class Clifford.
6204  */
6205 
6206  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6207  PyObject *__pyx_r = NULL;
6208  __Pyx_RefNannyDeclarations
6209  __Pyx_RefNannySetupContext("wrap", 0);
6210 
6211  /* "PyClical.pyx":547
6212  * Wrap an instance of the C++ class Clifford.
6213  * """
6214  * self.instance[0] = other # <<<<<<<<<<<<<<
6215  * return self
6216  *
6217  */
6218  (__pyx_v_self->instance[0]) = __pyx_v_other;
6219 
6220  /* "PyClical.pyx":548
6221  * """
6222  * self.instance[0] = other
6223  * return self # <<<<<<<<<<<<<<
6224  *
6225  * cdef inline Clifford unwrap(clifford self):
6226  */
6227  __Pyx_XDECREF(__pyx_r);
6228  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6229  __pyx_r = ((PyObject *)__pyx_v_self);
6230  goto __pyx_L0;
6231 
6232  /* "PyClical.pyx":543
6233  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6234  *
6235  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6236  * """
6237  * Wrap an instance of the C++ class Clifford.
6238  */
6239 
6240  /* function exit code */
6241  __pyx_L0:;
6242  __Pyx_XGIVEREF(__pyx_r);
6243  __Pyx_RefNannyFinishContext();
6244  return __pyx_r;
6245  }
6246 
6247  /* "PyClical.pyx":550
6248  * return self
6249  *
6250  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6251  * """
6252  * Return the wrapped C++ Clifford instance.
6253  */
6254 
6255  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6256  Clifford __pyx_r;
6257  __Pyx_RefNannyDeclarations
6258  __Pyx_RefNannySetupContext("unwrap", 0);
6259 
6260  /* "PyClical.pyx":554
6261  * Return the wrapped C++ Clifford instance.
6262  * """
6263  * return self.instance[0] # <<<<<<<<<<<<<<
6264  *
6265  * cpdef copy(clifford self):
6266  */
6267  __pyx_r = (__pyx_v_self->instance[0]);
6268  goto __pyx_L0;
6269 
6270  /* "PyClical.pyx":550
6271  * return self
6272  *
6273  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6274  * """
6275  * Return the wrapped C++ Clifford instance.
6276  */
6277 
6278  /* function exit code */
6279  __pyx_L0:;
6280  __Pyx_RefNannyFinishContext();
6281  return __pyx_r;
6282  }
6283 
6284  /* "PyClical.pyx":556
6285  * return self.instance[0]
6286  *
6287  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6288  * """
6289  * Copy this clifford object.
6290  */
6291 
6292  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6293  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6294  PyObject *__pyx_r = NULL;
6295  __Pyx_RefNannyDeclarations
6296  PyObject *__pyx_t_1 = NULL;
6297  PyObject *__pyx_t_2 = NULL;
6298  PyObject *__pyx_t_3 = NULL;
6299  PyObject *__pyx_t_4 = NULL;
6300  __Pyx_RefNannySetupContext("copy", 0);
6301  /* Check if called by wrapper */
6302  if (unlikely(__pyx_skip_dispatch)) ;
6303  /* Check if overridden in Python */
6304  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
6305  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6306  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6307  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6308  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6309  #endif
6310  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
6311  __Pyx_GOTREF(__pyx_t_1);
6312  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6313  __Pyx_XDECREF(__pyx_r);
6314  __Pyx_INCREF(__pyx_t_1);
6315  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6316  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6317  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6318  if (likely(__pyx_t_4)) {
6319  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6320  __Pyx_INCREF(__pyx_t_4);
6321  __Pyx_INCREF(function);
6322  __Pyx_DECREF_SET(__pyx_t_3, function);
6323  }
6324  }
6325  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6326  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6327  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
6328  __Pyx_GOTREF(__pyx_t_2);
6329  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6330  __pyx_r = __pyx_t_2;
6331  __pyx_t_2 = 0;
6332  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6333  goto __pyx_L0;
6334  }
6335  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6336  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6337  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6338  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6339  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6340  }
6341  #endif
6342  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6343  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6344  }
6345  #endif
6346  }
6347 
6348  /* "PyClical.pyx":563
6349  * {2}
6350  * """
6351  * return clifford(self) # <<<<<<<<<<<<<<
6352  *
6353  * def __cinit__(self, other = 0, ixt = None):
6354  */
6355  __Pyx_XDECREF(__pyx_r);
6356  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
6357  __Pyx_GOTREF(__pyx_t_1);
6358  __pyx_r = __pyx_t_1;
6359  __pyx_t_1 = 0;
6360  goto __pyx_L0;
6361 
6362  /* "PyClical.pyx":556
6363  * return self.instance[0]
6364  *
6365  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6366  * """
6367  * Copy this clifford object.
6368  */
6369 
6370  /* function exit code */
6371  __pyx_L1_error:;
6372  __Pyx_XDECREF(__pyx_t_1);
6373  __Pyx_XDECREF(__pyx_t_2);
6374  __Pyx_XDECREF(__pyx_t_3);
6375  __Pyx_XDECREF(__pyx_t_4);
6376  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6377  __pyx_r = 0;
6378  __pyx_L0:;
6379  __Pyx_XGIVEREF(__pyx_r);
6380  __Pyx_RefNannyFinishContext();
6381  return __pyx_r;
6382  }
6383 
6384  /* Python wrapper */
6385  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6386  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 ";
6387  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6388  PyObject *__pyx_r = 0;
6389  __Pyx_RefNannyDeclarations
6390  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6391  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6392 
6393  /* function exit code */
6394  __Pyx_RefNannyFinishContext();
6395  return __pyx_r;
6396  }
6397 
6398  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6399  PyObject *__pyx_r = NULL;
6400  __Pyx_RefNannyDeclarations
6401  PyObject *__pyx_t_1 = NULL;
6402  __Pyx_RefNannySetupContext("copy", 0);
6403  __Pyx_XDECREF(__pyx_r);
6404  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
6405  __Pyx_GOTREF(__pyx_t_1);
6406  __pyx_r = __pyx_t_1;
6407  __pyx_t_1 = 0;
6408  goto __pyx_L0;
6409 
6410  /* function exit code */
6411  __pyx_L1_error:;
6412  __Pyx_XDECREF(__pyx_t_1);
6413  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6414  __pyx_r = NULL;
6415  __pyx_L0:;
6416  __Pyx_XGIVEREF(__pyx_r);
6417  __Pyx_RefNannyFinishContext();
6418  return __pyx_r;
6419  }
6420 
6421  /* "PyClical.pyx":565
6422  * return clifford(self)
6423  *
6424  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6425  * """
6426  * Construct an object of type clifford.
6427  */
6428 
6429  /* Python wrapper */
6430  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6431  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6432  PyObject *__pyx_v_other = 0;
6433  PyObject *__pyx_v_ixt = 0;
6434  int __pyx_r;
6435  __Pyx_RefNannyDeclarations
6436  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6437  {
6438  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6439  PyObject* values[2] = {0,0};
6440  values[0] = ((PyObject *)__pyx_int_0);
6441  values[1] = ((PyObject *)Py_None);
6442  if (unlikely(__pyx_kwds)) {
6443  Py_ssize_t kw_args;
6444  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6445  switch (pos_args) {
6446  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6447  CYTHON_FALLTHROUGH;
6448  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6449  CYTHON_FALLTHROUGH;
6450  case 0: break;
6451  default: goto __pyx_L5_argtuple_error;
6452  }
6453  kw_args = PyDict_Size(__pyx_kwds);
6454  switch (pos_args) {
6455  case 0:
6456  if (kw_args > 0) {
6457  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6458  if (value) { values[0] = value; kw_args--; }
6459  }
6460  CYTHON_FALLTHROUGH;
6461  case 1:
6462  if (kw_args > 0) {
6463  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6464  if (value) { values[1] = value; kw_args--; }
6465  }
6466  }
6467  if (unlikely(kw_args > 0)) {
6468  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 565, __pyx_L3_error)
6469  }
6470  } else {
6471  switch (PyTuple_GET_SIZE(__pyx_args)) {
6472  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6473  CYTHON_FALLTHROUGH;
6474  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6475  CYTHON_FALLTHROUGH;
6476  case 0: break;
6477  default: goto __pyx_L5_argtuple_error;
6478  }
6479  }
6480  __pyx_v_other = values[0];
6481  __pyx_v_ixt = values[1];
6482  }
6483  goto __pyx_L4_argument_unpacking_done;
6484  __pyx_L5_argtuple_error:;
6485  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 565, __pyx_L3_error)
6486  __pyx_L3_error:;
6487  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6488  __Pyx_RefNannyFinishContext();
6489  return -1;
6490  __pyx_L4_argument_unpacking_done:;
6491  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6492 
6493  /* function exit code */
6494  __Pyx_RefNannyFinishContext();
6495  return __pyx_r;
6496  }
6497 
6498  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6499  PyObject *__pyx_v_error_msg_prefix = NULL;
6500  PyObject *__pyx_v_bother = NULL;
6501  PyObject *__pyx_v_err = NULL;
6502  int __pyx_r;
6503  __Pyx_RefNannyDeclarations
6504  int __pyx_t_1;
6505  int __pyx_t_2;
6506  PyObject *__pyx_t_3 = NULL;
6507  PyObject *__pyx_t_4 = NULL;
6508  PyObject *__pyx_t_5 = NULL;
6509  Clifford *__pyx_t_6;
6510  PyObject *__pyx_t_7 = NULL;
6511  PyObject *__pyx_t_8 = NULL;
6512  scalar_t __pyx_t_9;
6513  PyObject *__pyx_t_10 = NULL;
6514  PyObject *__pyx_t_11 = NULL;
6515  PyObject *__pyx_t_12 = NULL;
6516  PyObject *__pyx_t_13 = NULL;
6517  char *__pyx_t_14;
6518  int __pyx_t_15;
6519  PyObject *__pyx_t_16 = NULL;
6520  PyObject *__pyx_t_17 = NULL;
6521  PyObject *__pyx_t_18 = NULL;
6522  int __pyx_t_19;
6523  char const *__pyx_t_20;
6524  PyObject *__pyx_t_21 = NULL;
6525  PyObject *__pyx_t_22 = NULL;
6526  PyObject *__pyx_t_23 = NULL;
6527  __Pyx_RefNannySetupContext("__cinit__", 0);
6528 
6529  /* "PyClical.pyx":588
6530  * 2{1}+3{2}
6531  * """
6532  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6533  * if ixt is None:
6534  * try:
6535  */
6536  __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_clifford_objec);
6537  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_clifford_objec;
6538 
6539  /* "PyClical.pyx":589
6540  * """
6541  * error_msg_prefix = "Cannot initialize clifford object from"
6542  * if ixt is None: # <<<<<<<<<<<<<<
6543  * try:
6544  * if isinstance(other, clifford):
6545  */
6546  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6547  __pyx_t_2 = (__pyx_t_1 != 0);
6548  if (__pyx_t_2) {
6549 
6550  /* "PyClical.pyx":590
6551  * error_msg_prefix = "Cannot initialize clifford object from"
6552  * if ixt is None:
6553  * try: # <<<<<<<<<<<<<<
6554  * if isinstance(other, clifford):
6555  * self.instance = new Clifford((<clifford>other).unwrap())
6556  */
6557  {
6558  __Pyx_PyThreadState_declare
6559  __Pyx_PyThreadState_assign
6560  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6561  __Pyx_XGOTREF(__pyx_t_3);
6562  __Pyx_XGOTREF(__pyx_t_4);
6563  __Pyx_XGOTREF(__pyx_t_5);
6564  /*try:*/ {
6565 
6566  /* "PyClical.pyx":591
6567  * if ixt is None:
6568  * try:
6569  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6570  * self.instance = new Clifford((<clifford>other).unwrap())
6571  * elif isinstance(other, index_set):
6572  */
6573  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6574  __pyx_t_1 = (__pyx_t_2 != 0);
6575  if (__pyx_t_1) {
6576 
6577  /* "PyClical.pyx":592
6578  * try:
6579  * if isinstance(other, clifford):
6580  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6581  * elif isinstance(other, index_set):
6582  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6583  */
6584  try {
6585  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6586  } catch(...) {
6587  __Pyx_CppExn2PyErr();
6588  __PYX_ERR(0, 592, __pyx_L4_error)
6589  }
6590  __pyx_v_self->instance = __pyx_t_6;
6591 
6592  /* "PyClical.pyx":591
6593  * if ixt is None:
6594  * try:
6595  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6596  * self.instance = new Clifford((<clifford>other).unwrap())
6597  * elif isinstance(other, index_set):
6598  */
6599  goto __pyx_L10;
6600  }
6601 
6602  /* "PyClical.pyx":593
6603  * if isinstance(other, clifford):
6604  * self.instance = new Clifford((<clifford>other).unwrap())
6605  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6606  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6607  * elif isinstance(other, numbers.Real):
6608  */
6609  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6610  __pyx_t_2 = (__pyx_t_1 != 0);
6611  if (__pyx_t_2) {
6612 
6613  /* "PyClical.pyx":594
6614  * self.instance = new Clifford((<clifford>other).unwrap())
6615  * elif isinstance(other, index_set):
6616  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6617  * elif isinstance(other, numbers.Real):
6618  * self.instance = new Clifford(<scalar_t>other)
6619  */
6620  try {
6621  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6622  } catch(...) {
6623  __Pyx_CppExn2PyErr();
6624  __PYX_ERR(0, 594, __pyx_L4_error)
6625  }
6626  __pyx_v_self->instance = __pyx_t_6;
6627 
6628  /* "PyClical.pyx":593
6629  * if isinstance(other, clifford):
6630  * self.instance = new Clifford((<clifford>other).unwrap())
6631  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6632  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6633  * elif isinstance(other, numbers.Real):
6634  */
6635  goto __pyx_L10;
6636  }
6637 
6638  /* "PyClical.pyx":595
6639  * elif isinstance(other, index_set):
6640  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6641  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6642  * self.instance = new Clifford(<scalar_t>other)
6643  * elif isinstance(other, str):
6644  */
6645  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6646  __Pyx_GOTREF(__pyx_t_7);
6647  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Real); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 595, __pyx_L4_error)
6648  __Pyx_GOTREF(__pyx_t_8);
6649  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6650  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_8); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 595, __pyx_L4_error)
6651  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6652  __pyx_t_1 = (__pyx_t_2 != 0);
6653  if (__pyx_t_1) {
6654 
6655  /* "PyClical.pyx":596
6656  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6657  * elif isinstance(other, numbers.Real):
6658  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6659  * elif isinstance(other, str):
6660  * try:
6661  */
6662  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other); if (unlikely((__pyx_t_9 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L4_error)
6663  try {
6664  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6665  } catch(...) {
6666  __Pyx_CppExn2PyErr();
6667  __PYX_ERR(0, 596, __pyx_L4_error)
6668  }
6669  __pyx_v_self->instance = __pyx_t_6;
6670 
6671  /* "PyClical.pyx":595
6672  * elif isinstance(other, index_set):
6673  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6674  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6675  * self.instance = new Clifford(<scalar_t>other)
6676  * elif isinstance(other, str):
6677  */
6678  goto __pyx_L10;
6679  }
6680 
6681  /* "PyClical.pyx":597
6682  * elif isinstance(other, numbers.Real):
6683  * self.instance = new Clifford(<scalar_t>other)
6684  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6685  * try:
6686  * bother = other.encode("UTF-8")
6687  */
6688  __pyx_t_1 = PyUnicode_Check(__pyx_v_other);
6689  __pyx_t_2 = (__pyx_t_1 != 0);
6690  if (likely(__pyx_t_2)) {
6691 
6692  /* "PyClical.pyx":598
6693  * self.instance = new Clifford(<scalar_t>other)
6694  * elif isinstance(other, str):
6695  * try: # <<<<<<<<<<<<<<
6696  * bother = other.encode("UTF-8")
6697  * self.instance = new Clifford(<char *>bother)
6698  */
6699  {
6700  __Pyx_PyThreadState_declare
6701  __Pyx_PyThreadState_assign
6702  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6703  __Pyx_XGOTREF(__pyx_t_10);
6704  __Pyx_XGOTREF(__pyx_t_11);
6705  __Pyx_XGOTREF(__pyx_t_12);
6706  /*try:*/ {
6707 
6708  /* "PyClical.pyx":599
6709  * elif isinstance(other, str):
6710  * try:
6711  * bother = other.encode("UTF-8") # <<<<<<<<<<<<<<
6712  * self.instance = new Clifford(<char *>bother)
6713  * except RuntimeError:
6714  */
6715  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L11_error)
6716  __Pyx_GOTREF(__pyx_t_7);
6717  __pyx_t_13 = NULL;
6718  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
6719  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
6720  if (likely(__pyx_t_13)) {
6721  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
6722  __Pyx_INCREF(__pyx_t_13);
6723  __Pyx_INCREF(function);
6724  __Pyx_DECREF_SET(__pyx_t_7, function);
6725  }
6726  }
6727  __pyx_t_8 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u_UTF_8);
6728  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6729  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L11_error)
6730  __Pyx_GOTREF(__pyx_t_8);
6731  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6732  __pyx_v_bother = __pyx_t_8;
6733  __pyx_t_8 = 0;
6734 
6735  /* "PyClical.pyx":600
6736  * try:
6737  * bother = other.encode("UTF-8")
6738  * self.instance = new Clifford(<char *>bother) # <<<<<<<<<<<<<<
6739  * except RuntimeError:
6740  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6741  */
6742  __pyx_t_14 = __Pyx_PyObject_AsWritableString(__pyx_v_bother); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 600, __pyx_L11_error)
6743  try {
6744  __pyx_t_6 = new Clifford(((char *)__pyx_t_14));
6745  } catch(...) {
6746  __Pyx_CppExn2PyErr();
6747  __PYX_ERR(0, 600, __pyx_L11_error)
6748  }
6749  __pyx_v_self->instance = __pyx_t_6;
6750 
6751  /* "PyClical.pyx":598
6752  * self.instance = new Clifford(<scalar_t>other)
6753  * elif isinstance(other, str):
6754  * try: # <<<<<<<<<<<<<<
6755  * bother = other.encode("UTF-8")
6756  * self.instance = new Clifford(<char *>bother)
6757  */
6758  }
6759  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6760  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6761  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6762  goto __pyx_L16_try_end;
6763  __pyx_L11_error:;
6764  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6765  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6766  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6767 
6768  /* "PyClical.pyx":601
6769  * bother = other.encode("UTF-8")
6770  * self.instance = new Clifford(<char *>bother)
6771  * except RuntimeError: # <<<<<<<<<<<<<<
6772  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6773  * else:
6774  */
6775  __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6776  if (__pyx_t_15) {
6777  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6778  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 601, __pyx_L13_except_error)
6779  __Pyx_GOTREF(__pyx_t_8);
6780  __Pyx_GOTREF(__pyx_t_7);
6781  __Pyx_GOTREF(__pyx_t_13);
6782 
6783  /* "PyClical.pyx":602
6784  * self.instance = new Clifford(<char *>bother)
6785  * except RuntimeError:
6786  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6787  * else:
6788  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6789  */
6790  __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid_string); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 602, __pyx_L13_except_error)
6791  __Pyx_GOTREF(__pyx_t_16);
6792  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 602, __pyx_L13_except_error)
6793  __Pyx_GOTREF(__pyx_t_17);
6794  __pyx_t_18 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 602, __pyx_L13_except_error)
6795  __Pyx_GOTREF(__pyx_t_18);
6796  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6797  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6798  __pyx_t_17 = __Pyx_PyUnicode_Concat(__pyx_t_18, __pyx_kp_u_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 602, __pyx_L13_except_error)
6799  __Pyx_GOTREF(__pyx_t_17);
6800  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6801  __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 602, __pyx_L13_except_error)
6802  __Pyx_GOTREF(__pyx_t_18);
6803  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6804  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6805  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6806  __PYX_ERR(0, 602, __pyx_L13_except_error)
6807  }
6808  goto __pyx_L13_except_error;
6809  __pyx_L13_except_error:;
6810 
6811  /* "PyClical.pyx":598
6812  * self.instance = new Clifford(<scalar_t>other)
6813  * elif isinstance(other, str):
6814  * try: # <<<<<<<<<<<<<<
6815  * bother = other.encode("UTF-8")
6816  * self.instance = new Clifford(<char *>bother)
6817  */
6818  __Pyx_XGIVEREF(__pyx_t_10);
6819  __Pyx_XGIVEREF(__pyx_t_11);
6820  __Pyx_XGIVEREF(__pyx_t_12);
6821  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6822  goto __pyx_L4_error;
6823  __pyx_L16_try_end:;
6824  }
6825 
6826  /* "PyClical.pyx":597
6827  * elif isinstance(other, numbers.Real):
6828  * self.instance = new Clifford(<scalar_t>other)
6829  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6830  * try:
6831  * bother = other.encode("UTF-8")
6832  */
6833  goto __pyx_L10;
6834  }
6835 
6836  /* "PyClical.pyx":604
6837  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6838  * else:
6839  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6840  * except RuntimeError as err:
6841  * raise ValueError(error_msg_prefix + " " + str(type(other))
6842  */
6843  /*else*/ {
6844  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 604, __pyx_L4_error)
6845  __Pyx_GOTREF(__pyx_t_13);
6846  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L4_error)
6847  __Pyx_GOTREF(__pyx_t_7);
6848  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
6849  __Pyx_GOTREF(__pyx_t_8);
6850  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6851  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6852  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L4_error)
6853  __Pyx_GOTREF(__pyx_t_7);
6854  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6855  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
6856  __Pyx_GOTREF(__pyx_t_8);
6857  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6858  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6859  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6860  __PYX_ERR(0, 604, __pyx_L4_error)
6861  }
6862  __pyx_L10:;
6863 
6864  /* "PyClical.pyx":590
6865  * error_msg_prefix = "Cannot initialize clifford object from"
6866  * if ixt is None:
6867  * try: # <<<<<<<<<<<<<<
6868  * if isinstance(other, clifford):
6869  * self.instance = new Clifford((<clifford>other).unwrap())
6870  */
6871  }
6872  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6873  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6874  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6875  goto __pyx_L9_try_end;
6876  __pyx_L4_error:;
6877  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6878  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6879  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6880  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6881  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6882  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6883 
6884  /* "PyClical.pyx":605
6885  * else:
6886  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6887  * except RuntimeError as err: # <<<<<<<<<<<<<<
6888  * raise ValueError(error_msg_prefix + " " + str(type(other))
6889  * + " value " + repr(other) + ":"
6890  */
6891  __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6892  if (__pyx_t_15) {
6893  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6894  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 605, __pyx_L6_except_error)
6895  __Pyx_GOTREF(__pyx_t_8);
6896  __Pyx_GOTREF(__pyx_t_7);
6897  __Pyx_GOTREF(__pyx_t_13);
6898  __Pyx_INCREF(__pyx_t_7);
6899  __pyx_v_err = __pyx_t_7;
6900  /*try:*/ {
6901 
6902  /* "PyClical.pyx":606
6903  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6904  * except RuntimeError as err:
6905  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6906  * + " value " + repr(other) + ":"
6907  * + "\n\t" + str(err))
6908  */
6909  __pyx_t_18 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L24_error)
6910  __Pyx_GOTREF(__pyx_t_18);
6911  __pyx_t_17 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 606, __pyx_L24_error)
6912  __Pyx_GOTREF(__pyx_t_17);
6913  __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L24_error)
6914  __Pyx_GOTREF(__pyx_t_16);
6915  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6916  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6917 
6918  /* "PyClical.pyx":607
6919  * except RuntimeError as err:
6920  * raise ValueError(error_msg_prefix + " " + str(type(other))
6921  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6922  * + "\n\t" + str(err))
6923  * elif isinstance(ixt, index_set):
6924  */
6925  __pyx_t_17 = __Pyx_PyUnicode_Concat(__pyx_t_16, __pyx_kp_u_value); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L24_error)
6926  __Pyx_GOTREF(__pyx_t_17);
6927  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6928  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L24_error)
6929  __Pyx_GOTREF(__pyx_t_16);
6930  __pyx_t_18 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L24_error)
6931  __Pyx_GOTREF(__pyx_t_18);
6932  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6933  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6934  __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_t_18, __pyx_kp_u__5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L24_error)
6935  __Pyx_GOTREF(__pyx_t_16);
6936  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6937 
6938  /* "PyClical.pyx":608
6939  * raise ValueError(error_msg_prefix + " " + str(type(other))
6940  * + " value " + repr(other) + ":"
6941  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6942  * elif isinstance(ixt, index_set):
6943  * if isinstance(other, numbers.Real):
6944  */
6945  __pyx_t_18 = __Pyx_PyUnicode_Concat(__pyx_t_16, __pyx_kp_u__6); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 608, __pyx_L24_error)
6946  __Pyx_GOTREF(__pyx_t_18);
6947  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6948  __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 608, __pyx_L24_error)
6949  __Pyx_GOTREF(__pyx_t_16);
6950  __pyx_t_17 = __Pyx_PyUnicode_Concat(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 608, __pyx_L24_error)
6951  __Pyx_GOTREF(__pyx_t_17);
6952  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6953  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6954 
6955  /* "PyClical.pyx":606
6956  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6957  * except RuntimeError as err:
6958  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6959  * + " value " + repr(other) + ":"
6960  * + "\n\t" + str(err))
6961  */
6962  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L24_error)
6963  __Pyx_GOTREF(__pyx_t_16);
6964  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6965  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6966  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6967  __PYX_ERR(0, 606, __pyx_L24_error)
6968  }
6969 
6970  /* "PyClical.pyx":605
6971  * else:
6972  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6973  * except RuntimeError as err: # <<<<<<<<<<<<<<
6974  * raise ValueError(error_msg_prefix + " " + str(type(other))
6975  * + " value " + repr(other) + ":"
6976  */
6977  /*finally:*/ {
6978  __pyx_L24_error:;
6979  /*exception exit:*/{
6980  __Pyx_PyThreadState_declare
6981  __Pyx_PyThreadState_assign
6982  __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
6983  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6984  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6985  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6986  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
6987  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
6988  __Pyx_XGOTREF(__pyx_t_12);
6989  __Pyx_XGOTREF(__pyx_t_11);
6990  __Pyx_XGOTREF(__pyx_t_10);
6991  __Pyx_XGOTREF(__pyx_t_21);
6992  __Pyx_XGOTREF(__pyx_t_22);
6993  __Pyx_XGOTREF(__pyx_t_23);
6994  __pyx_t_15 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
6995  {
6996  __Pyx_DECREF(__pyx_v_err);
6997  __pyx_v_err = NULL;
6998  }
6999  if (PY_MAJOR_VERSION >= 3) {
7000  __Pyx_XGIVEREF(__pyx_t_21);
7001  __Pyx_XGIVEREF(__pyx_t_22);
7002  __Pyx_XGIVEREF(__pyx_t_23);
7003  __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
7004  }
7005  __Pyx_XGIVEREF(__pyx_t_12);
7006  __Pyx_XGIVEREF(__pyx_t_11);
7007  __Pyx_XGIVEREF(__pyx_t_10);
7008  __Pyx_ErrRestore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
7009  __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
7010  __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20;
7011  goto __pyx_L6_except_error;
7012  }
7013  }
7014  }
7015  goto __pyx_L6_except_error;
7016  __pyx_L6_except_error:;
7017 
7018  /* "PyClical.pyx":590
7019  * error_msg_prefix = "Cannot initialize clifford object from"
7020  * if ixt is None:
7021  * try: # <<<<<<<<<<<<<<
7022  * if isinstance(other, clifford):
7023  * self.instance = new Clifford((<clifford>other).unwrap())
7024  */
7025  __Pyx_XGIVEREF(__pyx_t_3);
7026  __Pyx_XGIVEREF(__pyx_t_4);
7027  __Pyx_XGIVEREF(__pyx_t_5);
7028  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7029  goto __pyx_L1_error;
7030  __pyx_L9_try_end:;
7031  }
7032 
7033  /* "PyClical.pyx":589
7034  * """
7035  * error_msg_prefix = "Cannot initialize clifford object from"
7036  * if ixt is None: # <<<<<<<<<<<<<<
7037  * try:
7038  * if isinstance(other, clifford):
7039  */
7040  goto __pyx_L3;
7041  }
7042 
7043  /* "PyClical.pyx":609
7044  * + " value " + repr(other) + ":"
7045  * + "\n\t" + str(err))
7046  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7047  * if isinstance(other, numbers.Real):
7048  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7049  */
7050  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7051  __pyx_t_1 = (__pyx_t_2 != 0);
7052  if (likely(__pyx_t_1)) {
7053 
7054  /* "PyClical.pyx":610
7055  * + "\n\t" + str(err))
7056  * elif isinstance(ixt, index_set):
7057  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
7058  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7059  * elif isinstance(other, collections.abc.Sequence):
7060  */
7061  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_numbers); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 610, __pyx_L1_error)
7062  __Pyx_GOTREF(__pyx_t_13);
7063  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_Real); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
7064  __Pyx_GOTREF(__pyx_t_7);
7065  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7066  __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_7); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 610, __pyx_L1_error)
7067  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7068  __pyx_t_2 = (__pyx_t_1 != 0);
7069  if (__pyx_t_2) {
7070 
7071  /* "PyClical.pyx":611
7072  * elif isinstance(ixt, index_set):
7073  * if isinstance(other, numbers.Real):
7074  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
7075  * elif isinstance(other, collections.abc.Sequence):
7076  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7077  */
7078  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other); if (unlikely((__pyx_t_9 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
7079  try {
7080  __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));
7081  } catch(...) {
7082  __Pyx_CppExn2PyErr();
7083  __PYX_ERR(0, 611, __pyx_L1_error)
7084  }
7085  __pyx_v_self->instance = __pyx_t_6;
7086 
7087  /* "PyClical.pyx":610
7088  * + "\n\t" + str(err))
7089  * elif isinstance(ixt, index_set):
7090  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
7091  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7092  * elif isinstance(other, collections.abc.Sequence):
7093  */
7094  goto __pyx_L30;
7095  }
7096 
7097  /* "PyClical.pyx":612
7098  * if isinstance(other, numbers.Real):
7099  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7100  * elif isinstance(other, collections.abc.Sequence): # <<<<<<<<<<<<<<
7101  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7102  * else:
7103  */
7104  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
7105  __Pyx_GOTREF(__pyx_t_7);
7106  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_abc); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 612, __pyx_L1_error)
7107  __Pyx_GOTREF(__pyx_t_13);
7108  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7109  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
7110  __Pyx_GOTREF(__pyx_t_7);
7111  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7112  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_7); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 612, __pyx_L1_error)
7113  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7114  __pyx_t_1 = (__pyx_t_2 != 0);
7115  if (likely(__pyx_t_1)) {
7116 
7117  /* "PyClical.pyx":613
7118  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7119  * elif isinstance(other, collections.abc.Sequence):
7120  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7121  * else:
7122  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7123  */
7124  try {
7125  __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)));
7126  } catch(...) {
7127  __Pyx_CppExn2PyErr();
7128  __PYX_ERR(0, 613, __pyx_L1_error)
7129  }
7130  __pyx_v_self->instance = __pyx_t_6;
7131 
7132  /* "PyClical.pyx":612
7133  * if isinstance(other, numbers.Real):
7134  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7135  * elif isinstance(other, collections.abc.Sequence): # <<<<<<<<<<<<<<
7136  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7137  * else:
7138  */
7139  goto __pyx_L30;
7140  }
7141 
7142  /* "PyClical.pyx":615
7143  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7144  * else:
7145  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7146  * + ", " + repr(ixt) + ").")
7147  * else:
7148  */
7149  /*else*/ {
7150  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7151  __Pyx_GOTREF(__pyx_t_7);
7152  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 615, __pyx_L1_error)
7153  __Pyx_GOTREF(__pyx_t_13);
7154  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7155  __Pyx_GOTREF(__pyx_t_8);
7156  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7157  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7158 
7159  /* "PyClical.pyx":616
7160  * else:
7161  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7162  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
7163  * else:
7164  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7165  */
7166  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u__8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 616, __pyx_L1_error)
7167  __Pyx_GOTREF(__pyx_t_13);
7168  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7169  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 616, __pyx_L1_error)
7170  __Pyx_GOTREF(__pyx_t_8);
7171  __pyx_t_7 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_13, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 616, __pyx_L1_error)
7172  __Pyx_GOTREF(__pyx_t_7);
7173  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7174  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7175  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 616, __pyx_L1_error)
7176  __Pyx_GOTREF(__pyx_t_8);
7177  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7178 
7179  /* "PyClical.pyx":615
7180  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7181  * else:
7182  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7183  * + ", " + repr(ixt) + ").")
7184  * else:
7185  */
7186  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7187  __Pyx_GOTREF(__pyx_t_7);
7188  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7189  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7190  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7191  __PYX_ERR(0, 615, __pyx_L1_error)
7192  }
7193  __pyx_L30:;
7194 
7195  /* "PyClical.pyx":609
7196  * + " value " + repr(other) + ":"
7197  * + "\n\t" + str(err))
7198  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7199  * if isinstance(other, numbers.Real):
7200  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7201  */
7202  goto __pyx_L3;
7203  }
7204 
7205  /* "PyClical.pyx":618
7206  * + ", " + repr(ixt) + ").")
7207  * else:
7208  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7209  * + ", " + str(type(ixt)) + ").")
7210  *
7211  */
7212  /*else*/ {
7213  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7214  __Pyx_GOTREF(__pyx_t_7);
7215  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7216  __Pyx_GOTREF(__pyx_t_8);
7217  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 618, __pyx_L1_error)
7218  __Pyx_GOTREF(__pyx_t_13);
7219  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7220  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7221 
7222  /* "PyClical.pyx":619
7223  * else:
7224  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7225  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7226  *
7227  * def __dealloc__(self):
7228  */
7229  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_kp_u__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L1_error)
7230  __Pyx_GOTREF(__pyx_t_8);
7231  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7232  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_ixt))); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 619, __pyx_L1_error)
7233  __Pyx_GOTREF(__pyx_t_13);
7234  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error)
7235  __Pyx_GOTREF(__pyx_t_7);
7236  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7237  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7238  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 619, __pyx_L1_error)
7239  __Pyx_GOTREF(__pyx_t_13);
7240  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7241 
7242  /* "PyClical.pyx":618
7243  * + ", " + repr(ixt) + ").")
7244  * else:
7245  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7246  * + ", " + str(type(ixt)) + ").")
7247  *
7248  */
7249  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7250  __Pyx_GOTREF(__pyx_t_7);
7251  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7252  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7253  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7254  __PYX_ERR(0, 618, __pyx_L1_error)
7255  }
7256  __pyx_L3:;
7257 
7258  /* "PyClical.pyx":565
7259  * return clifford(self)
7260  *
7261  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7262  * """
7263  * Construct an object of type clifford.
7264  */
7265 
7266  /* function exit code */
7267  __pyx_r = 0;
7268  goto __pyx_L0;
7269  __pyx_L1_error:;
7270  __Pyx_XDECREF(__pyx_t_7);
7271  __Pyx_XDECREF(__pyx_t_8);
7272  __Pyx_XDECREF(__pyx_t_13);
7273  __Pyx_XDECREF(__pyx_t_16);
7274  __Pyx_XDECREF(__pyx_t_17);
7275  __Pyx_XDECREF(__pyx_t_18);
7276  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7277  __pyx_r = -1;
7278  __pyx_L0:;
7279  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7280  __Pyx_XDECREF(__pyx_v_bother);
7281  __Pyx_XDECREF(__pyx_v_err);
7282  __Pyx_RefNannyFinishContext();
7283  return __pyx_r;
7284  }
7285 
7286  /* "PyClical.pyx":621
7287  * + ", " + str(type(ixt)) + ").")
7288  *
7289  * def __dealloc__(self): # <<<<<<<<<<<<<<
7290  * """
7291  * Clean up by deallocating the instance of C++ class Clifford.
7292  */
7293 
7294  /* Python wrapper */
7295  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7296  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7297  __Pyx_RefNannyDeclarations
7298  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7299  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7300 
7301  /* function exit code */
7302  __Pyx_RefNannyFinishContext();
7303  }
7304 
7305  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7306  __Pyx_RefNannyDeclarations
7307  __Pyx_RefNannySetupContext("__dealloc__", 0);
7308 
7309  /* "PyClical.pyx":625
7310  * Clean up by deallocating the instance of C++ class Clifford.
7311  * """
7312  * del self.instance # <<<<<<<<<<<<<<
7313  *
7314  * def __contains__(self, x):
7315  */
7316  delete __pyx_v_self->instance;
7317 
7318  /* "PyClical.pyx":621
7319  * + ", " + str(type(ixt)) + ").")
7320  *
7321  * def __dealloc__(self): # <<<<<<<<<<<<<<
7322  * """
7323  * Clean up by deallocating the instance of C++ class Clifford.
7324  */
7325 
7326  /* function exit code */
7327  __Pyx_RefNannyFinishContext();
7328  }
7329 
7330  /* "PyClical.pyx":627
7331  * del self.instance
7332  *
7333  * def __contains__(self, x): # <<<<<<<<<<<<<<
7334  * """
7335  * Not applicable.
7336  */
7337 
7338  /* Python wrapper */
7339  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7340  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 ";
7341  #if CYTHON_COMPILING_IN_CPYTHON
7342  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7343  #endif
7344  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7345  int __pyx_r;
7346  __Pyx_RefNannyDeclarations
7347  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7348  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7349 
7350  /* function exit code */
7351  __Pyx_RefNannyFinishContext();
7352  return __pyx_r;
7353  }
7354 
7355  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7356  int __pyx_r;
7357  __Pyx_RefNannyDeclarations
7358  PyObject *__pyx_t_1 = NULL;
7359  __Pyx_RefNannySetupContext("__contains__", 0);
7360 
7361  /* "PyClical.pyx":636
7362  * TypeError: Not applicable.
7363  * """
7364  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7365  *
7366  * def __iter__(self):
7367  */
7368  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
7369  __Pyx_GOTREF(__pyx_t_1);
7370  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7371  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7372  __PYX_ERR(0, 636, __pyx_L1_error)
7373 
7374  /* "PyClical.pyx":627
7375  * del self.instance
7376  *
7377  * def __contains__(self, x): # <<<<<<<<<<<<<<
7378  * """
7379  * Not applicable.
7380  */
7381 
7382  /* function exit code */
7383  __pyx_L1_error:;
7384  __Pyx_XDECREF(__pyx_t_1);
7385  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7386  __pyx_r = -1;
7387  __Pyx_RefNannyFinishContext();
7388  return __pyx_r;
7389  }
7390 
7391  /* "PyClical.pyx":638
7392  * raise TypeError("Not applicable.")
7393  *
7394  * def __iter__(self): # <<<<<<<<<<<<<<
7395  * """
7396  * Not applicable.
7397  */
7398 
7399  /* Python wrapper */
7400  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7401  static char __pyx_doc_8PyClical_8clifford_8__iter__[] = "\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})):print(a, end=\",\")\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
7402  #if CYTHON_COMPILING_IN_CPYTHON
7403  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7404  #endif
7405  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7406  PyObject *__pyx_r = 0;
7407  __Pyx_RefNannyDeclarations
7408  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7409  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7410 
7411  /* function exit code */
7412  __Pyx_RefNannyFinishContext();
7413  return __pyx_r;
7414  }
7415 
7416  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7417  PyObject *__pyx_r = NULL;
7418  __Pyx_RefNannyDeclarations
7419  PyObject *__pyx_t_1 = NULL;
7420  __Pyx_RefNannySetupContext("__iter__", 0);
7421 
7422  /* "PyClical.pyx":647
7423  * TypeError: Not applicable.
7424  * """
7425  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7426  *
7427  * def reframe(self, ixt):
7428  */
7429  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
7430  __Pyx_GOTREF(__pyx_t_1);
7431  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7432  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7433  __PYX_ERR(0, 647, __pyx_L1_error)
7434 
7435  /* "PyClical.pyx":638
7436  * raise TypeError("Not applicable.")
7437  *
7438  * def __iter__(self): # <<<<<<<<<<<<<<
7439  * """
7440  * Not applicable.
7441  */
7442 
7443  /* function exit code */
7444  __pyx_L1_error:;
7445  __Pyx_XDECREF(__pyx_t_1);
7446  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7447  __pyx_r = NULL;
7448  __Pyx_XGIVEREF(__pyx_r);
7449  __Pyx_RefNannyFinishContext();
7450  return __pyx_r;
7451  }
7452 
7453  /* "PyClical.pyx":649
7454  * raise TypeError("Not applicable.")
7455  *
7456  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7457  * """
7458  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7459  */
7460 
7461  /* Python wrapper */
7462  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7463  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 ";
7464  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7465  PyObject *__pyx_r = 0;
7466  __Pyx_RefNannyDeclarations
7467  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7468  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7469 
7470  /* function exit code */
7471  __Pyx_RefNannyFinishContext();
7472  return __pyx_r;
7473  }
7474 
7475  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7476  PyObject *__pyx_v_error_msg_prefix = NULL;
7477  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7478  PyObject *__pyx_v_err = NULL;
7479  PyObject *__pyx_r = NULL;
7480  __Pyx_RefNannyDeclarations
7481  int __pyx_t_1;
7482  int __pyx_t_2;
7483  PyObject *__pyx_t_3 = NULL;
7484  PyObject *__pyx_t_4 = NULL;
7485  PyObject *__pyx_t_5 = NULL;
7486  PyObject *__pyx_t_6 = NULL;
7487  Clifford *__pyx_t_7;
7488  int __pyx_t_8;
7489  PyObject *__pyx_t_9 = NULL;
7490  PyObject *__pyx_t_10 = NULL;
7491  PyObject *__pyx_t_11 = NULL;
7492  PyObject *__pyx_t_12 = NULL;
7493  PyObject *__pyx_t_13 = NULL;
7494  int __pyx_t_14;
7495  char const *__pyx_t_15;
7496  PyObject *__pyx_t_16 = NULL;
7497  PyObject *__pyx_t_17 = NULL;
7498  PyObject *__pyx_t_18 = NULL;
7499  PyObject *__pyx_t_19 = NULL;
7500  PyObject *__pyx_t_20 = NULL;
7501  PyObject *__pyx_t_21 = NULL;
7502  __Pyx_RefNannySetupContext("reframe", 0);
7503 
7504  /* "PyClical.pyx":659
7505  * True
7506  * """
7507  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7508  * if isinstance(ixt, index_set):
7509  * try:
7510  */
7511  __Pyx_INCREF(__pyx_kp_u_Cannot_reframe);
7512  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_reframe;
7513 
7514  /* "PyClical.pyx":660
7515  * """
7516  * error_msg_prefix = "Cannot reframe"
7517  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7518  * try:
7519  * result = clifford()
7520  */
7521  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7522  __pyx_t_2 = (__pyx_t_1 != 0);
7523  if (likely(__pyx_t_2)) {
7524 
7525  /* "PyClical.pyx":661
7526  * error_msg_prefix = "Cannot reframe"
7527  * if isinstance(ixt, index_set):
7528  * try: # <<<<<<<<<<<<<<
7529  * result = clifford()
7530  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7531  */
7532  {
7533  __Pyx_PyThreadState_declare
7534  __Pyx_PyThreadState_assign
7535  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7536  __Pyx_XGOTREF(__pyx_t_3);
7537  __Pyx_XGOTREF(__pyx_t_4);
7538  __Pyx_XGOTREF(__pyx_t_5);
7539  /*try:*/ {
7540 
7541  /* "PyClical.pyx":662
7542  * if isinstance(ixt, index_set):
7543  * try:
7544  * result = clifford() # <<<<<<<<<<<<<<
7545  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7546  * except RuntimeError as err:
7547  */
7548  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L4_error)
7549  __Pyx_GOTREF(__pyx_t_6);
7550  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7551  __pyx_t_6 = 0;
7552 
7553  /* "PyClical.pyx":663
7554  * try:
7555  * result = clifford()
7556  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7557  * except RuntimeError as err:
7558  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7559  */
7560  try {
7561  __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)));
7562  } catch(...) {
7563  __Pyx_CppExn2PyErr();
7564  __PYX_ERR(0, 663, __pyx_L4_error)
7565  }
7566  __pyx_v_result->instance = __pyx_t_7;
7567 
7568  /* "PyClical.pyx":661
7569  * error_msg_prefix = "Cannot reframe"
7570  * if isinstance(ixt, index_set):
7571  * try: # <<<<<<<<<<<<<<
7572  * result = clifford()
7573  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7574  */
7575  }
7576  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7577  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7578  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7579  goto __pyx_L9_try_end;
7580  __pyx_L4_error:;
7581  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7582 
7583  /* "PyClical.pyx":664
7584  * result = clifford()
7585  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7586  * except RuntimeError as err: # <<<<<<<<<<<<<<
7587  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7588  * + str(ixt) + ":"
7589  */
7590  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7591  if (__pyx_t_8) {
7592  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7593  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 664, __pyx_L6_except_error)
7594  __Pyx_GOTREF(__pyx_t_6);
7595  __Pyx_GOTREF(__pyx_t_9);
7596  __Pyx_GOTREF(__pyx_t_10);
7597  __Pyx_INCREF(__pyx_t_9);
7598  __pyx_v_err = __pyx_t_9;
7599  /*try:*/ {
7600 
7601  /* "PyClical.pyx":665
7602  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7603  * except RuntimeError as err:
7604  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7605  * + str(ixt) + ":"
7606  * + "\n\t" + str(err))
7607  */
7608  __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_from); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L15_error)
7609  __Pyx_GOTREF(__pyx_t_11);
7610  __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L15_error)
7611  __Pyx_GOTREF(__pyx_t_12);
7612  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
7613  __Pyx_GOTREF(__pyx_t_13);
7614  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7615  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7616  __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_kp_u_to_frame); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L15_error)
7617  __Pyx_GOTREF(__pyx_t_12);
7618  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7619 
7620  /* "PyClical.pyx":666
7621  * except RuntimeError as err:
7622  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7623  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7624  * + "\n\t" + str(err))
7625  * else:
7626  */
7627  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_ixt); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L15_error)
7628  __Pyx_GOTREF(__pyx_t_13);
7629  __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L15_error)
7630  __Pyx_GOTREF(__pyx_t_11);
7631  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7632  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7633  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_kp_u__5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L15_error)
7634  __Pyx_GOTREF(__pyx_t_13);
7635  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7636 
7637  /* "PyClical.pyx":667
7638  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7639  * + str(ixt) + ":"
7640  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7641  * else:
7642  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7643  */
7644  __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_kp_u__6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 667, __pyx_L15_error)
7645  __Pyx_GOTREF(__pyx_t_11);
7646  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7647  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 667, __pyx_L15_error)
7648  __Pyx_GOTREF(__pyx_t_13);
7649  __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 667, __pyx_L15_error)
7650  __Pyx_GOTREF(__pyx_t_12);
7651  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7652  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7653 
7654  /* "PyClical.pyx":665
7655  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7656  * except RuntimeError as err:
7657  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7658  * + str(ixt) + ":"
7659  * + "\n\t" + str(err))
7660  */
7661  __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
7662  __Pyx_GOTREF(__pyx_t_13);
7663  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7664  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7665  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7666  __PYX_ERR(0, 665, __pyx_L15_error)
7667  }
7668 
7669  /* "PyClical.pyx":664
7670  * result = clifford()
7671  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7672  * except RuntimeError as err: # <<<<<<<<<<<<<<
7673  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7674  * + str(ixt) + ":"
7675  */
7676  /*finally:*/ {
7677  __pyx_L15_error:;
7678  /*exception exit:*/{
7679  __Pyx_PyThreadState_declare
7680  __Pyx_PyThreadState_assign
7681  __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
7682  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7683  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
7684  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7685  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
7686  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
7687  __Pyx_XGOTREF(__pyx_t_16);
7688  __Pyx_XGOTREF(__pyx_t_17);
7689  __Pyx_XGOTREF(__pyx_t_18);
7690  __Pyx_XGOTREF(__pyx_t_19);
7691  __Pyx_XGOTREF(__pyx_t_20);
7692  __Pyx_XGOTREF(__pyx_t_21);
7693  __pyx_t_8 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
7694  {
7695  __Pyx_DECREF(__pyx_v_err);
7696  __pyx_v_err = NULL;
7697  }
7698  if (PY_MAJOR_VERSION >= 3) {
7699  __Pyx_XGIVEREF(__pyx_t_19);
7700  __Pyx_XGIVEREF(__pyx_t_20);
7701  __Pyx_XGIVEREF(__pyx_t_21);
7702  __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
7703  }
7704  __Pyx_XGIVEREF(__pyx_t_16);
7705  __Pyx_XGIVEREF(__pyx_t_17);
7706  __Pyx_XGIVEREF(__pyx_t_18);
7707  __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
7708  __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
7709  __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
7710  goto __pyx_L6_except_error;
7711  }
7712  }
7713  }
7714  goto __pyx_L6_except_error;
7715  __pyx_L6_except_error:;
7716 
7717  /* "PyClical.pyx":661
7718  * error_msg_prefix = "Cannot reframe"
7719  * if isinstance(ixt, index_set):
7720  * try: # <<<<<<<<<<<<<<
7721  * result = clifford()
7722  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7723  */
7724  __Pyx_XGIVEREF(__pyx_t_3);
7725  __Pyx_XGIVEREF(__pyx_t_4);
7726  __Pyx_XGIVEREF(__pyx_t_5);
7727  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7728  goto __pyx_L1_error;
7729  __pyx_L9_try_end:;
7730  }
7731 
7732  /* "PyClical.pyx":660
7733  * """
7734  * error_msg_prefix = "Cannot reframe"
7735  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7736  * try:
7737  * result = clifford()
7738  */
7739  goto __pyx_L3;
7740  }
7741 
7742  /* "PyClical.pyx":669
7743  * + "\n\t" + str(err))
7744  * else:
7745  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7746  * return result
7747  *
7748  */
7749  /*else*/ {
7750  __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_using); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 669, __pyx_L1_error)
7751  __Pyx_GOTREF(__pyx_t_10);
7752  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_ixt))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 669, __pyx_L1_error)
7753  __Pyx_GOTREF(__pyx_t_9);
7754  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
7755  __Pyx_GOTREF(__pyx_t_6);
7756  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7757  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7758  __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 669, __pyx_L1_error)
7759  __Pyx_GOTREF(__pyx_t_9);
7760  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7761  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
7762  __Pyx_GOTREF(__pyx_t_6);
7763  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7764  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7765  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7766  __PYX_ERR(0, 669, __pyx_L1_error)
7767  }
7768  __pyx_L3:;
7769 
7770  /* "PyClical.pyx":670
7771  * else:
7772  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7773  * return result # <<<<<<<<<<<<<<
7774  *
7775  * def __richcmp__(lhs, rhs, int op):
7776  */
7777  __Pyx_XDECREF(__pyx_r);
7778  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7779  __pyx_r = ((PyObject *)__pyx_v_result);
7780  goto __pyx_L0;
7781 
7782  /* "PyClical.pyx":649
7783  * raise TypeError("Not applicable.")
7784  *
7785  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7786  * """
7787  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7788  */
7789 
7790  /* function exit code */
7791  __pyx_L1_error:;
7792  __Pyx_XDECREF(__pyx_t_6);
7793  __Pyx_XDECREF(__pyx_t_9);
7794  __Pyx_XDECREF(__pyx_t_10);
7795  __Pyx_XDECREF(__pyx_t_11);
7796  __Pyx_XDECREF(__pyx_t_12);
7797  __Pyx_XDECREF(__pyx_t_13);
7798  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7799  __pyx_r = NULL;
7800  __pyx_L0:;
7801  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7802  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7803  __Pyx_XDECREF(__pyx_v_err);
7804  __Pyx_XGIVEREF(__pyx_r);
7805  __Pyx_RefNannyFinishContext();
7806  return __pyx_r;
7807  }
7808 
7809  /* "PyClical.pyx":672
7810  * return result
7811  *
7812  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7813  * """
7814  * Compare objects of type clifford.
7815  */
7816 
7817  /* Python wrapper */
7818  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7819  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7820  PyObject *__pyx_r = 0;
7821  __Pyx_RefNannyDeclarations
7822  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7823  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7824 
7825  /* function exit code */
7826  __Pyx_RefNannyFinishContext();
7827  return __pyx_r;
7828  }
7829 
7830  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7831  PyObject *__pyx_r = NULL;
7832  __Pyx_RefNannyDeclarations
7833  int __pyx_t_1;
7834  int __pyx_t_2;
7835  int __pyx_t_3;
7836  PyObject *__pyx_t_4 = NULL;
7837  PyObject *__pyx_t_5 = NULL;
7838  PyObject *__pyx_t_6 = NULL;
7839  __Pyx_RefNannySetupContext("__richcmp__", 0);
7840 
7841  /* "PyClical.pyx":691
7842  * True
7843  * """
7844  * if op == 2: # == # <<<<<<<<<<<<<<
7845  * if (lhs is None) or (rhs is None):
7846  * return bool(lhs is rhs)
7847  */
7848  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7849  if (__pyx_t_1) {
7850 
7851  /* "PyClical.pyx":692
7852  * """
7853  * if op == 2: # ==
7854  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7855  * return bool(lhs is rhs)
7856  * else:
7857  */
7858  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7859  __pyx_t_3 = (__pyx_t_2 != 0);
7860  if (!__pyx_t_3) {
7861  } else {
7862  __pyx_t_1 = __pyx_t_3;
7863  goto __pyx_L5_bool_binop_done;
7864  }
7865  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7866  __pyx_t_2 = (__pyx_t_3 != 0);
7867  __pyx_t_1 = __pyx_t_2;
7868  __pyx_L5_bool_binop_done:;
7869  if (__pyx_t_1) {
7870 
7871  /* "PyClical.pyx":693
7872  * if op == 2: # ==
7873  * if (lhs is None) or (rhs is None):
7874  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7875  * else:
7876  * return bool( toClifford(lhs) == toClifford(rhs) )
7877  */
7878  __Pyx_XDECREF(__pyx_r);
7879  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7880  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error)
7881  __Pyx_GOTREF(__pyx_t_4);
7882  __pyx_r = __pyx_t_4;
7883  __pyx_t_4 = 0;
7884  goto __pyx_L0;
7885 
7886  /* "PyClical.pyx":692
7887  * """
7888  * if op == 2: # ==
7889  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7890  * return bool(lhs is rhs)
7891  * else:
7892  */
7893  }
7894 
7895  /* "PyClical.pyx":695
7896  * return bool(lhs is rhs)
7897  * else:
7898  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7899  * elif op == 3: # !=
7900  * if (lhs is None) or (rhs is None):
7901  */
7902  /*else*/ {
7903  __Pyx_XDECREF(__pyx_r);
7904  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7905  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error)
7906  __Pyx_GOTREF(__pyx_t_4);
7907  __pyx_r = __pyx_t_4;
7908  __pyx_t_4 = 0;
7909  goto __pyx_L0;
7910  }
7911 
7912  /* "PyClical.pyx":691
7913  * True
7914  * """
7915  * if op == 2: # == # <<<<<<<<<<<<<<
7916  * if (lhs is None) or (rhs is None):
7917  * return bool(lhs is rhs)
7918  */
7919  }
7920 
7921  /* "PyClical.pyx":696
7922  * else:
7923  * return bool( toClifford(lhs) == toClifford(rhs) )
7924  * elif op == 3: # != # <<<<<<<<<<<<<<
7925  * if (lhs is None) or (rhs is None):
7926  * return not bool(lhs is rhs)
7927  */
7928  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7929  if (__pyx_t_1) {
7930 
7931  /* "PyClical.pyx":697
7932  * return bool( toClifford(lhs) == toClifford(rhs) )
7933  * elif op == 3: # !=
7934  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7935  * return not bool(lhs is rhs)
7936  * else:
7937  */
7938  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7939  __pyx_t_3 = (__pyx_t_2 != 0);
7940  if (!__pyx_t_3) {
7941  } else {
7942  __pyx_t_1 = __pyx_t_3;
7943  goto __pyx_L8_bool_binop_done;
7944  }
7945  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7946  __pyx_t_2 = (__pyx_t_3 != 0);
7947  __pyx_t_1 = __pyx_t_2;
7948  __pyx_L8_bool_binop_done:;
7949  if (__pyx_t_1) {
7950 
7951  /* "PyClical.pyx":698
7952  * elif op == 3: # !=
7953  * if (lhs is None) or (rhs is None):
7954  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7955  * else:
7956  * return bool( toClifford(lhs) != toClifford(rhs) )
7957  */
7958  __Pyx_XDECREF(__pyx_r);
7959  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7960  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
7961  __Pyx_GOTREF(__pyx_t_4);
7962  __pyx_r = __pyx_t_4;
7963  __pyx_t_4 = 0;
7964  goto __pyx_L0;
7965 
7966  /* "PyClical.pyx":697
7967  * return bool( toClifford(lhs) == toClifford(rhs) )
7968  * elif op == 3: # !=
7969  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7970  * return not bool(lhs is rhs)
7971  * else:
7972  */
7973  }
7974 
7975  /* "PyClical.pyx":700
7976  * return not bool(lhs is rhs)
7977  * else:
7978  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7979  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7980  * raise TypeError("This comparison operator is not implemented for "
7981  */
7982  /*else*/ {
7983  __Pyx_XDECREF(__pyx_r);
7984  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7985  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error)
7986  __Pyx_GOTREF(__pyx_t_4);
7987  __pyx_r = __pyx_t_4;
7988  __pyx_t_4 = 0;
7989  goto __pyx_L0;
7990  }
7991 
7992  /* "PyClical.pyx":696
7993  * else:
7994  * return bool( toClifford(lhs) == toClifford(rhs) )
7995  * elif op == 3: # != # <<<<<<<<<<<<<<
7996  * if (lhs is None) or (rhs is None):
7997  * return not bool(lhs is rhs)
7998  */
7999  }
8000 
8001  /* "PyClical.pyx":701
8002  * else:
8003  * return bool( toClifford(lhs) != toClifford(rhs) )
8004  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
8005  * raise TypeError("This comparison operator is not implemented for "
8006  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8007  */
8008  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
8009  __pyx_t_3 = (__pyx_t_2 != 0);
8010  if (!__pyx_t_3) {
8011  } else {
8012  __pyx_t_1 = __pyx_t_3;
8013  goto __pyx_L10_bool_binop_done;
8014  }
8015  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
8016  __pyx_t_2 = (__pyx_t_3 != 0);
8017  __pyx_t_1 = __pyx_t_2;
8018  __pyx_L10_bool_binop_done:;
8019  if (unlikely(__pyx_t_1)) {
8020 
8021  /* "PyClical.pyx":703
8022  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8023  * raise TypeError("This comparison operator is not implemented for "
8024  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
8025  * else:
8026  * return NotImplemented
8027  */
8028  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_lhs)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error)
8029  __Pyx_GOTREF(__pyx_t_4);
8030  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_This_comparison_operator_is_not, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
8031  __Pyx_GOTREF(__pyx_t_5);
8032  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8033  __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error)
8034  __Pyx_GOTREF(__pyx_t_4);
8035  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8036  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_rhs))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
8037  __Pyx_GOTREF(__pyx_t_5);
8038  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error)
8039  __Pyx_GOTREF(__pyx_t_6);
8040  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8041  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8042  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
8043  __Pyx_GOTREF(__pyx_t_5);
8044  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8045 
8046  /* "PyClical.pyx":702
8047  * return bool( toClifford(lhs) != toClifford(rhs) )
8048  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8049  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
8050  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8051  * else:
8052  */
8053  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
8054  __Pyx_GOTREF(__pyx_t_6);
8055  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8056  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
8057  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8058  __PYX_ERR(0, 702, __pyx_L1_error)
8059 
8060  /* "PyClical.pyx":701
8061  * else:
8062  * return bool( toClifford(lhs) != toClifford(rhs) )
8063  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
8064  * raise TypeError("This comparison operator is not implemented for "
8065  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8066  */
8067  }
8068 
8069  /* "PyClical.pyx":705
8070  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8071  * else:
8072  * return NotImplemented # <<<<<<<<<<<<<<
8073  *
8074  * def __getitem__(self, ixt):
8075  */
8076  /*else*/ {
8077  __Pyx_XDECREF(__pyx_r);
8078  __Pyx_INCREF(__pyx_builtin_NotImplemented);
8079  __pyx_r = __pyx_builtin_NotImplemented;
8080  goto __pyx_L0;
8081  }
8082 
8083  /* "PyClical.pyx":672
8084  * return result
8085  *
8086  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
8087  * """
8088  * Compare objects of type clifford.
8089  */
8090 
8091  /* function exit code */
8092  __pyx_L1_error:;
8093  __Pyx_XDECREF(__pyx_t_4);
8094  __Pyx_XDECREF(__pyx_t_5);
8095  __Pyx_XDECREF(__pyx_t_6);
8096  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8097  __pyx_r = NULL;
8098  __pyx_L0:;
8099  __Pyx_XGIVEREF(__pyx_r);
8100  __Pyx_RefNannyFinishContext();
8101  return __pyx_r;
8102  }
8103 
8104  /* "PyClical.pyx":707
8105  * return NotImplemented
8106  *
8107  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
8108  * """
8109  * Subscripting: map from index set to scalar coordinate.
8110  */
8111 
8112  /* Python wrapper */
8113  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
8114  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 ";
8115  #if CYTHON_COMPILING_IN_CPYTHON
8116  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
8117  #endif
8118  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
8119  PyObject *__pyx_r = 0;
8120  __Pyx_RefNannyDeclarations
8121  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
8122  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
8123 
8124  /* function exit code */
8125  __Pyx_RefNannyFinishContext();
8126  return __pyx_r;
8127  }
8128 
8129  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
8130  PyObject *__pyx_r = NULL;
8131  __Pyx_RefNannyDeclarations
8132  PyObject *__pyx_t_1 = NULL;
8133  __Pyx_RefNannySetupContext("__getitem__", 0);
8134 
8135  /* "PyClical.pyx":720
8136  * 2.0
8137  * """
8138  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
8139  *
8140  * def __neg__(self):
8141  */
8142  __Pyx_XDECREF(__pyx_r);
8143  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->operator[](__pyx_f_8PyClical_toIndexSet(__pyx_v_ixt))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
8144  __Pyx_GOTREF(__pyx_t_1);
8145  __pyx_r = __pyx_t_1;
8146  __pyx_t_1 = 0;
8147  goto __pyx_L0;
8148 
8149  /* "PyClical.pyx":707
8150  * return NotImplemented
8151  *
8152  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
8153  * """
8154  * Subscripting: map from index set to scalar coordinate.
8155  */
8156 
8157  /* function exit code */
8158  __pyx_L1_error:;
8159  __Pyx_XDECREF(__pyx_t_1);
8160  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8161  __pyx_r = NULL;
8162  __pyx_L0:;
8163  __Pyx_XGIVEREF(__pyx_r);
8164  __Pyx_RefNannyFinishContext();
8165  return __pyx_r;
8166  }
8167 
8168  /* "PyClical.pyx":722
8169  * return self.instance.getitem(toIndexSet(ixt))
8170  *
8171  * def __neg__(self): # <<<<<<<<<<<<<<
8172  * """
8173  * Unary -.
8174  */
8175 
8176  /* Python wrapper */
8177  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
8178  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ";
8179  #if CYTHON_COMPILING_IN_CPYTHON
8180  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
8181  #endif
8182  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
8183  PyObject *__pyx_r = 0;
8184  __Pyx_RefNannyDeclarations
8185  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
8186  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8187 
8188  /* function exit code */
8189  __Pyx_RefNannyFinishContext();
8190  return __pyx_r;
8191  }
8192 
8193  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8194  PyObject *__pyx_r = NULL;
8195  __Pyx_RefNannyDeclarations
8196  PyObject *__pyx_t_1 = NULL;
8197  PyObject *__pyx_t_2 = NULL;
8198  __Pyx_RefNannySetupContext("__neg__", 0);
8199 
8200  /* "PyClical.pyx":729
8201  * -{1}
8202  * """
8203  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
8204  *
8205  * def __pos__(self):
8206  */
8207  __Pyx_XDECREF(__pyx_r);
8208  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
8209  __Pyx_GOTREF(__pyx_t_1);
8210  __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_ERR(0, 729, __pyx_L1_error)
8211  __Pyx_GOTREF(__pyx_t_2);
8212  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8213  __pyx_r = __pyx_t_2;
8214  __pyx_t_2 = 0;
8215  goto __pyx_L0;
8216 
8217  /* "PyClical.pyx":722
8218  * return self.instance.getitem(toIndexSet(ixt))
8219  *
8220  * def __neg__(self): # <<<<<<<<<<<<<<
8221  * """
8222  * Unary -.
8223  */
8224 
8225  /* function exit code */
8226  __pyx_L1_error:;
8227  __Pyx_XDECREF(__pyx_t_1);
8228  __Pyx_XDECREF(__pyx_t_2);
8229  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8230  __pyx_r = NULL;
8231  __pyx_L0:;
8232  __Pyx_XGIVEREF(__pyx_r);
8233  __Pyx_RefNannyFinishContext();
8234  return __pyx_r;
8235  }
8236 
8237  /* "PyClical.pyx":731
8238  * return clifford().wrap( self.instance.neg() )
8239  *
8240  * def __pos__(self): # <<<<<<<<<<<<<<
8241  * """
8242  * Unary +.
8243  */
8244 
8245  /* Python wrapper */
8246  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8247  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ";
8248  #if CYTHON_COMPILING_IN_CPYTHON
8249  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8250  #endif
8251  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8252  PyObject *__pyx_r = 0;
8253  __Pyx_RefNannyDeclarations
8254  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8255  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8256 
8257  /* function exit code */
8258  __Pyx_RefNannyFinishContext();
8259  return __pyx_r;
8260  }
8261 
8262  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8263  PyObject *__pyx_r = NULL;
8264  __Pyx_RefNannyDeclarations
8265  PyObject *__pyx_t_1 = NULL;
8266  __Pyx_RefNannySetupContext("__pos__", 0);
8267 
8268  /* "PyClical.pyx":738
8269  * {1}
8270  * """
8271  * return clifford(self) # <<<<<<<<<<<<<<
8272  *
8273  * def __add__(lhs, rhs):
8274  */
8275  __Pyx_XDECREF(__pyx_r);
8276  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
8277  __Pyx_GOTREF(__pyx_t_1);
8278  __pyx_r = __pyx_t_1;
8279  __pyx_t_1 = 0;
8280  goto __pyx_L0;
8281 
8282  /* "PyClical.pyx":731
8283  * return clifford().wrap( self.instance.neg() )
8284  *
8285  * def __pos__(self): # <<<<<<<<<<<<<<
8286  * """
8287  * Unary +.
8288  */
8289 
8290  /* function exit code */
8291  __pyx_L1_error:;
8292  __Pyx_XDECREF(__pyx_t_1);
8293  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8294  __pyx_r = NULL;
8295  __pyx_L0:;
8296  __Pyx_XGIVEREF(__pyx_r);
8297  __Pyx_RefNannyFinishContext();
8298  return __pyx_r;
8299  }
8300 
8301  /* "PyClical.pyx":740
8302  * return clifford(self)
8303  *
8304  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8305  * """
8306  * Geometric sum.
8307  */
8308 
8309  /* Python wrapper */
8310  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8311  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 ";
8312  #if CYTHON_COMPILING_IN_CPYTHON
8313  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8314  #endif
8315  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8316  PyObject *__pyx_r = 0;
8317  __Pyx_RefNannyDeclarations
8318  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8319  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8320 
8321  /* function exit code */
8322  __Pyx_RefNannyFinishContext();
8323  return __pyx_r;
8324  }
8325 
8326  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8327  PyObject *__pyx_r = NULL;
8328  __Pyx_RefNannyDeclarations
8329  PyObject *__pyx_t_1 = NULL;
8330  PyObject *__pyx_t_2 = NULL;
8331  __Pyx_RefNannySetupContext("__add__", 0);
8332 
8333  /* "PyClical.pyx":749
8334  * {1}+{2}
8335  * """
8336  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8337  *
8338  * def __iadd__(self, rhs):
8339  */
8340  __Pyx_XDECREF(__pyx_r);
8341  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
8342  __Pyx_GOTREF(__pyx_t_1);
8343  __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_ERR(0, 749, __pyx_L1_error)
8344  __Pyx_GOTREF(__pyx_t_2);
8345  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8346  __pyx_r = __pyx_t_2;
8347  __pyx_t_2 = 0;
8348  goto __pyx_L0;
8349 
8350  /* "PyClical.pyx":740
8351  * return clifford(self)
8352  *
8353  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8354  * """
8355  * Geometric sum.
8356  */
8357 
8358  /* function exit code */
8359  __pyx_L1_error:;
8360  __Pyx_XDECREF(__pyx_t_1);
8361  __Pyx_XDECREF(__pyx_t_2);
8362  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8363  __pyx_r = NULL;
8364  __pyx_L0:;
8365  __Pyx_XGIVEREF(__pyx_r);
8366  __Pyx_RefNannyFinishContext();
8367  return __pyx_r;
8368  }
8369 
8370  /* "PyClical.pyx":751
8371  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8372  *
8373  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8374  * """
8375  * Geometric sum.
8376  */
8377 
8378  /* Python wrapper */
8379  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8380  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 ";
8381  #if CYTHON_COMPILING_IN_CPYTHON
8382  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8383  #endif
8384  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8385  PyObject *__pyx_r = 0;
8386  __Pyx_RefNannyDeclarations
8387  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8388  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8389 
8390  /* function exit code */
8391  __Pyx_RefNannyFinishContext();
8392  return __pyx_r;
8393  }
8394 
8395  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8396  PyObject *__pyx_r = NULL;
8397  __Pyx_RefNannyDeclarations
8398  PyObject *__pyx_t_1 = NULL;
8399  __Pyx_RefNannySetupContext("__iadd__", 0);
8400 
8401  /* "PyClical.pyx":758
8402  * 1+{2}
8403  * """
8404  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8405  *
8406  * def __sub__(lhs, rhs):
8407  */
8408  __Pyx_XDECREF(__pyx_r);
8409  __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_ERR(0, 758, __pyx_L1_error)
8410  __Pyx_GOTREF(__pyx_t_1);
8411  __pyx_r = __pyx_t_1;
8412  __pyx_t_1 = 0;
8413  goto __pyx_L0;
8414 
8415  /* "PyClical.pyx":751
8416  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8417  *
8418  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8419  * """
8420  * Geometric sum.
8421  */
8422 
8423  /* function exit code */
8424  __pyx_L1_error:;
8425  __Pyx_XDECREF(__pyx_t_1);
8426  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8427  __pyx_r = NULL;
8428  __pyx_L0:;
8429  __Pyx_XGIVEREF(__pyx_r);
8430  __Pyx_RefNannyFinishContext();
8431  return __pyx_r;
8432  }
8433 
8434  /* "PyClical.pyx":760
8435  * return self.wrap( self.unwrap() + toClifford(rhs) )
8436  *
8437  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8438  * """
8439  * Geometric difference.
8440  */
8441 
8442  /* Python wrapper */
8443  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8444  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 ";
8445  #if CYTHON_COMPILING_IN_CPYTHON
8446  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8447  #endif
8448  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8449  PyObject *__pyx_r = 0;
8450  __Pyx_RefNannyDeclarations
8451  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8452  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8453 
8454  /* function exit code */
8455  __Pyx_RefNannyFinishContext();
8456  return __pyx_r;
8457  }
8458 
8459  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8460  PyObject *__pyx_r = NULL;
8461  __Pyx_RefNannyDeclarations
8462  PyObject *__pyx_t_1 = NULL;
8463  PyObject *__pyx_t_2 = NULL;
8464  __Pyx_RefNannySetupContext("__sub__", 0);
8465 
8466  /* "PyClical.pyx":769
8467  * {1}-{2}
8468  * """
8469  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8470  *
8471  * def __isub__(self, rhs):
8472  */
8473  __Pyx_XDECREF(__pyx_r);
8474  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)
8475  __Pyx_GOTREF(__pyx_t_1);
8476  __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_ERR(0, 769, __pyx_L1_error)
8477  __Pyx_GOTREF(__pyx_t_2);
8478  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8479  __pyx_r = __pyx_t_2;
8480  __pyx_t_2 = 0;
8481  goto __pyx_L0;
8482 
8483  /* "PyClical.pyx":760
8484  * return self.wrap( self.unwrap() + toClifford(rhs) )
8485  *
8486  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8487  * """
8488  * Geometric difference.
8489  */
8490 
8491  /* function exit code */
8492  __pyx_L1_error:;
8493  __Pyx_XDECREF(__pyx_t_1);
8494  __Pyx_XDECREF(__pyx_t_2);
8495  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8496  __pyx_r = NULL;
8497  __pyx_L0:;
8498  __Pyx_XGIVEREF(__pyx_r);
8499  __Pyx_RefNannyFinishContext();
8500  return __pyx_r;
8501  }
8502 
8503  /* "PyClical.pyx":771
8504  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8505  *
8506  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8507  * """
8508  * Geometric difference.
8509  */
8510 
8511  /* Python wrapper */
8512  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8513  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 ";
8514  #if CYTHON_COMPILING_IN_CPYTHON
8515  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8516  #endif
8517  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8518  PyObject *__pyx_r = 0;
8519  __Pyx_RefNannyDeclarations
8520  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8521  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8522 
8523  /* function exit code */
8524  __Pyx_RefNannyFinishContext();
8525  return __pyx_r;
8526  }
8527 
8528  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8529  PyObject *__pyx_r = NULL;
8530  __Pyx_RefNannyDeclarations
8531  PyObject *__pyx_t_1 = NULL;
8532  __Pyx_RefNannySetupContext("__isub__", 0);
8533 
8534  /* "PyClical.pyx":778
8535  * 1-{2}
8536  * """
8537  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8538  *
8539  * def __mul__(lhs, rhs):
8540  */
8541  __Pyx_XDECREF(__pyx_r);
8542  __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_ERR(0, 778, __pyx_L1_error)
8543  __Pyx_GOTREF(__pyx_t_1);
8544  __pyx_r = __pyx_t_1;
8545  __pyx_t_1 = 0;
8546  goto __pyx_L0;
8547 
8548  /* "PyClical.pyx":771
8549  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8550  *
8551  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8552  * """
8553  * Geometric difference.
8554  */
8555 
8556  /* function exit code */
8557  __pyx_L1_error:;
8558  __Pyx_XDECREF(__pyx_t_1);
8559  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8560  __pyx_r = NULL;
8561  __pyx_L0:;
8562  __Pyx_XGIVEREF(__pyx_r);
8563  __Pyx_RefNannyFinishContext();
8564  return __pyx_r;
8565  }
8566 
8567  /* "PyClical.pyx":780
8568  * return self.wrap( self.unwrap() - toClifford(rhs) )
8569  *
8570  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8571  * """
8572  * Geometric product.
8573  */
8574 
8575  /* Python wrapper */
8576  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8577  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 ";
8578  #if CYTHON_COMPILING_IN_CPYTHON
8579  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8580  #endif
8581  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8582  PyObject *__pyx_r = 0;
8583  __Pyx_RefNannyDeclarations
8584  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8585  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8586 
8587  /* function exit code */
8588  __Pyx_RefNannyFinishContext();
8589  return __pyx_r;
8590  }
8591 
8592  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8593  PyObject *__pyx_r = NULL;
8594  __Pyx_RefNannyDeclarations
8595  PyObject *__pyx_t_1 = NULL;
8596  PyObject *__pyx_t_2 = NULL;
8597  __Pyx_RefNannySetupContext("__mul__", 0);
8598 
8599  /* "PyClical.pyx":791
8600  * {2}
8601  * """
8602  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8603  *
8604  * def __imul__(self, rhs):
8605  */
8606  __Pyx_XDECREF(__pyx_r);
8607  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
8608  __Pyx_GOTREF(__pyx_t_1);
8609  __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_ERR(0, 791, __pyx_L1_error)
8610  __Pyx_GOTREF(__pyx_t_2);
8611  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8612  __pyx_r = __pyx_t_2;
8613  __pyx_t_2 = 0;
8614  goto __pyx_L0;
8615 
8616  /* "PyClical.pyx":780
8617  * return self.wrap( self.unwrap() - toClifford(rhs) )
8618  *
8619  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8620  * """
8621  * Geometric product.
8622  */
8623 
8624  /* function exit code */
8625  __pyx_L1_error:;
8626  __Pyx_XDECREF(__pyx_t_1);
8627  __Pyx_XDECREF(__pyx_t_2);
8628  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8629  __pyx_r = NULL;
8630  __pyx_L0:;
8631  __Pyx_XGIVEREF(__pyx_r);
8632  __Pyx_RefNannyFinishContext();
8633  return __pyx_r;
8634  }
8635 
8636  /* "PyClical.pyx":793
8637  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8638  *
8639  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8640  * """
8641  * Geometric product.
8642  */
8643 
8644  /* Python wrapper */
8645  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8646  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 ";
8647  #if CYTHON_COMPILING_IN_CPYTHON
8648  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8649  #endif
8650  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8651  PyObject *__pyx_r = 0;
8652  __Pyx_RefNannyDeclarations
8653  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8654  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8655 
8656  /* function exit code */
8657  __Pyx_RefNannyFinishContext();
8658  return __pyx_r;
8659  }
8660 
8661  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8662  PyObject *__pyx_r = NULL;
8663  __Pyx_RefNannyDeclarations
8664  PyObject *__pyx_t_1 = NULL;
8665  __Pyx_RefNannySetupContext("__imul__", 0);
8666 
8667  /* "PyClical.pyx":804
8668  * {2}
8669  * """
8670  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8671  *
8672  * def __mod__(lhs, rhs):
8673  */
8674  __Pyx_XDECREF(__pyx_r);
8675  __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_ERR(0, 804, __pyx_L1_error)
8676  __Pyx_GOTREF(__pyx_t_1);
8677  __pyx_r = __pyx_t_1;
8678  __pyx_t_1 = 0;
8679  goto __pyx_L0;
8680 
8681  /* "PyClical.pyx":793
8682  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8683  *
8684  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8685  * """
8686  * Geometric product.
8687  */
8688 
8689  /* function exit code */
8690  __pyx_L1_error:;
8691  __Pyx_XDECREF(__pyx_t_1);
8692  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8693  __pyx_r = NULL;
8694  __pyx_L0:;
8695  __Pyx_XGIVEREF(__pyx_r);
8696  __Pyx_RefNannyFinishContext();
8697  return __pyx_r;
8698  }
8699 
8700  /* "PyClical.pyx":806
8701  * return self.wrap( self.unwrap() * toClifford(rhs) )
8702  *
8703  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8704  * """
8705  * Contraction.
8706  */
8707 
8708  /* Python wrapper */
8709  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8710  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 ";
8711  #if CYTHON_COMPILING_IN_CPYTHON
8712  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8713  #endif
8714  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8715  PyObject *__pyx_r = 0;
8716  __Pyx_RefNannyDeclarations
8717  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8718  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8719 
8720  /* function exit code */
8721  __Pyx_RefNannyFinishContext();
8722  return __pyx_r;
8723  }
8724 
8725  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8726  PyObject *__pyx_r = NULL;
8727  __Pyx_RefNannyDeclarations
8728  PyObject *__pyx_t_1 = NULL;
8729  PyObject *__pyx_t_2 = NULL;
8730  __Pyx_RefNannySetupContext("__mod__", 0);
8731 
8732  /* "PyClical.pyx":819
8733  * {2}
8734  * """
8735  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8736  *
8737  * def __imod__(self, rhs):
8738  */
8739  __Pyx_XDECREF(__pyx_r);
8740  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
8741  __Pyx_GOTREF(__pyx_t_1);
8742  __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_ERR(0, 819, __pyx_L1_error)
8743  __Pyx_GOTREF(__pyx_t_2);
8744  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8745  __pyx_r = __pyx_t_2;
8746  __pyx_t_2 = 0;
8747  goto __pyx_L0;
8748 
8749  /* "PyClical.pyx":806
8750  * return self.wrap( self.unwrap() * toClifford(rhs) )
8751  *
8752  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8753  * """
8754  * Contraction.
8755  */
8756 
8757  /* function exit code */
8758  __pyx_L1_error:;
8759  __Pyx_XDECREF(__pyx_t_1);
8760  __Pyx_XDECREF(__pyx_t_2);
8761  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8762  __pyx_r = NULL;
8763  __pyx_L0:;
8764  __Pyx_XGIVEREF(__pyx_r);
8765  __Pyx_RefNannyFinishContext();
8766  return __pyx_r;
8767  }
8768 
8769  /* "PyClical.pyx":821
8770  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8771  *
8772  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8773  * """
8774  * Contraction.
8775  */
8776 
8777  /* Python wrapper */
8778  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8779  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 ";
8780  #if CYTHON_COMPILING_IN_CPYTHON
8781  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8782  #endif
8783  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8784  PyObject *__pyx_r = 0;
8785  __Pyx_RefNannyDeclarations
8786  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8787  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8788 
8789  /* function exit code */
8790  __Pyx_RefNannyFinishContext();
8791  return __pyx_r;
8792  }
8793 
8794  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8795  PyObject *__pyx_r = NULL;
8796  __Pyx_RefNannyDeclarations
8797  PyObject *__pyx_t_1 = NULL;
8798  __Pyx_RefNannySetupContext("__imod__", 0);
8799 
8800  /* "PyClical.pyx":834
8801  * {2}
8802  * """
8803  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8804  *
8805  * def __and__(lhs, rhs):
8806  */
8807  __Pyx_XDECREF(__pyx_r);
8808  __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_ERR(0, 834, __pyx_L1_error)
8809  __Pyx_GOTREF(__pyx_t_1);
8810  __pyx_r = __pyx_t_1;
8811  __pyx_t_1 = 0;
8812  goto __pyx_L0;
8813 
8814  /* "PyClical.pyx":821
8815  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8816  *
8817  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8818  * """
8819  * Contraction.
8820  */
8821 
8822  /* function exit code */
8823  __pyx_L1_error:;
8824  __Pyx_XDECREF(__pyx_t_1);
8825  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8826  __pyx_r = NULL;
8827  __pyx_L0:;
8828  __Pyx_XGIVEREF(__pyx_r);
8829  __Pyx_RefNannyFinishContext();
8830  return __pyx_r;
8831  }
8832 
8833  /* "PyClical.pyx":836
8834  * return self.wrap( self.unwrap() % toClifford(rhs) )
8835  *
8836  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8837  * """
8838  * Inner product.
8839  */
8840 
8841  /* Python wrapper */
8842  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8843  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 ";
8844  #if CYTHON_COMPILING_IN_CPYTHON
8845  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8846  #endif
8847  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8848  PyObject *__pyx_r = 0;
8849  __Pyx_RefNannyDeclarations
8850  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8851  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8852 
8853  /* function exit code */
8854  __Pyx_RefNannyFinishContext();
8855  return __pyx_r;
8856  }
8857 
8858  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8859  PyObject *__pyx_r = NULL;
8860  __Pyx_RefNannyDeclarations
8861  PyObject *__pyx_t_1 = NULL;
8862  PyObject *__pyx_t_2 = NULL;
8863  __Pyx_RefNannySetupContext("__and__", 0);
8864 
8865  /* "PyClical.pyx":849
8866  * {2}
8867  * """
8868  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8869  *
8870  * def __iand__(self, rhs):
8871  */
8872  __Pyx_XDECREF(__pyx_r);
8873  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
8874  __Pyx_GOTREF(__pyx_t_1);
8875  __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_ERR(0, 849, __pyx_L1_error)
8876  __Pyx_GOTREF(__pyx_t_2);
8877  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8878  __pyx_r = __pyx_t_2;
8879  __pyx_t_2 = 0;
8880  goto __pyx_L0;
8881 
8882  /* "PyClical.pyx":836
8883  * return self.wrap( self.unwrap() % toClifford(rhs) )
8884  *
8885  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8886  * """
8887  * Inner product.
8888  */
8889 
8890  /* function exit code */
8891  __pyx_L1_error:;
8892  __Pyx_XDECREF(__pyx_t_1);
8893  __Pyx_XDECREF(__pyx_t_2);
8894  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8895  __pyx_r = NULL;
8896  __pyx_L0:;
8897  __Pyx_XGIVEREF(__pyx_r);
8898  __Pyx_RefNannyFinishContext();
8899  return __pyx_r;
8900  }
8901 
8902  /* "PyClical.pyx":851
8903  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8904  *
8905  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8906  * """
8907  * Inner product.
8908  */
8909 
8910  /* Python wrapper */
8911  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8912  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 ";
8913  #if CYTHON_COMPILING_IN_CPYTHON
8914  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8915  #endif
8916  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8917  PyObject *__pyx_r = 0;
8918  __Pyx_RefNannyDeclarations
8919  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8920  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8921 
8922  /* function exit code */
8923  __Pyx_RefNannyFinishContext();
8924  return __pyx_r;
8925  }
8926 
8927  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8928  PyObject *__pyx_r = NULL;
8929  __Pyx_RefNannyDeclarations
8930  PyObject *__pyx_t_1 = NULL;
8931  __Pyx_RefNannySetupContext("__iand__", 0);
8932 
8933  /* "PyClical.pyx":864
8934  * {2}
8935  * """
8936  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8937  *
8938  * def __xor__(lhs, rhs):
8939  */
8940  __Pyx_XDECREF(__pyx_r);
8941  __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_ERR(0, 864, __pyx_L1_error)
8942  __Pyx_GOTREF(__pyx_t_1);
8943  __pyx_r = __pyx_t_1;
8944  __pyx_t_1 = 0;
8945  goto __pyx_L0;
8946 
8947  /* "PyClical.pyx":851
8948  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8949  *
8950  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8951  * """
8952  * Inner product.
8953  */
8954 
8955  /* function exit code */
8956  __pyx_L1_error:;
8957  __Pyx_XDECREF(__pyx_t_1);
8958  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8959  __pyx_r = NULL;
8960  __pyx_L0:;
8961  __Pyx_XGIVEREF(__pyx_r);
8962  __Pyx_RefNannyFinishContext();
8963  return __pyx_r;
8964  }
8965 
8966  /* "PyClical.pyx":866
8967  * return self.wrap( self.unwrap() & toClifford(rhs) )
8968  *
8969  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8970  * """
8971  * Outer product.
8972  */
8973 
8974  /* Python wrapper */
8975  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8976  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 ";
8977  #if CYTHON_COMPILING_IN_CPYTHON
8978  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8979  #endif
8980  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8981  PyObject *__pyx_r = 0;
8982  __Pyx_RefNannyDeclarations
8983  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8984  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8985 
8986  /* function exit code */
8987  __Pyx_RefNannyFinishContext();
8988  return __pyx_r;
8989  }
8990 
8991  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8992  PyObject *__pyx_r = NULL;
8993  __Pyx_RefNannyDeclarations
8994  PyObject *__pyx_t_1 = NULL;
8995  PyObject *__pyx_t_2 = NULL;
8996  __Pyx_RefNannySetupContext("__xor__", 0);
8997 
8998  /* "PyClical.pyx":879
8999  * 0
9000  * """
9001  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
9002  *
9003  * def __ixor__(self, rhs):
9004  */
9005  __Pyx_XDECREF(__pyx_r);
9006  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
9007  __Pyx_GOTREF(__pyx_t_1);
9008  __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_ERR(0, 879, __pyx_L1_error)
9009  __Pyx_GOTREF(__pyx_t_2);
9010  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9011  __pyx_r = __pyx_t_2;
9012  __pyx_t_2 = 0;
9013  goto __pyx_L0;
9014 
9015  /* "PyClical.pyx":866
9016  * return self.wrap( self.unwrap() & toClifford(rhs) )
9017  *
9018  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
9019  * """
9020  * Outer product.
9021  */
9022 
9023  /* function exit code */
9024  __pyx_L1_error:;
9025  __Pyx_XDECREF(__pyx_t_1);
9026  __Pyx_XDECREF(__pyx_t_2);
9027  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9028  __pyx_r = NULL;
9029  __pyx_L0:;
9030  __Pyx_XGIVEREF(__pyx_r);
9031  __Pyx_RefNannyFinishContext();
9032  return __pyx_r;
9033  }
9034 
9035  /* "PyClical.pyx":881
9036  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
9037  *
9038  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
9039  * """
9040  * Outer product.
9041  */
9042 
9043  /* Python wrapper */
9044  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9045  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 ";
9046  #if CYTHON_COMPILING_IN_CPYTHON
9047  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
9048  #endif
9049  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9050  PyObject *__pyx_r = 0;
9051  __Pyx_RefNannyDeclarations
9052  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
9053  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9054 
9055  /* function exit code */
9056  __Pyx_RefNannyFinishContext();
9057  return __pyx_r;
9058  }
9059 
9060  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9061  PyObject *__pyx_r = NULL;
9062  __Pyx_RefNannyDeclarations
9063  PyObject *__pyx_t_1 = NULL;
9064  __Pyx_RefNannySetupContext("__ixor__", 0);
9065 
9066  /* "PyClical.pyx":894
9067  * 0
9068  * """
9069  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
9070  *
9071  * def __truediv__(lhs, rhs):
9072  */
9073  __Pyx_XDECREF(__pyx_r);
9074  __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_ERR(0, 894, __pyx_L1_error)
9075  __Pyx_GOTREF(__pyx_t_1);
9076  __pyx_r = __pyx_t_1;
9077  __pyx_t_1 = 0;
9078  goto __pyx_L0;
9079 
9080  /* "PyClical.pyx":881
9081  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
9082  *
9083  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
9084  * """
9085  * Outer product.
9086  */
9087 
9088  /* function exit code */
9089  __pyx_L1_error:;
9090  __Pyx_XDECREF(__pyx_t_1);
9091  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9092  __pyx_r = NULL;
9093  __pyx_L0:;
9094  __Pyx_XGIVEREF(__pyx_r);
9095  __Pyx_RefNannyFinishContext();
9096  return __pyx_r;
9097  }
9098 
9099  /* "PyClical.pyx":896
9100  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
9101  *
9102  * def __truediv__(lhs, rhs): # <<<<<<<<<<<<<<
9103  * """
9104  * Geometric quotient.
9105  */
9106 
9107  /* Python wrapper */
9108  static PyObject *__pyx_pw_8PyClical_8clifford_45__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9109  static char __pyx_doc_8PyClical_8clifford_44__truediv__[] = "\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 ";
9110  #if CYTHON_COMPILING_IN_CPYTHON
9111  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__truediv__;
9112  #endif
9113  static PyObject *__pyx_pw_8PyClical_8clifford_45__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9114  PyObject *__pyx_r = 0;
9115  __Pyx_RefNannyDeclarations
9116  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
9117  __pyx_r = __pyx_pf_8PyClical_8clifford_44__truediv__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9118 
9119  /* function exit code */
9120  __Pyx_RefNannyFinishContext();
9121  return __pyx_r;
9122  }
9123 
9124  static PyObject *__pyx_pf_8PyClical_8clifford_44__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9125  PyObject *__pyx_r = NULL;
9126  __Pyx_RefNannyDeclarations
9127  PyObject *__pyx_t_1 = NULL;
9128  PyObject *__pyx_t_2 = NULL;
9129  __Pyx_RefNannySetupContext("__truediv__", 0);
9130 
9131  /* "PyClical.pyx":909
9132  * -{2}
9133  * """
9134  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
9135  *
9136  * def __idiv__(self, rhs):
9137  */
9138  __Pyx_XDECREF(__pyx_r);
9139  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
9140  __Pyx_GOTREF(__pyx_t_1);
9141  __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_ERR(0, 909, __pyx_L1_error)
9142  __Pyx_GOTREF(__pyx_t_2);
9143  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9144  __pyx_r = __pyx_t_2;
9145  __pyx_t_2 = 0;
9146  goto __pyx_L0;
9147 
9148  /* "PyClical.pyx":896
9149  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
9150  *
9151  * def __truediv__(lhs, rhs): # <<<<<<<<<<<<<<
9152  * """
9153  * Geometric quotient.
9154  */
9155 
9156  /* function exit code */
9157  __pyx_L1_error:;
9158  __Pyx_XDECREF(__pyx_t_1);
9159  __Pyx_XDECREF(__pyx_t_2);
9160  __Pyx_AddTraceback("PyClical.clifford.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9161  __pyx_r = NULL;
9162  __pyx_L0:;
9163  __Pyx_XGIVEREF(__pyx_r);
9164  __Pyx_RefNannyFinishContext();
9165  return __pyx_r;
9166  }
9167 
9168  /* "PyClical.pyx":911
9169  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9170  *
9171  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9172  * """
9173  * Geometric quotient.
9174  */
9175 
9176  /* Python wrapper */
9177  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9178  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9179  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 ";
9180  #if CYTHON_COMPILING_IN_CPYTHON
9181  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
9182  #endif
9183  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9184  PyObject *__pyx_r = 0;
9185  __Pyx_RefNannyDeclarations
9186  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
9187  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9188 
9189  /* function exit code */
9190  __Pyx_RefNannyFinishContext();
9191  return __pyx_r;
9192  }
9193  #endif
9195  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9196  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9197  PyObject *__pyx_r = NULL;
9198  __Pyx_RefNannyDeclarations
9199  PyObject *__pyx_t_1 = NULL;
9200  __Pyx_RefNannySetupContext("__idiv__", 0);
9201 
9202  /* "PyClical.pyx":924
9203  * -{2}
9204  * """
9205  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
9206  *
9207  * def inv(self):
9208  */
9209  __Pyx_XDECREF(__pyx_r);
9210  __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_ERR(0, 924, __pyx_L1_error)
9211  __Pyx_GOTREF(__pyx_t_1);
9212  __pyx_r = __pyx_t_1;
9213  __pyx_t_1 = 0;
9214  goto __pyx_L0;
9215 
9216  /* "PyClical.pyx":911
9217  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9218  *
9219  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9220  * """
9221  * Geometric quotient.
9222  */
9223 
9224  /* function exit code */
9225  __pyx_L1_error:;
9226  __Pyx_XDECREF(__pyx_t_1);
9227  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9228  __pyx_r = NULL;
9229  __pyx_L0:;
9230  __Pyx_XGIVEREF(__pyx_r);
9231  __Pyx_RefNannyFinishContext();
9232  return __pyx_r;
9233  }
9234  #endif
9236  /* "PyClical.pyx":926
9237  * return self.wrap( self.unwrap() / toClifford(rhs) )
9238  *
9239  * def inv(self): # <<<<<<<<<<<<<<
9240  * """
9241  * Geometric multiplicative inverse.
9242  */
9243 
9244  /* Python wrapper */
9245  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9246  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 ";
9247  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9248  PyObject *__pyx_r = 0;
9249  __Pyx_RefNannyDeclarations
9250  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9251  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9252 
9253  /* function exit code */
9254  __Pyx_RefNannyFinishContext();
9255  return __pyx_r;
9256  }
9257 
9258  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9259  PyObject *__pyx_r = NULL;
9260  __Pyx_RefNannyDeclarations
9261  PyObject *__pyx_t_1 = NULL;
9262  PyObject *__pyx_t_2 = NULL;
9263  __Pyx_RefNannySetupContext("inv", 0);
9264 
9265  /* "PyClical.pyx":937
9266  * -{1,2}
9267  * """
9268  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9269  *
9270  * def __or__(lhs, rhs):
9271  */
9272  __Pyx_XDECREF(__pyx_r);
9273  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error)
9274  __Pyx_GOTREF(__pyx_t_1);
9275  __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_ERR(0, 937, __pyx_L1_error)
9276  __Pyx_GOTREF(__pyx_t_2);
9277  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9278  __pyx_r = __pyx_t_2;
9279  __pyx_t_2 = 0;
9280  goto __pyx_L0;
9281 
9282  /* "PyClical.pyx":926
9283  * return self.wrap( self.unwrap() / toClifford(rhs) )
9284  *
9285  * def inv(self): # <<<<<<<<<<<<<<
9286  * """
9287  * Geometric multiplicative inverse.
9288  */
9289 
9290  /* function exit code */
9291  __pyx_L1_error:;
9292  __Pyx_XDECREF(__pyx_t_1);
9293  __Pyx_XDECREF(__pyx_t_2);
9294  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9295  __pyx_r = NULL;
9296  __pyx_L0:;
9297  __Pyx_XGIVEREF(__pyx_r);
9298  __Pyx_RefNannyFinishContext();
9299  return __pyx_r;
9300  }
9301 
9302  /* "PyClical.pyx":939
9303  * return clifford().wrap( self.instance.inv() )
9304  *
9305  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9306  * """
9307  * Transform left hand side, using right hand side as a transformation.
9308  */
9309 
9310  /* Python wrapper */
9311  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9312  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 ";
9313  #if CYTHON_COMPILING_IN_CPYTHON
9314  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9315  #endif
9316  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9317  PyObject *__pyx_r = 0;
9318  __Pyx_RefNannyDeclarations
9319  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9320  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9321 
9322  /* function exit code */
9323  __Pyx_RefNannyFinishContext();
9324  return __pyx_r;
9325  }
9326 
9327  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9328  PyObject *__pyx_r = NULL;
9329  __Pyx_RefNannyDeclarations
9330  PyObject *__pyx_t_1 = NULL;
9331  PyObject *__pyx_t_2 = NULL;
9332  __Pyx_RefNannySetupContext("__or__", 0);
9333 
9334  /* "PyClical.pyx":948
9335  * -{1}
9336  * """
9337  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9338  *
9339  * def __ior__(self, rhs):
9340  */
9341  __Pyx_XDECREF(__pyx_r);
9342  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
9343  __Pyx_GOTREF(__pyx_t_1);
9344  __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_ERR(0, 948, __pyx_L1_error)
9345  __Pyx_GOTREF(__pyx_t_2);
9346  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9347  __pyx_r = __pyx_t_2;
9348  __pyx_t_2 = 0;
9349  goto __pyx_L0;
9350 
9351  /* "PyClical.pyx":939
9352  * return clifford().wrap( self.instance.inv() )
9353  *
9354  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9355  * """
9356  * Transform left hand side, using right hand side as a transformation.
9357  */
9358 
9359  /* function exit code */
9360  __pyx_L1_error:;
9361  __Pyx_XDECREF(__pyx_t_1);
9362  __Pyx_XDECREF(__pyx_t_2);
9363  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9364  __pyx_r = NULL;
9365  __pyx_L0:;
9366  __Pyx_XGIVEREF(__pyx_r);
9367  __Pyx_RefNannyFinishContext();
9368  return __pyx_r;
9369  }
9370 
9371  /* "PyClical.pyx":950
9372  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9373  *
9374  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9375  * """
9376  * Transform left hand side, using right hand side as a transformation.
9377  */
9378 
9379  /* Python wrapper */
9380  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9381  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 ";
9382  #if CYTHON_COMPILING_IN_CPYTHON
9383  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9384  #endif
9385  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9386  PyObject *__pyx_r = 0;
9387  __Pyx_RefNannyDeclarations
9388  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9389  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9390 
9391  /* function exit code */
9392  __Pyx_RefNannyFinishContext();
9393  return __pyx_r;
9394  }
9395 
9396  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9397  PyObject *__pyx_r = NULL;
9398  __Pyx_RefNannyDeclarations
9399  PyObject *__pyx_t_1 = NULL;
9400  __Pyx_RefNannySetupContext("__ior__", 0);
9401 
9402  /* "PyClical.pyx":959
9403  * -{1}
9404  * """
9405  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9406  *
9407  * def __pow__(self, m, dummy):
9408  */
9409  __Pyx_XDECREF(__pyx_r);
9410  __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_ERR(0, 959, __pyx_L1_error)
9411  __Pyx_GOTREF(__pyx_t_1);
9412  __pyx_r = __pyx_t_1;
9413  __pyx_t_1 = 0;
9414  goto __pyx_L0;
9415 
9416  /* "PyClical.pyx":950
9417  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9418  *
9419  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9420  * """
9421  * Transform left hand side, using right hand side as a transformation.
9422  */
9423 
9424  /* function exit code */
9425  __pyx_L1_error:;
9426  __Pyx_XDECREF(__pyx_t_1);
9427  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9428  __pyx_r = NULL;
9429  __pyx_L0:;
9430  __Pyx_XGIVEREF(__pyx_r);
9431  __Pyx_RefNannyFinishContext();
9432  return __pyx_r;
9433  }
9434 
9435  /* "PyClical.pyx":961
9436  * return self.wrap( self.unwrap() | toClifford(rhs) )
9437  *
9438  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9439  * """
9440  * Power: self to the m.
9441  */
9442 
9443  /* Python wrapper */
9444  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9445  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 ";
9446  #if CYTHON_COMPILING_IN_CPYTHON
9447  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9448  #endif
9449  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9450  PyObject *__pyx_r = 0;
9451  __Pyx_RefNannyDeclarations
9452  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9453  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9454 
9455  /* function exit code */
9456  __Pyx_RefNannyFinishContext();
9457  return __pyx_r;
9458  }
9459 
9460  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9461  PyObject *__pyx_r = NULL;
9462  __Pyx_RefNannyDeclarations
9463  PyObject *__pyx_t_1 = NULL;
9464  __Pyx_RefNannySetupContext("__pow__", 0);
9465 
9466  /* "PyClical.pyx":978
9467  * 1
9468  * """
9469  * return pow(self, m) # <<<<<<<<<<<<<<
9470  *
9471  * def pow(self, m):
9472  */
9473  __Pyx_XDECREF(__pyx_r);
9474  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_self, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
9475  __Pyx_GOTREF(__pyx_t_1);
9476  __pyx_r = __pyx_t_1;
9477  __pyx_t_1 = 0;
9478  goto __pyx_L0;
9479 
9480  /* "PyClical.pyx":961
9481  * return self.wrap( self.unwrap() | toClifford(rhs) )
9482  *
9483  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9484  * """
9485  * Power: self to the m.
9486  */
9487 
9488  /* function exit code */
9489  __pyx_L1_error:;
9490  __Pyx_XDECREF(__pyx_t_1);
9491  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9492  __pyx_r = NULL;
9493  __pyx_L0:;
9494  __Pyx_XGIVEREF(__pyx_r);
9495  __Pyx_RefNannyFinishContext();
9496  return __pyx_r;
9497  }
9498 
9499  /* "PyClical.pyx":980
9500  * return pow(self, m)
9501  *
9502  * def pow(self, m): # <<<<<<<<<<<<<<
9503  * """
9504  * Power: self to the m.
9505  */
9506 
9507  /* Python wrapper */
9508  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9509  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 ";
9510  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9511  PyObject *__pyx_r = 0;
9512  __Pyx_RefNannyDeclarations
9513  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9514  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9515 
9516  /* function exit code */
9517  __Pyx_RefNannyFinishContext();
9518  return __pyx_r;
9519  }
9520 
9521  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9522  PyObject *__pyx_r = NULL;
9523  __Pyx_RefNannyDeclarations
9524  PyObject *__pyx_t_1 = NULL;
9525  PyObject *__pyx_t_2 = NULL;
9526  int __pyx_t_3;
9527  int __pyx_t_4;
9528  int __pyx_t_5;
9529  __Pyx_RefNannySetupContext("pow", 0);
9530 
9531  /* "PyClical.pyx":999
9532  * 1
9533  * """
9534  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9535  * return clifford().wrap( self.instance.pow(m) )
9536  * else:
9537  */
9538  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
9539  __Pyx_GOTREF(__pyx_t_1);
9540  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Integral); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9541  __Pyx_GOTREF(__pyx_t_2);
9542  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9543  __pyx_t_3 = PyObject_IsInstance(__pyx_v_m, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 999, __pyx_L1_error)
9544  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9545  __pyx_t_4 = (__pyx_t_3 != 0);
9546  if (__pyx_t_4) {
9547 
9548  /* "PyClical.pyx":1000
9549  * """
9550  * if isinstance(m, numbers.Integral):
9551  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9552  * else:
9553  * return exp(m * log(self))
9554  */
9555  __Pyx_XDECREF(__pyx_r);
9556  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
9557  __Pyx_GOTREF(__pyx_t_2);
9558  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L1_error)
9559  __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_ERR(0, 1000, __pyx_L1_error)
9560  __Pyx_GOTREF(__pyx_t_1);
9561  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9562  __pyx_r = __pyx_t_1;
9563  __pyx_t_1 = 0;
9564  goto __pyx_L0;
9565 
9566  /* "PyClical.pyx":999
9567  * 1
9568  * """
9569  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9570  * return clifford().wrap( self.instance.pow(m) )
9571  * else:
9572  */
9573  }
9574 
9575  /* "PyClical.pyx":1002
9576  * return clifford().wrap( self.instance.pow(m) )
9577  * else:
9578  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9579  *
9580  * def outer_pow(self, m):
9581  */
9582  /*else*/ {
9583  __Pyx_XDECREF(__pyx_r);
9584  __pyx_t_1 = __pyx_f_8PyClical_log(((PyObject *)__pyx_v_self), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
9585  __Pyx_GOTREF(__pyx_t_1);
9586  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
9587  __Pyx_GOTREF(__pyx_t_2);
9588  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9589  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
9590  __Pyx_GOTREF(__pyx_t_1);
9591  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9592  __pyx_r = __pyx_t_1;
9593  __pyx_t_1 = 0;
9594  goto __pyx_L0;
9595  }
9596 
9597  /* "PyClical.pyx":980
9598  * return pow(self, m)
9599  *
9600  * def pow(self, m): # <<<<<<<<<<<<<<
9601  * """
9602  * Power: self to the m.
9603  */
9604 
9605  /* function exit code */
9606  __pyx_L1_error:;
9607  __Pyx_XDECREF(__pyx_t_1);
9608  __Pyx_XDECREF(__pyx_t_2);
9609  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9610  __pyx_r = NULL;
9611  __pyx_L0:;
9612  __Pyx_XGIVEREF(__pyx_r);
9613  __Pyx_RefNannyFinishContext();
9614  return __pyx_r;
9615  }
9616 
9617  /* "PyClical.pyx":1004
9618  * return exp(m * log(self))
9619  *
9620  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9621  * """
9622  * Outer product power.
9623  */
9624 
9625  /* Python wrapper */
9626  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9627  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 ";
9628  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9629  PyObject *__pyx_r = 0;
9630  __Pyx_RefNannyDeclarations
9631  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9632  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9633 
9634  /* function exit code */
9635  __Pyx_RefNannyFinishContext();
9636  return __pyx_r;
9637  }
9638 
9639  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9640  PyObject *__pyx_r = NULL;
9641  __Pyx_RefNannyDeclarations
9642  PyObject *__pyx_t_1 = NULL;
9643  int __pyx_t_2;
9644  PyObject *__pyx_t_3 = NULL;
9645  __Pyx_RefNannySetupContext("outer_pow", 0);
9646 
9647  /* "PyClical.pyx":1018
9648  *
9649  * """
9650  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9651  *
9652  * def __call__(self, grade):
9653  */
9654  __Pyx_XDECREF(__pyx_r);
9655  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
9656  __Pyx_GOTREF(__pyx_t_1);
9657  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
9658  __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_ERR(0, 1018, __pyx_L1_error)
9659  __Pyx_GOTREF(__pyx_t_3);
9660  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9661  __pyx_r = __pyx_t_3;
9662  __pyx_t_3 = 0;
9663  goto __pyx_L0;
9664 
9665  /* "PyClical.pyx":1004
9666  * return exp(m * log(self))
9667  *
9668  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9669  * """
9670  * Outer product power.
9671  */
9672 
9673  /* function exit code */
9674  __pyx_L1_error:;
9675  __Pyx_XDECREF(__pyx_t_1);
9676  __Pyx_XDECREF(__pyx_t_3);
9677  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9678  __pyx_r = NULL;
9679  __pyx_L0:;
9680  __Pyx_XGIVEREF(__pyx_r);
9681  __Pyx_RefNannyFinishContext();
9682  return __pyx_r;
9683  }
9684 
9685  /* "PyClical.pyx":1020
9686  * return clifford().wrap( self.instance.outer_pow(m) )
9687  *
9688  * def __call__(self, grade): # <<<<<<<<<<<<<<
9689  * """
9690  * Pure grade-vector part.
9691  */
9692 
9693  /* Python wrapper */
9694  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9695  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 ";
9696  #if CYTHON_COMPILING_IN_CPYTHON
9697  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9698  #endif
9699  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9700  PyObject *__pyx_v_grade = 0;
9701  PyObject *__pyx_r = 0;
9702  __Pyx_RefNannyDeclarations
9703  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9704  {
9705  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9706  PyObject* values[1] = {0};
9707  if (unlikely(__pyx_kwds)) {
9708  Py_ssize_t kw_args;
9709  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9710  switch (pos_args) {
9711  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9712  CYTHON_FALLTHROUGH;
9713  case 0: break;
9714  default: goto __pyx_L5_argtuple_error;
9715  }
9716  kw_args = PyDict_Size(__pyx_kwds);
9717  switch (pos_args) {
9718  case 0:
9719  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9720  else goto __pyx_L5_argtuple_error;
9721  }
9722  if (unlikely(kw_args > 0)) {
9723  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1020, __pyx_L3_error)
9724  }
9725  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9726  goto __pyx_L5_argtuple_error;
9727  } else {
9728  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9729  }
9730  __pyx_v_grade = values[0];
9731  }
9732  goto __pyx_L4_argument_unpacking_done;
9733  __pyx_L5_argtuple_error:;
9734  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1020, __pyx_L3_error)
9735  __pyx_L3_error:;
9736  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9737  __Pyx_RefNannyFinishContext();
9738  return NULL;
9739  __pyx_L4_argument_unpacking_done:;
9740  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9741 
9742  /* function exit code */
9743  __Pyx_RefNannyFinishContext();
9744  return __pyx_r;
9745  }
9746 
9747  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9748  PyObject *__pyx_r = NULL;
9749  __Pyx_RefNannyDeclarations
9750  PyObject *__pyx_t_1 = NULL;
9751  int __pyx_t_2;
9752  PyObject *__pyx_t_3 = NULL;
9753  __Pyx_RefNannySetupContext("__call__", 0);
9754 
9755  /* "PyClical.pyx":1037
9756  * 0
9757  * """
9758  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9759  *
9760  * def scalar(self):
9761  */
9762  __Pyx_XDECREF(__pyx_r);
9763  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
9764  __Pyx_GOTREF(__pyx_t_1);
9765  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_grade); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L1_error)
9766  __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_ERR(0, 1037, __pyx_L1_error)
9767  __Pyx_GOTREF(__pyx_t_3);
9768  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9769  __pyx_r = __pyx_t_3;
9770  __pyx_t_3 = 0;
9771  goto __pyx_L0;
9772 
9773  /* "PyClical.pyx":1020
9774  * return clifford().wrap( self.instance.outer_pow(m) )
9775  *
9776  * def __call__(self, grade): # <<<<<<<<<<<<<<
9777  * """
9778  * Pure grade-vector part.
9779  */
9780 
9781  /* function exit code */
9782  __pyx_L1_error:;
9783  __Pyx_XDECREF(__pyx_t_1);
9784  __Pyx_XDECREF(__pyx_t_3);
9785  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9786  __pyx_r = NULL;
9787  __pyx_L0:;
9788  __Pyx_XGIVEREF(__pyx_r);
9789  __Pyx_RefNannyFinishContext();
9790  return __pyx_r;
9791  }
9792 
9793  /* "PyClical.pyx":1039
9794  * return clifford().wrap( self.instance.call(grade) )
9795  *
9796  * def scalar(self): # <<<<<<<<<<<<<<
9797  * """
9798  * Scalar part.
9799  */
9800 
9801  /* Python wrapper */
9802  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9803  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 ";
9804  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9805  PyObject *__pyx_r = 0;
9806  __Pyx_RefNannyDeclarations
9807  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9808  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9809 
9810  /* function exit code */
9811  __Pyx_RefNannyFinishContext();
9812  return __pyx_r;
9813  }
9814 
9815  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9816  PyObject *__pyx_r = NULL;
9817  __Pyx_RefNannyDeclarations
9818  PyObject *__pyx_t_1 = NULL;
9819  __Pyx_RefNannySetupContext("scalar", 0);
9820 
9821  /* "PyClical.pyx":1048
9822  * 0.0
9823  * """
9824  * return self.instance.scalar() # <<<<<<<<<<<<<<
9825  *
9826  * def pure(self):
9827  */
9828  __Pyx_XDECREF(__pyx_r);
9829  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
9830  __Pyx_GOTREF(__pyx_t_1);
9831  __pyx_r = __pyx_t_1;
9832  __pyx_t_1 = 0;
9833  goto __pyx_L0;
9834 
9835  /* "PyClical.pyx":1039
9836  * return clifford().wrap( self.instance.call(grade) )
9837  *
9838  * def scalar(self): # <<<<<<<<<<<<<<
9839  * """
9840  * Scalar part.
9841  */
9842 
9843  /* function exit code */
9844  __pyx_L1_error:;
9845  __Pyx_XDECREF(__pyx_t_1);
9846  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9847  __pyx_r = NULL;
9848  __pyx_L0:;
9849  __Pyx_XGIVEREF(__pyx_r);
9850  __Pyx_RefNannyFinishContext();
9851  return __pyx_r;
9852  }
9853 
9854  /* "PyClical.pyx":1050
9855  * return self.instance.scalar()
9856  *
9857  * def pure(self): # <<<<<<<<<<<<<<
9858  * """
9859  * Pure part.
9860  */
9861 
9862  /* Python wrapper */
9863  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9864  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 ";
9865  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9866  PyObject *__pyx_r = 0;
9867  __Pyx_RefNannyDeclarations
9868  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9869  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9870 
9871  /* function exit code */
9872  __Pyx_RefNannyFinishContext();
9873  return __pyx_r;
9874  }
9875 
9876  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9877  PyObject *__pyx_r = NULL;
9878  __Pyx_RefNannyDeclarations
9879  PyObject *__pyx_t_1 = NULL;
9880  PyObject *__pyx_t_2 = NULL;
9881  __Pyx_RefNannySetupContext("pure", 0);
9882 
9883  /* "PyClical.pyx":1059
9884  * {1,2}
9885  * """
9886  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9887  *
9888  * def even(self):
9889  */
9890  __Pyx_XDECREF(__pyx_r);
9891  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L1_error)
9892  __Pyx_GOTREF(__pyx_t_1);
9893  __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_ERR(0, 1059, __pyx_L1_error)
9894  __Pyx_GOTREF(__pyx_t_2);
9895  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9896  __pyx_r = __pyx_t_2;
9897  __pyx_t_2 = 0;
9898  goto __pyx_L0;
9899 
9900  /* "PyClical.pyx":1050
9901  * return self.instance.scalar()
9902  *
9903  * def pure(self): # <<<<<<<<<<<<<<
9904  * """
9905  * Pure part.
9906  */
9907 
9908  /* function exit code */
9909  __pyx_L1_error:;
9910  __Pyx_XDECREF(__pyx_t_1);
9911  __Pyx_XDECREF(__pyx_t_2);
9912  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9913  __pyx_r = NULL;
9914  __pyx_L0:;
9915  __Pyx_XGIVEREF(__pyx_r);
9916  __Pyx_RefNannyFinishContext();
9917  return __pyx_r;
9918  }
9919 
9920  /* "PyClical.pyx":1061
9921  * return clifford().wrap( self.instance.pure() )
9922  *
9923  * def even(self): # <<<<<<<<<<<<<<
9924  * """
9925  * Even part of multivector, sum of even grade terms.
9926  */
9927 
9928  /* Python wrapper */
9929  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9930  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 ";
9931  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9932  PyObject *__pyx_r = 0;
9933  __Pyx_RefNannyDeclarations
9934  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9935  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9936 
9937  /* function exit code */
9938  __Pyx_RefNannyFinishContext();
9939  return __pyx_r;
9940  }
9941 
9942  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9943  PyObject *__pyx_r = NULL;
9944  __Pyx_RefNannyDeclarations
9945  PyObject *__pyx_t_1 = NULL;
9946  PyObject *__pyx_t_2 = NULL;
9947  __Pyx_RefNannySetupContext("even", 0);
9948 
9949  /* "PyClical.pyx":1068
9950  * 1+{1,2}
9951  * """
9952  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9953  *
9954  * def odd(self):
9955  */
9956  __Pyx_XDECREF(__pyx_r);
9957  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
9958  __Pyx_GOTREF(__pyx_t_1);
9959  __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_ERR(0, 1068, __pyx_L1_error)
9960  __Pyx_GOTREF(__pyx_t_2);
9961  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9962  __pyx_r = __pyx_t_2;
9963  __pyx_t_2 = 0;
9964  goto __pyx_L0;
9965 
9966  /* "PyClical.pyx":1061
9967  * return clifford().wrap( self.instance.pure() )
9968  *
9969  * def even(self): # <<<<<<<<<<<<<<
9970  * """
9971  * Even part of multivector, sum of even grade terms.
9972  */
9973 
9974  /* function exit code */
9975  __pyx_L1_error:;
9976  __Pyx_XDECREF(__pyx_t_1);
9977  __Pyx_XDECREF(__pyx_t_2);
9978  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9979  __pyx_r = NULL;
9980  __pyx_L0:;
9981  __Pyx_XGIVEREF(__pyx_r);
9982  __Pyx_RefNannyFinishContext();
9983  return __pyx_r;
9984  }
9985 
9986  /* "PyClical.pyx":1070
9987  * return clifford().wrap( self.instance.even() )
9988  *
9989  * def odd(self): # <<<<<<<<<<<<<<
9990  * """
9991  * Odd part of multivector, sum of odd grade terms.
9992  */
9993 
9994  /* Python wrapper */
9995  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9996  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 ";
9997  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9998  PyObject *__pyx_r = 0;
9999  __Pyx_RefNannyDeclarations
10000  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
10001  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10002 
10003  /* function exit code */
10004  __Pyx_RefNannyFinishContext();
10005  return __pyx_r;
10006  }
10007 
10008  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10009  PyObject *__pyx_r = NULL;
10010  __Pyx_RefNannyDeclarations
10011  PyObject *__pyx_t_1 = NULL;
10012  PyObject *__pyx_t_2 = NULL;
10013  __Pyx_RefNannySetupContext("odd", 0);
10014 
10015  /* "PyClical.pyx":1077
10016  * {1}
10017  * """
10018  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
10019  *
10020  * def vector_part(self, frm = None):
10021  */
10022  __Pyx_XDECREF(__pyx_r);
10023  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
10024  __Pyx_GOTREF(__pyx_t_1);
10025  __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_ERR(0, 1077, __pyx_L1_error)
10026  __Pyx_GOTREF(__pyx_t_2);
10027  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10028  __pyx_r = __pyx_t_2;
10029  __pyx_t_2 = 0;
10030  goto __pyx_L0;
10031 
10032  /* "PyClical.pyx":1070
10033  * return clifford().wrap( self.instance.even() )
10034  *
10035  * def odd(self): # <<<<<<<<<<<<<<
10036  * """
10037  * Odd part of multivector, sum of odd grade terms.
10038  */
10039 
10040  /* function exit code */
10041  __pyx_L1_error:;
10042  __Pyx_XDECREF(__pyx_t_1);
10043  __Pyx_XDECREF(__pyx_t_2);
10044  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
10045  __pyx_r = NULL;
10046  __pyx_L0:;
10047  __Pyx_XGIVEREF(__pyx_r);
10048  __Pyx_RefNannyFinishContext();
10049  return __pyx_r;
10050  }
10051 
10052  /* "PyClical.pyx":1079
10053  * return clifford().wrap( self.instance.odd() )
10054  *
10055  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10056  * """
10057  * Vector part of multivector, as a Python list, with respect to frm.
10058  */
10059 
10060  /* Python wrapper */
10061  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10062  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 ";
10063  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10064  PyObject *__pyx_v_frm = 0;
10065  PyObject *__pyx_r = 0;
10066  __Pyx_RefNannyDeclarations
10067  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
10068  {
10069  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
10070  PyObject* values[1] = {0};
10071  values[0] = ((PyObject *)Py_None);
10072  if (unlikely(__pyx_kwds)) {
10073  Py_ssize_t kw_args;
10074  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10075  switch (pos_args) {
10076  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10077  CYTHON_FALLTHROUGH;
10078  case 0: break;
10079  default: goto __pyx_L5_argtuple_error;
10080  }
10081  kw_args = PyDict_Size(__pyx_kwds);
10082  switch (pos_args) {
10083  case 0:
10084  if (kw_args > 0) {
10085  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
10086  if (value) { values[0] = value; kw_args--; }
10087  }
10088  }
10089  if (unlikely(kw_args > 0)) {
10090  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1079, __pyx_L3_error)
10091  }
10092  } else {
10093  switch (PyTuple_GET_SIZE(__pyx_args)) {
10094  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10095  CYTHON_FALLTHROUGH;
10096  case 0: break;
10097  default: goto __pyx_L5_argtuple_error;
10098  }
10099  }
10100  __pyx_v_frm = values[0];
10101  }
10102  goto __pyx_L4_argument_unpacking_done;
10103  __pyx_L5_argtuple_error:;
10104  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1079, __pyx_L3_error)
10105  __pyx_L3_error:;
10106  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10107  __Pyx_RefNannyFinishContext();
10108  return NULL;
10109  __pyx_L4_argument_unpacking_done:;
10110  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
10111 
10112  /* function exit code */
10113  __Pyx_RefNannyFinishContext();
10114  return __pyx_r;
10115  }
10116 
10117  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
10118  PyObject *__pyx_v_error_msg_prefix = NULL;
10119  std::vector<scalar_t> __pyx_v_vec;
10120  int __pyx_v_n;
10121  int __pyx_v_i;
10122  PyObject *__pyx_v_lst = NULL;
10123  PyObject *__pyx_v_err = NULL;
10124  PyObject *__pyx_r = NULL;
10125  __Pyx_RefNannyDeclarations
10126  PyObject *__pyx_t_1 = NULL;
10127  PyObject *__pyx_t_2 = NULL;
10128  PyObject *__pyx_t_3 = NULL;
10129  int __pyx_t_4;
10130  int __pyx_t_5;
10131  std::vector<scalar_t> __pyx_t_6;
10132  PyObject *__pyx_t_7 = NULL;
10133  int __pyx_t_8;
10134  int __pyx_t_9;
10135  int __pyx_t_10;
10136  PyObject *__pyx_t_11 = NULL;
10137  PyObject *__pyx_t_12 = NULL;
10138  PyObject *__pyx_t_13 = NULL;
10139  PyObject *__pyx_t_14 = NULL;
10140  PyObject *__pyx_t_15 = NULL;
10141  char const *__pyx_t_16;
10142  PyObject *__pyx_t_17 = NULL;
10143  PyObject *__pyx_t_18 = NULL;
10144  PyObject *__pyx_t_19 = NULL;
10145  PyObject *__pyx_t_20 = NULL;
10146  PyObject *__pyx_t_21 = NULL;
10147  PyObject *__pyx_t_22 = NULL;
10148  __Pyx_RefNannySetupContext("vector_part", 0);
10149 
10150  /* "PyClical.pyx":1088
10151  * [0.0, 2.0, 3.0]
10152  * """
10153  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
10154  * cdef vector[scalar_t] vec
10155  * cdef int n
10156  */
10157  __Pyx_INCREF(__pyx_kp_u_Cannot_take_vector_part_of);
10158  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_take_vector_part_of;
10159 
10160  /* "PyClical.pyx":1092
10161  * cdef int n
10162  * cdef int i
10163  * try: # <<<<<<<<<<<<<<
10164  * if frm is None:
10165  * vec = self.instance.vector_part()
10166  */
10167  {
10168  __Pyx_PyThreadState_declare
10169  __Pyx_PyThreadState_assign
10170  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10171  __Pyx_XGOTREF(__pyx_t_1);
10172  __Pyx_XGOTREF(__pyx_t_2);
10173  __Pyx_XGOTREF(__pyx_t_3);
10174  /*try:*/ {
10175 
10176  /* "PyClical.pyx":1093
10177  * cdef int i
10178  * try:
10179  * if frm is None: # <<<<<<<<<<<<<<
10180  * vec = self.instance.vector_part()
10181  * else:
10182  */
10183  __pyx_t_4 = (__pyx_v_frm == Py_None);
10184  __pyx_t_5 = (__pyx_t_4 != 0);
10185  if (__pyx_t_5) {
10186 
10187  /* "PyClical.pyx":1094
10188  * try:
10189  * if frm is None:
10190  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
10191  * else:
10192  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10193  */
10194  __pyx_t_6 = __pyx_v_self->instance->vector_part();
10195  __pyx_v_vec = __pyx_t_6;
10196 
10197  /* "PyClical.pyx":1093
10198  * cdef int i
10199  * try:
10200  * if frm is None: # <<<<<<<<<<<<<<
10201  * vec = self.instance.vector_part()
10202  * else:
10203  */
10204  goto __pyx_L9;
10205  }
10206 
10207  /* "PyClical.pyx":1096
10208  * vec = self.instance.vector_part()
10209  * else:
10210  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
10211  * n = vec.size()
10212  * lst = [0.0]*n
10213  */
10214  /*else*/ {
10215  try {
10216  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
10217  } catch(...) {
10218  __Pyx_CppExn2PyErr();
10219  __PYX_ERR(0, 1096, __pyx_L3_error)
10220  }
10221  __pyx_v_vec = __pyx_t_6;
10222  }
10223  __pyx_L9:;
10224 
10225  /* "PyClical.pyx":1097
10226  * else:
10227  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10228  * n = vec.size() # <<<<<<<<<<<<<<
10229  * lst = [0.0]*n
10230  * for i in xrange(n):
10231  */
10232  __pyx_v_n = __pyx_v_vec.size();
10233 
10234  /* "PyClical.pyx":1098
10235  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10236  * n = vec.size()
10237  * lst = [0.0]*n # <<<<<<<<<<<<<<
10238  * for i in xrange(n):
10239  * lst[i] = vec[i]
10240  */
10241  __pyx_t_7 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1098, __pyx_L3_error)
10242  __Pyx_GOTREF(__pyx_t_7);
10243  { Py_ssize_t __pyx_temp;
10244  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10245  __Pyx_INCREF(__pyx_float_0_0);
10246  __Pyx_GIVEREF(__pyx_float_0_0);
10247  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10248  }
10249  }
10250  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10251  __pyx_t_7 = 0;
10252 
10253  /* "PyClical.pyx":1099
10254  * n = vec.size()
10255  * lst = [0.0]*n
10256  * for i in xrange(n): # <<<<<<<<<<<<<<
10257  * lst[i] = vec[i]
10258  * return lst
10259  */
10260  __pyx_t_8 = __pyx_v_n;
10261  __pyx_t_9 = __pyx_t_8;
10262  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10263  __pyx_v_i = __pyx_t_10;
10264 
10265  /* "PyClical.pyx":1100
10266  * lst = [0.0]*n
10267  * for i in xrange(n):
10268  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10269  * return lst
10270  * except RuntimeError as err:
10271  */
10272  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L3_error)
10273  __Pyx_GOTREF(__pyx_t_7);
10274  if (unlikely(__Pyx_SetItemInt(__pyx_v_lst, __pyx_v_i, __pyx_t_7, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) __PYX_ERR(0, 1100, __pyx_L3_error)
10275  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10276  }
10277 
10278  /* "PyClical.pyx":1101
10279  * for i in xrange(n):
10280  * lst[i] = vec[i]
10281  * return lst # <<<<<<<<<<<<<<
10282  * except RuntimeError as err:
10283  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10284  */
10285  __Pyx_XDECREF(__pyx_r);
10286  __Pyx_INCREF(__pyx_v_lst);
10287  __pyx_r = __pyx_v_lst;
10288  goto __pyx_L7_try_return;
10289 
10290  /* "PyClical.pyx":1092
10291  * cdef int n
10292  * cdef int i
10293  * try: # <<<<<<<<<<<<<<
10294  * if frm is None:
10295  * vec = self.instance.vector_part()
10296  */
10297  }
10298  __pyx_L3_error:;
10299  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10300 
10301  /* "PyClical.pyx":1102
10302  * lst[i] = vec[i]
10303  * return lst
10304  * except RuntimeError as err: # <<<<<<<<<<<<<<
10305  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10306  * + repr(frm) + " as frame:\n\t"
10307  */
10308  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10309  if (__pyx_t_8) {
10310  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10311  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10312  __Pyx_GOTREF(__pyx_t_7);
10313  __Pyx_GOTREF(__pyx_t_11);
10314  __Pyx_GOTREF(__pyx_t_12);
10315  __Pyx_INCREF(__pyx_t_11);
10316  __pyx_v_err = __pyx_t_11;
10317  /*try:*/ {
10318 
10319  /* "PyClical.pyx":1103
10320  * return lst
10321  * except RuntimeError as err:
10322  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10323  * + repr(frm) + " as frame:\n\t"
10324  * + str(err))
10325  */
10326  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1103, __pyx_L17_error)
10327  __Pyx_GOTREF(__pyx_t_13);
10328  __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L17_error)
10329  __Pyx_GOTREF(__pyx_t_14);
10330  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10331  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_14, __pyx_kp_u_using_invalid); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1103, __pyx_L17_error)
10332  __Pyx_GOTREF(__pyx_t_13);
10333  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10334 
10335  /* "PyClical.pyx":1104
10336  * except RuntimeError as err:
10337  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10338  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10339  * + str(err))
10340  *
10341  */
10342  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L17_error)
10343  __Pyx_GOTREF(__pyx_t_14);
10344  __pyx_t_15 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1104, __pyx_L17_error)
10345  __Pyx_GOTREF(__pyx_t_15);
10346  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10347  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10348  __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_t_15, __pyx_kp_u_as_frame); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L17_error)
10349  __Pyx_GOTREF(__pyx_t_14);
10350  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10351 
10352  /* "PyClical.pyx":1105
10353  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10354  * + repr(frm) + " as frame:\n\t"
10355  * + str(err)) # <<<<<<<<<<<<<<
10356  *
10357  * def involute(self):
10358  */
10359  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1105, __pyx_L17_error)
10360  __Pyx_GOTREF(__pyx_t_15);
10361  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1105, __pyx_L17_error)
10362  __Pyx_GOTREF(__pyx_t_13);
10363  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10364  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10365 
10366  /* "PyClical.pyx":1103
10367  * return lst
10368  * except RuntimeError as err:
10369  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10370  * + repr(frm) + " as frame:\n\t"
10371  * + str(err))
10372  */
10373  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L17_error)
10374  __Pyx_GOTREF(__pyx_t_15);
10375  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10376  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10377  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10378  __PYX_ERR(0, 1103, __pyx_L17_error)
10379  }
10380 
10381  /* "PyClical.pyx":1102
10382  * lst[i] = vec[i]
10383  * return lst
10384  * except RuntimeError as err: # <<<<<<<<<<<<<<
10385  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10386  * + repr(frm) + " as frame:\n\t"
10387  */
10388  /*finally:*/ {
10389  __pyx_L17_error:;
10390  /*exception exit:*/{
10391  __Pyx_PyThreadState_declare
10392  __Pyx_PyThreadState_assign
10393  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
10394  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
10395  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
10396  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
10397  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
10398  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
10399  __Pyx_XGOTREF(__pyx_t_17);
10400  __Pyx_XGOTREF(__pyx_t_18);
10401  __Pyx_XGOTREF(__pyx_t_19);
10402  __Pyx_XGOTREF(__pyx_t_20);
10403  __Pyx_XGOTREF(__pyx_t_21);
10404  __Pyx_XGOTREF(__pyx_t_22);
10405  __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
10406  {
10407  __Pyx_DECREF(__pyx_v_err);
10408  __pyx_v_err = NULL;
10409  }
10410  if (PY_MAJOR_VERSION >= 3) {
10411  __Pyx_XGIVEREF(__pyx_t_20);
10412  __Pyx_XGIVEREF(__pyx_t_21);
10413  __Pyx_XGIVEREF(__pyx_t_22);
10414  __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
10415  }
10416  __Pyx_XGIVEREF(__pyx_t_17);
10417  __Pyx_XGIVEREF(__pyx_t_18);
10418  __Pyx_XGIVEREF(__pyx_t_19);
10419  __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
10420  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
10421  __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_16;
10422  goto __pyx_L5_except_error;
10423  }
10424  }
10425  }
10426  goto __pyx_L5_except_error;
10427  __pyx_L5_except_error:;
10428 
10429  /* "PyClical.pyx":1092
10430  * cdef int n
10431  * cdef int i
10432  * try: # <<<<<<<<<<<<<<
10433  * if frm is None:
10434  * vec = self.instance.vector_part()
10435  */
10436  __Pyx_XGIVEREF(__pyx_t_1);
10437  __Pyx_XGIVEREF(__pyx_t_2);
10438  __Pyx_XGIVEREF(__pyx_t_3);
10439  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10440  goto __pyx_L1_error;
10441  __pyx_L7_try_return:;
10442  __Pyx_XGIVEREF(__pyx_t_1);
10443  __Pyx_XGIVEREF(__pyx_t_2);
10444  __Pyx_XGIVEREF(__pyx_t_3);
10445  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10446  goto __pyx_L0;
10447  }
10448 
10449  /* "PyClical.pyx":1079
10450  * return clifford().wrap( self.instance.odd() )
10451  *
10452  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10453  * """
10454  * Vector part of multivector, as a Python list, with respect to frm.
10455  */
10456 
10457  /* function exit code */
10458  __pyx_L1_error:;
10459  __Pyx_XDECREF(__pyx_t_7);
10460  __Pyx_XDECREF(__pyx_t_11);
10461  __Pyx_XDECREF(__pyx_t_12);
10462  __Pyx_XDECREF(__pyx_t_13);
10463  __Pyx_XDECREF(__pyx_t_14);
10464  __Pyx_XDECREF(__pyx_t_15);
10465  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10466  __pyx_r = NULL;
10467  __pyx_L0:;
10468  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10469  __Pyx_XDECREF(__pyx_v_lst);
10470  __Pyx_XDECREF(__pyx_v_err);
10471  __Pyx_XGIVEREF(__pyx_r);
10472  __Pyx_RefNannyFinishContext();
10473  return __pyx_r;
10474  }
10475 
10476  /* "PyClical.pyx":1107
10477  * + str(err))
10478  *
10479  * def involute(self): # <<<<<<<<<<<<<<
10480  * """
10481  * Main involution, each {i} is replaced by -{i} in each term,
10482  */
10483 
10484  /* Python wrapper */
10485  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10486  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 ";
10487  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10488  PyObject *__pyx_r = 0;
10489  __Pyx_RefNannyDeclarations
10490  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10491  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10492 
10493  /* function exit code */
10494  __Pyx_RefNannyFinishContext();
10495  return __pyx_r;
10496  }
10497 
10498  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10499  PyObject *__pyx_r = NULL;
10500  __Pyx_RefNannyDeclarations
10501  PyObject *__pyx_t_1 = NULL;
10502  PyObject *__pyx_t_2 = NULL;
10503  __Pyx_RefNannySetupContext("involute", 0);
10504 
10505  /* "PyClical.pyx":1121
10506  * 1-{1}+{1,2}
10507  * """
10508  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10509  *
10510  * def reverse(self):
10511  */
10512  __Pyx_XDECREF(__pyx_r);
10513  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
10514  __Pyx_GOTREF(__pyx_t_1);
10515  __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_ERR(0, 1121, __pyx_L1_error)
10516  __Pyx_GOTREF(__pyx_t_2);
10517  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10518  __pyx_r = __pyx_t_2;
10519  __pyx_t_2 = 0;
10520  goto __pyx_L0;
10521 
10522  /* "PyClical.pyx":1107
10523  * + str(err))
10524  *
10525  * def involute(self): # <<<<<<<<<<<<<<
10526  * """
10527  * Main involution, each {i} is replaced by -{i} in each term,
10528  */
10529 
10530  /* function exit code */
10531  __pyx_L1_error:;
10532  __Pyx_XDECREF(__pyx_t_1);
10533  __Pyx_XDECREF(__pyx_t_2);
10534  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10535  __pyx_r = NULL;
10536  __pyx_L0:;
10537  __Pyx_XGIVEREF(__pyx_r);
10538  __Pyx_RefNannyFinishContext();
10539  return __pyx_r;
10540  }
10541 
10542  /* "PyClical.pyx":1123
10543  * return clifford().wrap( self.instance.involute() )
10544  *
10545  * def reverse(self): # <<<<<<<<<<<<<<
10546  * """
10547  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10548  */
10549 
10550  /* Python wrapper */
10551  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10552  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 ";
10553  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10554  PyObject *__pyx_r = 0;
10555  __Pyx_RefNannyDeclarations
10556  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10557  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10558 
10559  /* function exit code */
10560  __Pyx_RefNannyFinishContext();
10561  return __pyx_r;
10562  }
10563 
10564  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10565  PyObject *__pyx_r = NULL;
10566  __Pyx_RefNannyDeclarations
10567  PyObject *__pyx_t_1 = NULL;
10568  PyObject *__pyx_t_2 = NULL;
10569  __Pyx_RefNannySetupContext("reverse", 0);
10570 
10571  /* "PyClical.pyx":1136
10572  * 1+{1}-{1,2}
10573  * """
10574  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10575  *
10576  * def conj(self):
10577  */
10578  __Pyx_XDECREF(__pyx_r);
10579  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
10580  __Pyx_GOTREF(__pyx_t_1);
10581  __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_ERR(0, 1136, __pyx_L1_error)
10582  __Pyx_GOTREF(__pyx_t_2);
10583  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10584  __pyx_r = __pyx_t_2;
10585  __pyx_t_2 = 0;
10586  goto __pyx_L0;
10587 
10588  /* "PyClical.pyx":1123
10589  * return clifford().wrap( self.instance.involute() )
10590  *
10591  * def reverse(self): # <<<<<<<<<<<<<<
10592  * """
10593  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10594  */
10595 
10596  /* function exit code */
10597  __pyx_L1_error:;
10598  __Pyx_XDECREF(__pyx_t_1);
10599  __Pyx_XDECREF(__pyx_t_2);
10600  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10601  __pyx_r = NULL;
10602  __pyx_L0:;
10603  __Pyx_XGIVEREF(__pyx_r);
10604  __Pyx_RefNannyFinishContext();
10605  return __pyx_r;
10606  }
10607 
10608  /* "PyClical.pyx":1138
10609  * return clifford().wrap( self.instance.reverse() )
10610  *
10611  * def conj(self): # <<<<<<<<<<<<<<
10612  * """
10613  * Conjugation, reverse o involute == involute o reverse.
10614  */
10615 
10616  /* Python wrapper */
10617  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10618  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 ";
10619  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10620  PyObject *__pyx_r = 0;
10621  __Pyx_RefNannyDeclarations
10622  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10623  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10624 
10625  /* function exit code */
10626  __Pyx_RefNannyFinishContext();
10627  return __pyx_r;
10628  }
10629 
10630  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10631  PyObject *__pyx_r = NULL;
10632  __Pyx_RefNannyDeclarations
10633  PyObject *__pyx_t_1 = NULL;
10634  PyObject *__pyx_t_2 = NULL;
10635  __Pyx_RefNannySetupContext("conj", 0);
10636 
10637  /* "PyClical.pyx":1151
10638  * 1-{1}-{1,2}
10639  * """
10640  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10641  *
10642  * def quad(self):
10643  */
10644  __Pyx_XDECREF(__pyx_r);
10645  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error)
10646  __Pyx_GOTREF(__pyx_t_1);
10647  __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_ERR(0, 1151, __pyx_L1_error)
10648  __Pyx_GOTREF(__pyx_t_2);
10649  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10650  __pyx_r = __pyx_t_2;
10651  __pyx_t_2 = 0;
10652  goto __pyx_L0;
10653 
10654  /* "PyClical.pyx":1138
10655  * return clifford().wrap( self.instance.reverse() )
10656  *
10657  * def conj(self): # <<<<<<<<<<<<<<
10658  * """
10659  * Conjugation, reverse o involute == involute o reverse.
10660  */
10661 
10662  /* function exit code */
10663  __pyx_L1_error:;
10664  __Pyx_XDECREF(__pyx_t_1);
10665  __Pyx_XDECREF(__pyx_t_2);
10666  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10667  __pyx_r = NULL;
10668  __pyx_L0:;
10669  __Pyx_XGIVEREF(__pyx_r);
10670  __Pyx_RefNannyFinishContext();
10671  return __pyx_r;
10672  }
10673 
10674  /* "PyClical.pyx":1153
10675  * return clifford().wrap( self.instance.conj() )
10676  *
10677  * def quad(self): # <<<<<<<<<<<<<<
10678  * """
10679  * Quadratic form == (rev(x)*x)(0).
10680  */
10681 
10682  /* Python wrapper */
10683  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10684  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 ";
10685  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10686  PyObject *__pyx_r = 0;
10687  __Pyx_RefNannyDeclarations
10688  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10689  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10690 
10691  /* function exit code */
10692  __Pyx_RefNannyFinishContext();
10693  return __pyx_r;
10694  }
10695 
10696  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10697  PyObject *__pyx_r = NULL;
10698  __Pyx_RefNannyDeclarations
10699  PyObject *__pyx_t_1 = NULL;
10700  __Pyx_RefNannySetupContext("quad", 0);
10701 
10702  /* "PyClical.pyx":1162
10703  * 2.0
10704  * """
10705  * return self.instance.quad() # <<<<<<<<<<<<<<
10706  *
10707  * def norm(self):
10708  */
10709  __Pyx_XDECREF(__pyx_r);
10710  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error)
10711  __Pyx_GOTREF(__pyx_t_1);
10712  __pyx_r = __pyx_t_1;
10713  __pyx_t_1 = 0;
10714  goto __pyx_L0;
10715 
10716  /* "PyClical.pyx":1153
10717  * return clifford().wrap( self.instance.conj() )
10718  *
10719  * def quad(self): # <<<<<<<<<<<<<<
10720  * """
10721  * Quadratic form == (rev(x)*x)(0).
10722  */
10723 
10724  /* function exit code */
10725  __pyx_L1_error:;
10726  __Pyx_XDECREF(__pyx_t_1);
10727  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10728  __pyx_r = NULL;
10729  __pyx_L0:;
10730  __Pyx_XGIVEREF(__pyx_r);
10731  __Pyx_RefNannyFinishContext();
10732  return __pyx_r;
10733  }
10734 
10735  /* "PyClical.pyx":1164
10736  * return self.instance.quad()
10737  *
10738  * def norm(self): # <<<<<<<<<<<<<<
10739  * """
10740  * Norm == sum of squares of coordinates.
10741  */
10742 
10743  /* Python wrapper */
10744  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10745  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 ";
10746  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10747  PyObject *__pyx_r = 0;
10748  __Pyx_RefNannyDeclarations
10749  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10750  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10751 
10752  /* function exit code */
10753  __Pyx_RefNannyFinishContext();
10754  return __pyx_r;
10755  }
10756 
10757  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10758  PyObject *__pyx_r = NULL;
10759  __Pyx_RefNannyDeclarations
10760  PyObject *__pyx_t_1 = NULL;
10761  __Pyx_RefNannySetupContext("norm", 0);
10762 
10763  /* "PyClical.pyx":1173
10764  * 4.0
10765  * """
10766  * return self.instance.norm() # <<<<<<<<<<<<<<
10767  *
10768  * def abs(self):
10769  */
10770  __Pyx_XDECREF(__pyx_r);
10771  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
10772  __Pyx_GOTREF(__pyx_t_1);
10773  __pyx_r = __pyx_t_1;
10774  __pyx_t_1 = 0;
10775  goto __pyx_L0;
10776 
10777  /* "PyClical.pyx":1164
10778  * return self.instance.quad()
10779  *
10780  * def norm(self): # <<<<<<<<<<<<<<
10781  * """
10782  * Norm == sum of squares of coordinates.
10783  */
10784 
10785  /* function exit code */
10786  __pyx_L1_error:;
10787  __Pyx_XDECREF(__pyx_t_1);
10788  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10789  __pyx_r = NULL;
10790  __pyx_L0:;
10791  __Pyx_XGIVEREF(__pyx_r);
10792  __Pyx_RefNannyFinishContext();
10793  return __pyx_r;
10794  }
10795 
10796  /* "PyClical.pyx":1175
10797  * return self.instance.norm()
10798  *
10799  * def abs(self): # <<<<<<<<<<<<<<
10800  * """
10801  * Absolute value: square root of norm.
10802  */
10803 
10804  /* Python wrapper */
10805  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10806  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 ";
10807  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10808  PyObject *__pyx_r = 0;
10809  __Pyx_RefNannyDeclarations
10810  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10811  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10812 
10813  /* function exit code */
10814  __Pyx_RefNannyFinishContext();
10815  return __pyx_r;
10816  }
10817 
10818  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10819  PyObject *__pyx_r = NULL;
10820  __Pyx_RefNannyDeclarations
10821  PyObject *__pyx_t_1 = NULL;
10822  __Pyx_RefNannySetupContext("abs", 0);
10823 
10824  /* "PyClical.pyx":1182
10825  * 2.0
10826  * """
10827  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10828  *
10829  * def max_abs(self):
10830  */
10831  __Pyx_XDECREF(__pyx_r);
10832  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
10833  __Pyx_GOTREF(__pyx_t_1);
10834  __pyx_r = __pyx_t_1;
10835  __pyx_t_1 = 0;
10836  goto __pyx_L0;
10837 
10838  /* "PyClical.pyx":1175
10839  * return self.instance.norm()
10840  *
10841  * def abs(self): # <<<<<<<<<<<<<<
10842  * """
10843  * Absolute value: square root of norm.
10844  */
10845 
10846  /* function exit code */
10847  __pyx_L1_error:;
10848  __Pyx_XDECREF(__pyx_t_1);
10849  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10850  __pyx_r = NULL;
10851  __pyx_L0:;
10852  __Pyx_XGIVEREF(__pyx_r);
10853  __Pyx_RefNannyFinishContext();
10854  return __pyx_r;
10855  }
10856 
10857  /* "PyClical.pyx":1184
10858  * return glucat.abs( self.unwrap() )
10859  *
10860  * def max_abs(self): # <<<<<<<<<<<<<<
10861  * """
10862  * Maximum of absolute values of components of multivector: multivector infinity norm.
10863  */
10864 
10865  /* Python wrapper */
10866  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10867  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 ";
10868  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10869  PyObject *__pyx_r = 0;
10870  __Pyx_RefNannyDeclarations
10871  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10872  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10873 
10874  /* function exit code */
10875  __Pyx_RefNannyFinishContext();
10876  return __pyx_r;
10877  }
10878 
10879  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10880  PyObject *__pyx_r = NULL;
10881  __Pyx_RefNannyDeclarations
10882  PyObject *__pyx_t_1 = NULL;
10883  __Pyx_RefNannySetupContext("max_abs", 0);
10884 
10885  /* "PyClical.pyx":1193
10886  * 3.0
10887  * """
10888  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10889  *
10890  * def truncated(self, limit):
10891  */
10892  __Pyx_XDECREF(__pyx_r);
10893  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
10894  __Pyx_GOTREF(__pyx_t_1);
10895  __pyx_r = __pyx_t_1;
10896  __pyx_t_1 = 0;
10897  goto __pyx_L0;
10898 
10899  /* "PyClical.pyx":1184
10900  * return glucat.abs( self.unwrap() )
10901  *
10902  * def max_abs(self): # <<<<<<<<<<<<<<
10903  * """
10904  * Maximum of absolute values of components of multivector: multivector infinity norm.
10905  */
10906 
10907  /* function exit code */
10908  __pyx_L1_error:;
10909  __Pyx_XDECREF(__pyx_t_1);
10910  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10911  __pyx_r = NULL;
10912  __pyx_L0:;
10913  __Pyx_XGIVEREF(__pyx_r);
10914  __Pyx_RefNannyFinishContext();
10915  return __pyx_r;
10916  }
10917 
10918  /* "PyClical.pyx":1195
10919  * return self.instance.max_abs()
10920  *
10921  * def truncated(self, limit): # <<<<<<<<<<<<<<
10922  * """
10923  * Remove all terms of self with relative size smaller than limit.
10924  */
10925 
10926  /* Python wrapper */
10927  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10928  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 ";
10929  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10930  PyObject *__pyx_r = 0;
10931  __Pyx_RefNannyDeclarations
10932  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10933  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10934 
10935  /* function exit code */
10936  __Pyx_RefNannyFinishContext();
10937  return __pyx_r;
10938  }
10939 
10940  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10941  PyObject *__pyx_r = NULL;
10942  __Pyx_RefNannyDeclarations
10943  PyObject *__pyx_t_1 = NULL;
10944  scalar_t __pyx_t_2;
10945  PyObject *__pyx_t_3 = NULL;
10946  __Pyx_RefNannySetupContext("truncated", 0);
10947 
10948  /* "PyClical.pyx":1204
10949  * clifford("10000+{1}")
10950  * """
10951  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10952  *
10953  * def isnan(self):
10954  */
10955  __Pyx_XDECREF(__pyx_r);
10956  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
10957  __Pyx_GOTREF(__pyx_t_1);
10958  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_limit); if (unlikely((__pyx_t_2 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L1_error)
10959  __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_ERR(0, 1204, __pyx_L1_error)
10960  __Pyx_GOTREF(__pyx_t_3);
10961  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10962  __pyx_r = __pyx_t_3;
10963  __pyx_t_3 = 0;
10964  goto __pyx_L0;
10965 
10966  /* "PyClical.pyx":1195
10967  * return self.instance.max_abs()
10968  *
10969  * def truncated(self, limit): # <<<<<<<<<<<<<<
10970  * """
10971  * Remove all terms of self with relative size smaller than limit.
10972  */
10973 
10974  /* function exit code */
10975  __pyx_L1_error:;
10976  __Pyx_XDECREF(__pyx_t_1);
10977  __Pyx_XDECREF(__pyx_t_3);
10978  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10979  __pyx_r = NULL;
10980  __pyx_L0:;
10981  __Pyx_XGIVEREF(__pyx_r);
10982  __Pyx_RefNannyFinishContext();
10983  return __pyx_r;
10984  }
10985 
10986  /* "PyClical.pyx":1206
10987  * return clifford().wrap( self.instance.truncated(limit) )
10988  *
10989  * def isnan(self): # <<<<<<<<<<<<<<
10990  * """
10991  * Check if a multivector contains any IEEE NaN values.
10992  */
10993 
10994  /* Python wrapper */
10995  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10996  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10997  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10998  PyObject *__pyx_r = 0;
10999  __Pyx_RefNannyDeclarations
11000  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
11001  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11002 
11003  /* function exit code */
11004  __Pyx_RefNannyFinishContext();
11005  return __pyx_r;
11006  }
11007 
11008  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11009  PyObject *__pyx_r = NULL;
11010  __Pyx_RefNannyDeclarations
11011  PyObject *__pyx_t_1 = NULL;
11012  __Pyx_RefNannySetupContext("isnan", 0);
11013 
11014  /* "PyClical.pyx":1213
11015  * False
11016  * """
11017  * return self.instance.isnan() # <<<<<<<<<<<<<<
11018  *
11019  * def frame(self):
11020  */
11021  __Pyx_XDECREF(__pyx_r);
11022  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __pyx_L1_error)
11023  __Pyx_GOTREF(__pyx_t_1);
11024  __pyx_r = __pyx_t_1;
11025  __pyx_t_1 = 0;
11026  goto __pyx_L0;
11027 
11028  /* "PyClical.pyx":1206
11029  * return clifford().wrap( self.instance.truncated(limit) )
11030  *
11031  * def isnan(self): # <<<<<<<<<<<<<<
11032  * """
11033  * Check if a multivector contains any IEEE NaN values.
11034  */
11035 
11036  /* function exit code */
11037  __pyx_L1_error:;
11038  __Pyx_XDECREF(__pyx_t_1);
11039  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
11040  __pyx_r = NULL;
11041  __pyx_L0:;
11042  __Pyx_XGIVEREF(__pyx_r);
11043  __Pyx_RefNannyFinishContext();
11044  return __pyx_r;
11045  }
11046 
11047  /* "PyClical.pyx":1215
11048  * return self.instance.isnan()
11049  *
11050  * def frame(self): # <<<<<<<<<<<<<<
11051  * """
11052  * Subalgebra generated by all generators of terms of given multivector.
11053  */
11054 
11055  /* Python wrapper */
11056  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11057  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 <class 'PyClical.index_set'>\n ";
11058  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11059  PyObject *__pyx_r = 0;
11060  __Pyx_RefNannyDeclarations
11061  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
11062  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11063 
11064  /* function exit code */
11065  __Pyx_RefNannyFinishContext();
11066  return __pyx_r;
11067  }
11068 
11069  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11070  PyObject *__pyx_r = NULL;
11071  __Pyx_RefNannyDeclarations
11072  PyObject *__pyx_t_1 = NULL;
11073  PyObject *__pyx_t_2 = NULL;
11074  __Pyx_RefNannySetupContext("frame", 0);
11075 
11076  /* "PyClical.pyx":1224
11077  * <class 'PyClical.index_set'>
11078  * """
11079  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
11080  *
11081  * def __repr__(self):
11082  */
11083  __Pyx_XDECREF(__pyx_r);
11084  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
11085  __Pyx_GOTREF(__pyx_t_1);
11086  __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_ERR(0, 1224, __pyx_L1_error)
11087  __Pyx_GOTREF(__pyx_t_2);
11088  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11089  __pyx_r = __pyx_t_2;
11090  __pyx_t_2 = 0;
11091  goto __pyx_L0;
11092 
11093  /* "PyClical.pyx":1215
11094  * return self.instance.isnan()
11095  *
11096  * def frame(self): # <<<<<<<<<<<<<<
11097  * """
11098  * Subalgebra generated by all generators of terms of given multivector.
11099  */
11100 
11101  /* function exit code */
11102  __pyx_L1_error:;
11103  __Pyx_XDECREF(__pyx_t_1);
11104  __Pyx_XDECREF(__pyx_t_2);
11105  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
11106  __pyx_r = NULL;
11107  __pyx_L0:;
11108  __Pyx_XGIVEREF(__pyx_r);
11109  __Pyx_RefNannyFinishContext();
11110  return __pyx_r;
11111  }
11112 
11113  /* "PyClical.pyx":1226
11114  * return index_set().wrap( self.instance.frame() )
11115  *
11116  * def __repr__(self): # <<<<<<<<<<<<<<
11117  * """
11118  * The official string representation of self.
11119  */
11120 
11121  /* Python wrapper */
11122  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
11123  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 ";
11124  #if CYTHON_COMPILING_IN_CPYTHON
11125  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
11126  #endif
11127  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
11128  PyObject *__pyx_r = 0;
11129  __Pyx_RefNannyDeclarations
11130  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
11131  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11132 
11133  /* function exit code */
11134  __Pyx_RefNannyFinishContext();
11135  return __pyx_r;
11136  }
11137 
11138  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11139  PyObject *__pyx_r = NULL;
11140  __Pyx_RefNannyDeclarations
11141  PyObject *__pyx_t_1 = NULL;
11142  __Pyx_RefNannySetupContext("__repr__", 0);
11143 
11144  /* "PyClical.pyx":1233
11145  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
11146  * """
11147  * return clifford_to_repr( self.unwrap() ).decode() # <<<<<<<<<<<<<<
11148  *
11149  * def __str__(self):
11150  */
11151  __Pyx_XDECREF(__pyx_r);
11152  __pyx_t_1 = __Pyx_decode_cpp_string(clifford_to_repr(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error)
11153  __Pyx_GOTREF(__pyx_t_1);
11154  __pyx_r = __pyx_t_1;
11155  __pyx_t_1 = 0;
11156  goto __pyx_L0;
11157 
11158  /* "PyClical.pyx":1226
11159  * return index_set().wrap( self.instance.frame() )
11160  *
11161  * def __repr__(self): # <<<<<<<<<<<<<<
11162  * """
11163  * The official string representation of self.
11164  */
11165 
11166  /* function exit code */
11167  __pyx_L1_error:;
11168  __Pyx_XDECREF(__pyx_t_1);
11169  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11170  __pyx_r = NULL;
11171  __pyx_L0:;
11172  __Pyx_XGIVEREF(__pyx_r);
11173  __Pyx_RefNannyFinishContext();
11174  return __pyx_r;
11175  }
11176 
11177  /* "PyClical.pyx":1235
11178  * return clifford_to_repr( self.unwrap() ).decode()
11179  *
11180  * def __str__(self): # <<<<<<<<<<<<<<
11181  * """
11182  * The informal string representation of self.
11183  */
11184 
11185  /* Python wrapper */
11186  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
11187  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 ";
11188  #if CYTHON_COMPILING_IN_CPYTHON
11189  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
11190  #endif
11191  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
11192  PyObject *__pyx_r = 0;
11193  __Pyx_RefNannyDeclarations
11194  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
11195  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11196 
11197  /* function exit code */
11198  __Pyx_RefNannyFinishContext();
11199  return __pyx_r;
11200  }
11201 
11202  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11203  PyObject *__pyx_r = NULL;
11204  __Pyx_RefNannyDeclarations
11205  PyObject *__pyx_t_1 = NULL;
11206  __Pyx_RefNannySetupContext("__str__", 0);
11207 
11208  /* "PyClical.pyx":1242
11209  * '1+3{-1}+2{1,2}+4{-2,7}'
11210  * """
11211  * return clifford_to_str( self.unwrap() ).decode() # <<<<<<<<<<<<<<
11212  *
11213  * def clifford_hidden_doctests():
11214  */
11215  __Pyx_XDECREF(__pyx_r);
11216  __pyx_t_1 = __Pyx_decode_cpp_string(clifford_to_str(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
11217  __Pyx_GOTREF(__pyx_t_1);
11218  __pyx_r = __pyx_t_1;
11219  __pyx_t_1 = 0;
11220  goto __pyx_L0;
11221 
11222  /* "PyClical.pyx":1235
11223  * return clifford_to_repr( self.unwrap() ).decode()
11224  *
11225  * def __str__(self): # <<<<<<<<<<<<<<
11226  * """
11227  * The informal string representation of self.
11228  */
11229 
11230  /* function exit code */
11231  __pyx_L1_error:;
11232  __Pyx_XDECREF(__pyx_t_1);
11233  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11234  __pyx_r = NULL;
11235  __pyx_L0:;
11236  __Pyx_XGIVEREF(__pyx_r);
11237  __Pyx_RefNannyFinishContext();
11238  return __pyx_r;
11239  }
11240 
11241  /* "(tree fragment)":1
11242  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11243  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11244  * def __setstate_cython__(self, __pyx_state):
11245  */
11246 
11247  /* Python wrapper */
11248  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11249  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11250  PyObject *__pyx_r = 0;
11251  __Pyx_RefNannyDeclarations
11252  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
11253  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11254 
11255  /* function exit code */
11256  __Pyx_RefNannyFinishContext();
11257  return __pyx_r;
11258  }
11259 
11260  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11261  PyObject *__pyx_r = NULL;
11262  __Pyx_RefNannyDeclarations
11263  PyObject *__pyx_t_1 = NULL;
11264  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11265 
11266  /* "(tree fragment)":2
11267  * def __reduce_cython__(self):
11268  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11269  * def __setstate_cython__(self, __pyx_state):
11270  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11271  */
11272  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
11273  __Pyx_GOTREF(__pyx_t_1);
11274  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11275  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11276  __PYX_ERR(1, 2, __pyx_L1_error)
11277 
11278  /* "(tree fragment)":1
11279  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11280  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11281  * def __setstate_cython__(self, __pyx_state):
11282  */
11283 
11284  /* function exit code */
11285  __pyx_L1_error:;
11286  __Pyx_XDECREF(__pyx_t_1);
11287  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11288  __pyx_r = NULL;
11289  __Pyx_XGIVEREF(__pyx_r);
11290  __Pyx_RefNannyFinishContext();
11291  return __pyx_r;
11292  }
11293 
11294  /* "(tree fragment)":3
11295  * def __reduce_cython__(self):
11296  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11297  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11298  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11299  */
11300 
11301  /* Python wrapper */
11302  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11303  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11304  PyObject *__pyx_r = 0;
11305  __Pyx_RefNannyDeclarations
11306  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11307  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11308 
11309  /* function exit code */
11310  __Pyx_RefNannyFinishContext();
11311  return __pyx_r;
11312  }
11313 
11314  static PyObject *__pyx_pf_8PyClical_8clifford_98__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
11315  PyObject *__pyx_r = NULL;
11316  __Pyx_RefNannyDeclarations
11317  PyObject *__pyx_t_1 = NULL;
11318  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11319 
11320  /* "(tree fragment)":4
11321  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11322  * def __setstate_cython__(self, __pyx_state):
11323  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11324  */
11325  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
11326  __Pyx_GOTREF(__pyx_t_1);
11327  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11328  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11329  __PYX_ERR(1, 4, __pyx_L1_error)
11330 
11331  /* "(tree fragment)":3
11332  * def __reduce_cython__(self):
11333  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11334  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11335  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11336  */
11337 
11338  /* function exit code */
11339  __pyx_L1_error:;
11340  __Pyx_XDECREF(__pyx_t_1);
11341  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11342  __pyx_r = NULL;
11343  __Pyx_XGIVEREF(__pyx_r);
11344  __Pyx_RefNannyFinishContext();
11345  return __pyx_r;
11346  }
11347 
11348  /* "PyClical.pyx":1244
11349  * return clifford_to_str( self.unwrap() ).decode()
11350  *
11351  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11352  * """
11353  * Tests for functions that Doctest cannot see.
11354  */
11355 
11356  /* Python wrapper */
11357  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11358  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(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 <class 'list'>.\n >>> print(clifford(None))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <class 'NoneType'>.\n >>> print(clifford(None,[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'NoneType'>, <class 'list'>).\n >>> print(clifford([1,2],[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'list'>, <class '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 fro""m 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 ";
11359  static PyMethodDef __pyx_mdef_8PyClical_9clifford_hidden_doctests = {"clifford_hidden_doctests", (PyCFunction)__pyx_pw_8PyClical_9clifford_hidden_doctests, METH_NOARGS, __pyx_doc_8PyClical_8clifford_hidden_doctests};
11360  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11361  PyObject *__pyx_r = 0;
11362  __Pyx_RefNannyDeclarations
11363  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11364  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11365 
11366  /* function exit code */
11367  __Pyx_RefNannyFinishContext();
11368  return __pyx_r;
11369  }
11370 
11371  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11372  PyObject *__pyx_r = NULL;
11373  __Pyx_RefNannyDeclarations
11374  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11375 
11376  /* "PyClical.pyx":1326
11377  * True
11378  * """
11379  * return # <<<<<<<<<<<<<<
11380  *
11381  * cpdef inline inv(obj):
11382  */
11383  __Pyx_XDECREF(__pyx_r);
11384  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11385  goto __pyx_L0;
11386 
11387  /* "PyClical.pyx":1244
11388  * return clifford_to_str( self.unwrap() ).decode()
11389  *
11390  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11391  * """
11392  * Tests for functions that Doctest cannot see.
11393  */
11394 
11395  /* function exit code */
11396  __pyx_L0:;
11397  __Pyx_XGIVEREF(__pyx_r);
11398  __Pyx_RefNannyFinishContext();
11399  return __pyx_r;
11400  }
11401 
11402  /* "PyClical.pyx":1328
11403  * return
11404  *
11405  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11406  * """
11407  * Geometric multiplicative inverse.
11408  */
11409 
11410  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11411  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11412  PyObject *__pyx_r = NULL;
11413  __Pyx_RefNannyDeclarations
11414  PyObject *__pyx_t_1 = NULL;
11415  PyObject *__pyx_t_2 = NULL;
11416  PyObject *__pyx_t_3 = NULL;
11417  __Pyx_RefNannySetupContext("inv", 0);
11418 
11419  /* "PyClical.pyx":1341
11420  * nan
11421  * """
11422  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11423  *
11424  * cpdef inline scalar(obj):
11425  */
11426  __Pyx_XDECREF(__pyx_r);
11427  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error)
11428  __Pyx_GOTREF(__pyx_t_2);
11429  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __pyx_L1_error)
11430  __Pyx_GOTREF(__pyx_t_3);
11431  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11432  __pyx_t_2 = NULL;
11433  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11434  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11435  if (likely(__pyx_t_2)) {
11436  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11437  __Pyx_INCREF(__pyx_t_2);
11438  __Pyx_INCREF(function);
11439  __Pyx_DECREF_SET(__pyx_t_3, function);
11440  }
11441  }
11442  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11443  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11444  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
11445  __Pyx_GOTREF(__pyx_t_1);
11446  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11447  __pyx_r = __pyx_t_1;
11448  __pyx_t_1 = 0;
11449  goto __pyx_L0;
11450 
11451  /* "PyClical.pyx":1328
11452  * return
11453  *
11454  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11455  * """
11456  * Geometric multiplicative inverse.
11457  */
11458 
11459  /* function exit code */
11460  __pyx_L1_error:;
11461  __Pyx_XDECREF(__pyx_t_1);
11462  __Pyx_XDECREF(__pyx_t_2);
11463  __Pyx_XDECREF(__pyx_t_3);
11464  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11465  __pyx_r = 0;
11466  __pyx_L0:;
11467  __Pyx_XGIVEREF(__pyx_r);
11468  __Pyx_RefNannyFinishContext();
11469  return __pyx_r;
11470  }
11471 
11472  /* Python wrapper */
11473  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11474  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 ";
11475  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11476  PyObject *__pyx_r = 0;
11477  __Pyx_RefNannyDeclarations
11478  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11479  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11480 
11481  /* function exit code */
11482  __Pyx_RefNannyFinishContext();
11483  return __pyx_r;
11484  }
11485 
11486  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11487  PyObject *__pyx_r = NULL;
11488  __Pyx_RefNannyDeclarations
11489  PyObject *__pyx_t_1 = NULL;
11490  __Pyx_RefNannySetupContext("inv", 0);
11491  __Pyx_XDECREF(__pyx_r);
11492  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
11493  __Pyx_GOTREF(__pyx_t_1);
11494  __pyx_r = __pyx_t_1;
11495  __pyx_t_1 = 0;
11496  goto __pyx_L0;
11497 
11498  /* function exit code */
11499  __pyx_L1_error:;
11500  __Pyx_XDECREF(__pyx_t_1);
11501  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11502  __pyx_r = NULL;
11503  __pyx_L0:;
11504  __Pyx_XGIVEREF(__pyx_r);
11505  __Pyx_RefNannyFinishContext();
11506  return __pyx_r;
11507  }
11508 
11509  /* "PyClical.pyx":1343
11510  * return clifford(obj).inv()
11511  *
11512  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11513  * """
11514  * Scalar part.
11515  */
11516 
11517  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11518  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11519  PyObject *__pyx_r = NULL;
11520  __Pyx_RefNannyDeclarations
11521  PyObject *__pyx_t_1 = NULL;
11522  PyObject *__pyx_t_2 = NULL;
11523  PyObject *__pyx_t_3 = NULL;
11524  __Pyx_RefNannySetupContext("scalar", 0);
11525 
11526  /* "PyClical.pyx":1352
11527  * 0.0
11528  * """
11529  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11530  *
11531  * cpdef inline real(obj):
11532  */
11533  __Pyx_XDECREF(__pyx_r);
11534  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1352, __pyx_L1_error)
11535  __Pyx_GOTREF(__pyx_t_2);
11536  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error)
11537  __Pyx_GOTREF(__pyx_t_3);
11538  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11539  __pyx_t_2 = NULL;
11540  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11541  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11542  if (likely(__pyx_t_2)) {
11543  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11544  __Pyx_INCREF(__pyx_t_2);
11545  __Pyx_INCREF(function);
11546  __Pyx_DECREF_SET(__pyx_t_3, function);
11547  }
11548  }
11549  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11550  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11551  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error)
11552  __Pyx_GOTREF(__pyx_t_1);
11553  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11554  __pyx_r = __pyx_t_1;
11555  __pyx_t_1 = 0;
11556  goto __pyx_L0;
11557 
11558  /* "PyClical.pyx":1343
11559  * return clifford(obj).inv()
11560  *
11561  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11562  * """
11563  * Scalar part.
11564  */
11565 
11566  /* function exit code */
11567  __pyx_L1_error:;
11568  __Pyx_XDECREF(__pyx_t_1);
11569  __Pyx_XDECREF(__pyx_t_2);
11570  __Pyx_XDECREF(__pyx_t_3);
11571  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11572  __pyx_r = 0;
11573  __pyx_L0:;
11574  __Pyx_XGIVEREF(__pyx_r);
11575  __Pyx_RefNannyFinishContext();
11576  return __pyx_r;
11577  }
11578 
11579  /* Python wrapper */
11580  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11581  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 ";
11582  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11583  PyObject *__pyx_r = 0;
11584  __Pyx_RefNannyDeclarations
11585  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11586  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11587 
11588  /* function exit code */
11589  __Pyx_RefNannyFinishContext();
11590  return __pyx_r;
11591  }
11592 
11593  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11594  PyObject *__pyx_r = NULL;
11595  __Pyx_RefNannyDeclarations
11596  PyObject *__pyx_t_1 = NULL;
11597  __Pyx_RefNannySetupContext("scalar", 0);
11598  __Pyx_XDECREF(__pyx_r);
11599  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
11600  __Pyx_GOTREF(__pyx_t_1);
11601  __pyx_r = __pyx_t_1;
11602  __pyx_t_1 = 0;
11603  goto __pyx_L0;
11604 
11605  /* function exit code */
11606  __pyx_L1_error:;
11607  __Pyx_XDECREF(__pyx_t_1);
11608  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11609  __pyx_r = NULL;
11610  __pyx_L0:;
11611  __Pyx_XGIVEREF(__pyx_r);
11612  __Pyx_RefNannyFinishContext();
11613  return __pyx_r;
11614  }
11615 
11616  /* "PyClical.pyx":1354
11617  * return clifford(obj).scalar()
11618  *
11619  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11620  * """
11621  * Real part: synonym for scalar part.
11622  */
11623 
11624  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11625  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11626  PyObject *__pyx_r = NULL;
11627  __Pyx_RefNannyDeclarations
11628  PyObject *__pyx_t_1 = NULL;
11629  PyObject *__pyx_t_2 = NULL;
11630  PyObject *__pyx_t_3 = NULL;
11631  __Pyx_RefNannySetupContext("real", 0);
11632 
11633  /* "PyClical.pyx":1363
11634  * 0.0
11635  * """
11636  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11637  *
11638  * cpdef inline imag(obj):
11639  */
11640  __Pyx_XDECREF(__pyx_r);
11641  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error)
11642  __Pyx_GOTREF(__pyx_t_2);
11643  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1363, __pyx_L1_error)
11644  __Pyx_GOTREF(__pyx_t_3);
11645  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11646  __pyx_t_2 = NULL;
11647  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11648  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11649  if (likely(__pyx_t_2)) {
11650  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11651  __Pyx_INCREF(__pyx_t_2);
11652  __Pyx_INCREF(function);
11653  __Pyx_DECREF_SET(__pyx_t_3, function);
11654  }
11655  }
11656  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11657  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11658  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error)
11659  __Pyx_GOTREF(__pyx_t_1);
11660  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11661  __pyx_r = __pyx_t_1;
11662  __pyx_t_1 = 0;
11663  goto __pyx_L0;
11664 
11665  /* "PyClical.pyx":1354
11666  * return clifford(obj).scalar()
11667  *
11668  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11669  * """
11670  * Real part: synonym for scalar part.
11671  */
11672 
11673  /* function exit code */
11674  __pyx_L1_error:;
11675  __Pyx_XDECREF(__pyx_t_1);
11676  __Pyx_XDECREF(__pyx_t_2);
11677  __Pyx_XDECREF(__pyx_t_3);
11678  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11679  __pyx_r = 0;
11680  __pyx_L0:;
11681  __Pyx_XGIVEREF(__pyx_r);
11682  __Pyx_RefNannyFinishContext();
11683  return __pyx_r;
11684  }
11685 
11686  /* Python wrapper */
11687  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11688  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 ";
11689  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11690  PyObject *__pyx_r = 0;
11691  __Pyx_RefNannyDeclarations
11692  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11693  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11694 
11695  /* function exit code */
11696  __Pyx_RefNannyFinishContext();
11697  return __pyx_r;
11698  }
11699 
11700  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11701  PyObject *__pyx_r = NULL;
11702  __Pyx_RefNannyDeclarations
11703  PyObject *__pyx_t_1 = NULL;
11704  __Pyx_RefNannySetupContext("real", 0);
11705  __Pyx_XDECREF(__pyx_r);
11706  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
11707  __Pyx_GOTREF(__pyx_t_1);
11708  __pyx_r = __pyx_t_1;
11709  __pyx_t_1 = 0;
11710  goto __pyx_L0;
11711 
11712  /* function exit code */
11713  __pyx_L1_error:;
11714  __Pyx_XDECREF(__pyx_t_1);
11715  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11716  __pyx_r = NULL;
11717  __pyx_L0:;
11718  __Pyx_XGIVEREF(__pyx_r);
11719  __Pyx_RefNannyFinishContext();
11720  return __pyx_r;
11721  }
11722 
11723  /* "PyClical.pyx":1365
11724  * return clifford(obj).scalar()
11725  *
11726  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11727  * """
11728  * Imaginary part: deprecated (always 0).
11729  */
11730 
11731  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11732  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11733  PyObject *__pyx_r = NULL;
11734  __Pyx_RefNannyDeclarations
11735  __Pyx_RefNannySetupContext("imag", 0);
11736 
11737  /* "PyClical.pyx":1374
11738  * 0.0
11739  * """
11740  * return 0.0 # <<<<<<<<<<<<<<
11741  *
11742  * cpdef inline pure(obj):
11743  */
11744  __Pyx_XDECREF(__pyx_r);
11745  __Pyx_INCREF(__pyx_float_0_0);
11746  __pyx_r = __pyx_float_0_0;
11747  goto __pyx_L0;
11748 
11749  /* "PyClical.pyx":1365
11750  * return clifford(obj).scalar()
11751  *
11752  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11753  * """
11754  * Imaginary part: deprecated (always 0).
11755  */
11756 
11757  /* function exit code */
11758  __pyx_L0:;
11759  __Pyx_XGIVEREF(__pyx_r);
11760  __Pyx_RefNannyFinishContext();
11761  return __pyx_r;
11762  }
11763 
11764  /* Python wrapper */
11765  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11766  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 ";
11767  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11768  PyObject *__pyx_r = 0;
11769  __Pyx_RefNannyDeclarations
11770  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11771  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11772 
11773  /* function exit code */
11774  __Pyx_RefNannyFinishContext();
11775  return __pyx_r;
11776  }
11777 
11778  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11779  PyObject *__pyx_r = NULL;
11780  __Pyx_RefNannyDeclarations
11781  PyObject *__pyx_t_1 = NULL;
11782  __Pyx_RefNannySetupContext("imag", 0);
11783  __Pyx_XDECREF(__pyx_r);
11784  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error)
11785  __Pyx_GOTREF(__pyx_t_1);
11786  __pyx_r = __pyx_t_1;
11787  __pyx_t_1 = 0;
11788  goto __pyx_L0;
11789 
11790  /* function exit code */
11791  __pyx_L1_error:;
11792  __Pyx_XDECREF(__pyx_t_1);
11793  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11794  __pyx_r = NULL;
11795  __pyx_L0:;
11796  __Pyx_XGIVEREF(__pyx_r);
11797  __Pyx_RefNannyFinishContext();
11798  return __pyx_r;
11799  }
11800 
11801  /* "PyClical.pyx":1376
11802  * return 0.0
11803  *
11804  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11805  * """
11806  * Pure part
11807  */
11808 
11809  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11810  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11811  PyObject *__pyx_r = NULL;
11812  __Pyx_RefNannyDeclarations
11813  PyObject *__pyx_t_1 = NULL;
11814  PyObject *__pyx_t_2 = NULL;
11815  PyObject *__pyx_t_3 = NULL;
11816  __Pyx_RefNannySetupContext("pure", 0);
11817 
11818  /* "PyClical.pyx":1385
11819  * {1,2}
11820  * """
11821  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11822  *
11823  * cpdef inline even(obj):
11824  */
11825  __Pyx_XDECREF(__pyx_r);
11826  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error)
11827  __Pyx_GOTREF(__pyx_t_2);
11828  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1385, __pyx_L1_error)
11829  __Pyx_GOTREF(__pyx_t_3);
11830  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11831  __pyx_t_2 = NULL;
11832  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11833  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11834  if (likely(__pyx_t_2)) {
11835  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11836  __Pyx_INCREF(__pyx_t_2);
11837  __Pyx_INCREF(function);
11838  __Pyx_DECREF_SET(__pyx_t_3, function);
11839  }
11840  }
11841  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11842  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11843  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
11844  __Pyx_GOTREF(__pyx_t_1);
11845  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11846  __pyx_r = __pyx_t_1;
11847  __pyx_t_1 = 0;
11848  goto __pyx_L0;
11849 
11850  /* "PyClical.pyx":1376
11851  * return 0.0
11852  *
11853  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11854  * """
11855  * Pure part
11856  */
11857 
11858  /* function exit code */
11859  __pyx_L1_error:;
11860  __Pyx_XDECREF(__pyx_t_1);
11861  __Pyx_XDECREF(__pyx_t_2);
11862  __Pyx_XDECREF(__pyx_t_3);
11863  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11864  __pyx_r = 0;
11865  __pyx_L0:;
11866  __Pyx_XGIVEREF(__pyx_r);
11867  __Pyx_RefNannyFinishContext();
11868  return __pyx_r;
11869  }
11870 
11871  /* Python wrapper */
11872  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11873  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 ";
11874  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11875  PyObject *__pyx_r = 0;
11876  __Pyx_RefNannyDeclarations
11877  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11878  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11879 
11880  /* function exit code */
11881  __Pyx_RefNannyFinishContext();
11882  return __pyx_r;
11883  }
11884 
11885  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11886  PyObject *__pyx_r = NULL;
11887  __Pyx_RefNannyDeclarations
11888  PyObject *__pyx_t_1 = NULL;
11889  __Pyx_RefNannySetupContext("pure", 0);
11890  __Pyx_XDECREF(__pyx_r);
11891  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L1_error)
11892  __Pyx_GOTREF(__pyx_t_1);
11893  __pyx_r = __pyx_t_1;
11894  __pyx_t_1 = 0;
11895  goto __pyx_L0;
11896 
11897  /* function exit code */
11898  __pyx_L1_error:;
11899  __Pyx_XDECREF(__pyx_t_1);
11900  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11901  __pyx_r = NULL;
11902  __pyx_L0:;
11903  __Pyx_XGIVEREF(__pyx_r);
11904  __Pyx_RefNannyFinishContext();
11905  return __pyx_r;
11906  }
11907 
11908  /* "PyClical.pyx":1387
11909  * return clifford(obj).pure()
11910  *
11911  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11912  * """
11913  * Even part of multivector, sum of even grade terms.
11914  */
11915 
11916  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11917  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11918  PyObject *__pyx_r = NULL;
11919  __Pyx_RefNannyDeclarations
11920  PyObject *__pyx_t_1 = NULL;
11921  PyObject *__pyx_t_2 = NULL;
11922  PyObject *__pyx_t_3 = NULL;
11923  __Pyx_RefNannySetupContext("even", 0);
11924 
11925  /* "PyClical.pyx":1394
11926  * 1+{1,2}
11927  * """
11928  * return clifford(obj).even() # <<<<<<<<<<<<<<
11929  *
11930  * cpdef inline odd(obj):
11931  */
11932  __Pyx_XDECREF(__pyx_r);
11933  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __pyx_L1_error)
11934  __Pyx_GOTREF(__pyx_t_2);
11935  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_even); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1394, __pyx_L1_error)
11936  __Pyx_GOTREF(__pyx_t_3);
11937  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11938  __pyx_t_2 = NULL;
11939  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11940  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11941  if (likely(__pyx_t_2)) {
11942  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11943  __Pyx_INCREF(__pyx_t_2);
11944  __Pyx_INCREF(function);
11945  __Pyx_DECREF_SET(__pyx_t_3, function);
11946  }
11947  }
11948  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11949  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11950  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error)
11951  __Pyx_GOTREF(__pyx_t_1);
11952  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11953  __pyx_r = __pyx_t_1;
11954  __pyx_t_1 = 0;
11955  goto __pyx_L0;
11956 
11957  /* "PyClical.pyx":1387
11958  * return clifford(obj).pure()
11959  *
11960  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11961  * """
11962  * Even part of multivector, sum of even grade terms.
11963  */
11964 
11965  /* function exit code */
11966  __pyx_L1_error:;
11967  __Pyx_XDECREF(__pyx_t_1);
11968  __Pyx_XDECREF(__pyx_t_2);
11969  __Pyx_XDECREF(__pyx_t_3);
11970  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11971  __pyx_r = 0;
11972  __pyx_L0:;
11973  __Pyx_XGIVEREF(__pyx_r);
11974  __Pyx_RefNannyFinishContext();
11975  return __pyx_r;
11976  }
11977 
11978  /* Python wrapper */
11979  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11980  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 ";
11981  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11982  PyObject *__pyx_r = 0;
11983  __Pyx_RefNannyDeclarations
11984  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11985  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11986 
11987  /* function exit code */
11988  __Pyx_RefNannyFinishContext();
11989  return __pyx_r;
11990  }
11991 
11992  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11993  PyObject *__pyx_r = NULL;
11994  __Pyx_RefNannyDeclarations
11995  PyObject *__pyx_t_1 = NULL;
11996  __Pyx_RefNannySetupContext("even", 0);
11997  __Pyx_XDECREF(__pyx_r);
11998  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
11999  __Pyx_GOTREF(__pyx_t_1);
12000  __pyx_r = __pyx_t_1;
12001  __pyx_t_1 = 0;
12002  goto __pyx_L0;
12003 
12004  /* function exit code */
12005  __pyx_L1_error:;
12006  __Pyx_XDECREF(__pyx_t_1);
12007  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
12008  __pyx_r = NULL;
12009  __pyx_L0:;
12010  __Pyx_XGIVEREF(__pyx_r);
12011  __Pyx_RefNannyFinishContext();
12012  return __pyx_r;
12013  }
12014 
12015  /* "PyClical.pyx":1396
12016  * return clifford(obj).even()
12017  *
12018  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
12019  * """
12020  * Odd part of multivector, sum of odd grade terms.
12021  */
12022 
12023  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12024  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12025  PyObject *__pyx_r = NULL;
12026  __Pyx_RefNannyDeclarations
12027  PyObject *__pyx_t_1 = NULL;
12028  PyObject *__pyx_t_2 = NULL;
12029  PyObject *__pyx_t_3 = NULL;
12030  __Pyx_RefNannySetupContext("odd", 0);
12031 
12032  /* "PyClical.pyx":1403
12033  * {1}
12034  * """
12035  * return clifford(obj).odd() # <<<<<<<<<<<<<<
12036  *
12037  * cpdef inline involute(obj):
12038  */
12039  __Pyx_XDECREF(__pyx_r);
12040  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error)
12041  __Pyx_GOTREF(__pyx_t_2);
12042  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_odd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error)
12043  __Pyx_GOTREF(__pyx_t_3);
12044  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12045  __pyx_t_2 = NULL;
12046  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12047  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12048  if (likely(__pyx_t_2)) {
12049  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12050  __Pyx_INCREF(__pyx_t_2);
12051  __Pyx_INCREF(function);
12052  __Pyx_DECREF_SET(__pyx_t_3, function);
12053  }
12054  }
12055  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12056  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12057  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
12058  __Pyx_GOTREF(__pyx_t_1);
12059  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12060  __pyx_r = __pyx_t_1;
12061  __pyx_t_1 = 0;
12062  goto __pyx_L0;
12063 
12064  /* "PyClical.pyx":1396
12065  * return clifford(obj).even()
12066  *
12067  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
12068  * """
12069  * Odd part of multivector, sum of odd grade terms.
12070  */
12071 
12072  /* function exit code */
12073  __pyx_L1_error:;
12074  __Pyx_XDECREF(__pyx_t_1);
12075  __Pyx_XDECREF(__pyx_t_2);
12076  __Pyx_XDECREF(__pyx_t_3);
12077  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
12078  __pyx_r = 0;
12079  __pyx_L0:;
12080  __Pyx_XGIVEREF(__pyx_r);
12081  __Pyx_RefNannyFinishContext();
12082  return __pyx_r;
12083  }
12084 
12085  /* Python wrapper */
12086  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12087  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 ";
12088  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12089  PyObject *__pyx_r = 0;
12090  __Pyx_RefNannyDeclarations
12091  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
12092  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
12093 
12094  /* function exit code */
12095  __Pyx_RefNannyFinishContext();
12096  return __pyx_r;
12097  }
12098 
12099  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12100  PyObject *__pyx_r = NULL;
12101  __Pyx_RefNannyDeclarations
12102  PyObject *__pyx_t_1 = NULL;
12103  __Pyx_RefNannySetupContext("odd", 0);
12104  __Pyx_XDECREF(__pyx_r);
12105  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error)
12106  __Pyx_GOTREF(__pyx_t_1);
12107  __pyx_r = __pyx_t_1;
12108  __pyx_t_1 = 0;
12109  goto __pyx_L0;
12110 
12111  /* function exit code */
12112  __pyx_L1_error:;
12113  __Pyx_XDECREF(__pyx_t_1);
12114  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
12115  __pyx_r = NULL;
12116  __pyx_L0:;
12117  __Pyx_XGIVEREF(__pyx_r);
12118  __Pyx_RefNannyFinishContext();
12119  return __pyx_r;
12120  }
12121 
12122  /* "PyClical.pyx":1405
12123  * return clifford(obj).odd()
12124  *
12125  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
12126  * """
12127  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
12128  */
12129 
12130  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12131  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12132  PyObject *__pyx_r = NULL;
12133  __Pyx_RefNannyDeclarations
12134  PyObject *__pyx_t_1 = NULL;
12135  PyObject *__pyx_t_2 = NULL;
12136  PyObject *__pyx_t_3 = NULL;
12137  __Pyx_RefNannySetupContext("involute", 0);
12138 
12139  /* "PyClical.pyx":1418
12140  * 1-{1}+{1,2}
12141  * """
12142  * return clifford(obj).involute() # <<<<<<<<<<<<<<
12143  *
12144  * cpdef inline reverse(obj):
12145  */
12146  __Pyx_XDECREF(__pyx_r);
12147  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error)
12148  __Pyx_GOTREF(__pyx_t_2);
12149  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_involute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error)
12150  __Pyx_GOTREF(__pyx_t_3);
12151  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12152  __pyx_t_2 = NULL;
12153  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12154  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12155  if (likely(__pyx_t_2)) {
12156  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12157  __Pyx_INCREF(__pyx_t_2);
12158  __Pyx_INCREF(function);
12159  __Pyx_DECREF_SET(__pyx_t_3, function);
12160  }
12161  }
12162  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12163  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12164  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
12165  __Pyx_GOTREF(__pyx_t_1);
12166  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12167  __pyx_r = __pyx_t_1;
12168  __pyx_t_1 = 0;
12169  goto __pyx_L0;
12170 
12171  /* "PyClical.pyx":1405
12172  * return clifford(obj).odd()
12173  *
12174  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
12175  * """
12176  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
12177  */
12178 
12179  /* function exit code */
12180  __pyx_L1_error:;
12181  __Pyx_XDECREF(__pyx_t_1);
12182  __Pyx_XDECREF(__pyx_t_2);
12183  __Pyx_XDECREF(__pyx_t_3);
12184  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12185  __pyx_r = 0;
12186  __pyx_L0:;
12187  __Pyx_XGIVEREF(__pyx_r);
12188  __Pyx_RefNannyFinishContext();
12189  return __pyx_r;
12190  }
12191 
12192  /* Python wrapper */
12193  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12194  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 ";
12195  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12196  PyObject *__pyx_r = 0;
12197  __Pyx_RefNannyDeclarations
12198  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
12199  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
12200 
12201  /* function exit code */
12202  __Pyx_RefNannyFinishContext();
12203  return __pyx_r;
12204  }
12205 
12206  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12207  PyObject *__pyx_r = NULL;
12208  __Pyx_RefNannyDeclarations
12209  PyObject *__pyx_t_1 = NULL;
12210  __Pyx_RefNannySetupContext("involute", 0);
12211  __Pyx_XDECREF(__pyx_r);
12212  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
12213  __Pyx_GOTREF(__pyx_t_1);
12214  __pyx_r = __pyx_t_1;
12215  __pyx_t_1 = 0;
12216  goto __pyx_L0;
12217 
12218  /* function exit code */
12219  __pyx_L1_error:;
12220  __Pyx_XDECREF(__pyx_t_1);
12221  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12222  __pyx_r = NULL;
12223  __pyx_L0:;
12224  __Pyx_XGIVEREF(__pyx_r);
12225  __Pyx_RefNannyFinishContext();
12226  return __pyx_r;
12227  }
12228 
12229  /* "PyClical.pyx":1420
12230  * return clifford(obj).involute()
12231  *
12232  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12233  * """
12234  * Reversion, eg. {1}*{2} -> {2}*{1}
12235  */
12236 
12237  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12238  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12239  PyObject *__pyx_r = NULL;
12240  __Pyx_RefNannyDeclarations
12241  PyObject *__pyx_t_1 = NULL;
12242  PyObject *__pyx_t_2 = NULL;
12243  PyObject *__pyx_t_3 = NULL;
12244  __Pyx_RefNannySetupContext("reverse", 0);
12245 
12246  /* "PyClical.pyx":1433
12247  * 1+{1}-{1,2}
12248  * """
12249  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
12250  *
12251  * cpdef inline conj(obj):
12252  */
12253  __Pyx_XDECREF(__pyx_r);
12254  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error)
12255  __Pyx_GOTREF(__pyx_t_2);
12256  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reverse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1433, __pyx_L1_error)
12257  __Pyx_GOTREF(__pyx_t_3);
12258  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12259  __pyx_t_2 = NULL;
12260  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12261  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12262  if (likely(__pyx_t_2)) {
12263  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12264  __Pyx_INCREF(__pyx_t_2);
12265  __Pyx_INCREF(function);
12266  __Pyx_DECREF_SET(__pyx_t_3, function);
12267  }
12268  }
12269  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12270  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12271  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __pyx_L1_error)
12272  __Pyx_GOTREF(__pyx_t_1);
12273  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12274  __pyx_r = __pyx_t_1;
12275  __pyx_t_1 = 0;
12276  goto __pyx_L0;
12277 
12278  /* "PyClical.pyx":1420
12279  * return clifford(obj).involute()
12280  *
12281  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12282  * """
12283  * Reversion, eg. {1}*{2} -> {2}*{1}
12284  */
12285 
12286  /* function exit code */
12287  __pyx_L1_error:;
12288  __Pyx_XDECREF(__pyx_t_1);
12289  __Pyx_XDECREF(__pyx_t_2);
12290  __Pyx_XDECREF(__pyx_t_3);
12291  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12292  __pyx_r = 0;
12293  __pyx_L0:;
12294  __Pyx_XGIVEREF(__pyx_r);
12295  __Pyx_RefNannyFinishContext();
12296  return __pyx_r;
12297  }
12298 
12299  /* Python wrapper */
12300  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12301  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 ";
12302  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12303  PyObject *__pyx_r = 0;
12304  __Pyx_RefNannyDeclarations
12305  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12306  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12307 
12308  /* function exit code */
12309  __Pyx_RefNannyFinishContext();
12310  return __pyx_r;
12311  }
12312 
12313  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12314  PyObject *__pyx_r = NULL;
12315  __Pyx_RefNannyDeclarations
12316  PyObject *__pyx_t_1 = NULL;
12317  __Pyx_RefNannySetupContext("reverse", 0);
12318  __Pyx_XDECREF(__pyx_r);
12319  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
12320  __Pyx_GOTREF(__pyx_t_1);
12321  __pyx_r = __pyx_t_1;
12322  __pyx_t_1 = 0;
12323  goto __pyx_L0;
12324 
12325  /* function exit code */
12326  __pyx_L1_error:;
12327  __Pyx_XDECREF(__pyx_t_1);
12328  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12329  __pyx_r = NULL;
12330  __pyx_L0:;
12331  __Pyx_XGIVEREF(__pyx_r);
12332  __Pyx_RefNannyFinishContext();
12333  return __pyx_r;
12334  }
12335 
12336  /* "PyClical.pyx":1435
12337  * return clifford(obj).reverse()
12338  *
12339  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12340  * """
12341  * Conjugation, reverse o involute == involute o reverse.
12342  */
12343 
12344  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12345  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12346  PyObject *__pyx_r = NULL;
12347  __Pyx_RefNannyDeclarations
12348  PyObject *__pyx_t_1 = NULL;
12349  PyObject *__pyx_t_2 = NULL;
12350  PyObject *__pyx_t_3 = NULL;
12351  __Pyx_RefNannySetupContext("conj", 0);
12352 
12353  /* "PyClical.pyx":1448
12354  * 1-{1}-{1,2}
12355  * """
12356  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12357  *
12358  * cpdef inline quad(obj):
12359  */
12360  __Pyx_XDECREF(__pyx_r);
12361  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1448, __pyx_L1_error)
12362  __Pyx_GOTREF(__pyx_t_2);
12363  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_conj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1448, __pyx_L1_error)
12364  __Pyx_GOTREF(__pyx_t_3);
12365  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12366  __pyx_t_2 = NULL;
12367  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12368  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12369  if (likely(__pyx_t_2)) {
12370  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12371  __Pyx_INCREF(__pyx_t_2);
12372  __Pyx_INCREF(function);
12373  __Pyx_DECREF_SET(__pyx_t_3, function);
12374  }
12375  }
12376  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12377  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12378  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1448, __pyx_L1_error)
12379  __Pyx_GOTREF(__pyx_t_1);
12380  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12381  __pyx_r = __pyx_t_1;
12382  __pyx_t_1 = 0;
12383  goto __pyx_L0;
12384 
12385  /* "PyClical.pyx":1435
12386  * return clifford(obj).reverse()
12387  *
12388  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12389  * """
12390  * Conjugation, reverse o involute == involute o reverse.
12391  */
12392 
12393  /* function exit code */
12394  __pyx_L1_error:;
12395  __Pyx_XDECREF(__pyx_t_1);
12396  __Pyx_XDECREF(__pyx_t_2);
12397  __Pyx_XDECREF(__pyx_t_3);
12398  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12399  __pyx_r = 0;
12400  __pyx_L0:;
12401  __Pyx_XGIVEREF(__pyx_r);
12402  __Pyx_RefNannyFinishContext();
12403  return __pyx_r;
12404  }
12405 
12406  /* Python wrapper */
12407  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12408  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 ";
12409  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12410  PyObject *__pyx_r = 0;
12411  __Pyx_RefNannyDeclarations
12412  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12413  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12414 
12415  /* function exit code */
12416  __Pyx_RefNannyFinishContext();
12417  return __pyx_r;
12418  }
12419 
12420  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12421  PyObject *__pyx_r = NULL;
12422  __Pyx_RefNannyDeclarations
12423  PyObject *__pyx_t_1 = NULL;
12424  __Pyx_RefNannySetupContext("conj", 0);
12425  __Pyx_XDECREF(__pyx_r);
12426  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error)
12427  __Pyx_GOTREF(__pyx_t_1);
12428  __pyx_r = __pyx_t_1;
12429  __pyx_t_1 = 0;
12430  goto __pyx_L0;
12431 
12432  /* function exit code */
12433  __pyx_L1_error:;
12434  __Pyx_XDECREF(__pyx_t_1);
12435  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12436  __pyx_r = NULL;
12437  __pyx_L0:;
12438  __Pyx_XGIVEREF(__pyx_r);
12439  __Pyx_RefNannyFinishContext();
12440  return __pyx_r;
12441  }
12442 
12443  /* "PyClical.pyx":1450
12444  * return clifford(obj).conj()
12445  *
12446  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12447  * """
12448  * Quadratic form == (rev(x)*x)(0).
12449  */
12450 
12451  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12452  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12453  PyObject *__pyx_r = NULL;
12454  __Pyx_RefNannyDeclarations
12455  PyObject *__pyx_t_1 = NULL;
12456  PyObject *__pyx_t_2 = NULL;
12457  PyObject *__pyx_t_3 = NULL;
12458  __Pyx_RefNannySetupContext("quad", 0);
12459 
12460  /* "PyClical.pyx":1459
12461  * 2.0
12462  * """
12463  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12464  *
12465  * cpdef inline norm(obj):
12466  */
12467  __Pyx_XDECREF(__pyx_r);
12468  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error)
12469  __Pyx_GOTREF(__pyx_t_2);
12470  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_quad); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error)
12471  __Pyx_GOTREF(__pyx_t_3);
12472  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12473  __pyx_t_2 = NULL;
12474  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12475  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12476  if (likely(__pyx_t_2)) {
12477  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12478  __Pyx_INCREF(__pyx_t_2);
12479  __Pyx_INCREF(function);
12480  __Pyx_DECREF_SET(__pyx_t_3, function);
12481  }
12482  }
12483  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12484  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12485  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error)
12486  __Pyx_GOTREF(__pyx_t_1);
12487  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12488  __pyx_r = __pyx_t_1;
12489  __pyx_t_1 = 0;
12490  goto __pyx_L0;
12491 
12492  /* "PyClical.pyx":1450
12493  * return clifford(obj).conj()
12494  *
12495  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12496  * """
12497  * Quadratic form == (rev(x)*x)(0).
12498  */
12499 
12500  /* function exit code */
12501  __pyx_L1_error:;
12502  __Pyx_XDECREF(__pyx_t_1);
12503  __Pyx_XDECREF(__pyx_t_2);
12504  __Pyx_XDECREF(__pyx_t_3);
12505  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12506  __pyx_r = 0;
12507  __pyx_L0:;
12508  __Pyx_XGIVEREF(__pyx_r);
12509  __Pyx_RefNannyFinishContext();
12510  return __pyx_r;
12511  }
12512 
12513  /* Python wrapper */
12514  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12515  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 ";
12516  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12517  PyObject *__pyx_r = 0;
12518  __Pyx_RefNannyDeclarations
12519  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12520  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12521 
12522  /* function exit code */
12523  __Pyx_RefNannyFinishContext();
12524  return __pyx_r;
12525  }
12526 
12527  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12528  PyObject *__pyx_r = NULL;
12529  __Pyx_RefNannyDeclarations
12530  PyObject *__pyx_t_1 = NULL;
12531  __Pyx_RefNannySetupContext("quad", 0);
12532  __Pyx_XDECREF(__pyx_r);
12533  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error)
12534  __Pyx_GOTREF(__pyx_t_1);
12535  __pyx_r = __pyx_t_1;
12536  __pyx_t_1 = 0;
12537  goto __pyx_L0;
12538 
12539  /* function exit code */
12540  __pyx_L1_error:;
12541  __Pyx_XDECREF(__pyx_t_1);
12542  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12543  __pyx_r = NULL;
12544  __pyx_L0:;
12545  __Pyx_XGIVEREF(__pyx_r);
12546  __Pyx_RefNannyFinishContext();
12547  return __pyx_r;
12548  }
12549 
12550  /* "PyClical.pyx":1461
12551  * return clifford(obj).quad()
12552  *
12553  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12554  * """
12555  * norm == sum of squares of coordinates.
12556  */
12557 
12558  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12559  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12560  PyObject *__pyx_r = NULL;
12561  __Pyx_RefNannyDeclarations
12562  PyObject *__pyx_t_1 = NULL;
12563  PyObject *__pyx_t_2 = NULL;
12564  PyObject *__pyx_t_3 = NULL;
12565  __Pyx_RefNannySetupContext("norm", 0);
12566 
12567  /* "PyClical.pyx":1470
12568  * 4.0
12569  * """
12570  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12571  *
12572  * cpdef inline abs(obj):
12573  */
12574  __Pyx_XDECREF(__pyx_r);
12575  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error)
12576  __Pyx_GOTREF(__pyx_t_2);
12577  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_norm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1470, __pyx_L1_error)
12578  __Pyx_GOTREF(__pyx_t_3);
12579  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12580  __pyx_t_2 = NULL;
12581  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12582  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12583  if (likely(__pyx_t_2)) {
12584  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12585  __Pyx_INCREF(__pyx_t_2);
12586  __Pyx_INCREF(function);
12587  __Pyx_DECREF_SET(__pyx_t_3, function);
12588  }
12589  }
12590  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12591  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12592  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error)
12593  __Pyx_GOTREF(__pyx_t_1);
12594  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12595  __pyx_r = __pyx_t_1;
12596  __pyx_t_1 = 0;
12597  goto __pyx_L0;
12598 
12599  /* "PyClical.pyx":1461
12600  * return clifford(obj).quad()
12601  *
12602  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12603  * """
12604  * norm == sum of squares of coordinates.
12605  */
12606 
12607  /* function exit code */
12608  __pyx_L1_error:;
12609  __Pyx_XDECREF(__pyx_t_1);
12610  __Pyx_XDECREF(__pyx_t_2);
12611  __Pyx_XDECREF(__pyx_t_3);
12612  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12613  __pyx_r = 0;
12614  __pyx_L0:;
12615  __Pyx_XGIVEREF(__pyx_r);
12616  __Pyx_RefNannyFinishContext();
12617  return __pyx_r;
12618  }
12619 
12620  /* Python wrapper */
12621  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12622  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 ";
12623  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12624  PyObject *__pyx_r = 0;
12625  __Pyx_RefNannyDeclarations
12626  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12627  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12628 
12629  /* function exit code */
12630  __Pyx_RefNannyFinishContext();
12631  return __pyx_r;
12632  }
12633 
12634  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12635  PyObject *__pyx_r = NULL;
12636  __Pyx_RefNannyDeclarations
12637  PyObject *__pyx_t_1 = NULL;
12638  __Pyx_RefNannySetupContext("norm", 0);
12639  __Pyx_XDECREF(__pyx_r);
12640  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
12641  __Pyx_GOTREF(__pyx_t_1);
12642  __pyx_r = __pyx_t_1;
12643  __pyx_t_1 = 0;
12644  goto __pyx_L0;
12645 
12646  /* function exit code */
12647  __pyx_L1_error:;
12648  __Pyx_XDECREF(__pyx_t_1);
12649  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12650  __pyx_r = NULL;
12651  __pyx_L0:;
12652  __Pyx_XGIVEREF(__pyx_r);
12653  __Pyx_RefNannyFinishContext();
12654  return __pyx_r;
12655  }
12656 
12657  /* "PyClical.pyx":1472
12658  * return clifford(obj).norm()
12659  *
12660  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12661  * """
12662  * Absolute value of multivector: multivector 2-norm.
12663  */
12664 
12665  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12666  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12667  PyObject *__pyx_r = NULL;
12668  __Pyx_RefNannyDeclarations
12669  PyObject *__pyx_t_1 = NULL;
12670  __Pyx_RefNannySetupContext("abs", 0);
12671 
12672  /* "PyClical.pyx":1479
12673  * 2.0
12674  * """
12675  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12676  *
12677  * cpdef inline max_abs(obj):
12678  */
12679  __Pyx_XDECREF(__pyx_r);
12680  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1479, __pyx_L1_error)
12681  __Pyx_GOTREF(__pyx_t_1);
12682  __pyx_r = __pyx_t_1;
12683  __pyx_t_1 = 0;
12684  goto __pyx_L0;
12685 
12686  /* "PyClical.pyx":1472
12687  * return clifford(obj).norm()
12688  *
12689  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12690  * """
12691  * Absolute value of multivector: multivector 2-norm.
12692  */
12693 
12694  /* function exit code */
12695  __pyx_L1_error:;
12696  __Pyx_XDECREF(__pyx_t_1);
12697  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12698  __pyx_r = 0;
12699  __pyx_L0:;
12700  __Pyx_XGIVEREF(__pyx_r);
12701  __Pyx_RefNannyFinishContext();
12702  return __pyx_r;
12703  }
12704 
12705  /* Python wrapper */
12706  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12707  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 ";
12708  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12709  PyObject *__pyx_r = 0;
12710  __Pyx_RefNannyDeclarations
12711  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12712  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12713 
12714  /* function exit code */
12715  __Pyx_RefNannyFinishContext();
12716  return __pyx_r;
12717  }
12718 
12719  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12720  PyObject *__pyx_r = NULL;
12721  __Pyx_RefNannyDeclarations
12722  PyObject *__pyx_t_1 = NULL;
12723  __Pyx_RefNannySetupContext("abs", 0);
12724  __Pyx_XDECREF(__pyx_r);
12725  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error)
12726  __Pyx_GOTREF(__pyx_t_1);
12727  __pyx_r = __pyx_t_1;
12728  __pyx_t_1 = 0;
12729  goto __pyx_L0;
12730 
12731  /* function exit code */
12732  __pyx_L1_error:;
12733  __Pyx_XDECREF(__pyx_t_1);
12734  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12735  __pyx_r = NULL;
12736  __pyx_L0:;
12737  __Pyx_XGIVEREF(__pyx_r);
12738  __Pyx_RefNannyFinishContext();
12739  return __pyx_r;
12740  }
12741 
12742  /* "PyClical.pyx":1481
12743  * return glucat.abs(toClifford(obj))
12744  *
12745  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12746  * """
12747  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12748  */
12749 
12750  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12751  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12752  PyObject *__pyx_r = NULL;
12753  __Pyx_RefNannyDeclarations
12754  PyObject *__pyx_t_1 = NULL;
12755  __Pyx_RefNannySetupContext("max_abs", 0);
12756 
12757  /* "PyClical.pyx":1491
12758  *
12759  * """
12760  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12761  *
12762  * cpdef inline pow(obj, m):
12763  */
12764  __Pyx_XDECREF(__pyx_r);
12765  __pyx_t_1 = PyFloat_FromDouble(max_abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L1_error)
12766  __Pyx_GOTREF(__pyx_t_1);
12767  __pyx_r = __pyx_t_1;
12768  __pyx_t_1 = 0;
12769  goto __pyx_L0;
12770 
12771  /* "PyClical.pyx":1481
12772  * return glucat.abs(toClifford(obj))
12773  *
12774  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12775  * """
12776  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12777  */
12778 
12779  /* function exit code */
12780  __pyx_L1_error:;
12781  __Pyx_XDECREF(__pyx_t_1);
12782  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12783  __pyx_r = 0;
12784  __pyx_L0:;
12785  __Pyx_XGIVEREF(__pyx_r);
12786  __Pyx_RefNannyFinishContext();
12787  return __pyx_r;
12788  }
12789 
12790  /* Python wrapper */
12791  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12792  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 ";
12793  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12794  PyObject *__pyx_r = 0;
12795  __Pyx_RefNannyDeclarations
12796  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12797  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12798 
12799  /* function exit code */
12800  __Pyx_RefNannyFinishContext();
12801  return __pyx_r;
12802  }
12803 
12804  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12805  PyObject *__pyx_r = NULL;
12806  __Pyx_RefNannyDeclarations
12807  PyObject *__pyx_t_1 = NULL;
12808  __Pyx_RefNannySetupContext("max_abs", 0);
12809  __Pyx_XDECREF(__pyx_r);
12810  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
12811  __Pyx_GOTREF(__pyx_t_1);
12812  __pyx_r = __pyx_t_1;
12813  __pyx_t_1 = 0;
12814  goto __pyx_L0;
12815 
12816  /* function exit code */
12817  __pyx_L1_error:;
12818  __Pyx_XDECREF(__pyx_t_1);
12819  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12820  __pyx_r = NULL;
12821  __pyx_L0:;
12822  __Pyx_XGIVEREF(__pyx_r);
12823  __Pyx_RefNannyFinishContext();
12824  return __pyx_r;
12825  }
12826 
12827  /* "PyClical.pyx":1493
12828  * return glucat.max_abs(toClifford(obj))
12829  *
12830  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12831  * """
12832  * Integer power of multivector: obj to the m.
12833  */
12834 
12835  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12836  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12837  PyObject *__pyx_r = NULL;
12838  __Pyx_RefNannyDeclarations
12839  PyObject *__pyx_t_1 = NULL;
12840  PyObject *__pyx_t_2 = NULL;
12841  PyObject *__pyx_t_3 = NULL;
12842  PyObject *__pyx_t_4 = NULL;
12843  PyObject *__pyx_t_5 = NULL;
12844  PyObject *__pyx_t_6 = NULL;
12845  int __pyx_t_7;
12846  PyObject *__pyx_t_8 = NULL;
12847  PyObject *__pyx_t_9 = NULL;
12848  PyObject *__pyx_t_10 = NULL;
12849  __Pyx_RefNannySetupContext("pow", 0);
12850 
12851  /* "PyClical.pyx":1512
12852  * 1
12853  * """
12854  * try: # <<<<<<<<<<<<<<
12855  * math.pow(obj, m)
12856  * except:
12857  */
12858  {
12859  __Pyx_PyThreadState_declare
12860  __Pyx_PyThreadState_assign
12861  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12862  __Pyx_XGOTREF(__pyx_t_1);
12863  __Pyx_XGOTREF(__pyx_t_2);
12864  __Pyx_XGOTREF(__pyx_t_3);
12865  /*try:*/ {
12866 
12867  /* "PyClical.pyx":1513
12868  * """
12869  * try:
12870  * math.pow(obj, m) # <<<<<<<<<<<<<<
12871  * except:
12872  * return clifford(obj).pow(m)
12873  */
12874  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1513, __pyx_L3_error)
12875  __Pyx_GOTREF(__pyx_t_5);
12876  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pow); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1513, __pyx_L3_error)
12877  __Pyx_GOTREF(__pyx_t_6);
12878  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12879  __pyx_t_5 = NULL;
12880  __pyx_t_7 = 0;
12881  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12882  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12883  if (likely(__pyx_t_5)) {
12884  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12885  __Pyx_INCREF(__pyx_t_5);
12886  __Pyx_INCREF(function);
12887  __Pyx_DECREF_SET(__pyx_t_6, function);
12888  __pyx_t_7 = 1;
12889  }
12890  }
12891  #if CYTHON_FAST_PYCALL
12892  if (PyFunction_Check(__pyx_t_6)) {
12893  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12894  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1513, __pyx_L3_error)
12895  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12896  __Pyx_GOTREF(__pyx_t_4);
12897  } else
12898  #endif
12899  #if CYTHON_FAST_PYCCALL
12900  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12901  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12902  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1513, __pyx_L3_error)
12903  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12904  __Pyx_GOTREF(__pyx_t_4);
12905  } else
12906  #endif
12907  {
12908  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1513, __pyx_L3_error)
12909  __Pyx_GOTREF(__pyx_t_8);
12910  if (__pyx_t_5) {
12911  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12912  }
12913  __Pyx_INCREF(__pyx_v_obj);
12914  __Pyx_GIVEREF(__pyx_v_obj);
12915  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12916  __Pyx_INCREF(__pyx_v_m);
12917  __Pyx_GIVEREF(__pyx_v_m);
12918  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12919  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1513, __pyx_L3_error)
12920  __Pyx_GOTREF(__pyx_t_4);
12921  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12922  }
12923  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12924  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12925 
12926  /* "PyClical.pyx":1512
12927  * 1
12928  * """
12929  * try: # <<<<<<<<<<<<<<
12930  * math.pow(obj, m)
12931  * except:
12932  */
12933  }
12934  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12935  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12936  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12937  goto __pyx_L8_try_end;
12938  __pyx_L3_error:;
12939  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12940  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12941  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12942  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12943 
12944  /* "PyClical.pyx":1514
12945  * try:
12946  * math.pow(obj, m)
12947  * except: # <<<<<<<<<<<<<<
12948  * return clifford(obj).pow(m)
12949  *
12950  */
12951  /*except:*/ {
12952  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12953  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1514, __pyx_L5_except_error)
12954  __Pyx_GOTREF(__pyx_t_4);
12955  __Pyx_GOTREF(__pyx_t_6);
12956  __Pyx_GOTREF(__pyx_t_8);
12957 
12958  /* "PyClical.pyx":1515
12959  * math.pow(obj, m)
12960  * except:
12961  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12962  *
12963  * cpdef inline outer_pow(obj, m):
12964  */
12965  __Pyx_XDECREF(__pyx_r);
12966  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12967  __Pyx_GOTREF(__pyx_t_9);
12968  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_pow); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12969  __Pyx_GOTREF(__pyx_t_10);
12970  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12971  __pyx_t_9 = NULL;
12972  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
12973  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
12974  if (likely(__pyx_t_9)) {
12975  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
12976  __Pyx_INCREF(__pyx_t_9);
12977  __Pyx_INCREF(function);
12978  __Pyx_DECREF_SET(__pyx_t_10, function);
12979  }
12980  }
12981  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_v_m) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_m);
12982  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12983  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12984  __Pyx_GOTREF(__pyx_t_5);
12985  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12986  __pyx_r = __pyx_t_5;
12987  __pyx_t_5 = 0;
12988  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12989  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12990  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12991  goto __pyx_L6_except_return;
12992  }
12993  __pyx_L5_except_error:;
12994 
12995  /* "PyClical.pyx":1512
12996  * 1
12997  * """
12998  * try: # <<<<<<<<<<<<<<
12999  * math.pow(obj, m)
13000  * except:
13001  */
13002  __Pyx_XGIVEREF(__pyx_t_1);
13003  __Pyx_XGIVEREF(__pyx_t_2);
13004  __Pyx_XGIVEREF(__pyx_t_3);
13005  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13006  goto __pyx_L1_error;
13007  __pyx_L6_except_return:;
13008  __Pyx_XGIVEREF(__pyx_t_1);
13009  __Pyx_XGIVEREF(__pyx_t_2);
13010  __Pyx_XGIVEREF(__pyx_t_3);
13011  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13012  goto __pyx_L0;
13013  __pyx_L8_try_end:;
13014  }
13015 
13016  /* "PyClical.pyx":1493
13017  * return glucat.max_abs(toClifford(obj))
13018  *
13019  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
13020  * """
13021  * Integer power of multivector: obj to the m.
13022  */
13023 
13024  /* function exit code */
13025  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13026  goto __pyx_L0;
13027  __pyx_L1_error:;
13028  __Pyx_XDECREF(__pyx_t_4);
13029  __Pyx_XDECREF(__pyx_t_5);
13030  __Pyx_XDECREF(__pyx_t_6);
13031  __Pyx_XDECREF(__pyx_t_8);
13032  __Pyx_XDECREF(__pyx_t_9);
13033  __Pyx_XDECREF(__pyx_t_10);
13034  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13035  __pyx_r = 0;
13036  __pyx_L0:;
13037  __Pyx_XGIVEREF(__pyx_r);
13038  __Pyx_RefNannyFinishContext();
13039  return __pyx_r;
13040  }
13041 
13042  /* Python wrapper */
13043  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13044  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 ";
13045  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13046  PyObject *__pyx_v_obj = 0;
13047  PyObject *__pyx_v_m = 0;
13048  PyObject *__pyx_r = 0;
13049  __Pyx_RefNannyDeclarations
13050  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
13051  {
13052  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
13053  PyObject* values[2] = {0,0};
13054  if (unlikely(__pyx_kwds)) {
13055  Py_ssize_t kw_args;
13056  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13057  switch (pos_args) {
13058  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13059  CYTHON_FALLTHROUGH;
13060  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13061  CYTHON_FALLTHROUGH;
13062  case 0: break;
13063  default: goto __pyx_L5_argtuple_error;
13064  }
13065  kw_args = PyDict_Size(__pyx_kwds);
13066  switch (pos_args) {
13067  case 0:
13068  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13069  else goto __pyx_L5_argtuple_error;
13070  CYTHON_FALLTHROUGH;
13071  case 1:
13072  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13073  else {
13074  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1493, __pyx_L3_error)
13075  }
13076  }
13077  if (unlikely(kw_args > 0)) {
13078  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1493, __pyx_L3_error)
13079  }
13080  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13081  goto __pyx_L5_argtuple_error;
13082  } else {
13083  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13084  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13085  }
13086  __pyx_v_obj = values[0];
13087  __pyx_v_m = values[1];
13088  }
13089  goto __pyx_L4_argument_unpacking_done;
13090  __pyx_L5_argtuple_error:;
13091  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1493, __pyx_L3_error)
13092  __pyx_L3_error:;
13093  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13094  __Pyx_RefNannyFinishContext();
13095  return NULL;
13096  __pyx_L4_argument_unpacking_done:;
13097  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13098 
13099  /* function exit code */
13100  __Pyx_RefNannyFinishContext();
13101  return __pyx_r;
13102  }
13103 
13104  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13105  PyObject *__pyx_r = NULL;
13106  __Pyx_RefNannyDeclarations
13107  PyObject *__pyx_t_1 = NULL;
13108  __Pyx_RefNannySetupContext("pow", 0);
13109  __Pyx_XDECREF(__pyx_r);
13110  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L1_error)
13111  __Pyx_GOTREF(__pyx_t_1);
13112  __pyx_r = __pyx_t_1;
13113  __pyx_t_1 = 0;
13114  goto __pyx_L0;
13115 
13116  /* function exit code */
13117  __pyx_L1_error:;
13118  __Pyx_XDECREF(__pyx_t_1);
13119  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13120  __pyx_r = NULL;
13121  __pyx_L0:;
13122  __Pyx_XGIVEREF(__pyx_r);
13123  __Pyx_RefNannyFinishContext();
13124  return __pyx_r;
13125  }
13126 
13127  /* "PyClical.pyx":1517
13128  * return clifford(obj).pow(m)
13129  *
13130  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13131  * """
13132  * Outer product power of multivector.
13133  */
13134 
13135  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13136  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
13137  PyObject *__pyx_r = NULL;
13138  __Pyx_RefNannyDeclarations
13139  PyObject *__pyx_t_1 = NULL;
13140  PyObject *__pyx_t_2 = NULL;
13141  PyObject *__pyx_t_3 = NULL;
13142  __Pyx_RefNannySetupContext("outer_pow", 0);
13143 
13144  /* "PyClical.pyx":1524
13145  * 1+3{1}+3{1,2}
13146  * """
13147  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
13148  *
13149  * cpdef inline complexifier(obj):
13150  */
13151  __Pyx_XDECREF(__pyx_r);
13152  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1524, __pyx_L1_error)
13153  __Pyx_GOTREF(__pyx_t_2);
13154  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outer_pow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1524, __pyx_L1_error)
13155  __Pyx_GOTREF(__pyx_t_3);
13156  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13157  __pyx_t_2 = NULL;
13158  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13159  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13160  if (likely(__pyx_t_2)) {
13161  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13162  __Pyx_INCREF(__pyx_t_2);
13163  __Pyx_INCREF(function);
13164  __Pyx_DECREF_SET(__pyx_t_3, function);
13165  }
13166  }
13167  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_m) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_m);
13168  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13169  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error)
13170  __Pyx_GOTREF(__pyx_t_1);
13171  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13172  __pyx_r = __pyx_t_1;
13173  __pyx_t_1 = 0;
13174  goto __pyx_L0;
13175 
13176  /* "PyClical.pyx":1517
13177  * return clifford(obj).pow(m)
13178  *
13179  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13180  * """
13181  * Outer product power of multivector.
13182  */
13183 
13184  /* function exit code */
13185  __pyx_L1_error:;
13186  __Pyx_XDECREF(__pyx_t_1);
13187  __Pyx_XDECREF(__pyx_t_2);
13188  __Pyx_XDECREF(__pyx_t_3);
13189  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13190  __pyx_r = 0;
13191  __pyx_L0:;
13192  __Pyx_XGIVEREF(__pyx_r);
13193  __Pyx_RefNannyFinishContext();
13194  return __pyx_r;
13195  }
13196 
13197  /* Python wrapper */
13198  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13199  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 ";
13200  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13201  PyObject *__pyx_v_obj = 0;
13202  PyObject *__pyx_v_m = 0;
13203  PyObject *__pyx_r = 0;
13204  __Pyx_RefNannyDeclarations
13205  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
13206  {
13207  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
13208  PyObject* values[2] = {0,0};
13209  if (unlikely(__pyx_kwds)) {
13210  Py_ssize_t kw_args;
13211  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13212  switch (pos_args) {
13213  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13214  CYTHON_FALLTHROUGH;
13215  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13216  CYTHON_FALLTHROUGH;
13217  case 0: break;
13218  default: goto __pyx_L5_argtuple_error;
13219  }
13220  kw_args = PyDict_Size(__pyx_kwds);
13221  switch (pos_args) {
13222  case 0:
13223  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13224  else goto __pyx_L5_argtuple_error;
13225  CYTHON_FALLTHROUGH;
13226  case 1:
13227  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13228  else {
13229  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1517, __pyx_L3_error)
13230  }
13231  }
13232  if (unlikely(kw_args > 0)) {
13233  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1517, __pyx_L3_error)
13234  }
13235  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13236  goto __pyx_L5_argtuple_error;
13237  } else {
13238  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13239  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13240  }
13241  __pyx_v_obj = values[0];
13242  __pyx_v_m = values[1];
13243  }
13244  goto __pyx_L4_argument_unpacking_done;
13245  __pyx_L5_argtuple_error:;
13246  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1517, __pyx_L3_error)
13247  __pyx_L3_error:;
13248  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13249  __Pyx_RefNannyFinishContext();
13250  return NULL;
13251  __pyx_L4_argument_unpacking_done:;
13252  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13253 
13254  /* function exit code */
13255  __Pyx_RefNannyFinishContext();
13256  return __pyx_r;
13257  }
13258 
13259  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13260  PyObject *__pyx_r = NULL;
13261  __Pyx_RefNannyDeclarations
13262  PyObject *__pyx_t_1 = NULL;
13263  __Pyx_RefNannySetupContext("outer_pow", 0);
13264  __Pyx_XDECREF(__pyx_r);
13265  __pyx_t_1 = __pyx_f_8PyClical_outer_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
13266  __Pyx_GOTREF(__pyx_t_1);
13267  __pyx_r = __pyx_t_1;
13268  __pyx_t_1 = 0;
13269  goto __pyx_L0;
13270 
13271  /* function exit code */
13272  __pyx_L1_error:;
13273  __Pyx_XDECREF(__pyx_t_1);
13274  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13275  __pyx_r = NULL;
13276  __pyx_L0:;
13277  __Pyx_XGIVEREF(__pyx_r);
13278  __Pyx_RefNannyFinishContext();
13279  return __pyx_r;
13280  }
13281 
13282  /* "PyClical.pyx":1526
13283  * return clifford(obj).outer_pow(m)
13284  *
13285  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13286  * """
13287  * Square root of -1 which commutes with all members of the frame of the given multivector.
13288  */
13289 
13290  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13291  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13292  PyObject *__pyx_r = NULL;
13293  __Pyx_RefNannyDeclarations
13294  PyObject *__pyx_t_1 = NULL;
13295  PyObject *__pyx_t_2 = NULL;
13296  __Pyx_RefNannySetupContext("complexifier", 0);
13297 
13298  /* "PyClical.pyx":1539
13299  * {-1}
13300  * """
13301  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13302  *
13303  * cpdef inline sqrt(obj, i = None):
13304  */
13305  __Pyx_XDECREF(__pyx_r);
13306  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L1_error)
13307  __Pyx_GOTREF(__pyx_t_1);
13308  __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_ERR(0, 1539, __pyx_L1_error)
13309  __Pyx_GOTREF(__pyx_t_2);
13310  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13311  __pyx_r = __pyx_t_2;
13312  __pyx_t_2 = 0;
13313  goto __pyx_L0;
13314 
13315  /* "PyClical.pyx":1526
13316  * return clifford(obj).outer_pow(m)
13317  *
13318  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13319  * """
13320  * Square root of -1 which commutes with all members of the frame of the given multivector.
13321  */
13322 
13323  /* function exit code */
13324  __pyx_L1_error:;
13325  __Pyx_XDECREF(__pyx_t_1);
13326  __Pyx_XDECREF(__pyx_t_2);
13327  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13328  __pyx_r = 0;
13329  __pyx_L0:;
13330  __Pyx_XGIVEREF(__pyx_r);
13331  __Pyx_RefNannyFinishContext();
13332  return __pyx_r;
13333  }
13334 
13335  /* Python wrapper */
13336  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13337  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 ";
13338  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13339  PyObject *__pyx_r = 0;
13340  __Pyx_RefNannyDeclarations
13341  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13342  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13343 
13344  /* function exit code */
13345  __Pyx_RefNannyFinishContext();
13346  return __pyx_r;
13347  }
13348 
13349  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13350  PyObject *__pyx_r = NULL;
13351  __Pyx_RefNannyDeclarations
13352  PyObject *__pyx_t_1 = NULL;
13353  __Pyx_RefNannySetupContext("complexifier", 0);
13354  __Pyx_XDECREF(__pyx_r);
13355  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error)
13356  __Pyx_GOTREF(__pyx_t_1);
13357  __pyx_r = __pyx_t_1;
13358  __pyx_t_1 = 0;
13359  goto __pyx_L0;
13360 
13361  /* function exit code */
13362  __pyx_L1_error:;
13363  __Pyx_XDECREF(__pyx_t_1);
13364  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13365  __pyx_r = NULL;
13366  __pyx_L0:;
13367  __Pyx_XGIVEREF(__pyx_r);
13368  __Pyx_RefNannyFinishContext();
13369  return __pyx_r;
13370  }
13371 
13372  /* "PyClical.pyx":1541
13373  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13374  *
13375  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13376  * """
13377  * Square root of multivector with optional complexifier.
13378  */
13379 
13380  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13381  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) {
13382  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13383  PyObject *__pyx_r = NULL;
13384  __Pyx_RefNannyDeclarations
13385  int __pyx_t_1;
13386  int __pyx_t_2;
13387  PyObject *__pyx_t_3 = NULL;
13388  Clifford __pyx_t_4;
13389  PyObject *__pyx_t_5 = NULL;
13390  PyObject *__pyx_t_6 = NULL;
13391  PyObject *__pyx_t_7 = NULL;
13392  PyObject *__pyx_t_8 = NULL;
13393  PyObject *__pyx_t_9 = NULL;
13394  PyObject *__pyx_t_10 = NULL;
13395  PyObject *__pyx_t_11 = NULL;
13396  __Pyx_RefNannySetupContext("sqrt", 0);
13397  if (__pyx_optional_args) {
13398  if (__pyx_optional_args->__pyx_n > 0) {
13399  __pyx_v_i = __pyx_optional_args->i;
13400  }
13401  }
13402 
13403  /* "PyClical.pyx":1556
13404  * -1
13405  * """
13406  * if not (i is None): # <<<<<<<<<<<<<<
13407  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13408  * else:
13409  */
13410  __pyx_t_1 = (__pyx_v_i != Py_None);
13411  __pyx_t_2 = (__pyx_t_1 != 0);
13412  if (__pyx_t_2) {
13413 
13414  /* "PyClical.pyx":1557
13415  * """
13416  * if not (i is None):
13417  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13418  * else:
13419  * try:
13420  */
13421  __Pyx_XDECREF(__pyx_r);
13422  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error)
13423  __Pyx_GOTREF(__pyx_t_3);
13424  try {
13425  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13426  } catch(...) {
13427  __Pyx_CppExn2PyErr();
13428  __PYX_ERR(0, 1557, __pyx_L1_error)
13429  }
13430  __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_ERR(0, 1557, __pyx_L1_error)
13431  __Pyx_GOTREF(__pyx_t_5);
13432  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13433  __pyx_r = __pyx_t_5;
13434  __pyx_t_5 = 0;
13435  goto __pyx_L0;
13436 
13437  /* "PyClical.pyx":1556
13438  * -1
13439  * """
13440  * if not (i is None): # <<<<<<<<<<<<<<
13441  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13442  * else:
13443  */
13444  }
13445 
13446  /* "PyClical.pyx":1559
13447  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13448  * else:
13449  * try: # <<<<<<<<<<<<<<
13450  * return math.sqrt(obj)
13451  * except:
13452  */
13453  /*else*/ {
13454  {
13455  __Pyx_PyThreadState_declare
13456  __Pyx_PyThreadState_assign
13457  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13458  __Pyx_XGOTREF(__pyx_t_6);
13459  __Pyx_XGOTREF(__pyx_t_7);
13460  __Pyx_XGOTREF(__pyx_t_8);
13461  /*try:*/ {
13462 
13463  /* "PyClical.pyx":1560
13464  * else:
13465  * try:
13466  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13467  * except:
13468  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13469  */
13470  __Pyx_XDECREF(__pyx_r);
13471  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L4_error)
13472  __Pyx_GOTREF(__pyx_t_3);
13473  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1560, __pyx_L4_error)
13474  __Pyx_GOTREF(__pyx_t_9);
13475  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13476  __pyx_t_3 = NULL;
13477  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13478  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13479  if (likely(__pyx_t_3)) {
13480  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13481  __Pyx_INCREF(__pyx_t_3);
13482  __Pyx_INCREF(function);
13483  __Pyx_DECREF_SET(__pyx_t_9, function);
13484  }
13485  }
13486  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
13487  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13488  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1560, __pyx_L4_error)
13489  __Pyx_GOTREF(__pyx_t_5);
13490  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13491  __pyx_r = __pyx_t_5;
13492  __pyx_t_5 = 0;
13493  goto __pyx_L8_try_return;
13494 
13495  /* "PyClical.pyx":1559
13496  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13497  * else:
13498  * try: # <<<<<<<<<<<<<<
13499  * return math.sqrt(obj)
13500  * except:
13501  */
13502  }
13503  __pyx_L4_error:;
13504  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13505  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13506  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13507 
13508  /* "PyClical.pyx":1561
13509  * try:
13510  * return math.sqrt(obj)
13511  * except: # <<<<<<<<<<<<<<
13512  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13513  *
13514  */
13515  /*except:*/ {
13516  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13517  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1561, __pyx_L6_except_error)
13518  __Pyx_GOTREF(__pyx_t_5);
13519  __Pyx_GOTREF(__pyx_t_9);
13520  __Pyx_GOTREF(__pyx_t_3);
13521 
13522  /* "PyClical.pyx":1562
13523  * return math.sqrt(obj)
13524  * except:
13525  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13526  *
13527  * cpdef inline exp(obj):
13528  */
13529  __Pyx_XDECREF(__pyx_r);
13530  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13531  __Pyx_GOTREF(__pyx_t_10);
13532  __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_ERR(0, 1562, __pyx_L6_except_error)
13533  __Pyx_GOTREF(__pyx_t_11);
13534  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13535  __pyx_r = __pyx_t_11;
13536  __pyx_t_11 = 0;
13537  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13538  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13539  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13540  goto __pyx_L7_except_return;
13541  }
13542  __pyx_L6_except_error:;
13543 
13544  /* "PyClical.pyx":1559
13545  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13546  * else:
13547  * try: # <<<<<<<<<<<<<<
13548  * return math.sqrt(obj)
13549  * except:
13550  */
13551  __Pyx_XGIVEREF(__pyx_t_6);
13552  __Pyx_XGIVEREF(__pyx_t_7);
13553  __Pyx_XGIVEREF(__pyx_t_8);
13554  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13555  goto __pyx_L1_error;
13556  __pyx_L8_try_return:;
13557  __Pyx_XGIVEREF(__pyx_t_6);
13558  __Pyx_XGIVEREF(__pyx_t_7);
13559  __Pyx_XGIVEREF(__pyx_t_8);
13560  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13561  goto __pyx_L0;
13562  __pyx_L7_except_return:;
13563  __Pyx_XGIVEREF(__pyx_t_6);
13564  __Pyx_XGIVEREF(__pyx_t_7);
13565  __Pyx_XGIVEREF(__pyx_t_8);
13566  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13567  goto __pyx_L0;
13568  }
13569  }
13570 
13571  /* "PyClical.pyx":1541
13572  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13573  *
13574  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13575  * """
13576  * Square root of multivector with optional complexifier.
13577  */
13578 
13579  /* function exit code */
13580  __pyx_L1_error:;
13581  __Pyx_XDECREF(__pyx_t_3);
13582  __Pyx_XDECREF(__pyx_t_5);
13583  __Pyx_XDECREF(__pyx_t_9);
13584  __Pyx_XDECREF(__pyx_t_10);
13585  __Pyx_XDECREF(__pyx_t_11);
13586  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13587  __pyx_r = 0;
13588  __pyx_L0:;
13589  __Pyx_XGIVEREF(__pyx_r);
13590  __Pyx_RefNannyFinishContext();
13591  return __pyx_r;
13592  }
13593 
13594  /* Python wrapper */
13595  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13596  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 ";
13597  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13598  PyObject *__pyx_v_obj = 0;
13599  PyObject *__pyx_v_i = 0;
13600  PyObject *__pyx_r = 0;
13601  __Pyx_RefNannyDeclarations
13602  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13603  {
13604  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13605  PyObject* values[2] = {0,0};
13606  values[1] = ((PyObject *)Py_None);
13607  if (unlikely(__pyx_kwds)) {
13608  Py_ssize_t kw_args;
13609  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13610  switch (pos_args) {
13611  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13612  CYTHON_FALLTHROUGH;
13613  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13614  CYTHON_FALLTHROUGH;
13615  case 0: break;
13616  default: goto __pyx_L5_argtuple_error;
13617  }
13618  kw_args = PyDict_Size(__pyx_kwds);
13619  switch (pos_args) {
13620  case 0:
13621  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13622  else goto __pyx_L5_argtuple_error;
13623  CYTHON_FALLTHROUGH;
13624  case 1:
13625  if (kw_args > 0) {
13626  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13627  if (value) { values[1] = value; kw_args--; }
13628  }
13629  }
13630  if (unlikely(kw_args > 0)) {
13631  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1541, __pyx_L3_error)
13632  }
13633  } else {
13634  switch (PyTuple_GET_SIZE(__pyx_args)) {
13635  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13636  CYTHON_FALLTHROUGH;
13637  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13638  break;
13639  default: goto __pyx_L5_argtuple_error;
13640  }
13641  }
13642  __pyx_v_obj = values[0];
13643  __pyx_v_i = values[1];
13644  }
13645  goto __pyx_L4_argument_unpacking_done;
13646  __pyx_L5_argtuple_error:;
13647  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1541, __pyx_L3_error)
13648  __pyx_L3_error:;
13649  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13650  __Pyx_RefNannyFinishContext();
13651  return NULL;
13652  __pyx_L4_argument_unpacking_done:;
13653  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13654 
13655  /* function exit code */
13656  __Pyx_RefNannyFinishContext();
13657  return __pyx_r;
13658  }
13659 
13660  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13661  PyObject *__pyx_r = NULL;
13662  __Pyx_RefNannyDeclarations
13663  PyObject *__pyx_t_1 = NULL;
13664  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13665  __Pyx_RefNannySetupContext("sqrt", 0);
13666  __Pyx_XDECREF(__pyx_r);
13667  __pyx_t_2.__pyx_n = 1;
13668  __pyx_t_2.i = __pyx_v_i;
13669  __pyx_t_1 = __pyx_f_8PyClical_sqrt(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
13670  __Pyx_GOTREF(__pyx_t_1);
13671  __pyx_r = __pyx_t_1;
13672  __pyx_t_1 = 0;
13673  goto __pyx_L0;
13674 
13675  /* function exit code */
13676  __pyx_L1_error:;
13677  __Pyx_XDECREF(__pyx_t_1);
13678  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13679  __pyx_r = NULL;
13680  __pyx_L0:;
13681  __Pyx_XGIVEREF(__pyx_r);
13682  __Pyx_RefNannyFinishContext();
13683  return __pyx_r;
13684  }
13685 
13686  /* "PyClical.pyx":1564
13687  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13688  *
13689  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13690  * """
13691  * Exponential of multivector.
13692  */
13693 
13694  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13695  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13696  PyObject *__pyx_r = NULL;
13697  __Pyx_RefNannyDeclarations
13698  PyObject *__pyx_t_1 = NULL;
13699  PyObject *__pyx_t_2 = NULL;
13700  PyObject *__pyx_t_3 = NULL;
13701  PyObject *__pyx_t_4 = NULL;
13702  PyObject *__pyx_t_5 = NULL;
13703  PyObject *__pyx_t_6 = NULL;
13704  PyObject *__pyx_t_7 = NULL;
13705  PyObject *__pyx_t_8 = NULL;
13706  __Pyx_RefNannySetupContext("exp", 0);
13707 
13708  /* "PyClical.pyx":1573
13709  * {1,2}
13710  * """
13711  * try: # <<<<<<<<<<<<<<
13712  * return math.exp(obj)
13713  * except:
13714  */
13715  {
13716  __Pyx_PyThreadState_declare
13717  __Pyx_PyThreadState_assign
13718  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13719  __Pyx_XGOTREF(__pyx_t_1);
13720  __Pyx_XGOTREF(__pyx_t_2);
13721  __Pyx_XGOTREF(__pyx_t_3);
13722  /*try:*/ {
13723 
13724  /* "PyClical.pyx":1574
13725  * """
13726  * try:
13727  * return math.exp(obj) # <<<<<<<<<<<<<<
13728  * except:
13729  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13730  */
13731  __Pyx_XDECREF(__pyx_r);
13732  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1574, __pyx_L3_error)
13733  __Pyx_GOTREF(__pyx_t_5);
13734  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1574, __pyx_L3_error)
13735  __Pyx_GOTREF(__pyx_t_6);
13736  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13737  __pyx_t_5 = NULL;
13738  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13739  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13740  if (likely(__pyx_t_5)) {
13741  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13742  __Pyx_INCREF(__pyx_t_5);
13743  __Pyx_INCREF(function);
13744  __Pyx_DECREF_SET(__pyx_t_6, function);
13745  }
13746  }
13747  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
13748  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13749  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1574, __pyx_L3_error)
13750  __Pyx_GOTREF(__pyx_t_4);
13751  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13752  __pyx_r = __pyx_t_4;
13753  __pyx_t_4 = 0;
13754  goto __pyx_L7_try_return;
13755 
13756  /* "PyClical.pyx":1573
13757  * {1,2}
13758  * """
13759  * try: # <<<<<<<<<<<<<<
13760  * return math.exp(obj)
13761  * except:
13762  */
13763  }
13764  __pyx_L3_error:;
13765  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13766  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13767  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13768 
13769  /* "PyClical.pyx":1575
13770  * try:
13771  * return math.exp(obj)
13772  * except: # <<<<<<<<<<<<<<
13773  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13774  *
13775  */
13776  /*except:*/ {
13777  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13778  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1575, __pyx_L5_except_error)
13779  __Pyx_GOTREF(__pyx_t_4);
13780  __Pyx_GOTREF(__pyx_t_6);
13781  __Pyx_GOTREF(__pyx_t_5);
13782 
13783  /* "PyClical.pyx":1576
13784  * return math.exp(obj)
13785  * except:
13786  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13787  *
13788  * cpdef inline log(obj,i = None):
13789  */
13790  __Pyx_XDECREF(__pyx_r);
13791  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13792  __Pyx_GOTREF(__pyx_t_7);
13793  __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_ERR(0, 1576, __pyx_L5_except_error)
13794  __Pyx_GOTREF(__pyx_t_8);
13795  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13796  __pyx_r = __pyx_t_8;
13797  __pyx_t_8 = 0;
13798  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13799  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13800  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13801  goto __pyx_L6_except_return;
13802  }
13803  __pyx_L5_except_error:;
13804 
13805  /* "PyClical.pyx":1573
13806  * {1,2}
13807  * """
13808  * try: # <<<<<<<<<<<<<<
13809  * return math.exp(obj)
13810  * except:
13811  */
13812  __Pyx_XGIVEREF(__pyx_t_1);
13813  __Pyx_XGIVEREF(__pyx_t_2);
13814  __Pyx_XGIVEREF(__pyx_t_3);
13815  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13816  goto __pyx_L1_error;
13817  __pyx_L7_try_return:;
13818  __Pyx_XGIVEREF(__pyx_t_1);
13819  __Pyx_XGIVEREF(__pyx_t_2);
13820  __Pyx_XGIVEREF(__pyx_t_3);
13821  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13822  goto __pyx_L0;
13823  __pyx_L6_except_return:;
13824  __Pyx_XGIVEREF(__pyx_t_1);
13825  __Pyx_XGIVEREF(__pyx_t_2);
13826  __Pyx_XGIVEREF(__pyx_t_3);
13827  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13828  goto __pyx_L0;
13829  }
13830 
13831  /* "PyClical.pyx":1564
13832  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13833  *
13834  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13835  * """
13836  * Exponential of multivector.
13837  */
13838 
13839  /* function exit code */
13840  __pyx_L1_error:;
13841  __Pyx_XDECREF(__pyx_t_4);
13842  __Pyx_XDECREF(__pyx_t_5);
13843  __Pyx_XDECREF(__pyx_t_6);
13844  __Pyx_XDECREF(__pyx_t_7);
13845  __Pyx_XDECREF(__pyx_t_8);
13846  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13847  __pyx_r = 0;
13848  __pyx_L0:;
13849  __Pyx_XGIVEREF(__pyx_r);
13850  __Pyx_RefNannyFinishContext();
13851  return __pyx_r;
13852  }
13853 
13854  /* Python wrapper */
13855  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13856  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 ";
13857  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13858  PyObject *__pyx_r = 0;
13859  __Pyx_RefNannyDeclarations
13860  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13861  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13862 
13863  /* function exit code */
13864  __Pyx_RefNannyFinishContext();
13865  return __pyx_r;
13866  }
13867 
13868  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13869  PyObject *__pyx_r = NULL;
13870  __Pyx_RefNannyDeclarations
13871  PyObject *__pyx_t_1 = NULL;
13872  __Pyx_RefNannySetupContext("exp", 0);
13873  __Pyx_XDECREF(__pyx_r);
13874  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error)
13875  __Pyx_GOTREF(__pyx_t_1);
13876  __pyx_r = __pyx_t_1;
13877  __pyx_t_1 = 0;
13878  goto __pyx_L0;
13879 
13880  /* function exit code */
13881  __pyx_L1_error:;
13882  __Pyx_XDECREF(__pyx_t_1);
13883  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13884  __pyx_r = NULL;
13885  __pyx_L0:;
13886  __Pyx_XGIVEREF(__pyx_r);
13887  __Pyx_RefNannyFinishContext();
13888  return __pyx_r;
13889  }
13890 
13891  /* "PyClical.pyx":1578
13892  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13893  *
13894  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13895  * """
13896  * Natural logarithm of multivector with optional complexifier.
13897  */
13898 
13899  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13900  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) {
13901  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13902  PyObject *__pyx_r = NULL;
13903  __Pyx_RefNannyDeclarations
13904  int __pyx_t_1;
13905  int __pyx_t_2;
13906  PyObject *__pyx_t_3 = NULL;
13907  Clifford __pyx_t_4;
13908  PyObject *__pyx_t_5 = NULL;
13909  PyObject *__pyx_t_6 = NULL;
13910  PyObject *__pyx_t_7 = NULL;
13911  PyObject *__pyx_t_8 = NULL;
13912  PyObject *__pyx_t_9 = NULL;
13913  PyObject *__pyx_t_10 = NULL;
13914  PyObject *__pyx_t_11 = NULL;
13915  __Pyx_RefNannySetupContext("log", 0);
13916  if (__pyx_optional_args) {
13917  if (__pyx_optional_args->__pyx_n > 0) {
13918  __pyx_v_i = __pyx_optional_args->i;
13919  }
13920  }
13921 
13922  /* "PyClical.pyx":1593
13923  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13924  * """
13925  * if not (i is None): # <<<<<<<<<<<<<<
13926  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13927  * else:
13928  */
13929  __pyx_t_1 = (__pyx_v_i != Py_None);
13930  __pyx_t_2 = (__pyx_t_1 != 0);
13931  if (__pyx_t_2) {
13932 
13933  /* "PyClical.pyx":1594
13934  * """
13935  * if not (i is None):
13936  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13937  * else:
13938  * try:
13939  */
13940  __Pyx_XDECREF(__pyx_r);
13941  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error)
13942  __Pyx_GOTREF(__pyx_t_3);
13943  try {
13944  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13945  } catch(...) {
13946  __Pyx_CppExn2PyErr();
13947  __PYX_ERR(0, 1594, __pyx_L1_error)
13948  }
13949  __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_ERR(0, 1594, __pyx_L1_error)
13950  __Pyx_GOTREF(__pyx_t_5);
13951  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13952  __pyx_r = __pyx_t_5;
13953  __pyx_t_5 = 0;
13954  goto __pyx_L0;
13955 
13956  /* "PyClical.pyx":1593
13957  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13958  * """
13959  * if not (i is None): # <<<<<<<<<<<<<<
13960  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13961  * else:
13962  */
13963  }
13964 
13965  /* "PyClical.pyx":1596
13966  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13967  * else:
13968  * try: # <<<<<<<<<<<<<<
13969  * return math.log(obj)
13970  * except:
13971  */
13972  /*else*/ {
13973  {
13974  __Pyx_PyThreadState_declare
13975  __Pyx_PyThreadState_assign
13976  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13977  __Pyx_XGOTREF(__pyx_t_6);
13978  __Pyx_XGOTREF(__pyx_t_7);
13979  __Pyx_XGOTREF(__pyx_t_8);
13980  /*try:*/ {
13981 
13982  /* "PyClical.pyx":1597
13983  * else:
13984  * try:
13985  * return math.log(obj) # <<<<<<<<<<<<<<
13986  * except:
13987  * return clifford().wrap( glucat.log(toClifford(obj)) )
13988  */
13989  __Pyx_XDECREF(__pyx_r);
13990  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L4_error)
13991  __Pyx_GOTREF(__pyx_t_3);
13992  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1597, __pyx_L4_error)
13993  __Pyx_GOTREF(__pyx_t_9);
13994  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13995  __pyx_t_3 = NULL;
13996  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13997  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13998  if (likely(__pyx_t_3)) {
13999  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14000  __Pyx_INCREF(__pyx_t_3);
14001  __Pyx_INCREF(function);
14002  __Pyx_DECREF_SET(__pyx_t_9, function);
14003  }
14004  }
14005  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
14006  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14007  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1597, __pyx_L4_error)
14008  __Pyx_GOTREF(__pyx_t_5);
14009  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14010  __pyx_r = __pyx_t_5;
14011  __pyx_t_5 = 0;
14012  goto __pyx_L8_try_return;
14013 
14014  /* "PyClical.pyx":1596
14015  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14016  * else:
14017  * try: # <<<<<<<<<<<<<<
14018  * return math.log(obj)
14019  * except:
14020  */
14021  }
14022  __pyx_L4_error:;
14023  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14024  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14025  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14026 
14027  /* "PyClical.pyx":1598
14028  * try:
14029  * return math.log(obj)
14030  * except: # <<<<<<<<<<<<<<
14031  * return clifford().wrap( glucat.log(toClifford(obj)) )
14032  *
14033  */
14034  /*except:*/ {
14035  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14036  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1598, __pyx_L6_except_error)
14037  __Pyx_GOTREF(__pyx_t_5);
14038  __Pyx_GOTREF(__pyx_t_9);
14039  __Pyx_GOTREF(__pyx_t_3);
14040 
14041  /* "PyClical.pyx":1599
14042  * return math.log(obj)
14043  * except:
14044  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
14045  *
14046  * cpdef inline cos(obj,i = None):
14047  */
14048  __Pyx_XDECREF(__pyx_r);
14049  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1599, __pyx_L6_except_error)
14050  __Pyx_GOTREF(__pyx_t_10);
14051  __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_ERR(0, 1599, __pyx_L6_except_error)
14052  __Pyx_GOTREF(__pyx_t_11);
14053  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14054  __pyx_r = __pyx_t_11;
14055  __pyx_t_11 = 0;
14056  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14057  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14058  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14059  goto __pyx_L7_except_return;
14060  }
14061  __pyx_L6_except_error:;
14062 
14063  /* "PyClical.pyx":1596
14064  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14065  * else:
14066  * try: # <<<<<<<<<<<<<<
14067  * return math.log(obj)
14068  * except:
14069  */
14070  __Pyx_XGIVEREF(__pyx_t_6);
14071  __Pyx_XGIVEREF(__pyx_t_7);
14072  __Pyx_XGIVEREF(__pyx_t_8);
14073  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14074  goto __pyx_L1_error;
14075  __pyx_L8_try_return:;
14076  __Pyx_XGIVEREF(__pyx_t_6);
14077  __Pyx_XGIVEREF(__pyx_t_7);
14078  __Pyx_XGIVEREF(__pyx_t_8);
14079  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14080  goto __pyx_L0;
14081  __pyx_L7_except_return:;
14082  __Pyx_XGIVEREF(__pyx_t_6);
14083  __Pyx_XGIVEREF(__pyx_t_7);
14084  __Pyx_XGIVEREF(__pyx_t_8);
14085  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14086  goto __pyx_L0;
14087  }
14088  }
14089 
14090  /* "PyClical.pyx":1578
14091  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14092  *
14093  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
14094  * """
14095  * Natural logarithm of multivector with optional complexifier.
14096  */
14097 
14098  /* function exit code */
14099  __pyx_L1_error:;
14100  __Pyx_XDECREF(__pyx_t_3);
14101  __Pyx_XDECREF(__pyx_t_5);
14102  __Pyx_XDECREF(__pyx_t_9);
14103  __Pyx_XDECREF(__pyx_t_10);
14104  __Pyx_XDECREF(__pyx_t_11);
14105  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14106  __pyx_r = 0;
14107  __pyx_L0:;
14108  __Pyx_XGIVEREF(__pyx_r);
14109  __Pyx_RefNannyFinishContext();
14110  return __pyx_r;
14111  }
14112 
14113  /* Python wrapper */
14114  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14115  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 ";
14116  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14117  PyObject *__pyx_v_obj = 0;
14118  PyObject *__pyx_v_i = 0;
14119  PyObject *__pyx_r = 0;
14120  __Pyx_RefNannyDeclarations
14121  __Pyx_RefNannySetupContext("log (wrapper)", 0);
14122  {
14123  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14124  PyObject* values[2] = {0,0};
14125  values[1] = ((PyObject *)Py_None);
14126  if (unlikely(__pyx_kwds)) {
14127  Py_ssize_t kw_args;
14128  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14129  switch (pos_args) {
14130  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14131  CYTHON_FALLTHROUGH;
14132  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14133  CYTHON_FALLTHROUGH;
14134  case 0: break;
14135  default: goto __pyx_L5_argtuple_error;
14136  }
14137  kw_args = PyDict_Size(__pyx_kwds);
14138  switch (pos_args) {
14139  case 0:
14140  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14141  else goto __pyx_L5_argtuple_error;
14142  CYTHON_FALLTHROUGH;
14143  case 1:
14144  if (kw_args > 0) {
14145  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14146  if (value) { values[1] = value; kw_args--; }
14147  }
14148  }
14149  if (unlikely(kw_args > 0)) {
14150  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1578, __pyx_L3_error)
14151  }
14152  } else {
14153  switch (PyTuple_GET_SIZE(__pyx_args)) {
14154  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14155  CYTHON_FALLTHROUGH;
14156  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14157  break;
14158  default: goto __pyx_L5_argtuple_error;
14159  }
14160  }
14161  __pyx_v_obj = values[0];
14162  __pyx_v_i = values[1];
14163  }
14164  goto __pyx_L4_argument_unpacking_done;
14165  __pyx_L5_argtuple_error:;
14166  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1578, __pyx_L3_error)
14167  __pyx_L3_error:;
14168  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14169  __Pyx_RefNannyFinishContext();
14170  return NULL;
14171  __pyx_L4_argument_unpacking_done:;
14172  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
14173 
14174  /* function exit code */
14175  __Pyx_RefNannyFinishContext();
14176  return __pyx_r;
14177  }
14178 
14179  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14180  PyObject *__pyx_r = NULL;
14181  __Pyx_RefNannyDeclarations
14182  PyObject *__pyx_t_1 = NULL;
14183  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
14184  __Pyx_RefNannySetupContext("log", 0);
14185  __Pyx_XDECREF(__pyx_r);
14186  __pyx_t_2.__pyx_n = 1;
14187  __pyx_t_2.i = __pyx_v_i;
14188  __pyx_t_1 = __pyx_f_8PyClical_log(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error)
14189  __Pyx_GOTREF(__pyx_t_1);
14190  __pyx_r = __pyx_t_1;
14191  __pyx_t_1 = 0;
14192  goto __pyx_L0;
14193 
14194  /* function exit code */
14195  __pyx_L1_error:;
14196  __Pyx_XDECREF(__pyx_t_1);
14197  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14198  __pyx_r = NULL;
14199  __pyx_L0:;
14200  __Pyx_XGIVEREF(__pyx_r);
14201  __Pyx_RefNannyFinishContext();
14202  return __pyx_r;
14203  }
14204 
14205  /* "PyClical.pyx":1601
14206  * return clifford().wrap( glucat.log(toClifford(obj)) )
14207  *
14208  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14209  * """
14210  * Cosine of multivector with optional complexifier.
14211  */
14212 
14213  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14214  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) {
14215  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14216  PyObject *__pyx_r = NULL;
14217  __Pyx_RefNannyDeclarations
14218  int __pyx_t_1;
14219  int __pyx_t_2;
14220  PyObject *__pyx_t_3 = NULL;
14221  Clifford __pyx_t_4;
14222  PyObject *__pyx_t_5 = NULL;
14223  PyObject *__pyx_t_6 = NULL;
14224  PyObject *__pyx_t_7 = NULL;
14225  PyObject *__pyx_t_8 = NULL;
14226  PyObject *__pyx_t_9 = NULL;
14227  PyObject *__pyx_t_10 = NULL;
14228  PyObject *__pyx_t_11 = NULL;
14229  __Pyx_RefNannySetupContext("cos", 0);
14230  if (__pyx_optional_args) {
14231  if (__pyx_optional_args->__pyx_n > 0) {
14232  __pyx_v_i = __pyx_optional_args->i;
14233  }
14234  }
14235 
14236  /* "PyClical.pyx":1610
14237  * {1,2}
14238  * """
14239  * if not (i is None): # <<<<<<<<<<<<<<
14240  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14241  * else:
14242  */
14243  __pyx_t_1 = (__pyx_v_i != Py_None);
14244  __pyx_t_2 = (__pyx_t_1 != 0);
14245  if (__pyx_t_2) {
14246 
14247  /* "PyClical.pyx":1611
14248  * """
14249  * if not (i is None):
14250  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14251  * else:
14252  * try:
14253  */
14254  __Pyx_XDECREF(__pyx_r);
14255  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1611, __pyx_L1_error)
14256  __Pyx_GOTREF(__pyx_t_3);
14257  try {
14258  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14259  } catch(...) {
14260  __Pyx_CppExn2PyErr();
14261  __PYX_ERR(0, 1611, __pyx_L1_error)
14262  }
14263  __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_ERR(0, 1611, __pyx_L1_error)
14264  __Pyx_GOTREF(__pyx_t_5);
14265  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14266  __pyx_r = __pyx_t_5;
14267  __pyx_t_5 = 0;
14268  goto __pyx_L0;
14269 
14270  /* "PyClical.pyx":1610
14271  * {1,2}
14272  * """
14273  * if not (i is None): # <<<<<<<<<<<<<<
14274  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14275  * else:
14276  */
14277  }
14278 
14279  /* "PyClical.pyx":1613
14280  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14281  * else:
14282  * try: # <<<<<<<<<<<<<<
14283  * return math.cos(obj)
14284  * except:
14285  */
14286  /*else*/ {
14287  {
14288  __Pyx_PyThreadState_declare
14289  __Pyx_PyThreadState_assign
14290  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14291  __Pyx_XGOTREF(__pyx_t_6);
14292  __Pyx_XGOTREF(__pyx_t_7);
14293  __Pyx_XGOTREF(__pyx_t_8);
14294  /*try:*/ {
14295 
14296  /* "PyClical.pyx":1614
14297  * else:
14298  * try:
14299  * return math.cos(obj) # <<<<<<<<<<<<<<
14300  * except:
14301  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14302  */
14303  __Pyx_XDECREF(__pyx_r);
14304  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1614, __pyx_L4_error)
14305  __Pyx_GOTREF(__pyx_t_3);
14306  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1614, __pyx_L4_error)
14307  __Pyx_GOTREF(__pyx_t_9);
14308  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14309  __pyx_t_3 = NULL;
14310  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14311  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14312  if (likely(__pyx_t_3)) {
14313  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14314  __Pyx_INCREF(__pyx_t_3);
14315  __Pyx_INCREF(function);
14316  __Pyx_DECREF_SET(__pyx_t_9, function);
14317  }
14318  }
14319  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
14320  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14321  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1614, __pyx_L4_error)
14322  __Pyx_GOTREF(__pyx_t_5);
14323  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14324  __pyx_r = __pyx_t_5;
14325  __pyx_t_5 = 0;
14326  goto __pyx_L8_try_return;
14327 
14328  /* "PyClical.pyx":1613
14329  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14330  * else:
14331  * try: # <<<<<<<<<<<<<<
14332  * return math.cos(obj)
14333  * except:
14334  */
14335  }
14336  __pyx_L4_error:;
14337  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14338  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14339  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14340 
14341  /* "PyClical.pyx":1615
14342  * try:
14343  * return math.cos(obj)
14344  * except: # <<<<<<<<<<<<<<
14345  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14346  *
14347  */
14348  /*except:*/ {
14349  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14350  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1615, __pyx_L6_except_error)
14351  __Pyx_GOTREF(__pyx_t_5);
14352  __Pyx_GOTREF(__pyx_t_9);
14353  __Pyx_GOTREF(__pyx_t_3);
14354 
14355  /* "PyClical.pyx":1616
14356  * return math.cos(obj)
14357  * except:
14358  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14359  *
14360  * cpdef inline acos(obj,i = None):
14361  */
14362  __Pyx_XDECREF(__pyx_r);
14363  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14364  __Pyx_GOTREF(__pyx_t_10);
14365  __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_ERR(0, 1616, __pyx_L6_except_error)
14366  __Pyx_GOTREF(__pyx_t_11);
14367  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14368  __pyx_r = __pyx_t_11;
14369  __pyx_t_11 = 0;
14370  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14371  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14372  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14373  goto __pyx_L7_except_return;
14374  }
14375  __pyx_L6_except_error:;
14376 
14377  /* "PyClical.pyx":1613
14378  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14379  * else:
14380  * try: # <<<<<<<<<<<<<<
14381  * return math.cos(obj)
14382  * except:
14383  */
14384  __Pyx_XGIVEREF(__pyx_t_6);
14385  __Pyx_XGIVEREF(__pyx_t_7);
14386  __Pyx_XGIVEREF(__pyx_t_8);
14387  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14388  goto __pyx_L1_error;
14389  __pyx_L8_try_return:;
14390  __Pyx_XGIVEREF(__pyx_t_6);
14391  __Pyx_XGIVEREF(__pyx_t_7);
14392  __Pyx_XGIVEREF(__pyx_t_8);
14393  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14394  goto __pyx_L0;
14395  __pyx_L7_except_return:;
14396  __Pyx_XGIVEREF(__pyx_t_6);
14397  __Pyx_XGIVEREF(__pyx_t_7);
14398  __Pyx_XGIVEREF(__pyx_t_8);
14399  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14400  goto __pyx_L0;
14401  }
14402  }
14403 
14404  /* "PyClical.pyx":1601
14405  * return clifford().wrap( glucat.log(toClifford(obj)) )
14406  *
14407  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14408  * """
14409  * Cosine of multivector with optional complexifier.
14410  */
14411 
14412  /* function exit code */
14413  __pyx_L1_error:;
14414  __Pyx_XDECREF(__pyx_t_3);
14415  __Pyx_XDECREF(__pyx_t_5);
14416  __Pyx_XDECREF(__pyx_t_9);
14417  __Pyx_XDECREF(__pyx_t_10);
14418  __Pyx_XDECREF(__pyx_t_11);
14419  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14420  __pyx_r = 0;
14421  __pyx_L0:;
14422  __Pyx_XGIVEREF(__pyx_r);
14423  __Pyx_RefNannyFinishContext();
14424  return __pyx_r;
14425  }
14426 
14427  /* Python wrapper */
14428  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14429  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 ";
14430  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14431  PyObject *__pyx_v_obj = 0;
14432  PyObject *__pyx_v_i = 0;
14433  PyObject *__pyx_r = 0;
14434  __Pyx_RefNannyDeclarations
14435  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14436  {
14437  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14438  PyObject* values[2] = {0,0};
14439  values[1] = ((PyObject *)Py_None);
14440  if (unlikely(__pyx_kwds)) {
14441  Py_ssize_t kw_args;
14442  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14443  switch (pos_args) {
14444  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14445  CYTHON_FALLTHROUGH;
14446  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14447  CYTHON_FALLTHROUGH;
14448  case 0: break;
14449  default: goto __pyx_L5_argtuple_error;
14450  }
14451  kw_args = PyDict_Size(__pyx_kwds);
14452  switch (pos_args) {
14453  case 0:
14454  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14455  else goto __pyx_L5_argtuple_error;
14456  CYTHON_FALLTHROUGH;
14457  case 1:
14458  if (kw_args > 0) {
14459  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14460  if (value) { values[1] = value; kw_args--; }
14461  }
14462  }
14463  if (unlikely(kw_args > 0)) {
14464  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1601, __pyx_L3_error)
14465  }
14466  } else {
14467  switch (PyTuple_GET_SIZE(__pyx_args)) {
14468  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14469  CYTHON_FALLTHROUGH;
14470  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14471  break;
14472  default: goto __pyx_L5_argtuple_error;
14473  }
14474  }
14475  __pyx_v_obj = values[0];
14476  __pyx_v_i = values[1];
14477  }
14478  goto __pyx_L4_argument_unpacking_done;
14479  __pyx_L5_argtuple_error:;
14480  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1601, __pyx_L3_error)
14481  __pyx_L3_error:;
14482  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14483  __Pyx_RefNannyFinishContext();
14484  return NULL;
14485  __pyx_L4_argument_unpacking_done:;
14486  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14487 
14488  /* function exit code */
14489  __Pyx_RefNannyFinishContext();
14490  return __pyx_r;
14491  }
14492 
14493  static PyObject *__pyx_pf_8PyClical_50cos(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_cos __pyx_t_2;
14498  __Pyx_RefNannySetupContext("cos", 0);
14499  __Pyx_XDECREF(__pyx_r);
14500  __pyx_t_2.__pyx_n = 1;
14501  __pyx_t_2.i = __pyx_v_i;
14502  __pyx_t_1 = __pyx_f_8PyClical_cos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __pyx_L1_error)
14503  __Pyx_GOTREF(__pyx_t_1);
14504  __pyx_r = __pyx_t_1;
14505  __pyx_t_1 = 0;
14506  goto __pyx_L0;
14507 
14508  /* function exit code */
14509  __pyx_L1_error:;
14510  __Pyx_XDECREF(__pyx_t_1);
14511  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14512  __pyx_r = NULL;
14513  __pyx_L0:;
14514  __Pyx_XGIVEREF(__pyx_r);
14515  __Pyx_RefNannyFinishContext();
14516  return __pyx_r;
14517  }
14518 
14519  /* "PyClical.pyx":1618
14520  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14521  *
14522  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14523  * """
14524  * Inverse cosine of multivector with optional complexifier.
14525  */
14526 
14527  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14528  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) {
14529  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14530  PyObject *__pyx_r = NULL;
14531  __Pyx_RefNannyDeclarations
14532  int __pyx_t_1;
14533  int __pyx_t_2;
14534  PyObject *__pyx_t_3 = NULL;
14535  Clifford __pyx_t_4;
14536  PyObject *__pyx_t_5 = NULL;
14537  PyObject *__pyx_t_6 = NULL;
14538  PyObject *__pyx_t_7 = NULL;
14539  PyObject *__pyx_t_8 = NULL;
14540  PyObject *__pyx_t_9 = NULL;
14541  PyObject *__pyx_t_10 = NULL;
14542  PyObject *__pyx_t_11 = NULL;
14543  __Pyx_RefNannySetupContext("acos", 0);
14544  if (__pyx_optional_args) {
14545  if (__pyx_optional_args->__pyx_n > 0) {
14546  __pyx_v_i = __pyx_optional_args->i;
14547  }
14548  }
14549 
14550  /* "PyClical.pyx":1631
14551  * {1,2}
14552  * """
14553  * if not (i is None): # <<<<<<<<<<<<<<
14554  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14555  * else:
14556  */
14557  __pyx_t_1 = (__pyx_v_i != Py_None);
14558  __pyx_t_2 = (__pyx_t_1 != 0);
14559  if (__pyx_t_2) {
14560 
14561  /* "PyClical.pyx":1632
14562  * """
14563  * if not (i is None):
14564  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14565  * else:
14566  * try:
14567  */
14568  __Pyx_XDECREF(__pyx_r);
14569  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error)
14570  __Pyx_GOTREF(__pyx_t_3);
14571  try {
14572  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14573  } catch(...) {
14574  __Pyx_CppExn2PyErr();
14575  __PYX_ERR(0, 1632, __pyx_L1_error)
14576  }
14577  __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_ERR(0, 1632, __pyx_L1_error)
14578  __Pyx_GOTREF(__pyx_t_5);
14579  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14580  __pyx_r = __pyx_t_5;
14581  __pyx_t_5 = 0;
14582  goto __pyx_L0;
14583 
14584  /* "PyClical.pyx":1631
14585  * {1,2}
14586  * """
14587  * if not (i is None): # <<<<<<<<<<<<<<
14588  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14589  * else:
14590  */
14591  }
14592 
14593  /* "PyClical.pyx":1634
14594  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14595  * else:
14596  * try: # <<<<<<<<<<<<<<
14597  * return math.acos(obj)
14598  * except:
14599  */
14600  /*else*/ {
14601  {
14602  __Pyx_PyThreadState_declare
14603  __Pyx_PyThreadState_assign
14604  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14605  __Pyx_XGOTREF(__pyx_t_6);
14606  __Pyx_XGOTREF(__pyx_t_7);
14607  __Pyx_XGOTREF(__pyx_t_8);
14608  /*try:*/ {
14609 
14610  /* "PyClical.pyx":1635
14611  * else:
14612  * try:
14613  * return math.acos(obj) # <<<<<<<<<<<<<<
14614  * except:
14615  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14616  */
14617  __Pyx_XDECREF(__pyx_r);
14618  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L4_error)
14619  __Pyx_GOTREF(__pyx_t_3);
14620  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1635, __pyx_L4_error)
14621  __Pyx_GOTREF(__pyx_t_9);
14622  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14623  __pyx_t_3 = NULL;
14624  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14625  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14626  if (likely(__pyx_t_3)) {
14627  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14628  __Pyx_INCREF(__pyx_t_3);
14629  __Pyx_INCREF(function);
14630  __Pyx_DECREF_SET(__pyx_t_9, function);
14631  }
14632  }
14633  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
14634  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14635  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1635, __pyx_L4_error)
14636  __Pyx_GOTREF(__pyx_t_5);
14637  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14638  __pyx_r = __pyx_t_5;
14639  __pyx_t_5 = 0;
14640  goto __pyx_L8_try_return;
14641 
14642  /* "PyClical.pyx":1634
14643  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14644  * else:
14645  * try: # <<<<<<<<<<<<<<
14646  * return math.acos(obj)
14647  * except:
14648  */
14649  }
14650  __pyx_L4_error:;
14651  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14652  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14653  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14654 
14655  /* "PyClical.pyx":1636
14656  * try:
14657  * return math.acos(obj)
14658  * except: # <<<<<<<<<<<<<<
14659  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14660  *
14661  */
14662  /*except:*/ {
14663  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14664  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1636, __pyx_L6_except_error)
14665  __Pyx_GOTREF(__pyx_t_5);
14666  __Pyx_GOTREF(__pyx_t_9);
14667  __Pyx_GOTREF(__pyx_t_3);
14668 
14669  /* "PyClical.pyx":1637
14670  * return math.acos(obj)
14671  * except:
14672  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14673  *
14674  * cpdef inline cosh(obj):
14675  */
14676  __Pyx_XDECREF(__pyx_r);
14677  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14678  __Pyx_GOTREF(__pyx_t_10);
14679  __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_ERR(0, 1637, __pyx_L6_except_error)
14680  __Pyx_GOTREF(__pyx_t_11);
14681  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14682  __pyx_r = __pyx_t_11;
14683  __pyx_t_11 = 0;
14684  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14685  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14686  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14687  goto __pyx_L7_except_return;
14688  }
14689  __pyx_L6_except_error:;
14690 
14691  /* "PyClical.pyx":1634
14692  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14693  * else:
14694  * try: # <<<<<<<<<<<<<<
14695  * return math.acos(obj)
14696  * except:
14697  */
14698  __Pyx_XGIVEREF(__pyx_t_6);
14699  __Pyx_XGIVEREF(__pyx_t_7);
14700  __Pyx_XGIVEREF(__pyx_t_8);
14701  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14702  goto __pyx_L1_error;
14703  __pyx_L8_try_return:;
14704  __Pyx_XGIVEREF(__pyx_t_6);
14705  __Pyx_XGIVEREF(__pyx_t_7);
14706  __Pyx_XGIVEREF(__pyx_t_8);
14707  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14708  goto __pyx_L0;
14709  __pyx_L7_except_return:;
14710  __Pyx_XGIVEREF(__pyx_t_6);
14711  __Pyx_XGIVEREF(__pyx_t_7);
14712  __Pyx_XGIVEREF(__pyx_t_8);
14713  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14714  goto __pyx_L0;
14715  }
14716  }
14717 
14718  /* "PyClical.pyx":1618
14719  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14720  *
14721  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14722  * """
14723  * Inverse cosine of multivector with optional complexifier.
14724  */
14725 
14726  /* function exit code */
14727  __pyx_L1_error:;
14728  __Pyx_XDECREF(__pyx_t_3);
14729  __Pyx_XDECREF(__pyx_t_5);
14730  __Pyx_XDECREF(__pyx_t_9);
14731  __Pyx_XDECREF(__pyx_t_10);
14732  __Pyx_XDECREF(__pyx_t_11);
14733  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14734  __pyx_r = 0;
14735  __pyx_L0:;
14736  __Pyx_XGIVEREF(__pyx_r);
14737  __Pyx_RefNannyFinishContext();
14738  return __pyx_r;
14739  }
14740 
14741  /* Python wrapper */
14742  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14743  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 ";
14744  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14745  PyObject *__pyx_v_obj = 0;
14746  PyObject *__pyx_v_i = 0;
14747  PyObject *__pyx_r = 0;
14748  __Pyx_RefNannyDeclarations
14749  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14750  {
14751  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14752  PyObject* values[2] = {0,0};
14753  values[1] = ((PyObject *)Py_None);
14754  if (unlikely(__pyx_kwds)) {
14755  Py_ssize_t kw_args;
14756  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14757  switch (pos_args) {
14758  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14759  CYTHON_FALLTHROUGH;
14760  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14761  CYTHON_FALLTHROUGH;
14762  case 0: break;
14763  default: goto __pyx_L5_argtuple_error;
14764  }
14765  kw_args = PyDict_Size(__pyx_kwds);
14766  switch (pos_args) {
14767  case 0:
14768  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14769  else goto __pyx_L5_argtuple_error;
14770  CYTHON_FALLTHROUGH;
14771  case 1:
14772  if (kw_args > 0) {
14773  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14774  if (value) { values[1] = value; kw_args--; }
14775  }
14776  }
14777  if (unlikely(kw_args > 0)) {
14778  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1618, __pyx_L3_error)
14779  }
14780  } else {
14781  switch (PyTuple_GET_SIZE(__pyx_args)) {
14782  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14783  CYTHON_FALLTHROUGH;
14784  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14785  break;
14786  default: goto __pyx_L5_argtuple_error;
14787  }
14788  }
14789  __pyx_v_obj = values[0];
14790  __pyx_v_i = values[1];
14791  }
14792  goto __pyx_L4_argument_unpacking_done;
14793  __pyx_L5_argtuple_error:;
14794  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1618, __pyx_L3_error)
14795  __pyx_L3_error:;
14796  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14797  __Pyx_RefNannyFinishContext();
14798  return NULL;
14799  __pyx_L4_argument_unpacking_done:;
14800  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14801 
14802  /* function exit code */
14803  __Pyx_RefNannyFinishContext();
14804  return __pyx_r;
14805  }
14806 
14807  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14808  PyObject *__pyx_r = NULL;
14809  __Pyx_RefNannyDeclarations
14810  PyObject *__pyx_t_1 = NULL;
14811  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14812  __Pyx_RefNannySetupContext("acos", 0);
14813  __Pyx_XDECREF(__pyx_r);
14814  __pyx_t_2.__pyx_n = 1;
14815  __pyx_t_2.i = __pyx_v_i;
14816  __pyx_t_1 = __pyx_f_8PyClical_acos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
14817  __Pyx_GOTREF(__pyx_t_1);
14818  __pyx_r = __pyx_t_1;
14819  __pyx_t_1 = 0;
14820  goto __pyx_L0;
14821 
14822  /* function exit code */
14823  __pyx_L1_error:;
14824  __Pyx_XDECREF(__pyx_t_1);
14825  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14826  __pyx_r = NULL;
14827  __pyx_L0:;
14828  __Pyx_XGIVEREF(__pyx_r);
14829  __Pyx_RefNannyFinishContext();
14830  return __pyx_r;
14831  }
14832 
14833  /* "PyClical.pyx":1639
14834  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14835  *
14836  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14837  * """
14838  * Hyperbolic cosine of multivector.
14839  */
14840 
14841  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14842  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14843  PyObject *__pyx_r = NULL;
14844  __Pyx_RefNannyDeclarations
14845  PyObject *__pyx_t_1 = NULL;
14846  PyObject *__pyx_t_2 = NULL;
14847  PyObject *__pyx_t_3 = NULL;
14848  PyObject *__pyx_t_4 = NULL;
14849  PyObject *__pyx_t_5 = NULL;
14850  PyObject *__pyx_t_6 = NULL;
14851  PyObject *__pyx_t_7 = NULL;
14852  PyObject *__pyx_t_8 = NULL;
14853  __Pyx_RefNannySetupContext("cosh", 0);
14854 
14855  /* "PyClical.pyx":1650
14856  * {1,2}
14857  * """
14858  * try: # <<<<<<<<<<<<<<
14859  * return math.cosh(obj)
14860  * except:
14861  */
14862  {
14863  __Pyx_PyThreadState_declare
14864  __Pyx_PyThreadState_assign
14865  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14866  __Pyx_XGOTREF(__pyx_t_1);
14867  __Pyx_XGOTREF(__pyx_t_2);
14868  __Pyx_XGOTREF(__pyx_t_3);
14869  /*try:*/ {
14870 
14871  /* "PyClical.pyx":1651
14872  * """
14873  * try:
14874  * return math.cosh(obj) # <<<<<<<<<<<<<<
14875  * except:
14876  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14877  */
14878  __Pyx_XDECREF(__pyx_r);
14879  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1651, __pyx_L3_error)
14880  __Pyx_GOTREF(__pyx_t_5);
14881  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cosh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1651, __pyx_L3_error)
14882  __Pyx_GOTREF(__pyx_t_6);
14883  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14884  __pyx_t_5 = NULL;
14885  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14886  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14887  if (likely(__pyx_t_5)) {
14888  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14889  __Pyx_INCREF(__pyx_t_5);
14890  __Pyx_INCREF(function);
14891  __Pyx_DECREF_SET(__pyx_t_6, function);
14892  }
14893  }
14894  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
14895  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14896  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L3_error)
14897  __Pyx_GOTREF(__pyx_t_4);
14898  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14899  __pyx_r = __pyx_t_4;
14900  __pyx_t_4 = 0;
14901  goto __pyx_L7_try_return;
14902 
14903  /* "PyClical.pyx":1650
14904  * {1,2}
14905  * """
14906  * try: # <<<<<<<<<<<<<<
14907  * return math.cosh(obj)
14908  * except:
14909  */
14910  }
14911  __pyx_L3_error:;
14912  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14913  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14914  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14915 
14916  /* "PyClical.pyx":1652
14917  * try:
14918  * return math.cosh(obj)
14919  * except: # <<<<<<<<<<<<<<
14920  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14921  *
14922  */
14923  /*except:*/ {
14924  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14925  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1652, __pyx_L5_except_error)
14926  __Pyx_GOTREF(__pyx_t_4);
14927  __Pyx_GOTREF(__pyx_t_6);
14928  __Pyx_GOTREF(__pyx_t_5);
14929 
14930  /* "PyClical.pyx":1653
14931  * return math.cosh(obj)
14932  * except:
14933  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14934  *
14935  * cpdef inline acosh(obj,i = None):
14936  */
14937  __Pyx_XDECREF(__pyx_r);
14938  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1653, __pyx_L5_except_error)
14939  __Pyx_GOTREF(__pyx_t_7);
14940  __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_ERR(0, 1653, __pyx_L5_except_error)
14941  __Pyx_GOTREF(__pyx_t_8);
14942  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14943  __pyx_r = __pyx_t_8;
14944  __pyx_t_8 = 0;
14945  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14946  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14947  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14948  goto __pyx_L6_except_return;
14949  }
14950  __pyx_L5_except_error:;
14951 
14952  /* "PyClical.pyx":1650
14953  * {1,2}
14954  * """
14955  * try: # <<<<<<<<<<<<<<
14956  * return math.cosh(obj)
14957  * except:
14958  */
14959  __Pyx_XGIVEREF(__pyx_t_1);
14960  __Pyx_XGIVEREF(__pyx_t_2);
14961  __Pyx_XGIVEREF(__pyx_t_3);
14962  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14963  goto __pyx_L1_error;
14964  __pyx_L7_try_return:;
14965  __Pyx_XGIVEREF(__pyx_t_1);
14966  __Pyx_XGIVEREF(__pyx_t_2);
14967  __Pyx_XGIVEREF(__pyx_t_3);
14968  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14969  goto __pyx_L0;
14970  __pyx_L6_except_return:;
14971  __Pyx_XGIVEREF(__pyx_t_1);
14972  __Pyx_XGIVEREF(__pyx_t_2);
14973  __Pyx_XGIVEREF(__pyx_t_3);
14974  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14975  goto __pyx_L0;
14976  }
14977 
14978  /* "PyClical.pyx":1639
14979  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14980  *
14981  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14982  * """
14983  * Hyperbolic cosine of multivector.
14984  */
14985 
14986  /* function exit code */
14987  __pyx_L1_error:;
14988  __Pyx_XDECREF(__pyx_t_4);
14989  __Pyx_XDECREF(__pyx_t_5);
14990  __Pyx_XDECREF(__pyx_t_6);
14991  __Pyx_XDECREF(__pyx_t_7);
14992  __Pyx_XDECREF(__pyx_t_8);
14993  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14994  __pyx_r = 0;
14995  __pyx_L0:;
14996  __Pyx_XGIVEREF(__pyx_r);
14997  __Pyx_RefNannyFinishContext();
14998  return __pyx_r;
14999  }
15000 
15001  /* Python wrapper */
15002  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15003  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 ";
15004  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15005  PyObject *__pyx_r = 0;
15006  __Pyx_RefNannyDeclarations
15007  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
15008  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
15009 
15010  /* function exit code */
15011  __Pyx_RefNannyFinishContext();
15012  return __pyx_r;
15013  }
15014 
15015  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15016  PyObject *__pyx_r = NULL;
15017  __Pyx_RefNannyDeclarations
15018  PyObject *__pyx_t_1 = NULL;
15019  __Pyx_RefNannySetupContext("cosh", 0);
15020  __Pyx_XDECREF(__pyx_r);
15021  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error)
15022  __Pyx_GOTREF(__pyx_t_1);
15023  __pyx_r = __pyx_t_1;
15024  __pyx_t_1 = 0;
15025  goto __pyx_L0;
15026 
15027  /* function exit code */
15028  __pyx_L1_error:;
15029  __Pyx_XDECREF(__pyx_t_1);
15030  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15031  __pyx_r = NULL;
15032  __pyx_L0:;
15033  __Pyx_XGIVEREF(__pyx_r);
15034  __Pyx_RefNannyFinishContext();
15035  return __pyx_r;
15036  }
15037 
15038  /* "PyClical.pyx":1655
15039  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15040  *
15041  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15042  * """
15043  * Inverse hyperbolic cosine of multivector with optional complexifier.
15044  */
15045 
15046  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15047  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) {
15048  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15049  PyObject *__pyx_r = NULL;
15050  __Pyx_RefNannyDeclarations
15051  int __pyx_t_1;
15052  int __pyx_t_2;
15053  PyObject *__pyx_t_3 = NULL;
15054  Clifford __pyx_t_4;
15055  PyObject *__pyx_t_5 = NULL;
15056  PyObject *__pyx_t_6 = NULL;
15057  PyObject *__pyx_t_7 = NULL;
15058  PyObject *__pyx_t_8 = NULL;
15059  PyObject *__pyx_t_9 = NULL;
15060  PyObject *__pyx_t_10 = NULL;
15061  PyObject *__pyx_t_11 = NULL;
15062  __Pyx_RefNannySetupContext("acosh", 0);
15063  if (__pyx_optional_args) {
15064  if (__pyx_optional_args->__pyx_n > 0) {
15065  __pyx_v_i = __pyx_optional_args->i;
15066  }
15067  }
15068 
15069  /* "PyClical.pyx":1670
15070  * {1,2}
15071  * """
15072  * if not (i is None): # <<<<<<<<<<<<<<
15073  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15074  * else:
15075  */
15076  __pyx_t_1 = (__pyx_v_i != Py_None);
15077  __pyx_t_2 = (__pyx_t_1 != 0);
15078  if (__pyx_t_2) {
15079 
15080  /* "PyClical.pyx":1671
15081  * """
15082  * if not (i is None):
15083  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15084  * else:
15085  * try:
15086  */
15087  __Pyx_XDECREF(__pyx_r);
15088  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1671, __pyx_L1_error)
15089  __Pyx_GOTREF(__pyx_t_3);
15090  try {
15091  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15092  } catch(...) {
15093  __Pyx_CppExn2PyErr();
15094  __PYX_ERR(0, 1671, __pyx_L1_error)
15095  }
15096  __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_ERR(0, 1671, __pyx_L1_error)
15097  __Pyx_GOTREF(__pyx_t_5);
15098  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15099  __pyx_r = __pyx_t_5;
15100  __pyx_t_5 = 0;
15101  goto __pyx_L0;
15102 
15103  /* "PyClical.pyx":1670
15104  * {1,2}
15105  * """
15106  * if not (i is None): # <<<<<<<<<<<<<<
15107  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15108  * else:
15109  */
15110  }
15111 
15112  /* "PyClical.pyx":1673
15113  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15114  * else:
15115  * try: # <<<<<<<<<<<<<<
15116  * return math.acosh(obj)
15117  * except:
15118  */
15119  /*else*/ {
15120  {
15121  __Pyx_PyThreadState_declare
15122  __Pyx_PyThreadState_assign
15123  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15124  __Pyx_XGOTREF(__pyx_t_6);
15125  __Pyx_XGOTREF(__pyx_t_7);
15126  __Pyx_XGOTREF(__pyx_t_8);
15127  /*try:*/ {
15128 
15129  /* "PyClical.pyx":1674
15130  * else:
15131  * try:
15132  * return math.acosh(obj) # <<<<<<<<<<<<<<
15133  * except:
15134  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15135  */
15136  __Pyx_XDECREF(__pyx_r);
15137  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L4_error)
15138  __Pyx_GOTREF(__pyx_t_3);
15139  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acosh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1674, __pyx_L4_error)
15140  __Pyx_GOTREF(__pyx_t_9);
15141  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15142  __pyx_t_3 = NULL;
15143  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15144  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15145  if (likely(__pyx_t_3)) {
15146  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15147  __Pyx_INCREF(__pyx_t_3);
15148  __Pyx_INCREF(function);
15149  __Pyx_DECREF_SET(__pyx_t_9, function);
15150  }
15151  }
15152  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
15153  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15154  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L4_error)
15155  __Pyx_GOTREF(__pyx_t_5);
15156  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15157  __pyx_r = __pyx_t_5;
15158  __pyx_t_5 = 0;
15159  goto __pyx_L8_try_return;
15160 
15161  /* "PyClical.pyx":1673
15162  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15163  * else:
15164  * try: # <<<<<<<<<<<<<<
15165  * return math.acosh(obj)
15166  * except:
15167  */
15168  }
15169  __pyx_L4_error:;
15170  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15171  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15172  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15173 
15174  /* "PyClical.pyx":1675
15175  * try:
15176  * return math.acosh(obj)
15177  * except: # <<<<<<<<<<<<<<
15178  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15179  *
15180  */
15181  /*except:*/ {
15182  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15183  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1675, __pyx_L6_except_error)
15184  __Pyx_GOTREF(__pyx_t_5);
15185  __Pyx_GOTREF(__pyx_t_9);
15186  __Pyx_GOTREF(__pyx_t_3);
15187 
15188  /* "PyClical.pyx":1676
15189  * return math.acosh(obj)
15190  * except:
15191  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15192  *
15193  * cpdef inline sin(obj,i = None):
15194  */
15195  __Pyx_XDECREF(__pyx_r);
15196  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1676, __pyx_L6_except_error)
15197  __Pyx_GOTREF(__pyx_t_10);
15198  __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_ERR(0, 1676, __pyx_L6_except_error)
15199  __Pyx_GOTREF(__pyx_t_11);
15200  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15201  __pyx_r = __pyx_t_11;
15202  __pyx_t_11 = 0;
15203  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15204  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15205  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15206  goto __pyx_L7_except_return;
15207  }
15208  __pyx_L6_except_error:;
15209 
15210  /* "PyClical.pyx":1673
15211  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15212  * else:
15213  * try: # <<<<<<<<<<<<<<
15214  * return math.acosh(obj)
15215  * except:
15216  */
15217  __Pyx_XGIVEREF(__pyx_t_6);
15218  __Pyx_XGIVEREF(__pyx_t_7);
15219  __Pyx_XGIVEREF(__pyx_t_8);
15220  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15221  goto __pyx_L1_error;
15222  __pyx_L8_try_return:;
15223  __Pyx_XGIVEREF(__pyx_t_6);
15224  __Pyx_XGIVEREF(__pyx_t_7);
15225  __Pyx_XGIVEREF(__pyx_t_8);
15226  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15227  goto __pyx_L0;
15228  __pyx_L7_except_return:;
15229  __Pyx_XGIVEREF(__pyx_t_6);
15230  __Pyx_XGIVEREF(__pyx_t_7);
15231  __Pyx_XGIVEREF(__pyx_t_8);
15232  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15233  goto __pyx_L0;
15234  }
15235  }
15236 
15237  /* "PyClical.pyx":1655
15238  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15239  *
15240  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15241  * """
15242  * Inverse hyperbolic cosine of multivector with optional complexifier.
15243  */
15244 
15245  /* function exit code */
15246  __pyx_L1_error:;
15247  __Pyx_XDECREF(__pyx_t_3);
15248  __Pyx_XDECREF(__pyx_t_5);
15249  __Pyx_XDECREF(__pyx_t_9);
15250  __Pyx_XDECREF(__pyx_t_10);
15251  __Pyx_XDECREF(__pyx_t_11);
15252  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15253  __pyx_r = 0;
15254  __pyx_L0:;
15255  __Pyx_XGIVEREF(__pyx_r);
15256  __Pyx_RefNannyFinishContext();
15257  return __pyx_r;
15258  }
15259 
15260  /* Python wrapper */
15261  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15262  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 ";
15263  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15264  PyObject *__pyx_v_obj = 0;
15265  PyObject *__pyx_v_i = 0;
15266  PyObject *__pyx_r = 0;
15267  __Pyx_RefNannyDeclarations
15268  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15269  {
15270  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15271  PyObject* values[2] = {0,0};
15272  values[1] = ((PyObject *)Py_None);
15273  if (unlikely(__pyx_kwds)) {
15274  Py_ssize_t kw_args;
15275  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15276  switch (pos_args) {
15277  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15278  CYTHON_FALLTHROUGH;
15279  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15280  CYTHON_FALLTHROUGH;
15281  case 0: break;
15282  default: goto __pyx_L5_argtuple_error;
15283  }
15284  kw_args = PyDict_Size(__pyx_kwds);
15285  switch (pos_args) {
15286  case 0:
15287  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15288  else goto __pyx_L5_argtuple_error;
15289  CYTHON_FALLTHROUGH;
15290  case 1:
15291  if (kw_args > 0) {
15292  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15293  if (value) { values[1] = value; kw_args--; }
15294  }
15295  }
15296  if (unlikely(kw_args > 0)) {
15297  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1655, __pyx_L3_error)
15298  }
15299  } else {
15300  switch (PyTuple_GET_SIZE(__pyx_args)) {
15301  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15302  CYTHON_FALLTHROUGH;
15303  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15304  break;
15305  default: goto __pyx_L5_argtuple_error;
15306  }
15307  }
15308  __pyx_v_obj = values[0];
15309  __pyx_v_i = values[1];
15310  }
15311  goto __pyx_L4_argument_unpacking_done;
15312  __pyx_L5_argtuple_error:;
15313  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1655, __pyx_L3_error)
15314  __pyx_L3_error:;
15315  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15316  __Pyx_RefNannyFinishContext();
15317  return NULL;
15318  __pyx_L4_argument_unpacking_done:;
15319  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15320 
15321  /* function exit code */
15322  __Pyx_RefNannyFinishContext();
15323  return __pyx_r;
15324  }
15325 
15326  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15327  PyObject *__pyx_r = NULL;
15328  __Pyx_RefNannyDeclarations
15329  PyObject *__pyx_t_1 = NULL;
15330  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15331  __Pyx_RefNannySetupContext("acosh", 0);
15332  __Pyx_XDECREF(__pyx_r);
15333  __pyx_t_2.__pyx_n = 1;
15334  __pyx_t_2.i = __pyx_v_i;
15335  __pyx_t_1 = __pyx_f_8PyClical_acosh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1655, __pyx_L1_error)
15336  __Pyx_GOTREF(__pyx_t_1);
15337  __pyx_r = __pyx_t_1;
15338  __pyx_t_1 = 0;
15339  goto __pyx_L0;
15340 
15341  /* function exit code */
15342  __pyx_L1_error:;
15343  __Pyx_XDECREF(__pyx_t_1);
15344  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15345  __pyx_r = NULL;
15346  __pyx_L0:;
15347  __Pyx_XGIVEREF(__pyx_r);
15348  __Pyx_RefNannyFinishContext();
15349  return __pyx_r;
15350  }
15351 
15352  /* "PyClical.pyx":1678
15353  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15354  *
15355  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15356  * """
15357  * Sine of multivector with optional complexifier.
15358  */
15359 
15360  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15361  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) {
15362  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15363  PyObject *__pyx_r = NULL;
15364  __Pyx_RefNannyDeclarations
15365  int __pyx_t_1;
15366  int __pyx_t_2;
15367  PyObject *__pyx_t_3 = NULL;
15368  Clifford __pyx_t_4;
15369  PyObject *__pyx_t_5 = NULL;
15370  PyObject *__pyx_t_6 = NULL;
15371  PyObject *__pyx_t_7 = NULL;
15372  PyObject *__pyx_t_8 = NULL;
15373  PyObject *__pyx_t_9 = NULL;
15374  PyObject *__pyx_t_10 = NULL;
15375  PyObject *__pyx_t_11 = NULL;
15376  __Pyx_RefNannySetupContext("sin", 0);
15377  if (__pyx_optional_args) {
15378  if (__pyx_optional_args->__pyx_n > 0) {
15379  __pyx_v_i = __pyx_optional_args->i;
15380  }
15381  }
15382 
15383  /* "PyClical.pyx":1689
15384  * {1,2,3}
15385  * """
15386  * if not (i is None): # <<<<<<<<<<<<<<
15387  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15388  * else:
15389  */
15390  __pyx_t_1 = (__pyx_v_i != Py_None);
15391  __pyx_t_2 = (__pyx_t_1 != 0);
15392  if (__pyx_t_2) {
15393 
15394  /* "PyClical.pyx":1690
15395  * """
15396  * if not (i is None):
15397  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15398  * else:
15399  * try:
15400  */
15401  __Pyx_XDECREF(__pyx_r);
15402  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
15403  __Pyx_GOTREF(__pyx_t_3);
15404  try {
15405  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15406  } catch(...) {
15407  __Pyx_CppExn2PyErr();
15408  __PYX_ERR(0, 1690, __pyx_L1_error)
15409  }
15410  __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_ERR(0, 1690, __pyx_L1_error)
15411  __Pyx_GOTREF(__pyx_t_5);
15412  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15413  __pyx_r = __pyx_t_5;
15414  __pyx_t_5 = 0;
15415  goto __pyx_L0;
15416 
15417  /* "PyClical.pyx":1689
15418  * {1,2,3}
15419  * """
15420  * if not (i is None): # <<<<<<<<<<<<<<
15421  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15422  * else:
15423  */
15424  }
15425 
15426  /* "PyClical.pyx":1692
15427  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15428  * else:
15429  * try: # <<<<<<<<<<<<<<
15430  * return math.sin(obj)
15431  * except:
15432  */
15433  /*else*/ {
15434  {
15435  __Pyx_PyThreadState_declare
15436  __Pyx_PyThreadState_assign
15437  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15438  __Pyx_XGOTREF(__pyx_t_6);
15439  __Pyx_XGOTREF(__pyx_t_7);
15440  __Pyx_XGOTREF(__pyx_t_8);
15441  /*try:*/ {
15442 
15443  /* "PyClical.pyx":1693
15444  * else:
15445  * try:
15446  * return math.sin(obj) # <<<<<<<<<<<<<<
15447  * except:
15448  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15449  */
15450  __Pyx_XDECREF(__pyx_r);
15451  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1693, __pyx_L4_error)
15452  __Pyx_GOTREF(__pyx_t_3);
15453  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sin); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1693, __pyx_L4_error)
15454  __Pyx_GOTREF(__pyx_t_9);
15455  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15456  __pyx_t_3 = NULL;
15457  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15458  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15459  if (likely(__pyx_t_3)) {
15460  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15461  __Pyx_INCREF(__pyx_t_3);
15462  __Pyx_INCREF(function);
15463  __Pyx_DECREF_SET(__pyx_t_9, function);
15464  }
15465  }
15466  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
15467  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15468  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1693, __pyx_L4_error)
15469  __Pyx_GOTREF(__pyx_t_5);
15470  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15471  __pyx_r = __pyx_t_5;
15472  __pyx_t_5 = 0;
15473  goto __pyx_L8_try_return;
15474 
15475  /* "PyClical.pyx":1692
15476  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15477  * else:
15478  * try: # <<<<<<<<<<<<<<
15479  * return math.sin(obj)
15480  * except:
15481  */
15482  }
15483  __pyx_L4_error:;
15484  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15485  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15486  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15487 
15488  /* "PyClical.pyx":1694
15489  * try:
15490  * return math.sin(obj)
15491  * except: # <<<<<<<<<<<<<<
15492  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15493  *
15494  */
15495  /*except:*/ {
15496  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15497  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1694, __pyx_L6_except_error)
15498  __Pyx_GOTREF(__pyx_t_5);
15499  __Pyx_GOTREF(__pyx_t_9);
15500  __Pyx_GOTREF(__pyx_t_3);
15501 
15502  /* "PyClical.pyx":1695
15503  * return math.sin(obj)
15504  * except:
15505  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15506  *
15507  * cpdef inline asin(obj,i = None):
15508  */
15509  __Pyx_XDECREF(__pyx_r);
15510  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15511  __Pyx_GOTREF(__pyx_t_10);
15512  __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_ERR(0, 1695, __pyx_L6_except_error)
15513  __Pyx_GOTREF(__pyx_t_11);
15514  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15515  __pyx_r = __pyx_t_11;
15516  __pyx_t_11 = 0;
15517  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15518  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15519  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15520  goto __pyx_L7_except_return;
15521  }
15522  __pyx_L6_except_error:;
15523 
15524  /* "PyClical.pyx":1692
15525  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15526  * else:
15527  * try: # <<<<<<<<<<<<<<
15528  * return math.sin(obj)
15529  * except:
15530  */
15531  __Pyx_XGIVEREF(__pyx_t_6);
15532  __Pyx_XGIVEREF(__pyx_t_7);
15533  __Pyx_XGIVEREF(__pyx_t_8);
15534  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15535  goto __pyx_L1_error;
15536  __pyx_L8_try_return:;
15537  __Pyx_XGIVEREF(__pyx_t_6);
15538  __Pyx_XGIVEREF(__pyx_t_7);
15539  __Pyx_XGIVEREF(__pyx_t_8);
15540  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15541  goto __pyx_L0;
15542  __pyx_L7_except_return:;
15543  __Pyx_XGIVEREF(__pyx_t_6);
15544  __Pyx_XGIVEREF(__pyx_t_7);
15545  __Pyx_XGIVEREF(__pyx_t_8);
15546  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15547  goto __pyx_L0;
15548  }
15549  }
15550 
15551  /* "PyClical.pyx":1678
15552  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15553  *
15554  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15555  * """
15556  * Sine of multivector with optional complexifier.
15557  */
15558 
15559  /* function exit code */
15560  __pyx_L1_error:;
15561  __Pyx_XDECREF(__pyx_t_3);
15562  __Pyx_XDECREF(__pyx_t_5);
15563  __Pyx_XDECREF(__pyx_t_9);
15564  __Pyx_XDECREF(__pyx_t_10);
15565  __Pyx_XDECREF(__pyx_t_11);
15566  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15567  __pyx_r = 0;
15568  __pyx_L0:;
15569  __Pyx_XGIVEREF(__pyx_r);
15570  __Pyx_RefNannyFinishContext();
15571  return __pyx_r;
15572  }
15573 
15574  /* Python wrapper */
15575  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15576  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 ";
15577  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15578  PyObject *__pyx_v_obj = 0;
15579  PyObject *__pyx_v_i = 0;
15580  PyObject *__pyx_r = 0;
15581  __Pyx_RefNannyDeclarations
15582  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15583  {
15584  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15585  PyObject* values[2] = {0,0};
15586  values[1] = ((PyObject *)Py_None);
15587  if (unlikely(__pyx_kwds)) {
15588  Py_ssize_t kw_args;
15589  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15590  switch (pos_args) {
15591  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15592  CYTHON_FALLTHROUGH;
15593  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15594  CYTHON_FALLTHROUGH;
15595  case 0: break;
15596  default: goto __pyx_L5_argtuple_error;
15597  }
15598  kw_args = PyDict_Size(__pyx_kwds);
15599  switch (pos_args) {
15600  case 0:
15601  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15602  else goto __pyx_L5_argtuple_error;
15603  CYTHON_FALLTHROUGH;
15604  case 1:
15605  if (kw_args > 0) {
15606  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15607  if (value) { values[1] = value; kw_args--; }
15608  }
15609  }
15610  if (unlikely(kw_args > 0)) {
15611  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1678, __pyx_L3_error)
15612  }
15613  } else {
15614  switch (PyTuple_GET_SIZE(__pyx_args)) {
15615  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15616  CYTHON_FALLTHROUGH;
15617  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15618  break;
15619  default: goto __pyx_L5_argtuple_error;
15620  }
15621  }
15622  __pyx_v_obj = values[0];
15623  __pyx_v_i = values[1];
15624  }
15625  goto __pyx_L4_argument_unpacking_done;
15626  __pyx_L5_argtuple_error:;
15627  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1678, __pyx_L3_error)
15628  __pyx_L3_error:;
15629  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15630  __Pyx_RefNannyFinishContext();
15631  return NULL;
15632  __pyx_L4_argument_unpacking_done:;
15633  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15634 
15635  /* function exit code */
15636  __Pyx_RefNannyFinishContext();
15637  return __pyx_r;
15638  }
15639 
15640  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15641  PyObject *__pyx_r = NULL;
15642  __Pyx_RefNannyDeclarations
15643  PyObject *__pyx_t_1 = NULL;
15644  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15645  __Pyx_RefNannySetupContext("sin", 0);
15646  __Pyx_XDECREF(__pyx_r);
15647  __pyx_t_2.__pyx_n = 1;
15648  __pyx_t_2.i = __pyx_v_i;
15649  __pyx_t_1 = __pyx_f_8PyClical_sin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1678, __pyx_L1_error)
15650  __Pyx_GOTREF(__pyx_t_1);
15651  __pyx_r = __pyx_t_1;
15652  __pyx_t_1 = 0;
15653  goto __pyx_L0;
15654 
15655  /* function exit code */
15656  __pyx_L1_error:;
15657  __Pyx_XDECREF(__pyx_t_1);
15658  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15659  __pyx_r = NULL;
15660  __pyx_L0:;
15661  __Pyx_XGIVEREF(__pyx_r);
15662  __Pyx_RefNannyFinishContext();
15663  return __pyx_r;
15664  }
15665 
15666  /* "PyClical.pyx":1697
15667  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15668  *
15669  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15670  * """
15671  * Inverse sine of multivector with optional complexifier.
15672  */
15673 
15674  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15675  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) {
15676  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15677  PyObject *__pyx_r = NULL;
15678  __Pyx_RefNannyDeclarations
15679  int __pyx_t_1;
15680  int __pyx_t_2;
15681  PyObject *__pyx_t_3 = NULL;
15682  Clifford __pyx_t_4;
15683  PyObject *__pyx_t_5 = NULL;
15684  PyObject *__pyx_t_6 = NULL;
15685  PyObject *__pyx_t_7 = NULL;
15686  PyObject *__pyx_t_8 = NULL;
15687  PyObject *__pyx_t_9 = NULL;
15688  PyObject *__pyx_t_10 = NULL;
15689  PyObject *__pyx_t_11 = NULL;
15690  __Pyx_RefNannySetupContext("asin", 0);
15691  if (__pyx_optional_args) {
15692  if (__pyx_optional_args->__pyx_n > 0) {
15693  __pyx_v_i = __pyx_optional_args->i;
15694  }
15695  }
15696 
15697  /* "PyClical.pyx":1710
15698  * {1,2,3}
15699  * """
15700  * if not (i is None): # <<<<<<<<<<<<<<
15701  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15702  * else:
15703  */
15704  __pyx_t_1 = (__pyx_v_i != Py_None);
15705  __pyx_t_2 = (__pyx_t_1 != 0);
15706  if (__pyx_t_2) {
15707 
15708  /* "PyClical.pyx":1711
15709  * """
15710  * if not (i is None):
15711  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15712  * else:
15713  * try:
15714  */
15715  __Pyx_XDECREF(__pyx_r);
15716  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L1_error)
15717  __Pyx_GOTREF(__pyx_t_3);
15718  try {
15719  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15720  } catch(...) {
15721  __Pyx_CppExn2PyErr();
15722  __PYX_ERR(0, 1711, __pyx_L1_error)
15723  }
15724  __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_ERR(0, 1711, __pyx_L1_error)
15725  __Pyx_GOTREF(__pyx_t_5);
15726  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15727  __pyx_r = __pyx_t_5;
15728  __pyx_t_5 = 0;
15729  goto __pyx_L0;
15730 
15731  /* "PyClical.pyx":1710
15732  * {1,2,3}
15733  * """
15734  * if not (i is None): # <<<<<<<<<<<<<<
15735  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15736  * else:
15737  */
15738  }
15739 
15740  /* "PyClical.pyx":1713
15741  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15742  * else:
15743  * try: # <<<<<<<<<<<<<<
15744  * return math.asin(obj)
15745  * except:
15746  */
15747  /*else*/ {
15748  {
15749  __Pyx_PyThreadState_declare
15750  __Pyx_PyThreadState_assign
15751  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15752  __Pyx_XGOTREF(__pyx_t_6);
15753  __Pyx_XGOTREF(__pyx_t_7);
15754  __Pyx_XGOTREF(__pyx_t_8);
15755  /*try:*/ {
15756 
15757  /* "PyClical.pyx":1714
15758  * else:
15759  * try:
15760  * return math.asin(obj) # <<<<<<<<<<<<<<
15761  * except:
15762  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15763  */
15764  __Pyx_XDECREF(__pyx_r);
15765  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L4_error)
15766  __Pyx_GOTREF(__pyx_t_3);
15767  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asin); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1714, __pyx_L4_error)
15768  __Pyx_GOTREF(__pyx_t_9);
15769  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15770  __pyx_t_3 = NULL;
15771  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15772  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15773  if (likely(__pyx_t_3)) {
15774  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15775  __Pyx_INCREF(__pyx_t_3);
15776  __Pyx_INCREF(function);
15777  __Pyx_DECREF_SET(__pyx_t_9, function);
15778  }
15779  }
15780  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
15781  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15782  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L4_error)
15783  __Pyx_GOTREF(__pyx_t_5);
15784  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15785  __pyx_r = __pyx_t_5;
15786  __pyx_t_5 = 0;
15787  goto __pyx_L8_try_return;
15788 
15789  /* "PyClical.pyx":1713
15790  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15791  * else:
15792  * try: # <<<<<<<<<<<<<<
15793  * return math.asin(obj)
15794  * except:
15795  */
15796  }
15797  __pyx_L4_error:;
15798  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15799  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15800  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15801 
15802  /* "PyClical.pyx":1715
15803  * try:
15804  * return math.asin(obj)
15805  * except: # <<<<<<<<<<<<<<
15806  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15807  *
15808  */
15809  /*except:*/ {
15810  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15811  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1715, __pyx_L6_except_error)
15812  __Pyx_GOTREF(__pyx_t_5);
15813  __Pyx_GOTREF(__pyx_t_9);
15814  __Pyx_GOTREF(__pyx_t_3);
15815 
15816  /* "PyClical.pyx":1716
15817  * return math.asin(obj)
15818  * except:
15819  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15820  *
15821  * cpdef inline sinh(obj):
15822  */
15823  __Pyx_XDECREF(__pyx_r);
15824  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1716, __pyx_L6_except_error)
15825  __Pyx_GOTREF(__pyx_t_10);
15826  __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_ERR(0, 1716, __pyx_L6_except_error)
15827  __Pyx_GOTREF(__pyx_t_11);
15828  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15829  __pyx_r = __pyx_t_11;
15830  __pyx_t_11 = 0;
15831  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15832  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15833  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15834  goto __pyx_L7_except_return;
15835  }
15836  __pyx_L6_except_error:;
15837 
15838  /* "PyClical.pyx":1713
15839  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15840  * else:
15841  * try: # <<<<<<<<<<<<<<
15842  * return math.asin(obj)
15843  * except:
15844  */
15845  __Pyx_XGIVEREF(__pyx_t_6);
15846  __Pyx_XGIVEREF(__pyx_t_7);
15847  __Pyx_XGIVEREF(__pyx_t_8);
15848  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15849  goto __pyx_L1_error;
15850  __pyx_L8_try_return:;
15851  __Pyx_XGIVEREF(__pyx_t_6);
15852  __Pyx_XGIVEREF(__pyx_t_7);
15853  __Pyx_XGIVEREF(__pyx_t_8);
15854  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15855  goto __pyx_L0;
15856  __pyx_L7_except_return:;
15857  __Pyx_XGIVEREF(__pyx_t_6);
15858  __Pyx_XGIVEREF(__pyx_t_7);
15859  __Pyx_XGIVEREF(__pyx_t_8);
15860  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15861  goto __pyx_L0;
15862  }
15863  }
15864 
15865  /* "PyClical.pyx":1697
15866  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15867  *
15868  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15869  * """
15870  * Inverse sine of multivector with optional complexifier.
15871  */
15872 
15873  /* function exit code */
15874  __pyx_L1_error:;
15875  __Pyx_XDECREF(__pyx_t_3);
15876  __Pyx_XDECREF(__pyx_t_5);
15877  __Pyx_XDECREF(__pyx_t_9);
15878  __Pyx_XDECREF(__pyx_t_10);
15879  __Pyx_XDECREF(__pyx_t_11);
15880  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15881  __pyx_r = 0;
15882  __pyx_L0:;
15883  __Pyx_XGIVEREF(__pyx_r);
15884  __Pyx_RefNannyFinishContext();
15885  return __pyx_r;
15886  }
15887 
15888  /* Python wrapper */
15889  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15890  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 ";
15891  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15892  PyObject *__pyx_v_obj = 0;
15893  PyObject *__pyx_v_i = 0;
15894  PyObject *__pyx_r = 0;
15895  __Pyx_RefNannyDeclarations
15896  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
15897  {
15898  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15899  PyObject* values[2] = {0,0};
15900  values[1] = ((PyObject *)Py_None);
15901  if (unlikely(__pyx_kwds)) {
15902  Py_ssize_t kw_args;
15903  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15904  switch (pos_args) {
15905  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15906  CYTHON_FALLTHROUGH;
15907  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15908  CYTHON_FALLTHROUGH;
15909  case 0: break;
15910  default: goto __pyx_L5_argtuple_error;
15911  }
15912  kw_args = PyDict_Size(__pyx_kwds);
15913  switch (pos_args) {
15914  case 0:
15915  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15916  else goto __pyx_L5_argtuple_error;
15917  CYTHON_FALLTHROUGH;
15918  case 1:
15919  if (kw_args > 0) {
15920  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15921  if (value) { values[1] = value; kw_args--; }
15922  }
15923  }
15924  if (unlikely(kw_args > 0)) {
15925  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1697, __pyx_L3_error)
15926  }
15927  } else {
15928  switch (PyTuple_GET_SIZE(__pyx_args)) {
15929  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15930  CYTHON_FALLTHROUGH;
15931  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15932  break;
15933  default: goto __pyx_L5_argtuple_error;
15934  }
15935  }
15936  __pyx_v_obj = values[0];
15937  __pyx_v_i = values[1];
15938  }
15939  goto __pyx_L4_argument_unpacking_done;
15940  __pyx_L5_argtuple_error:;
15941  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1697, __pyx_L3_error)
15942  __pyx_L3_error:;
15943  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15944  __Pyx_RefNannyFinishContext();
15945  return NULL;
15946  __pyx_L4_argument_unpacking_done:;
15947  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15948 
15949  /* function exit code */
15950  __Pyx_RefNannyFinishContext();
15951  return __pyx_r;
15952  }
15953 
15954  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15955  PyObject *__pyx_r = NULL;
15956  __Pyx_RefNannyDeclarations
15957  PyObject *__pyx_t_1 = NULL;
15958  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15959  __Pyx_RefNannySetupContext("asin", 0);
15960  __Pyx_XDECREF(__pyx_r);
15961  __pyx_t_2.__pyx_n = 1;
15962  __pyx_t_2.i = __pyx_v_i;
15963  __pyx_t_1 = __pyx_f_8PyClical_asin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error)
15964  __Pyx_GOTREF(__pyx_t_1);
15965  __pyx_r = __pyx_t_1;
15966  __pyx_t_1 = 0;
15967  goto __pyx_L0;
15968 
15969  /* function exit code */
15970  __pyx_L1_error:;
15971  __Pyx_XDECREF(__pyx_t_1);
15972  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15973  __pyx_r = NULL;
15974  __pyx_L0:;
15975  __Pyx_XGIVEREF(__pyx_r);
15976  __Pyx_RefNannyFinishContext();
15977  return __pyx_r;
15978  }
15979 
15980  /* "PyClical.pyx":1718
15981  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15982  *
15983  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15984  * """
15985  * Hyperbolic sine of multivector.
15986  */
15987 
15988  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15989  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15990  PyObject *__pyx_r = NULL;
15991  __Pyx_RefNannyDeclarations
15992  PyObject *__pyx_t_1 = NULL;
15993  PyObject *__pyx_t_2 = NULL;
15994  PyObject *__pyx_t_3 = NULL;
15995  PyObject *__pyx_t_4 = NULL;
15996  PyObject *__pyx_t_5 = NULL;
15997  PyObject *__pyx_t_6 = NULL;
15998  PyObject *__pyx_t_7 = NULL;
15999  PyObject *__pyx_t_8 = NULL;
16000  __Pyx_RefNannySetupContext("sinh", 0);
16001 
16002  /* "PyClical.pyx":1727
16003  * 0.5{1,2}
16004  * """
16005  * try: # <<<<<<<<<<<<<<
16006  * return math.sinh(obj)
16007  * except:
16008  */
16009  {
16010  __Pyx_PyThreadState_declare
16011  __Pyx_PyThreadState_assign
16012  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16013  __Pyx_XGOTREF(__pyx_t_1);
16014  __Pyx_XGOTREF(__pyx_t_2);
16015  __Pyx_XGOTREF(__pyx_t_3);
16016  /*try:*/ {
16017 
16018  /* "PyClical.pyx":1728
16019  * """
16020  * try:
16021  * return math.sinh(obj) # <<<<<<<<<<<<<<
16022  * except:
16023  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16024  */
16025  __Pyx_XDECREF(__pyx_r);
16026  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1728, __pyx_L3_error)
16027  __Pyx_GOTREF(__pyx_t_5);
16028  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sinh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1728, __pyx_L3_error)
16029  __Pyx_GOTREF(__pyx_t_6);
16030  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16031  __pyx_t_5 = NULL;
16032  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16033  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16034  if (likely(__pyx_t_5)) {
16035  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16036  __Pyx_INCREF(__pyx_t_5);
16037  __Pyx_INCREF(function);
16038  __Pyx_DECREF_SET(__pyx_t_6, function);
16039  }
16040  }
16041  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
16042  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16043  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1728, __pyx_L3_error)
16044  __Pyx_GOTREF(__pyx_t_4);
16045  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16046  __pyx_r = __pyx_t_4;
16047  __pyx_t_4 = 0;
16048  goto __pyx_L7_try_return;
16049 
16050  /* "PyClical.pyx":1727
16051  * 0.5{1,2}
16052  * """
16053  * try: # <<<<<<<<<<<<<<
16054  * return math.sinh(obj)
16055  * except:
16056  */
16057  }
16058  __pyx_L3_error:;
16059  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16060  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16061  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16062 
16063  /* "PyClical.pyx":1729
16064  * try:
16065  * return math.sinh(obj)
16066  * except: # <<<<<<<<<<<<<<
16067  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16068  *
16069  */
16070  /*except:*/ {
16071  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16072  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1729, __pyx_L5_except_error)
16073  __Pyx_GOTREF(__pyx_t_4);
16074  __Pyx_GOTREF(__pyx_t_6);
16075  __Pyx_GOTREF(__pyx_t_5);
16076 
16077  /* "PyClical.pyx":1730
16078  * return math.sinh(obj)
16079  * except:
16080  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16081  *
16082  * cpdef inline asinh(obj,i = None):
16083  */
16084  __Pyx_XDECREF(__pyx_r);
16085  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1730, __pyx_L5_except_error)
16086  __Pyx_GOTREF(__pyx_t_7);
16087  __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_ERR(0, 1730, __pyx_L5_except_error)
16088  __Pyx_GOTREF(__pyx_t_8);
16089  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16090  __pyx_r = __pyx_t_8;
16091  __pyx_t_8 = 0;
16092  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16093  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16094  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16095  goto __pyx_L6_except_return;
16096  }
16097  __pyx_L5_except_error:;
16098 
16099  /* "PyClical.pyx":1727
16100  * 0.5{1,2}
16101  * """
16102  * try: # <<<<<<<<<<<<<<
16103  * return math.sinh(obj)
16104  * except:
16105  */
16106  __Pyx_XGIVEREF(__pyx_t_1);
16107  __Pyx_XGIVEREF(__pyx_t_2);
16108  __Pyx_XGIVEREF(__pyx_t_3);
16109  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16110  goto __pyx_L1_error;
16111  __pyx_L7_try_return:;
16112  __Pyx_XGIVEREF(__pyx_t_1);
16113  __Pyx_XGIVEREF(__pyx_t_2);
16114  __Pyx_XGIVEREF(__pyx_t_3);
16115  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16116  goto __pyx_L0;
16117  __pyx_L6_except_return:;
16118  __Pyx_XGIVEREF(__pyx_t_1);
16119  __Pyx_XGIVEREF(__pyx_t_2);
16120  __Pyx_XGIVEREF(__pyx_t_3);
16121  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16122  goto __pyx_L0;
16123  }
16124 
16125  /* "PyClical.pyx":1718
16126  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16127  *
16128  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16129  * """
16130  * Hyperbolic sine of multivector.
16131  */
16132 
16133  /* function exit code */
16134  __pyx_L1_error:;
16135  __Pyx_XDECREF(__pyx_t_4);
16136  __Pyx_XDECREF(__pyx_t_5);
16137  __Pyx_XDECREF(__pyx_t_6);
16138  __Pyx_XDECREF(__pyx_t_7);
16139  __Pyx_XDECREF(__pyx_t_8);
16140  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16141  __pyx_r = 0;
16142  __pyx_L0:;
16143  __Pyx_XGIVEREF(__pyx_r);
16144  __Pyx_RefNannyFinishContext();
16145  return __pyx_r;
16146  }
16147 
16148  /* Python wrapper */
16149  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16150  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 ";
16151  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16152  PyObject *__pyx_r = 0;
16153  __Pyx_RefNannyDeclarations
16154  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
16155  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
16156 
16157  /* function exit code */
16158  __Pyx_RefNannyFinishContext();
16159  return __pyx_r;
16160  }
16161 
16162  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16163  PyObject *__pyx_r = NULL;
16164  __Pyx_RefNannyDeclarations
16165  PyObject *__pyx_t_1 = NULL;
16166  __Pyx_RefNannySetupContext("sinh", 0);
16167  __Pyx_XDECREF(__pyx_r);
16168  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
16169  __Pyx_GOTREF(__pyx_t_1);
16170  __pyx_r = __pyx_t_1;
16171  __pyx_t_1 = 0;
16172  goto __pyx_L0;
16173 
16174  /* function exit code */
16175  __pyx_L1_error:;
16176  __Pyx_XDECREF(__pyx_t_1);
16177  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16178  __pyx_r = NULL;
16179  __pyx_L0:;
16180  __Pyx_XGIVEREF(__pyx_r);
16181  __Pyx_RefNannyFinishContext();
16182  return __pyx_r;
16183  }
16184 
16185  /* "PyClical.pyx":1732
16186  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16187  *
16188  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16189  * """
16190  * Inverse hyperbolic sine of multivector with optional complexifier.
16191  */
16192 
16193  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16194  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) {
16195  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16196  PyObject *__pyx_r = NULL;
16197  __Pyx_RefNannyDeclarations
16198  int __pyx_t_1;
16199  int __pyx_t_2;
16200  PyObject *__pyx_t_3 = NULL;
16201  Clifford __pyx_t_4;
16202  PyObject *__pyx_t_5 = NULL;
16203  PyObject *__pyx_t_6 = NULL;
16204  PyObject *__pyx_t_7 = NULL;
16205  PyObject *__pyx_t_8 = NULL;
16206  PyObject *__pyx_t_9 = NULL;
16207  PyObject *__pyx_t_10 = NULL;
16208  PyObject *__pyx_t_11 = NULL;
16209  __Pyx_RefNannySetupContext("asinh", 0);
16210  if (__pyx_optional_args) {
16211  if (__pyx_optional_args->__pyx_n > 0) {
16212  __pyx_v_i = __pyx_optional_args->i;
16213  }
16214  }
16215 
16216  /* "PyClical.pyx":1743
16217  * {1,2}
16218  * """
16219  * if not (i is None): # <<<<<<<<<<<<<<
16220  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16221  * else:
16222  */
16223  __pyx_t_1 = (__pyx_v_i != Py_None);
16224  __pyx_t_2 = (__pyx_t_1 != 0);
16225  if (__pyx_t_2) {
16226 
16227  /* "PyClical.pyx":1744
16228  * """
16229  * if not (i is None):
16230  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16231  * else:
16232  * try:
16233  */
16234  __Pyx_XDECREF(__pyx_r);
16235  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1744, __pyx_L1_error)
16236  __Pyx_GOTREF(__pyx_t_3);
16237  try {
16238  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16239  } catch(...) {
16240  __Pyx_CppExn2PyErr();
16241  __PYX_ERR(0, 1744, __pyx_L1_error)
16242  }
16243  __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_ERR(0, 1744, __pyx_L1_error)
16244  __Pyx_GOTREF(__pyx_t_5);
16245  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16246  __pyx_r = __pyx_t_5;
16247  __pyx_t_5 = 0;
16248  goto __pyx_L0;
16249 
16250  /* "PyClical.pyx":1743
16251  * {1,2}
16252  * """
16253  * if not (i is None): # <<<<<<<<<<<<<<
16254  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16255  * else:
16256  */
16257  }
16258 
16259  /* "PyClical.pyx":1746
16260  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16261  * else:
16262  * try: # <<<<<<<<<<<<<<
16263  * return math.asinh(obj)
16264  * except:
16265  */
16266  /*else*/ {
16267  {
16268  __Pyx_PyThreadState_declare
16269  __Pyx_PyThreadState_assign
16270  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16271  __Pyx_XGOTREF(__pyx_t_6);
16272  __Pyx_XGOTREF(__pyx_t_7);
16273  __Pyx_XGOTREF(__pyx_t_8);
16274  /*try:*/ {
16275 
16276  /* "PyClical.pyx":1747
16277  * else:
16278  * try:
16279  * return math.asinh(obj) # <<<<<<<<<<<<<<
16280  * except:
16281  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16282  */
16283  __Pyx_XDECREF(__pyx_r);
16284  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1747, __pyx_L4_error)
16285  __Pyx_GOTREF(__pyx_t_3);
16286  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asinh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1747, __pyx_L4_error)
16287  __Pyx_GOTREF(__pyx_t_9);
16288  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16289  __pyx_t_3 = NULL;
16290  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16291  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16292  if (likely(__pyx_t_3)) {
16293  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16294  __Pyx_INCREF(__pyx_t_3);
16295  __Pyx_INCREF(function);
16296  __Pyx_DECREF_SET(__pyx_t_9, function);
16297  }
16298  }
16299  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
16300  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16301  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1747, __pyx_L4_error)
16302  __Pyx_GOTREF(__pyx_t_5);
16303  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16304  __pyx_r = __pyx_t_5;
16305  __pyx_t_5 = 0;
16306  goto __pyx_L8_try_return;
16307 
16308  /* "PyClical.pyx":1746
16309  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16310  * else:
16311  * try: # <<<<<<<<<<<<<<
16312  * return math.asinh(obj)
16313  * except:
16314  */
16315  }
16316  __pyx_L4_error:;
16317  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16318  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16319  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16320 
16321  /* "PyClical.pyx":1748
16322  * try:
16323  * return math.asinh(obj)
16324  * except: # <<<<<<<<<<<<<<
16325  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16326  *
16327  */
16328  /*except:*/ {
16329  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16330  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1748, __pyx_L6_except_error)
16331  __Pyx_GOTREF(__pyx_t_5);
16332  __Pyx_GOTREF(__pyx_t_9);
16333  __Pyx_GOTREF(__pyx_t_3);
16334 
16335  /* "PyClical.pyx":1749
16336  * return math.asinh(obj)
16337  * except:
16338  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16339  *
16340  * cpdef inline tan(obj,i = None):
16341  */
16342  __Pyx_XDECREF(__pyx_r);
16343  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16344  __Pyx_GOTREF(__pyx_t_10);
16345  __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_ERR(0, 1749, __pyx_L6_except_error)
16346  __Pyx_GOTREF(__pyx_t_11);
16347  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16348  __pyx_r = __pyx_t_11;
16349  __pyx_t_11 = 0;
16350  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16351  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16352  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16353  goto __pyx_L7_except_return;
16354  }
16355  __pyx_L6_except_error:;
16356 
16357  /* "PyClical.pyx":1746
16358  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16359  * else:
16360  * try: # <<<<<<<<<<<<<<
16361  * return math.asinh(obj)
16362  * except:
16363  */
16364  __Pyx_XGIVEREF(__pyx_t_6);
16365  __Pyx_XGIVEREF(__pyx_t_7);
16366  __Pyx_XGIVEREF(__pyx_t_8);
16367  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16368  goto __pyx_L1_error;
16369  __pyx_L8_try_return:;
16370  __Pyx_XGIVEREF(__pyx_t_6);
16371  __Pyx_XGIVEREF(__pyx_t_7);
16372  __Pyx_XGIVEREF(__pyx_t_8);
16373  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16374  goto __pyx_L0;
16375  __pyx_L7_except_return:;
16376  __Pyx_XGIVEREF(__pyx_t_6);
16377  __Pyx_XGIVEREF(__pyx_t_7);
16378  __Pyx_XGIVEREF(__pyx_t_8);
16379  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16380  goto __pyx_L0;
16381  }
16382  }
16383 
16384  /* "PyClical.pyx":1732
16385  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16386  *
16387  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16388  * """
16389  * Inverse hyperbolic sine of multivector with optional complexifier.
16390  */
16391 
16392  /* function exit code */
16393  __pyx_L1_error:;
16394  __Pyx_XDECREF(__pyx_t_3);
16395  __Pyx_XDECREF(__pyx_t_5);
16396  __Pyx_XDECREF(__pyx_t_9);
16397  __Pyx_XDECREF(__pyx_t_10);
16398  __Pyx_XDECREF(__pyx_t_11);
16399  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16400  __pyx_r = 0;
16401  __pyx_L0:;
16402  __Pyx_XGIVEREF(__pyx_r);
16403  __Pyx_RefNannyFinishContext();
16404  return __pyx_r;
16405  }
16406 
16407  /* Python wrapper */
16408  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16409  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 ";
16410  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16411  PyObject *__pyx_v_obj = 0;
16412  PyObject *__pyx_v_i = 0;
16413  PyObject *__pyx_r = 0;
16414  __Pyx_RefNannyDeclarations
16415  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16416  {
16417  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16418  PyObject* values[2] = {0,0};
16419  values[1] = ((PyObject *)Py_None);
16420  if (unlikely(__pyx_kwds)) {
16421  Py_ssize_t kw_args;
16422  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16423  switch (pos_args) {
16424  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16425  CYTHON_FALLTHROUGH;
16426  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16427  CYTHON_FALLTHROUGH;
16428  case 0: break;
16429  default: goto __pyx_L5_argtuple_error;
16430  }
16431  kw_args = PyDict_Size(__pyx_kwds);
16432  switch (pos_args) {
16433  case 0:
16434  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16435  else goto __pyx_L5_argtuple_error;
16436  CYTHON_FALLTHROUGH;
16437  case 1:
16438  if (kw_args > 0) {
16439  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16440  if (value) { values[1] = value; kw_args--; }
16441  }
16442  }
16443  if (unlikely(kw_args > 0)) {
16444  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1732, __pyx_L3_error)
16445  }
16446  } else {
16447  switch (PyTuple_GET_SIZE(__pyx_args)) {
16448  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16449  CYTHON_FALLTHROUGH;
16450  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16451  break;
16452  default: goto __pyx_L5_argtuple_error;
16453  }
16454  }
16455  __pyx_v_obj = values[0];
16456  __pyx_v_i = values[1];
16457  }
16458  goto __pyx_L4_argument_unpacking_done;
16459  __pyx_L5_argtuple_error:;
16460  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1732, __pyx_L3_error)
16461  __pyx_L3_error:;
16462  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16463  __Pyx_RefNannyFinishContext();
16464  return NULL;
16465  __pyx_L4_argument_unpacking_done:;
16466  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16467 
16468  /* function exit code */
16469  __Pyx_RefNannyFinishContext();
16470  return __pyx_r;
16471  }
16472 
16473  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16474  PyObject *__pyx_r = NULL;
16475  __Pyx_RefNannyDeclarations
16476  PyObject *__pyx_t_1 = NULL;
16477  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16478  __Pyx_RefNannySetupContext("asinh", 0);
16479  __Pyx_XDECREF(__pyx_r);
16480  __pyx_t_2.__pyx_n = 1;
16481  __pyx_t_2.i = __pyx_v_i;
16482  __pyx_t_1 = __pyx_f_8PyClical_asinh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error)
16483  __Pyx_GOTREF(__pyx_t_1);
16484  __pyx_r = __pyx_t_1;
16485  __pyx_t_1 = 0;
16486  goto __pyx_L0;
16487 
16488  /* function exit code */
16489  __pyx_L1_error:;
16490  __Pyx_XDECREF(__pyx_t_1);
16491  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16492  __pyx_r = NULL;
16493  __pyx_L0:;
16494  __Pyx_XGIVEREF(__pyx_r);
16495  __Pyx_RefNannyFinishContext();
16496  return __pyx_r;
16497  }
16498 
16499  /* "PyClical.pyx":1751
16500  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16501  *
16502  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16503  * """
16504  * Tangent of multivector with optional complexifier.
16505  */
16506 
16507  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16508  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) {
16509  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16510  PyObject *__pyx_r = NULL;
16511  __Pyx_RefNannyDeclarations
16512  int __pyx_t_1;
16513  int __pyx_t_2;
16514  PyObject *__pyx_t_3 = NULL;
16515  Clifford __pyx_t_4;
16516  PyObject *__pyx_t_5 = NULL;
16517  PyObject *__pyx_t_6 = NULL;
16518  PyObject *__pyx_t_7 = NULL;
16519  PyObject *__pyx_t_8 = NULL;
16520  PyObject *__pyx_t_9 = NULL;
16521  PyObject *__pyx_t_10 = NULL;
16522  PyObject *__pyx_t_11 = NULL;
16523  __Pyx_RefNannySetupContext("tan", 0);
16524  if (__pyx_optional_args) {
16525  if (__pyx_optional_args->__pyx_n > 0) {
16526  __pyx_v_i = __pyx_optional_args->i;
16527  }
16528  }
16529 
16530  /* "PyClical.pyx":1760
16531  * 0.7616{1,2}
16532  * """
16533  * if not (i is None): # <<<<<<<<<<<<<<
16534  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16535  * else:
16536  */
16537  __pyx_t_1 = (__pyx_v_i != Py_None);
16538  __pyx_t_2 = (__pyx_t_1 != 0);
16539  if (__pyx_t_2) {
16540 
16541  /* "PyClical.pyx":1761
16542  * """
16543  * if not (i is None):
16544  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16545  * else:
16546  * try:
16547  */
16548  __Pyx_XDECREF(__pyx_r);
16549  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1761, __pyx_L1_error)
16550  __Pyx_GOTREF(__pyx_t_3);
16551  try {
16552  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16553  } catch(...) {
16554  __Pyx_CppExn2PyErr();
16555  __PYX_ERR(0, 1761, __pyx_L1_error)
16556  }
16557  __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_ERR(0, 1761, __pyx_L1_error)
16558  __Pyx_GOTREF(__pyx_t_5);
16559  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16560  __pyx_r = __pyx_t_5;
16561  __pyx_t_5 = 0;
16562  goto __pyx_L0;
16563 
16564  /* "PyClical.pyx":1760
16565  * 0.7616{1,2}
16566  * """
16567  * if not (i is None): # <<<<<<<<<<<<<<
16568  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16569  * else:
16570  */
16571  }
16572 
16573  /* "PyClical.pyx":1763
16574  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16575  * else:
16576  * try: # <<<<<<<<<<<<<<
16577  * return math.tan(obj)
16578  * except:
16579  */
16580  /*else*/ {
16581  {
16582  __Pyx_PyThreadState_declare
16583  __Pyx_PyThreadState_assign
16584  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16585  __Pyx_XGOTREF(__pyx_t_6);
16586  __Pyx_XGOTREF(__pyx_t_7);
16587  __Pyx_XGOTREF(__pyx_t_8);
16588  /*try:*/ {
16589 
16590  /* "PyClical.pyx":1764
16591  * else:
16592  * try:
16593  * return math.tan(obj) # <<<<<<<<<<<<<<
16594  * except:
16595  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16596  */
16597  __Pyx_XDECREF(__pyx_r);
16598  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1764, __pyx_L4_error)
16599  __Pyx_GOTREF(__pyx_t_3);
16600  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1764, __pyx_L4_error)
16601  __Pyx_GOTREF(__pyx_t_9);
16602  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16603  __pyx_t_3 = NULL;
16604  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16605  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16606  if (likely(__pyx_t_3)) {
16607  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16608  __Pyx_INCREF(__pyx_t_3);
16609  __Pyx_INCREF(function);
16610  __Pyx_DECREF_SET(__pyx_t_9, function);
16611  }
16612  }
16613  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
16614  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16615  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1764, __pyx_L4_error)
16616  __Pyx_GOTREF(__pyx_t_5);
16617  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16618  __pyx_r = __pyx_t_5;
16619  __pyx_t_5 = 0;
16620  goto __pyx_L8_try_return;
16621 
16622  /* "PyClical.pyx":1763
16623  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16624  * else:
16625  * try: # <<<<<<<<<<<<<<
16626  * return math.tan(obj)
16627  * except:
16628  */
16629  }
16630  __pyx_L4_error:;
16631  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16632  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16633  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16634 
16635  /* "PyClical.pyx":1765
16636  * try:
16637  * return math.tan(obj)
16638  * except: # <<<<<<<<<<<<<<
16639  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16640  *
16641  */
16642  /*except:*/ {
16643  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16644  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1765, __pyx_L6_except_error)
16645  __Pyx_GOTREF(__pyx_t_5);
16646  __Pyx_GOTREF(__pyx_t_9);
16647  __Pyx_GOTREF(__pyx_t_3);
16648 
16649  /* "PyClical.pyx":1766
16650  * return math.tan(obj)
16651  * except:
16652  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16653  *
16654  * cpdef inline atan(obj,i = None):
16655  */
16656  __Pyx_XDECREF(__pyx_r);
16657  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16658  __Pyx_GOTREF(__pyx_t_10);
16659  __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_ERR(0, 1766, __pyx_L6_except_error)
16660  __Pyx_GOTREF(__pyx_t_11);
16661  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16662  __pyx_r = __pyx_t_11;
16663  __pyx_t_11 = 0;
16664  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16665  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16666  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16667  goto __pyx_L7_except_return;
16668  }
16669  __pyx_L6_except_error:;
16670 
16671  /* "PyClical.pyx":1763
16672  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16673  * else:
16674  * try: # <<<<<<<<<<<<<<
16675  * return math.tan(obj)
16676  * except:
16677  */
16678  __Pyx_XGIVEREF(__pyx_t_6);
16679  __Pyx_XGIVEREF(__pyx_t_7);
16680  __Pyx_XGIVEREF(__pyx_t_8);
16681  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16682  goto __pyx_L1_error;
16683  __pyx_L8_try_return:;
16684  __Pyx_XGIVEREF(__pyx_t_6);
16685  __Pyx_XGIVEREF(__pyx_t_7);
16686  __Pyx_XGIVEREF(__pyx_t_8);
16687  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16688  goto __pyx_L0;
16689  __pyx_L7_except_return:;
16690  __Pyx_XGIVEREF(__pyx_t_6);
16691  __Pyx_XGIVEREF(__pyx_t_7);
16692  __Pyx_XGIVEREF(__pyx_t_8);
16693  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16694  goto __pyx_L0;
16695  }
16696  }
16697 
16698  /* "PyClical.pyx":1751
16699  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16700  *
16701  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16702  * """
16703  * Tangent of multivector with optional complexifier.
16704  */
16705 
16706  /* function exit code */
16707  __pyx_L1_error:;
16708  __Pyx_XDECREF(__pyx_t_3);
16709  __Pyx_XDECREF(__pyx_t_5);
16710  __Pyx_XDECREF(__pyx_t_9);
16711  __Pyx_XDECREF(__pyx_t_10);
16712  __Pyx_XDECREF(__pyx_t_11);
16713  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16714  __pyx_r = 0;
16715  __pyx_L0:;
16716  __Pyx_XGIVEREF(__pyx_r);
16717  __Pyx_RefNannyFinishContext();
16718  return __pyx_r;
16719  }
16720 
16721  /* Python wrapper */
16722  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16723  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 ";
16724  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16725  PyObject *__pyx_v_obj = 0;
16726  PyObject *__pyx_v_i = 0;
16727  PyObject *__pyx_r = 0;
16728  __Pyx_RefNannyDeclarations
16729  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
16730  {
16731  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16732  PyObject* values[2] = {0,0};
16733  values[1] = ((PyObject *)Py_None);
16734  if (unlikely(__pyx_kwds)) {
16735  Py_ssize_t kw_args;
16736  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16737  switch (pos_args) {
16738  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16739  CYTHON_FALLTHROUGH;
16740  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16741  CYTHON_FALLTHROUGH;
16742  case 0: break;
16743  default: goto __pyx_L5_argtuple_error;
16744  }
16745  kw_args = PyDict_Size(__pyx_kwds);
16746  switch (pos_args) {
16747  case 0:
16748  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16749  else goto __pyx_L5_argtuple_error;
16750  CYTHON_FALLTHROUGH;
16751  case 1:
16752  if (kw_args > 0) {
16753  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16754  if (value) { values[1] = value; kw_args--; }
16755  }
16756  }
16757  if (unlikely(kw_args > 0)) {
16758  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1751, __pyx_L3_error)
16759  }
16760  } else {
16761  switch (PyTuple_GET_SIZE(__pyx_args)) {
16762  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16763  CYTHON_FALLTHROUGH;
16764  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16765  break;
16766  default: goto __pyx_L5_argtuple_error;
16767  }
16768  }
16769  __pyx_v_obj = values[0];
16770  __pyx_v_i = values[1];
16771  }
16772  goto __pyx_L4_argument_unpacking_done;
16773  __pyx_L5_argtuple_error:;
16774  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1751, __pyx_L3_error)
16775  __pyx_L3_error:;
16776  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16777  __Pyx_RefNannyFinishContext();
16778  return NULL;
16779  __pyx_L4_argument_unpacking_done:;
16780  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16781 
16782  /* function exit code */
16783  __Pyx_RefNannyFinishContext();
16784  return __pyx_r;
16785  }
16786 
16787  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16788  PyObject *__pyx_r = NULL;
16789  __Pyx_RefNannyDeclarations
16790  PyObject *__pyx_t_1 = NULL;
16791  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16792  __Pyx_RefNannySetupContext("tan", 0);
16793  __Pyx_XDECREF(__pyx_r);
16794  __pyx_t_2.__pyx_n = 1;
16795  __pyx_t_2.i = __pyx_v_i;
16796  __pyx_t_1 = __pyx_f_8PyClical_tan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1751, __pyx_L1_error)
16797  __Pyx_GOTREF(__pyx_t_1);
16798  __pyx_r = __pyx_t_1;
16799  __pyx_t_1 = 0;
16800  goto __pyx_L0;
16801 
16802  /* function exit code */
16803  __pyx_L1_error:;
16804  __Pyx_XDECREF(__pyx_t_1);
16805  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16806  __pyx_r = NULL;
16807  __pyx_L0:;
16808  __Pyx_XGIVEREF(__pyx_r);
16809  __Pyx_RefNannyFinishContext();
16810  return __pyx_r;
16811  }
16812 
16813  /* "PyClical.pyx":1768
16814  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16815  *
16816  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16817  * """
16818  * Inverse tangent of multivector with optional complexifier.
16819  */
16820 
16821  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16822  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) {
16823  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16824  PyObject *__pyx_r = NULL;
16825  __Pyx_RefNannyDeclarations
16826  int __pyx_t_1;
16827  int __pyx_t_2;
16828  PyObject *__pyx_t_3 = NULL;
16829  Clifford __pyx_t_4;
16830  PyObject *__pyx_t_5 = NULL;
16831  PyObject *__pyx_t_6 = NULL;
16832  PyObject *__pyx_t_7 = NULL;
16833  PyObject *__pyx_t_8 = NULL;
16834  PyObject *__pyx_t_9 = NULL;
16835  PyObject *__pyx_t_10 = NULL;
16836  PyObject *__pyx_t_11 = NULL;
16837  __Pyx_RefNannySetupContext("atan", 0);
16838  if (__pyx_optional_args) {
16839  if (__pyx_optional_args->__pyx_n > 0) {
16840  __pyx_v_i = __pyx_optional_args->i;
16841  }
16842  }
16843 
16844  /* "PyClical.pyx":1777
16845  * {1}
16846  * """
16847  * if not (i is None): # <<<<<<<<<<<<<<
16848  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16849  * else:
16850  */
16851  __pyx_t_1 = (__pyx_v_i != Py_None);
16852  __pyx_t_2 = (__pyx_t_1 != 0);
16853  if (__pyx_t_2) {
16854 
16855  /* "PyClical.pyx":1778
16856  * """
16857  * if not (i is None):
16858  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16859  * else:
16860  * try:
16861  */
16862  __Pyx_XDECREF(__pyx_r);
16863  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1778, __pyx_L1_error)
16864  __Pyx_GOTREF(__pyx_t_3);
16865  try {
16866  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16867  } catch(...) {
16868  __Pyx_CppExn2PyErr();
16869  __PYX_ERR(0, 1778, __pyx_L1_error)
16870  }
16871  __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_ERR(0, 1778, __pyx_L1_error)
16872  __Pyx_GOTREF(__pyx_t_5);
16873  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16874  __pyx_r = __pyx_t_5;
16875  __pyx_t_5 = 0;
16876  goto __pyx_L0;
16877 
16878  /* "PyClical.pyx":1777
16879  * {1}
16880  * """
16881  * if not (i is None): # <<<<<<<<<<<<<<
16882  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16883  * else:
16884  */
16885  }
16886 
16887  /* "PyClical.pyx":1780
16888  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16889  * else:
16890  * try: # <<<<<<<<<<<<<<
16891  * return math.atan(obj)
16892  * except:
16893  */
16894  /*else*/ {
16895  {
16896  __Pyx_PyThreadState_declare
16897  __Pyx_PyThreadState_assign
16898  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16899  __Pyx_XGOTREF(__pyx_t_6);
16900  __Pyx_XGOTREF(__pyx_t_7);
16901  __Pyx_XGOTREF(__pyx_t_8);
16902  /*try:*/ {
16903 
16904  /* "PyClical.pyx":1781
16905  * else:
16906  * try:
16907  * return math.atan(obj) # <<<<<<<<<<<<<<
16908  * except:
16909  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16910  */
16911  __Pyx_XDECREF(__pyx_r);
16912  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L4_error)
16913  __Pyx_GOTREF(__pyx_t_3);
16914  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1781, __pyx_L4_error)
16915  __Pyx_GOTREF(__pyx_t_9);
16916  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16917  __pyx_t_3 = NULL;
16918  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16919  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16920  if (likely(__pyx_t_3)) {
16921  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16922  __Pyx_INCREF(__pyx_t_3);
16923  __Pyx_INCREF(function);
16924  __Pyx_DECREF_SET(__pyx_t_9, function);
16925  }
16926  }
16927  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
16928  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16929  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1781, __pyx_L4_error)
16930  __Pyx_GOTREF(__pyx_t_5);
16931  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16932  __pyx_r = __pyx_t_5;
16933  __pyx_t_5 = 0;
16934  goto __pyx_L8_try_return;
16935 
16936  /* "PyClical.pyx":1780
16937  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16938  * else:
16939  * try: # <<<<<<<<<<<<<<
16940  * return math.atan(obj)
16941  * except:
16942  */
16943  }
16944  __pyx_L4_error:;
16945  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16946  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16947  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16948 
16949  /* "PyClical.pyx":1782
16950  * try:
16951  * return math.atan(obj)
16952  * except: # <<<<<<<<<<<<<<
16953  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16954  *
16955  */
16956  /*except:*/ {
16957  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16958  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1782, __pyx_L6_except_error)
16959  __Pyx_GOTREF(__pyx_t_5);
16960  __Pyx_GOTREF(__pyx_t_9);
16961  __Pyx_GOTREF(__pyx_t_3);
16962 
16963  /* "PyClical.pyx":1783
16964  * return math.atan(obj)
16965  * except:
16966  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16967  *
16968  * cpdef inline tanh(obj):
16969  */
16970  __Pyx_XDECREF(__pyx_r);
16971  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1783, __pyx_L6_except_error)
16972  __Pyx_GOTREF(__pyx_t_10);
16973  __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_ERR(0, 1783, __pyx_L6_except_error)
16974  __Pyx_GOTREF(__pyx_t_11);
16975  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16976  __pyx_r = __pyx_t_11;
16977  __pyx_t_11 = 0;
16978  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16979  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16980  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16981  goto __pyx_L7_except_return;
16982  }
16983  __pyx_L6_except_error:;
16984 
16985  /* "PyClical.pyx":1780
16986  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16987  * else:
16988  * try: # <<<<<<<<<<<<<<
16989  * return math.atan(obj)
16990  * except:
16991  */
16992  __Pyx_XGIVEREF(__pyx_t_6);
16993  __Pyx_XGIVEREF(__pyx_t_7);
16994  __Pyx_XGIVEREF(__pyx_t_8);
16995  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16996  goto __pyx_L1_error;
16997  __pyx_L8_try_return:;
16998  __Pyx_XGIVEREF(__pyx_t_6);
16999  __Pyx_XGIVEREF(__pyx_t_7);
17000  __Pyx_XGIVEREF(__pyx_t_8);
17001  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17002  goto __pyx_L0;
17003  __pyx_L7_except_return:;
17004  __Pyx_XGIVEREF(__pyx_t_6);
17005  __Pyx_XGIVEREF(__pyx_t_7);
17006  __Pyx_XGIVEREF(__pyx_t_8);
17007  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17008  goto __pyx_L0;
17009  }
17010  }
17011 
17012  /* "PyClical.pyx":1768
17013  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17014  *
17015  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17016  * """
17017  * Inverse tangent of multivector with optional complexifier.
17018  */
17019 
17020  /* function exit code */
17021  __pyx_L1_error:;
17022  __Pyx_XDECREF(__pyx_t_3);
17023  __Pyx_XDECREF(__pyx_t_5);
17024  __Pyx_XDECREF(__pyx_t_9);
17025  __Pyx_XDECREF(__pyx_t_10);
17026  __Pyx_XDECREF(__pyx_t_11);
17027  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17028  __pyx_r = 0;
17029  __pyx_L0:;
17030  __Pyx_XGIVEREF(__pyx_r);
17031  __Pyx_RefNannyFinishContext();
17032  return __pyx_r;
17033  }
17034 
17035  /* Python wrapper */
17036  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17037  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 ";
17038  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17039  PyObject *__pyx_v_obj = 0;
17040  PyObject *__pyx_v_i = 0;
17041  PyObject *__pyx_r = 0;
17042  __Pyx_RefNannyDeclarations
17043  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
17044  {
17045  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17046  PyObject* values[2] = {0,0};
17047  values[1] = ((PyObject *)Py_None);
17048  if (unlikely(__pyx_kwds)) {
17049  Py_ssize_t kw_args;
17050  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17051  switch (pos_args) {
17052  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17053  CYTHON_FALLTHROUGH;
17054  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17055  CYTHON_FALLTHROUGH;
17056  case 0: break;
17057  default: goto __pyx_L5_argtuple_error;
17058  }
17059  kw_args = PyDict_Size(__pyx_kwds);
17060  switch (pos_args) {
17061  case 0:
17062  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17063  else goto __pyx_L5_argtuple_error;
17064  CYTHON_FALLTHROUGH;
17065  case 1:
17066  if (kw_args > 0) {
17067  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17068  if (value) { values[1] = value; kw_args--; }
17069  }
17070  }
17071  if (unlikely(kw_args > 0)) {
17072  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1768, __pyx_L3_error)
17073  }
17074  } else {
17075  switch (PyTuple_GET_SIZE(__pyx_args)) {
17076  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17077  CYTHON_FALLTHROUGH;
17078  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17079  break;
17080  default: goto __pyx_L5_argtuple_error;
17081  }
17082  }
17083  __pyx_v_obj = values[0];
17084  __pyx_v_i = values[1];
17085  }
17086  goto __pyx_L4_argument_unpacking_done;
17087  __pyx_L5_argtuple_error:;
17088  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1768, __pyx_L3_error)
17089  __pyx_L3_error:;
17090  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17091  __Pyx_RefNannyFinishContext();
17092  return NULL;
17093  __pyx_L4_argument_unpacking_done:;
17094  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17095 
17096  /* function exit code */
17097  __Pyx_RefNannyFinishContext();
17098  return __pyx_r;
17099  }
17100 
17101  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17102  PyObject *__pyx_r = NULL;
17103  __Pyx_RefNannyDeclarations
17104  PyObject *__pyx_t_1 = NULL;
17105  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
17106  __Pyx_RefNannySetupContext("atan", 0);
17107  __Pyx_XDECREF(__pyx_r);
17108  __pyx_t_2.__pyx_n = 1;
17109  __pyx_t_2.i = __pyx_v_i;
17110  __pyx_t_1 = __pyx_f_8PyClical_atan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error)
17111  __Pyx_GOTREF(__pyx_t_1);
17112  __pyx_r = __pyx_t_1;
17113  __pyx_t_1 = 0;
17114  goto __pyx_L0;
17115 
17116  /* function exit code */
17117  __pyx_L1_error:;
17118  __Pyx_XDECREF(__pyx_t_1);
17119  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17120  __pyx_r = NULL;
17121  __pyx_L0:;
17122  __Pyx_XGIVEREF(__pyx_r);
17123  __Pyx_RefNannyFinishContext();
17124  return __pyx_r;
17125  }
17126 
17127  /* "PyClical.pyx":1785
17128  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17129  *
17130  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17131  * """
17132  * Hyperbolic tangent of multivector.
17133  */
17134 
17135  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17136  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17137  PyObject *__pyx_r = NULL;
17138  __Pyx_RefNannyDeclarations
17139  PyObject *__pyx_t_1 = NULL;
17140  PyObject *__pyx_t_2 = NULL;
17141  PyObject *__pyx_t_3 = NULL;
17142  PyObject *__pyx_t_4 = NULL;
17143  PyObject *__pyx_t_5 = NULL;
17144  PyObject *__pyx_t_6 = NULL;
17145  PyObject *__pyx_t_7 = NULL;
17146  PyObject *__pyx_t_8 = NULL;
17147  __Pyx_RefNannySetupContext("tanh", 0);
17148 
17149  /* "PyClical.pyx":1792
17150  * {1,2}
17151  * """
17152  * try: # <<<<<<<<<<<<<<
17153  * return math.tanh(obj)
17154  * except:
17155  */
17156  {
17157  __Pyx_PyThreadState_declare
17158  __Pyx_PyThreadState_assign
17159  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
17160  __Pyx_XGOTREF(__pyx_t_1);
17161  __Pyx_XGOTREF(__pyx_t_2);
17162  __Pyx_XGOTREF(__pyx_t_3);
17163  /*try:*/ {
17164 
17165  /* "PyClical.pyx":1793
17166  * """
17167  * try:
17168  * return math.tanh(obj) # <<<<<<<<<<<<<<
17169  * except:
17170  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17171  */
17172  __Pyx_XDECREF(__pyx_r);
17173  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1793, __pyx_L3_error)
17174  __Pyx_GOTREF(__pyx_t_5);
17175  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tanh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1793, __pyx_L3_error)
17176  __Pyx_GOTREF(__pyx_t_6);
17177  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17178  __pyx_t_5 = NULL;
17179  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17180  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
17181  if (likely(__pyx_t_5)) {
17182  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17183  __Pyx_INCREF(__pyx_t_5);
17184  __Pyx_INCREF(function);
17185  __Pyx_DECREF_SET(__pyx_t_6, function);
17186  }
17187  }
17188  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
17189  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17190  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1793, __pyx_L3_error)
17191  __Pyx_GOTREF(__pyx_t_4);
17192  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17193  __pyx_r = __pyx_t_4;
17194  __pyx_t_4 = 0;
17195  goto __pyx_L7_try_return;
17196 
17197  /* "PyClical.pyx":1792
17198  * {1,2}
17199  * """
17200  * try: # <<<<<<<<<<<<<<
17201  * return math.tanh(obj)
17202  * except:
17203  */
17204  }
17205  __pyx_L3_error:;
17206  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17207  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17208  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17209 
17210  /* "PyClical.pyx":1794
17211  * try:
17212  * return math.tanh(obj)
17213  * except: # <<<<<<<<<<<<<<
17214  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17215  *
17216  */
17217  /*except:*/ {
17218  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17219  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1794, __pyx_L5_except_error)
17220  __Pyx_GOTREF(__pyx_t_4);
17221  __Pyx_GOTREF(__pyx_t_6);
17222  __Pyx_GOTREF(__pyx_t_5);
17223 
17224  /* "PyClical.pyx":1795
17225  * return math.tanh(obj)
17226  * except:
17227  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17228  *
17229  * cpdef inline atanh(obj,i = None):
17230  */
17231  __Pyx_XDECREF(__pyx_r);
17232  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1795, __pyx_L5_except_error)
17233  __Pyx_GOTREF(__pyx_t_7);
17234  __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_ERR(0, 1795, __pyx_L5_except_error)
17235  __Pyx_GOTREF(__pyx_t_8);
17236  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17237  __pyx_r = __pyx_t_8;
17238  __pyx_t_8 = 0;
17239  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17240  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17241  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17242  goto __pyx_L6_except_return;
17243  }
17244  __pyx_L5_except_error:;
17245 
17246  /* "PyClical.pyx":1792
17247  * {1,2}
17248  * """
17249  * try: # <<<<<<<<<<<<<<
17250  * return math.tanh(obj)
17251  * except:
17252  */
17253  __Pyx_XGIVEREF(__pyx_t_1);
17254  __Pyx_XGIVEREF(__pyx_t_2);
17255  __Pyx_XGIVEREF(__pyx_t_3);
17256  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17257  goto __pyx_L1_error;
17258  __pyx_L7_try_return:;
17259  __Pyx_XGIVEREF(__pyx_t_1);
17260  __Pyx_XGIVEREF(__pyx_t_2);
17261  __Pyx_XGIVEREF(__pyx_t_3);
17262  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17263  goto __pyx_L0;
17264  __pyx_L6_except_return:;
17265  __Pyx_XGIVEREF(__pyx_t_1);
17266  __Pyx_XGIVEREF(__pyx_t_2);
17267  __Pyx_XGIVEREF(__pyx_t_3);
17268  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17269  goto __pyx_L0;
17270  }
17271 
17272  /* "PyClical.pyx":1785
17273  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17274  *
17275  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17276  * """
17277  * Hyperbolic tangent of multivector.
17278  */
17279 
17280  /* function exit code */
17281  __pyx_L1_error:;
17282  __Pyx_XDECREF(__pyx_t_4);
17283  __Pyx_XDECREF(__pyx_t_5);
17284  __Pyx_XDECREF(__pyx_t_6);
17285  __Pyx_XDECREF(__pyx_t_7);
17286  __Pyx_XDECREF(__pyx_t_8);
17287  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17288  __pyx_r = 0;
17289  __pyx_L0:;
17290  __Pyx_XGIVEREF(__pyx_r);
17291  __Pyx_RefNannyFinishContext();
17292  return __pyx_r;
17293  }
17294 
17295  /* Python wrapper */
17296  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17297  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 ";
17298  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17299  PyObject *__pyx_r = 0;
17300  __Pyx_RefNannyDeclarations
17301  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17302  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17303 
17304  /* function exit code */
17305  __Pyx_RefNannyFinishContext();
17306  return __pyx_r;
17307  }
17308 
17309  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17310  PyObject *__pyx_r = NULL;
17311  __Pyx_RefNannyDeclarations
17312  PyObject *__pyx_t_1 = NULL;
17313  __Pyx_RefNannySetupContext("tanh", 0);
17314  __Pyx_XDECREF(__pyx_r);
17315  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error)
17316  __Pyx_GOTREF(__pyx_t_1);
17317  __pyx_r = __pyx_t_1;
17318  __pyx_t_1 = 0;
17319  goto __pyx_L0;
17320 
17321  /* function exit code */
17322  __pyx_L1_error:;
17323  __Pyx_XDECREF(__pyx_t_1);
17324  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17325  __pyx_r = NULL;
17326  __pyx_L0:;
17327  __Pyx_XGIVEREF(__pyx_r);
17328  __Pyx_RefNannyFinishContext();
17329  return __pyx_r;
17330  }
17331 
17332  /* "PyClical.pyx":1797
17333  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17334  *
17335  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17336  * """
17337  * Inverse hyperbolic tangent of multivector with optional complexifier.
17338  */
17339 
17340  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17341  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) {
17342  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17343  PyObject *__pyx_r = NULL;
17344  __Pyx_RefNannyDeclarations
17345  int __pyx_t_1;
17346  int __pyx_t_2;
17347  PyObject *__pyx_t_3 = NULL;
17348  Clifford __pyx_t_4;
17349  PyObject *__pyx_t_5 = NULL;
17350  PyObject *__pyx_t_6 = NULL;
17351  PyObject *__pyx_t_7 = NULL;
17352  PyObject *__pyx_t_8 = NULL;
17353  PyObject *__pyx_t_9 = NULL;
17354  PyObject *__pyx_t_10 = NULL;
17355  PyObject *__pyx_t_11 = NULL;
17356  __Pyx_RefNannySetupContext("atanh", 0);
17357  if (__pyx_optional_args) {
17358  if (__pyx_optional_args->__pyx_n > 0) {
17359  __pyx_v_i = __pyx_optional_args->i;
17360  }
17361  }
17362 
17363  /* "PyClical.pyx":1806
17364  * {1,2}
17365  * """
17366  * if not (i is None): # <<<<<<<<<<<<<<
17367  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17368  * else:
17369  */
17370  __pyx_t_1 = (__pyx_v_i != Py_None);
17371  __pyx_t_2 = (__pyx_t_1 != 0);
17372  if (__pyx_t_2) {
17373 
17374  /* "PyClical.pyx":1807
17375  * """
17376  * if not (i is None):
17377  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17378  * else:
17379  * try:
17380  */
17381  __Pyx_XDECREF(__pyx_r);
17382  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1807, __pyx_L1_error)
17383  __Pyx_GOTREF(__pyx_t_3);
17384  try {
17385  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17386  } catch(...) {
17387  __Pyx_CppExn2PyErr();
17388  __PYX_ERR(0, 1807, __pyx_L1_error)
17389  }
17390  __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_ERR(0, 1807, __pyx_L1_error)
17391  __Pyx_GOTREF(__pyx_t_5);
17392  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17393  __pyx_r = __pyx_t_5;
17394  __pyx_t_5 = 0;
17395  goto __pyx_L0;
17396 
17397  /* "PyClical.pyx":1806
17398  * {1,2}
17399  * """
17400  * if not (i is None): # <<<<<<<<<<<<<<
17401  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17402  * else:
17403  */
17404  }
17405 
17406  /* "PyClical.pyx":1809
17407  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17408  * else:
17409  * try: # <<<<<<<<<<<<<<
17410  * return math.atanh(obj)
17411  * except:
17412  */
17413  /*else*/ {
17414  {
17415  __Pyx_PyThreadState_declare
17416  __Pyx_PyThreadState_assign
17417  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17418  __Pyx_XGOTREF(__pyx_t_6);
17419  __Pyx_XGOTREF(__pyx_t_7);
17420  __Pyx_XGOTREF(__pyx_t_8);
17421  /*try:*/ {
17422 
17423  /* "PyClical.pyx":1810
17424  * else:
17425  * try:
17426  * return math.atanh(obj) # <<<<<<<<<<<<<<
17427  * except:
17428  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17429  */
17430  __Pyx_XDECREF(__pyx_r);
17431  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1810, __pyx_L4_error)
17432  __Pyx_GOTREF(__pyx_t_3);
17433  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atanh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1810, __pyx_L4_error)
17434  __Pyx_GOTREF(__pyx_t_9);
17435  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17436  __pyx_t_3 = NULL;
17437  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17438  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17439  if (likely(__pyx_t_3)) {
17440  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17441  __Pyx_INCREF(__pyx_t_3);
17442  __Pyx_INCREF(function);
17443  __Pyx_DECREF_SET(__pyx_t_9, function);
17444  }
17445  }
17446  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
17447  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17448  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1810, __pyx_L4_error)
17449  __Pyx_GOTREF(__pyx_t_5);
17450  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17451  __pyx_r = __pyx_t_5;
17452  __pyx_t_5 = 0;
17453  goto __pyx_L8_try_return;
17454 
17455  /* "PyClical.pyx":1809
17456  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17457  * else:
17458  * try: # <<<<<<<<<<<<<<
17459  * return math.atanh(obj)
17460  * except:
17461  */
17462  }
17463  __pyx_L4_error:;
17464  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17465  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17466  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17467 
17468  /* "PyClical.pyx":1811
17469  * try:
17470  * return math.atanh(obj)
17471  * except: # <<<<<<<<<<<<<<
17472  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17473  *
17474  */
17475  /*except:*/ {
17476  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17477  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1811, __pyx_L6_except_error)
17478  __Pyx_GOTREF(__pyx_t_5);
17479  __Pyx_GOTREF(__pyx_t_9);
17480  __Pyx_GOTREF(__pyx_t_3);
17481 
17482  /* "PyClical.pyx":1812
17483  * return math.atanh(obj)
17484  * except:
17485  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17486  *
17487  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17488  */
17489  __Pyx_XDECREF(__pyx_r);
17490  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17491  __Pyx_GOTREF(__pyx_t_10);
17492  __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_ERR(0, 1812, __pyx_L6_except_error)
17493  __Pyx_GOTREF(__pyx_t_11);
17494  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17495  __pyx_r = __pyx_t_11;
17496  __pyx_t_11 = 0;
17497  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17498  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17499  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17500  goto __pyx_L7_except_return;
17501  }
17502  __pyx_L6_except_error:;
17503 
17504  /* "PyClical.pyx":1809
17505  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17506  * else:
17507  * try: # <<<<<<<<<<<<<<
17508  * return math.atanh(obj)
17509  * except:
17510  */
17511  __Pyx_XGIVEREF(__pyx_t_6);
17512  __Pyx_XGIVEREF(__pyx_t_7);
17513  __Pyx_XGIVEREF(__pyx_t_8);
17514  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17515  goto __pyx_L1_error;
17516  __pyx_L8_try_return:;
17517  __Pyx_XGIVEREF(__pyx_t_6);
17518  __Pyx_XGIVEREF(__pyx_t_7);
17519  __Pyx_XGIVEREF(__pyx_t_8);
17520  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17521  goto __pyx_L0;
17522  __pyx_L7_except_return:;
17523  __Pyx_XGIVEREF(__pyx_t_6);
17524  __Pyx_XGIVEREF(__pyx_t_7);
17525  __Pyx_XGIVEREF(__pyx_t_8);
17526  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17527  goto __pyx_L0;
17528  }
17529  }
17530 
17531  /* "PyClical.pyx":1797
17532  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17533  *
17534  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17535  * """
17536  * Inverse hyperbolic tangent of multivector with optional complexifier.
17537  */
17538 
17539  /* function exit code */
17540  __pyx_L1_error:;
17541  __Pyx_XDECREF(__pyx_t_3);
17542  __Pyx_XDECREF(__pyx_t_5);
17543  __Pyx_XDECREF(__pyx_t_9);
17544  __Pyx_XDECREF(__pyx_t_10);
17545  __Pyx_XDECREF(__pyx_t_11);
17546  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17547  __pyx_r = 0;
17548  __pyx_L0:;
17549  __Pyx_XGIVEREF(__pyx_r);
17550  __Pyx_RefNannyFinishContext();
17551  return __pyx_r;
17552  }
17553 
17554  /* Python wrapper */
17555  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17556  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 ";
17557  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17558  PyObject *__pyx_v_obj = 0;
17559  PyObject *__pyx_v_i = 0;
17560  PyObject *__pyx_r = 0;
17561  __Pyx_RefNannyDeclarations
17562  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17563  {
17564  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17565  PyObject* values[2] = {0,0};
17566  values[1] = ((PyObject *)Py_None);
17567  if (unlikely(__pyx_kwds)) {
17568  Py_ssize_t kw_args;
17569  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17570  switch (pos_args) {
17571  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17572  CYTHON_FALLTHROUGH;
17573  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17574  CYTHON_FALLTHROUGH;
17575  case 0: break;
17576  default: goto __pyx_L5_argtuple_error;
17577  }
17578  kw_args = PyDict_Size(__pyx_kwds);
17579  switch (pos_args) {
17580  case 0:
17581  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17582  else goto __pyx_L5_argtuple_error;
17583  CYTHON_FALLTHROUGH;
17584  case 1:
17585  if (kw_args > 0) {
17586  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17587  if (value) { values[1] = value; kw_args--; }
17588  }
17589  }
17590  if (unlikely(kw_args > 0)) {
17591  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1797, __pyx_L3_error)
17592  }
17593  } else {
17594  switch (PyTuple_GET_SIZE(__pyx_args)) {
17595  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17596  CYTHON_FALLTHROUGH;
17597  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17598  break;
17599  default: goto __pyx_L5_argtuple_error;
17600  }
17601  }
17602  __pyx_v_obj = values[0];
17603  __pyx_v_i = values[1];
17604  }
17605  goto __pyx_L4_argument_unpacking_done;
17606  __pyx_L5_argtuple_error:;
17607  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1797, __pyx_L3_error)
17608  __pyx_L3_error:;
17609  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17610  __Pyx_RefNannyFinishContext();
17611  return NULL;
17612  __pyx_L4_argument_unpacking_done:;
17613  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17614 
17615  /* function exit code */
17616  __Pyx_RefNannyFinishContext();
17617  return __pyx_r;
17618  }
17619 
17620  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17621  PyObject *__pyx_r = NULL;
17622  __Pyx_RefNannyDeclarations
17623  PyObject *__pyx_t_1 = NULL;
17624  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17625  __Pyx_RefNannySetupContext("atanh", 0);
17626  __Pyx_XDECREF(__pyx_r);
17627  __pyx_t_2.__pyx_n = 1;
17628  __pyx_t_2.i = __pyx_v_i;
17629  __pyx_t_1 = __pyx_f_8PyClical_atanh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1797, __pyx_L1_error)
17630  __Pyx_GOTREF(__pyx_t_1);
17631  __pyx_r = __pyx_t_1;
17632  __pyx_t_1 = 0;
17633  goto __pyx_L0;
17634 
17635  /* function exit code */
17636  __pyx_L1_error:;
17637  __Pyx_XDECREF(__pyx_t_1);
17638  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17639  __pyx_r = NULL;
17640  __pyx_L0:;
17641  __Pyx_XGIVEREF(__pyx_r);
17642  __Pyx_RefNannyFinishContext();
17643  return __pyx_r;
17644  }
17645 
17646  /* "PyClical.pyx":1814
17647  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17648  *
17649  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17650  * """
17651  * Random multivector within a frame.
17652  */
17653 
17654  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17655  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) {
17656  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17657  PyObject *__pyx_r = NULL;
17658  __Pyx_RefNannyDeclarations
17659  PyObject *__pyx_t_1 = NULL;
17660  PyObject *__pyx_t_2 = NULL;
17661  scalar_t __pyx_t_3;
17662  PyObject *__pyx_t_4 = NULL;
17663  __Pyx_RefNannySetupContext("random_clifford", 0);
17664  if (__pyx_optional_args) {
17665  if (__pyx_optional_args->__pyx_n > 0) {
17666  __pyx_v_fill = __pyx_optional_args->fill;
17667  }
17668  }
17669 
17670  /* "PyClical.pyx":1821
17671  * {-3,-1,2}
17672  * """
17673  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
17674  *
17675  * cpdef inline cga3(obj):
17676  */
17677  __Pyx_XDECREF(__pyx_r);
17678  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
17679  __Pyx_GOTREF(__pyx_t_1);
17680  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error)
17681  __Pyx_GOTREF(__pyx_t_2);
17682  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_fill); if (unlikely((__pyx_t_3 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1821, __pyx_L1_error)
17683  __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_ERR(0, 1821, __pyx_L1_error)
17684  __Pyx_GOTREF(__pyx_t_4);
17685  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17686  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17687  __pyx_r = __pyx_t_4;
17688  __pyx_t_4 = 0;
17689  goto __pyx_L0;
17690 
17691  /* "PyClical.pyx":1814
17692  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17693  *
17694  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17695  * """
17696  * Random multivector within a frame.
17697  */
17698 
17699  /* function exit code */
17700  __pyx_L1_error:;
17701  __Pyx_XDECREF(__pyx_t_1);
17702  __Pyx_XDECREF(__pyx_t_2);
17703  __Pyx_XDECREF(__pyx_t_4);
17704  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17705  __pyx_r = 0;
17706  __pyx_L0:;
17707  __Pyx_XGIVEREF(__pyx_r);
17708  __Pyx_RefNannyFinishContext();
17709  return __pyx_r;
17710  }
17711 
17712  /* Python wrapper */
17713  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17714  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 ";
17715  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17716  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17717  PyObject *__pyx_v_fill = 0;
17718  PyObject *__pyx_r = 0;
17719  __Pyx_RefNannyDeclarations
17720  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
17721  {
17722  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17723  PyObject* values[2] = {0,0};
17724  values[1] = ((PyObject *)__pyx_float_1_0);
17725  if (unlikely(__pyx_kwds)) {
17726  Py_ssize_t kw_args;
17727  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17728  switch (pos_args) {
17729  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17730  CYTHON_FALLTHROUGH;
17731  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17732  CYTHON_FALLTHROUGH;
17733  case 0: break;
17734  default: goto __pyx_L5_argtuple_error;
17735  }
17736  kw_args = PyDict_Size(__pyx_kwds);
17737  switch (pos_args) {
17738  case 0:
17739  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17740  else goto __pyx_L5_argtuple_error;
17741  CYTHON_FALLTHROUGH;
17742  case 1:
17743  if (kw_args > 0) {
17744  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
17745  if (value) { values[1] = value; kw_args--; }
17746  }
17747  }
17748  if (unlikely(kw_args > 0)) {
17749  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1814, __pyx_L3_error)
17750  }
17751  } else {
17752  switch (PyTuple_GET_SIZE(__pyx_args)) {
17753  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17754  CYTHON_FALLTHROUGH;
17755  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17756  break;
17757  default: goto __pyx_L5_argtuple_error;
17758  }
17759  }
17760  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
17761  __pyx_v_fill = values[1];
17762  }
17763  goto __pyx_L4_argument_unpacking_done;
17764  __pyx_L5_argtuple_error:;
17765  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1814, __pyx_L3_error)
17766  __pyx_L3_error:;
17767  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17768  __Pyx_RefNannyFinishContext();
17769  return NULL;
17770  __pyx_L4_argument_unpacking_done:;
17771  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1814, __pyx_L1_error)
17772  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17773 
17774  /* function exit code */
17775  goto __pyx_L0;
17776  __pyx_L1_error:;
17777  __pyx_r = NULL;
17778  __pyx_L0:;
17779  __Pyx_RefNannyFinishContext();
17780  return __pyx_r;
17781  }
17782 
17783  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) {
17784  PyObject *__pyx_r = NULL;
17785  __Pyx_RefNannyDeclarations
17786  PyObject *__pyx_t_1 = NULL;
17787  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17788  __Pyx_RefNannySetupContext("random_clifford", 0);
17789  __Pyx_XDECREF(__pyx_r);
17790  __pyx_t_2.__pyx_n = 1;
17791  __pyx_t_2.fill = __pyx_v_fill;
17792  __pyx_t_1 = __pyx_f_8PyClical_random_clifford(__pyx_v_ixt, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1814, __pyx_L1_error)
17793  __Pyx_GOTREF(__pyx_t_1);
17794  __pyx_r = __pyx_t_1;
17795  __pyx_t_1 = 0;
17796  goto __pyx_L0;
17797 
17798  /* function exit code */
17799  __pyx_L1_error:;
17800  __Pyx_XDECREF(__pyx_t_1);
17801  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17802  __pyx_r = NULL;
17803  __pyx_L0:;
17804  __Pyx_XGIVEREF(__pyx_r);
17805  __Pyx_RefNannyFinishContext();
17806  return __pyx_r;
17807  }
17808 
17809  /* "PyClical.pyx":1823
17810  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17811  *
17812  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17813  * """
17814  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17815  */
17816 
17817  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17818  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17819  PyObject *__pyx_r = NULL;
17820  __Pyx_RefNannyDeclarations
17821  PyObject *__pyx_t_1 = NULL;
17822  PyObject *__pyx_t_2 = NULL;
17823  __Pyx_RefNannySetupContext("cga3", 0);
17824 
17825  /* "PyClical.pyx":1830
17826  * 87{-1}+4{1}+18{2}+2{3}+85{4}
17827  * """
17828  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17829  *
17830  * cpdef inline cga3std(obj):
17831  */
17832  __Pyx_XDECREF(__pyx_r);
17833  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
17834  __Pyx_GOTREF(__pyx_t_1);
17835  __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_ERR(0, 1830, __pyx_L1_error)
17836  __Pyx_GOTREF(__pyx_t_2);
17837  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17838  __pyx_r = __pyx_t_2;
17839  __pyx_t_2 = 0;
17840  goto __pyx_L0;
17841 
17842  /* "PyClical.pyx":1823
17843  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17844  *
17845  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17846  * """
17847  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17848  */
17849 
17850  /* function exit code */
17851  __pyx_L1_error:;
17852  __Pyx_XDECREF(__pyx_t_1);
17853  __Pyx_XDECREF(__pyx_t_2);
17854  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17855  __pyx_r = 0;
17856  __pyx_L0:;
17857  __Pyx_XGIVEREF(__pyx_r);
17858  __Pyx_RefNannyFinishContext();
17859  return __pyx_r;
17860  }
17861 
17862  /* Python wrapper */
17863  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17864  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 ";
17865  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17866  PyObject *__pyx_r = 0;
17867  __Pyx_RefNannyDeclarations
17868  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
17869  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
17870 
17871  /* function exit code */
17872  __Pyx_RefNannyFinishContext();
17873  return __pyx_r;
17874  }
17875 
17876  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17877  PyObject *__pyx_r = NULL;
17878  __Pyx_RefNannyDeclarations
17879  PyObject *__pyx_t_1 = NULL;
17880  __Pyx_RefNannySetupContext("cga3", 0);
17881  __Pyx_XDECREF(__pyx_r);
17882  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1823, __pyx_L1_error)
17883  __Pyx_GOTREF(__pyx_t_1);
17884  __pyx_r = __pyx_t_1;
17885  __pyx_t_1 = 0;
17886  goto __pyx_L0;
17887 
17888  /* function exit code */
17889  __pyx_L1_error:;
17890  __Pyx_XDECREF(__pyx_t_1);
17891  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17892  __pyx_r = NULL;
17893  __pyx_L0:;
17894  __Pyx_XGIVEREF(__pyx_r);
17895  __Pyx_RefNannyFinishContext();
17896  return __pyx_r;
17897  }
17898 
17899  /* "PyClical.pyx":1832
17900  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17901  *
17902  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17903  * """
17904  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17905  */
17906 
17907  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17908  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17909  PyObject *__pyx_r = NULL;
17910  __Pyx_RefNannyDeclarations
17911  PyObject *__pyx_t_1 = NULL;
17912  PyObject *__pyx_t_2 = NULL;
17913  __Pyx_RefNannySetupContext("cga3std", 0);
17914 
17915  /* "PyClical.pyx":1841
17916  * 0
17917  * """
17918  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
17919  *
17920  * cpdef inline agc3(obj):
17921  */
17922  __Pyx_XDECREF(__pyx_r);
17923  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error)
17924  __Pyx_GOTREF(__pyx_t_1);
17925  __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_ERR(0, 1841, __pyx_L1_error)
17926  __Pyx_GOTREF(__pyx_t_2);
17927  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17928  __pyx_r = __pyx_t_2;
17929  __pyx_t_2 = 0;
17930  goto __pyx_L0;
17931 
17932  /* "PyClical.pyx":1832
17933  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17934  *
17935  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17936  * """
17937  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17938  */
17939 
17940  /* function exit code */
17941  __pyx_L1_error:;
17942  __Pyx_XDECREF(__pyx_t_1);
17943  __Pyx_XDECREF(__pyx_t_2);
17944  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17945  __pyx_r = 0;
17946  __pyx_L0:;
17947  __Pyx_XGIVEREF(__pyx_r);
17948  __Pyx_RefNannyFinishContext();
17949  return __pyx_r;
17950  }
17951 
17952  /* Python wrapper */
17953  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17954  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 ";
17955  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17956  PyObject *__pyx_r = 0;
17957  __Pyx_RefNannyDeclarations
17958  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
17959  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
17960 
17961  /* function exit code */
17962  __Pyx_RefNannyFinishContext();
17963  return __pyx_r;
17964  }
17965 
17966  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17967  PyObject *__pyx_r = NULL;
17968  __Pyx_RefNannyDeclarations
17969  PyObject *__pyx_t_1 = NULL;
17970  __Pyx_RefNannySetupContext("cga3std", 0);
17971  __Pyx_XDECREF(__pyx_r);
17972  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L1_error)
17973  __Pyx_GOTREF(__pyx_t_1);
17974  __pyx_r = __pyx_t_1;
17975  __pyx_t_1 = 0;
17976  goto __pyx_L0;
17977 
17978  /* function exit code */
17979  __pyx_L1_error:;
17980  __Pyx_XDECREF(__pyx_t_1);
17981  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17982  __pyx_r = NULL;
17983  __pyx_L0:;
17984  __Pyx_XGIVEREF(__pyx_r);
17985  __Pyx_RefNannyFinishContext();
17986  return __pyx_r;
17987  }
17988 
17989  /* "PyClical.pyx":1843
17990  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17991  *
17992  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17993  * """
17994  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17995  */
17996 
17997  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17998  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17999  PyObject *__pyx_r = NULL;
18000  __Pyx_RefNannyDeclarations
18001  PyObject *__pyx_t_1 = NULL;
18002  PyObject *__pyx_t_2 = NULL;
18003  __Pyx_RefNannySetupContext("agc3", 0);
18004 
18005  /* "PyClical.pyx":1852
18006  * 0
18007  * """
18008  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18009  *
18010  * # Some abbreviations.
18011  */
18012  __Pyx_XDECREF(__pyx_r);
18013  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error)
18014  __Pyx_GOTREF(__pyx_t_1);
18015  __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_ERR(0, 1852, __pyx_L1_error)
18016  __Pyx_GOTREF(__pyx_t_2);
18017  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18018  __pyx_r = __pyx_t_2;
18019  __pyx_t_2 = 0;
18020  goto __pyx_L0;
18021 
18022  /* "PyClical.pyx":1843
18023  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18024  *
18025  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18026  * """
18027  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18028  */
18029 
18030  /* function exit code */
18031  __pyx_L1_error:;
18032  __Pyx_XDECREF(__pyx_t_1);
18033  __Pyx_XDECREF(__pyx_t_2);
18034  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18035  __pyx_r = 0;
18036  __pyx_L0:;
18037  __Pyx_XGIVEREF(__pyx_r);
18038  __Pyx_RefNannyFinishContext();
18039  return __pyx_r;
18040  }
18041 
18042  /* Python wrapper */
18043  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18044  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 ";
18045  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18046  PyObject *__pyx_r = 0;
18047  __Pyx_RefNannyDeclarations
18048  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
18049  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
18050 
18051  /* function exit code */
18052  __Pyx_RefNannyFinishContext();
18053  return __pyx_r;
18054  }
18055 
18056  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18057  PyObject *__pyx_r = NULL;
18058  __Pyx_RefNannyDeclarations
18059  PyObject *__pyx_t_1 = NULL;
18060  __Pyx_RefNannySetupContext("agc3", 0);
18061  __Pyx_XDECREF(__pyx_r);
18062  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
18063  __Pyx_GOTREF(__pyx_t_1);
18064  __pyx_r = __pyx_t_1;
18065  __pyx_t_1 = 0;
18066  goto __pyx_L0;
18067 
18068  /* function exit code */
18069  __pyx_L1_error:;
18070  __Pyx_XDECREF(__pyx_t_1);
18071  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18072  __pyx_r = NULL;
18073  __pyx_L0:;
18074  __Pyx_XGIVEREF(__pyx_r);
18075  __Pyx_RefNannyFinishContext();
18076  return __pyx_r;
18077  }
18078 
18079  /* "PyClical.pyx":1886
18080  * """
18081  *
18082  * def e(obj): # <<<<<<<<<<<<<<
18083  * """
18084  * Abbreviation for clifford(index_set(obj)).
18085  */
18086 
18087  /* Python wrapper */
18088  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18089  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 ";
18090  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
18091  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18092  PyObject *__pyx_r = 0;
18093  __Pyx_RefNannyDeclarations
18094  __Pyx_RefNannySetupContext("e (wrapper)", 0);
18095  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
18096 
18097  /* function exit code */
18098  __Pyx_RefNannyFinishContext();
18099  return __pyx_r;
18100  }
18101 
18102  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18103  PyObject *__pyx_r = NULL;
18104  __Pyx_RefNannyDeclarations
18105  PyObject *__pyx_t_1 = NULL;
18106  PyObject *__pyx_t_2 = NULL;
18107  __Pyx_RefNannySetupContext("e", 0);
18108 
18109  /* "PyClical.pyx":1897
18110  * 1
18111  * """
18112  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
18113  *
18114  * def istpq(p, q):
18115  */
18116  __Pyx_XDECREF(__pyx_r);
18117  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1897, __pyx_L1_error)
18118  __Pyx_GOTREF(__pyx_t_1);
18119  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1897, __pyx_L1_error)
18120  __Pyx_GOTREF(__pyx_t_2);
18121  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18122  __pyx_r = __pyx_t_2;
18123  __pyx_t_2 = 0;
18124  goto __pyx_L0;
18125 
18126  /* "PyClical.pyx":1886
18127  * """
18128  *
18129  * def e(obj): # <<<<<<<<<<<<<<
18130  * """
18131  * Abbreviation for clifford(index_set(obj)).
18132  */
18133 
18134  /* function exit code */
18135  __pyx_L1_error:;
18136  __Pyx_XDECREF(__pyx_t_1);
18137  __Pyx_XDECREF(__pyx_t_2);
18138  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
18139  __pyx_r = NULL;
18140  __pyx_L0:;
18141  __Pyx_XGIVEREF(__pyx_r);
18142  __Pyx_RefNannyFinishContext();
18143  return __pyx_r;
18144  }
18145 
18146  /* "PyClical.pyx":1899
18147  * return clifford(index_set(obj))
18148  *
18149  * def istpq(p, q): # <<<<<<<<<<<<<<
18150  * """
18151  * Abbreviation for index_set({-q,...p}).
18152  */
18153 
18154  /* Python wrapper */
18155  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18156  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 ";
18157  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
18158  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18159  PyObject *__pyx_v_p = 0;
18160  PyObject *__pyx_v_q = 0;
18161  PyObject *__pyx_r = 0;
18162  __Pyx_RefNannyDeclarations
18163  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
18164  {
18165  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
18166  PyObject* values[2] = {0,0};
18167  if (unlikely(__pyx_kwds)) {
18168  Py_ssize_t kw_args;
18169  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18170  switch (pos_args) {
18171  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18172  CYTHON_FALLTHROUGH;
18173  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18174  CYTHON_FALLTHROUGH;
18175  case 0: break;
18176  default: goto __pyx_L5_argtuple_error;
18177  }
18178  kw_args = PyDict_Size(__pyx_kwds);
18179  switch (pos_args) {
18180  case 0:
18181  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
18182  else goto __pyx_L5_argtuple_error;
18183  CYTHON_FALLTHROUGH;
18184  case 1:
18185  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
18186  else {
18187  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1899, __pyx_L3_error)
18188  }
18189  }
18190  if (unlikely(kw_args > 0)) {
18191  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1899, __pyx_L3_error)
18192  }
18193  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18194  goto __pyx_L5_argtuple_error;
18195  } else {
18196  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18197  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18198  }
18199  __pyx_v_p = values[0];
18200  __pyx_v_q = values[1];
18201  }
18202  goto __pyx_L4_argument_unpacking_done;
18203  __pyx_L5_argtuple_error:;
18204  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1899, __pyx_L3_error)
18205  __pyx_L3_error:;
18206  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18207  __Pyx_RefNannyFinishContext();
18208  return NULL;
18209  __pyx_L4_argument_unpacking_done:;
18210  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18211 
18212  /* function exit code */
18213  __Pyx_RefNannyFinishContext();
18214  return __pyx_r;
18215  }
18216 
18217  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18218  PyObject *__pyx_r = NULL;
18219  __Pyx_RefNannyDeclarations
18220  PyObject *__pyx_t_1 = NULL;
18221  PyObject *__pyx_t_2 = NULL;
18222  PyObject *__pyx_t_3 = NULL;
18223  __Pyx_RefNannySetupContext("istpq", 0);
18224 
18225  /* "PyClical.pyx":1906
18226  * {-3,-2,-1,1,2}
18227  * """
18228  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
18229  *
18230  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18231  */
18232  __Pyx_XDECREF(__pyx_r);
18233  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error)
18234  __Pyx_GOTREF(__pyx_t_1);
18235  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_p, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1906, __pyx_L1_error)
18236  __Pyx_GOTREF(__pyx_t_2);
18237  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error)
18238  __Pyx_GOTREF(__pyx_t_3);
18239  __Pyx_GIVEREF(__pyx_t_1);
18240  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18241  __Pyx_GIVEREF(__pyx_t_2);
18242  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18243  __pyx_t_1 = 0;
18244  __pyx_t_2 = 0;
18245  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1906, __pyx_L1_error)
18246  __Pyx_GOTREF(__pyx_t_2);
18247  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18248  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error)
18249  __Pyx_GOTREF(__pyx_t_3);
18250  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18251  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1906, __pyx_L1_error)
18252  __Pyx_GOTREF(__pyx_t_2);
18253  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18254  __pyx_r = __pyx_t_2;
18255  __pyx_t_2 = 0;
18256  goto __pyx_L0;
18257 
18258  /* "PyClical.pyx":1899
18259  * return clifford(index_set(obj))
18260  *
18261  * def istpq(p, q): # <<<<<<<<<<<<<<
18262  * """
18263  * Abbreviation for index_set({-q,...p}).
18264  */
18265 
18266  /* function exit code */
18267  __pyx_L1_error:;
18268  __Pyx_XDECREF(__pyx_t_1);
18269  __Pyx_XDECREF(__pyx_t_2);
18270  __Pyx_XDECREF(__pyx_t_3);
18271  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18272  __pyx_r = NULL;
18273  __pyx_L0:;
18274  __Pyx_XGIVEREF(__pyx_r);
18275  __Pyx_RefNannyFinishContext();
18276  return __pyx_r;
18277  }
18278 
18279  /* "PyClical.pyx":1912
18280  *
18281  * # Doctest interface.
18282  * def _test(): # <<<<<<<<<<<<<<
18283  * import PyClical, doctest
18284  * return doctest.testmod(PyClical)
18285  */
18286 
18287  /* Python wrapper */
18288  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18289  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18290  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18291  PyObject *__pyx_r = 0;
18292  __Pyx_RefNannyDeclarations
18293  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18294  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18295 
18296  /* function exit code */
18297  __Pyx_RefNannyFinishContext();
18298  return __pyx_r;
18299  }
18300 
18301  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18302  PyObject *__pyx_v_PyClical = NULL;
18303  PyObject *__pyx_v_doctest = NULL;
18304  PyObject *__pyx_r = NULL;
18305  __Pyx_RefNannyDeclarations
18306  PyObject *__pyx_t_1 = NULL;
18307  PyObject *__pyx_t_2 = NULL;
18308  PyObject *__pyx_t_3 = NULL;
18309  __Pyx_RefNannySetupContext("_test", 0);
18310 
18311  /* "PyClical.pyx":1913
18312  * # Doctest interface.
18313  * def _test():
18314  * import PyClical, doctest # <<<<<<<<<<<<<<
18315  * return doctest.testmod(PyClical)
18316  *
18317  */
18318  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
18319  __Pyx_GOTREF(__pyx_t_1);
18320  __pyx_v_PyClical = __pyx_t_1;
18321  __pyx_t_1 = 0;
18322  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
18323  __Pyx_GOTREF(__pyx_t_1);
18324  __pyx_v_doctest = __pyx_t_1;
18325  __pyx_t_1 = 0;
18326 
18327  /* "PyClical.pyx":1914
18328  * def _test():
18329  * import PyClical, doctest
18330  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18331  *
18332  * if __name__ == "__main__":
18333  */
18334  __Pyx_XDECREF(__pyx_r);
18335  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_doctest, __pyx_n_s_testmod); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1914, __pyx_L1_error)
18336  __Pyx_GOTREF(__pyx_t_2);
18337  __pyx_t_3 = NULL;
18338  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18339  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18340  if (likely(__pyx_t_3)) {
18341  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18342  __Pyx_INCREF(__pyx_t_3);
18343  __Pyx_INCREF(function);
18344  __Pyx_DECREF_SET(__pyx_t_2, function);
18345  }
18346  }
18347  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_PyClical) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical);
18348  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18349  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18350  __Pyx_GOTREF(__pyx_t_1);
18351  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18352  __pyx_r = __pyx_t_1;
18353  __pyx_t_1 = 0;
18354  goto __pyx_L0;
18355 
18356  /* "PyClical.pyx":1912
18357  *
18358  * # Doctest interface.
18359  * def _test(): # <<<<<<<<<<<<<<
18360  * import PyClical, doctest
18361  * return doctest.testmod(PyClical)
18362  */
18363 
18364  /* function exit code */
18365  __pyx_L1_error:;
18366  __Pyx_XDECREF(__pyx_t_1);
18367  __Pyx_XDECREF(__pyx_t_2);
18368  __Pyx_XDECREF(__pyx_t_3);
18369  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18370  __pyx_r = NULL;
18371  __pyx_L0:;
18372  __Pyx_XDECREF(__pyx_v_PyClical);
18373  __Pyx_XDECREF(__pyx_v_doctest);
18374  __Pyx_XGIVEREF(__pyx_r);
18375  __Pyx_RefNannyFinishContext();
18376  return __pyx_r;
18377  }
18378 
18379  /* "string.to_py":31
18380  *
18381  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
18382  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18383  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
18384  * cdef extern from *:
18385  */
18386 
18387  static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) {
18388  PyObject *__pyx_r = NULL;
18389  __Pyx_RefNannyDeclarations
18390  PyObject *__pyx_t_1 = NULL;
18391  __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0);
18392 
18393  /* "string.to_py":32
18394  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
18395  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):
18396  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
18397  * cdef extern from *:
18398  * cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
18399  */
18400  __Pyx_XDECREF(__pyx_r);
18401  __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error)
18402  __Pyx_GOTREF(__pyx_t_1);
18403  __pyx_r = __pyx_t_1;
18404  __pyx_t_1 = 0;
18405  goto __pyx_L0;
18406 
18407  /* "string.to_py":31
18408  *
18409  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
18410  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18411  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
18412  * cdef extern from *:
18413  */
18414 
18415  /* function exit code */
18416  __pyx_L1_error:;
18417  __Pyx_XDECREF(__pyx_t_1);
18418  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
18419  __pyx_r = 0;
18420  __pyx_L0:;
18421  __Pyx_XGIVEREF(__pyx_r);
18422  __Pyx_RefNannyFinishContext();
18423  return __pyx_r;
18424  }
18425 
18426  /* "string.to_py":37
18427  *
18428  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
18429  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18430  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
18431  * cdef extern from *:
18432  */
18433 
18434  static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) {
18435  PyObject *__pyx_r = NULL;
18436  __Pyx_RefNannyDeclarations
18437  PyObject *__pyx_t_1 = NULL;
18438  __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0);
18439 
18440  /* "string.to_py":38
18441  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
18442  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):
18443  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
18444  * cdef extern from *:
18445  * cdef object __Pyx_PyStr_FromStringAndSize(const char*, size_t)
18446  */
18447  __Pyx_XDECREF(__pyx_r);
18448  __pyx_t_1 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error)
18449  __Pyx_GOTREF(__pyx_t_1);
18450  __pyx_r = __pyx_t_1;
18451  __pyx_t_1 = 0;
18452  goto __pyx_L0;
18453 
18454  /* "string.to_py":37
18455  *
18456  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
18457  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18458  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
18459  * cdef extern from *:
18460  */
18461 
18462  /* function exit code */
18463  __pyx_L1_error:;
18464  __Pyx_XDECREF(__pyx_t_1);
18465  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
18466  __pyx_r = 0;
18467  __pyx_L0:;
18468  __Pyx_XGIVEREF(__pyx_r);
18469  __Pyx_RefNannyFinishContext();
18470  return __pyx_r;
18471  }
18472 
18473  /* "string.to_py":43
18474  *
18475  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
18476  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18477  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
18478  * cdef extern from *:
18479  */
18480 
18481  static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) {
18482  PyObject *__pyx_r = NULL;
18483  __Pyx_RefNannyDeclarations
18484  PyObject *__pyx_t_1 = NULL;
18485  __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0);
18486 
18487  /* "string.to_py":44
18488  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
18489  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):
18490  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
18491  * cdef extern from *:
18492  * cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
18493  */
18494  __Pyx_XDECREF(__pyx_r);
18495  __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 44, __pyx_L1_error)
18496  __Pyx_GOTREF(__pyx_t_1);
18497  __pyx_r = __pyx_t_1;
18498  __pyx_t_1 = 0;
18499  goto __pyx_L0;
18500 
18501  /* "string.to_py":43
18502  *
18503  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
18504  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18505  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
18506  * cdef extern from *:
18507  */
18508 
18509  /* function exit code */
18510  __pyx_L1_error:;
18511  __Pyx_XDECREF(__pyx_t_1);
18512  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
18513  __pyx_r = 0;
18514  __pyx_L0:;
18515  __Pyx_XGIVEREF(__pyx_r);
18516  __Pyx_RefNannyFinishContext();
18517  return __pyx_r;
18518  }
18519 
18520  /* "string.to_py":49
18521  *
18522  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
18523  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18524  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
18525  * cdef extern from *:
18526  */
18527 
18528  static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) {
18529  PyObject *__pyx_r = NULL;
18530  __Pyx_RefNannyDeclarations
18531  PyObject *__pyx_t_1 = NULL;
18532  __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0);
18533 
18534  /* "string.to_py":50
18535  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
18536  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):
18537  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
18538  * cdef extern from *:
18539  * cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
18540  */
18541  __Pyx_XDECREF(__pyx_r);
18542  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error)
18543  __Pyx_GOTREF(__pyx_t_1);
18544  __pyx_r = __pyx_t_1;
18545  __pyx_t_1 = 0;
18546  goto __pyx_L0;
18547 
18548  /* "string.to_py":49
18549  *
18550  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
18551  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18552  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
18553  * cdef extern from *:
18554  */
18555 
18556  /* function exit code */
18557  __pyx_L1_error:;
18558  __Pyx_XDECREF(__pyx_t_1);
18559  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
18560  __pyx_r = 0;
18561  __pyx_L0:;
18562  __Pyx_XGIVEREF(__pyx_r);
18563  __Pyx_RefNannyFinishContext();
18564  return __pyx_r;
18565  }
18566 
18567  /* "string.to_py":55
18568  *
18569  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
18570  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18571  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
18572  *
18573  */
18574 
18575  static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) {
18576  PyObject *__pyx_r = NULL;
18577  __Pyx_RefNannyDeclarations
18578  PyObject *__pyx_t_1 = NULL;
18579  __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0);
18580 
18581  /* "string.to_py":56
18582  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
18583  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):
18584  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
18585  *
18586  */
18587  __Pyx_XDECREF(__pyx_r);
18588  __pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error)
18589  __Pyx_GOTREF(__pyx_t_1);
18590  __pyx_r = __pyx_t_1;
18591  __pyx_t_1 = 0;
18592  goto __pyx_L0;
18593 
18594  /* "string.to_py":55
18595  *
18596  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
18597  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18598  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
18599  *
18600  */
18601 
18602  /* function exit code */
18603  __pyx_L1_error:;
18604  __Pyx_XDECREF(__pyx_t_1);
18605  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
18606  __pyx_r = 0;
18607  __pyx_L0:;
18608  __Pyx_XGIVEREF(__pyx_r);
18609  __Pyx_RefNannyFinishContext();
18610  return __pyx_r;
18611  }
18612  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18613 
18614  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18615  struct __pyx_obj_8PyClical_index_set *p;
18616  PyObject *o;
18617  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18618  o = (*t->tp_alloc)(t, 0);
18619  } else {
18620  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18621  }
18622  if (unlikely(!o)) return 0;
18623  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18624  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18625  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18626  return o;
18627  bad:
18628  Py_DECREF(o); o = 0;
18629  return NULL;
18630  }
18631 
18632  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18633  #if CYTHON_USE_TP_FINALIZE
18634  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
18635  if (PyObject_CallFinalizerFromDealloc(o)) return;
18636  }
18637  #endif
18638  {
18639  PyObject *etype, *eval, *etb;
18640  PyErr_Fetch(&etype, &eval, &etb);
18641  ++Py_REFCNT(o);
18642  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18643  --Py_REFCNT(o);
18644  PyErr_Restore(etype, eval, etb);
18645  }
18646  (*Py_TYPE(o)->tp_free)(o);
18647  }
18648  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18649  PyObject *r;
18650  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18651  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18652  Py_DECREF(x);
18653  return r;
18654  }
18655 
18656  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18657  if (v) {
18658  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18659  }
18660  else {
18661  PyErr_Format(PyExc_NotImplementedError,
18662  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18663  return -1;
18664  }
18665  }
18666 
18667  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18668  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18669  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18670  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18671  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18672  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18673  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18674  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18675  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18676  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18677  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18678  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18679  {0, 0, 0, 0}
18680  };
18681 
18682  static PyNumberMethods __pyx_tp_as_number_index_set = {
18683  0, /*nb_add*/
18684  0, /*nb_subtract*/
18685  0, /*nb_multiply*/
18686  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18687  0, /*nb_divide*/
18688  #endif
18689  0, /*nb_remainder*/
18690  0, /*nb_divmod*/
18691  0, /*nb_power*/
18692  0, /*nb_negative*/
18693  0, /*nb_positive*/
18694  0, /*nb_absolute*/
18695  0, /*nb_nonzero*/
18696  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18697  0, /*nb_lshift*/
18698  0, /*nb_rshift*/
18699  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18700  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18701  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18702  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18703  0, /*nb_coerce*/
18704  #endif
18705  0, /*nb_int*/
18706  #if PY_MAJOR_VERSION < 3
18707  0, /*nb_long*/
18708  #else
18709  0, /*reserved*/
18710  #endif
18711  0, /*nb_float*/
18712  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18713  0, /*nb_oct*/
18714  #endif
18715  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18716  0, /*nb_hex*/
18717  #endif
18718  0, /*nb_inplace_add*/
18719  0, /*nb_inplace_subtract*/
18720  0, /*nb_inplace_multiply*/
18721  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18722  0, /*nb_inplace_divide*/
18723  #endif
18724  0, /*nb_inplace_remainder*/
18725  0, /*nb_inplace_power*/
18726  0, /*nb_inplace_lshift*/
18727  0, /*nb_inplace_rshift*/
18728  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18729  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18730  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18731  0, /*nb_floor_divide*/
18732  0, /*nb_true_divide*/
18733  0, /*nb_inplace_floor_divide*/
18734  0, /*nb_inplace_true_divide*/
18735  0, /*nb_index*/
18736  #if PY_VERSION_HEX >= 0x03050000
18737  0, /*nb_matrix_multiply*/
18738  #endif
18739  #if PY_VERSION_HEX >= 0x03050000
18740  0, /*nb_inplace_matrix_multiply*/
18741  #endif
18742  };
18743 
18744  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18745  0, /*sq_length*/
18746  0, /*sq_concat*/
18747  0, /*sq_repeat*/
18748  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18749  0, /*sq_slice*/
18750  0, /*sq_ass_item*/
18751  0, /*sq_ass_slice*/
18752  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18753  0, /*sq_inplace_concat*/
18754  0, /*sq_inplace_repeat*/
18755  };
18756 
18757  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18758  0, /*mp_length*/
18759  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18760  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18761  };
18762 
18763  static PyTypeObject __pyx_type_8PyClical_index_set = {
18764  PyVarObject_HEAD_INIT(0, 0)
18765  "PyClical.index_set", /*tp_name*/
18766  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18767  0, /*tp_itemsize*/
18768  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18769  0, /*tp_print*/
18770  0, /*tp_getattr*/
18771  0, /*tp_setattr*/
18772  #if PY_MAJOR_VERSION < 3
18773  0, /*tp_compare*/
18774  #endif
18775  #if PY_MAJOR_VERSION >= 3
18776  0, /*tp_as_async*/
18777  #endif
18778  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
18779  &__pyx_tp_as_number_index_set, /*tp_as_number*/
18780  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
18781  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
18782  0, /*tp_hash*/
18783  0, /*tp_call*/
18784  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
18785  0, /*tp_getattro*/
18786  0, /*tp_setattro*/
18787  0, /*tp_as_buffer*/
18788  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18789  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
18790  0, /*tp_traverse*/
18791  0, /*tp_clear*/
18792  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
18793  0, /*tp_weaklistoffset*/
18794  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
18795  0, /*tp_iternext*/
18796  __pyx_methods_8PyClical_index_set, /*tp_methods*/
18797  0, /*tp_members*/
18798  0, /*tp_getset*/
18799  0, /*tp_base*/
18800  0, /*tp_dict*/
18801  0, /*tp_descr_get*/
18802  0, /*tp_descr_set*/
18803  0, /*tp_dictoffset*/
18804  0, /*tp_init*/
18805  0, /*tp_alloc*/
18806  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
18807  0, /*tp_free*/
18808  0, /*tp_is_gc*/
18809  0, /*tp_bases*/
18810  0, /*tp_mro*/
18811  0, /*tp_cache*/
18812  0, /*tp_subclasses*/
18813  0, /*tp_weaklist*/
18814  0, /*tp_del*/
18815  0, /*tp_version_tag*/
18816  #if PY_VERSION_HEX >= 0x030400a1
18817  0, /*tp_finalize*/
18818  #endif
18819  #if PY_VERSION_HEX >= 0x030800b1
18820  0, /*tp_vectorcall*/
18821  #endif
18822  };
18823  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18824 
18825  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18826  struct __pyx_obj_8PyClical_clifford *p;
18827  PyObject *o;
18828  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18829  o = (*t->tp_alloc)(t, 0);
18830  } else {
18831  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18832  }
18833  if (unlikely(!o)) return 0;
18834  p = ((struct __pyx_obj_8PyClical_clifford *)o);
18835  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18836  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
18837  return o;
18838  bad:
18839  Py_DECREF(o); o = 0;
18840  return NULL;
18841  }
18842 
18843  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18844  #if CYTHON_USE_TP_FINALIZE
18845  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
18846  if (PyObject_CallFinalizerFromDealloc(o)) return;
18847  }
18848  #endif
18849  {
18850  PyObject *etype, *eval, *etb;
18851  PyErr_Fetch(&etype, &eval, &etb);
18852  ++Py_REFCNT(o);
18853  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18854  --Py_REFCNT(o);
18855  PyErr_Restore(etype, eval, etb);
18856  }
18857  (*Py_TYPE(o)->tp_free)(o);
18858  }
18859  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
18860  PyObject *r;
18861  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18862  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18863  Py_DECREF(x);
18864  return r;
18865  }
18866 
18867  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18868  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18869  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18870  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18871  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18872  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18873  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18874  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18875  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18876  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18877  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18878  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18879  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18880  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18881  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18882  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18883  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18884  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18885  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18886  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18887  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18888  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
18889  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
18890  {0, 0, 0, 0}
18891  };
18892 
18893  static PyNumberMethods __pyx_tp_as_number_clifford = {
18894  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
18895  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
18896  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
18897  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18898  0, /*nb_divide*/
18899  #endif
18900  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
18901  0, /*nb_divmod*/
18902  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
18903  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
18904  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
18905  0, /*nb_absolute*/
18906  0, /*nb_nonzero*/
18907  0, /*nb_invert*/
18908  0, /*nb_lshift*/
18909  0, /*nb_rshift*/
18910  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
18911  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
18912  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
18913  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18914  0, /*nb_coerce*/
18915  #endif
18916  0, /*nb_int*/
18917  #if PY_MAJOR_VERSION < 3
18918  0, /*nb_long*/
18919  #else
18920  0, /*reserved*/
18921  #endif
18922  0, /*nb_float*/
18923  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18924  0, /*nb_oct*/
18925  #endif
18926  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18927  0, /*nb_hex*/
18928  #endif
18929  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
18930  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
18931  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
18932  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18933  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
18934  #endif
18935  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
18936  0, /*nb_inplace_power*/
18937  0, /*nb_inplace_lshift*/
18938  0, /*nb_inplace_rshift*/
18939  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
18940  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
18941  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
18942  0, /*nb_floor_divide*/
18943  __pyx_pw_8PyClical_8clifford_45__truediv__, /*nb_true_divide*/
18944  0, /*nb_inplace_floor_divide*/
18945  0, /*nb_inplace_true_divide*/
18946  0, /*nb_index*/
18947  #if PY_VERSION_HEX >= 0x03050000
18948  0, /*nb_matrix_multiply*/
18949  #endif
18950  #if PY_VERSION_HEX >= 0x03050000
18951  0, /*nb_inplace_matrix_multiply*/
18952  #endif
18953  };
18954 
18955  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18956  0, /*sq_length*/
18957  0, /*sq_concat*/
18958  0, /*sq_repeat*/
18959  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
18960  0, /*sq_slice*/
18961  0, /*sq_ass_item*/
18962  0, /*sq_ass_slice*/
18963  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
18964  0, /*sq_inplace_concat*/
18965  0, /*sq_inplace_repeat*/
18966  };
18967 
18968  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18969  0, /*mp_length*/
18970  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
18971  0, /*mp_ass_subscript*/
18972  };
18973 
18974  static PyTypeObject __pyx_type_8PyClical_clifford = {
18975  PyVarObject_HEAD_INIT(0, 0)
18976  "PyClical.clifford", /*tp_name*/
18977  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
18978  0, /*tp_itemsize*/
18979  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
18980  0, /*tp_print*/
18981  0, /*tp_getattr*/
18982  0, /*tp_setattr*/
18983  #if PY_MAJOR_VERSION < 3
18984  0, /*tp_compare*/
18985  #endif
18986  #if PY_MAJOR_VERSION >= 3
18987  0, /*tp_as_async*/
18988  #endif
18989  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
18990  &__pyx_tp_as_number_clifford, /*tp_as_number*/
18991  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
18992  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
18993  0, /*tp_hash*/
18994  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
18995  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
18996  0, /*tp_getattro*/
18997  0, /*tp_setattro*/
18998  0, /*tp_as_buffer*/
18999  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19000  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
19001  0, /*tp_traverse*/
19002  0, /*tp_clear*/
19003  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
19004  0, /*tp_weaklistoffset*/
19005  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
19006  0, /*tp_iternext*/
19007  __pyx_methods_8PyClical_clifford, /*tp_methods*/
19008  0, /*tp_members*/
19009  0, /*tp_getset*/
19010  0, /*tp_base*/
19011  0, /*tp_dict*/
19012  0, /*tp_descr_get*/
19013  0, /*tp_descr_set*/
19014  0, /*tp_dictoffset*/
19015  0, /*tp_init*/
19016  0, /*tp_alloc*/
19017  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
19018  0, /*tp_free*/
19019  0, /*tp_is_gc*/
19020  0, /*tp_bases*/
19021  0, /*tp_mro*/
19022  0, /*tp_cache*/
19023  0, /*tp_subclasses*/
19024  0, /*tp_weaklist*/
19025  0, /*tp_del*/
19026  0, /*tp_version_tag*/
19027  #if PY_VERSION_HEX >= 0x030400a1
19028  0, /*tp_finalize*/
19029  #endif
19030  #if PY_VERSION_HEX >= 0x030800b1
19031  0, /*tp_vectorcall*/
19032  #endif
19033  };
19034 
19035  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
19036  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
19037 
19038  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
19039  PyObject *o;
19040  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8PyClical___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__)))) {
19041  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
19042  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
19043  (void) PyObject_INIT(o, t);
19044  PyObject_GC_Track(o);
19045  } else {
19046  o = (*t->tp_alloc)(t, 0);
19047  if (unlikely(!o)) return 0;
19048  }
19049  return o;
19050  }
19051 
19052  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
19053  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19054  PyObject_GC_UnTrack(o);
19055  Py_CLEAR(p->__pyx_v_idx);
19056  Py_CLEAR(p->__pyx_v_self);
19057  Py_CLEAR(p->__pyx_t_0);
19058  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8PyClical___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__)))) {
19059  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
19060  } else {
19061  (*Py_TYPE(o)->tp_free)(o);
19062  }
19063  }
19064 
19065  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
19066  int e;
19067  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19068  if (p->__pyx_v_idx) {
19069  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
19070  }
19071  if (p->__pyx_v_self) {
19072  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
19073  }
19074  if (p->__pyx_t_0) {
19075  e = (*v)(p->__pyx_t_0, a); if (e) return e;
19076  }
19077  return 0;
19078  }
19079 
19080  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
19081  PyVarObject_HEAD_INIT(0, 0)
19082  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
19083  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
19084  0, /*tp_itemsize*/
19085  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
19086  0, /*tp_print*/
19087  0, /*tp_getattr*/
19088  0, /*tp_setattr*/
19089  #if PY_MAJOR_VERSION < 3
19090  0, /*tp_compare*/
19091  #endif
19092  #if PY_MAJOR_VERSION >= 3
19093  0, /*tp_as_async*/
19094  #endif
19095  0, /*tp_repr*/
19096  0, /*tp_as_number*/
19097  0, /*tp_as_sequence*/
19098  0, /*tp_as_mapping*/
19099  0, /*tp_hash*/
19100  0, /*tp_call*/
19101  0, /*tp_str*/
19102  0, /*tp_getattro*/
19103  0, /*tp_setattro*/
19104  0, /*tp_as_buffer*/
19105  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19106  0, /*tp_doc*/
19107  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
19108  0, /*tp_clear*/
19109  0, /*tp_richcompare*/
19110  0, /*tp_weaklistoffset*/
19111  0, /*tp_iter*/
19112  0, /*tp_iternext*/
19113  0, /*tp_methods*/
19114  0, /*tp_members*/
19115  0, /*tp_getset*/
19116  0, /*tp_base*/
19117  0, /*tp_dict*/
19118  0, /*tp_descr_get*/
19119  0, /*tp_descr_set*/
19120  0, /*tp_dictoffset*/
19121  0, /*tp_init*/
19122  0, /*tp_alloc*/
19123  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
19124  0, /*tp_free*/
19125  0, /*tp_is_gc*/
19126  0, /*tp_bases*/
19127  0, /*tp_mro*/
19128  0, /*tp_cache*/
19129  0, /*tp_subclasses*/
19130  0, /*tp_weaklist*/
19131  0, /*tp_del*/
19132  0, /*tp_version_tag*/
19133  #if PY_VERSION_HEX >= 0x030400a1
19134  0, /*tp_finalize*/
19135  #endif
19136  #if PY_VERSION_HEX >= 0x030800b1
19137  0, /*tp_vectorcall*/
19138  #endif
19139  };
19140 
19141  static PyMethodDef __pyx_methods[] = {
19142  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
19143  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
19144  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
19145  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
19146  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
19147  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
19148  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
19149  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
19150  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
19151  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
19152  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
19153  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
19154  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
19155  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
19156  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
19157  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
19158  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
19159  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
19160  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
19161  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
19162  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
19163  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
19164  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
19165  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
19166  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
19167  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
19168  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
19169  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
19170  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
19171  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
19172  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
19173  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
19174  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
19175  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
19176  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
19177  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
19178  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
19179  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
19180  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
19181  {0, 0, 0, 0}
19182  };
19183 
19184  #if PY_MAJOR_VERSION >= 3
19185  #if CYTHON_PEP489_MULTI_PHASE_INIT
19186  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
19187  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
19188  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19189  {Py_mod_create, (void*)__pyx_pymod_create},
19190  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
19191  {0, NULL}
19192  };
19193  #endif
19194 
19195  static struct PyModuleDef __pyx_moduledef = {
19196  PyModuleDef_HEAD_INIT,
19197  "PyClical",
19198  0, /* m_doc */
19199  #if CYTHON_PEP489_MULTI_PHASE_INIT
19200  0, /* m_size */
19201  #else
19202  -1, /* m_size */
19203  #endif
19204  __pyx_methods /* m_methods */,
19205  #if CYTHON_PEP489_MULTI_PHASE_INIT
19206  __pyx_moduledef_slots, /* m_slots */
19207  #else
19208  NULL, /* m_reload */
19209  #endif
19210  NULL, /* m_traverse */
19211  NULL, /* m_clear */
19212  NULL /* m_free */
19213  };
19214  #endif
19215  #ifndef CYTHON_SMALL_CODE
19216 #if defined(__clang__)
19217  #define CYTHON_SMALL_CODE
19218 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
19219  #define CYTHON_SMALL_CODE __attribute__((cold))
19220 #else
19221  #define CYTHON_SMALL_CODE
19222 #endif
19223 #endif
19224 
19225 static __Pyx_StringTabEntry __pyx_string_tab[] = {
19226  {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
19227  {&__pyx_kp_u_0_8_4, __pyx_k_0_8_4, sizeof(__pyx_k_0_8_4), 0, 1, 0, 0},
19228  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
19229  {&__pyx_kp_u_Abbreviation_for_index_set_q_p, __pyx_k_Abbreviation_for_index_set_q_p, sizeof(__pyx_k_Abbreviation_for_index_set_q_p), 0, 1, 0, 0},
19230  {&__pyx_kp_u_Absolute_value_of_multivector_m, __pyx_k_Absolute_value_of_multivector_m, sizeof(__pyx_k_Absolute_value_of_multivector_m), 0, 1, 0, 0},
19231  {&__pyx_kp_u_Absolute_value_square_root_of_n, __pyx_k_Absolute_value_square_root_of_n, sizeof(__pyx_k_Absolute_value_square_root_of_n), 0, 1, 0, 0},
19232  {&__pyx_kp_u_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 1, 0, 0},
19233  {&__pyx_kp_u_Cannot_initialize_index_set_obje, __pyx_k_Cannot_initialize_index_set_obje, sizeof(__pyx_k_Cannot_initialize_index_set_obje), 0, 1, 0, 0},
19234  {&__pyx_kp_u_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 1, 0, 0},
19235  {&__pyx_kp_u_Cannot_take_vector_part_of, __pyx_k_Cannot_take_vector_part_of, sizeof(__pyx_k_Cannot_take_vector_part_of), 0, 1, 0, 0},
19236  {&__pyx_kp_u_Cardinality_Number_of_indices_i, __pyx_k_Cardinality_Number_of_indices_i, sizeof(__pyx_k_Cardinality_Number_of_indices_i), 0, 1, 0, 0},
19237  {&__pyx_kp_u_Check_if_a_multivector_contains, __pyx_k_Check_if_a_multivector_contains, sizeof(__pyx_k_Check_if_a_multivector_contains), 0, 1, 0, 0},
19238  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
19239  {&__pyx_kp_u_Conjugation_reverse_o_involute_2, __pyx_k_Conjugation_reverse_o_involute_2, sizeof(__pyx_k_Conjugation_reverse_o_involute_2), 0, 1, 0, 0},
19240  {&__pyx_kp_u_Contraction_print_clifford_1_cl, __pyx_k_Contraction_print_clifford_1_cl, sizeof(__pyx_k_Contraction_print_clifford_1_cl), 0, 1, 0, 0},
19241  {&__pyx_kp_u_Contraction_x_clifford_1_x_clif, __pyx_k_Contraction_x_clifford_1_x_clif, sizeof(__pyx_k_Contraction_x_clifford_1_x_clif), 0, 1, 0, 0},
19242  {&__pyx_kp_u_Convert_CGA3_null_vector_to_Euc, __pyx_k_Convert_CGA3_null_vector_to_Euc, sizeof(__pyx_k_Convert_CGA3_null_vector_to_Euc), 0, 1, 0, 0},
19243  {&__pyx_kp_u_Convert_CGA3_null_vector_to_sta, __pyx_k_Convert_CGA3_null_vector_to_sta, sizeof(__pyx_k_Convert_CGA3_null_vector_to_sta), 0, 1, 0, 0},
19244  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
19245  {&__pyx_kp_u_Copy_this_clifford_object_x_cli, __pyx_k_Copy_this_clifford_object_x_cli, sizeof(__pyx_k_Copy_this_clifford_object_x_cli), 0, 1, 0, 0},
19246  {&__pyx_kp_u_Copy_this_index_set_object_s_in, __pyx_k_Copy_this_index_set_object_s_in, sizeof(__pyx_k_Copy_this_index_set_object_s_in), 0, 1, 0, 0},
19247  {&__pyx_kp_u_Cosine_of_multivector_with_opti, __pyx_k_Cosine_of_multivector_with_opti, sizeof(__pyx_k_Cosine_of_multivector_with_opti), 0, 1, 0, 0},
19248  {&__pyx_kp_u_Even_part_of_multivector_sum_of, __pyx_k_Even_part_of_multivector_sum_of, sizeof(__pyx_k_Even_part_of_multivector_sum_of), 0, 1, 0, 0},
19249  {&__pyx_kp_u_Even_part_of_multivector_sum_of_2, __pyx_k_Even_part_of_multivector_sum_of_2, sizeof(__pyx_k_Even_part_of_multivector_sum_of_2), 0, 1, 0, 0},
19250  {&__pyx_kp_u_Exponential_of_multivector_x_cl, __pyx_k_Exponential_of_multivector_x_cl, sizeof(__pyx_k_Exponential_of_multivector_x_cl), 0, 1, 0, 0},
19251  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
19252  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
19253  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
19254  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
19255  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
19256  {&__pyx_kp_u_Geometric_product_x_clifford_2, __pyx_k_Geometric_product_x_clifford_2, sizeof(__pyx_k_Geometric_product_x_clifford_2), 0, 1, 0, 0},
19257  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
19258  {&__pyx_kp_u_Geometric_quotient_x_clifford_1, __pyx_k_Geometric_quotient_x_clifford_1, sizeof(__pyx_k_Geometric_quotient_x_clifford_1), 0, 1, 0, 0},
19259  {&__pyx_kp_u_Geometric_sum_print_clifford_1, __pyx_k_Geometric_sum_print_clifford_1, sizeof(__pyx_k_Geometric_sum_print_clifford_1), 0, 1, 0, 0},
19260  {&__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl, __pyx_k_Geometric_sum_x_clifford_1_x_cl, sizeof(__pyx_k_Geometric_sum_x_clifford_1_x_cl), 0, 1, 0, 0},
19261  {&__pyx_kp_u_Get_the_value_of_an_index_set_o, __pyx_k_Get_the_value_of_an_index_set_o, sizeof(__pyx_k_Get_the_value_of_an_index_set_o), 0, 1, 0, 0},
19262  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
19263  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
19264  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
19265  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
19266  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
19267  {&__pyx_kp_u_Inner_product_print_clifford_1, __pyx_k_Inner_product_print_clifford_1, sizeof(__pyx_k_Inner_product_print_clifford_1), 0, 1, 0, 0},
19268  {&__pyx_kp_u_Inner_product_x_clifford_1_x_cl, __pyx_k_Inner_product_x_clifford_1_x_cl, sizeof(__pyx_k_Inner_product_x_clifford_1_x_cl), 0, 1, 0, 0},
19269  {&__pyx_kp_u_Integer_power_of_multivector_ob, __pyx_k_Integer_power_of_multivector_ob, sizeof(__pyx_k_Integer_power_of_multivector_ob), 0, 1, 0, 0},
19270  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
19271  {&__pyx_kp_u_Inverse_cosine_of_multivector_w, __pyx_k_Inverse_cosine_of_multivector_w, sizeof(__pyx_k_Inverse_cosine_of_multivector_w), 0, 1, 0, 0},
19272  {&__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu, __pyx_k_Inverse_hyperbolic_cosine_of_mu, sizeof(__pyx_k_Inverse_hyperbolic_cosine_of_mu), 0, 1, 0, 0},
19273  {&__pyx_kp_u_Inverse_hyperbolic_sine_of_mult, __pyx_k_Inverse_hyperbolic_sine_of_mult, sizeof(__pyx_k_Inverse_hyperbolic_sine_of_mult), 0, 1, 0, 0},
19274  {&__pyx_kp_u_Inverse_hyperbolic_tangent_of_m, __pyx_k_Inverse_hyperbolic_tangent_of_m, sizeof(__pyx_k_Inverse_hyperbolic_tangent_of_m), 0, 1, 0, 0},
19275  {&__pyx_kp_u_Inverse_sine_of_multivector_wit, __pyx_k_Inverse_sine_of_multivector_wit, sizeof(__pyx_k_Inverse_sine_of_multivector_wit), 0, 1, 0, 0},
19276  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
19277  {&__pyx_kp_u_Iterate_over_the_indices_of_an, __pyx_k_Iterate_over_the_indices_of_an, sizeof(__pyx_k_Iterate_over_the_indices_of_an), 0, 1, 0, 0},
19278  {&__pyx_kp_u_Main_involution_each_i_is_repla, __pyx_k_Main_involution_each_i_is_repla, sizeof(__pyx_k_Main_involution_each_i_is_repla), 0, 1, 0, 0},
19279  {&__pyx_kp_u_Main_involution_each_i_is_repla_2, __pyx_k_Main_involution_each_i_is_repla_2, sizeof(__pyx_k_Main_involution_each_i_is_repla_2), 0, 1, 0, 0},
19280  {&__pyx_kp_u_Maximum_absolute_value_of_coord, __pyx_k_Maximum_absolute_value_of_coord, sizeof(__pyx_k_Maximum_absolute_value_of_coord), 0, 1, 0, 0},
19281  {&__pyx_kp_u_Maximum_member_index_set_1_1_2, __pyx_k_Maximum_member_index_set_1_1_2, sizeof(__pyx_k_Maximum_member_index_set_1_1_2), 0, 1, 0, 0},
19282  {&__pyx_kp_u_Maximum_of_absolute_values_of_c, __pyx_k_Maximum_of_absolute_values_of_c, sizeof(__pyx_k_Maximum_of_absolute_values_of_c), 0, 1, 0, 0},
19283  {&__pyx_kp_u_Maximum_positive_index_or_0_if, __pyx_k_Maximum_positive_index_or_0_if, sizeof(__pyx_k_Maximum_positive_index_or_0_if), 0, 1, 0, 0},
19284  {&__pyx_kp_u_Minimum_member_index_set_1_1_2, __pyx_k_Minimum_member_index_set_1_1_2, sizeof(__pyx_k_Minimum_member_index_set_1_1_2), 0, 1, 0, 0},
19285  {&__pyx_kp_u_Minimum_negative_index_or_0_if, __pyx_k_Minimum_negative_index_or_0_if, sizeof(__pyx_k_Minimum_negative_index_or_0_if), 0, 1, 0, 0},
19286  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
19287  {&__pyx_kp_u_Norm_sum_of_squares_of_coordina, __pyx_k_Norm_sum_of_squares_of_coordina, sizeof(__pyx_k_Norm_sum_of_squares_of_coordina), 0, 1, 0, 0},
19288  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
19289  {&__pyx_kp_u_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 1, 0, 0},
19290  {&__pyx_kp_u_Not_applicable_for_a_in_cliffor, __pyx_k_Not_applicable_for_a_in_cliffor, sizeof(__pyx_k_Not_applicable_for_a_in_cliffor), 0, 1, 0, 0},
19291  {&__pyx_kp_u_Number_of_negative_indices_incl, __pyx_k_Number_of_negative_indices_incl, sizeof(__pyx_k_Number_of_negative_indices_incl), 0, 1, 0, 0},
19292  {&__pyx_kp_u_Number_of_positive_indices_incl, __pyx_k_Number_of_positive_indices_incl, sizeof(__pyx_k_Number_of_positive_indices_incl), 0, 1, 0, 0},
19293  {&__pyx_kp_u_Odd_part_of_multivector_sum_of, __pyx_k_Odd_part_of_multivector_sum_of, sizeof(__pyx_k_Odd_part_of_multivector_sum_of), 0, 1, 0, 0},
19294  {&__pyx_kp_u_Odd_part_of_multivector_sum_of_2, __pyx_k_Odd_part_of_multivector_sum_of_2, sizeof(__pyx_k_Odd_part_of_multivector_sum_of_2), 0, 1, 0, 0},
19295  {&__pyx_kp_u_Outer_product_power_of_multivec, __pyx_k_Outer_product_power_of_multivec, sizeof(__pyx_k_Outer_product_power_of_multivec), 0, 1, 0, 0},
19296  {&__pyx_kp_u_Outer_product_power_x_clifford, __pyx_k_Outer_product_power_x_clifford, sizeof(__pyx_k_Outer_product_power_x_clifford), 0, 1, 0, 0},
19297  {&__pyx_kp_u_Outer_product_print_clifford_1, __pyx_k_Outer_product_print_clifford_1, sizeof(__pyx_k_Outer_product_print_clifford_1), 0, 1, 0, 0},
19298  {&__pyx_kp_u_Outer_product_x_clifford_1_x_cl, __pyx_k_Outer_product_x_clifford_1_x_cl, sizeof(__pyx_k_Outer_product_x_clifford_1_x_cl), 0, 1, 0, 0},
19299  {&__pyx_kp_u_Power_self_to_the_m_x_clifford, __pyx_k_Power_self_to_the_m_x_clifford, sizeof(__pyx_k_Power_self_to_the_m_x_clifford), 0, 1, 0, 0},
19300  {&__pyx_kp_u_Power_self_to_the_m_x_clifford_2, __pyx_k_Power_self_to_the_m_x_clifford_2, sizeof(__pyx_k_Power_self_to_the_m_x_clifford_2), 0, 1, 0, 0},
19301  {&__pyx_kp_u_Pure_grade_vector_part_print_cl, __pyx_k_Pure_grade_vector_part_print_cl, sizeof(__pyx_k_Pure_grade_vector_part_print_cl), 0, 1, 0, 0},
19302  {&__pyx_kp_u_Pure_part_print_clifford_1_1_1, __pyx_k_Pure_part_print_clifford_1_1_1, sizeof(__pyx_k_Pure_part_print_clifford_1_1_1), 0, 1, 0, 0},
19303  {&__pyx_kp_u_Pure_part_print_pure_clifford_1, __pyx_k_Pure_part_print_pure_clifford_1, sizeof(__pyx_k_Pure_part_print_pure_clifford_1), 0, 1, 0, 0},
19304  {&__pyx_kp_u_Put_self_into_a_larger_frame_co, __pyx_k_Put_self_into_a_larger_frame_co, sizeof(__pyx_k_Put_self_into_a_larger_frame_co), 0, 1, 0, 0},
19305  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
19306  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
19307  {&__pyx_kp_u_Quadratic_form_rev_x_x_0_print, __pyx_k_Quadratic_form_rev_x_x_0_print, sizeof(__pyx_k_Quadratic_form_rev_x_x_0_print), 0, 1, 0, 0},
19308  {&__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2, __pyx_k_Quadratic_form_rev_x_x_0_print_2, sizeof(__pyx_k_Quadratic_form_rev_x_x_0_print_2), 0, 1, 0, 0},
19309  {&__pyx_kp_u_Random_multivector_within_a_fra, __pyx_k_Random_multivector_within_a_fra, sizeof(__pyx_k_Random_multivector_within_a_fra), 0, 1, 0, 0},
19310  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
19311  {&__pyx_kp_u_Real_part_synonym_for_scalar_pa, __pyx_k_Real_part_synonym_for_scalar_pa, sizeof(__pyx_k_Real_part_synonym_for_scalar_pa), 0, 1, 0, 0},
19312  {&__pyx_kp_u_Remove_all_terms_of_self_with_r, __pyx_k_Remove_all_terms_of_self_with_r, sizeof(__pyx_k_Remove_all_terms_of_self_with_r), 0, 1, 0, 0},
19313  {&__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve, __pyx_k_Reversion_eg_1_2_2_1_print_reve, sizeof(__pyx_k_Reversion_eg_1_2_2_1_print_reve), 0, 1, 0, 0},
19314  {&__pyx_kp_u_Reversion_eg_clifford_1_cliffor, __pyx_k_Reversion_eg_clifford_1_cliffor, sizeof(__pyx_k_Reversion_eg_clifford_1_cliffor), 0, 1, 0, 0},
19315  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
19316  {&__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc, __pyx_k_Scalar_part_clifford_1_1_1_2_sc, sizeof(__pyx_k_Scalar_part_clifford_1_1_1_2_sc), 0, 1, 0, 0},
19317  {&__pyx_kp_u_Scalar_part_scalar_clifford_1_1, __pyx_k_Scalar_part_scalar_clifford_1_1, sizeof(__pyx_k_Scalar_part_scalar_clifford_1_1), 0, 1, 0, 0},
19318  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
19319  {&__pyx_kp_u_Set_complement_not_print_index, __pyx_k_Set_complement_not_print_index, sizeof(__pyx_k_Set_complement_not_print_index), 0, 1, 0, 0},
19320  {&__pyx_kp_u_Set_intersection_and_print_inde, __pyx_k_Set_intersection_and_print_inde, sizeof(__pyx_k_Set_intersection_and_print_inde), 0, 1, 0, 0},
19321  {&__pyx_kp_u_Set_intersection_and_x_index_se, __pyx_k_Set_intersection_and_x_index_se, sizeof(__pyx_k_Set_intersection_and_x_index_se), 0, 1, 0, 0},
19322  {&__pyx_kp_u_Set_the_value_of_an_index_set_o, __pyx_k_Set_the_value_of_an_index_set_o, sizeof(__pyx_k_Set_the_value_of_an_index_set_o), 0, 1, 0, 0},
19323  {&__pyx_kp_u_Set_union_or_print_index_set_1, __pyx_k_Set_union_or_print_index_set_1, sizeof(__pyx_k_Set_union_or_print_index_set_1), 0, 1, 0, 0},
19324  {&__pyx_kp_u_Set_union_or_x_index_set_1_x_in, __pyx_k_Set_union_or_x_index_set_1_x_in, sizeof(__pyx_k_Set_union_or_x_index_set_1_x_in), 0, 1, 0, 0},
19325  {&__pyx_kp_u_Sign_of_geometric_product_of_tw, __pyx_k_Sign_of_geometric_product_of_tw, sizeof(__pyx_k_Sign_of_geometric_product_of_tw), 0, 1, 0, 0},
19326  {&__pyx_kp_u_Sign_of_geometric_square_of_a_C, __pyx_k_Sign_of_geometric_square_of_a_C, sizeof(__pyx_k_Sign_of_geometric_square_of_a_C), 0, 1, 0, 0},
19327  {&__pyx_kp_u_Sine_of_multivector_with_option, __pyx_k_Sine_of_multivector_with_option, sizeof(__pyx_k_Sine_of_multivector_with_option), 0, 1, 0, 0},
19328  {&__pyx_kp_u_Square_root_of_1_which_commutes, __pyx_k_Square_root_of_1_which_commutes, sizeof(__pyx_k_Square_root_of_1_which_commutes), 0, 1, 0, 0},
19329  {&__pyx_kp_u_Square_root_of_multivector_with, __pyx_k_Square_root_of_multivector_with, sizeof(__pyx_k_Square_root_of_multivector_with), 0, 1, 0, 0},
19330  {&__pyx_kp_u_Subalgebra_generated_by_all_gen, __pyx_k_Subalgebra_generated_by_all_gen, sizeof(__pyx_k_Subalgebra_generated_by_all_gen), 0, 1, 0, 0},
19331  {&__pyx_kp_u_Subscripting_map_from_index_set, __pyx_k_Subscripting_map_from_index_set, sizeof(__pyx_k_Subscripting_map_from_index_set), 0, 1, 0, 0},
19332  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
19333  {&__pyx_kp_u_Symmetric_set_difference_exclus_2, __pyx_k_Symmetric_set_difference_exclus_2, sizeof(__pyx_k_Symmetric_set_difference_exclus_2), 0, 1, 0, 0},
19334  {&__pyx_kp_u_Tangent_of_multivector_with_opt, __pyx_k_Tangent_of_multivector_with_opt, sizeof(__pyx_k_Tangent_of_multivector_with_opt), 0, 1, 0, 0},
19335  {&__pyx_kp_u_Tests_for_functions_that_Doctes, __pyx_k_Tests_for_functions_that_Doctes, sizeof(__pyx_k_Tests_for_functions_that_Doctes), 0, 1, 0, 0},
19336  {&__pyx_kp_u_Tests_for_functions_that_Doctes_2, __pyx_k_Tests_for_functions_that_Doctes_2, sizeof(__pyx_k_Tests_for_functions_that_Doctes_2), 0, 1, 0, 0},
19337  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
19338  {&__pyx_kp_u_The_informal_string_representat_2, __pyx_k_The_informal_string_representat_2, sizeof(__pyx_k_The_informal_string_representat_2), 0, 1, 0, 0},
19339  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
19340  {&__pyx_kp_u_The_official_string_representat_2, __pyx_k_The_official_string_representat_2, sizeof(__pyx_k_The_official_string_representat_2), 0, 1, 0, 0},
19341  {&__pyx_kp_u_This_comparison_operator_is_not, __pyx_k_This_comparison_operator_is_not, sizeof(__pyx_k_This_comparison_operator_is_not), 0, 1, 0, 0},
19342  {&__pyx_kp_u_Transform_left_hand_side_using, __pyx_k_Transform_left_hand_side_using, sizeof(__pyx_k_Transform_left_hand_side_using), 0, 1, 0, 0},
19343  {&__pyx_kp_u_Transform_left_hand_side_using_2, __pyx_k_Transform_left_hand_side_using_2, sizeof(__pyx_k_Transform_left_hand_side_using_2), 0, 1, 0, 0},
19344  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
19345  {&__pyx_kp_u_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 1, 0, 0},
19346  {&__pyx_kp_u_Unary_print_clifford_1_1, __pyx_k_Unary_print_clifford_1_1, sizeof(__pyx_k_Unary_print_clifford_1_1), 0, 1, 0, 0},
19347  {&__pyx_kp_u_Unary_print_clifford_1_1_2, __pyx_k_Unary_print_clifford_1_1_2, sizeof(__pyx_k_Unary_print_clifford_1_1_2), 0, 1, 0, 0},
19348  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
19349  {&__pyx_kp_u_Vector_part_of_multivector_as_a, __pyx_k_Vector_part_of_multivector_as_a, sizeof(__pyx_k_Vector_part_of_multivector_as_a), 0, 1, 0, 0},
19350  {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
19351  {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
19352  {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
19353  {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
19354  {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0},
19355  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
19356  {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
19357  {&__pyx_kp_u_abs_line_1472, __pyx_k_abs_line_1472, sizeof(__pyx_k_abs_line_1472), 0, 1, 0, 0},
19358  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
19359  {&__pyx_kp_u_acos_line_1618, __pyx_k_acos_line_1618, sizeof(__pyx_k_acos_line_1618), 0, 1, 0, 0},
19360  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
19361  {&__pyx_kp_u_acosh_line_1655, __pyx_k_acosh_line_1655, sizeof(__pyx_k_acosh_line_1655), 0, 1, 0, 0},
19362  {&__pyx_kp_u_agc3_line_1843, __pyx_k_agc3_line_1843, sizeof(__pyx_k_agc3_line_1843), 0, 1, 0, 0},
19363  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
19364  {&__pyx_kp_u_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 1, 0, 0},
19365  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
19366  {&__pyx_kp_u_asin_line_1697, __pyx_k_asin_line_1697, sizeof(__pyx_k_asin_line_1697), 0, 1, 0, 0},
19367  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
19368  {&__pyx_kp_u_asinh_line_1732, __pyx_k_asinh_line_1732, sizeof(__pyx_k_asinh_line_1732), 0, 1, 0, 0},
19369  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
19370  {&__pyx_kp_u_atan_line_1768, __pyx_k_atan_line_1768, sizeof(__pyx_k_atan_line_1768), 0, 1, 0, 0},
19371  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
19372  {&__pyx_kp_u_atanh_line_1797, __pyx_k_atanh_line_1797, sizeof(__pyx_k_atanh_line_1797), 0, 1, 0, 0},
19373  {&__pyx_kp_u_cga3_line_1823, __pyx_k_cga3_line_1823, sizeof(__pyx_k_cga3_line_1823), 0, 1, 0, 0},
19374  {&__pyx_kp_u_cga3std_line_1832, __pyx_k_cga3std_line_1832, sizeof(__pyx_k_cga3std_line_1832), 0, 1, 0, 0},
19375  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
19376  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
19377  {&__pyx_kp_u_clifford___add___line_740, __pyx_k_clifford___add___line_740, sizeof(__pyx_k_clifford___add___line_740), 0, 1, 0, 0},
19378  {&__pyx_kp_u_clifford___and___line_836, __pyx_k_clifford___and___line_836, sizeof(__pyx_k_clifford___and___line_836), 0, 1, 0, 0},
19379  {&__pyx_kp_u_clifford___call___line_1020, __pyx_k_clifford___call___line_1020, sizeof(__pyx_k_clifford___call___line_1020), 0, 1, 0, 0},
19380  {&__pyx_kp_u_clifford___getitem___line_707, __pyx_k_clifford___getitem___line_707, sizeof(__pyx_k_clifford___getitem___line_707), 0, 1, 0, 0},
19381  {&__pyx_kp_u_clifford___iadd___line_751, __pyx_k_clifford___iadd___line_751, sizeof(__pyx_k_clifford___iadd___line_751), 0, 1, 0, 0},
19382  {&__pyx_kp_u_clifford___iand___line_851, __pyx_k_clifford___iand___line_851, sizeof(__pyx_k_clifford___iand___line_851), 0, 1, 0, 0},
19383  {&__pyx_kp_u_clifford___idiv___line_911, __pyx_k_clifford___idiv___line_911, sizeof(__pyx_k_clifford___idiv___line_911), 0, 1, 0, 0},
19384  {&__pyx_kp_u_clifford___imod___line_821, __pyx_k_clifford___imod___line_821, sizeof(__pyx_k_clifford___imod___line_821), 0, 1, 0, 0},
19385  {&__pyx_kp_u_clifford___imul___line_793, __pyx_k_clifford___imul___line_793, sizeof(__pyx_k_clifford___imul___line_793), 0, 1, 0, 0},
19386  {&__pyx_kp_u_clifford___ior___line_950, __pyx_k_clifford___ior___line_950, sizeof(__pyx_k_clifford___ior___line_950), 0, 1, 0, 0},
19387  {&__pyx_kp_u_clifford___isub___line_771, __pyx_k_clifford___isub___line_771, sizeof(__pyx_k_clifford___isub___line_771), 0, 1, 0, 0},
19388  {&__pyx_kp_u_clifford___iter___line_638, __pyx_k_clifford___iter___line_638, sizeof(__pyx_k_clifford___iter___line_638), 0, 1, 0, 0},
19389  {&__pyx_kp_u_clifford___ixor___line_881, __pyx_k_clifford___ixor___line_881, sizeof(__pyx_k_clifford___ixor___line_881), 0, 1, 0, 0},
19390  {&__pyx_kp_u_clifford___mod___line_806, __pyx_k_clifford___mod___line_806, sizeof(__pyx_k_clifford___mod___line_806), 0, 1, 0, 0},
19391  {&__pyx_kp_u_clifford___mul___line_780, __pyx_k_clifford___mul___line_780, sizeof(__pyx_k_clifford___mul___line_780), 0, 1, 0, 0},
19392  {&__pyx_kp_u_clifford___neg___line_722, __pyx_k_clifford___neg___line_722, sizeof(__pyx_k_clifford___neg___line_722), 0, 1, 0, 0},
19393  {&__pyx_kp_u_clifford___or___line_939, __pyx_k_clifford___or___line_939, sizeof(__pyx_k_clifford___or___line_939), 0, 1, 0, 0},
19394  {&__pyx_kp_u_clifford___pos___line_731, __pyx_k_clifford___pos___line_731, sizeof(__pyx_k_clifford___pos___line_731), 0, 1, 0, 0},
19395  {&__pyx_kp_u_clifford___pow___line_961, __pyx_k_clifford___pow___line_961, sizeof(__pyx_k_clifford___pow___line_961), 0, 1, 0, 0},
19396  {&__pyx_kp_u_clifford___repr___line_1226, __pyx_k_clifford___repr___line_1226, sizeof(__pyx_k_clifford___repr___line_1226), 0, 1, 0, 0},
19397  {&__pyx_kp_u_clifford___str___line_1235, __pyx_k_clifford___str___line_1235, sizeof(__pyx_k_clifford___str___line_1235), 0, 1, 0, 0},
19398  {&__pyx_kp_u_clifford___sub___line_760, __pyx_k_clifford___sub___line_760, sizeof(__pyx_k_clifford___sub___line_760), 0, 1, 0, 0},
19399  {&__pyx_kp_u_clifford___truediv___line_896, __pyx_k_clifford___truediv___line_896, sizeof(__pyx_k_clifford___truediv___line_896), 0, 1, 0, 0},
19400  {&__pyx_kp_u_clifford___xor___line_866, __pyx_k_clifford___xor___line_866, sizeof(__pyx_k_clifford___xor___line_866), 0, 1, 0, 0},
19401  {&__pyx_kp_u_clifford_abs_line_1175, __pyx_k_clifford_abs_line_1175, sizeof(__pyx_k_clifford_abs_line_1175), 0, 1, 0, 0},
19402  {&__pyx_kp_u_clifford_conj_line_1138, __pyx_k_clifford_conj_line_1138, sizeof(__pyx_k_clifford_conj_line_1138), 0, 1, 0, 0},
19403  {&__pyx_kp_u_clifford_copy_line_556, __pyx_k_clifford_copy_line_556, sizeof(__pyx_k_clifford_copy_line_556), 0, 1, 0, 0},
19404  {&__pyx_kp_u_clifford_even_line_1061, __pyx_k_clifford_even_line_1061, sizeof(__pyx_k_clifford_even_line_1061), 0, 1, 0, 0},
19405  {&__pyx_kp_u_clifford_frame_line_1215, __pyx_k_clifford_frame_line_1215, sizeof(__pyx_k_clifford_frame_line_1215), 0, 1, 0, 0},
19406  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
19407  {&__pyx_kp_u_clifford_hidden_doctests_line_12, __pyx_k_clifford_hidden_doctests_line_12, sizeof(__pyx_k_clifford_hidden_doctests_line_12), 0, 1, 0, 0},
19408  {&__pyx_kp_u_clifford_inv_line_926, __pyx_k_clifford_inv_line_926, sizeof(__pyx_k_clifford_inv_line_926), 0, 1, 0, 0},
19409  {&__pyx_kp_u_clifford_involute_line_1107, __pyx_k_clifford_involute_line_1107, sizeof(__pyx_k_clifford_involute_line_1107), 0, 1, 0, 0},
19410  {&__pyx_kp_u_clifford_isnan_line_1206, __pyx_k_clifford_isnan_line_1206, sizeof(__pyx_k_clifford_isnan_line_1206), 0, 1, 0, 0},
19411  {&__pyx_kp_u_clifford_max_abs_line_1184, __pyx_k_clifford_max_abs_line_1184, sizeof(__pyx_k_clifford_max_abs_line_1184), 0, 1, 0, 0},
19412  {&__pyx_kp_u_clifford_norm_line_1164, __pyx_k_clifford_norm_line_1164, sizeof(__pyx_k_clifford_norm_line_1164), 0, 1, 0, 0},
19413  {&__pyx_kp_u_clifford_odd_line_1070, __pyx_k_clifford_odd_line_1070, sizeof(__pyx_k_clifford_odd_line_1070), 0, 1, 0, 0},
19414  {&__pyx_kp_u_clifford_outer_pow_line_1004, __pyx_k_clifford_outer_pow_line_1004, sizeof(__pyx_k_clifford_outer_pow_line_1004), 0, 1, 0, 0},
19415  {&__pyx_kp_u_clifford_pow_line_980, __pyx_k_clifford_pow_line_980, sizeof(__pyx_k_clifford_pow_line_980), 0, 1, 0, 0},
19416  {&__pyx_kp_u_clifford_pure_line_1050, __pyx_k_clifford_pure_line_1050, sizeof(__pyx_k_clifford_pure_line_1050), 0, 1, 0, 0},
19417  {&__pyx_kp_u_clifford_quad_line_1153, __pyx_k_clifford_quad_line_1153, sizeof(__pyx_k_clifford_quad_line_1153), 0, 1, 0, 0},
19418  {&__pyx_kp_u_clifford_reframe_line_649, __pyx_k_clifford_reframe_line_649, sizeof(__pyx_k_clifford_reframe_line_649), 0, 1, 0, 0},
19419  {&__pyx_kp_u_clifford_reverse_line_1123, __pyx_k_clifford_reverse_line_1123, sizeof(__pyx_k_clifford_reverse_line_1123), 0, 1, 0, 0},
19420  {&__pyx_kp_u_clifford_scalar_line_1039, __pyx_k_clifford_scalar_line_1039, sizeof(__pyx_k_clifford_scalar_line_1039), 0, 1, 0, 0},
19421  {&__pyx_kp_u_clifford_truncated_line_1195, __pyx_k_clifford_truncated_line_1195, sizeof(__pyx_k_clifford_truncated_line_1195), 0, 1, 0, 0},
19422  {&__pyx_kp_u_clifford_vector_part_line_1079, __pyx_k_clifford_vector_part_line_1079, sizeof(__pyx_k_clifford_vector_part_line_1079), 0, 1, 0, 0},
19423  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
19424  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
19425  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
19426  {&__pyx_kp_u_compare_line_492, __pyx_k_compare_line_492, sizeof(__pyx_k_compare_line_492), 0, 1, 0, 0},
19427  {&__pyx_kp_u_complexifier_line_1526, __pyx_k_complexifier_line_1526, sizeof(__pyx_k_complexifier_line_1526), 0, 1, 0, 0},
19428  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
19429  {&__pyx_kp_u_conj_line_1435, __pyx_k_conj_line_1435, sizeof(__pyx_k_conj_line_1435), 0, 1, 0, 0},
19430  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
19431  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
19432  {&__pyx_kp_u_cos_line_1601, __pyx_k_cos_line_1601, sizeof(__pyx_k_cos_line_1601), 0, 1, 0, 0},
19433  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
19434  {&__pyx_kp_u_cosh_line_1639, __pyx_k_cosh_line_1639, sizeof(__pyx_k_cosh_line_1639), 0, 1, 0, 0},
19435  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
19436  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
19437  {&__pyx_kp_u_e_line_1886, __pyx_k_e_line_1886, sizeof(__pyx_k_e_line_1886), 0, 1, 0, 0},
19438  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
19439  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
19440  {&__pyx_kp_u_even_line_1387, __pyx_k_even_line_1387, sizeof(__pyx_k_even_line_1387), 0, 1, 0, 0},
19441  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
19442  {&__pyx_kp_u_exp_line_1564, __pyx_k_exp_line_1564, sizeof(__pyx_k_exp_line_1564), 0, 1, 0, 0},
19443  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
19444  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
19445  {&__pyx_kp_u_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 1, 0, 0},
19446  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
19447  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
19448  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
19449  {&__pyx_kp_u_imag_line_1365, __pyx_k_imag_line_1365, sizeof(__pyx_k_imag_line_1365), 0, 1, 0, 0},
19450  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
19451  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
19452  {&__pyx_kp_u_index_set___and___line_271, __pyx_k_index_set___and___line_271, sizeof(__pyx_k_index_set___and___line_271), 0, 1, 0, 0},
19453  {&__pyx_kp_u_index_set___getitem___line_191, __pyx_k_index_set___getitem___line_191, sizeof(__pyx_k_index_set___getitem___line_191), 0, 1, 0, 0},
19454  {&__pyx_kp_u_index_set___iand___line_282, __pyx_k_index_set___iand___line_282, sizeof(__pyx_k_index_set___iand___line_282), 0, 1, 0, 0},
19455  {&__pyx_kp_u_index_set___invert___line_240, __pyx_k_index_set___invert___line_240, sizeof(__pyx_k_index_set___invert___line_240), 0, 1, 0, 0},
19456  {&__pyx_kp_u_index_set___ior___line_304, __pyx_k_index_set___ior___line_304, sizeof(__pyx_k_index_set___ior___line_304), 0, 1, 0, 0},
19457  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
19458  {&__pyx_kp_u_index_set___iter___line_229, __pyx_k_index_set___iter___line_229, sizeof(__pyx_k_index_set___iter___line_229), 0, 1, 0, 0},
19459  {&__pyx_kp_u_index_set___ixor___line_260, __pyx_k_index_set___ixor___line_260, sizeof(__pyx_k_index_set___ixor___line_260), 0, 1, 0, 0},
19460  {&__pyx_kp_u_index_set___or___line_293, __pyx_k_index_set___or___line_293, sizeof(__pyx_k_index_set___or___line_293), 0, 1, 0, 0},
19461  {&__pyx_kp_u_index_set___repr___line_384, __pyx_k_index_set___repr___line_384, sizeof(__pyx_k_index_set___repr___line_384), 0, 1, 0, 0},
19462  {&__pyx_kp_u_index_set___setitem___line_179, __pyx_k_index_set___setitem___line_179, sizeof(__pyx_k_index_set___setitem___line_179), 0, 1, 0, 0},
19463  {&__pyx_kp_u_index_set___str___line_395, __pyx_k_index_set___str___line_395, sizeof(__pyx_k_index_set___str___line_395), 0, 1, 0, 0},
19464  {&__pyx_kp_u_index_set___xor___line_249, __pyx_k_index_set___xor___line_249, sizeof(__pyx_k_index_set___xor___line_249), 0, 1, 0, 0},
19465  {&__pyx_kp_u_index_set_copy_line_65, __pyx_k_index_set_copy_line_65, sizeof(__pyx_k_index_set_copy_line_65), 0, 1, 0, 0},
19466  {&__pyx_kp_u_index_set_count_line_315, __pyx_k_index_set_count_line_315, sizeof(__pyx_k_index_set_count_line_315), 0, 1, 0, 0},
19467  {&__pyx_kp_u_index_set_count_neg_line_324, __pyx_k_index_set_count_neg_line_324, sizeof(__pyx_k_index_set_count_neg_line_324), 0, 1, 0, 0},
19468  {&__pyx_kp_u_index_set_count_pos_line_333, __pyx_k_index_set_count_pos_line_333, sizeof(__pyx_k_index_set_count_pos_line_333), 0, 1, 0, 0},
19469  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
19470  {&__pyx_kp_u_index_set_hidden_doctests_line_4, __pyx_k_index_set_hidden_doctests_line_4, sizeof(__pyx_k_index_set_hidden_doctests_line_4), 0, 1, 0, 0},
19471  {&__pyx_kp_u_index_set_max_line_351, __pyx_k_index_set_max_line_351, sizeof(__pyx_k_index_set_max_line_351), 0, 1, 0, 0},
19472  {&__pyx_kp_u_index_set_min_line_342, __pyx_k_index_set_min_line_342, sizeof(__pyx_k_index_set_min_line_342), 0, 1, 0, 0},
19473  {&__pyx_kp_u_index_set_sign_of_mult_line_366, __pyx_k_index_set_sign_of_mult_line_366, sizeof(__pyx_k_index_set_sign_of_mult_line_366), 0, 1, 0, 0},
19474  {&__pyx_kp_u_index_set_sign_of_square_line_37, __pyx_k_index_set_sign_of_square_line_37, sizeof(__pyx_k_index_set_sign_of_square_line_37), 0, 1, 0, 0},
19475  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
19476  {&__pyx_kp_u_inv_line_1328, __pyx_k_inv_line_1328, sizeof(__pyx_k_inv_line_1328), 0, 1, 0, 0},
19477  {&__pyx_kp_u_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 1, 0, 0},
19478  {&__pyx_kp_u_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 1, 0, 0},
19479  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
19480  {&__pyx_kp_u_involute_line_1405, __pyx_k_involute_line_1405, sizeof(__pyx_k_involute_line_1405), 0, 1, 0, 0},
19481  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
19482  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19483  {&__pyx_kp_u_istpq_line_1899, __pyx_k_istpq_line_1899, sizeof(__pyx_k_istpq_line_1899), 0, 1, 0, 0},
19484  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
19485  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19486  {&__pyx_kp_u_lexicographic_compare_eg_3_4_5, __pyx_k_lexicographic_compare_eg_3_4_5, sizeof(__pyx_k_lexicographic_compare_eg_3_4_5), 0, 1, 0, 0},
19487  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19488  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
19489  {&__pyx_kp_u_log_line_1578, __pyx_k_log_line_1578, sizeof(__pyx_k_log_line_1578), 0, 1, 0, 0},
19490  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
19491  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19492  {&__pyx_n_u_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 1, 0, 1},
19493  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
19494  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
19495  {&__pyx_kp_u_max_abs_line_1481, __pyx_k_max_abs_line_1481, sizeof(__pyx_k_max_abs_line_1481), 0, 1, 0, 0},
19496  {&__pyx_kp_u_max_pos_line_513, __pyx_k_max_pos_line_513, sizeof(__pyx_k_max_pos_line_513), 0, 1, 0, 0},
19497  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
19498  {&__pyx_kp_u_min_neg_line_504, __pyx_k_min_neg_line_504, sizeof(__pyx_k_min_neg_line_504), 0, 1, 0, 0},
19499  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
19500  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19501  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19502  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
19503  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
19504  {&__pyx_kp_u_norm_line_1461, __pyx_k_norm_line_1461, sizeof(__pyx_k_norm_line_1461), 0, 1, 0, 0},
19505  {&__pyx_kp_u_norm_sum_of_squares_of_coordina, __pyx_k_norm_sum_of_squares_of_coordina, sizeof(__pyx_k_norm_sum_of_squares_of_coordina), 0, 1, 0, 0},
19506  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19507  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
19508  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
19509  {&__pyx_kp_u_odd_line_1396, __pyx_k_odd_line_1396, sizeof(__pyx_k_odd_line_1396), 0, 1, 0, 0},
19510  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
19511  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19512  {&__pyx_kp_u_outer_pow_line_1517, __pyx_k_outer_pow_line_1517, sizeof(__pyx_k_outer_pow_line_1517), 0, 1, 0, 0},
19513  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
19514  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19515  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19516  {&__pyx_kp_u_pow_line_1493, __pyx_k_pow_line_1493, sizeof(__pyx_k_pow_line_1493), 0, 1, 0, 0},
19517  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19518  {&__pyx_kp_u_pure_line_1376, __pyx_k_pure_line_1376, sizeof(__pyx_k_pure_line_1376), 0, 1, 0, 0},
19519  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19520  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19521  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19522  {&__pyx_kp_u_quad_line_1450, __pyx_k_quad_line_1450, sizeof(__pyx_k_quad_line_1450), 0, 1, 0, 0},
19523  {&__pyx_kp_u_random_clifford_line_1814, __pyx_k_random_clifford_line_1814, sizeof(__pyx_k_random_clifford_line_1814), 0, 1, 0, 0},
19524  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19525  {&__pyx_kp_u_real_line_1354, __pyx_k_real_line_1354, sizeof(__pyx_k_real_line_1354), 0, 1, 0, 0},
19526  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19527  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19528  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19529  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19530  {&__pyx_kp_u_reverse_line_1420, __pyx_k_reverse_line_1420, sizeof(__pyx_k_reverse_line_1420), 0, 1, 0, 0},
19531  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19532  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19533  {&__pyx_n_s_scalar_epsilon, __pyx_k_scalar_epsilon, sizeof(__pyx_k_scalar_epsilon), 0, 0, 1, 1},
19534  {&__pyx_kp_u_scalar_line_1343, __pyx_k_scalar_line_1343, sizeof(__pyx_k_scalar_line_1343), 0, 1, 0, 0},
19535  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19536  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19537  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19538  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19539  {&__pyx_kp_u_sin_line_1678, __pyx_k_sin_line_1678, sizeof(__pyx_k_sin_line_1678), 0, 1, 0, 0},
19540  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19541  {&__pyx_kp_u_sinh_line_1718, __pyx_k_sinh_line_1718, sizeof(__pyx_k_sinh_line_1718), 0, 1, 0, 0},
19542  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19543  {&__pyx_kp_u_sqrt_line_1541, __pyx_k_sqrt_line_1541, sizeof(__pyx_k_sqrt_line_1541), 0, 1, 0, 0},
19544  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19545  {&__pyx_kp_u_tan_line_1751, __pyx_k_tan_line_1751, sizeof(__pyx_k_tan_line_1751), 0, 1, 0, 0},
19546  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19547  {&__pyx_kp_u_tanh_line_1785, __pyx_k_tanh_line_1785, sizeof(__pyx_k_tanh_line_1785), 0, 1, 0, 0},
19548  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19549  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19550  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19551  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19552  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19553  {&__pyx_kp_u_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 1, 0, 0},
19554  {&__pyx_kp_u_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 1, 0, 0},
19555  {&__pyx_kp_u_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 1, 0, 0},
19556  {&__pyx_kp_u_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 1, 0, 0},
19557  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19558  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19559  {0, 0, 0, 0, 0, 0, 0}
19560 };
19561 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
19562  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 103, __pyx_L1_error)
19563  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 105, __pyx_L1_error)
19564  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 105, __pyx_L1_error)
19565  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 106, __pyx_L1_error)
19566  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 159, __pyx_L1_error)
19567  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 236, __pyx_L1_error)
19568  #if PY_MAJOR_VERSION >= 3
19569  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1099, __pyx_L1_error)
19570  #else
19571  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1099, __pyx_L1_error)
19572  #endif
19573  return 0;
19574  __pyx_L1_error:;
19575  return -1;
19576 }
19577 
19578 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
19579  __Pyx_RefNannyDeclarations
19580  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19581 
19582  /* "(tree fragment)":2
19583  * def __reduce_cython__(self):
19584  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19585  * def __setstate_cython__(self, __pyx_state):
19586  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19587  */
19588  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
19589  __Pyx_GOTREF(__pyx_tuple__3);
19590  __Pyx_GIVEREF(__pyx_tuple__3);
19591 
19592  /* "(tree fragment)":4
19593  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19594  * def __setstate_cython__(self, __pyx_state):
19595  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19596  */
19597  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
19598  __Pyx_GOTREF(__pyx_tuple__4);
19599  __Pyx_GIVEREF(__pyx_tuple__4);
19600 
19601  /* "PyClical.pyx":636
19602  * TypeError: Not applicable.
19603  * """
19604  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19605  *
19606  * def __iter__(self):
19607  */
19608  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 636, __pyx_L1_error)
19609  __Pyx_GOTREF(__pyx_tuple__10);
19610  __Pyx_GIVEREF(__pyx_tuple__10);
19611 
19612  /* "(tree fragment)":2
19613  * def __reduce_cython__(self):
19614  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19615  * def __setstate_cython__(self, __pyx_state):
19616  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19617  */
19618  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 2, __pyx_L1_error)
19619  __Pyx_GOTREF(__pyx_tuple__11);
19620  __Pyx_GIVEREF(__pyx_tuple__11);
19621 
19622  /* "(tree fragment)":4
19623  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19624  * def __setstate_cython__(self, __pyx_state):
19625  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19626  */
19627  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 4, __pyx_L1_error)
19628  __Pyx_GOTREF(__pyx_tuple__12);
19629  __Pyx_GIVEREF(__pyx_tuple__12);
19630 
19631  /* "PyClical.pyx":406
19632  * return index_set_to_str( self.unwrap() ).decode()
19633  *
19634  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19635  * """
19636  * Tests for functions that Doctest cannot see.
19637  */
19638  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_index_set_hidden_doctests, 406, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 406, __pyx_L1_error)
19639 
19640  /* "PyClical.pyx":1244
19641  * return clifford_to_str( self.unwrap() ).decode()
19642  *
19643  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19644  * """
19645  * Tests for functions that Doctest cannot see.
19646  */
19647  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_clifford_hidden_doctests, 1244, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 1244, __pyx_L1_error)
19648 
19649  /* "PyClical.pyx":1857
19650  * scalar_epsilon = epsilon
19651  *
19652  * pi = atan(clifford(1.0)) * 4.0 # <<<<<<<<<<<<<<
19653  * tau = atan(clifford(1.0)) * 8.0
19654  *
19655  */
19656  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1857, __pyx_L1_error)
19657  __Pyx_GOTREF(__pyx_tuple__15);
19658  __Pyx_GIVEREF(__pyx_tuple__15);
19659 
19660  /* "PyClical.pyx":1886
19661  * """
19662  *
19663  * def e(obj): # <<<<<<<<<<<<<<
19664  * """
19665  * Abbreviation for clifford(index_set(obj)).
19666  */
19667  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1886, __pyx_L1_error)
19668  __Pyx_GOTREF(__pyx_tuple__16);
19669  __Pyx_GIVEREF(__pyx_tuple__16);
19670  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_e, 1886, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 1886, __pyx_L1_error)
19671 
19672  /* "PyClical.pyx":1899
19673  * return clifford(index_set(obj))
19674  *
19675  * def istpq(p, q): # <<<<<<<<<<<<<<
19676  * """
19677  * Abbreviation for index_set({-q,...p}).
19678  */
19679  __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1899, __pyx_L1_error)
19680  __Pyx_GOTREF(__pyx_tuple__18);
19681  __Pyx_GIVEREF(__pyx_tuple__18);
19682  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_istpq, 1899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 1899, __pyx_L1_error)
19683 
19684  /* "PyClical.pyx":1908
19685  * return index_set(set(range(-q,p+1)))
19686  *
19687  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19688  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19689  *
19690  */
19691  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1908, __pyx_L1_error)
19692  __Pyx_GOTREF(__pyx_tuple__20);
19693  __Pyx_GIVEREF(__pyx_tuple__20);
19694  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1908, __pyx_L1_error)
19695  __Pyx_GOTREF(__pyx_tuple__21);
19696  __Pyx_GIVEREF(__pyx_tuple__21);
19697 
19698  /* "PyClical.pyx":1912
19699  *
19700  * # Doctest interface.
19701  * def _test(): # <<<<<<<<<<<<<<
19702  * import PyClical, doctest
19703  * return doctest.testmod(PyClical)
19704  */
19705  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1912, __pyx_L1_error)
19706  __Pyx_GOTREF(__pyx_tuple__22);
19707  __Pyx_GIVEREF(__pyx_tuple__22);
19708  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_test, 1912, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 1912, __pyx_L1_error)
19709  __Pyx_RefNannyFinishContext();
19710  return 0;
19711  __pyx_L1_error:;
19712  __Pyx_RefNannyFinishContext();
19713  return -1;
19714 }
19715 
19716 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
19717  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19718  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19719  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19720  __pyx_float_4_0 = PyFloat_FromDouble(4.0); if (unlikely(!__pyx_float_4_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19721  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19722  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19723  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19724  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19725  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19726  return 0;
19727  __pyx_L1_error:;
19728  return -1;
19729 }
19730 
19731 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
19732 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
19733 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
19734 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
19735 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
19736 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
19737 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
19738 
19739 static int __Pyx_modinit_global_init_code(void) {
19740  __Pyx_RefNannyDeclarations
19741  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
19742  /*--- Global init code ---*/
19743  __Pyx_RefNannyFinishContext();
19744  return 0;
19745 }
19746 
19747 static int __Pyx_modinit_variable_export_code(void) {
19748  __Pyx_RefNannyDeclarations
19749  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
19750  /*--- Variable export code ---*/
19751  __Pyx_RefNannyFinishContext();
19752  return 0;
19753 }
19754 
19755 static int __Pyx_modinit_function_export_code(void) {
19756  __Pyx_RefNannyDeclarations
19757  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
19758  /*--- Function export code ---*/
19759  __Pyx_RefNannyFinishContext();
19760  return 0;
19761 }
19762 
19763 static int __Pyx_modinit_type_init_code(void) {
19764  __Pyx_RefNannyDeclarations
19765  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
19766  /*--- Type init code ---*/
19767  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19768  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19769  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19770  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19771  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
19772  #if PY_VERSION_HEX < 0x030800B1
19773  __pyx_type_8PyClical_index_set.tp_print = 0;
19774  #endif
19775  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_index_set.tp_dictoffset && __pyx_type_8PyClical_index_set.tp_getattro == PyObject_GenericGetAttr)) {
19776  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19777  }
19778  #if CYTHON_COMPILING_IN_CPYTHON
19779  {
19780  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19781  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19782  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19783  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19784  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19785  }
19786  }
19787  #endif
19788  #if CYTHON_COMPILING_IN_CPYTHON
19789  {
19790  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19791  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19792  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19793  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19794  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19795  }
19796  }
19797  #endif
19798  #if CYTHON_COMPILING_IN_CPYTHON
19799  {
19800  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19801  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19802  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19803  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19804  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19805  }
19806  }
19807  #endif
19808  #if CYTHON_COMPILING_IN_CPYTHON
19809  {
19810  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19811  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19812  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19813  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19814  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19815  }
19816  }
19817  #endif
19818  #if CYTHON_COMPILING_IN_CPYTHON
19819  {
19820  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19821  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19822  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19823  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19824  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19825  }
19826  }
19827  #endif
19828  #if CYTHON_COMPILING_IN_CPYTHON
19829  {
19830  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19831  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19832  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19833  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19834  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19835  }
19836  }
19837  #endif
19838  #if CYTHON_COMPILING_IN_CPYTHON
19839  {
19840  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19841  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19842  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19843  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19844  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19845  }
19846  }
19847  #endif
19848  #if CYTHON_COMPILING_IN_CPYTHON
19849  {
19850  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19851  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19852  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19853  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19854  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19855  }
19856  }
19857  #endif
19858  #if CYTHON_COMPILING_IN_CPYTHON
19859  {
19860  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19861  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19862  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19863  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19864  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19865  }
19866  }
19867  #endif
19868  #if CYTHON_COMPILING_IN_CPYTHON
19869  {
19870  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19871  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19872  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19873  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19874  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19875  }
19876  }
19877  #endif
19878  #if CYTHON_COMPILING_IN_CPYTHON
19879  {
19880  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19881  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19882  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19883  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19884  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19885  }
19886  }
19887  #endif
19888  #if CYTHON_COMPILING_IN_CPYTHON
19889  {
19890  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19891  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19892  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19893  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19894  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19895  }
19896  }
19897  #endif
19898  #if CYTHON_COMPILING_IN_CPYTHON
19899  {
19900  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
19901  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19902  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19903  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19904  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19905  }
19906  }
19907  #endif
19908  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
19909  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
19910  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
19911  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19912  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19913  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
19914  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19915  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19916  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
19917  #if PY_VERSION_HEX < 0x030800B1
19918  __pyx_type_8PyClical_clifford.tp_print = 0;
19919  #endif
19920  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
19921  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19922  }
19923  #if CYTHON_COMPILING_IN_CPYTHON
19924  {
19925  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
19926  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19927  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19928  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19929  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19930  }
19931  }
19932  #endif
19933  #if CYTHON_COMPILING_IN_CPYTHON
19934  {
19935  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
19936  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19937  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19938  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19939  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19940  }
19941  }
19942  #endif
19943  #if CYTHON_COMPILING_IN_CPYTHON
19944  {
19945  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
19946  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19947  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19948  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19949  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19950  }
19951  }
19952  #endif
19953  #if CYTHON_COMPILING_IN_CPYTHON
19954  {
19955  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
19956  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19957  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19958  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19959  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19960  }
19961  }
19962  #endif
19963  #if CYTHON_COMPILING_IN_CPYTHON
19964  {
19965  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
19966  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19967  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19968  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19969  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19970  }
19971  }
19972  #endif
19973  #if CYTHON_COMPILING_IN_CPYTHON
19974  {
19975  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
19976  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19977  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19978  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19979  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19980  }
19981  }
19982  #endif
19983  #if CYTHON_COMPILING_IN_CPYTHON
19984  {
19985  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
19986  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19987  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19988  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19989  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19990  }
19991  }
19992  #endif
19993  #if CYTHON_COMPILING_IN_CPYTHON
19994  {
19995  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
19996  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19997  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19998  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19999  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
20000  }
20001  }
20002  #endif
20003  #if CYTHON_COMPILING_IN_CPYTHON
20004  {
20005  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20006  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20007  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20008  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
20009  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
20010  }
20011  }
20012  #endif
20013  #if CYTHON_COMPILING_IN_CPYTHON
20014  {
20015  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20016  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20017  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20018  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
20019  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
20020  }
20021  }
20022  #endif
20023  #if CYTHON_COMPILING_IN_CPYTHON
20024  {
20025  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20026  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20027  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20028  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
20029  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
20030  }
20031  }
20032  #endif
20033  #if CYTHON_COMPILING_IN_CPYTHON
20034  {
20035  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20036  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20037  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20038  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
20039  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
20040  }
20041  }
20042  #endif
20043  #if CYTHON_COMPILING_IN_CPYTHON
20044  {
20045  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20046  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20047  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20048  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
20049  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
20050  }
20051  }
20052  #endif
20053  #if CYTHON_COMPILING_IN_CPYTHON
20054  {
20055  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20056  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20057  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20058  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
20059  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
20060  }
20061  }
20062  #endif
20063  #if CYTHON_COMPILING_IN_CPYTHON
20064  {
20065  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20066  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20067  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20068  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
20069  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
20070  }
20071  }
20072  #endif
20073  #if CYTHON_COMPILING_IN_CPYTHON
20074  {
20075  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20076  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20077  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20078  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
20079  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
20080  }
20081  }
20082  #endif
20083  #if CYTHON_COMPILING_IN_CPYTHON
20084  {
20085  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20086  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20087  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20088  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
20089  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
20090  }
20091  }
20092  #endif
20093  #if CYTHON_COMPILING_IN_CPYTHON
20094  {
20095  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__truediv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20096  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20097  __pyx_wrapperbase_8PyClical_8clifford_44__truediv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20098  __pyx_wrapperbase_8PyClical_8clifford_44__truediv__.doc = __pyx_doc_8PyClical_8clifford_44__truediv__;
20099  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__truediv__;
20100  }
20101  }
20102  #endif
20103  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20104  #if CYTHON_COMPILING_IN_CPYTHON
20105  {
20106  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20107  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20108  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20109  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
20110  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
20111  }
20112  }
20113  #endif
20114  #endif
20115  #if CYTHON_COMPILING_IN_CPYTHON
20116  {
20117  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20118  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20119  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20120  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
20121  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
20122  }
20123  }
20124  #endif
20125  #if CYTHON_COMPILING_IN_CPYTHON
20126  {
20127  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20128  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20129  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20130  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
20131  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
20132  }
20133  }
20134  #endif
20135  #if CYTHON_COMPILING_IN_CPYTHON
20136  {
20137  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20138  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20139  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20140  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
20141  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
20142  }
20143  }
20144  #endif
20145  #if CYTHON_COMPILING_IN_CPYTHON
20146  {
20147  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20148  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20149  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20150  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
20151  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
20152  }
20153  }
20154  #endif
20155  #if CYTHON_COMPILING_IN_CPYTHON
20156  {
20157  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20158  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20159  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20160  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
20161  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
20162  }
20163  }
20164  #endif
20165  #if CYTHON_COMPILING_IN_CPYTHON
20166  {
20167  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20168  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20169  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20170  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
20171  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
20172  }
20173  }
20174  #endif
20175  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20176  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20177  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20178  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
20179  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
20180  #if PY_VERSION_HEX < 0x030800B1
20181  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
20182  #endif
20183  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical___pyx_scope_struct____iter__.tp_dictoffset && __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro == PyObject_GenericGetAttr)) {
20184  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
20185  }
20186  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
20187  __Pyx_RefNannyFinishContext();
20188  return 0;
20189  __pyx_L1_error:;
20190  __Pyx_RefNannyFinishContext();
20191  return -1;
20192 }
20193 
20194 static int __Pyx_modinit_type_import_code(void) {
20195  __Pyx_RefNannyDeclarations
20196  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
20197  /*--- Type import code ---*/
20198  __Pyx_RefNannyFinishContext();
20199  return 0;
20200 }
20201 
20202 static int __Pyx_modinit_variable_import_code(void) {
20203  __Pyx_RefNannyDeclarations
20204  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
20205  /*--- Variable import code ---*/
20206  __Pyx_RefNannyFinishContext();
20207  return 0;
20208 }
20209 
20210 static int __Pyx_modinit_function_import_code(void) {
20211  __Pyx_RefNannyDeclarations
20212  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
20213  /*--- Function import code ---*/
20214  __Pyx_RefNannyFinishContext();
20215  return 0;
20216 }
20217 
20218 
20219 #if PY_MAJOR_VERSION < 3
20220 #ifdef CYTHON_NO_PYINIT_EXPORT
20221 #define __Pyx_PyMODINIT_FUNC void
20222 #else
20223 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
20224 #endif
20225 #else
20226 #ifdef CYTHON_NO_PYINIT_EXPORT
20227 #define __Pyx_PyMODINIT_FUNC PyObject *
20228 #else
20229 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
20230 #endif
20231 #endif
20232 
20233 
20234 #if PY_MAJOR_VERSION < 3
20235 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
20236 __Pyx_PyMODINIT_FUNC initPyClical(void)
20237 #else
20238 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
20239 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
20240 #if CYTHON_PEP489_MULTI_PHASE_INIT
20241 {
20242  return PyModuleDef_Init(&__pyx_moduledef);
20243 }
20244 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
20245  #if PY_VERSION_HEX >= 0x030700A1
20246  static PY_INT64_T main_interpreter_id = -1;
20247  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
20248  if (main_interpreter_id == -1) {
20249  main_interpreter_id = current_id;
20250  return (unlikely(current_id == -1)) ? -1 : 0;
20251  } else if (unlikely(main_interpreter_id != current_id))
20252  #else
20253  static PyInterpreterState *main_interpreter = NULL;
20254  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
20255  if (!main_interpreter) {
20256  main_interpreter = current_interpreter;
20257  } else if (unlikely(main_interpreter != current_interpreter))
20258  #endif
20259  {
20260  PyErr_SetString(
20261  PyExc_ImportError,
20262  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
20263  return -1;
20264  }
20265  return 0;
20266 }
20267 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
20268  PyObject *value = PyObject_GetAttrString(spec, from_name);
20269  int result = 0;
20270  if (likely(value)) {
20271  if (allow_none || value != Py_None) {
20272  result = PyDict_SetItemString(moddict, to_name, value);
20273  }
20274  Py_DECREF(value);
20275  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
20276  PyErr_Clear();
20277  } else {
20278  result = -1;
20279  }
20280  return result;
20281 }
20282 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
20283  PyObject *module = NULL, *moddict, *modname;
20284  if (__Pyx_check_single_interpreter())
20285  return NULL;
20286  if (__pyx_m)
20287  return __Pyx_NewRef(__pyx_m);
20288  modname = PyObject_GetAttrString(spec, "name");
20289  if (unlikely(!modname)) goto bad;
20290  module = PyModule_NewObject(modname);
20291  Py_DECREF(modname);
20292  if (unlikely(!module)) goto bad;
20293  moddict = PyModule_GetDict(module);
20294  if (unlikely(!moddict)) goto bad;
20295  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
20296  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
20297  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
20298  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
20299  return module;
20300 bad:
20301  Py_XDECREF(module);
20302  return NULL;
20303 }
20304 
20305 
20306 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
20307 #endif
20308 #endif
20309 {
20310  PyObject *__pyx_t_1 = NULL;
20311  PyObject *__pyx_t_2 = NULL;
20312  PyObject *__pyx_t_3 = NULL;
20313  int __pyx_t_4;
20314  __Pyx_RefNannyDeclarations
20315  #if CYTHON_PEP489_MULTI_PHASE_INIT
20316  if (__pyx_m) {
20317  if (__pyx_m == __pyx_pyinit_module) return 0;
20318  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
20319  return -1;
20320  }
20321  #elif PY_MAJOR_VERSION >= 3
20322  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
20323  #endif
20324  #if CYTHON_REFNANNY
20325 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
20326 if (!__Pyx_RefNanny) {
20327  PyErr_Clear();
20328  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
20329  if (!__Pyx_RefNanny)
20330  Py_FatalError("failed to import 'refnanny' module");
20331 }
20332 #endif
20333  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
20334  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20335  #ifdef __Pxy_PyFrame_Initialize_Offsets
20336  __Pxy_PyFrame_Initialize_Offsets();
20337  #endif
20338  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
20339  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
20340  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
20341  #ifdef __Pyx_CyFunction_USED
20342  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20343  #endif
20344  #ifdef __Pyx_FusedFunction_USED
20345  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20346  #endif
20347  #ifdef __Pyx_Coroutine_USED
20348  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20349  #endif
20350  #ifdef __Pyx_Generator_USED
20351  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20352  #endif
20353  #ifdef __Pyx_AsyncGen_USED
20354  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20355  #endif
20356  #ifdef __Pyx_StopAsyncIteration_USED
20357  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20358  #endif
20359  /*--- Library function declarations ---*/
20360  /*--- Threads initialization code ---*/
20361  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
20362  #ifdef WITH_THREAD /* Python build with threading support? */
20363  PyEval_InitThreads();
20364  #endif
20365  #endif
20366  /*--- Module creation code ---*/
20367  #if CYTHON_PEP489_MULTI_PHASE_INIT
20368  __pyx_m = __pyx_pyinit_module;
20369  Py_INCREF(__pyx_m);
20370  #else
20371  #if PY_MAJOR_VERSION < 3
20372  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
20373  #else
20374  __pyx_m = PyModule_Create(&__pyx_moduledef);
20375  #endif
20376  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
20377  #endif
20378  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
20379  Py_INCREF(__pyx_d);
20380  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
20381  Py_INCREF(__pyx_b);
20382  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
20383  Py_INCREF(__pyx_cython_runtime);
20384  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20385  /*--- Initialize various global constants etc. ---*/
20386  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20387  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
20388  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20389  #endif
20390  if (__pyx_module_is_main_PyClical) {
20391  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20392  }
20393  #if PY_MAJOR_VERSION >= 3
20394  {
20395  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
20396  if (!PyDict_GetItemString(modules, "PyClical")) {
20397  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
20398  }
20399  }
20400  #endif
20401  /*--- Builtin init code ---*/
20402  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20403  /*--- Constants init code ---*/
20404  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20405  /*--- Global type/function init code ---*/
20406  (void)__Pyx_modinit_global_init_code();
20407  (void)__Pyx_modinit_variable_export_code();
20408  (void)__Pyx_modinit_function_export_code();
20409  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
20410  (void)__Pyx_modinit_type_import_code();
20411  (void)__Pyx_modinit_variable_import_code();
20412  (void)__Pyx_modinit_function_import_code();
20413  /*--- Execution code ---*/
20414  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
20415  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20416  #endif
20417 
20418  /* "PyClical.pyx":29
20419  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
20420  *
20421  * import math # <<<<<<<<<<<<<<
20422  * import numbers
20423  * import collections
20424  */
20425  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
20426  __Pyx_GOTREF(__pyx_t_1);
20427  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
20428  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20429 
20430  /* "PyClical.pyx":30
20431  *
20432  * import math
20433  * import numbers # <<<<<<<<<<<<<<
20434  * import collections
20435  *
20436  */
20437  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
20438  __Pyx_GOTREF(__pyx_t_1);
20439  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
20440  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20441 
20442  /* "PyClical.pyx":31
20443  * import math
20444  * import numbers
20445  * import collections # <<<<<<<<<<<<<<
20446  *
20447  * __version__ = "0.8.4"
20448  */
20449  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
20450  __Pyx_GOTREF(__pyx_t_1);
20451  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
20452  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20453 
20454  /* "PyClical.pyx":33
20455  * import collections
20456  *
20457  * __version__ = "0.8.4" # <<<<<<<<<<<<<<
20458  *
20459  * from PyClical cimport *
20460  */
20461  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_0_8_4) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
20462 
20463  /* "PyClical.pyx":406
20464  * return index_set_to_str( self.unwrap() ).decode()
20465  *
20466  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
20467  * """
20468  * Tests for functions that Doctest cannot see.
20469  */
20470  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_1index_set_hidden_doctests, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
20471  __Pyx_GOTREF(__pyx_t_1);
20472  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 406, __pyx_L1_error)
20473  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20474 
20475  /* "PyClical.pyx":1244
20476  * return clifford_to_str( self.unwrap() ).decode()
20477  *
20478  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20479  * """
20480  * Tests for functions that Doctest cannot see.
20481  */
20482  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_9clifford_hidden_doctests, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error)
20483  __Pyx_GOTREF(__pyx_t_1);
20484  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1244, __pyx_L1_error)
20485  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20486 
20487  /* "PyClical.pyx":1855
20488  *
20489  * # Some abbreviations.
20490  * scalar_epsilon = epsilon # <<<<<<<<<<<<<<
20491  *
20492  * pi = atan(clifford(1.0)) * 4.0
20493  */
20494  __pyx_t_1 = PyFloat_FromDouble(epsilon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
20495  __Pyx_GOTREF(__pyx_t_1);
20496  if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalar_epsilon, __pyx_t_1) < 0) __PYX_ERR(0, 1855, __pyx_L1_error)
20497  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20498 
20499  /* "PyClical.pyx":1857
20500  * scalar_epsilon = epsilon
20501  *
20502  * pi = atan(clifford(1.0)) * 4.0 # <<<<<<<<<<<<<<
20503  * tau = atan(clifford(1.0)) * 8.0
20504  *
20505  */
20506  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20507  __Pyx_GOTREF(__pyx_t_1);
20508  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
20509  __Pyx_GOTREF(__pyx_t_2);
20510  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20511  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_4_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20512  __Pyx_GOTREF(__pyx_t_1);
20513  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20514  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_1) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
20515  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20516 
20517  /* "PyClical.pyx":1858
20518  *
20519  * pi = atan(clifford(1.0)) * 4.0
20520  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
20521  *
20522  * cl = clifford
20523  */
20524  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __pyx_L1_error)
20525  __Pyx_GOTREF(__pyx_t_1);
20526  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1858, __pyx_L1_error)
20527  __Pyx_GOTREF(__pyx_t_2);
20528  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20529  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __pyx_L1_error)
20530  __Pyx_GOTREF(__pyx_t_1);
20531  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20532  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1858, __pyx_L1_error)
20533  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20534 
20535  /* "PyClical.pyx":1860
20536  * tau = atan(clifford(1.0)) * 8.0
20537  *
20538  * cl = clifford # <<<<<<<<<<<<<<
20539  * """
20540  * Abbreviation for clifford.
20541  */
20542  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1860, __pyx_L1_error)
20543 
20544  /* "PyClical.pyx":1878
20545  * """
20546  *
20547  * ist = index_set # <<<<<<<<<<<<<<
20548  * """
20549  * Abbreviation for index_set.
20550  */
20551  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1878, __pyx_L1_error)
20552 
20553  /* "PyClical.pyx":1886
20554  * """
20555  *
20556  * def e(obj): # <<<<<<<<<<<<<<
20557  * """
20558  * Abbreviation for clifford(index_set(obj)).
20559  */
20560  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_83e, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
20561  __Pyx_GOTREF(__pyx_t_1);
20562  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_1) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
20563  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20564 
20565  /* "PyClical.pyx":1899
20566  * return clifford(index_set(obj))
20567  *
20568  * def istpq(p, q): # <<<<<<<<<<<<<<
20569  * """
20570  * Abbreviation for index_set({-q,...p}).
20571  */
20572  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_85istpq, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1899, __pyx_L1_error)
20573  __Pyx_GOTREF(__pyx_t_1);
20574  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_1) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
20575  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20576 
20577  /* "PyClical.pyx":1908
20578  * return index_set(set(range(-q,p+1)))
20579  *
20580  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20581  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20582  *
20583  */
20584  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
20585  __Pyx_GOTREF(__pyx_t_1);
20586  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1908, __pyx_L1_error)
20587  __Pyx_GOTREF(__pyx_t_2);
20588  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20589  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
20590  __Pyx_GOTREF(__pyx_t_1);
20591  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1908, __pyx_L1_error)
20592  __Pyx_GOTREF(__pyx_t_3);
20593  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20594  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
20595  __Pyx_GOTREF(__pyx_t_1);
20596  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20597  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20598  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_1) < 0) __PYX_ERR(0, 1908, __pyx_L1_error)
20599  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20600 
20601  /* "PyClical.pyx":1909
20602  *
20603  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20604  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20605  *
20606  * # Doctest interface.
20607  */
20608  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
20609  __Pyx_GOTREF(__pyx_t_1);
20610  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L1_error)
20611  __Pyx_GOTREF(__pyx_t_3);
20612  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20613  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
20614  __Pyx_GOTREF(__pyx_t_1);
20615  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20616  __Pyx_GOTREF(__pyx_t_2);
20617  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20618  __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
20619  __Pyx_GOTREF(__pyx_t_1);
20620  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20621  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20622  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_1) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20623  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20624 
20625  /* "PyClical.pyx":1912
20626  *
20627  * # Doctest interface.
20628  * def _test(): # <<<<<<<<<<<<<<
20629  * import PyClical, doctest
20630  * return doctest.testmod(PyClical)
20631  */
20632  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_87_test, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
20633  __Pyx_GOTREF(__pyx_t_1);
20634  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1912, __pyx_L1_error)
20635  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20636 
20637  /* "PyClical.pyx":1916
20638  * return doctest.testmod(PyClical)
20639  *
20640  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20641  * _test()
20642  */
20643  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
20644  __Pyx_GOTREF(__pyx_t_1);
20645  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_main, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1916, __pyx_L1_error)
20646  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20647  if (__pyx_t_4) {
20648 
20649  /* "PyClical.pyx":1917
20650  *
20651  * if __name__ == "__main__":
20652  * _test() # <<<<<<<<<<<<<<
20653  */
20654  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __pyx_L1_error)
20655  __Pyx_GOTREF(__pyx_t_1);
20656  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20657  __Pyx_GOTREF(__pyx_t_2);
20658  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20659  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20660 
20661  /* "PyClical.pyx":1916
20662  * return doctest.testmod(PyClical)
20663  *
20664  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20665  * _test()
20666  */
20667  }
20668 
20669  /* "PyClical.pyx":1
20670  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20671  * # cython: language_level=3
20672  * # distutils: language = c++
20673  */
20674  __pyx_t_2 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
20675  __Pyx_GOTREF(__pyx_t_2);
20676  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_copy_line_65, __pyx_kp_u_Copy_this_index_set_object_s_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20677  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___setitem___line_179, __pyx_kp_u_Set_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20678  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___getitem___line_191, __pyx_kp_u_Get_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20679  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iter___line_229, __pyx_kp_u_Iterate_over_the_indices_of_an) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20680  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___invert___line_240, __pyx_kp_u_Set_complement_not_print_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20681  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___xor___line_249, __pyx_kp_u_Symmetric_set_difference_exclus) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20682  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ixor___line_260, __pyx_kp_u_Symmetric_set_difference_exclus_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20683  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___and___line_271, __pyx_kp_u_Set_intersection_and_print_inde) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20684  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iand___line_282, __pyx_kp_u_Set_intersection_and_x_index_se) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20685  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___or___line_293, __pyx_kp_u_Set_union_or_print_index_set_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20686  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ior___line_304, __pyx_kp_u_Set_union_or_x_index_set_1_x_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20687  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_line_315, __pyx_kp_u_Cardinality_Number_of_indices_i) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20688  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_neg_line_324, __pyx_kp_u_Number_of_negative_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20689  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_pos_line_333, __pyx_kp_u_Number_of_positive_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20690  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_min_line_342, __pyx_kp_u_Minimum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20691  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_max_line_351, __pyx_kp_u_Maximum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20692  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_sign_of_mult_line_366, __pyx_kp_u_Sign_of_geometric_product_of_tw) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20693  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_sign_of_square_line_37, __pyx_kp_u_Sign_of_geometric_square_of_a_C) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20694  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___repr___line_384, __pyx_kp_u_The_official_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20695  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___str___line_395, __pyx_kp_u_The_informal_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20696  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_hidden_doctests_line_4, __pyx_kp_u_Tests_for_functions_that_Doctes) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20697  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_compare_line_492, __pyx_kp_u_lexicographic_compare_eg_3_4_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20698  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_min_neg_line_504, __pyx_kp_u_Minimum_negative_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20699  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_pos_line_513, __pyx_kp_u_Maximum_positive_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20700  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_copy_line_556, __pyx_kp_u_Copy_this_clifford_object_x_cli) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20701  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iter___line_638, __pyx_kp_u_Not_applicable_for_a_in_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20702  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reframe_line_649, __pyx_kp_u_Put_self_into_a_larger_frame_co) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20703  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___getitem___line_707, __pyx_kp_u_Subscripting_map_from_index_set) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20704  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___neg___line_722, __pyx_kp_u_Unary_print_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20705  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pos___line_731, __pyx_kp_u_Unary_print_clifford_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20706  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___add___line_740, __pyx_kp_u_Geometric_sum_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20707  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iadd___line_751, __pyx_kp_u_Geometric_sum_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20708  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___sub___line_760, __pyx_kp_u_Geometric_difference_print_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20709  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___isub___line_771, __pyx_kp_u_Geometric_difference_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20710  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mul___line_780, __pyx_kp_u_Geometric_product_print_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20711  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imul___line_793, __pyx_kp_u_Geometric_product_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20712  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mod___line_806, __pyx_kp_u_Contraction_print_clifford_1_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20713  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imod___line_821, __pyx_kp_u_Contraction_x_clifford_1_x_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20714  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___and___line_836, __pyx_kp_u_Inner_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20715  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iand___line_851, __pyx_kp_u_Inner_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20716  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___xor___line_866, __pyx_kp_u_Outer_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20717  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ixor___line_881, __pyx_kp_u_Outer_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20718  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___truediv___line_896, __pyx_kp_u_Geometric_quotient_print_cliffo) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20719  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___idiv___line_911, __pyx_kp_u_Geometric_quotient_x_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20720  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_inv_line_926, __pyx_kp_u_Geometric_multiplicative_invers) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20721  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___or___line_939, __pyx_kp_u_Transform_left_hand_side_using) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20722  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ior___line_950, __pyx_kp_u_Transform_left_hand_side_using_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20723  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pow___line_961, __pyx_kp_u_Power_self_to_the_m_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20724  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pow_line_980, __pyx_kp_u_Power_self_to_the_m_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20725  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_outer_pow_line_1004, __pyx_kp_u_Outer_product_power_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20726  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___call___line_1020, __pyx_kp_u_Pure_grade_vector_part_print_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20727  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_scalar_line_1039, __pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20728  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pure_line_1050, __pyx_kp_u_Pure_part_print_clifford_1_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20729  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_even_line_1061, __pyx_kp_u_Even_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20730  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_odd_line_1070, __pyx_kp_u_Odd_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20731  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_vector_part_line_1079, __pyx_kp_u_Vector_part_of_multivector_as_a) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20732  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_involute_line_1107, __pyx_kp_u_Main_involution_each_i_is_repla) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20733  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reverse_line_1123, __pyx_kp_u_Reversion_eg_clifford_1_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20734  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_conj_line_1138, __pyx_kp_u_Conjugation_reverse_o_involute) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20735  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_quad_line_1153, __pyx_kp_u_Quadratic_form_rev_x_x_0_print) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20736  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_norm_line_1164, __pyx_kp_u_Norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20737  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_abs_line_1175, __pyx_kp_u_Absolute_value_square_root_of_n) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20738  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_max_abs_line_1184, __pyx_kp_u_Maximum_of_absolute_values_of_c) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20739  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_truncated_line_1195, __pyx_kp_u_Remove_all_terms_of_self_with_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20740  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_isnan_line_1206, __pyx_kp_u_Check_if_a_multivector_contains) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20741  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_frame_line_1215, __pyx_kp_u_Subalgebra_generated_by_all_gen) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20742  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___repr___line_1226, __pyx_kp_u_The_official_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20743  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___str___line_1235, __pyx_kp_u_The_informal_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20744  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_hidden_doctests_line_12, __pyx_kp_u_Tests_for_functions_that_Doctes_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20745  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_inv_line_1328, __pyx_kp_u_Geometric_multiplicative_invers_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20746  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_scalar_line_1343, __pyx_kp_u_Scalar_part_scalar_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20747  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_real_line_1354, __pyx_kp_u_Real_part_synonym_for_scalar_pa) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20748  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_imag_line_1365, __pyx_kp_u_Imaginary_part_deprecated_alway) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20749  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pure_line_1376, __pyx_kp_u_Pure_part_print_pure_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20750  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_even_line_1387, __pyx_kp_u_Even_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20751  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_odd_line_1396, __pyx_kp_u_Odd_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20752  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_involute_line_1405, __pyx_kp_u_Main_involution_each_i_is_repla_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20753  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_reverse_line_1420, __pyx_kp_u_Reversion_eg_1_2_2_1_print_reve) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20754  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_conj_line_1435, __pyx_kp_u_Conjugation_reverse_o_involute_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20755  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_quad_line_1450, __pyx_kp_u_Quadratic_form_rev_x_x_0_print_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20756  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_norm_line_1461, __pyx_kp_u_norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20757  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_abs_line_1472, __pyx_kp_u_Absolute_value_of_multivector_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20758  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_abs_line_1481, __pyx_kp_u_Maximum_absolute_value_of_coord) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20759  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pow_line_1493, __pyx_kp_u_Integer_power_of_multivector_ob) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20760  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_outer_pow_line_1517, __pyx_kp_u_Outer_product_power_of_multivec) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20761  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_complexifier_line_1526, __pyx_kp_u_Square_root_of_1_which_commutes) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20762  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sqrt_line_1541, __pyx_kp_u_Square_root_of_multivector_with) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20763  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_exp_line_1564, __pyx_kp_u_Exponential_of_multivector_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20764  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_log_line_1578, __pyx_kp_u_Natural_logarithm_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20765  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cos_line_1601, __pyx_kp_u_Cosine_of_multivector_with_opti) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20766  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acos_line_1618, __pyx_kp_u_Inverse_cosine_of_multivector_w) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20767  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cosh_line_1639, __pyx_kp_u_Hyperbolic_cosine_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20768  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acosh_line_1655, __pyx_kp_u_Inverse_hyperbolic_cosine_of_mu) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20769  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sin_line_1678, __pyx_kp_u_Sine_of_multivector_with_option) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20770  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asin_line_1697, __pyx_kp_u_Inverse_sine_of_multivector_wit) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20771  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sinh_line_1718, __pyx_kp_u_Hyperbolic_sine_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20772  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asinh_line_1732, __pyx_kp_u_Inverse_hyperbolic_sine_of_mult) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20773  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tan_line_1751, __pyx_kp_u_Tangent_of_multivector_with_opt) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20774  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atan_line_1768, __pyx_kp_u_Inverse_tangent_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20775  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tanh_line_1785, __pyx_kp_u_Hyperbolic_tangent_of_multivect) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20776  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atanh_line_1797, __pyx_kp_u_Inverse_hyperbolic_tangent_of_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20777  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_random_clifford_line_1814, __pyx_kp_u_Random_multivector_within_a_fra) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20778  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3_line_1823, __pyx_kp_u_Convert_Euclidean_3D_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20779  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3std_line_1832, __pyx_kp_u_Convert_CGA3_null_vector_to_sta) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20780  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_agc3_line_1843, __pyx_kp_u_Convert_CGA3_null_vector_to_Euc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20781  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_e_line_1886, __pyx_kp_u_Abbreviation_for_clifford_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20782  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_istpq_line_1899, __pyx_kp_u_Abbreviation_for_index_set_q_p) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20783  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20784  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20785 
20786  /* "string.to_py":55
20787  *
20788  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
20789  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
20790  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
20791  *
20792  */
20793 
20794  /*--- Wrapped vars code ---*/
20795 
20796  goto __pyx_L0;
20797  __pyx_L1_error:;
20798  __Pyx_XDECREF(__pyx_t_1);
20799  __Pyx_XDECREF(__pyx_t_2);
20800  __Pyx_XDECREF(__pyx_t_3);
20801  if (__pyx_m) {
20802  if (__pyx_d) {
20803  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
20804  }
20805  Py_CLEAR(__pyx_m);
20806  } else if (!PyErr_Occurred()) {
20807  PyErr_SetString(PyExc_ImportError, "init PyClical");
20808  }
20809  __pyx_L0:;
20810  __Pyx_RefNannyFinishContext();
20811  #if CYTHON_PEP489_MULTI_PHASE_INIT
20812  return (__pyx_m != NULL) ? 0 : -1;
20813  #elif PY_MAJOR_VERSION >= 3
20814  return __pyx_m;
20815  #else
20816  return;
20817  #endif
20818 }
20819 
20820 /* --- Runtime support code --- */
20821 /* Refnanny */
20822 #if CYTHON_REFNANNY
20823 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20824  PyObject *m = NULL, *p = NULL;
20825  void *r = NULL;
20826  m = PyImport_ImportModule(modname);
20827  if (!m) goto end;
20828  p = PyObject_GetAttrString(m, "RefNannyAPI");
20829  if (!p) goto end;
20830  r = PyLong_AsVoidPtr(p);
20831 end:
20832  Py_XDECREF(p);
20833  Py_XDECREF(m);
20834  return (__Pyx_RefNannyAPIStruct *)r;
20835 }
20836 #endif
20837 
20838 /* PyObjectGetAttrStr */
20839 #if CYTHON_USE_TYPE_SLOTS
20840 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20841  PyTypeObject* tp = Py_TYPE(obj);
20842  if (likely(tp->tp_getattro))
20843  return tp->tp_getattro(obj, attr_name);
20844 #if PY_MAJOR_VERSION < 3
20845  if (likely(tp->tp_getattr))
20846  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
20847 #endif
20848  return PyObject_GetAttr(obj, attr_name);
20849 }
20850 #endif
20851 
20852 /* GetBuiltinName */
20853 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20854  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20855  if (unlikely(!result)) {
20856  PyErr_Format(PyExc_NameError,
20857 #if PY_MAJOR_VERSION >= 3
20858  "name '%U' is not defined", name);
20859 #else
20860  "name '%.200s' is not defined", PyString_AS_STRING(name));
20861 #endif
20862  }
20863  return result;
20864 }
20865 
20866 /* PyCFunctionFastCall */
20867 #if CYTHON_FAST_PYCCALL
20868 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
20869  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
20870  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
20871  PyObject *self = PyCFunction_GET_SELF(func);
20872  int flags = PyCFunction_GET_FLAGS(func);
20873  assert(PyCFunction_Check(func));
20874  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
20875  assert(nargs >= 0);
20876  assert(nargs == 0 || args != NULL);
20877  /* _PyCFunction_FastCallDict() must not be called with an exception set,
20878  because it may clear it (directly or indirectly) and so the
20879  caller loses its exception */
20880  assert(!PyErr_Occurred());
20881  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
20882  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
20883  } else {
20884  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
20885  }
20886 }
20887 #endif
20888 
20889 /* PyFunctionFastCall */
20890 #if CYTHON_FAST_PYCALL
20891 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
20892  PyObject *globals) {
20893  PyFrameObject *f;
20894  PyThreadState *tstate = __Pyx_PyThreadState_Current;
20895  PyObject **fastlocals;
20896  Py_ssize_t i;
20897  PyObject *result;
20898  assert(globals != NULL);
20899  /* XXX Perhaps we should create a specialized
20900  PyFrame_New() that doesn't take locals, but does
20901  take builtins without sanity checking them.
20902  */
20903  assert(tstate != NULL);
20904  f = PyFrame_New(tstate, co, globals, NULL);
20905  if (f == NULL) {
20906  return NULL;
20907  }
20908  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
20909  for (i = 0; i < na; i++) {
20910  Py_INCREF(*args);
20911  fastlocals[i] = *args++;
20912  }
20913  result = PyEval_EvalFrameEx(f,0);
20914  ++tstate->recursion_depth;
20915  Py_DECREF(f);
20916  --tstate->recursion_depth;
20917  return result;
20918 }
20919 #if 1 || PY_VERSION_HEX < 0x030600B1
20920 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
20921  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
20922  PyObject *globals = PyFunction_GET_GLOBALS(func);
20923  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
20924  PyObject *closure;
20925 #if PY_MAJOR_VERSION >= 3
20926  PyObject *kwdefs;
20927 #endif
20928  PyObject *kwtuple, **k;
20929  PyObject **d;
20930  Py_ssize_t nd;
20931  Py_ssize_t nk;
20932  PyObject *result;
20933  assert(kwargs == NULL || PyDict_Check(kwargs));
20934  nk = kwargs ? PyDict_Size(kwargs) : 0;
20935  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
20936  return NULL;
20937  }
20938  if (
20939 #if PY_MAJOR_VERSION >= 3
20940  co->co_kwonlyargcount == 0 &&
20941 #endif
20942  likely(kwargs == NULL || nk == 0) &&
20943  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
20944  if (argdefs == NULL && co->co_argcount == nargs) {
20945  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
20946  goto done;
20947  }
20948  else if (nargs == 0 && argdefs != NULL
20949  && co->co_argcount == Py_SIZE(argdefs)) {
20950  /* function called with no arguments, but all parameters have
20951  a default value: use default values as arguments .*/
20952  args = &PyTuple_GET_ITEM(argdefs, 0);
20953  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
20954  goto done;
20955  }
20956  }
20957  if (kwargs != NULL) {
20958  Py_ssize_t pos, i;
20959  kwtuple = PyTuple_New(2 * nk);
20960  if (kwtuple == NULL) {
20961  result = NULL;
20962  goto done;
20963  }
20964  k = &PyTuple_GET_ITEM(kwtuple, 0);
20965  pos = i = 0;
20966  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
20967  Py_INCREF(k[i]);
20968  Py_INCREF(k[i+1]);
20969  i += 2;
20970  }
20971  nk = i / 2;
20972  }
20973  else {
20974  kwtuple = NULL;
20975  k = NULL;
20976  }
20977  closure = PyFunction_GET_CLOSURE(func);
20978 #if PY_MAJOR_VERSION >= 3
20979  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
20980 #endif
20981  if (argdefs != NULL) {
20982  d = &PyTuple_GET_ITEM(argdefs, 0);
20983  nd = Py_SIZE(argdefs);
20984  }
20985  else {
20986  d = NULL;
20987  nd = 0;
20988  }
20989 #if PY_MAJOR_VERSION >= 3
20990  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
20991  args, nargs,
20992  k, (int)nk,
20993  d, (int)nd, kwdefs, closure);
20994 #else
20995  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
20996  args, nargs,
20997  k, (int)nk,
20998  d, (int)nd, closure);
20999 #endif
21000  Py_XDECREF(kwtuple);
21001 done:
21002  Py_LeaveRecursiveCall();
21003  return result;
21004 }
21005 #endif
21006 #endif
21007 
21008 /* PyObjectCall */
21009 #if CYTHON_COMPILING_IN_CPYTHON
21010 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
21011  PyObject *result;
21012  ternaryfunc call = func->ob_type->tp_call;
21013  if (unlikely(!call))
21014  return PyObject_Call(func, arg, kw);
21015  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21016  return NULL;
21017  result = (*call)(func, arg, kw);
21018  Py_LeaveRecursiveCall();
21019  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21020  PyErr_SetString(
21021  PyExc_SystemError,
21022  "NULL result without error in PyObject_Call");
21023  }
21024  return result;
21025 }
21026 #endif
21027 
21028 /* PyObjectCallMethO */
21029 #if CYTHON_COMPILING_IN_CPYTHON
21030 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
21031  PyObject *self, *result;
21032  PyCFunction cfunc;
21033  cfunc = PyCFunction_GET_FUNCTION(func);
21034  self = PyCFunction_GET_SELF(func);
21035  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21036  return NULL;
21037  result = cfunc(self, arg);
21038  Py_LeaveRecursiveCall();
21039  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21040  PyErr_SetString(
21041  PyExc_SystemError,
21042  "NULL result without error in PyObject_Call");
21043  }
21044  return result;
21045 }
21046 #endif
21047 
21048 /* PyObjectCallOneArg */
21049 #if CYTHON_COMPILING_IN_CPYTHON
21050 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21051  PyObject *result;
21052  PyObject *args = PyTuple_New(1);
21053  if (unlikely(!args)) return NULL;
21054  Py_INCREF(arg);
21055  PyTuple_SET_ITEM(args, 0, arg);
21056  result = __Pyx_PyObject_Call(func, args, NULL);
21057  Py_DECREF(args);
21058  return result;
21059 }
21060 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21061 #if CYTHON_FAST_PYCALL
21062  if (PyFunction_Check(func)) {
21063  return __Pyx_PyFunction_FastCall(func, &arg, 1);
21064  }
21065 #endif
21066  if (likely(PyCFunction_Check(func))) {
21067  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
21068  return __Pyx_PyObject_CallMethO(func, arg);
21069 #if CYTHON_FAST_PYCCALL
21070  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
21071  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
21072 #endif
21073  }
21074  }
21075  return __Pyx__PyObject_CallOneArg(func, arg);
21076 }
21077 #else
21078 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21079  PyObject *result;
21080  PyObject *args = PyTuple_Pack(1, arg);
21081  if (unlikely(!args)) return NULL;
21082  result = __Pyx_PyObject_Call(func, args, NULL);
21083  Py_DECREF(args);
21084  return result;
21085 }
21086 #endif
21087 
21088 /* PyErrFetchRestore */
21089 #if CYTHON_FAST_THREAD_STATE
21090 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21091  PyObject *tmp_type, *tmp_value, *tmp_tb;
21092  tmp_type = tstate->curexc_type;
21093  tmp_value = tstate->curexc_value;
21094  tmp_tb = tstate->curexc_traceback;
21095  tstate->curexc_type = type;
21096  tstate->curexc_value = value;
21097  tstate->curexc_traceback = tb;
21098  Py_XDECREF(tmp_type);
21099  Py_XDECREF(tmp_value);
21100  Py_XDECREF(tmp_tb);
21101 }
21102 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21103  *type = tstate->curexc_type;
21104  *value = tstate->curexc_value;
21105  *tb = tstate->curexc_traceback;
21106  tstate->curexc_type = 0;
21107  tstate->curexc_value = 0;
21108  tstate->curexc_traceback = 0;
21109 }
21110 #endif
21111 
21112 /* WriteUnraisableException */
21113 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
21114  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
21115  int full_traceback, CYTHON_UNUSED int nogil) {
21116  PyObject *old_exc, *old_val, *old_tb;
21117  PyObject *ctx;
21118  __Pyx_PyThreadState_declare
21119 #ifdef WITH_THREAD
21120  PyGILState_STATE state;
21121  if (nogil)
21122  state = PyGILState_Ensure();
21123 #ifdef _MSC_VER
21124  else state = (PyGILState_STATE)-1;
21125 #endif
21126 #endif
21127  __Pyx_PyThreadState_assign
21128  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
21129  if (full_traceback) {
21130  Py_XINCREF(old_exc);
21131  Py_XINCREF(old_val);
21132  Py_XINCREF(old_tb);
21133  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21134  PyErr_PrintEx(1);
21135  }
21136  #if PY_MAJOR_VERSION < 3
21137  ctx = PyString_FromString(name);
21138  #else
21139  ctx = PyUnicode_FromString(name);
21140  #endif
21141  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21142  if (!ctx) {
21143  PyErr_WriteUnraisable(Py_None);
21144  } else {
21145  PyErr_WriteUnraisable(ctx);
21146  Py_DECREF(ctx);
21147  }
21148 #ifdef WITH_THREAD
21149  if (nogil)
21150  PyGILState_Release(state);
21151 #endif
21152 }
21153 
21154 /* PyDictVersioning */
21155 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
21156 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
21157  PyObject *dict = Py_TYPE(obj)->tp_dict;
21158  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
21159 }
21160 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
21161  PyObject **dictptr = NULL;
21162  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
21163  if (offset) {
21164 #if CYTHON_COMPILING_IN_CPYTHON
21165  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
21166 #else
21167  dictptr = _PyObject_GetDictPtr(obj);
21168 #endif
21169  }
21170  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
21171 }
21172 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
21173  PyObject *dict = Py_TYPE(obj)->tp_dict;
21174  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
21175  return 0;
21176  return obj_dict_version == __Pyx_get_object_dict_version(obj);
21177 }
21178 #endif
21179 
21180 /* PyObjectCallNoArg */
21181 #if CYTHON_COMPILING_IN_CPYTHON
21182 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
21183 #if CYTHON_FAST_PYCALL
21184  if (PyFunction_Check(func)) {
21185  return __Pyx_PyFunction_FastCall(func, NULL, 0);
21186  }
21187 #endif
21188 #ifdef __Pyx_CyFunction_USED
21189  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
21190 #else
21191  if (likely(PyCFunction_Check(func)))
21192 #endif
21193  {
21194  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
21195  return __Pyx_PyObject_CallMethO(func, NULL);
21196  }
21197  }
21198  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
21199 }
21200 #endif
21201 
21202 /* RaiseDoubleKeywords */
21203 static void __Pyx_RaiseDoubleKeywordsError(
21204  const char* func_name,
21205  PyObject* kw_name)
21206 {
21207  PyErr_Format(PyExc_TypeError,
21208  #if PY_MAJOR_VERSION >= 3
21209  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
21210  #else
21211  "%s() got multiple values for keyword argument '%s'", func_name,
21212  PyString_AsString(kw_name));
21213  #endif
21214 }
21215 
21216 /* ParseKeywords */
21217 static int __Pyx_ParseOptionalKeywords(
21218  PyObject *kwds,
21219  PyObject **argnames[],
21220  PyObject *kwds2,
21221  PyObject *values[],
21222  Py_ssize_t num_pos_args,
21223  const char* function_name)
21224 {
21225  PyObject *key = 0, *value = 0;
21226  Py_ssize_t pos = 0;
21227  PyObject*** name;
21228  PyObject*** first_kw_arg = argnames + num_pos_args;
21229  while (PyDict_Next(kwds, &pos, &key, &value)) {
21230  name = first_kw_arg;
21231  while (*name && (**name != key)) name++;
21232  if (*name) {
21233  values[name-argnames] = value;
21234  continue;
21235  }
21236  name = first_kw_arg;
21237  #if PY_MAJOR_VERSION < 3
21238  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
21239  while (*name) {
21240  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
21241  && _PyString_Eq(**name, key)) {
21242  values[name-argnames] = value;
21243  break;
21244  }
21245  name++;
21246  }
21247  if (*name) continue;
21248  else {
21249  PyObject*** argname = argnames;
21250  while (argname != first_kw_arg) {
21251  if ((**argname == key) || (
21252  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
21253  && _PyString_Eq(**argname, key))) {
21254  goto arg_passed_twice;
21255  }
21256  argname++;
21257  }
21258  }
21259  } else
21260  #endif
21261  if (likely(PyUnicode_Check(key))) {
21262  while (*name) {
21263  int cmp = (**name == key) ? 0 :
21264  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21265  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
21266  #endif
21267  PyUnicode_Compare(**name, key);
21268  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21269  if (cmp == 0) {
21270  values[name-argnames] = value;
21271  break;
21272  }
21273  name++;
21274  }
21275  if (*name) continue;
21276  else {
21277  PyObject*** argname = argnames;
21278  while (argname != first_kw_arg) {
21279  int cmp = (**argname == key) ? 0 :
21280  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21281  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
21282  #endif
21283  PyUnicode_Compare(**argname, key);
21284  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21285  if (cmp == 0) goto arg_passed_twice;
21286  argname++;
21287  }
21288  }
21289  } else
21290  goto invalid_keyword_type;
21291  if (kwds2) {
21292  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
21293  } else {
21294  goto invalid_keyword;
21295  }
21296  }
21297  return 0;
21298 arg_passed_twice:
21299  __Pyx_RaiseDoubleKeywordsError(function_name, key);
21300  goto bad;
21301 invalid_keyword_type:
21302  PyErr_Format(PyExc_TypeError,
21303  "%.200s() keywords must be strings", function_name);
21304  goto bad;
21305 invalid_keyword:
21306  PyErr_Format(PyExc_TypeError,
21307  #if PY_MAJOR_VERSION < 3
21308  "%.200s() got an unexpected keyword argument '%.200s'",
21309  function_name, PyString_AsString(key));
21310  #else
21311  "%s() got an unexpected keyword argument '%U'",
21312  function_name, key);
21313  #endif
21314 bad:
21315  return -1;
21316 }
21317 
21318 /* RaiseArgTupleInvalid */
21319 static void __Pyx_RaiseArgtupleInvalid(
21320  const char* func_name,
21321  int exact,
21322  Py_ssize_t num_min,
21323  Py_ssize_t num_max,
21324  Py_ssize_t num_found)
21325 {
21326  Py_ssize_t num_expected;
21327  const char *more_or_less;
21328  if (num_found < num_min) {
21329  num_expected = num_min;
21330  more_or_less = "at least";
21331  } else {
21332  num_expected = num_max;
21333  more_or_less = "at most";
21334  }
21335  if (exact) {
21336  more_or_less = "exactly";
21337  }
21338  PyErr_Format(PyExc_TypeError,
21339  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
21340  func_name, more_or_less, num_expected,
21341  (num_expected == 1) ? "" : "s", num_found);
21342 }
21343 
21344 /* GetModuleGlobalName */
21345 #if CYTHON_USE_DICT_VERSIONS
21346 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
21347 #else
21348 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
21349 #endif
21350 {
21351  PyObject *result;
21352 #if !CYTHON_AVOID_BORROWED_REFS
21353 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
21354  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
21355  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21356  if (likely(result)) {
21357  return __Pyx_NewRef(result);
21358  } else if (unlikely(PyErr_Occurred())) {
21359  return NULL;
21360  }
21361 #else
21362  result = PyDict_GetItem(__pyx_d, name);
21363  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21364  if (likely(result)) {
21365  return __Pyx_NewRef(result);
21366  }
21367 #endif
21368 #else
21369  result = PyObject_GetItem(__pyx_d, name);
21370  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21371  if (likely(result)) {
21372  return __Pyx_NewRef(result);
21373  }
21374  PyErr_Clear();
21375 #endif
21376  return __Pyx_GetBuiltinName(name);
21377 }
21378 
21379 /* GetTopmostException */
21380 #if CYTHON_USE_EXC_INFO_STACK
21381 static _PyErr_StackItem *
21382 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
21383 {
21384  _PyErr_StackItem *exc_info = tstate->exc_info;
21385  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
21386  exc_info->previous_item != NULL)
21387  {
21388  exc_info = exc_info->previous_item;
21389  }
21390  return exc_info;
21391 }
21392 #endif
21393 
21394 /* SaveResetException */
21395 #if CYTHON_FAST_THREAD_STATE
21396 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21397  #if CYTHON_USE_EXC_INFO_STACK
21398  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
21399  *type = exc_info->exc_type;
21400  *value = exc_info->exc_value;
21401  *tb = exc_info->exc_traceback;
21402  #else
21403  *type = tstate->exc_type;
21404  *value = tstate->exc_value;
21405  *tb = tstate->exc_traceback;
21406  #endif
21407  Py_XINCREF(*type);
21408  Py_XINCREF(*value);
21409  Py_XINCREF(*tb);
21410 }
21411 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21412  PyObject *tmp_type, *tmp_value, *tmp_tb;
21413  #if CYTHON_USE_EXC_INFO_STACK
21414  _PyErr_StackItem *exc_info = tstate->exc_info;
21415  tmp_type = exc_info->exc_type;
21416  tmp_value = exc_info->exc_value;
21417  tmp_tb = exc_info->exc_traceback;
21418  exc_info->exc_type = type;
21419  exc_info->exc_value = value;
21420  exc_info->exc_traceback = tb;
21421  #else
21422  tmp_type = tstate->exc_type;
21423  tmp_value = tstate->exc_value;
21424  tmp_tb = tstate->exc_traceback;
21425  tstate->exc_type = type;
21426  tstate->exc_value = value;
21427  tstate->exc_traceback = tb;
21428  #endif
21429  Py_XDECREF(tmp_type);
21430  Py_XDECREF(tmp_value);
21431  Py_XDECREF(tmp_tb);
21432 }
21433 #endif
21434 
21435 /* PyErrExceptionMatches */
21436 #if CYTHON_FAST_THREAD_STATE
21437 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
21438  Py_ssize_t i, n;
21439  n = PyTuple_GET_SIZE(tuple);
21440 #if PY_MAJOR_VERSION >= 3
21441  for (i=0; i<n; i++) {
21442  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
21443  }
21444 #endif
21445  for (i=0; i<n; i++) {
21446  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
21447  }
21448  return 0;
21449 }
21450 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
21451  PyObject *exc_type = tstate->curexc_type;
21452  if (exc_type == err) return 1;
21453  if (unlikely(!exc_type)) return 0;
21454  if (unlikely(PyTuple_Check(err)))
21455  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
21456  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
21457 }
21458 #endif
21459 
21460 /* GetException */
21461 #if CYTHON_FAST_THREAD_STATE
21462 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
21463 #else
21464 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
21465 #endif
21466 {
21467  PyObject *local_type, *local_value, *local_tb;
21468 #if CYTHON_FAST_THREAD_STATE
21469  PyObject *tmp_type, *tmp_value, *tmp_tb;
21470  local_type = tstate->curexc_type;
21471  local_value = tstate->curexc_value;
21472  local_tb = tstate->curexc_traceback;
21473  tstate->curexc_type = 0;
21474  tstate->curexc_value = 0;
21475  tstate->curexc_traceback = 0;
21476 #else
21477  PyErr_Fetch(&local_type, &local_value, &local_tb);
21478 #endif
21479  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
21480 #if CYTHON_FAST_THREAD_STATE
21481  if (unlikely(tstate->curexc_type))
21482 #else
21483  if (unlikely(PyErr_Occurred()))
21484 #endif
21485  goto bad;
21486  #if PY_MAJOR_VERSION >= 3
21487  if (local_tb) {
21488  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
21489  goto bad;
21490  }
21491  #endif
21492  Py_XINCREF(local_tb);
21493  Py_XINCREF(local_type);
21494  Py_XINCREF(local_value);
21495  *type = local_type;
21496  *value = local_value;
21497  *tb = local_tb;
21498 #if CYTHON_FAST_THREAD_STATE
21499  #if CYTHON_USE_EXC_INFO_STACK
21500  {
21501  _PyErr_StackItem *exc_info = tstate->exc_info;
21502  tmp_type = exc_info->exc_type;
21503  tmp_value = exc_info->exc_value;
21504  tmp_tb = exc_info->exc_traceback;
21505  exc_info->exc_type = local_type;
21506  exc_info->exc_value = local_value;
21507  exc_info->exc_traceback = local_tb;
21508  }
21509  #else
21510  tmp_type = tstate->exc_type;
21511  tmp_value = tstate->exc_value;
21512  tmp_tb = tstate->exc_traceback;
21513  tstate->exc_type = local_type;
21514  tstate->exc_value = local_value;
21515  tstate->exc_traceback = local_tb;
21516  #endif
21517  Py_XDECREF(tmp_type);
21518  Py_XDECREF(tmp_value);
21519  Py_XDECREF(tmp_tb);
21520 #else
21521  PyErr_SetExcInfo(local_type, local_value, local_tb);
21522 #endif
21523  return 0;
21524 bad:
21525  *type = 0;
21526  *value = 0;
21527  *tb = 0;
21528  Py_XDECREF(local_type);
21529  Py_XDECREF(local_value);
21530  Py_XDECREF(local_tb);
21531  return -1;
21532 }
21533 
21534 /* RaiseException */
21535 #if PY_MAJOR_VERSION < 3
21536 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21537  CYTHON_UNUSED PyObject *cause) {
21538  __Pyx_PyThreadState_declare
21539  Py_XINCREF(type);
21540  if (!value || value == Py_None)
21541  value = NULL;
21542  else
21543  Py_INCREF(value);
21544  if (!tb || tb == Py_None)
21545  tb = NULL;
21546  else {
21547  Py_INCREF(tb);
21548  if (!PyTraceBack_Check(tb)) {
21549  PyErr_SetString(PyExc_TypeError,
21550  "raise: arg 3 must be a traceback or None");
21551  goto raise_error;
21552  }
21553  }
21554  if (PyType_Check(type)) {
21555 #if CYTHON_COMPILING_IN_PYPY
21556  if (!value) {
21557  Py_INCREF(Py_None);
21558  value = Py_None;
21559  }
21560 #endif
21561  PyErr_NormalizeException(&type, &value, &tb);
21562  } else {
21563  if (value) {
21564  PyErr_SetString(PyExc_TypeError,
21565  "instance exception may not have a separate value");
21566  goto raise_error;
21567  }
21568  value = type;
21569  type = (PyObject*) Py_TYPE(type);
21570  Py_INCREF(type);
21571  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21572  PyErr_SetString(PyExc_TypeError,
21573  "raise: exception class must be a subclass of BaseException");
21574  goto raise_error;
21575  }
21576  }
21577  __Pyx_PyThreadState_assign
21578  __Pyx_ErrRestore(type, value, tb);
21579  return;
21580 raise_error:
21581  Py_XDECREF(value);
21582  Py_XDECREF(type);
21583  Py_XDECREF(tb);
21584  return;
21585 }
21586 #else
21587 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21588  PyObject* owned_instance = NULL;
21589  if (tb == Py_None) {
21590  tb = 0;
21591  } else if (tb && !PyTraceBack_Check(tb)) {
21592  PyErr_SetString(PyExc_TypeError,
21593  "raise: arg 3 must be a traceback or None");
21594  goto bad;
21595  }
21596  if (value == Py_None)
21597  value = 0;
21598  if (PyExceptionInstance_Check(type)) {
21599  if (value) {
21600  PyErr_SetString(PyExc_TypeError,
21601  "instance exception may not have a separate value");
21602  goto bad;
21603  }
21604  value = type;
21605  type = (PyObject*) Py_TYPE(value);
21606  } else if (PyExceptionClass_Check(type)) {
21607  PyObject *instance_class = NULL;
21608  if (value && PyExceptionInstance_Check(value)) {
21609  instance_class = (PyObject*) Py_TYPE(value);
21610  if (instance_class != type) {
21611  int is_subclass = PyObject_IsSubclass(instance_class, type);
21612  if (!is_subclass) {
21613  instance_class = NULL;
21614  } else if (unlikely(is_subclass == -1)) {
21615  goto bad;
21616  } else {
21617  type = instance_class;
21618  }
21619  }
21620  }
21621  if (!instance_class) {
21622  PyObject *args;
21623  if (!value)
21624  args = PyTuple_New(0);
21625  else if (PyTuple_Check(value)) {
21626  Py_INCREF(value);
21627  args = value;
21628  } else
21629  args = PyTuple_Pack(1, value);
21630  if (!args)
21631  goto bad;
21632  owned_instance = PyObject_Call(type, args, NULL);
21633  Py_DECREF(args);
21634  if (!owned_instance)
21635  goto bad;
21636  value = owned_instance;
21637  if (!PyExceptionInstance_Check(value)) {
21638  PyErr_Format(PyExc_TypeError,
21639  "calling %R should have returned an instance of "
21640  "BaseException, not %R",
21641  type, Py_TYPE(value));
21642  goto bad;
21643  }
21644  }
21645  } else {
21646  PyErr_SetString(PyExc_TypeError,
21647  "raise: exception class must be a subclass of BaseException");
21648  goto bad;
21649  }
21650  if (cause) {
21651  PyObject *fixed_cause;
21652  if (cause == Py_None) {
21653  fixed_cause = NULL;
21654  } else if (PyExceptionClass_Check(cause)) {
21655  fixed_cause = PyObject_CallObject(cause, NULL);
21656  if (fixed_cause == NULL)
21657  goto bad;
21658  } else if (PyExceptionInstance_Check(cause)) {
21659  fixed_cause = cause;
21660  Py_INCREF(fixed_cause);
21661  } else {
21662  PyErr_SetString(PyExc_TypeError,
21663  "exception causes must derive from "
21664  "BaseException");
21665  goto bad;
21666  }
21667  PyException_SetCause(value, fixed_cause);
21668  }
21669  PyErr_SetObject(type, value);
21670  if (tb) {
21671 #if CYTHON_COMPILING_IN_PYPY
21672  PyObject *tmp_type, *tmp_value, *tmp_tb;
21673  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21674  Py_INCREF(tb);
21675  PyErr_Restore(tmp_type, tmp_value, tb);
21676  Py_XDECREF(tmp_tb);
21677 #else
21678  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21679  PyObject* tmp_tb = tstate->curexc_traceback;
21680  if (tb != tmp_tb) {
21681  Py_INCREF(tb);
21682  tstate->curexc_traceback = tb;
21683  Py_XDECREF(tmp_tb);
21684  }
21685 #endif
21686  }
21687 bad:
21688  Py_XDECREF(owned_instance);
21689  return;
21690 }
21691 #endif
21692 
21693 /* PyObjectCall2Args */
21694 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
21695  PyObject *args, *result = NULL;
21696  #if CYTHON_FAST_PYCALL
21697  if (PyFunction_Check(function)) {
21698  PyObject *args[2] = {arg1, arg2};
21699  return __Pyx_PyFunction_FastCall(function, args, 2);
21700  }
21701  #endif
21702  #if CYTHON_FAST_PYCCALL
21703  if (__Pyx_PyFastCFunction_Check(function)) {
21704  PyObject *args[2] = {arg1, arg2};
21705  return __Pyx_PyCFunction_FastCall(function, args, 2);
21706  }
21707  #endif
21708  args = PyTuple_New(2);
21709  if (unlikely(!args)) goto done;
21710  Py_INCREF(arg1);
21711  PyTuple_SET_ITEM(args, 0, arg1);
21712  Py_INCREF(arg2);
21713  PyTuple_SET_ITEM(args, 1, arg2);
21714  Py_INCREF(function);
21715  result = __Pyx_PyObject_Call(function, args, NULL);
21716  Py_DECREF(args);
21717  Py_DECREF(function);
21718 done:
21719  return result;
21720 }
21721 
21722 /* PyIntBinop */
21723 #if !CYTHON_COMPILING_IN_PYPY
21724 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
21725  (void)inplace;
21726  (void)zerodivision_check;
21727  #if PY_MAJOR_VERSION < 3
21728  if (likely(PyInt_CheckExact(op1))) {
21729  const long b = intval;
21730  long x;
21731  long a = PyInt_AS_LONG(op1);
21732  x = (long)((unsigned long)a + b);
21733  if (likely((x^a) >= 0 || (x^b) >= 0))
21734  return PyInt_FromLong(x);
21735  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21736  }
21737  #endif
21738  #if CYTHON_USE_PYLONG_INTERNALS
21739  if (likely(PyLong_CheckExact(op1))) {
21740  const long b = intval;
21741  long a, x;
21742 #ifdef HAVE_LONG_LONG
21743  const PY_LONG_LONG llb = intval;
21744  PY_LONG_LONG lla, llx;
21745 #endif
21746  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21747  const Py_ssize_t size = Py_SIZE(op1);
21748  if (likely(__Pyx_sst_abs(size) <= 1)) {
21749  a = likely(size) ? digits[0] : 0;
21750  if (size == -1) a = -a;
21751  } else {
21752  switch (size) {
21753  case -2:
21754  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21755  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21756  break;
21757 #ifdef HAVE_LONG_LONG
21758  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21759  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21760  goto long_long;
21761 #endif
21762  }
21763  CYTHON_FALLTHROUGH;
21764  case 2:
21765  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21766  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21767  break;
21768 #ifdef HAVE_LONG_LONG
21769  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21770  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21771  goto long_long;
21772 #endif
21773  }
21774  CYTHON_FALLTHROUGH;
21775  case -3:
21776  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21777  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21778  break;
21779 #ifdef HAVE_LONG_LONG
21780  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21781  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21782  goto long_long;
21783 #endif
21784  }
21785  CYTHON_FALLTHROUGH;
21786  case 3:
21787  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21788  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21789  break;
21790 #ifdef HAVE_LONG_LONG
21791  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21792  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21793  goto long_long;
21794 #endif
21795  }
21796  CYTHON_FALLTHROUGH;
21797  case -4:
21798  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21799  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21800  break;
21801 #ifdef HAVE_LONG_LONG
21802  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21803  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21804  goto long_long;
21805 #endif
21806  }
21807  CYTHON_FALLTHROUGH;
21808  case 4:
21809  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21810  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21811  break;
21812 #ifdef HAVE_LONG_LONG
21813  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21814  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21815  goto long_long;
21816 #endif
21817  }
21818  CYTHON_FALLTHROUGH;
21819  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21820  }
21821  }
21822  x = a + b;
21823  return PyLong_FromLong(x);
21824 #ifdef HAVE_LONG_LONG
21825  long_long:
21826  llx = lla + llb;
21827  return PyLong_FromLongLong(llx);
21828 #endif
21829 
21830 
21831  }
21832  #endif
21833  if (PyFloat_CheckExact(op1)) {
21834  const long b = intval;
21835  double a = PyFloat_AS_DOUBLE(op1);
21836  double result;
21837  PyFPE_START_PROTECT("add", return NULL)
21838  result = ((double)a) + (double)b;
21839  PyFPE_END_PROTECT(result)
21840  return PyFloat_FromDouble(result);
21841  }
21842  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21843 }
21844 #endif
21845 
21846 /* decode_c_bytes */
21847 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
21848  const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
21849  const char* encoding, const char* errors,
21850  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
21851  if (unlikely((start < 0) | (stop < 0))) {
21852  if (start < 0) {
21853  start += length;
21854  if (start < 0)
21855  start = 0;
21856  }
21857  if (stop < 0)
21858  stop += length;
21859  }
21860  if (stop > length)
21861  stop = length;
21862  length = stop - start;
21863  if (unlikely(length <= 0))
21864  return PyUnicode_FromUnicode(NULL, 0);
21865  cstring += start;
21866  if (decode_func) {
21867  return decode_func(cstring, length, errors);
21868  } else {
21869  return PyUnicode_Decode(cstring, length, encoding, errors);
21870  }
21871 }
21872 
21873 /* SwapException */
21874 #if CYTHON_FAST_THREAD_STATE
21875 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21876  PyObject *tmp_type, *tmp_value, *tmp_tb;
21877  #if CYTHON_USE_EXC_INFO_STACK
21878  _PyErr_StackItem *exc_info = tstate->exc_info;
21879  tmp_type = exc_info->exc_type;
21880  tmp_value = exc_info->exc_value;
21881  tmp_tb = exc_info->exc_traceback;
21882  exc_info->exc_type = *type;
21883  exc_info->exc_value = *value;
21884  exc_info->exc_traceback = *tb;
21885  #else
21886  tmp_type = tstate->exc_type;
21887  tmp_value = tstate->exc_value;
21888  tmp_tb = tstate->exc_traceback;
21889  tstate->exc_type = *type;
21890  tstate->exc_value = *value;
21891  tstate->exc_traceback = *tb;
21892  #endif
21893  *type = tmp_type;
21894  *value = tmp_value;
21895  *tb = tmp_tb;
21896 }
21897 #else
21898 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
21899  PyObject *tmp_type, *tmp_value, *tmp_tb;
21900  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
21901  PyErr_SetExcInfo(*type, *value, *tb);
21902  *type = tmp_type;
21903  *value = tmp_value;
21904  *tb = tmp_tb;
21905 }
21906 #endif
21907 
21908 /* SetItemInt */
21909 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21910  int r;
21911  if (!j) return -1;
21912  r = PyObject_SetItem(o, j, v);
21913  Py_DECREF(j);
21914  return r;
21915 }
21916 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21917  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21918 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21919  if (is_list || PyList_CheckExact(o)) {
21920  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21921  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
21922  PyObject* old = PyList_GET_ITEM(o, n);
21923  Py_INCREF(v);
21924  PyList_SET_ITEM(o, n, v);
21925  Py_DECREF(old);
21926  return 1;
21927  }
21928  } else {
21929  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21930  if (likely(m && m->sq_ass_item)) {
21931  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21932  Py_ssize_t l = m->sq_length(o);
21933  if (likely(l >= 0)) {
21934  i += l;
21935  } else {
21936  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21937  return -1;
21938  PyErr_Clear();
21939  }
21940  }
21941  return m->sq_ass_item(o, i, v);
21942  }
21943  }
21944 #else
21945 #if CYTHON_COMPILING_IN_PYPY
21946  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
21947 #else
21948  if (is_list || PySequence_Check(o))
21949 #endif
21950  {
21951  return PySequence_SetItem(o, i, v);
21952  }
21953 #endif
21954  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21955 }
21956 
21957 /* ArgTypeTest */
21958 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21959 {
21960  if (unlikely(!type)) {
21961  PyErr_SetString(PyExc_SystemError, "Missing type object");
21962  return 0;
21963  }
21964  else if (exact) {
21965  #if PY_MAJOR_VERSION == 2
21966  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21967  #endif
21968  }
21969  else {
21970  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21971  }
21972  PyErr_Format(PyExc_TypeError,
21973  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21974  name, type->tp_name, Py_TYPE(obj)->tp_name);
21975  return 0;
21976 }
21977 
21978 /* Import */
21979 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21980  PyObject *empty_list = 0;
21981  PyObject *module = 0;
21982  PyObject *global_dict = 0;
21983  PyObject *empty_dict = 0;
21984  PyObject *list;
21985  #if PY_MAJOR_VERSION < 3
21986  PyObject *py_import;
21987  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21988  if (!py_import)
21989  goto bad;
21990  #endif
21991  if (from_list)
21992  list = from_list;
21993  else {
21994  empty_list = PyList_New(0);
21995  if (!empty_list)
21996  goto bad;
21997  list = empty_list;
21998  }
21999  global_dict = PyModule_GetDict(__pyx_m);
22000  if (!global_dict)
22001  goto bad;
22002  empty_dict = PyDict_New();
22003  if (!empty_dict)
22004  goto bad;
22005  {
22006  #if PY_MAJOR_VERSION >= 3
22007  if (level == -1) {
22008  if (strchr(__Pyx_MODULE_NAME, '.')) {
22009  module = PyImport_ImportModuleLevelObject(
22010  name, global_dict, empty_dict, list, 1);
22011  if (!module) {
22012  if (!PyErr_ExceptionMatches(PyExc_ImportError))
22013  goto bad;
22014  PyErr_Clear();
22015  }
22016  }
22017  level = 0;
22018  }
22019  #endif
22020  if (!module) {
22021  #if PY_MAJOR_VERSION < 3
22022  PyObject *py_level = PyInt_FromLong(level);
22023  if (!py_level)
22024  goto bad;
22025  module = PyObject_CallFunctionObjArgs(py_import,
22026  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
22027  Py_DECREF(py_level);
22028  #else
22029  module = PyImport_ImportModuleLevelObject(
22030  name, global_dict, empty_dict, list, level);
22031  #endif
22032  }
22033  }
22034 bad:
22035  #if PY_MAJOR_VERSION < 3
22036  Py_XDECREF(py_import);
22037  #endif
22038  Py_XDECREF(empty_list);
22039  Py_XDECREF(empty_dict);
22040  return module;
22041 }
22042 
22043 /* PyObject_GenericGetAttrNoDict */
22044 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
22045 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
22046  PyErr_Format(PyExc_AttributeError,
22047 #if PY_MAJOR_VERSION >= 3
22048  "'%.50s' object has no attribute '%U'",
22049  tp->tp_name, attr_name);
22050 #else
22051  "'%.50s' object has no attribute '%.400s'",
22052  tp->tp_name, PyString_AS_STRING(attr_name));
22053 #endif
22054  return NULL;
22055 }
22056 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
22057  PyObject *descr;
22058  PyTypeObject *tp = Py_TYPE(obj);
22059  if (unlikely(!PyString_Check(attr_name))) {
22060  return PyObject_GenericGetAttr(obj, attr_name);
22061  }
22062  assert(!tp->tp_dictoffset);
22063  descr = _PyType_Lookup(tp, attr_name);
22064  if (unlikely(!descr)) {
22065  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
22066  }
22067  Py_INCREF(descr);
22068  #if PY_MAJOR_VERSION < 3
22069  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
22070  #endif
22071  {
22072  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
22073  if (unlikely(f)) {
22074  PyObject *res = f(descr, obj, (PyObject *)tp);
22075  Py_DECREF(descr);
22076  return res;
22077  }
22078  }
22079  return descr;
22080 }
22081 #endif
22082 
22083 /* PyObject_GenericGetAttr */
22084 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
22085 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
22086  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
22087  return PyObject_GenericGetAttr(obj, attr_name);
22088  }
22089  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
22090 }
22091 #endif
22092 
22093 /* SetVTable */
22094 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
22095 #if PY_VERSION_HEX >= 0x02070000
22096  PyObject *ob = PyCapsule_New(vtable, 0, 0);
22097 #else
22098  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
22099 #endif
22100  if (!ob)
22101  goto bad;
22102  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
22103  goto bad;
22104  Py_DECREF(ob);
22105  return 0;
22106 bad:
22107  Py_XDECREF(ob);
22108  return -1;
22109 }
22110 
22111 /* SetupReduce */
22112 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
22113  int ret;
22114  PyObject *name_attr;
22115  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
22116  if (likely(name_attr)) {
22117  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
22118  } else {
22119  ret = -1;
22120  }
22121  if (unlikely(ret < 0)) {
22122  PyErr_Clear();
22123  ret = 0;
22124  }
22125  Py_XDECREF(name_attr);
22126  return ret;
22127 }
22128 static int __Pyx_setup_reduce(PyObject* type_obj) {
22129  int ret = 0;
22130  PyObject *object_reduce = NULL;
22131  PyObject *object_reduce_ex = NULL;
22132  PyObject *reduce = NULL;
22133  PyObject *reduce_ex = NULL;
22134  PyObject *reduce_cython = NULL;
22135  PyObject *setstate = NULL;
22136  PyObject *setstate_cython = NULL;
22137 #if CYTHON_USE_PYTYPE_LOOKUP
22138  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
22139 #else
22140  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
22141 #endif
22142 #if CYTHON_USE_PYTYPE_LOOKUP
22143  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
22144 #else
22145  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
22146 #endif
22147  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
22148  if (reduce_ex == object_reduce_ex) {
22149 #if CYTHON_USE_PYTYPE_LOOKUP
22150  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
22151 #else
22152  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
22153 #endif
22154  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
22155  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
22156  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
22157  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
22158  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
22159  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
22160  if (!setstate) PyErr_Clear();
22161  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
22162  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
22163  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
22164  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
22165  }
22166  PyType_Modified((PyTypeObject*)type_obj);
22167  }
22168  }
22169  goto GOOD;
22170 BAD:
22171  if (!PyErr_Occurred())
22172  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
22173  ret = -1;
22174 GOOD:
22175 #if !CYTHON_USE_PYTYPE_LOOKUP
22176  Py_XDECREF(object_reduce);
22177  Py_XDECREF(object_reduce_ex);
22178 #endif
22179  Py_XDECREF(reduce);
22180  Py_XDECREF(reduce_ex);
22181  Py_XDECREF(reduce_cython);
22182  Py_XDECREF(setstate);
22183  Py_XDECREF(setstate_cython);
22184  return ret;
22185 }
22186 
22187 /* BytesEquals */
22188 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
22189 #if CYTHON_COMPILING_IN_PYPY
22190  return PyObject_RichCompareBool(s1, s2, equals);
22191 #else
22192  if (s1 == s2) {
22193  return (equals == Py_EQ);
22194  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
22195  const char *ps1, *ps2;
22196  Py_ssize_t length = PyBytes_GET_SIZE(s1);
22197  if (length != PyBytes_GET_SIZE(s2))
22198  return (equals == Py_NE);
22199  ps1 = PyBytes_AS_STRING(s1);
22200  ps2 = PyBytes_AS_STRING(s2);
22201  if (ps1[0] != ps2[0]) {
22202  return (equals == Py_NE);
22203  } else if (length == 1) {
22204  return (equals == Py_EQ);
22205  } else {
22206  int result;
22207 #if CYTHON_USE_UNICODE_INTERNALS
22208  Py_hash_t hash1, hash2;
22209  hash1 = ((PyBytesObject*)s1)->ob_shash;
22210  hash2 = ((PyBytesObject*)s2)->ob_shash;
22211  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22212  return (equals == Py_NE);
22213  }
22214 #endif
22215  result = memcmp(ps1, ps2, (size_t)length);
22216  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22217  }
22218  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
22219  return (equals == Py_NE);
22220  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
22221  return (equals == Py_NE);
22222  } else {
22223  int result;
22224  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22225  if (!py_result)
22226  return -1;
22227  result = __Pyx_PyObject_IsTrue(py_result);
22228  Py_DECREF(py_result);
22229  return result;
22230  }
22231 #endif
22232 }
22233 
22234 /* UnicodeEquals */
22235 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
22236 #if CYTHON_COMPILING_IN_PYPY
22237  return PyObject_RichCompareBool(s1, s2, equals);
22238 #else
22239 #if PY_MAJOR_VERSION < 3
22240  PyObject* owned_ref = NULL;
22241 #endif
22242  int s1_is_unicode, s2_is_unicode;
22243  if (s1 == s2) {
22244  goto return_eq;
22245  }
22246  s1_is_unicode = PyUnicode_CheckExact(s1);
22247  s2_is_unicode = PyUnicode_CheckExact(s2);
22248 #if PY_MAJOR_VERSION < 3
22249  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
22250  owned_ref = PyUnicode_FromObject(s2);
22251  if (unlikely(!owned_ref))
22252  return -1;
22253  s2 = owned_ref;
22254  s2_is_unicode = 1;
22255  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
22256  owned_ref = PyUnicode_FromObject(s1);
22257  if (unlikely(!owned_ref))
22258  return -1;
22259  s1 = owned_ref;
22260  s1_is_unicode = 1;
22261  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
22262  return __Pyx_PyBytes_Equals(s1, s2, equals);
22263  }
22264 #endif
22265  if (s1_is_unicode & s2_is_unicode) {
22266  Py_ssize_t length;
22267  int kind;
22268  void *data1, *data2;
22269  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
22270  return -1;
22271  length = __Pyx_PyUnicode_GET_LENGTH(s1);
22272  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
22273  goto return_ne;
22274  }
22275 #if CYTHON_USE_UNICODE_INTERNALS
22276  {
22277  Py_hash_t hash1, hash2;
22278  #if CYTHON_PEP393_ENABLED
22279  hash1 = ((PyASCIIObject*)s1)->hash;
22280  hash2 = ((PyASCIIObject*)s2)->hash;
22281  #else
22282  hash1 = ((PyUnicodeObject*)s1)->hash;
22283  hash2 = ((PyUnicodeObject*)s2)->hash;
22284  #endif
22285  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22286  goto return_ne;
22287  }
22288  }
22289 #endif
22290  kind = __Pyx_PyUnicode_KIND(s1);
22291  if (kind != __Pyx_PyUnicode_KIND(s2)) {
22292  goto return_ne;
22293  }
22294  data1 = __Pyx_PyUnicode_DATA(s1);
22295  data2 = __Pyx_PyUnicode_DATA(s2);
22296  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
22297  goto return_ne;
22298  } else if (length == 1) {
22299  goto return_eq;
22300  } else {
22301  int result = memcmp(data1, data2, (size_t)(length * kind));
22302  #if PY_MAJOR_VERSION < 3
22303  Py_XDECREF(owned_ref);
22304  #endif
22305  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22306  }
22307  } else if ((s1 == Py_None) & s2_is_unicode) {
22308  goto return_ne;
22309  } else if ((s2 == Py_None) & s1_is_unicode) {
22310  goto return_ne;
22311  } else {
22312  int result;
22313  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22314  #if PY_MAJOR_VERSION < 3
22315  Py_XDECREF(owned_ref);
22316  #endif
22317  if (!py_result)
22318  return -1;
22319  result = __Pyx_PyObject_IsTrue(py_result);
22320  Py_DECREF(py_result);
22321  return result;
22322  }
22323 return_eq:
22324  #if PY_MAJOR_VERSION < 3
22325  Py_XDECREF(owned_ref);
22326  #endif
22327  return (equals == Py_EQ);
22328 return_ne:
22329  #if PY_MAJOR_VERSION < 3
22330  Py_XDECREF(owned_ref);
22331  #endif
22332  return (equals == Py_NE);
22333 #endif
22334 }
22335 
22336 /* CLineInTraceback */
22337 #ifndef CYTHON_CLINE_IN_TRACEBACK
22338 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
22339  PyObject *use_cline;
22340  PyObject *ptype, *pvalue, *ptraceback;
22341 #if CYTHON_COMPILING_IN_CPYTHON
22342  PyObject **cython_runtime_dict;
22343 #endif
22344  if (unlikely(!__pyx_cython_runtime)) {
22345  return c_line;
22346  }
22347  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
22348 #if CYTHON_COMPILING_IN_CPYTHON
22349  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
22350  if (likely(cython_runtime_dict)) {
22351  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
22352  use_cline, *cython_runtime_dict,
22353  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
22354  } else
22355 #endif
22356  {
22357  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
22358  if (use_cline_obj) {
22359  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
22360  Py_DECREF(use_cline_obj);
22361  } else {
22362  PyErr_Clear();
22363  use_cline = NULL;
22364  }
22365  }
22366  if (!use_cline) {
22367  c_line = 0;
22368  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
22369  }
22370  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
22371  c_line = 0;
22372  }
22373  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
22374  return c_line;
22375 }
22376 #endif
22377 
22378 /* CodeObjectCache */
22379 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
22380  int start = 0, mid = 0, end = count - 1;
22381  if (end >= 0 && code_line > entries[end].code_line) {
22382  return count;
22383  }
22384  while (start < end) {
22385  mid = start + (end - start) / 2;
22386  if (code_line < entries[mid].code_line) {
22387  end = mid;
22388  } else if (code_line > entries[mid].code_line) {
22389  start = mid + 1;
22390  } else {
22391  return mid;
22392  }
22393  }
22394  if (code_line <= entries[mid].code_line) {
22395  return mid;
22396  } else {
22397  return mid + 1;
22398  }
22399 }
22400 static PyCodeObject *__pyx_find_code_object(int code_line) {
22401  PyCodeObject* code_object;
22402  int pos;
22403  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
22404  return NULL;
22405  }
22406  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22407  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
22408  return NULL;
22409  }
22410  code_object = __pyx_code_cache.entries[pos].code_object;
22411  Py_INCREF(code_object);
22412  return code_object;
22413 }
22414 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
22415  int pos, i;
22416  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
22417  if (unlikely(!code_line)) {
22418  return;
22419  }
22420  if (unlikely(!entries)) {
22421  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
22422  if (likely(entries)) {
22423  __pyx_code_cache.entries = entries;
22424  __pyx_code_cache.max_count = 64;
22425  __pyx_code_cache.count = 1;
22426  entries[0].code_line = code_line;
22427  entries[0].code_object = code_object;
22428  Py_INCREF(code_object);
22429  }
22430  return;
22431  }
22432  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22433  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
22434  PyCodeObject* tmp = entries[pos].code_object;
22435  entries[pos].code_object = code_object;
22436  Py_DECREF(tmp);
22437  return;
22438  }
22439  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
22440  int new_max = __pyx_code_cache.max_count + 64;
22441  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
22442  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
22443  if (unlikely(!entries)) {
22444  return;
22445  }
22446  __pyx_code_cache.entries = entries;
22447  __pyx_code_cache.max_count = new_max;
22448  }
22449  for (i=__pyx_code_cache.count; i>pos; i--) {
22450  entries[i] = entries[i-1];
22451  }
22452  entries[pos].code_line = code_line;
22453  entries[pos].code_object = code_object;
22454  __pyx_code_cache.count++;
22455  Py_INCREF(code_object);
22456 }
22457 
22458 /* AddTraceback */
22459 #include "compile.h"
22460 #include "frameobject.h"
22461 #include "traceback.h"
22462 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
22463  const char *funcname, int c_line,
22464  int py_line, const char *filename) {
22465  PyCodeObject *py_code = 0;
22466  PyObject *py_srcfile = 0;
22467  PyObject *py_funcname = 0;
22468  #if PY_MAJOR_VERSION < 3
22469  py_srcfile = PyString_FromString(filename);
22470  #else
22471  py_srcfile = PyUnicode_FromString(filename);
22472  #endif
22473  if (!py_srcfile) goto bad;
22474  if (c_line) {
22475  #if PY_MAJOR_VERSION < 3
22476  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22477  #else
22478  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22479  #endif
22480  }
22481  else {
22482  #if PY_MAJOR_VERSION < 3
22483  py_funcname = PyString_FromString(funcname);
22484  #else
22485  py_funcname = PyUnicode_FromString(funcname);
22486  #endif
22487  }
22488  if (!py_funcname) goto bad;
22489  py_code = __Pyx_PyCode_New(
22490  0,
22491  0,
22492  0,
22493  0,
22494  0,
22495  __pyx_empty_bytes, /*PyObject *code,*/
22496  __pyx_empty_tuple, /*PyObject *consts,*/
22497  __pyx_empty_tuple, /*PyObject *names,*/
22498  __pyx_empty_tuple, /*PyObject *varnames,*/
22499  __pyx_empty_tuple, /*PyObject *freevars,*/
22500  __pyx_empty_tuple, /*PyObject *cellvars,*/
22501  py_srcfile, /*PyObject *filename,*/
22502  py_funcname, /*PyObject *name,*/
22503  py_line,
22504  __pyx_empty_bytes /*PyObject *lnotab*/
22505  );
22506  Py_DECREF(py_srcfile);
22507  Py_DECREF(py_funcname);
22508  return py_code;
22509 bad:
22510  Py_XDECREF(py_srcfile);
22511  Py_XDECREF(py_funcname);
22512  return NULL;
22513 }
22514 static void __Pyx_AddTraceback(const char *funcname, int c_line,
22515  int py_line, const char *filename) {
22516  PyCodeObject *py_code = 0;
22517  PyFrameObject *py_frame = 0;
22518  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22519  if (c_line) {
22520  c_line = __Pyx_CLineForTraceback(tstate, c_line);
22521  }
22522  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
22523  if (!py_code) {
22524  py_code = __Pyx_CreateCodeObjectForTraceback(
22525  funcname, c_line, py_line, filename);
22526  if (!py_code) goto bad;
22527  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22528  }
22529  py_frame = PyFrame_New(
22530  tstate, /*PyThreadState *tstate,*/
22531  py_code, /*PyCodeObject *code,*/
22532  __pyx_d, /*PyObject *globals,*/
22533  0 /*PyObject *locals*/
22534  );
22535  if (!py_frame) goto bad;
22536  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22537  PyTraceBack_Here(py_frame);
22538 bad:
22539  Py_XDECREF(py_code);
22540  Py_XDECREF(py_frame);
22541 }
22542 
22543 /* CIntFromPyVerify */
22544 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22545  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22546 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22547  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22548 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22549  {\
22550  func_type value = func_value;\
22551  if (sizeof(target_type) < sizeof(func_type)) {\
22552  if (unlikely(value != (func_type) (target_type) value)) {\
22553  func_type zero = 0;\
22554  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22555  return (target_type) -1;\
22556  if (is_unsigned && unlikely(value < zero))\
22557  goto raise_neg_overflow;\
22558  else\
22559  goto raise_overflow;\
22560  }\
22561  }\
22562  return (target_type) value;\
22563  }
22564 
22565 /* CIntToPy */
22566 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22567  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22568  const int is_unsigned = neg_one > const_zero;
22569  if (is_unsigned) {
22570  if (sizeof(int) < sizeof(long)) {
22571  return PyInt_FromLong((long) value);
22572  } else if (sizeof(int) <= sizeof(unsigned long)) {
22573  return PyLong_FromUnsignedLong((unsigned long) value);
22574 #ifdef HAVE_LONG_LONG
22575  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22576  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22577 #endif
22578  }
22579  } else {
22580  if (sizeof(int) <= sizeof(long)) {
22581  return PyInt_FromLong((long) value);
22582 #ifdef HAVE_LONG_LONG
22583  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22584  return PyLong_FromLongLong((PY_LONG_LONG) value);
22585 #endif
22586  }
22587  }
22588  {
22589  int one = 1; int little = (int)*(unsigned char *)&one;
22590  unsigned char *bytes = (unsigned char *)&value;
22591  return _PyLong_FromByteArray(bytes, sizeof(int),
22592  little, !is_unsigned);
22593  }
22594 }
22595 
22596 /* CIntFromPy */
22597 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22598  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22599  const int is_unsigned = neg_one > const_zero;
22600 #if PY_MAJOR_VERSION < 3
22601  if (likely(PyInt_Check(x))) {
22602  if (sizeof(int) < sizeof(long)) {
22603  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22604  } else {
22605  long val = PyInt_AS_LONG(x);
22606  if (is_unsigned && unlikely(val < 0)) {
22607  goto raise_neg_overflow;
22608  }
22609  return (int) val;
22610  }
22611  } else
22612 #endif
22613  if (likely(PyLong_Check(x))) {
22614  if (is_unsigned) {
22615 #if CYTHON_USE_PYLONG_INTERNALS
22616  const digit* digits = ((PyLongObject*)x)->ob_digit;
22617  switch (Py_SIZE(x)) {
22618  case 0: return (int) 0;
22619  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22620  case 2:
22621  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22622  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22623  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22624  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22625  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22626  }
22627  }
22628  break;
22629  case 3:
22630  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22631  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22632  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22633  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22634  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22635  }
22636  }
22637  break;
22638  case 4:
22639  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22640  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22641  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22642  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22643  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22644  }
22645  }
22646  break;
22647  }
22648 #endif
22649 #if CYTHON_COMPILING_IN_CPYTHON
22650  if (unlikely(Py_SIZE(x) < 0)) {
22651  goto raise_neg_overflow;
22652  }
22653 #else
22654  {
22655  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22656  if (unlikely(result < 0))
22657  return (int) -1;
22658  if (unlikely(result == 1))
22659  goto raise_neg_overflow;
22660  }
22661 #endif
22662  if (sizeof(int) <= sizeof(unsigned long)) {
22663  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22664 #ifdef HAVE_LONG_LONG
22665  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22666  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22667 #endif
22668  }
22669  } else {
22670 #if CYTHON_USE_PYLONG_INTERNALS
22671  const digit* digits = ((PyLongObject*)x)->ob_digit;
22672  switch (Py_SIZE(x)) {
22673  case 0: return (int) 0;
22674  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22675  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22676  case -2:
22677  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22678  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22679  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22680  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22681  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22682  }
22683  }
22684  break;
22685  case 2:
22686  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22687  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22688  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22689  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22690  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22691  }
22692  }
22693  break;
22694  case -3:
22695  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22696  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22697  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22698  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22699  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22700  }
22701  }
22702  break;
22703  case 3:
22704  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22705  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22706  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22707  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22708  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22709  }
22710  }
22711  break;
22712  case -4:
22713  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22714  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22715  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22716  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22717  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22718  }
22719  }
22720  break;
22721  case 4:
22722  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22723  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22724  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22725  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22726  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22727  }
22728  }
22729  break;
22730  }
22731 #endif
22732  if (sizeof(int) <= sizeof(long)) {
22733  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22734 #ifdef HAVE_LONG_LONG
22735  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22736  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22737 #endif
22738  }
22739  }
22740  {
22741 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22742  PyErr_SetString(PyExc_RuntimeError,
22743  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22744 #else
22745  int val;
22746  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22747  #if PY_MAJOR_VERSION < 3
22748  if (likely(v) && !PyLong_Check(v)) {
22749  PyObject *tmp = v;
22750  v = PyNumber_Long(tmp);
22751  Py_DECREF(tmp);
22752  }
22753  #endif
22754  if (likely(v)) {
22755  int one = 1; int is_little = (int)*(unsigned char *)&one;
22756  unsigned char *bytes = (unsigned char *)&val;
22757  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22758  bytes, sizeof(val),
22759  is_little, !is_unsigned);
22760  Py_DECREF(v);
22761  if (likely(!ret))
22762  return val;
22763  }
22764 #endif
22765  return (int) -1;
22766  }
22767  } else {
22768  int val;
22769  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22770  if (!tmp) return (int) -1;
22771  val = __Pyx_PyInt_As_int(tmp);
22772  Py_DECREF(tmp);
22773  return val;
22774  }
22775 raise_overflow:
22776  PyErr_SetString(PyExc_OverflowError,
22777  "value too large to convert to int");
22778  return (int) -1;
22779 raise_neg_overflow:
22780  PyErr_SetString(PyExc_OverflowError,
22781  "can't convert negative value to int");
22782  return (int) -1;
22783 }
22784 
22785 /* CIntToPy */
22786 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22787  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22788  const int is_unsigned = neg_one > const_zero;
22789  if (is_unsigned) {
22790  if (sizeof(long) < sizeof(long)) {
22791  return PyInt_FromLong((long) value);
22792  } else if (sizeof(long) <= sizeof(unsigned long)) {
22793  return PyLong_FromUnsignedLong((unsigned long) value);
22794 #ifdef HAVE_LONG_LONG
22795  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22796  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22797 #endif
22798  }
22799  } else {
22800  if (sizeof(long) <= sizeof(long)) {
22801  return PyInt_FromLong((long) value);
22802 #ifdef HAVE_LONG_LONG
22803  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22804  return PyLong_FromLongLong((PY_LONG_LONG) value);
22805 #endif
22806  }
22807  }
22808  {
22809  int one = 1; int little = (int)*(unsigned char *)&one;
22810  unsigned char *bytes = (unsigned char *)&value;
22811  return _PyLong_FromByteArray(bytes, sizeof(long),
22812  little, !is_unsigned);
22813  }
22814 }
22815 
22816 /* CIntFromPy */
22817 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22818  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22819  const int is_unsigned = neg_one > const_zero;
22820 #if PY_MAJOR_VERSION < 3
22821  if (likely(PyInt_Check(x))) {
22822  if (sizeof(long) < sizeof(long)) {
22823  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22824  } else {
22825  long val = PyInt_AS_LONG(x);
22826  if (is_unsigned && unlikely(val < 0)) {
22827  goto raise_neg_overflow;
22828  }
22829  return (long) val;
22830  }
22831  } else
22832 #endif
22833  if (likely(PyLong_Check(x))) {
22834  if (is_unsigned) {
22835 #if CYTHON_USE_PYLONG_INTERNALS
22836  const digit* digits = ((PyLongObject*)x)->ob_digit;
22837  switch (Py_SIZE(x)) {
22838  case 0: return (long) 0;
22839  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22840  case 2:
22841  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22842  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22843  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22844  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22845  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22846  }
22847  }
22848  break;
22849  case 3:
22850  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22851  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22852  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22853  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22854  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22855  }
22856  }
22857  break;
22858  case 4:
22859  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22860  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22861  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22862  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22863  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22864  }
22865  }
22866  break;
22867  }
22868 #endif
22869 #if CYTHON_COMPILING_IN_CPYTHON
22870  if (unlikely(Py_SIZE(x) < 0)) {
22871  goto raise_neg_overflow;
22872  }
22873 #else
22874  {
22875  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22876  if (unlikely(result < 0))
22877  return (long) -1;
22878  if (unlikely(result == 1))
22879  goto raise_neg_overflow;
22880  }
22881 #endif
22882  if (sizeof(long) <= sizeof(unsigned long)) {
22883  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22884 #ifdef HAVE_LONG_LONG
22885  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22886  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22887 #endif
22888  }
22889  } else {
22890 #if CYTHON_USE_PYLONG_INTERNALS
22891  const digit* digits = ((PyLongObject*)x)->ob_digit;
22892  switch (Py_SIZE(x)) {
22893  case 0: return (long) 0;
22894  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22895  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22896  case -2:
22897  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22898  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22899  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22900  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22901  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22902  }
22903  }
22904  break;
22905  case 2:
22906  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22907  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22908  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22909  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22910  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22911  }
22912  }
22913  break;
22914  case -3:
22915  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22916  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22917  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22918  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22919  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22920  }
22921  }
22922  break;
22923  case 3:
22924  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22925  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22926  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22927  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22928  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22929  }
22930  }
22931  break;
22932  case -4:
22933  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22934  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22935  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22936  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22937  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22938  }
22939  }
22940  break;
22941  case 4:
22942  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22943  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22944  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22945  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22946  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22947  }
22948  }
22949  break;
22950  }
22951 #endif
22952  if (sizeof(long) <= sizeof(long)) {
22953  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22954 #ifdef HAVE_LONG_LONG
22955  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22956  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22957 #endif
22958  }
22959  }
22960  {
22961 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22962  PyErr_SetString(PyExc_RuntimeError,
22963  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22964 #else
22965  long val;
22966  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22967  #if PY_MAJOR_VERSION < 3
22968  if (likely(v) && !PyLong_Check(v)) {
22969  PyObject *tmp = v;
22970  v = PyNumber_Long(tmp);
22971  Py_DECREF(tmp);
22972  }
22973  #endif
22974  if (likely(v)) {
22975  int one = 1; int is_little = (int)*(unsigned char *)&one;
22976  unsigned char *bytes = (unsigned char *)&val;
22977  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22978  bytes, sizeof(val),
22979  is_little, !is_unsigned);
22980  Py_DECREF(v);
22981  if (likely(!ret))
22982  return val;
22983  }
22984 #endif
22985  return (long) -1;
22986  }
22987  } else {
22988  long val;
22989  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22990  if (!tmp) return (long) -1;
22991  val = __Pyx_PyInt_As_long(tmp);
22992  Py_DECREF(tmp);
22993  return val;
22994  }
22995 raise_overflow:
22996  PyErr_SetString(PyExc_OverflowError,
22997  "value too large to convert to long");
22998  return (long) -1;
22999 raise_neg_overflow:
23000  PyErr_SetString(PyExc_OverflowError,
23001  "can't convert negative value to long");
23002  return (long) -1;
23003 }
23004 
23005 /* FastTypeChecks */
23006 #if CYTHON_COMPILING_IN_CPYTHON
23007 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
23008  while (a) {
23009  a = a->tp_base;
23010  if (a == b)
23011  return 1;
23012  }
23013  return b == &PyBaseObject_Type;
23014 }
23015 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
23016  PyObject *mro;
23017  if (a == b) return 1;
23018  mro = a->tp_mro;
23019  if (likely(mro)) {
23020  Py_ssize_t i, n;
23021  n = PyTuple_GET_SIZE(mro);
23022  for (i = 0; i < n; i++) {
23023  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
23024  return 1;
23025  }
23026  return 0;
23027  }
23028  return __Pyx_InBases(a, b);
23029 }
23030 #if PY_MAJOR_VERSION == 2
23031 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
23032  PyObject *exception, *value, *tb;
23033  int res;
23034  __Pyx_PyThreadState_declare
23035  __Pyx_PyThreadState_assign
23036  __Pyx_ErrFetch(&exception, &value, &tb);
23037  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
23038  if (unlikely(res == -1)) {
23039  PyErr_WriteUnraisable(err);
23040  res = 0;
23041  }
23042  if (!res) {
23043  res = PyObject_IsSubclass(err, exc_type2);
23044  if (unlikely(res == -1)) {
23045  PyErr_WriteUnraisable(err);
23046  res = 0;
23047  }
23048  }
23049  __Pyx_ErrRestore(exception, value, tb);
23050  return res;
23051 }
23052 #else
23053 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
23054  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
23055  if (!res) {
23056  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
23057  }
23058  return res;
23059 }
23060 #endif
23061 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
23062  Py_ssize_t i, n;
23063  assert(PyExceptionClass_Check(exc_type));
23064  n = PyTuple_GET_SIZE(tuple);
23065 #if PY_MAJOR_VERSION >= 3
23066  for (i=0; i<n; i++) {
23067  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
23068  }
23069 #endif
23070  for (i=0; i<n; i++) {
23071  PyObject *t = PyTuple_GET_ITEM(tuple, i);
23072  #if PY_MAJOR_VERSION < 3
23073  if (likely(exc_type == t)) return 1;
23074  #endif
23075  if (likely(PyExceptionClass_Check(t))) {
23076  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
23077  } else {
23078  }
23079  }
23080  return 0;
23081 }
23082 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
23083  if (likely(err == exc_type)) return 1;
23084  if (likely(PyExceptionClass_Check(err))) {
23085  if (likely(PyExceptionClass_Check(exc_type))) {
23086  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
23087  } else if (likely(PyTuple_Check(exc_type))) {
23088  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
23089  } else {
23090  }
23091  }
23092  return PyErr_GivenExceptionMatches(err, exc_type);
23093 }
23094 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
23095  assert(PyExceptionClass_Check(exc_type1));
23096  assert(PyExceptionClass_Check(exc_type2));
23097  if (likely(err == exc_type1 || err == exc_type2)) return 1;
23098  if (likely(PyExceptionClass_Check(err))) {
23099  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
23100  }
23101  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
23102 }
23103 #endif
23104 
23105 /* FetchCommonType */
23106 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
23107  PyObject* fake_module;
23108  PyTypeObject* cached_type = NULL;
23109  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
23110  if (!fake_module) return NULL;
23111  Py_INCREF(fake_module);
23112  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
23113  if (cached_type) {
23114  if (!PyType_Check((PyObject*)cached_type)) {
23115  PyErr_Format(PyExc_TypeError,
23116  "Shared Cython type %.200s is not a type object",
23117  type->tp_name);
23118  goto bad;
23119  }
23120  if (cached_type->tp_basicsize != type->tp_basicsize) {
23121  PyErr_Format(PyExc_TypeError,
23122  "Shared Cython type %.200s has the wrong size, try recompiling",
23123  type->tp_name);
23124  goto bad;
23125  }
23126  } else {
23127  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
23128  PyErr_Clear();
23129  if (PyType_Ready(type) < 0) goto bad;
23130  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
23131  goto bad;
23132  Py_INCREF(type);
23133  cached_type = type;
23134  }
23135 done:
23136  Py_DECREF(fake_module);
23137  return cached_type;
23138 bad:
23139  Py_XDECREF(cached_type);
23140  cached_type = NULL;
23141  goto done;
23142 }
23143 
23144 /* PyObjectGetMethod */
23145 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
23146  PyObject *attr;
23147 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
23148  PyTypeObject *tp = Py_TYPE(obj);
23149  PyObject *descr;
23150  descrgetfunc f = NULL;
23151  PyObject **dictptr, *dict;
23152  int meth_found = 0;
23153  assert (*method == NULL);
23154  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
23155  attr = __Pyx_PyObject_GetAttrStr(obj, name);
23156  goto try_unpack;
23157  }
23158  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
23159  return 0;
23160  }
23161  descr = _PyType_Lookup(tp, name);
23162  if (likely(descr != NULL)) {
23163  Py_INCREF(descr);
23164 #if PY_MAJOR_VERSION >= 3
23165  #ifdef __Pyx_CyFunction_USED
23166  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
23167  #else
23168  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
23169  #endif
23170 #else
23171  #ifdef __Pyx_CyFunction_USED
23172  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
23173  #else
23174  if (likely(PyFunction_Check(descr)))
23175  #endif
23176 #endif
23177  {
23178  meth_found = 1;
23179  } else {
23180  f = Py_TYPE(descr)->tp_descr_get;
23181  if (f != NULL && PyDescr_IsData(descr)) {
23182  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
23183  Py_DECREF(descr);
23184  goto try_unpack;
23185  }
23186  }
23187  }
23188  dictptr = _PyObject_GetDictPtr(obj);
23189  if (dictptr != NULL && (dict = *dictptr) != NULL) {
23190  Py_INCREF(dict);
23191  attr = __Pyx_PyDict_GetItemStr(dict, name);
23192  if (attr != NULL) {
23193  Py_INCREF(attr);
23194  Py_DECREF(dict);
23195  Py_XDECREF(descr);
23196  goto try_unpack;
23197  }
23198  Py_DECREF(dict);
23199  }
23200  if (meth_found) {
23201  *method = descr;
23202  return 1;
23203  }
23204  if (f != NULL) {
23205  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
23206  Py_DECREF(descr);
23207  goto try_unpack;
23208  }
23209  if (descr != NULL) {
23210  *method = descr;
23211  return 0;
23212  }
23213  PyErr_Format(PyExc_AttributeError,
23214 #if PY_MAJOR_VERSION >= 3
23215  "'%.50s' object has no attribute '%U'",
23216  tp->tp_name, name);
23217 #else
23218  "'%.50s' object has no attribute '%.400s'",
23219  tp->tp_name, PyString_AS_STRING(name));
23220 #endif
23221  return 0;
23222 #else
23223  attr = __Pyx_PyObject_GetAttrStr(obj, name);
23224  goto try_unpack;
23225 #endif
23226 try_unpack:
23227 #if CYTHON_UNPACK_METHODS
23228  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
23229  PyObject *function = PyMethod_GET_FUNCTION(attr);
23230  Py_INCREF(function);
23231  Py_DECREF(attr);
23232  *method = function;
23233  return 1;
23234  }
23235 #endif
23236  *method = attr;
23237  return 0;
23238 }
23239 
23240 /* PyObjectCallMethod1 */
23241 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
23242  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
23243  Py_DECREF(method);
23244  return result;
23245 }
23246 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
23247  PyObject *method = NULL, *result;
23248  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
23249  if (likely(is_method)) {
23250  result = __Pyx_PyObject_Call2Args(method, obj, arg);
23251  Py_DECREF(method);
23252  return result;
23253  }
23254  if (unlikely(!method)) return NULL;
23255  return __Pyx__PyObject_CallMethod1(method, arg);
23256 }
23257 
23258 /* CoroutineBase */
23259 #include <structmember.h>
23260 #include <frameobject.h>
23261 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
23262 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
23263  PyObject *et, *ev, *tb;
23264  PyObject *value = NULL;
23265  __Pyx_ErrFetch(&et, &ev, &tb);
23266  if (!et) {
23267  Py_XDECREF(tb);
23268  Py_XDECREF(ev);
23269  Py_INCREF(Py_None);
23270  *pvalue = Py_None;
23271  return 0;
23272  }
23273  if (likely(et == PyExc_StopIteration)) {
23274  if (!ev) {
23275  Py_INCREF(Py_None);
23276  value = Py_None;
23277  }
23278 #if PY_VERSION_HEX >= 0x030300A0
23279  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
23280  value = ((PyStopIterationObject *)ev)->value;
23281  Py_INCREF(value);
23282  Py_DECREF(ev);
23283  }
23284 #endif
23285  else if (unlikely(PyTuple_Check(ev))) {
23286  if (PyTuple_GET_SIZE(ev) >= 1) {
23287 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23288  value = PyTuple_GET_ITEM(ev, 0);
23289  Py_INCREF(value);
23290 #else
23291  value = PySequence_ITEM(ev, 0);
23292 #endif
23293  } else {
23294  Py_INCREF(Py_None);
23295  value = Py_None;
23296  }
23297  Py_DECREF(ev);
23298  }
23299  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
23300  value = ev;
23301  }
23302  if (likely(value)) {
23303  Py_XDECREF(tb);
23304  Py_DECREF(et);
23305  *pvalue = value;
23306  return 0;
23307  }
23308  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
23309  __Pyx_ErrRestore(et, ev, tb);
23310  return -1;
23311  }
23312  PyErr_NormalizeException(&et, &ev, &tb);
23313  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
23314  __Pyx_ErrRestore(et, ev, tb);
23315  return -1;
23316  }
23317  Py_XDECREF(tb);
23318  Py_DECREF(et);
23319 #if PY_VERSION_HEX >= 0x030300A0
23320  value = ((PyStopIterationObject *)ev)->value;
23321  Py_INCREF(value);
23322  Py_DECREF(ev);
23323 #else
23324  {
23325  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
23326  Py_DECREF(ev);
23327  if (likely(args)) {
23328  value = PySequence_GetItem(args, 0);
23329  Py_DECREF(args);
23330  }
23331  if (unlikely(!value)) {
23332  __Pyx_ErrRestore(NULL, NULL, NULL);
23333  Py_INCREF(Py_None);
23334  value = Py_None;
23335  }
23336  }
23337 #endif
23338  *pvalue = value;
23339  return 0;
23340 }
23341 static CYTHON_INLINE
23342 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
23343  PyObject *t, *v, *tb;
23344  t = exc_state->exc_type;
23345  v = exc_state->exc_value;
23346  tb = exc_state->exc_traceback;
23347  exc_state->exc_type = NULL;
23348  exc_state->exc_value = NULL;
23349  exc_state->exc_traceback = NULL;
23350  Py_XDECREF(t);
23351  Py_XDECREF(v);
23352  Py_XDECREF(tb);
23353 }
23354 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
23355 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
23356  const char *msg;
23357  if ((0)) {
23358  #ifdef __Pyx_Coroutine_USED
23359  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
23360  msg = "coroutine already executing";
23361  #endif
23362  #ifdef __Pyx_AsyncGen_USED
23363  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
23364  msg = "async generator already executing";
23365  #endif
23366  } else {
23367  msg = "generator already executing";
23368  }
23369  PyErr_SetString(PyExc_ValueError, msg);
23370 }
23371 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
23372 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
23373  const char *msg;
23374  if ((0)) {
23375  #ifdef __Pyx_Coroutine_USED
23376  } else if (__Pyx_Coroutine_Check(gen)) {
23377  msg = "can't send non-None value to a just-started coroutine";
23378  #endif
23379  #ifdef __Pyx_AsyncGen_USED
23380  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
23381  msg = "can't send non-None value to a just-started async generator";
23382  #endif
23383  } else {
23384  msg = "can't send non-None value to a just-started generator";
23385  }
23386  PyErr_SetString(PyExc_TypeError, msg);
23387 }
23388 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
23389 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
23390  #ifdef __Pyx_Coroutine_USED
23391  if (!closing && __Pyx_Coroutine_Check(gen)) {
23392  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
23393  } else
23394  #endif
23395  if (value) {
23396  #ifdef __Pyx_AsyncGen_USED
23397  if (__Pyx_AsyncGen_CheckExact(gen))
23398  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
23399  else
23400  #endif
23401  PyErr_SetNone(PyExc_StopIteration);
23402  }
23403 }
23404 static
23405 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
23406  __Pyx_PyThreadState_declare
23407  PyThreadState *tstate;
23408  __Pyx_ExcInfoStruct *exc_state;
23409  PyObject *retval;
23410  assert(!self->is_running);
23411  if (unlikely(self->resume_label == 0)) {
23412  if (unlikely(value && value != Py_None)) {
23413  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
23414  }
23415  }
23416  if (unlikely(self->resume_label == -1)) {
23417  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
23418  }
23419 #if CYTHON_FAST_THREAD_STATE
23420  __Pyx_PyThreadState_assign
23421  tstate = __pyx_tstate;
23422 #else
23423  tstate = __Pyx_PyThreadState_Current;
23424 #endif
23425  exc_state = &self->gi_exc_state;
23426  if (exc_state->exc_type) {
23427  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23428  #else
23429  if (exc_state->exc_traceback) {
23430  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
23431  PyFrameObject *f = tb->tb_frame;
23432  Py_XINCREF(tstate->frame);
23433  assert(f->f_back == NULL);
23434  f->f_back = tstate->frame;
23435  }
23436  #endif
23437  }
23438 #if CYTHON_USE_EXC_INFO_STACK
23439  exc_state->previous_item = tstate->exc_info;
23440  tstate->exc_info = exc_state;
23441 #else
23442  if (exc_state->exc_type) {
23443  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
23444  } else {
23445  __Pyx_Coroutine_ExceptionClear(exc_state);
23446  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
23447  }
23448 #endif
23449  self->is_running = 1;
23450  retval = self->body((PyObject *) self, tstate, value);
23451  self->is_running = 0;
23452 #if CYTHON_USE_EXC_INFO_STACK
23453  exc_state = &self->gi_exc_state;
23454  tstate->exc_info = exc_state->previous_item;
23455  exc_state->previous_item = NULL;
23456  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
23457 #endif
23458  return retval;
23459 }
23460 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
23461  PyObject *exc_tb = exc_state->exc_traceback;
23462  if (likely(exc_tb)) {
23463 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23464 #else
23465  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
23466  PyFrameObject *f = tb->tb_frame;
23467  Py_CLEAR(f->f_back);
23468 #endif
23469  }
23470 }
23471 static CYTHON_INLINE
23472 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
23473  if (unlikely(!retval)) {
23474  __Pyx_PyThreadState_declare
23475  __Pyx_PyThreadState_assign
23476  if (!__Pyx_PyErr_Occurred()) {
23477  PyObject *exc = PyExc_StopIteration;
23478  #ifdef __Pyx_AsyncGen_USED
23479  if (__Pyx_AsyncGen_CheckExact(gen))
23480  exc = __Pyx_PyExc_StopAsyncIteration;
23481  #endif
23482  __Pyx_PyErr_SetNone(exc);
23483  }
23484  }
23485  return retval;
23486 }
23487 static CYTHON_INLINE
23488 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
23489  PyObject *ret;
23490  PyObject *val = NULL;
23491  __Pyx_Coroutine_Undelegate(gen);
23492  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23493  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23494  Py_XDECREF(val);
23495  return ret;
23496 }
23497 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23498  PyObject *retval;
23499  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23500  PyObject *yf = gen->yieldfrom;
23501  if (unlikely(gen->is_running))
23502  return __Pyx_Coroutine_AlreadyRunningError(gen);
23503  if (yf) {
23504  PyObject *ret;
23505  gen->is_running = 1;
23506  #ifdef __Pyx_Generator_USED
23507  if (__Pyx_Generator_CheckExact(yf)) {
23508  ret = __Pyx_Coroutine_Send(yf, value);
23509  } else
23510  #endif
23511  #ifdef __Pyx_Coroutine_USED
23512  if (__Pyx_Coroutine_Check(yf)) {
23513  ret = __Pyx_Coroutine_Send(yf, value);
23514  } else
23515  #endif
23516  #ifdef __Pyx_AsyncGen_USED
23517  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23518  ret = __Pyx_async_gen_asend_send(yf, value);
23519  } else
23520  #endif
23521  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23522  if (PyGen_CheckExact(yf)) {
23523  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23524  } else
23525  #endif
23526  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23527  if (PyCoro_CheckExact(yf)) {
23528  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23529  } else
23530  #endif
23531  {
23532  if (value == Py_None)
23533  ret = Py_TYPE(yf)->tp_iternext(yf);
23534  else
23535  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23536  }
23537  gen->is_running = 0;
23538  if (likely(ret)) {
23539  return ret;
23540  }
23541  retval = __Pyx_Coroutine_FinishDelegation(gen);
23542  } else {
23543  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23544  }
23545  return __Pyx_Coroutine_MethodReturn(self, retval);
23546 }
23547 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23548  PyObject *retval = NULL;
23549  int err = 0;
23550  #ifdef __Pyx_Generator_USED
23551  if (__Pyx_Generator_CheckExact(yf)) {
23552  retval = __Pyx_Coroutine_Close(yf);
23553  if (!retval)
23554  return -1;
23555  } else
23556  #endif
23557  #ifdef __Pyx_Coroutine_USED
23558  if (__Pyx_Coroutine_Check(yf)) {
23559  retval = __Pyx_Coroutine_Close(yf);
23560  if (!retval)
23561  return -1;
23562  } else
23563  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23564  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
23565  if (!retval)
23566  return -1;
23567  } else
23568  #endif
23569  #ifdef __Pyx_AsyncGen_USED
23570  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23571  retval = __Pyx_async_gen_asend_close(yf, NULL);
23572  } else
23573  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23574  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23575  } else
23576  #endif
23577  {
23578  PyObject *meth;
23579  gen->is_running = 1;
23580  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23581  if (unlikely(!meth)) {
23582  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23583  PyErr_WriteUnraisable(yf);
23584  }
23585  PyErr_Clear();
23586  } else {
23587  retval = PyObject_CallFunction(meth, NULL);
23588  Py_DECREF(meth);
23589  if (!retval)
23590  err = -1;
23591  }
23592  gen->is_running = 0;
23593  }
23594  Py_XDECREF(retval);
23595  return err;
23596 }
23597 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23598  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23599  PyObject *yf = gen->yieldfrom;
23600  if (unlikely(gen->is_running))
23601  return __Pyx_Coroutine_AlreadyRunningError(gen);
23602  if (yf) {
23603  PyObject *ret;
23604  gen->is_running = 1;
23605  #ifdef __Pyx_Generator_USED
23606  if (__Pyx_Generator_CheckExact(yf)) {
23607  ret = __Pyx_Generator_Next(yf);
23608  } else
23609  #endif
23610  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23611  if (PyGen_CheckExact(yf)) {
23612  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23613  } else
23614  #endif
23615  #ifdef __Pyx_Coroutine_USED
23616  if (__Pyx_Coroutine_Check(yf)) {
23617  ret = __Pyx_Coroutine_Send(yf, Py_None);
23618  } else
23619  #endif
23620  ret = Py_TYPE(yf)->tp_iternext(yf);
23621  gen->is_running = 0;
23622  if (likely(ret)) {
23623  return ret;
23624  }
23625  return __Pyx_Coroutine_FinishDelegation(gen);
23626  }
23627  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23628 }
23629 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
23630  return __Pyx_Coroutine_Close(self);
23631 }
23632 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23633  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23634  PyObject *retval, *raised_exception;
23635  PyObject *yf = gen->yieldfrom;
23636  int err = 0;
23637  if (unlikely(gen->is_running))
23638  return __Pyx_Coroutine_AlreadyRunningError(gen);
23639  if (yf) {
23640  Py_INCREF(yf);
23641  err = __Pyx_Coroutine_CloseIter(gen, yf);
23642  __Pyx_Coroutine_Undelegate(gen);
23643  Py_DECREF(yf);
23644  }
23645  if (err == 0)
23646  PyErr_SetNone(PyExc_GeneratorExit);
23647  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23648  if (unlikely(retval)) {
23649  const char *msg;
23650  Py_DECREF(retval);
23651  if ((0)) {
23652  #ifdef __Pyx_Coroutine_USED
23653  } else if (__Pyx_Coroutine_Check(self)) {
23654  msg = "coroutine ignored GeneratorExit";
23655  #endif
23656  #ifdef __Pyx_AsyncGen_USED
23657  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23658 #if PY_VERSION_HEX < 0x03060000
23659  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23660 #else
23661  msg = "async generator ignored GeneratorExit";
23662 #endif
23663  #endif
23664  } else {
23665  msg = "generator ignored GeneratorExit";
23666  }
23667  PyErr_SetString(PyExc_RuntimeError, msg);
23668  return NULL;
23669  }
23670  raised_exception = PyErr_Occurred();
23671  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23672  if (raised_exception) PyErr_Clear();
23673  Py_INCREF(Py_None);
23674  return Py_None;
23675  }
23676  return NULL;
23677 }
23678 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23679  PyObject *args, int close_on_genexit) {
23680  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23681  PyObject *yf = gen->yieldfrom;
23682  if (unlikely(gen->is_running))
23683  return __Pyx_Coroutine_AlreadyRunningError(gen);
23684  if (yf) {
23685  PyObject *ret;
23686  Py_INCREF(yf);
23687  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23688  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23689  Py_DECREF(yf);
23690  __Pyx_Coroutine_Undelegate(gen);
23691  if (err < 0)
23692  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23693  goto throw_here;
23694  }
23695  gen->is_running = 1;
23696  if (0
23697  #ifdef __Pyx_Generator_USED
23698  || __Pyx_Generator_CheckExact(yf)
23699  #endif
23700  #ifdef __Pyx_Coroutine_USED
23701  || __Pyx_Coroutine_Check(yf)
23702  #endif
23703  ) {
23704  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23705  #ifdef __Pyx_Coroutine_USED
23706  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23707  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23708  #endif
23709  } else {
23710  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23711  if (unlikely(!meth)) {
23712  Py_DECREF(yf);
23713  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23714  gen->is_running = 0;
23715  return NULL;
23716  }
23717  PyErr_Clear();
23718  __Pyx_Coroutine_Undelegate(gen);
23719  gen->is_running = 0;
23720  goto throw_here;
23721  }
23722  if (likely(args)) {
23723  ret = PyObject_CallObject(meth, args);
23724  } else {
23725  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23726  }
23727  Py_DECREF(meth);
23728  }
23729  gen->is_running = 0;
23730  Py_DECREF(yf);
23731  if (!ret) {
23732  ret = __Pyx_Coroutine_FinishDelegation(gen);
23733  }
23734  return __Pyx_Coroutine_MethodReturn(self, ret);
23735  }
23736 throw_here:
23737  __Pyx_Raise(typ, val, tb, NULL);
23738  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23739 }
23740 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23741  PyObject *typ;
23742  PyObject *val = NULL;
23743  PyObject *tb = NULL;
23744  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23745  return NULL;
23746  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23747 }
23748 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
23749  Py_VISIT(exc_state->exc_type);
23750  Py_VISIT(exc_state->exc_value);
23751  Py_VISIT(exc_state->exc_traceback);
23752  return 0;
23753 }
23754 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23755  Py_VISIT(gen->closure);
23756  Py_VISIT(gen->classobj);
23757  Py_VISIT(gen->yieldfrom);
23758  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
23759 }
23760 static int __Pyx_Coroutine_clear(PyObject *self) {
23761  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23762  Py_CLEAR(gen->closure);
23763  Py_CLEAR(gen->classobj);
23764  Py_CLEAR(gen->yieldfrom);
23765  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
23766 #ifdef __Pyx_AsyncGen_USED
23767  if (__Pyx_AsyncGen_CheckExact(self)) {
23768  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23769  }
23770 #endif
23771  Py_CLEAR(gen->gi_code);
23772  Py_CLEAR(gen->gi_name);
23773  Py_CLEAR(gen->gi_qualname);
23774  Py_CLEAR(gen->gi_modulename);
23775  return 0;
23776 }
23777 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23778  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23779  PyObject_GC_UnTrack(gen);
23780  if (gen->gi_weakreflist != NULL)
23781  PyObject_ClearWeakRefs(self);
23782  if (gen->resume_label >= 0) {
23783  PyObject_GC_Track(self);
23784 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23785  if (PyObject_CallFinalizerFromDealloc(self))
23786 #else
23787  Py_TYPE(gen)->tp_del(self);
23788  if (self->ob_refcnt > 0)
23789 #endif
23790  {
23791  return;
23792  }
23793  PyObject_GC_UnTrack(self);
23794  }
23795 #ifdef __Pyx_AsyncGen_USED
23796  if (__Pyx_AsyncGen_CheckExact(self)) {
23797  /* We have to handle this case for asynchronous generators
23798  right here, because this code has to be between UNTRACK
23799  and GC_Del. */
23800  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23801  }
23802 #endif
23803  __Pyx_Coroutine_clear(self);
23804  PyObject_GC_Del(gen);
23805 }
23806 static void __Pyx_Coroutine_del(PyObject *self) {
23807  PyObject *error_type, *error_value, *error_traceback;
23808  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23809  __Pyx_PyThreadState_declare
23810  if (gen->resume_label < 0) {
23811  return;
23812  }
23813 #if !CYTHON_USE_TP_FINALIZE
23814  assert(self->ob_refcnt == 0);
23815  self->ob_refcnt = 1;
23816 #endif
23817  __Pyx_PyThreadState_assign
23818  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23819 #ifdef __Pyx_AsyncGen_USED
23820  if (__Pyx_AsyncGen_CheckExact(self)) {
23821  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23822  PyObject *finalizer = agen->ag_finalizer;
23823  if (finalizer && !agen->ag_closed) {
23824  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23825  if (unlikely(!res)) {
23826  PyErr_WriteUnraisable(self);
23827  } else {
23828  Py_DECREF(res);
23829  }
23830  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23831  return;
23832  }
23833  }
23834 #endif
23835  if (unlikely(gen->resume_label == 0 && !error_value)) {
23836 #ifdef __Pyx_Coroutine_USED
23837 #ifdef __Pyx_Generator_USED
23838  if (!__Pyx_Generator_CheckExact(self))
23839 #endif
23840  {
23841  PyObject_GC_UnTrack(self);
23842 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23843  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23844  PyErr_WriteUnraisable(self);
23845 #else
23846  {PyObject *msg;
23847  char *cmsg;
23848  #if CYTHON_COMPILING_IN_PYPY
23849  msg = NULL;
23850  cmsg = (char*) "coroutine was never awaited";
23851  #else
23852  char *cname;
23853  PyObject *qualname;
23854  qualname = gen->gi_qualname;
23855  cname = PyString_AS_STRING(qualname);
23856  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23857  if (unlikely(!msg)) {
23858  PyErr_Clear();
23859  cmsg = (char*) "coroutine was never awaited";
23860  } else {
23861  cmsg = PyString_AS_STRING(msg);
23862  }
23863  #endif
23864  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23865  PyErr_WriteUnraisable(self);
23866  Py_XDECREF(msg);}
23867 #endif
23868  PyObject_GC_Track(self);
23869  }
23870 #endif
23871  } else {
23872  PyObject *res = __Pyx_Coroutine_Close(self);
23873  if (unlikely(!res)) {
23874  if (PyErr_Occurred())
23875  PyErr_WriteUnraisable(self);
23876  } else {
23877  Py_DECREF(res);
23878  }
23879  }
23880  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23881 #if !CYTHON_USE_TP_FINALIZE
23882  assert(self->ob_refcnt > 0);
23883  if (--self->ob_refcnt == 0) {
23884  return;
23885  }
23886  {
23887  Py_ssize_t refcnt = self->ob_refcnt;
23888  _Py_NewReference(self);
23889  self->ob_refcnt = refcnt;
23890  }
23891 #if CYTHON_COMPILING_IN_CPYTHON
23892  assert(PyType_IS_GC(self->ob_type) &&
23893  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23894  _Py_DEC_REFTOTAL;
23895 #endif
23896 #ifdef COUNT_ALLOCS
23897  --Py_TYPE(self)->tp_frees;
23898  --Py_TYPE(self)->tp_allocs;
23899 #endif
23900 #endif
23901 }
23902 static PyObject *
23903 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23904 {
23905  PyObject *name = self->gi_name;
23906  if (unlikely(!name)) name = Py_None;
23907  Py_INCREF(name);
23908  return name;
23909 }
23910 static int
23911 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23912 {
23913  PyObject *tmp;
23914 #if PY_MAJOR_VERSION >= 3
23915  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23916 #else
23917  if (unlikely(value == NULL || !PyString_Check(value)))
23918 #endif
23919  {
23920  PyErr_SetString(PyExc_TypeError,
23921  "__name__ must be set to a string object");
23922  return -1;
23923  }
23924  tmp = self->gi_name;
23925  Py_INCREF(value);
23926  self->gi_name = value;
23927  Py_XDECREF(tmp);
23928  return 0;
23929 }
23930 static PyObject *
23931 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23932 {
23933  PyObject *name = self->gi_qualname;
23934  if (unlikely(!name)) name = Py_None;
23935  Py_INCREF(name);
23936  return name;
23937 }
23938 static int
23939 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23940 {
23941  PyObject *tmp;
23942 #if PY_MAJOR_VERSION >= 3
23943  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23944 #else
23945  if (unlikely(value == NULL || !PyString_Check(value)))
23946 #endif
23947  {
23948  PyErr_SetString(PyExc_TypeError,
23949  "__qualname__ must be set to a string object");
23950  return -1;
23951  }
23952  tmp = self->gi_qualname;
23953  Py_INCREF(value);
23954  self->gi_qualname = value;
23955  Py_XDECREF(tmp);
23956  return 0;
23957 }
23958 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23959  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23960  PyObject *name, PyObject *qualname, PyObject *module_name) {
23961  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23962  if (unlikely(!gen))
23963  return NULL;
23964  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
23965 }
23966 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23967  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23968  PyObject *name, PyObject *qualname, PyObject *module_name) {
23969  gen->body = body;
23970  gen->closure = closure;
23971  Py_XINCREF(closure);
23972  gen->is_running = 0;
23973  gen->resume_label = 0;
23974  gen->classobj = NULL;
23975  gen->yieldfrom = NULL;
23976  gen->gi_exc_state.exc_type = NULL;
23977  gen->gi_exc_state.exc_value = NULL;
23978  gen->gi_exc_state.exc_traceback = NULL;
23979 #if CYTHON_USE_EXC_INFO_STACK
23980  gen->gi_exc_state.previous_item = NULL;
23981 #endif
23982  gen->gi_weakreflist = NULL;
23983  Py_XINCREF(qualname);
23984  gen->gi_qualname = qualname;
23985  Py_XINCREF(name);
23986  gen->gi_name = name;
23987  Py_XINCREF(module_name);
23988  gen->gi_modulename = module_name;
23989  Py_XINCREF(code);
23990  gen->gi_code = code;
23991  PyObject_GC_Track(gen);
23992  return gen;
23993 }
23994 
23995 /* PatchModuleWithCoroutine */
23996 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23997 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23998  int result;
23999  PyObject *globals, *result_obj;
24000  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
24001  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
24002  #ifdef __Pyx_Coroutine_USED
24003  (PyObject*)__pyx_CoroutineType);
24004  #else
24005  Py_None);
24006  #endif
24007  if (unlikely(result < 0)) goto ignore;
24008  result = PyDict_SetItemString(globals, "_cython_generator_type",
24009  #ifdef __Pyx_Generator_USED
24010  (PyObject*)__pyx_GeneratorType);
24011  #else
24012  Py_None);
24013  #endif
24014  if (unlikely(result < 0)) goto ignore;
24015  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
24016  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
24017  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
24018  if (unlikely(!result_obj)) goto ignore;
24019  Py_DECREF(result_obj);
24020  Py_DECREF(globals);
24021  return module;
24022 ignore:
24023  Py_XDECREF(globals);
24024  PyErr_WriteUnraisable(module);
24025  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
24026  Py_DECREF(module);
24027  module = NULL;
24028  }
24029 #else
24030  py_code++;
24031 #endif
24032  return module;
24033 }
24034 
24035 /* PatchGeneratorABC */
24036 #ifndef CYTHON_REGISTER_ABCS
24037 #define CYTHON_REGISTER_ABCS 1
24038 #endif
24039 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
24040 static PyObject* __Pyx_patch_abc_module(PyObject *module);
24041 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
24042  module = __Pyx_Coroutine_patch_module(
24043  module, ""
24044 "if _cython_generator_type is not None:\n"
24045 " try: Generator = _module.Generator\n"
24046 " except AttributeError: pass\n"
24047 " else: Generator.register(_cython_generator_type)\n"
24048 "if _cython_coroutine_type is not None:\n"
24049 " try: Coroutine = _module.Coroutine\n"
24050 " except AttributeError: pass\n"
24051 " else: Coroutine.register(_cython_coroutine_type)\n"
24052  );
24053  return module;
24054 }
24055 #endif
24056 static int __Pyx_patch_abc(void) {
24057 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
24058  static int abc_patched = 0;
24059  if (CYTHON_REGISTER_ABCS && !abc_patched) {
24060  PyObject *module;
24061  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
24062  if (!module) {
24063  PyErr_WriteUnraisable(NULL);
24064  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
24065  ((PY_MAJOR_VERSION >= 3) ?
24066  "Cython module failed to register with collections.abc module" :
24067  "Cython module failed to register with collections module"), 1) < 0)) {
24068  return -1;
24069  }
24070  } else {
24071  module = __Pyx_patch_abc_module(module);
24072  abc_patched = 1;
24073  if (unlikely(!module))
24074  return -1;
24075  Py_DECREF(module);
24076  }
24077  module = PyImport_ImportModule("backports_abc");
24078  if (module) {
24079  module = __Pyx_patch_abc_module(module);
24080  Py_XDECREF(module);
24081  }
24082  if (!module) {
24083  PyErr_Clear();
24084  }
24085  }
24086 #else
24087  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
24088 #endif
24089  return 0;
24090 }
24091 
24092 /* Generator */
24093 static PyMethodDef __pyx_Generator_methods[] = {
24094  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
24095  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
24096  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
24097  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
24098  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
24099  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
24100  {0, 0, 0, 0}
24101 };
24102 static PyMemberDef __pyx_Generator_memberlist[] = {
24103  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
24104  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
24105  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
24106  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
24107  {0, 0, 0, 0, 0}
24108 };
24109 static PyGetSetDef __pyx_Generator_getsets[] = {
24110  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
24111  (char*) PyDoc_STR("name of the generator"), 0},
24112  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
24113  (char*) PyDoc_STR("qualified name of the generator"), 0},
24114  {0, 0, 0, 0, 0}
24115 };
24116 static PyTypeObject __pyx_GeneratorType_type = {
24117  PyVarObject_HEAD_INIT(0, 0)
24118  "generator",
24119  sizeof(__pyx_CoroutineObject),
24120  0,
24121  (destructor) __Pyx_Coroutine_dealloc,
24122  0,
24123  0,
24124  0,
24125  0,
24126  0,
24127  0,
24128  0,
24129  0,
24130  0,
24131  0,
24132  0,
24133  0,
24134  0,
24135  0,
24136  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
24137  0,
24138  (traverseproc) __Pyx_Coroutine_traverse,
24139  0,
24140  0,
24141  offsetof(__pyx_CoroutineObject, gi_weakreflist),
24142  0,
24143  (iternextfunc) __Pyx_Generator_Next,
24144  __pyx_Generator_methods,
24145  __pyx_Generator_memberlist,
24146  __pyx_Generator_getsets,
24147  0,
24148  0,
24149  0,
24150  0,
24151  0,
24152  0,
24153  0,
24154  0,
24155  0,
24156  0,
24157  0,
24158  0,
24159  0,
24160  0,
24161  0,
24162 #if CYTHON_USE_TP_FINALIZE
24163  0,
24164 #else
24165  __Pyx_Coroutine_del,
24166 #endif
24167  0,
24168 #if CYTHON_USE_TP_FINALIZE
24169  __Pyx_Coroutine_del,
24170 #elif PY_VERSION_HEX >= 0x030400a1
24171  0,
24172 #endif
24173 #if PY_VERSION_HEX >= 0x030800b1
24174  0,
24175 #endif
24176 };
24177 static int __pyx_Generator_init(void) {
24178  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
24179  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
24180  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
24181  if (unlikely(!__pyx_GeneratorType)) {
24182  return -1;
24183  }
24184  return 0;
24185 }
24186 
24187 /* CheckBinaryVersion */
24188 static int __Pyx_check_binary_version(void) {
24189  char ctversion[4], rtversion[4];
24190  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
24191  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
24192  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
24193  char message[200];
24194  PyOS_snprintf(message, sizeof(message),
24195  "compiletime version %s of module '%.100s' "
24196  "does not match runtime version %s",
24197  ctversion, __Pyx_MODULE_NAME, rtversion);
24198  return PyErr_WarnEx(NULL, message, 1);
24199  }
24200  return 0;
24201 }
24202 
24203 /* InitStrings */
24204 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
24205  while (t->p) {
24206  #if PY_MAJOR_VERSION < 3
24207  if (t->is_unicode) {
24208  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
24209  } else if (t->intern) {
24210  *t->p = PyString_InternFromString(t->s);
24211  } else {
24212  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
24213  }
24214  #else
24215  if (t->is_unicode | t->is_str) {
24216  if (t->intern) {
24217  *t->p = PyUnicode_InternFromString(t->s);
24218  } else if (t->encoding) {
24219  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
24220  } else {
24221  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
24222  }
24223  } else {
24224  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
24225  }
24226  #endif
24227  if (!*t->p)
24228  return -1;
24229  if (PyObject_Hash(*t->p) == -1)
24230  return -1;
24231  ++t;
24232  }
24233  return 0;
24234 }
24235 
24236 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
24237  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
24238 }
24239 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
24240  Py_ssize_t ignore;
24241  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
24242 }
24243 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24244 #if !CYTHON_PEP393_ENABLED
24245 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24246  char* defenc_c;
24247  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
24248  if (!defenc) return NULL;
24249  defenc_c = PyBytes_AS_STRING(defenc);
24250 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24251  {
24252  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
24253  char* c;
24254  for (c = defenc_c; c < end; c++) {
24255  if ((unsigned char) (*c) >= 128) {
24256  PyUnicode_AsASCIIString(o);
24257  return NULL;
24258  }
24259  }
24260  }
24261 #endif
24262  *length = PyBytes_GET_SIZE(defenc);
24263  return defenc_c;
24264 }
24265 #else
24266 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24267  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
24268 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24269  if (likely(PyUnicode_IS_ASCII(o))) {
24270  *length = PyUnicode_GET_LENGTH(o);
24271  return PyUnicode_AsUTF8(o);
24272  } else {
24273  PyUnicode_AsASCIIString(o);
24274  return NULL;
24275  }
24276 #else
24277  return PyUnicode_AsUTF8AndSize(o, length);
24278 #endif
24279 }
24280 #endif
24281 #endif
24282 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24283 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24284  if (
24285 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24286  __Pyx_sys_getdefaultencoding_not_ascii &&
24287 #endif
24288  PyUnicode_Check(o)) {
24289  return __Pyx_PyUnicode_AsStringAndSize(o, length);
24290  } else
24291 #endif
24292 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
24293  if (PyByteArray_Check(o)) {
24294  *length = PyByteArray_GET_SIZE(o);
24295  return PyByteArray_AS_STRING(o);
24296  } else
24297 #endif
24298  {
24299  char* result;
24300  int r = PyBytes_AsStringAndSize(o, &result, length);
24301  if (unlikely(r < 0)) {
24302  return NULL;
24303  } else {
24304  return result;
24305  }
24306  }
24307 }
24308 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
24309  int is_true = x == Py_True;
24310  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
24311  else return PyObject_IsTrue(x);
24312 }
24313 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
24314  int retval;
24315  if (unlikely(!x)) return -1;
24316  retval = __Pyx_PyObject_IsTrue(x);
24317  Py_DECREF(x);
24318  return retval;
24319 }
24320 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
24321 #if PY_MAJOR_VERSION >= 3
24322  if (PyLong_Check(result)) {
24323  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
24324  "__int__ returned non-int (type %.200s). "
24325  "The ability to return an instance of a strict subclass of int "
24326  "is deprecated, and may be removed in a future version of Python.",
24327  Py_TYPE(result)->tp_name)) {
24328  Py_DECREF(result);
24329  return NULL;
24330  }
24331  return result;
24332  }
24333 #endif
24334  PyErr_Format(PyExc_TypeError,
24335  "__%.4s__ returned non-%.4s (type %.200s)",
24336  type_name, type_name, Py_TYPE(result)->tp_name);
24337  Py_DECREF(result);
24338  return NULL;
24339 }
24340 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
24341 #if CYTHON_USE_TYPE_SLOTS
24342  PyNumberMethods *m;
24343 #endif
24344  const char *name = NULL;
24345  PyObject *res = NULL;
24346 #if PY_MAJOR_VERSION < 3
24347  if (likely(PyInt_Check(x) || PyLong_Check(x)))
24348 #else
24349  if (likely(PyLong_Check(x)))
24350 #endif
24351  return __Pyx_NewRef(x);
24352 #if CYTHON_USE_TYPE_SLOTS
24353  m = Py_TYPE(x)->tp_as_number;
24354  #if PY_MAJOR_VERSION < 3
24355  if (m && m->nb_int) {
24356  name = "int";
24357  res = m->nb_int(x);
24358  }
24359  else if (m && m->nb_long) {
24360  name = "long";
24361  res = m->nb_long(x);
24362  }
24363  #else
24364  if (likely(m && m->nb_int)) {
24365  name = "int";
24366  res = m->nb_int(x);
24367  }
24368  #endif
24369 #else
24370  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
24371  res = PyNumber_Int(x);
24372  }
24373 #endif
24374  if (likely(res)) {
24375 #if PY_MAJOR_VERSION < 3
24376  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
24377 #else
24378  if (unlikely(!PyLong_CheckExact(res))) {
24379 #endif
24380  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
24381  }
24382  }
24383  else if (!PyErr_Occurred()) {
24384  PyErr_SetString(PyExc_TypeError,
24385  "an integer is required");
24386  }
24387  return res;
24388 }
24389 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
24390  Py_ssize_t ival;
24391  PyObject *x;
24392 #if PY_MAJOR_VERSION < 3
24393  if (likely(PyInt_CheckExact(b))) {
24394  if (sizeof(Py_ssize_t) >= sizeof(long))
24395  return PyInt_AS_LONG(b);
24396  else
24397  return PyInt_AsSsize_t(b);
24398  }
24399 #endif
24400  if (likely(PyLong_CheckExact(b))) {
24401  #if CYTHON_USE_PYLONG_INTERNALS
24402  const digit* digits = ((PyLongObject*)b)->ob_digit;
24403  const Py_ssize_t size = Py_SIZE(b);
24404  if (likely(__Pyx_sst_abs(size) <= 1)) {
24405  ival = likely(size) ? digits[0] : 0;
24406  if (size == -1) ival = -ival;
24407  return ival;
24408  } else {
24409  switch (size) {
24410  case 2:
24411  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24412  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24413  }
24414  break;
24415  case -2:
24416  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24417  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24418  }
24419  break;
24420  case 3:
24421  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24422  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24423  }
24424  break;
24425  case -3:
24426  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24427  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24428  }
24429  break;
24430  case 4:
24431  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24432  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24433  }
24434  break;
24435  case -4:
24436  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24437  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24438  }
24439  break;
24440  }
24441  }
24442  #endif
24443  return PyLong_AsSsize_t(b);
24444  }
24445  x = PyNumber_Index(b);
24446  if (!x) return -1;
24447  ival = PyInt_AsSsize_t(x);
24448  Py_DECREF(x);
24449  return ival;
24450 }
24451 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
24452  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
24453 }
24454 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24455  return PyInt_FromSize_t(ival);
24456 }
24457 
24458 
24459 #endif /* Py_PYTHON_H */
glucat::asin
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.
Definition: clifford_algebra_imp.h:934
glucat::min_neg
index_t min_neg(const index_set< LO, HI > &ist)
Minimum negative index, or 0 if none.
Definition: index_set_imp.h:996
PyClical.e
def e(obj)
Definition: PyClical.pyx:1886
clifford_to_repr
String clifford_to_repr(const Multivector_T &mv)
The “official” string representation of Multivector_T mv.
Definition: PyClical.h:88
glucat::atan
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.
Definition: clifford_algebra_imp.h:1034
glucat::complexifier
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.
Definition: clifford_algebra_imp.h:535
PyClical.i
i
Definition: PyClical.pyx:1541
PyFloat_FromDouble
PyObject * PyFloat_FromDouble(Scalar_T v)
Definition: PyClical.h:60
IndexSet
index_set< lo_ndx, hi_ndx > IndexSet
Definition: PyClical.h:158
index_set_to_str
String index_set_to_str(const Index_Set_T &ist)
The "informal" string representation of Index_Set_T ist.
Definition: PyClical.h:79
glucat::max_pos
index_t max_pos(const index_set< LO, HI > &ist)
Maximum positive index, or 0 if none.
Definition: index_set_imp.h:1003
glucat::tan
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.
Definition: clifford_algebra_imp.h:1006
glucat::acos
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.
Definition: clifford_algebra_imp.h:827
scalar_t
double scalar_t
Definition: PyClical.h:160
glucat::operator!=
bool operator!=(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Test for inequality of multivectors.
Definition: clifford_algebra_imp.h:107
glucat::asinh
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.
Definition: clifford_algebra_imp.h:874
glucat::max_abs
Scalar_T max_abs(const Multivector< Scalar_T, LO, HI > &val)
Maximum of absolute values of components of multivector: multivector infinity norm.
Definition: clifford_algebra_imp.h:528
glucat::cosh
const Multivector< Scalar_T, LO, HI > cosh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic cosine of multivector.
Definition: clifford_algebra_imp.h:749
PyClical.obj
obj
Definition: PyClical.pyx:1541
glucat::acosh
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.
Definition: clifford_algebra_imp.h:767
cga3::cga3std
Multivector_T cga3std(const Multivector_T &X)
Convert CGA3 null vector to standard Conformal Geometric Algebra null vector [DL (10....
Definition: PyClical.h:127
glucat::sinh
const Multivector< Scalar_T, LO, HI > sinh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic sine of multivector.
Definition: clifford_algebra_imp.h:855
PyClical.fill
fill
Definition: PyClical.pyx:1814
glucat::compare
int compare(const index_set< LO, HI > &a, const index_set< LO, HI > &b)
"lexicographic compare" eg. {3,4,5} is less than {3,7,8}
Definition: index_set_imp.h:602
glucat::abs
Scalar_T abs(const Multivector< Scalar_T, LO, HI > &val)
Absolute value == sqrt(norm)
Definition: clifford_algebra_imp.h:520
glucat::sqrt
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.
Definition: clifford_algebra_imp.h:618
glucat::log
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.
Definition: clifford_algebra_imp.h:733
glucat::operator&
const Multivector< Scalar_T, LO, HI > operator&(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Inner product.
Definition: clifford_algebra_imp.h:257
clifford_to_str
String clifford_to_str(const Multivector_T &mv)
The "informal" string representation of Multivector_T mv.
Definition: PyClical.h:99
index_set_to_repr
String index_set_to_repr(const Index_Set_T &ist)
The “official” string representation of Index_Set_T ist.
Definition: PyClical.h:70
epsilon
const scalar_t epsilon
Definition: PyClical.h:163
cga3::agc3
Multivector_T agc3(const Multivector_T &X)
Convert CGA3 null vector to Euclidean 3D vector [DL (10.50)].
Definition: PyClical.h:139
glucat::sin
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.
Definition: clifford_algebra_imp.h:901
glucat::atanh
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.
Definition: clifford_algebra_imp.h:981
glucat::cos
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.
Definition: clifford_algebra_imp.h:794
glucat::exp
const framed_multi< Scalar_T, LO, HI > exp(const framed_multi< Scalar_T, LO, HI > &val)
Exponential of multivector.
Definition: framed_multi_imp.h:1977
PyClical.h
glucat::tanh
const Multivector< Scalar_T, LO, HI > tanh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic tangent of multivector.
Definition: clifford_algebra_imp.h:962
cga3::cga3
Multivector_T cga3(const Multivector_T &x)
Convert Euclidean 3D vector to Conformal Geometric Algebra null vector [DL (10.50)].
Definition: PyClical.h:116
Clifford
matrix_multi< scalar_t > Clifford
Definition: PyClical.h:161