glucat  0.8.4
PyClical.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.21 */
2 
3 /* BEGIN: Cython Metadata
4 {
5  "distutils": {
6  "depends": [
7  "PyClical.h"
8  ],
9  "extra_compile_args": [
10  "-I.",
11  "-I..",
12  "-fno-strict-aliasing",
13  "-Wno-unused",
14  "-Wall",
15  "-std=c++11",
16  "-g",
17  "-O3",
18  "-O2",
19  "-Wall",
20  "-D_FORTIFY_SOURCE=2",
21  "-fstack-protector-strong",
22  "-funwind-tables",
23  "-fasynchronous-unwind-tables",
24  "-fstack-clash-protection",
25  "-Werror=return-type",
26  "-flto=auto",
27  "-g",
28  "-finline-limit=8000",
29  "--param",
30  "large-function-insns=8000",
31  "--param",
32  "max-inline-insns-auto=8000",
33  "--param",
34  "max-inline-insns-single=8000",
35  "--param",
36  "inline-unit-growth=200",
37  "--param",
38  "large-function-growth=200",
39  "-funroll-loops",
40  "-fvariable-expansion-in-unroller",
41  "-DNDEBUG",
42  "-DHAVE_BITS_WORDSIZE_H",
43  "-D_GLUCAT_HAVE_BOOST_SERIALIZATION_ARRAY_WRAPPER_H",
44  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
45  "-D_GLUCAT_USE_DENSE_MATRICES",
46  "-D_GLUCAT_CHECK_ISNAN",
47  "-Wno-misleading-indentation",
48  "-Wno-self-assign-overloaded",
49  "-Wno-unused-local-typedefs",
50  "-Wno-deprecated-register",
51  "-fno-check-new",
52  "-fexceptions"
53  ],
54  "include_dirs": [
55  ".",
56  ".."
57  ],
58  "language": "c++",
59  "name": "PyClical",
60  "sources": [
61  "PyClical.pyx"
62  ]
63  },
64  "module_name": "PyClical"
65 }
66 END: Cython Metadata */
67 
68 #define PY_SSIZE_T_CLEAN
69 #include "Python.h"
70 #ifndef Py_PYTHON_H
71  #error Python headers needed to compile C extensions, please install development version of Python.
72 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
73  #error Cython requires Python 2.6+ or Python 3.3+.
74 #else
75 #define CYTHON_ABI "0_29_21"
76 #define CYTHON_HEX_VERSION 0x001D15F0
77 #define CYTHON_FUTURE_DIVISION 1
78 #include <stddef.h>
79 #ifndef offsetof
80  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
81 #endif
82 #if !defined(WIN32) && !defined(MS_WINDOWS)
83  #ifndef __stdcall
84  #define __stdcall
85  #endif
86  #ifndef __cdecl
87  #define __cdecl
88  #endif
89  #ifndef __fastcall
90  #define __fastcall
91  #endif
92 #endif
93 #ifndef DL_IMPORT
94  #define DL_IMPORT(t) t
95 #endif
96 #ifndef DL_EXPORT
97  #define DL_EXPORT(t) t
98 #endif
99 #define __PYX_COMMA ,
100 #ifndef HAVE_LONG_LONG
101  #if PY_VERSION_HEX >= 0x02070000
102  #define HAVE_LONG_LONG
103  #endif
104 #endif
105 #ifndef PY_LONG_LONG
106  #define PY_LONG_LONG LONG_LONG
107 #endif
108 #ifndef Py_HUGE_VAL
109  #define Py_HUGE_VAL HUGE_VAL
110 #endif
111 #ifdef PYPY_VERSION
112  #define CYTHON_COMPILING_IN_PYPY 1
113  #define CYTHON_COMPILING_IN_PYSTON 0
114  #define CYTHON_COMPILING_IN_CPYTHON 0
115  #undef CYTHON_USE_TYPE_SLOTS
116  #define CYTHON_USE_TYPE_SLOTS 0
117  #undef CYTHON_USE_PYTYPE_LOOKUP
118  #define CYTHON_USE_PYTYPE_LOOKUP 0
119  #if PY_VERSION_HEX < 0x03050000
120  #undef CYTHON_USE_ASYNC_SLOTS
121  #define CYTHON_USE_ASYNC_SLOTS 0
122  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
123  #define CYTHON_USE_ASYNC_SLOTS 1
124  #endif
125  #undef CYTHON_USE_PYLIST_INTERNALS
126  #define CYTHON_USE_PYLIST_INTERNALS 0
127  #undef CYTHON_USE_UNICODE_INTERNALS
128  #define CYTHON_USE_UNICODE_INTERNALS 0
129  #undef CYTHON_USE_UNICODE_WRITER
130  #define CYTHON_USE_UNICODE_WRITER 0
131  #undef CYTHON_USE_PYLONG_INTERNALS
132  #define CYTHON_USE_PYLONG_INTERNALS 0
133  #undef CYTHON_AVOID_BORROWED_REFS
134  #define CYTHON_AVOID_BORROWED_REFS 1
135  #undef CYTHON_ASSUME_SAFE_MACROS
136  #define CYTHON_ASSUME_SAFE_MACROS 0
137  #undef CYTHON_UNPACK_METHODS
138  #define CYTHON_UNPACK_METHODS 0
139  #undef CYTHON_FAST_THREAD_STATE
140  #define CYTHON_FAST_THREAD_STATE 0
141  #undef CYTHON_FAST_PYCALL
142  #define CYTHON_FAST_PYCALL 0
143  #undef CYTHON_PEP489_MULTI_PHASE_INIT
144  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
145  #undef CYTHON_USE_TP_FINALIZE
146  #define CYTHON_USE_TP_FINALIZE 0
147  #undef CYTHON_USE_DICT_VERSIONS
148  #define CYTHON_USE_DICT_VERSIONS 0
149  #undef CYTHON_USE_EXC_INFO_STACK
150  #define CYTHON_USE_EXC_INFO_STACK 0
151 #elif defined(PYSTON_VERSION)
152  #define CYTHON_COMPILING_IN_PYPY 0
153  #define CYTHON_COMPILING_IN_PYSTON 1
154  #define CYTHON_COMPILING_IN_CPYTHON 0
155  #ifndef CYTHON_USE_TYPE_SLOTS
156  #define CYTHON_USE_TYPE_SLOTS 1
157  #endif
158  #undef CYTHON_USE_PYTYPE_LOOKUP
159  #define CYTHON_USE_PYTYPE_LOOKUP 0
160  #undef CYTHON_USE_ASYNC_SLOTS
161  #define CYTHON_USE_ASYNC_SLOTS 0
162  #undef CYTHON_USE_PYLIST_INTERNALS
163  #define CYTHON_USE_PYLIST_INTERNALS 0
164  #ifndef CYTHON_USE_UNICODE_INTERNALS
165  #define CYTHON_USE_UNICODE_INTERNALS 1
166  #endif
167  #undef CYTHON_USE_UNICODE_WRITER
168  #define CYTHON_USE_UNICODE_WRITER 0
169  #undef CYTHON_USE_PYLONG_INTERNALS
170  #define CYTHON_USE_PYLONG_INTERNALS 0
171  #ifndef CYTHON_AVOID_BORROWED_REFS
172  #define CYTHON_AVOID_BORROWED_REFS 0
173  #endif
174  #ifndef CYTHON_ASSUME_SAFE_MACROS
175  #define CYTHON_ASSUME_SAFE_MACROS 1
176  #endif
177  #ifndef CYTHON_UNPACK_METHODS
178  #define CYTHON_UNPACK_METHODS 1
179  #endif
180  #undef CYTHON_FAST_THREAD_STATE
181  #define CYTHON_FAST_THREAD_STATE 0
182  #undef CYTHON_FAST_PYCALL
183  #define CYTHON_FAST_PYCALL 0
184  #undef CYTHON_PEP489_MULTI_PHASE_INIT
185  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
186  #undef CYTHON_USE_TP_FINALIZE
187  #define CYTHON_USE_TP_FINALIZE 0
188  #undef CYTHON_USE_DICT_VERSIONS
189  #define CYTHON_USE_DICT_VERSIONS 0
190  #undef CYTHON_USE_EXC_INFO_STACK
191  #define CYTHON_USE_EXC_INFO_STACK 0
192 #else
193  #define CYTHON_COMPILING_IN_PYPY 0
194  #define CYTHON_COMPILING_IN_PYSTON 0
195  #define CYTHON_COMPILING_IN_CPYTHON 1
196  #ifndef CYTHON_USE_TYPE_SLOTS
197  #define CYTHON_USE_TYPE_SLOTS 1
198  #endif
199  #if PY_VERSION_HEX < 0x02070000
200  #undef CYTHON_USE_PYTYPE_LOOKUP
201  #define CYTHON_USE_PYTYPE_LOOKUP 0
202  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
203  #define CYTHON_USE_PYTYPE_LOOKUP 1
204  #endif
205  #if PY_MAJOR_VERSION < 3
206  #undef CYTHON_USE_ASYNC_SLOTS
207  #define CYTHON_USE_ASYNC_SLOTS 0
208  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
209  #define CYTHON_USE_ASYNC_SLOTS 1
210  #endif
211  #if PY_VERSION_HEX < 0x02070000
212  #undef CYTHON_USE_PYLONG_INTERNALS
213  #define CYTHON_USE_PYLONG_INTERNALS 0
214  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
215  #define CYTHON_USE_PYLONG_INTERNALS 1
216  #endif
217  #ifndef CYTHON_USE_PYLIST_INTERNALS
218  #define CYTHON_USE_PYLIST_INTERNALS 1
219  #endif
220  #ifndef CYTHON_USE_UNICODE_INTERNALS
221  #define CYTHON_USE_UNICODE_INTERNALS 1
222  #endif
223  #if PY_VERSION_HEX < 0x030300F0
224  #undef CYTHON_USE_UNICODE_WRITER
225  #define CYTHON_USE_UNICODE_WRITER 0
226  #elif !defined(CYTHON_USE_UNICODE_WRITER)
227  #define CYTHON_USE_UNICODE_WRITER 1
228  #endif
229  #ifndef CYTHON_AVOID_BORROWED_REFS
230  #define CYTHON_AVOID_BORROWED_REFS 0
231  #endif
232  #ifndef CYTHON_ASSUME_SAFE_MACROS
233  #define CYTHON_ASSUME_SAFE_MACROS 1
234  #endif
235  #ifndef CYTHON_UNPACK_METHODS
236  #define CYTHON_UNPACK_METHODS 1
237  #endif
238  #ifndef CYTHON_FAST_THREAD_STATE
239  #define CYTHON_FAST_THREAD_STATE 1
240  #endif
241  #ifndef CYTHON_FAST_PYCALL
242  #define CYTHON_FAST_PYCALL 1
243  #endif
244  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
245  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
246  #endif
247  #ifndef CYTHON_USE_TP_FINALIZE
248  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
249  #endif
250  #ifndef CYTHON_USE_DICT_VERSIONS
251  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
252  #endif
253  #ifndef CYTHON_USE_EXC_INFO_STACK
254  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
255  #endif
256 #endif
257 #if !defined(CYTHON_FAST_PYCCALL)
258 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
259 #endif
260 #if CYTHON_USE_PYLONG_INTERNALS
261  #include "longintrepr.h"
262  #undef SHIFT
263  #undef BASE
264  #undef MASK
265  #ifdef SIZEOF_VOID_P
266  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
267  #endif
268 #endif
269 #ifndef __has_attribute
270  #define __has_attribute(x) 0
271 #endif
272 #ifndef __has_cpp_attribute
273  #define __has_cpp_attribute(x) 0
274 #endif
275 #ifndef CYTHON_RESTRICT
276  #if defined(__GNUC__)
277  #define CYTHON_RESTRICT __restrict__
278  #elif defined(_MSC_VER) && _MSC_VER >= 1400
279  #define CYTHON_RESTRICT __restrict
280  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
281  #define CYTHON_RESTRICT restrict
282  #else
283  #define CYTHON_RESTRICT
284  #endif
285 #endif
286 #ifndef CYTHON_UNUSED
287 # if defined(__GNUC__)
288 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
289 # define CYTHON_UNUSED __attribute__ ((__unused__))
290 # else
291 # define CYTHON_UNUSED
292 # endif
293 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
294 # define CYTHON_UNUSED __attribute__ ((__unused__))
295 # else
296 # define CYTHON_UNUSED
297 # endif
298 #endif
299 #ifndef CYTHON_MAYBE_UNUSED_VAR
300 # if defined(__cplusplus)
301  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
302 # else
303 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
304 # endif
305 #endif
306 #ifndef CYTHON_NCP_UNUSED
307 # if CYTHON_COMPILING_IN_CPYTHON
308 # define CYTHON_NCP_UNUSED
309 # else
310 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
311 # endif
312 #endif
313 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
314 #ifdef _MSC_VER
315  #ifndef _MSC_STDINT_H_
316  #if _MSC_VER < 1300
317  typedef unsigned char uint8_t;
318  typedef unsigned int uint32_t;
319  #else
320  typedef unsigned __int8 uint8_t;
321  typedef unsigned __int32 uint32_t;
322  #endif
323  #endif
324 #else
325  #include <stdint.h>
326 #endif
327 #ifndef CYTHON_FALLTHROUGH
328  #if defined(__cplusplus) && __cplusplus >= 201103L
329  #if __has_cpp_attribute(fallthrough)
330  #define CYTHON_FALLTHROUGH [[fallthrough]]
331  #elif __has_cpp_attribute(clang::fallthrough)
332  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
333  #elif __has_cpp_attribute(gnu::fallthrough)
334  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
335  #endif
336  #endif
337  #ifndef CYTHON_FALLTHROUGH
338  #if __has_attribute(fallthrough)
339  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
340  #else
341  #define CYTHON_FALLTHROUGH
342  #endif
343  #endif
344  #if defined(__clang__ ) && defined(__apple_build_version__)
345  #if __apple_build_version__ < 7000000
346  #undef CYTHON_FALLTHROUGH
347  #define CYTHON_FALLTHROUGH
348  #endif
349  #endif
350 #endif
351 
352 #ifndef __cplusplus
353  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
354 #endif
355 #ifndef CYTHON_INLINE
356  #if defined(__clang__)
357  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
358  #else
359  #define CYTHON_INLINE inline
360  #endif
361 #endif
362 template<typename T>
363 void __Pyx_call_destructor(T& x) {
364  x.~T();
365 }
366 template<typename T>
367 class __Pyx_FakeReference {
368  public:
369  __Pyx_FakeReference() : ptr(NULL) { }
370  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
371  T *operator->() { return ptr; }
372  T *operator&() { return ptr; }
373  operator T&() { return *ptr; }
374  template<typename U> bool operator ==(U other) { return *ptr == other; }
375  template<typename U> bool operator !=(U other) { return *ptr != other; }
376  private:
377  T *ptr;
378 };
379 
380 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
381  #define Py_OptimizeFlag 0
382 #endif
383 #define __PYX_BUILD_PY_SSIZE_T "n"
384 #define CYTHON_FORMAT_SSIZE_T "z"
385 #if PY_MAJOR_VERSION < 3
386  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
387  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
388  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
389  #define __Pyx_DefaultClassType PyClass_Type
390 #else
391  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
392 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
393  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
394  PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
395 #else
396  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
397  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
398 #endif
399  #define __Pyx_DefaultClassType PyType_Type
400 #endif
401 #ifndef Py_TPFLAGS_CHECKTYPES
402  #define Py_TPFLAGS_CHECKTYPES 0
403 #endif
404 #ifndef Py_TPFLAGS_HAVE_INDEX
405  #define Py_TPFLAGS_HAVE_INDEX 0
406 #endif
407 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
408  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
409 #endif
410 #ifndef Py_TPFLAGS_HAVE_FINALIZE
411  #define Py_TPFLAGS_HAVE_FINALIZE 0
412 #endif
413 #ifndef METH_STACKLESS
414  #define METH_STACKLESS 0
415 #endif
416 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
417  #ifndef METH_FASTCALL
418  #define METH_FASTCALL 0x80
419  #endif
420  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
421  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
422  Py_ssize_t nargs, PyObject *kwnames);
423 #else
424  #define __Pyx_PyCFunctionFast _PyCFunctionFast
425  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
426 #endif
427 #if CYTHON_FAST_PYCCALL
428 #define __Pyx_PyFastCFunction_Check(func)\
429  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
430 #else
431 #define __Pyx_PyFastCFunction_Check(func) 0
432 #endif
433 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
434  #define PyObject_Malloc(s) PyMem_Malloc(s)
435  #define PyObject_Free(p) PyMem_Free(p)
436  #define PyObject_Realloc(p) PyMem_Realloc(p)
437 #endif
438 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
439  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
440  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
441  #define PyMem_RawFree(p) PyMem_Free(p)
442 #endif
443 #if CYTHON_COMPILING_IN_PYSTON
444  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
445  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
446 #else
447  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
448  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
449 #endif
450 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
451  #define __Pyx_PyThreadState_Current PyThreadState_GET()
452 #elif PY_VERSION_HEX >= 0x03060000
453  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
454 #elif PY_VERSION_HEX >= 0x03000000
455  #define __Pyx_PyThreadState_Current PyThreadState_GET()
456 #else
457  #define __Pyx_PyThreadState_Current _PyThreadState_Current
458 #endif
459 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
460 #include "pythread.h"
461 #define Py_tss_NEEDS_INIT 0
462 typedef int Py_tss_t;
463 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
464  *key = PyThread_create_key();
465  return 0;
466 }
467 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
468  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
469  *key = Py_tss_NEEDS_INIT;
470  return key;
471 }
472 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
473  PyObject_Free(key);
474 }
475 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
476  return *key != Py_tss_NEEDS_INIT;
477 }
478 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
479  PyThread_delete_key(*key);
480  *key = Py_tss_NEEDS_INIT;
481 }
482 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
483  return PyThread_set_key_value(*key, value);
484 }
485 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
486  return PyThread_get_key_value(*key);
487 }
488 #endif
489 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
490 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
491 #else
492 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
493 #endif
494 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
495  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
496  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
497 #else
498  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
499  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
500 #endif
501 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
502 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
503 #else
504 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
505 #endif
506 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
507  #define CYTHON_PEP393_ENABLED 1
508  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
509  0 : _PyUnicode_Ready((PyObject *)(op)))
510  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
511  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
512  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
513  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
514  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
515  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
516  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
517  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
518  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
519  #else
520  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
521  #endif
522 #else
523  #define CYTHON_PEP393_ENABLED 0
524  #define PyUnicode_1BYTE_KIND 1
525  #define PyUnicode_2BYTE_KIND 2
526  #define PyUnicode_4BYTE_KIND 4
527  #define __Pyx_PyUnicode_READY(op) (0)
528  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
529  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
530  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
531  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
532  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
533  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
534  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
535  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
536 #endif
537 #if CYTHON_COMPILING_IN_PYPY
538  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
539  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
540 #else
541  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
542  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
543  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
544 #endif
545 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
546  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
547 #endif
548 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
549  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
550 #endif
551 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
552  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
553 #endif
554 #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))
555 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
556 #if PY_MAJOR_VERSION >= 3
557  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
558 #else
559  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
560 #endif
561 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
562  #define PyObject_ASCII(o) PyObject_Repr(o)
563 #endif
564 #if PY_MAJOR_VERSION >= 3
565  #define PyBaseString_Type PyUnicode_Type
566  #define PyStringObject PyUnicodeObject
567  #define PyString_Type PyUnicode_Type
568  #define PyString_Check PyUnicode_Check
569  #define PyString_CheckExact PyUnicode_CheckExact
570 #ifndef PyObject_Unicode
571  #define PyObject_Unicode PyObject_Str
572 #endif
573 #endif
574 #if PY_MAJOR_VERSION >= 3
575  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
576  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
577 #else
578  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
579  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
580 #endif
581 #ifndef PySet_CheckExact
582  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
583 #endif
584 #if PY_VERSION_HEX >= 0x030900A4
585  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
586  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
587 #else
588  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
589  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
590 #endif
591 #if CYTHON_ASSUME_SAFE_MACROS
592  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
593 #else
594  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
595 #endif
596 #if PY_MAJOR_VERSION >= 3
597  #define PyIntObject PyLongObject
598  #define PyInt_Type PyLong_Type
599  #define PyInt_Check(op) PyLong_Check(op)
600  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
601  #define PyInt_FromString PyLong_FromString
602  #define PyInt_FromUnicode PyLong_FromUnicode
603  #define PyInt_FromLong PyLong_FromLong
604  #define PyInt_FromSize_t PyLong_FromSize_t
605  #define PyInt_FromSsize_t PyLong_FromSsize_t
606  #define PyInt_AsLong PyLong_AsLong
607  #define PyInt_AS_LONG PyLong_AS_LONG
608  #define PyInt_AsSsize_t PyLong_AsSsize_t
609  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
610  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
611  #define PyNumber_Int PyNumber_Long
612 #endif
613 #if PY_MAJOR_VERSION >= 3
614  #define PyBoolObject PyLongObject
615 #endif
616 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
617  #ifndef PyUnicode_InternFromString
618  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
619  #endif
620 #endif
621 #if PY_VERSION_HEX < 0x030200A4
622  typedef long Py_hash_t;
623  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
624  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
625 #else
626  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
627  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
628 #endif
629 #if PY_MAJOR_VERSION >= 3
630  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
631 #else
632  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
633 #endif
634 #if CYTHON_USE_ASYNC_SLOTS
635  #if PY_VERSION_HEX >= 0x030500B1
636  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
637  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
638  #else
639  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
640  #endif
641 #else
642  #define __Pyx_PyType_AsAsync(obj) NULL
643 #endif
644 #ifndef __Pyx_PyAsyncMethodsStruct
645  typedef struct {
646  unaryfunc am_await;
647  unaryfunc am_aiter;
648  unaryfunc am_anext;
649  } __Pyx_PyAsyncMethodsStruct;
650 #endif
651 
652 #if defined(WIN32) || defined(MS_WINDOWS)
653  #define _USE_MATH_DEFINES
654 #endif
655 #include <math.h>
656 #ifdef NAN
657 #define __PYX_NAN() ((float) NAN)
658 #else
659 static CYTHON_INLINE float __PYX_NAN() {
660  float value;
661  memset(&value, 0xFF, sizeof(value));
662  return value;
663 }
664 #endif
665 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
666 #define __Pyx_truncl trunc
667 #else
668 #define __Pyx_truncl truncl
669 #endif
670 
671 #define __PYX_MARK_ERR_POS(f_index, lineno) \
672  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
673 #define __PYX_ERR(f_index, lineno, Ln_error) \
674  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
675 
676 #ifndef __PYX_EXTERN_C
677  #ifdef __cplusplus
678  #define __PYX_EXTERN_C extern "C"
679  #else
680  #define __PYX_EXTERN_C extern
681  #endif
682 #endif
683 
684 #define __PYX_HAVE__PyClical
685 #define __PYX_HAVE_API__PyClical
686 /* Early includes */
687 #include "ios"
688 #include "new"
689 #include "stdexcept"
690 #include "typeinfo"
691 #include <vector>
692 #include "PyClical.h"
693 #include <string.h>
694 #include <string>
695 #ifdef _OPENMP
696 #include <omp.h>
697 #endif /* _OPENMP */
698 
699 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
700 #define CYTHON_WITHOUT_ASSERTIONS
701 #endif
702 
703 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
704  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
705 
706 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
707 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
708 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
709 #define __PYX_DEFAULT_STRING_ENCODING ""
710 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
711 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
712 #define __Pyx_uchar_cast(c) ((unsigned char)c)
713 #define __Pyx_long_cast(x) ((long)x)
714 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
715  (sizeof(type) < sizeof(Py_ssize_t)) ||\
716  (sizeof(type) > sizeof(Py_ssize_t) &&\
717  likely(v < (type)PY_SSIZE_T_MAX ||\
718  v == (type)PY_SSIZE_T_MAX) &&\
719  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
720  v == (type)PY_SSIZE_T_MIN))) ||\
721  (sizeof(type) == sizeof(Py_ssize_t) &&\
722  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
723  v == (type)PY_SSIZE_T_MAX))) )
724 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
725  return (size_t) i < (size_t) limit;
726 }
727 #if defined (__cplusplus) && __cplusplus >= 201103L
728  #include <cstdlib>
729  #define __Pyx_sst_abs(value) std::abs(value)
730 #elif SIZEOF_INT >= SIZEOF_SIZE_T
731  #define __Pyx_sst_abs(value) abs(value)
732 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
733  #define __Pyx_sst_abs(value) labs(value)
734 #elif defined (_MSC_VER)
735  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
736 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
737  #define __Pyx_sst_abs(value) llabs(value)
738 #elif defined (__GNUC__)
739  #define __Pyx_sst_abs(value) __builtin_llabs(value)
740 #else
741  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
742 #endif
743 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
744 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
745 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
746 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
747 #define __Pyx_PyBytes_FromString PyBytes_FromString
748 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
749 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
750 #if PY_MAJOR_VERSION < 3
751  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
752  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
753 #else
754  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
755  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
756 #endif
757 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
758 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
759 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
760 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
761 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
762 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
763 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
764 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
765 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
766 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
767 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
768 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
769 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
770 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
771 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
772 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
773 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
774  const Py_UNICODE *u_end = u;
775  while (*u_end++) ;
776  return (size_t)(u_end - u - 1);
777 }
778 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
779 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
780 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
781 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
782 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
783 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
784 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
785 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
786 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
787 #define __Pyx_PySequence_Tuple(obj)\
788  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
789 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
790 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
791 #if CYTHON_ASSUME_SAFE_MACROS
792 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
793 #else
794 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
795 #endif
796 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
797 #if PY_MAJOR_VERSION >= 3
798 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
799 #else
800 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
801 #endif
802 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
803 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
804 static int __Pyx_sys_getdefaultencoding_not_ascii;
805 static int __Pyx_init_sys_getdefaultencoding_params(void) {
806  PyObject* sys;
807  PyObject* default_encoding = NULL;
808  PyObject* ascii_chars_u = NULL;
809  PyObject* ascii_chars_b = NULL;
810  const char* default_encoding_c;
811  sys = PyImport_ImportModule("sys");
812  if (!sys) goto bad;
813  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
814  Py_DECREF(sys);
815  if (!default_encoding) goto bad;
816  default_encoding_c = PyBytes_AsString(default_encoding);
817  if (!default_encoding_c) goto bad;
818  if (strcmp(default_encoding_c, "ascii") == 0) {
819  __Pyx_sys_getdefaultencoding_not_ascii = 0;
820  } else {
821  char ascii_chars[128];
822  int c;
823  for (c = 0; c < 128; c++) {
824  ascii_chars[c] = c;
825  }
826  __Pyx_sys_getdefaultencoding_not_ascii = 1;
827  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
828  if (!ascii_chars_u) goto bad;
829  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
830  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
831  PyErr_Format(
832  PyExc_ValueError,
833  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
834  default_encoding_c);
835  goto bad;
836  }
837  Py_DECREF(ascii_chars_u);
838  Py_DECREF(ascii_chars_b);
839  }
840  Py_DECREF(default_encoding);
841  return 0;
842 bad:
843  Py_XDECREF(default_encoding);
844  Py_XDECREF(ascii_chars_u);
845  Py_XDECREF(ascii_chars_b);
846  return -1;
847 }
848 #endif
849 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
850 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
851 #else
852 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
853 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
854 static char* __PYX_DEFAULT_STRING_ENCODING;
855 static int __Pyx_init_sys_getdefaultencoding_params(void) {
856  PyObject* sys;
857  PyObject* default_encoding = NULL;
858  char* default_encoding_c;
859  sys = PyImport_ImportModule("sys");
860  if (!sys) goto bad;
861  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
862  Py_DECREF(sys);
863  if (!default_encoding) goto bad;
864  default_encoding_c = PyBytes_AsString(default_encoding);
865  if (!default_encoding_c) goto bad;
866  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
867  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
868  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
869  Py_DECREF(default_encoding);
870  return 0;
871 bad:
872  Py_XDECREF(default_encoding);
873  return -1;
874 }
875 #endif
876 #endif
877 
878 
879 /* Test for GCC > 2.95 */
880 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
881  #define likely(x) __builtin_expect(!!(x), 1)
882  #define unlikely(x) __builtin_expect(!!(x), 0)
883 #else /* !__GNUC__ or GCC < 2.95 */
884  #define likely(x) (x)
885  #define unlikely(x) (x)
886 #endif /* __GNUC__ */
887 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
888 
889 static PyObject *__pyx_m = NULL;
890 static PyObject *__pyx_d;
891 static PyObject *__pyx_b;
892 static PyObject *__pyx_cython_runtime = NULL;
893 static PyObject *__pyx_empty_tuple;
894 static PyObject *__pyx_empty_bytes;
895 static PyObject *__pyx_empty_unicode;
896 static int __pyx_lineno;
897 static int __pyx_clineno = 0;
898 static const char * __pyx_cfilenm= __FILE__;
899 static const char *__pyx_filename;
900 
901 
902 static const char *__pyx_f[] = {
903  "PyClical.pyx",
904  "stringsource",
905 };
906 
907 /*--- Type declarations ---*/
908 struct __pyx_obj_8PyClical_index_set;
909 struct __pyx_obj_8PyClical_clifford;
910 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
911 struct __pyx_opt_args_8PyClical_sqrt;
912 struct __pyx_opt_args_8PyClical_log;
913 struct __pyx_opt_args_8PyClical_cos;
914 struct __pyx_opt_args_8PyClical_acos;
915 struct __pyx_opt_args_8PyClical_acosh;
916 struct __pyx_opt_args_8PyClical_sin;
917 struct __pyx_opt_args_8PyClical_asin;
918 struct __pyx_opt_args_8PyClical_asinh;
919 struct __pyx_opt_args_8PyClical_tan;
920 struct __pyx_opt_args_8PyClical_atan;
921 struct __pyx_opt_args_8PyClical_atanh;
922 struct __pyx_opt_args_8PyClical_random_clifford;
923 
924 /* "PyClical.pyx":1541
925  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
926  *
927  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
928  * """
929  * Square root of multivector with optional complexifier.
930  */
931 struct __pyx_opt_args_8PyClical_sqrt {
932  int __pyx_n;
933  PyObject *i;
934 };
935 
936 /* "PyClical.pyx":1578
937  * return clifford().wrap( glucat.exp(toClifford(obj)) )
938  *
939  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
940  * """
941  * Natural logarithm of multivector with optional complexifier.
942  */
943 struct __pyx_opt_args_8PyClical_log {
944  int __pyx_n;
945  PyObject *i;
946 };
947 
948 /* "PyClical.pyx":1601
949  * return clifford().wrap( glucat.log(toClifford(obj)) )
950  *
951  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
952  * """
953  * Cosine of multivector with optional complexifier.
954  */
955 struct __pyx_opt_args_8PyClical_cos {
956  int __pyx_n;
957  PyObject *i;
958 };
959 
960 /* "PyClical.pyx":1618
961  * return clifford().wrap( glucat.cos(toClifford(obj)) )
962  *
963  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
964  * """
965  * Inverse cosine of multivector with optional complexifier.
966  */
967 struct __pyx_opt_args_8PyClical_acos {
968  int __pyx_n;
969  PyObject *i;
970 };
971 
972 /* "PyClical.pyx":1655
973  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
974  *
975  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
976  * """
977  * Inverse hyperbolic cosine of multivector with optional complexifier.
978  */
979 struct __pyx_opt_args_8PyClical_acosh {
980  int __pyx_n;
981  PyObject *i;
982 };
983 
984 /* "PyClical.pyx":1678
985  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
986  *
987  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
988  * """
989  * Sine of multivector with optional complexifier.
990  */
991 struct __pyx_opt_args_8PyClical_sin {
992  int __pyx_n;
993  PyObject *i;
994 };
995 
996 /* "PyClical.pyx":1697
997  * return clifford().wrap( glucat.sin(toClifford(obj)) )
998  *
999  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
1000  * """
1001  * Inverse sine of multivector with optional complexifier.
1002  */
1003 struct __pyx_opt_args_8PyClical_asin {
1004  int __pyx_n;
1005  PyObject *i;
1006 };
1007 
1008 /* "PyClical.pyx":1732
1009  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
1010  *
1011  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
1012  * """
1013  * Inverse hyperbolic sine of multivector with optional complexifier.
1014  */
1015 struct __pyx_opt_args_8PyClical_asinh {
1016  int __pyx_n;
1017  PyObject *i;
1018 };
1019 
1020 /* "PyClical.pyx":1751
1021  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
1022  *
1023  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
1024  * """
1025  * Tangent of multivector with optional complexifier.
1026  */
1027 struct __pyx_opt_args_8PyClical_tan {
1028  int __pyx_n;
1029  PyObject *i;
1030 };
1031 
1032 /* "PyClical.pyx":1768
1033  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1034  *
1035  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1036  * """
1037  * Inverse tangent of multivector with optional complexifier.
1038  */
1039 struct __pyx_opt_args_8PyClical_atan {
1040  int __pyx_n;
1041  PyObject *i;
1042 };
1043 
1044 /* "PyClical.pyx":1797
1045  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1046  *
1047  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1048  * """
1049  * Inverse hyperbolic tangent of multivector with optional complexifier.
1050  */
1051 struct __pyx_opt_args_8PyClical_atanh {
1052  int __pyx_n;
1053  PyObject *i;
1054 };
1055 
1056 /* "PyClical.pyx":1814
1057  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1058  *
1059  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1060  * """
1061  * Random multivector within a frame.
1062  */
1063 struct __pyx_opt_args_8PyClical_random_clifford {
1064  int __pyx_n;
1065  PyObject *fill;
1066 };
1067 
1068 /* "PyClical.pyx":38
1069  *
1070  * # Forward reference
1071  * cdef class index_set # <<<<<<<<<<<<<<
1072  *
1073  * cdef inline IndexSet toIndexSet(obj):
1074  */
1075 struct __pyx_obj_8PyClical_index_set {
1076  PyObject_HEAD
1077  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1078  IndexSet *instance;
1079 };
1080 
1081 
1082 /* "PyClical.pyx":532
1083  *
1084  * # Forward reference.
1085  * cdef class clifford # <<<<<<<<<<<<<<
1086  *
1087  * cdef inline Clifford toClifford(obj):
1088  */
1089 struct __pyx_obj_8PyClical_clifford {
1090  PyObject_HEAD
1091  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1092  Clifford *instance;
1093 };
1094 
1095 
1096 /* "PyClical.pyx":229
1097  * return self.instance.getitem(idx)
1098  *
1099  * def __iter__(self): # <<<<<<<<<<<<<<
1100  * """
1101  * Iterate over the indices of an index_set.
1102  */
1103 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1104  PyObject_HEAD
1105  PyObject *__pyx_v_idx;
1106  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1107  PyObject *__pyx_t_0;
1108  Py_ssize_t __pyx_t_1;
1109  PyObject *(*__pyx_t_2)(PyObject *);
1110 };
1111 
1112 
1113 
1114 /* "PyClical.pyx":46
1115  * return index_set(obj).instance[0]
1116  *
1117  * cdef class index_set: # <<<<<<<<<<<<<<
1118  * """
1119  * Python class index_set wraps C++ class IndexSet.
1120  */
1121 
1122 struct __pyx_vtabstruct_8PyClical_index_set {
1123  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1124  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1125  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1126 };
1127 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1128 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1129 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1130 
1131 
1132 /* "PyClical.pyx":537
1133  * return clifford(obj).instance[0]
1134  *
1135  * cdef class clifford: # <<<<<<<<<<<<<<
1136  * """
1137  * Python class clifford wraps C++ class Clifford.
1138  */
1139 
1140 struct __pyx_vtabstruct_8PyClical_clifford {
1141  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1142  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1143  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1144 };
1145 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1146 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1147 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1148 
1149 /* --- Runtime support code (head) --- */
1150 /* Refnanny.proto */
1151 #ifndef CYTHON_REFNANNY
1152  #define CYTHON_REFNANNY 0
1153 #endif
1154 #if CYTHON_REFNANNY
1155  typedef struct {
1156  void (*INCREF)(void*, PyObject*, int);
1157  void (*DECREF)(void*, PyObject*, int);
1158  void (*GOTREF)(void*, PyObject*, int);
1159  void (*GIVEREF)(void*, PyObject*, int);
1160  void* (*SetupContext)(const char*, int, const char*);
1161  void (*FinishContext)(void**);
1162  } __Pyx_RefNannyAPIStruct;
1163  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1164  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1165  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1166 #ifdef WITH_THREAD
1167  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1168  if (acquire_gil) {\
1169  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1170  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1171  PyGILState_Release(__pyx_gilstate_save);\
1172  } else {\
1173  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1174  }
1175 #else
1176  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1177  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1178 #endif
1179  #define __Pyx_RefNannyFinishContext()\
1180  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1181  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1182  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1183  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1184  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1185  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1186  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1187  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1188  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1189 #else
1190  #define __Pyx_RefNannyDeclarations
1191  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1192  #define __Pyx_RefNannyFinishContext()
1193  #define __Pyx_INCREF(r) Py_INCREF(r)
1194  #define __Pyx_DECREF(r) Py_DECREF(r)
1195  #define __Pyx_GOTREF(r)
1196  #define __Pyx_GIVEREF(r)
1197  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1198  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1199  #define __Pyx_XGOTREF(r)
1200  #define __Pyx_XGIVEREF(r)
1201 #endif
1202 #define __Pyx_XDECREF_SET(r, v) do {\
1203  PyObject *tmp = (PyObject *) r;\
1204  r = v; __Pyx_XDECREF(tmp);\
1205  } while (0)
1206 #define __Pyx_DECREF_SET(r, v) do {\
1207  PyObject *tmp = (PyObject *) r;\
1208  r = v; __Pyx_DECREF(tmp);\
1209  } while (0)
1210 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1211 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1212 
1213 /* PyObjectGetAttrStr.proto */
1214 #if CYTHON_USE_TYPE_SLOTS
1215 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1216 #else
1217 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1218 #endif
1219 
1220 /* GetBuiltinName.proto */
1221 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1222 
1223 /* PyCFunctionFastCall.proto */
1224 #if CYTHON_FAST_PYCCALL
1225 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1226 #else
1227 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1228 #endif
1229 
1230 /* PyFunctionFastCall.proto */
1231 #if CYTHON_FAST_PYCALL
1232 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1233  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1234 #if 1 || PY_VERSION_HEX < 0x030600B1
1235 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1236 #else
1237 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1238 #endif
1239 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1240  (sizeof(char [1 - 2*!(cond)]) - 1)
1241 #ifndef Py_MEMBER_SIZE
1242 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1243 #endif
1244  static size_t __pyx_pyframe_localsplus_offset = 0;
1245  #include "frameobject.h"
1246  #define __Pxy_PyFrame_Initialize_Offsets()\
1247  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1248  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1249  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1250  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1251 #endif
1252 
1253 /* PyObjectCall.proto */
1254 #if CYTHON_COMPILING_IN_CPYTHON
1255 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1256 #else
1257 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1258 #endif
1259 
1260 /* PyObjectCallMethO.proto */
1261 #if CYTHON_COMPILING_IN_CPYTHON
1262 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1263 #endif
1264 
1265 /* PyObjectCallOneArg.proto */
1266 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1267 
1268 /* PyThreadStateGet.proto */
1269 #if CYTHON_FAST_THREAD_STATE
1270 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1271 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1272 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1273 #else
1274 #define __Pyx_PyThreadState_declare
1275 #define __Pyx_PyThreadState_assign
1276 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1277 #endif
1278 
1279 /* PyErrFetchRestore.proto */
1280 #if CYTHON_FAST_THREAD_STATE
1281 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1282 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1283 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1284 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1285 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1286 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1287 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1288 #if CYTHON_COMPILING_IN_CPYTHON
1289 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1290 #else
1291 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1292 #endif
1293 #else
1294 #define __Pyx_PyErr_Clear() PyErr_Clear()
1295 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1296 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1297 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1298 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1299 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1300 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1301 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1302 #endif
1303 
1304 /* WriteUnraisableException.proto */
1305 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1306  int lineno, const char *filename,
1307  int full_traceback, int nogil);
1308 
1309 /* PyDictVersioning.proto */
1310 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1311 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1312 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1313 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1314  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1315  (cache_var) = (value);
1316 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1317  static PY_UINT64_T __pyx_dict_version = 0;\
1318  static PyObject *__pyx_dict_cached_value = NULL;\
1319  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1320  (VAR) = __pyx_dict_cached_value;\
1321  } else {\
1322  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1323  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1324  }\
1325 }
1326 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1327 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1328 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1329 #else
1330 #define __PYX_GET_DICT_VERSION(dict) (0)
1331 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1332 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1333 #endif
1334 
1335 /* PyObjectCallNoArg.proto */
1336 #if CYTHON_COMPILING_IN_CPYTHON
1337 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1338 #else
1339 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1340 #endif
1341 
1342 /* RaiseDoubleKeywords.proto */
1343 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1344 
1345 /* ParseKeywords.proto */
1346 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1347  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1348  const char* function_name);
1349 
1350 /* RaiseArgTupleInvalid.proto */
1351 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1352  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1353 
1354 /* GetModuleGlobalName.proto */
1355 #if CYTHON_USE_DICT_VERSIONS
1356 #define __Pyx_GetModuleGlobalName(var, name) {\
1357  static PY_UINT64_T __pyx_dict_version = 0;\
1358  static PyObject *__pyx_dict_cached_value = NULL;\
1359  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1360  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1361  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1362 }
1363 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1364  PY_UINT64_T __pyx_dict_version;\
1365  PyObject *__pyx_dict_cached_value;\
1366  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1367 }
1368 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1369 #else
1370 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1371 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1372 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1373 #endif
1374 
1375 /* GetTopmostException.proto */
1376 #if CYTHON_USE_EXC_INFO_STACK
1377 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1378 #endif
1379 
1380 /* SaveResetException.proto */
1381 #if CYTHON_FAST_THREAD_STATE
1382 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1383 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1384 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1385 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1386 #else
1387 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1388 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1389 #endif
1390 
1391 /* PyErrExceptionMatches.proto */
1392 #if CYTHON_FAST_THREAD_STATE
1393 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1394 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1395 #else
1396 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1397 #endif
1398 
1399 /* GetException.proto */
1400 #if CYTHON_FAST_THREAD_STATE
1401 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1402 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1403 #else
1404 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1405 #endif
1406 
1407 /* RaiseException.proto */
1408 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1409 
1410 /* PyObjectCall2Args.proto */
1411 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1412 
1413 /* PyIntBinop.proto */
1414 #if !CYTHON_COMPILING_IN_PYPY
1415 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1416 #else
1417 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1418  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1419 #endif
1420 
1421 /* PySequenceContains.proto */
1422 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1423  int result = PySequence_Contains(seq, item);
1424  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1425 }
1426 
1427 /* IncludeCppStringH.proto */
1428 #include <string>
1429 
1430 /* decode_c_string_utf16.proto */
1431 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1432  int byteorder = 0;
1433  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1434 }
1435 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1436  int byteorder = -1;
1437  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1438 }
1439 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1440  int byteorder = 1;
1441  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1442 }
1443 
1444 /* decode_c_bytes.proto */
1445 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
1446  const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
1447  const char* encoding, const char* errors,
1448  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1449 
1450 /* decode_cpp_string.proto */
1451 static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string(
1452  std::string cppstring, Py_ssize_t start, Py_ssize_t stop,
1453  const char* encoding, const char* errors,
1454  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
1455  return __Pyx_decode_c_bytes(
1456  cppstring.data(), cppstring.size(), start, stop, encoding, errors, decode_func);
1457 }
1458 
1459 /* SwapException.proto */
1460 #if CYTHON_FAST_THREAD_STATE
1461 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1462 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1463 #else
1464 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1465 #endif
1466 
1467 /* SetItemInt.proto */
1468 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1469  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1470  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1471  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1472  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1473 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1474 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1475  int is_list, int wraparound, int boundscheck);
1476 
1477 /* ArgTypeTest.proto */
1478 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1479  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1480  __Pyx__ArgTypeTest(obj, type, name, exact))
1481 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1482 
1483 /* Import.proto */
1484 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1485 
1486 /* IncludeStringH.proto */
1487 #include <string.h>
1488 
1489 /* PyObject_GenericGetAttrNoDict.proto */
1490 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1491 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1492 #else
1493 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1494 #endif
1495 
1496 /* PyObject_GenericGetAttr.proto */
1497 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1498 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1499 #else
1500 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1501 #endif
1502 
1503 /* SetVTable.proto */
1504 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1505 
1506 /* PyObjectGetAttrStrNoError.proto */
1507 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
1508 
1509 /* SetupReduce.proto */
1510 static int __Pyx_setup_reduce(PyObject* type_obj);
1511 
1512 /* BytesEquals.proto */
1513 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1514 
1515 /* UnicodeEquals.proto */
1516 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1517 
1518 /* CLineInTraceback.proto */
1519 #ifdef CYTHON_CLINE_IN_TRACEBACK
1520 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1521 #else
1522 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1523 #endif
1524 
1525 /* CodeObjectCache.proto */
1526 typedef struct {
1527  PyCodeObject* code_object;
1528  int code_line;
1529 } __Pyx_CodeObjectCacheEntry;
1530 struct __Pyx_CodeObjectCache {
1531  int count;
1532  int max_count;
1533  __Pyx_CodeObjectCacheEntry* entries;
1534 };
1535 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1536 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1537 static PyCodeObject *__pyx_find_code_object(int code_line);
1538 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1539 
1540 /* AddTraceback.proto */
1541 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1542  int py_line, const char *filename);
1543 
1544 /* CppExceptionConversion.proto */
1545 #ifndef __Pyx_CppExn2PyErr
1546 #include <new>
1547 #include <typeinfo>
1548 #include <stdexcept>
1549 #include <ios>
1550 static void __Pyx_CppExn2PyErr() {
1551  try {
1552  if (PyErr_Occurred())
1553  ; // let the latest Python exn pass through and ignore the current one
1554  else
1555  throw;
1556  } catch (const std::bad_alloc& exn) {
1557  PyErr_SetString(PyExc_MemoryError, exn.what());
1558  } catch (const std::bad_cast& exn) {
1559  PyErr_SetString(PyExc_TypeError, exn.what());
1560  } catch (const std::bad_typeid& exn) {
1561  PyErr_SetString(PyExc_TypeError, exn.what());
1562  } catch (const std::domain_error& exn) {
1563  PyErr_SetString(PyExc_ValueError, exn.what());
1564  } catch (const std::invalid_argument& exn) {
1565  PyErr_SetString(PyExc_ValueError, exn.what());
1566  } catch (const std::ios_base::failure& exn) {
1567  PyErr_SetString(PyExc_IOError, exn.what());
1568  } catch (const std::out_of_range& exn) {
1569  PyErr_SetString(PyExc_IndexError, exn.what());
1570  } catch (const std::overflow_error& exn) {
1571  PyErr_SetString(PyExc_OverflowError, exn.what());
1572  } catch (const std::range_error& exn) {
1573  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1574  } catch (const std::underflow_error& exn) {
1575  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1576  } catch (const std::exception& exn) {
1577  PyErr_SetString(PyExc_RuntimeError, exn.what());
1578  }
1579  catch (...)
1580  {
1581  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1582  }
1583 }
1584 #endif
1585 
1586 /* CIntToPy.proto */
1587 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1588 
1589 /* CIntFromPy.proto */
1590 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1591 
1592 /* CIntToPy.proto */
1593 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1594 
1595 /* CIntFromPy.proto */
1596 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1597 
1598 /* FastTypeChecks.proto */
1599 #if CYTHON_COMPILING_IN_CPYTHON
1600 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1601 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1602 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1603 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1604 #else
1605 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1606 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1607 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1608 #endif
1609 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1610 
1611 /* FetchCommonType.proto */
1612 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1613 
1614 /* PyObjectGetMethod.proto */
1615 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1616 
1617 /* PyObjectCallMethod1.proto */
1618 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1619 
1620 /* CoroutineBase.proto */
1621 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1622 #if CYTHON_USE_EXC_INFO_STACK
1623 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1624 #else
1625 typedef struct {
1626  PyObject *exc_type;
1627  PyObject *exc_value;
1628  PyObject *exc_traceback;
1629 } __Pyx_ExcInfoStruct;
1630 #endif
1631 typedef struct {
1632  PyObject_HEAD
1633  __pyx_coroutine_body_t body;
1634  PyObject *closure;
1635  __Pyx_ExcInfoStruct gi_exc_state;
1636  PyObject *gi_weakreflist;
1637  PyObject *classobj;
1638  PyObject *yieldfrom;
1639  PyObject *gi_name;
1640  PyObject *gi_qualname;
1641  PyObject *gi_modulename;
1642  PyObject *gi_code;
1643  int resume_label;
1644  char is_running;
1645 } __pyx_CoroutineObject;
1646 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1647  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1648  PyObject *name, PyObject *qualname, PyObject *module_name);
1649 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1650  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1651  PyObject *name, PyObject *qualname, PyObject *module_name);
1652 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1653 static int __Pyx_Coroutine_clear(PyObject *self);
1654 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1655 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1656 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1657 #if CYTHON_USE_EXC_INFO_STACK
1658 #define __Pyx_Coroutine_SwapException(self)
1659 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1660 #else
1661 #define __Pyx_Coroutine_SwapException(self) {\
1662  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1663  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1664  }
1665 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1666  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1667  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1668  }
1669 #endif
1670 #if CYTHON_FAST_THREAD_STATE
1671 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1672  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1673 #else
1674 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1675  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1676 #endif
1677 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1678 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1679 
1680 /* PatchModuleWithCoroutine.proto */
1681 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1682 
1683 /* PatchGeneratorABC.proto */
1684 static int __Pyx_patch_abc(void);
1685 
1686 /* Generator.proto */
1687 #define __Pyx_Generator_USED
1688 static PyTypeObject *__pyx_GeneratorType = 0;
1689 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1690 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1691  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1692 static PyObject *__Pyx_Generator_Next(PyObject *self);
1693 static int __pyx_Generator_init(void);
1694 
1695 /* CheckBinaryVersion.proto */
1696 static int __Pyx_check_binary_version(void);
1697 
1698 /* InitStrings.proto */
1699 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1700 
1701 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1702 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1703 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1704 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1705 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1706 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1707 
1708 /* Module declarations from 'libcpp.vector' */
1709 
1710 /* Module declarations from 'glucat' */
1711 
1712 /* Module declarations from 'libc.string' */
1713 
1714 /* Module declarations from 'libcpp.string' */
1715 
1716 /* Module declarations from 'PyClical' */
1717 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1718 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1719 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1720 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1721 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1722 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1723 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1724 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1725 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1726 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1727 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1728 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1729 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1730 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1731 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1732 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1733 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1734 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1735 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1736 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1737 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1738 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1739 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1740 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1741 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1742 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1743 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1744 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1745 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1746 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1747 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1748 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1749 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1750 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1751 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1752 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1753 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1754 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1755 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1756 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1757 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1758 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*/
1759 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1760 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1761 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1762 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/
1763 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/
1764 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/
1765 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/
1766 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/
1767 #define __Pyx_MODULE_NAME "PyClical"
1768 extern int __pyx_module_is_main_PyClical;
1769 int __pyx_module_is_main_PyClical = 0;
1770 
1771 /* Implementation of 'PyClical' */
1772 static PyObject *__pyx_builtin_IndexError;
1773 static PyObject *__pyx_builtin_RuntimeError;
1774 static PyObject *__pyx_builtin_TypeError;
1775 static PyObject *__pyx_builtin_ValueError;
1776 static PyObject *__pyx_builtin_NotImplemented;
1777 static PyObject *__pyx_builtin_range;
1778 static PyObject *__pyx_builtin_xrange;
1779 static const char __pyx_k_[] = ".";
1780 static const char __pyx_k_e[] = "e";
1781 static const char __pyx_k_i[] = "i";
1782 static const char __pyx_k_m[] = "m";
1783 static const char __pyx_k_p[] = "p";
1784 static const char __pyx_k_q[] = "q";
1785 static const char __pyx_k__2[] = " ";
1786 static const char __pyx_k__5[] = ":";
1787 static const char __pyx_k__6[] = "\n\t";
1788 static const char __pyx_k__7[] = " (";
1789 static const char __pyx_k__8[] = ", ";
1790 static const char __pyx_k__9[] = ").";
1791 static const char __pyx_k_cl[] = "cl";
1792 static const char __pyx_k_pi[] = "pi";
1793 static const char __pyx_k_abc[] = "abc";
1794 static const char __pyx_k_cos[] = "cos";
1795 static const char __pyx_k_exp[] = "exp";
1796 static const char __pyx_k_frm[] = "frm";
1797 static const char __pyx_k_inv[] = "inv";
1798 static const char __pyx_k_ist[] = "ist";
1799 static const char __pyx_k_ixt[] = "ixt";
1800 static const char __pyx_k_lhs[] = "lhs";
1801 static const char __pyx_k_log[] = "log";
1802 static const char __pyx_k_max[] = "max";
1803 static const char __pyx_k_min[] = "min";
1804 static const char __pyx_k_obj[] = "obj";
1805 static const char __pyx_k_odd[] = "odd";
1806 static const char __pyx_k_pow[] = "pow";
1807 static const char __pyx_k_rhs[] = "rhs";
1808 static const char __pyx_k_sin[] = "sin";
1809 static const char __pyx_k_tan[] = "tan";
1810 static const char __pyx_k_tau[] = "tau";
1811 static const char __pyx_k_Real[] = "Real";
1812 static const char __pyx_k_acos[] = "acos";
1813 static const char __pyx_k_args[] = "args";
1814 static const char __pyx_k_asin[] = "asin";
1815 static const char __pyx_k_atan[] = "atan";
1816 static const char __pyx_k_conj[] = "conj";
1817 static const char __pyx_k_copy[] = "copy";
1818 static const char __pyx_k_cosh[] = "cosh";
1819 static const char __pyx_k_even[] = "even";
1820 static const char __pyx_k_fill[] = "fill";
1821 static const char __pyx_k_from[] = " from ";
1822 static const char __pyx_k_iter[] = "__iter__";
1823 static const char __pyx_k_main[] = "__main__";
1824 static const char __pyx_k_math[] = "math";
1825 static const char __pyx_k_name[] = "__name__";
1826 static const char __pyx_k_norm[] = "norm";
1827 static const char __pyx_k_pure[] = "pure";
1828 static const char __pyx_k_quad[] = "quad";
1829 static const char __pyx_k_send[] = "send";
1830 static const char __pyx_k_sinh[] = "sinh";
1831 static const char __pyx_k_sqrt[] = "sqrt";
1832 static const char __pyx_k_tanh[] = "tanh";
1833 static const char __pyx_k_test[] = "_test";
1834 static const char __pyx_k_0_8_4[] = "0.8.4";
1835 static const char __pyx_k_UTF_8[] = "UTF-8";
1836 static const char __pyx_k_acosh[] = "acosh";
1837 static const char __pyx_k_asinh[] = "asinh";
1838 static const char __pyx_k_atanh[] = "atanh";
1839 static const char __pyx_k_close[] = "close";
1840 static const char __pyx_k_grade[] = "grade";
1841 static const char __pyx_k_istpq[] = "istpq";
1842 static const char __pyx_k_nbar3[] = "nbar3";
1843 static const char __pyx_k_ninf3[] = "ninf3";
1844 static const char __pyx_k_other[] = "other";
1845 static const char __pyx_k_range[] = "range";
1846 static const char __pyx_k_throw[] = "throw";
1847 static const char __pyx_k_using[] = " using (";
1848 static const char __pyx_k_value[] = " value ";
1849 static const char __pyx_k_encode[] = "encode";
1850 static const char __pyx_k_import[] = "__import__";
1851 static const char __pyx_k_reduce[] = "__reduce__";
1852 static const char __pyx_k_scalar[] = "scalar";
1853 static const char __pyx_k_test_2[] = "__test__";
1854 static const char __pyx_k_xrange[] = "xrange";
1855 static const char __pyx_k_doctest[] = "doctest";
1856 static const char __pyx_k_invalid[] = " invalid ";
1857 static const char __pyx_k_numbers[] = "numbers";
1858 static const char __pyx_k_reverse[] = "reverse";
1859 static const char __pyx_k_testmod[] = "testmod";
1860 static const char __pyx_k_version[] = "__version__";
1861 static const char __pyx_k_Integral[] = "Integral";
1862 static const char __pyx_k_PyClical[] = "PyClical";
1863 static const char __pyx_k_Sequence[] = "Sequence";
1864 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1865 static const char __pyx_k_clifford[] = "clifford";
1866 static const char __pyx_k_getstate[] = "__getstate__";
1867 static const char __pyx_k_involute[] = "involute";
1868 static const char __pyx_k_setstate[] = "__setstate__";
1869 static const char __pyx_k_to_frame[] = " to frame ";
1870 static const char __pyx_k_TypeError[] = "TypeError";
1871 static const char __pyx_k_index_set[] = "index_set";
1872 static const char __pyx_k_outer_pow[] = "outer_pow";
1873 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1874 static const char __pyx_k_IndexError[] = "IndexError";
1875 static const char __pyx_k_ValueError[] = "ValueError";
1876 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1877 static const char __pyx_k_collections[] = "collections";
1878 static const char __pyx_k_e_line_1886[] = "e (line 1886)";
1879 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1880 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1881 static const char __pyx_k_abs_line_1472[] = "abs (line 1472)";
1882 static const char __pyx_k_cos_line_1601[] = "cos (line 1601)";
1883 static const char __pyx_k_exp_line_1564[] = "exp (line 1564)";
1884 static const char __pyx_k_inv_line_1328[] = "inv (line 1328)";
1885 static const char __pyx_k_log_line_1578[] = "log (line 1578)";
1886 static const char __pyx_k_odd_line_1396[] = "odd (line 1396)";
1887 static const char __pyx_k_pow_line_1493[] = "pow (line 1493)";
1888 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1889 static const char __pyx_k_sin_line_1678[] = "sin (line 1678)";
1890 static const char __pyx_k_tan_line_1751[] = "tan (line 1751)";
1891 static const char __pyx_k_using_invalid[] = " using invalid ";
1892 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1893 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1894 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1895 static const char __pyx_k_acos_line_1618[] = "acos (line 1618)";
1896 static const char __pyx_k_agc3_line_1843[] = "agc3 (line 1843)";
1897 static const char __pyx_k_asin_line_1697[] = "asin (line 1697)";
1898 static const char __pyx_k_atan_line_1768[] = "atan (line 1768)";
1899 static const char __pyx_k_cga3_line_1823[] = "cga3 (line 1823)";
1900 static const char __pyx_k_conj_line_1435[] = "conj (line 1435)";
1901 static const char __pyx_k_cosh_line_1639[] = "cosh (line 1639)";
1902 static const char __pyx_k_even_line_1387[] = "even (line 1387)";
1903 static const char __pyx_k_imag_line_1365[] = "imag (line 1365)";
1904 static const char __pyx_k_invalid_string[] = " invalid string ";
1905 static const char __pyx_k_norm_line_1461[] = "norm (line 1461)";
1906 static const char __pyx_k_pure_line_1376[] = "pure (line 1376)";
1907 static const char __pyx_k_quad_line_1450[] = "quad (line 1450)";
1908 static const char __pyx_k_real_line_1354[] = "real (line 1354)";
1909 static const char __pyx_k_scalar_epsilon[] = "scalar_epsilon";
1910 static const char __pyx_k_sinh_line_1718[] = "sinh (line 1718)";
1911 static const char __pyx_k_sqrt_line_1541[] = "sqrt (line 1541)";
1912 static const char __pyx_k_tanh_line_1785[] = "tanh (line 1785)";
1913 static const char __pyx_k_acosh_line_1655[] = "acosh (line 1655)";
1914 static const char __pyx_k_asinh_line_1732[] = "asinh (line 1732)";
1915 static const char __pyx_k_atanh_line_1797[] = "atanh (line 1797)";
1916 static const char __pyx_k_istpq_line_1899[] = "istpq (line 1899)";
1917 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1918 static const char __pyx_k_compare_line_492[] = "compare (line 492)";
1919 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1920 static const char __pyx_k_max_pos_line_513[] = "max_pos (line 513)";
1921 static const char __pyx_k_min_neg_line_504[] = "min_neg (line 504)";
1922 static const char __pyx_k_scalar_line_1343[] = "scalar (line 1343)";
1923 static const char __pyx_k_cga3std_line_1832[] = "cga3std (line 1832)";
1924 static const char __pyx_k_max_abs_line_1481[] = "max_abs (line 1481)";
1925 static const char __pyx_k_reverse_line_1420[] = "reverse (line 1420)";
1926 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1927 static const char __pyx_k_involute_line_1405[] = "involute (line 1405)";
1928 static const char __pyx_k_outer_pow_line_1517[] = "outer_pow (line 1517)";
1929 static const char __pyx_k_clifford_inv_line_926[] = "clifford.inv (line 926)";
1930 static const char __pyx_k_clifford_pow_line_980[] = "clifford.pow (line 980)";
1931 static const char __pyx_k_clifford_abs_line_1175[] = "clifford.abs (line 1175)";
1932 static const char __pyx_k_clifford_copy_line_556[] = "clifford.copy (line 556)";
1933 static const char __pyx_k_clifford_odd_line_1070[] = "clifford.odd (line 1070)";
1934 static const char __pyx_k_complexifier_line_1526[] = "complexifier (line 1526)";
1935 static const char __pyx_k_index_set_copy_line_65[] = "index_set.copy (line 65)";
1936 static const char __pyx_k_index_set_max_line_351[] = "index_set.max (line 351)";
1937 static const char __pyx_k_index_set_min_line_342[] = "index_set.min (line 342)";
1938 static const char __pyx_k_clifford_conj_line_1138[] = "clifford.conj (line 1138)";
1939 static const char __pyx_k_clifford_even_line_1061[] = "clifford.even (line 1061)";
1940 static const char __pyx_k_clifford_norm_line_1164[] = "clifford.norm (line 1164)";
1941 static const char __pyx_k_clifford_pure_line_1050[] = "clifford.pure (line 1050)";
1942 static const char __pyx_k_clifford_quad_line_1153[] = "clifford.quad (line 1153)";
1943 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ";
1944 static const char __pyx_k_clifford___or___line_939[] = "clifford.__or__ (line 939)";
1945 static const char __pyx_k_clifford_frame_line_1215[] = "clifford.frame (line 1215)";
1946 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1947 static const char __pyx_k_clifford_isnan_line_1206[] = "clifford.isnan (line 1206)";
1948 static const char __pyx_k_index_set_count_line_315[] = "index_set.count (line 315)";
1949 static const char __pyx_k_clifford___add___line_740[] = "clifford.__add__ (line 740)";
1950 static const char __pyx_k_clifford___and___line_836[] = "clifford.__and__ (line 836)";
1951 static const char __pyx_k_clifford___ior___line_950[] = "clifford.__ior__ (line 950)";
1952 static const char __pyx_k_clifford___mod___line_806[] = "clifford.__mod__ (line 806)";
1953 static const char __pyx_k_clifford___mul___line_780[] = "clifford.__mul__ (line 780)";
1954 static const char __pyx_k_clifford___neg___line_722[] = "clifford.__neg__ (line 722)";
1955 static const char __pyx_k_clifford___pos___line_731[] = "clifford.__pos__ (line 731)";
1956 static const char __pyx_k_clifford___pow___line_961[] = "clifford.__pow__ (line 961)";
1957 static const char __pyx_k_clifford___sub___line_760[] = "clifford.__sub__ (line 760)";
1958 static const char __pyx_k_clifford___xor___line_866[] = "clifford.__xor__ (line 866)";
1959 static const char __pyx_k_clifford_reframe_line_649[] = "clifford.reframe (line 649)";
1960 static const char __pyx_k_clifford_scalar_line_1039[] = "clifford.scalar (line 1039)";
1961 static const char __pyx_k_index_set___or___line_293[] = "index_set.__or__ (line 293)";
1962 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1963 static const char __pyx_k_random_clifford_line_1814[] = "random_clifford (line 1814)";
1964 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1965 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ";
1966 static const char __pyx_k_clifford___iadd___line_751[] = "clifford.__iadd__ (line 751)";
1967 static const char __pyx_k_clifford___iand___line_851[] = "clifford.__iand__ (line 851)";
1968 static const char __pyx_k_clifford___idiv___line_911[] = "clifford.__idiv__ (line 911)";
1969 static const char __pyx_k_clifford___imod___line_821[] = "clifford.__imod__ (line 821)";
1970 static const char __pyx_k_clifford___imul___line_793[] = "clifford.__imul__ (line 793)";
1971 static const char __pyx_k_clifford___isub___line_771[] = "clifford.__isub__ (line 771)";
1972 static const char __pyx_k_clifford___iter___line_638[] = "clifford.__iter__ (line 638)";
1973 static const char __pyx_k_clifford___ixor___line_881[] = "clifford.__ixor__ (line 881)";
1974 static const char __pyx_k_clifford___str___line_1235[] = "clifford.__str__ (line 1235)";
1975 static const char __pyx_k_clifford_max_abs_line_1184[] = "clifford.max_abs (line 1184)";
1976 static const char __pyx_k_clifford_reverse_line_1123[] = "clifford.reverse (line 1123)";
1977 static const char __pyx_k_index_set___and___line_271[] = "index_set.__and__ (line 271)";
1978 static const char __pyx_k_index_set___ior___line_304[] = "index_set.__ior__ (line 304)";
1979 static const char __pyx_k_index_set___str___line_395[] = "index_set.__str__ (line 395)";
1980 static const char __pyx_k_index_set___xor___line_249[] = "index_set.__xor__ (line 249)";
1981 static const char __pyx_k_clifford___call___line_1020[] = "clifford.__call__ (line 1020)";
1982 static const char __pyx_k_clifford___repr___line_1226[] = "clifford.__repr__ (line 1226)";
1983 static const char __pyx_k_clifford_involute_line_1107[] = "clifford.involute (line 1107)";
1984 static const char __pyx_k_index_set___iand___line_282[] = "index_set.__iand__ (line 282)";
1985 static const char __pyx_k_index_set___iter___line_229[] = "index_set.__iter__ (line 229)";
1986 static const char __pyx_k_index_set___ixor___line_260[] = "index_set.__ixor__ (line 260)";
1987 static const char __pyx_k_index_set___repr___line_384[] = "index_set.__repr__ (line 384)";
1988 static const char __pyx_k_clifford_outer_pow_line_1004[] = "clifford.outer_pow (line 1004)";
1989 static const char __pyx_k_clifford_truncated_line_1195[] = "clifford.truncated (line 1195)";
1990 static const char __pyx_k_index_set_count_neg_line_324[] = "index_set.count_neg (line 324)";
1991 static const char __pyx_k_index_set_count_pos_line_333[] = "index_set.count_pos (line 333)";
1992 static const char __pyx_k_clifford___getitem___line_707[] = "clifford.__getitem__ (line 707)";
1993 static const char __pyx_k_clifford___truediv___line_896[] = "clifford.__truediv__ (line 896)";
1994 static const char __pyx_k_index_set___invert___line_240[] = "index_set.__invert__ (line 240)";
1995 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 ";
1996 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 ";
1997 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 ";
1998 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 ";
1999 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 ";
2000 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 ";
2001 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 ";
2002 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 ";
2003 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 ";
2004 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 ";
2005 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 ";
2006 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 ";
2007 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 ";
2008 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 ";
2009 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 ";
2010 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 ";
2011 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 ";
2012 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 ";
2013 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 ";
2014 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 ";
2015 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 ";
2016 static const char __pyx_k_clifford_vector_part_line_1079[] = "clifford.vector_part (line 1079)";
2017 static const char __pyx_k_index_set___getitem___line_191[] = "index_set.__getitem__ (line 191)";
2018 static const char __pyx_k_index_set___setitem___line_179[] = "index_set.__setitem__ (line 179)";
2019 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 ";
2020 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 ";
2021 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 ";
2022 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 ";
2023 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 ";
2024 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 ";
2025 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 ";
2026 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 ";
2027 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 ";
2028 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 ";
2029 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 ";
2030 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 ";
2031 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 ";
2032 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 ";
2033 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 ";
2034 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 ";
2035 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 ";
2036 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 ";
2037 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 ";
2038 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 ";
2039 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 ";
2040 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 ";
2041 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 ";
2042 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 ";
2043 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 ";
2044 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 ";
2045 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 ";
2046 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 ";
2047 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 ";
2048 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 ";
2049 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 ";
2050 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 ";
2051 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 ";
2052 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 ";
2053 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 ";
2054 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 ";
2055 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 ";
2056 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 ";
2057 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 ";
2058 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 ";
2059 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 ";
2060 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 ";
2061 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 ";
2062 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 ";
2063 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 ";
2064 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 ";
2065 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 ";
2066 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 ";
2067 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 ";
2068 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 ";
2069 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 ";
2070 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 ";
2071 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 ";
2072 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 ";
2073 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 ";
2074 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 ";
2075 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 ";
2076 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 ";
2077 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 ";
2078 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 ";
2079 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 ";
2080 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 ";
2081 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 ";
2082 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 ";
2083 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 ";
2084 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 ";
2085 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 ";
2086 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 ";
2087  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 ";
2088  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 ";
2089  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2090  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 ";
2091  static const char __pyx_k_index_set_sign_of_mult_line_366[] = "index_set.sign_of_mult (line 366)";
2092  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 ";
2093  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2094  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2095  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 ";
2096  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 ";
2097  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 ";
2098  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 ";
2099  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 ";
2100  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1244)";
2101  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 406)";
2102  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 375)";
2103  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2104  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 ";
2105  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 ";
2106  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 ";
2107  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 ";
2108  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 ";
2109  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 ";
2110  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 ";
2111  static PyObject *__pyx_kp_u_;
2112  static PyObject *__pyx_kp_u_0_8_4;
2113  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2114  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2115  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2116  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2117  static PyObject *__pyx_kp_u_Cannot_initialize_clifford_objec;
2118  static PyObject *__pyx_kp_u_Cannot_initialize_index_set_obje;
2119  static PyObject *__pyx_kp_u_Cannot_reframe;
2120  static PyObject *__pyx_kp_u_Cannot_take_vector_part_of;
2121  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2122  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2123  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2124  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2125  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2126  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2127  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2128  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2129  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2130  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2131  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2132  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2133  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2134  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2135  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2136  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2137  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2138  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2139  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2140  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2141  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2142  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2143  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2144  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2145  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2146  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2147  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2148  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2149  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2150  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2151  static PyObject *__pyx_n_s_IndexError;
2152  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2153  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2154  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2155  static PyObject *__pyx_n_s_Integral;
2156  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2157  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2158  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2159  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2160  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2161  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2162  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2163  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2164  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2165  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2166  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2167  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2168  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2169  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2170  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2171  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2172  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2173  static PyObject *__pyx_n_s_NotImplemented;
2174  static PyObject *__pyx_kp_u_Not_applicable;
2175  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2176  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2177  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2178  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2179  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2180  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2181  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2182  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2183  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2184  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2185  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2186  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2187  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2188  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2189  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2190  static PyObject *__pyx_n_s_PyClical;
2191  static PyObject *__pyx_kp_s_PyClical_pyx;
2192  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2193  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2194  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2195  static PyObject *__pyx_n_s_Real;
2196  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2197  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2198  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2199  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2200  static PyObject *__pyx_n_s_RuntimeError;
2201  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2202  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2203  static PyObject *__pyx_n_s_Sequence;
2204  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2205  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2206  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2207  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2208  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2209  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2210  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2211  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2212  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2213  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2214  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2215  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2216  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2217  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2218  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2219  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2220  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2221  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2222  static PyObject *__pyx_kp_u_The_informal_string_representat;
2223  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2224  static PyObject *__pyx_kp_u_The_official_string_representat;
2225  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2226  static PyObject *__pyx_kp_u_This_comparison_operator_is_not;
2227  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2228  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2229  static PyObject *__pyx_n_s_TypeError;
2230  static PyObject *__pyx_kp_u_UTF_8;
2231  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2232  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2233  static PyObject *__pyx_n_s_ValueError;
2234  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2235  static PyObject *__pyx_kp_u__2;
2236  static PyObject *__pyx_kp_u__5;
2237  static PyObject *__pyx_kp_u__6;
2238  static PyObject *__pyx_kp_u__7;
2239  static PyObject *__pyx_kp_u__8;
2240  static PyObject *__pyx_kp_u__9;
2241  static PyObject *__pyx_n_s_abc;
2242  static PyObject *__pyx_kp_u_abs_line_1472;
2243  static PyObject *__pyx_n_s_acos;
2244  static PyObject *__pyx_kp_u_acos_line_1618;
2245  static PyObject *__pyx_n_s_acosh;
2246  static PyObject *__pyx_kp_u_acosh_line_1655;
2247  static PyObject *__pyx_kp_u_agc3_line_1843;
2248  static PyObject *__pyx_n_s_args;
2249  static PyObject *__pyx_kp_u_as_frame;
2250  static PyObject *__pyx_n_s_asin;
2251  static PyObject *__pyx_kp_u_asin_line_1697;
2252  static PyObject *__pyx_n_s_asinh;
2253  static PyObject *__pyx_kp_u_asinh_line_1732;
2254  static PyObject *__pyx_n_s_atan;
2255  static PyObject *__pyx_kp_u_atan_line_1768;
2256  static PyObject *__pyx_n_s_atanh;
2257  static PyObject *__pyx_kp_u_atanh_line_1797;
2258  static PyObject *__pyx_kp_u_cga3_line_1823;
2259  static PyObject *__pyx_kp_u_cga3std_line_1832;
2260  static PyObject *__pyx_n_s_cl;
2261  static PyObject *__pyx_n_s_clifford;
2262  static PyObject *__pyx_kp_u_clifford___add___line_740;
2263  static PyObject *__pyx_kp_u_clifford___and___line_836;
2264  static PyObject *__pyx_kp_u_clifford___call___line_1020;
2265  static PyObject *__pyx_kp_u_clifford___getitem___line_707;
2266  static PyObject *__pyx_kp_u_clifford___iadd___line_751;
2267  static PyObject *__pyx_kp_u_clifford___iand___line_851;
2268  static PyObject *__pyx_kp_u_clifford___idiv___line_911;
2269  static PyObject *__pyx_kp_u_clifford___imod___line_821;
2270  static PyObject *__pyx_kp_u_clifford___imul___line_793;
2271  static PyObject *__pyx_kp_u_clifford___ior___line_950;
2272  static PyObject *__pyx_kp_u_clifford___isub___line_771;
2273  static PyObject *__pyx_kp_u_clifford___iter___line_638;
2274  static PyObject *__pyx_kp_u_clifford___ixor___line_881;
2275  static PyObject *__pyx_kp_u_clifford___mod___line_806;
2276  static PyObject *__pyx_kp_u_clifford___mul___line_780;
2277  static PyObject *__pyx_kp_u_clifford___neg___line_722;
2278  static PyObject *__pyx_kp_u_clifford___or___line_939;
2279  static PyObject *__pyx_kp_u_clifford___pos___line_731;
2280  static PyObject *__pyx_kp_u_clifford___pow___line_961;
2281  static PyObject *__pyx_kp_u_clifford___repr___line_1226;
2282  static PyObject *__pyx_kp_u_clifford___str___line_1235;
2283  static PyObject *__pyx_kp_u_clifford___sub___line_760;
2284  static PyObject *__pyx_kp_u_clifford___truediv___line_896;
2285  static PyObject *__pyx_kp_u_clifford___xor___line_866;
2286  static PyObject *__pyx_kp_u_clifford_abs_line_1175;
2287  static PyObject *__pyx_kp_u_clifford_conj_line_1138;
2288  static PyObject *__pyx_kp_u_clifford_copy_line_556;
2289  static PyObject *__pyx_kp_u_clifford_even_line_1061;
2290  static PyObject *__pyx_kp_u_clifford_frame_line_1215;
2291  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2292  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2293  static PyObject *__pyx_kp_u_clifford_inv_line_926;
2294  static PyObject *__pyx_kp_u_clifford_involute_line_1107;
2295  static PyObject *__pyx_kp_u_clifford_isnan_line_1206;
2296  static PyObject *__pyx_kp_u_clifford_max_abs_line_1184;
2297  static PyObject *__pyx_kp_u_clifford_norm_line_1164;
2298  static PyObject *__pyx_kp_u_clifford_odd_line_1070;
2299  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1004;
2300  static PyObject *__pyx_kp_u_clifford_pow_line_980;
2301  static PyObject *__pyx_kp_u_clifford_pure_line_1050;
2302  static PyObject *__pyx_kp_u_clifford_quad_line_1153;
2303  static PyObject *__pyx_kp_u_clifford_reframe_line_649;
2304  static PyObject *__pyx_kp_u_clifford_reverse_line_1123;
2305  static PyObject *__pyx_kp_u_clifford_scalar_line_1039;
2306  static PyObject *__pyx_kp_u_clifford_truncated_line_1195;
2307  static PyObject *__pyx_kp_u_clifford_vector_part_line_1079;
2308  static PyObject *__pyx_n_s_cline_in_traceback;
2309  static PyObject *__pyx_n_s_close;
2310  static PyObject *__pyx_n_s_collections;
2311  static PyObject *__pyx_kp_u_compare_line_492;
2312  static PyObject *__pyx_kp_u_complexifier_line_1526;
2313  static PyObject *__pyx_n_s_conj;
2314  static PyObject *__pyx_kp_u_conj_line_1435;
2315  static PyObject *__pyx_n_s_copy;
2316  static PyObject *__pyx_n_s_cos;
2317  static PyObject *__pyx_kp_u_cos_line_1601;
2318  static PyObject *__pyx_n_s_cosh;
2319  static PyObject *__pyx_kp_u_cosh_line_1639;
2320  static PyObject *__pyx_n_s_doctest;
2321  static PyObject *__pyx_n_s_e;
2322  static PyObject *__pyx_kp_u_e_line_1886;
2323  static PyObject *__pyx_n_s_encode;
2324  static PyObject *__pyx_n_s_even;
2325  static PyObject *__pyx_kp_u_even_line_1387;
2326  static PyObject *__pyx_n_s_exp;
2327  static PyObject *__pyx_kp_u_exp_line_1564;
2328  static PyObject *__pyx_n_s_fill;
2329  static PyObject *__pyx_n_s_frm;
2330  static PyObject *__pyx_kp_u_from;
2331  static PyObject *__pyx_n_s_getstate;
2332  static PyObject *__pyx_n_s_grade;
2333  static PyObject *__pyx_n_s_i;
2334  static PyObject *__pyx_kp_u_imag_line_1365;
2335  static PyObject *__pyx_n_s_import;
2336  static PyObject *__pyx_n_s_index_set;
2337  static PyObject *__pyx_kp_u_index_set___and___line_271;
2338  static PyObject *__pyx_kp_u_index_set___getitem___line_191;
2339  static PyObject *__pyx_kp_u_index_set___iand___line_282;
2340  static PyObject *__pyx_kp_u_index_set___invert___line_240;
2341  static PyObject *__pyx_kp_u_index_set___ior___line_304;
2342  static PyObject *__pyx_n_s_index_set___iter;
2343  static PyObject *__pyx_kp_u_index_set___iter___line_229;
2344  static PyObject *__pyx_kp_u_index_set___ixor___line_260;
2345  static PyObject *__pyx_kp_u_index_set___or___line_293;
2346  static PyObject *__pyx_kp_u_index_set___repr___line_384;
2347  static PyObject *__pyx_kp_u_index_set___setitem___line_179;
2348  static PyObject *__pyx_kp_u_index_set___str___line_395;
2349  static PyObject *__pyx_kp_u_index_set___xor___line_249;
2350  static PyObject *__pyx_kp_u_index_set_copy_line_65;
2351  static PyObject *__pyx_kp_u_index_set_count_line_315;
2352  static PyObject *__pyx_kp_u_index_set_count_neg_line_324;
2353  static PyObject *__pyx_kp_u_index_set_count_pos_line_333;
2354  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2355  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2356  static PyObject *__pyx_kp_u_index_set_max_line_351;
2357  static PyObject *__pyx_kp_u_index_set_min_line_342;
2358  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_366;
2359  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2360  static PyObject *__pyx_n_s_inv;
2361  static PyObject *__pyx_kp_u_inv_line_1328;
2362  static PyObject *__pyx_kp_u_invalid;
2363  static PyObject *__pyx_kp_u_invalid_string;
2364  static PyObject *__pyx_n_s_involute;
2365  static PyObject *__pyx_kp_u_involute_line_1405;
2366  static PyObject *__pyx_n_s_ist;
2367  static PyObject *__pyx_n_s_istpq;
2368  static PyObject *__pyx_kp_u_istpq_line_1899;
2369  static PyObject *__pyx_n_s_iter;
2370  static PyObject *__pyx_n_s_ixt;
2371  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2372  static PyObject *__pyx_n_s_lhs;
2373  static PyObject *__pyx_n_s_log;
2374  static PyObject *__pyx_kp_u_log_line_1578;
2375  static PyObject *__pyx_n_s_m;
2376  static PyObject *__pyx_n_s_main;
2377  static PyObject *__pyx_n_u_main;
2378  static PyObject *__pyx_n_s_math;
2379  static PyObject *__pyx_n_s_max;
2380  static PyObject *__pyx_kp_u_max_abs_line_1481;
2381  static PyObject *__pyx_kp_u_max_pos_line_513;
2382  static PyObject *__pyx_n_s_min;
2383  static PyObject *__pyx_kp_u_min_neg_line_504;
2384  static PyObject *__pyx_n_s_name;
2385  static PyObject *__pyx_n_s_nbar3;
2386  static PyObject *__pyx_n_s_ninf3;
2387  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2388  static PyObject *__pyx_n_s_norm;
2389  static PyObject *__pyx_kp_u_norm_line_1461;
2390  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2391  static PyObject *__pyx_n_s_numbers;
2392  static PyObject *__pyx_n_s_obj;
2393  static PyObject *__pyx_n_s_odd;
2394  static PyObject *__pyx_kp_u_odd_line_1396;
2395  static PyObject *__pyx_n_s_other;
2396  static PyObject *__pyx_n_s_outer_pow;
2397  static PyObject *__pyx_kp_u_outer_pow_line_1517;
2398  static PyObject *__pyx_n_s_p;
2399  static PyObject *__pyx_n_s_pi;
2400  static PyObject *__pyx_n_s_pow;
2401  static PyObject *__pyx_kp_u_pow_line_1493;
2402  static PyObject *__pyx_n_s_pure;
2403  static PyObject *__pyx_kp_u_pure_line_1376;
2404  static PyObject *__pyx_n_s_pyx_vtable;
2405  static PyObject *__pyx_n_s_q;
2406  static PyObject *__pyx_n_s_quad;
2407  static PyObject *__pyx_kp_u_quad_line_1450;
2408  static PyObject *__pyx_kp_u_random_clifford_line_1814;
2409  static PyObject *__pyx_n_s_range;
2410  static PyObject *__pyx_kp_u_real_line_1354;
2411  static PyObject *__pyx_n_s_reduce;
2412  static PyObject *__pyx_n_s_reduce_cython;
2413  static PyObject *__pyx_n_s_reduce_ex;
2414  static PyObject *__pyx_n_s_reverse;
2415  static PyObject *__pyx_kp_u_reverse_line_1420;
2416  static PyObject *__pyx_n_s_rhs;
2417  static PyObject *__pyx_n_s_scalar;
2418  static PyObject *__pyx_n_s_scalar_epsilon;
2419  static PyObject *__pyx_kp_u_scalar_line_1343;
2420  static PyObject *__pyx_n_s_send;
2421  static PyObject *__pyx_n_s_setstate;
2422  static PyObject *__pyx_n_s_setstate_cython;
2423  static PyObject *__pyx_n_s_sin;
2424  static PyObject *__pyx_kp_u_sin_line_1678;
2425  static PyObject *__pyx_n_s_sinh;
2426  static PyObject *__pyx_kp_u_sinh_line_1718;
2427  static PyObject *__pyx_n_s_sqrt;
2428  static PyObject *__pyx_kp_u_sqrt_line_1541;
2429  static PyObject *__pyx_n_s_tan;
2430  static PyObject *__pyx_kp_u_tan_line_1751;
2431  static PyObject *__pyx_n_s_tanh;
2432  static PyObject *__pyx_kp_u_tanh_line_1785;
2433  static PyObject *__pyx_n_s_tau;
2434  static PyObject *__pyx_n_s_test;
2435  static PyObject *__pyx_n_s_test_2;
2436  static PyObject *__pyx_n_s_testmod;
2437  static PyObject *__pyx_n_s_throw;
2438  static PyObject *__pyx_kp_u_to_frame;
2439  static PyObject *__pyx_kp_u_using;
2440  static PyObject *__pyx_kp_u_using_invalid;
2441  static PyObject *__pyx_kp_u_value;
2442  static PyObject *__pyx_n_s_version;
2443  static PyObject *__pyx_n_s_xrange;
2444 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2445 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2446 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2447 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 */
2448 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 */
2449 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2450 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2451 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2452 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2453 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2454 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2455 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2456 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2457 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2458 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2459 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2460 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2461 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2462 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2463 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2464 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2465 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2466 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2467 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2468 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2469 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2470 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 */
2471 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2472 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2473 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2474 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2475 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2476 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 */
2477 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2478 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 */
2479 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2480 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2481 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 */
2482 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2483 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2484 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2485 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2486 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2487 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2488 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2489 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2490 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2491 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2492 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2493 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2494 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2495 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2496 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2497 static PyObject *__pyx_pf_8PyClical_8clifford_44__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2498 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2499 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2500 #endif
2501 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2502 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2503 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2504 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2505 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2506 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2507 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2508 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2509 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2510 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2511 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2512 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2513 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2514 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2515 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2516 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2517 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2518 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2519 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2520 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2521 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2522 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2523 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2524 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2525 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2526 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 */
2527 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2528 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2529 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2530 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2531 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2532 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2533 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2534 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2535 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2536 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2537 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2538 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2539 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2540 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2541 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2542 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2543 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2544 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2545 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2546 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2547 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2548 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2549 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2550 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2551 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2552 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2553 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2554 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2555 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2556 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2557 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2558 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2559 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2560 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 */
2561 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2562 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2563 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2564 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2565 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2566 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2567 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2568 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2569 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2570 static PyObject *__pyx_float_0_0;
2571 static PyObject *__pyx_float_1_0;
2572 static PyObject *__pyx_float_4_0;
2573 static PyObject *__pyx_float_8_0;
2574 static PyObject *__pyx_int_0;
2575 static PyObject *__pyx_int_1;
2576 static PyObject *__pyx_int_4;
2577 static PyObject *__pyx_int_neg_1;
2578 static PyObject *__pyx_tuple__3;
2579 static PyObject *__pyx_tuple__4;
2580 static PyObject *__pyx_tuple__10;
2581 static PyObject *__pyx_tuple__11;
2582 static PyObject *__pyx_tuple__12;
2583 static PyObject *__pyx_tuple__15;
2584 static PyObject *__pyx_tuple__16;
2585 static PyObject *__pyx_tuple__18;
2586 static PyObject *__pyx_tuple__20;
2587 static PyObject *__pyx_tuple__21;
2588 static PyObject *__pyx_tuple__22;
2589 static PyObject *__pyx_codeobj__13;
2590 static PyObject *__pyx_codeobj__14;
2591 static PyObject *__pyx_codeobj__17;
2592 static PyObject *__pyx_codeobj__19;
2593 static PyObject *__pyx_codeobj__23;
2594 /* Late includes */
2595 
2596 /* "PyClical.pyx":40
2597  * cdef class index_set
2598  *
2599  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2600  * """
2601  * Return the C++ IndexSet instance wrapped by index_set(obj).
2602  */
2603 
2604 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2605  IndexSet __pyx_r;
2606  __Pyx_RefNannyDeclarations
2607  PyObject *__pyx_t_1 = NULL;
2608  int __pyx_lineno = 0;
2609  const char *__pyx_filename = NULL;
2610  int __pyx_clineno = 0;
2611  __Pyx_RefNannySetupContext("toIndexSet", 0);
2612 
2613  /* "PyClical.pyx":44
2614  * Return the C++ IndexSet instance wrapped by index_set(obj).
2615  * """
2616  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2617  *
2618  * cdef class index_set:
2619  */
2620  __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)
2621  __Pyx_GOTREF(__pyx_t_1);
2622  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2623  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2624  goto __pyx_L0;
2625 
2626  /* "PyClical.pyx":40
2627  * cdef class index_set
2628  *
2629  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2630  * """
2631  * Return the C++ IndexSet instance wrapped by index_set(obj).
2632  */
2633 
2634  /* function exit code */
2635  __pyx_L1_error:;
2636  __Pyx_XDECREF(__pyx_t_1);
2637  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2638  __Pyx_pretend_to_initialize(&__pyx_r);
2639  __pyx_L0:;
2640  __Pyx_RefNannyFinishContext();
2641  return __pyx_r;
2642 }
2643 
2644 /* "PyClical.pyx":52
2645  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2646  *
2647  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2648  * """
2649  * Wrap an instance of the C++ class IndexSet.
2650  */
2651 
2652 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2653  PyObject *__pyx_r = NULL;
2654  __Pyx_RefNannyDeclarations
2655  __Pyx_RefNannySetupContext("wrap", 0);
2656 
2657  /* "PyClical.pyx":56
2658  * Wrap an instance of the C++ class IndexSet.
2659  * """
2660  * self.instance[0] = other # <<<<<<<<<<<<<<
2661  * return self
2662  *
2663  */
2664  (__pyx_v_self->instance[0]) = __pyx_v_other;
2665 
2666  /* "PyClical.pyx":57
2667  * """
2668  * self.instance[0] = other
2669  * return self # <<<<<<<<<<<<<<
2670  *
2671  * cdef inline IndexSet unwrap(index_set self):
2672  */
2673  __Pyx_XDECREF(__pyx_r);
2674  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2675  __pyx_r = ((PyObject *)__pyx_v_self);
2676  goto __pyx_L0;
2677 
2678  /* "PyClical.pyx":52
2679  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2680  *
2681  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2682  * """
2683  * Wrap an instance of the C++ class IndexSet.
2684  */
2685 
2686  /* function exit code */
2687  __pyx_L0:;
2688  __Pyx_XGIVEREF(__pyx_r);
2689  __Pyx_RefNannyFinishContext();
2690  return __pyx_r;
2691 }
2692 
2693 /* "PyClical.pyx":59
2694  * return self
2695  *
2696  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2697  * """
2698  * Return the wrapped C++ IndexSet instance.
2699  */
2700 
2701 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2702  IndexSet __pyx_r;
2703  __Pyx_RefNannyDeclarations
2704  __Pyx_RefNannySetupContext("unwrap", 0);
2705 
2706  /* "PyClical.pyx":63
2707  * Return the wrapped C++ IndexSet instance.
2708  * """
2709  * return self.instance[0] # <<<<<<<<<<<<<<
2710  *
2711  * cpdef copy(index_set self):
2712  */
2713  __pyx_r = (__pyx_v_self->instance[0]);
2714  goto __pyx_L0;
2715 
2716  /* "PyClical.pyx":59
2717  * return self
2718  *
2719  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2720  * """
2721  * Return the wrapped C++ IndexSet instance.
2722  */
2723 
2724  /* function exit code */
2725  __pyx_L0:;
2726  __Pyx_RefNannyFinishContext();
2727  return __pyx_r;
2728 }
2729 
2730 /* "PyClical.pyx":65
2731  * return self.instance[0]
2732  *
2733  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2734  * """
2735  * Copy this index_set object.
2736  */
2737 
2738 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2739 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2740  PyObject *__pyx_r = NULL;
2741  __Pyx_RefNannyDeclarations
2742  PyObject *__pyx_t_1 = NULL;
2743  PyObject *__pyx_t_2 = NULL;
2744  PyObject *__pyx_t_3 = NULL;
2745  PyObject *__pyx_t_4 = NULL;
2746  int __pyx_lineno = 0;
2747  const char *__pyx_filename = NULL;
2748  int __pyx_clineno = 0;
2749  __Pyx_RefNannySetupContext("copy", 0);
2750  /* Check if called by wrapper */
2751  if (unlikely(__pyx_skip_dispatch)) ;
2752  /* Check if overridden in Python */
2753  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)))) {
2754  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2755  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2756  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2757  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2758  #endif
2759  __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)
2760  __Pyx_GOTREF(__pyx_t_1);
2761  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2762  __Pyx_XDECREF(__pyx_r);
2763  __Pyx_INCREF(__pyx_t_1);
2764  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2765  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2766  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2767  if (likely(__pyx_t_4)) {
2768  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2769  __Pyx_INCREF(__pyx_t_4);
2770  __Pyx_INCREF(function);
2771  __Pyx_DECREF_SET(__pyx_t_3, function);
2772  }
2773  }
2774  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2775  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2776  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
2777  __Pyx_GOTREF(__pyx_t_2);
2778  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2779  __pyx_r = __pyx_t_2;
2780  __pyx_t_2 = 0;
2781  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2782  goto __pyx_L0;
2783  }
2784  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2785  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2786  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2787  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2788  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2789  }
2790  #endif
2791  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2792  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2793  }
2794  #endif
2795  }
2796 
2797  /* "PyClical.pyx":72
2798  * {1}
2799  * """
2800  * return index_set(self) # <<<<<<<<<<<<<<
2801  *
2802  * def __cinit__(self, other = 0):
2803  */
2804  __Pyx_XDECREF(__pyx_r);
2805  __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)
2806  __Pyx_GOTREF(__pyx_t_1);
2807  __pyx_r = __pyx_t_1;
2808  __pyx_t_1 = 0;
2809  goto __pyx_L0;
2810 
2811  /* "PyClical.pyx":65
2812  * return self.instance[0]
2813  *
2814  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2815  * """
2816  * Copy this index_set object.
2817  */
2818 
2819  /* function exit code */
2820  __pyx_L1_error:;
2821  __Pyx_XDECREF(__pyx_t_1);
2822  __Pyx_XDECREF(__pyx_t_2);
2823  __Pyx_XDECREF(__pyx_t_3);
2824  __Pyx_XDECREF(__pyx_t_4);
2825  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2826  __pyx_r = 0;
2827  __pyx_L0:;
2828  __Pyx_XGIVEREF(__pyx_r);
2829  __Pyx_RefNannyFinishContext();
2830  return __pyx_r;
2831 }
2832 
2833 /* Python wrapper */
2834 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2835 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 ";
2836 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2837  PyObject *__pyx_r = 0;
2838  __Pyx_RefNannyDeclarations
2839  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2840  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2841 
2842  /* function exit code */
2843  __Pyx_RefNannyFinishContext();
2844  return __pyx_r;
2845 }
2846 
2847 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2848  PyObject *__pyx_r = NULL;
2849  __Pyx_RefNannyDeclarations
2850  PyObject *__pyx_t_1 = NULL;
2851  int __pyx_lineno = 0;
2852  const char *__pyx_filename = NULL;
2853  int __pyx_clineno = 0;
2854  __Pyx_RefNannySetupContext("copy", 0);
2855  __Pyx_XDECREF(__pyx_r);
2856  __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)
2857  __Pyx_GOTREF(__pyx_t_1);
2858  __pyx_r = __pyx_t_1;
2859  __pyx_t_1 = 0;
2860  goto __pyx_L0;
2861 
2862  /* function exit code */
2863  __pyx_L1_error:;
2864  __Pyx_XDECREF(__pyx_t_1);
2865  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2866  __pyx_r = NULL;
2867  __pyx_L0:;
2868  __Pyx_XGIVEREF(__pyx_r);
2869  __Pyx_RefNannyFinishContext();
2870  return __pyx_r;
2871 }
2872 
2873 /* "PyClical.pyx":74
2874  * return index_set(self)
2875  *
2876  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2877  * """
2878  * Construct an object of type index_set.
2879  */
2880 
2881 /* Python wrapper */
2882 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2883 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2884  PyObject *__pyx_v_other = 0;
2885  int __pyx_lineno = 0;
2886  const char *__pyx_filename = NULL;
2887  int __pyx_clineno = 0;
2888  int __pyx_r;
2889  __Pyx_RefNannyDeclarations
2890  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2891  {
2892  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2893  PyObject* values[1] = {0};
2894  values[0] = ((PyObject *)__pyx_int_0);
2895  if (unlikely(__pyx_kwds)) {
2896  Py_ssize_t kw_args;
2897  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2898  switch (pos_args) {
2899  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2900  CYTHON_FALLTHROUGH;
2901  case 0: break;
2902  default: goto __pyx_L5_argtuple_error;
2903  }
2904  kw_args = PyDict_Size(__pyx_kwds);
2905  switch (pos_args) {
2906  case 0:
2907  if (kw_args > 0) {
2908  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2909  if (value) { values[0] = value; kw_args--; }
2910  }
2911  }
2912  if (unlikely(kw_args > 0)) {
2913  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 74, __pyx_L3_error)
2914  }
2915  } else {
2916  switch (PyTuple_GET_SIZE(__pyx_args)) {
2917  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2918  CYTHON_FALLTHROUGH;
2919  case 0: break;
2920  default: goto __pyx_L5_argtuple_error;
2921  }
2922  }
2923  __pyx_v_other = values[0];
2924  }
2925  goto __pyx_L4_argument_unpacking_done;
2926  __pyx_L5_argtuple_error:;
2927  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 74, __pyx_L3_error)
2928  __pyx_L3_error:;
2929  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2930  __Pyx_RefNannyFinishContext();
2931  return -1;
2932  __pyx_L4_argument_unpacking_done:;
2933  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2934 
2935  /* function exit code */
2936  __Pyx_RefNannyFinishContext();
2937  return __pyx_r;
2938 }
2939 
2940 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2941  PyObject *__pyx_v_error_msg_prefix = NULL;
2942  PyObject *__pyx_v_idx = NULL;
2943  PyObject *__pyx_v_bother = NULL;
2944  int __pyx_r;
2945  __Pyx_RefNannyDeclarations
2946  int __pyx_t_1;
2947  int __pyx_t_2;
2948  IndexSet *__pyx_t_3;
2949  PyObject *__pyx_t_4 = NULL;
2950  PyObject *__pyx_t_5 = NULL;
2951  int __pyx_t_6;
2952  int __pyx_t_7;
2953  PyObject *__pyx_t_8 = NULL;
2954  PyObject *__pyx_t_9 = NULL;
2955  PyObject *__pyx_t_10 = NULL;
2956  Py_ssize_t __pyx_t_11;
2957  PyObject *(*__pyx_t_12)(PyObject *);
2958  PyObject *__pyx_t_13 = NULL;
2959  PyObject *__pyx_t_14 = NULL;
2960  PyObject *__pyx_t_15 = NULL;
2961  PyObject *__pyx_t_16 = NULL;
2962  char *__pyx_t_17;
2963  int __pyx_lineno = 0;
2964  const char *__pyx_filename = NULL;
2965  int __pyx_clineno = 0;
2966  __Pyx_RefNannySetupContext("__cinit__", 0);
2967 
2968  /* "PyClical.pyx":93
2969  * {}
2970  * """
2971  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2972  * if isinstance(other, index_set):
2973  * self.instance = new IndexSet((<index_set>other).unwrap())
2974  */
2975  __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_index_set_obje);
2976  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_index_set_obje;
2977 
2978  /* "PyClical.pyx":94
2979  * """
2980  * error_msg_prefix = "Cannot initialize index_set object from"
2981  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2982  * self.instance = new IndexSet((<index_set>other).unwrap())
2983  * elif isinstance(other, numbers.Integral):
2984  */
2985  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2986  __pyx_t_2 = (__pyx_t_1 != 0);
2987  if (__pyx_t_2) {
2988 
2989  /* "PyClical.pyx":95
2990  * error_msg_prefix = "Cannot initialize index_set object from"
2991  * if isinstance(other, index_set):
2992  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2993  * elif isinstance(other, numbers.Integral):
2994  * self.instance = new IndexSet(<int>other)
2995  */
2996  try {
2997  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2998  } catch(...) {
2999  __Pyx_CppExn2PyErr();
3000  __PYX_ERR(0, 95, __pyx_L1_error)
3001  }
3002  __pyx_v_self->instance = __pyx_t_3;
3003 
3004  /* "PyClical.pyx":94
3005  * """
3006  * error_msg_prefix = "Cannot initialize index_set object from"
3007  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
3008  * self.instance = new IndexSet((<index_set>other).unwrap())
3009  * elif isinstance(other, numbers.Integral):
3010  */
3011  goto __pyx_L3;
3012  }
3013 
3014  /* "PyClical.pyx":96
3015  * if isinstance(other, index_set):
3016  * self.instance = new IndexSet((<index_set>other).unwrap())
3017  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
3018  * self.instance = new IndexSet(<int>other)
3019  * elif isinstance(other, (set, frozenset)):
3020  */
3021  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
3022  __Pyx_GOTREF(__pyx_t_4);
3023  __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)
3024  __Pyx_GOTREF(__pyx_t_5);
3025  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3026  __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)
3027  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3028  __pyx_t_1 = (__pyx_t_2 != 0);
3029  if (__pyx_t_1) {
3030 
3031  /* "PyClical.pyx":97
3032  * self.instance = new IndexSet((<index_set>other).unwrap())
3033  * elif isinstance(other, numbers.Integral):
3034  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
3035  * elif isinstance(other, (set, frozenset)):
3036  * try:
3037  */
3038  __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)
3039  try {
3040  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
3041  } catch(...) {
3042  __Pyx_CppExn2PyErr();
3043  __PYX_ERR(0, 97, __pyx_L1_error)
3044  }
3045  __pyx_v_self->instance = __pyx_t_3;
3046 
3047  /* "PyClical.pyx":96
3048  * if isinstance(other, index_set):
3049  * self.instance = new IndexSet((<index_set>other).unwrap())
3050  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
3051  * self.instance = new IndexSet(<int>other)
3052  * elif isinstance(other, (set, frozenset)):
3053  */
3054  goto __pyx_L3;
3055  }
3056 
3057  /* "PyClical.pyx":98
3058  * elif isinstance(other, numbers.Integral):
3059  * self.instance = new IndexSet(<int>other)
3060  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3061  * try:
3062  * self.instance = new IndexSet()
3063  */
3064  __pyx_t_2 = PySet_Check(__pyx_v_other);
3065  __pyx_t_7 = (__pyx_t_2 != 0);
3066  if (!__pyx_t_7) {
3067  } else {
3068  __pyx_t_1 = __pyx_t_7;
3069  goto __pyx_L4_bool_binop_done;
3070  }
3071  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
3072  __pyx_t_2 = (__pyx_t_7 != 0);
3073  __pyx_t_1 = __pyx_t_2;
3074  __pyx_L4_bool_binop_done:;
3075  __pyx_t_2 = (__pyx_t_1 != 0);
3076  if (__pyx_t_2) {
3077 
3078  /* "PyClical.pyx":99
3079  * self.instance = new IndexSet(<int>other)
3080  * elif isinstance(other, (set, frozenset)):
3081  * try: # <<<<<<<<<<<<<<
3082  * self.instance = new IndexSet()
3083  * for idx in other:
3084  */
3085  {
3086  __Pyx_PyThreadState_declare
3087  __Pyx_PyThreadState_assign
3088  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3089  __Pyx_XGOTREF(__pyx_t_8);
3090  __Pyx_XGOTREF(__pyx_t_9);
3091  __Pyx_XGOTREF(__pyx_t_10);
3092  /*try:*/ {
3093 
3094  /* "PyClical.pyx":100
3095  * elif isinstance(other, (set, frozenset)):
3096  * try:
3097  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3098  * for idx in other:
3099  * self[idx] = True
3100  */
3101  __pyx_t_3 = new IndexSet();
3102  __pyx_v_self->instance = __pyx_t_3;
3103 
3104  /* "PyClical.pyx":101
3105  * try:
3106  * self.instance = new IndexSet()
3107  * for idx in other: # <<<<<<<<<<<<<<
3108  * self[idx] = True
3109  * except IndexError:
3110  */
3111  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3112  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3113  __pyx_t_12 = NULL;
3114  } else {
3115  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L6_error)
3116  __Pyx_GOTREF(__pyx_t_5);
3117  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 101, __pyx_L6_error)
3118  }
3119  for (;;) {
3120  if (likely(!__pyx_t_12)) {
3121  if (likely(PyList_CheckExact(__pyx_t_5))) {
3122  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3123  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3124  __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)
3125  #else
3126  __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)
3127  __Pyx_GOTREF(__pyx_t_4);
3128  #endif
3129  } else {
3130  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3131  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3132  __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)
3133  #else
3134  __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)
3135  __Pyx_GOTREF(__pyx_t_4);
3136  #endif
3137  }
3138  } else {
3139  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3140  if (unlikely(!__pyx_t_4)) {
3141  PyObject* exc_type = PyErr_Occurred();
3142  if (exc_type) {
3143  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3144  else __PYX_ERR(0, 101, __pyx_L6_error)
3145  }
3146  break;
3147  }
3148  __Pyx_GOTREF(__pyx_t_4);
3149  }
3150  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3151  __pyx_t_4 = 0;
3152 
3153  /* "PyClical.pyx":102
3154  * self.instance = new IndexSet()
3155  * for idx in other:
3156  * self[idx] = True # <<<<<<<<<<<<<<
3157  * except IndexError:
3158  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3159  */
3160  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 102, __pyx_L6_error)
3161 
3162  /* "PyClical.pyx":101
3163  * try:
3164  * self.instance = new IndexSet()
3165  * for idx in other: # <<<<<<<<<<<<<<
3166  * self[idx] = True
3167  * except IndexError:
3168  */
3169  }
3170  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3171 
3172  /* "PyClical.pyx":99
3173  * self.instance = new IndexSet(<int>other)
3174  * elif isinstance(other, (set, frozenset)):
3175  * try: # <<<<<<<<<<<<<<
3176  * self.instance = new IndexSet()
3177  * for idx in other:
3178  */
3179  }
3180  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3181  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3182  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3183  goto __pyx_L11_try_end;
3184  __pyx_L6_error:;
3185  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3186  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3187 
3188  /* "PyClical.pyx":103
3189  * for idx in other:
3190  * self[idx] = True
3191  * except IndexError: # <<<<<<<<<<<<<<
3192  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3193  * except (RuntimeError, TypeError):
3194  */
3195  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3196  if (__pyx_t_6) {
3197  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3198  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 103, __pyx_L8_except_error)
3199  __Pyx_GOTREF(__pyx_t_5);
3200  __Pyx_GOTREF(__pyx_t_4);
3201  __Pyx_GOTREF(__pyx_t_13);
3202 
3203  /* "PyClical.pyx":104
3204  * self[idx] = True
3205  * except IndexError:
3206  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3207  * except (RuntimeError, TypeError):
3208  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3209  */
3210  __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)
3211  __Pyx_GOTREF(__pyx_t_14);
3212  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3213  __Pyx_GOTREF(__pyx_t_15);
3214  __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)
3215  __Pyx_GOTREF(__pyx_t_16);
3216  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3217  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3218  __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)
3219  __Pyx_GOTREF(__pyx_t_15);
3220  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3221  __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)
3222  __Pyx_GOTREF(__pyx_t_16);
3223  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3224  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3225  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3226  __PYX_ERR(0, 104, __pyx_L8_except_error)
3227  }
3228 
3229  /* "PyClical.pyx":105
3230  * except IndexError:
3231  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3232  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3233  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3234  * elif isinstance(other, str):
3235  */
3236  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3237  if (__pyx_t_6) {
3238  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3239  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 105, __pyx_L8_except_error)
3240  __Pyx_GOTREF(__pyx_t_13);
3241  __Pyx_GOTREF(__pyx_t_4);
3242  __Pyx_GOTREF(__pyx_t_5);
3243 
3244  /* "PyClical.pyx":106
3245  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3246  * except (RuntimeError, TypeError):
3247  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3248  * elif isinstance(other, str):
3249  * try:
3250  */
3251  __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)
3252  __Pyx_GOTREF(__pyx_t_16);
3253  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3254  __Pyx_GOTREF(__pyx_t_15);
3255  __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)
3256  __Pyx_GOTREF(__pyx_t_14);
3257  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3258  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3259  __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)
3260  __Pyx_GOTREF(__pyx_t_15);
3261  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3262  __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)
3263  __Pyx_GOTREF(__pyx_t_14);
3264  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3265  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3266  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3267  __PYX_ERR(0, 106, __pyx_L8_except_error)
3268  }
3269  goto __pyx_L8_except_error;
3270  __pyx_L8_except_error:;
3271 
3272  /* "PyClical.pyx":99
3273  * self.instance = new IndexSet(<int>other)
3274  * elif isinstance(other, (set, frozenset)):
3275  * try: # <<<<<<<<<<<<<<
3276  * self.instance = new IndexSet()
3277  * for idx in other:
3278  */
3279  __Pyx_XGIVEREF(__pyx_t_8);
3280  __Pyx_XGIVEREF(__pyx_t_9);
3281  __Pyx_XGIVEREF(__pyx_t_10);
3282  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3283  goto __pyx_L1_error;
3284  __pyx_L11_try_end:;
3285  }
3286 
3287  /* "PyClical.pyx":98
3288  * elif isinstance(other, numbers.Integral):
3289  * self.instance = new IndexSet(<int>other)
3290  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3291  * try:
3292  * self.instance = new IndexSet()
3293  */
3294  goto __pyx_L3;
3295  }
3296 
3297  /* "PyClical.pyx":107
3298  * except (RuntimeError, TypeError):
3299  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3300  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3301  * try:
3302  * bother = other.encode("UTF-8")
3303  */
3304  __pyx_t_2 = PyUnicode_Check(__pyx_v_other);
3305  __pyx_t_1 = (__pyx_t_2 != 0);
3306  if (likely(__pyx_t_1)) {
3307 
3308  /* "PyClical.pyx":108
3309  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3310  * elif isinstance(other, str):
3311  * try: # <<<<<<<<<<<<<<
3312  * bother = other.encode("UTF-8")
3313  * self.instance = new IndexSet(<char *>bother)
3314  */
3315  {
3316  __Pyx_PyThreadState_declare
3317  __Pyx_PyThreadState_assign
3318  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3319  __Pyx_XGOTREF(__pyx_t_10);
3320  __Pyx_XGOTREF(__pyx_t_9);
3321  __Pyx_XGOTREF(__pyx_t_8);
3322  /*try:*/ {
3323 
3324  /* "PyClical.pyx":109
3325  * elif isinstance(other, str):
3326  * try:
3327  * bother = other.encode("UTF-8") # <<<<<<<<<<<<<<
3328  * self.instance = new IndexSet(<char *>bother)
3329  * except RuntimeError:
3330  */
3331  __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)
3332  __Pyx_GOTREF(__pyx_t_4);
3333  __pyx_t_13 = NULL;
3334  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
3335  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
3336  if (likely(__pyx_t_13)) {
3337  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3338  __Pyx_INCREF(__pyx_t_13);
3339  __Pyx_INCREF(function);
3340  __Pyx_DECREF_SET(__pyx_t_4, function);
3341  }
3342  }
3343  __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);
3344  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3345  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L18_error)
3346  __Pyx_GOTREF(__pyx_t_5);
3347  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3348  __pyx_v_bother = __pyx_t_5;
3349  __pyx_t_5 = 0;
3350 
3351  /* "PyClical.pyx":110
3352  * try:
3353  * bother = other.encode("UTF-8")
3354  * self.instance = new IndexSet(<char *>bother) # <<<<<<<<<<<<<<
3355  * except RuntimeError:
3356  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3357  */
3358  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_bother); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L18_error)
3359  try {
3360  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3361  } catch(...) {
3362  __Pyx_CppExn2PyErr();
3363  __PYX_ERR(0, 110, __pyx_L18_error)
3364  }
3365  __pyx_v_self->instance = __pyx_t_3;
3366 
3367  /* "PyClical.pyx":108
3368  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3369  * elif isinstance(other, str):
3370  * try: # <<<<<<<<<<<<<<
3371  * bother = other.encode("UTF-8")
3372  * self.instance = new IndexSet(<char *>bother)
3373  */
3374  }
3375  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3376  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3377  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3378  goto __pyx_L23_try_end;
3379  __pyx_L18_error:;
3380  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3381  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3382  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3383  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3384  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3385  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3386 
3387  /* "PyClical.pyx":111
3388  * bother = other.encode("UTF-8")
3389  * self.instance = new IndexSet(<char *>bother)
3390  * except RuntimeError: # <<<<<<<<<<<<<<
3391  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3392  * else:
3393  */
3394  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3395  if (__pyx_t_6) {
3396  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3397  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 111, __pyx_L20_except_error)
3398  __Pyx_GOTREF(__pyx_t_5);
3399  __Pyx_GOTREF(__pyx_t_4);
3400  __Pyx_GOTREF(__pyx_t_13);
3401 
3402  /* "PyClical.pyx":112
3403  * self.instance = new IndexSet(<char *>bother)
3404  * except RuntimeError:
3405  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3406  * else:
3407  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3408  */
3409  __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)
3410  __Pyx_GOTREF(__pyx_t_14);
3411  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3412  __Pyx_GOTREF(__pyx_t_15);
3413  __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)
3414  __Pyx_GOTREF(__pyx_t_16);
3415  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3416  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3417  __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)
3418  __Pyx_GOTREF(__pyx_t_15);
3419  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3420  __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)
3421  __Pyx_GOTREF(__pyx_t_16);
3422  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3423  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3424  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3425  __PYX_ERR(0, 112, __pyx_L20_except_error)
3426  }
3427  goto __pyx_L20_except_error;
3428  __pyx_L20_except_error:;
3429 
3430  /* "PyClical.pyx":108
3431  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3432  * elif isinstance(other, str):
3433  * try: # <<<<<<<<<<<<<<
3434  * bother = other.encode("UTF-8")
3435  * self.instance = new IndexSet(<char *>bother)
3436  */
3437  __Pyx_XGIVEREF(__pyx_t_10);
3438  __Pyx_XGIVEREF(__pyx_t_9);
3439  __Pyx_XGIVEREF(__pyx_t_8);
3440  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3441  goto __pyx_L1_error;
3442  __pyx_L23_try_end:;
3443  }
3444 
3445  /* "PyClical.pyx":107
3446  * except (RuntimeError, TypeError):
3447  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3448  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3449  * try:
3450  * bother = other.encode("UTF-8")
3451  */
3452  goto __pyx_L3;
3453  }
3454 
3455  /* "PyClical.pyx":114
3456  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3457  * else:
3458  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3459  *
3460  * def __dealloc__(self):
3461  */
3462  /*else*/ {
3463  __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)
3464  __Pyx_GOTREF(__pyx_t_13);
3465  __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)
3466  __Pyx_GOTREF(__pyx_t_4);
3467  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
3468  __Pyx_GOTREF(__pyx_t_5);
3469  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3470  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3471  __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
3472  __Pyx_GOTREF(__pyx_t_4);
3473  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3474  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
3475  __Pyx_GOTREF(__pyx_t_5);
3476  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3477  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3478  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3479  __PYX_ERR(0, 114, __pyx_L1_error)
3480  }
3481  __pyx_L3:;
3482 
3483  /* "PyClical.pyx":74
3484  * return index_set(self)
3485  *
3486  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3487  * """
3488  * Construct an object of type index_set.
3489  */
3490 
3491  /* function exit code */
3492  __pyx_r = 0;
3493  goto __pyx_L0;
3494  __pyx_L1_error:;
3495  __Pyx_XDECREF(__pyx_t_4);
3496  __Pyx_XDECREF(__pyx_t_5);
3497  __Pyx_XDECREF(__pyx_t_13);
3498  __Pyx_XDECREF(__pyx_t_14);
3499  __Pyx_XDECREF(__pyx_t_15);
3500  __Pyx_XDECREF(__pyx_t_16);
3501  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3502  __pyx_r = -1;
3503  __pyx_L0:;
3504  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3505  __Pyx_XDECREF(__pyx_v_idx);
3506  __Pyx_XDECREF(__pyx_v_bother);
3507  __Pyx_RefNannyFinishContext();
3508  return __pyx_r;
3509 }
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 /* Python wrapper */
3520 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3521 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3522  __Pyx_RefNannyDeclarations
3523  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3524  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3525 
3526  /* function exit code */
3527  __Pyx_RefNannyFinishContext();
3528 }
3529 
3530 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3531  __Pyx_RefNannyDeclarations
3532  __Pyx_RefNannySetupContext("__dealloc__", 0);
3533 
3534  /* "PyClical.pyx":120
3535  * Clean up by deallocating the instance of C++ class IndexSet.
3536  * """
3537  * del self.instance # <<<<<<<<<<<<<<
3538  *
3539  * def __richcmp__(lhs, rhs, int op):
3540  */
3541  delete __pyx_v_self->instance;
3542 
3543  /* "PyClical.pyx":116
3544  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3545  *
3546  * def __dealloc__(self): # <<<<<<<<<<<<<<
3547  * """
3548  * Clean up by deallocating the instance of C++ class IndexSet.
3549  */
3550 
3551  /* function exit code */
3552  __Pyx_RefNannyFinishContext();
3553 }
3554 
3555 /* "PyClical.pyx":122
3556  * del self.instance
3557  *
3558  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3559  * """
3560  * Compare two objects of class index_set.
3561  */
3562 
3563 /* Python wrapper */
3564 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3565 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3566  PyObject *__pyx_r = 0;
3567  __Pyx_RefNannyDeclarations
3568  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3569  __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));
3570 
3571  /* function exit code */
3572  __Pyx_RefNannyFinishContext();
3573  return __pyx_r;
3574 }
3575 
3576 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) {
3577  PyObject *__pyx_v_eq = NULL;
3578  PyObject *__pyx_v_lt = NULL;
3579  PyObject *__pyx_r = NULL;
3580  __Pyx_RefNannyDeclarations
3581  int __pyx_t_1;
3582  int __pyx_t_2;
3583  int __pyx_t_3;
3584  PyObject *__pyx_t_4 = NULL;
3585  int __pyx_lineno = 0;
3586  const char *__pyx_filename = NULL;
3587  int __pyx_clineno = 0;
3588  __Pyx_RefNannySetupContext("__richcmp__", 0);
3589 
3590  /* "PyClical.pyx":143
3591  * False
3592  * """
3593  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3594  * eq = bool(lhs is rhs)
3595  * if op == 2: # ==
3596  */
3597  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3598  __pyx_t_3 = (__pyx_t_2 != 0);
3599  if (!__pyx_t_3) {
3600  } else {
3601  __pyx_t_1 = __pyx_t_3;
3602  goto __pyx_L4_bool_binop_done;
3603  }
3604  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3605  __pyx_t_2 = (__pyx_t_3 != 0);
3606  __pyx_t_1 = __pyx_t_2;
3607  __pyx_L4_bool_binop_done:;
3608  if (__pyx_t_1) {
3609 
3610  /* "PyClical.pyx":144
3611  * """
3612  * if (lhs is None) or (rhs is None):
3613  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3614  * if op == 2: # ==
3615  * return eq
3616  */
3617  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3618  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
3619  __Pyx_GOTREF(__pyx_t_4);
3620  __pyx_v_eq = __pyx_t_4;
3621  __pyx_t_4 = 0;
3622 
3623  /* "PyClical.pyx":145
3624  * if (lhs is None) or (rhs is None):
3625  * eq = bool(lhs is rhs)
3626  * if op == 2: # == # <<<<<<<<<<<<<<
3627  * return eq
3628  * elif op == 3: # !=
3629  */
3630  switch (__pyx_v_op) {
3631  case 2:
3632 
3633  /* "PyClical.pyx":146
3634  * eq = bool(lhs is rhs)
3635  * if op == 2: # ==
3636  * return eq # <<<<<<<<<<<<<<
3637  * elif op == 3: # !=
3638  * return not eq
3639  */
3640  __Pyx_XDECREF(__pyx_r);
3641  __Pyx_INCREF(__pyx_v_eq);
3642  __pyx_r = __pyx_v_eq;
3643  goto __pyx_L0;
3644 
3645  /* "PyClical.pyx":145
3646  * if (lhs is None) or (rhs is None):
3647  * eq = bool(lhs is rhs)
3648  * if op == 2: # == # <<<<<<<<<<<<<<
3649  * return eq
3650  * elif op == 3: # !=
3651  */
3652  break;
3653  case 3:
3654 
3655  /* "PyClical.pyx":148
3656  * return eq
3657  * elif op == 3: # !=
3658  * return not eq # <<<<<<<<<<<<<<
3659  * else:
3660  * if op == 0: # <
3661  */
3662  __Pyx_XDECREF(__pyx_r);
3663  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 148, __pyx_L1_error)
3664  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
3665  __Pyx_GOTREF(__pyx_t_4);
3666  __pyx_r = __pyx_t_4;
3667  __pyx_t_4 = 0;
3668  goto __pyx_L0;
3669 
3670  /* "PyClical.pyx":147
3671  * if op == 2: # ==
3672  * return eq
3673  * elif op == 3: # != # <<<<<<<<<<<<<<
3674  * return not eq
3675  * else:
3676  */
3677  break;
3678  default:
3679 
3680  /* "PyClical.pyx":150
3681  * return not eq
3682  * else:
3683  * if op == 0: # < # <<<<<<<<<<<<<<
3684  * return False
3685  * elif op == 1: # <=
3686  */
3687  switch (__pyx_v_op) {
3688  case 0:
3689 
3690  /* "PyClical.pyx":151
3691  * else:
3692  * if op == 0: # <
3693  * return False # <<<<<<<<<<<<<<
3694  * elif op == 1: # <=
3695  * return eq
3696  */
3697  __Pyx_XDECREF(__pyx_r);
3698  __Pyx_INCREF(Py_False);
3699  __pyx_r = Py_False;
3700  goto __pyx_L0;
3701 
3702  /* "PyClical.pyx":150
3703  * return not eq
3704  * else:
3705  * if op == 0: # < # <<<<<<<<<<<<<<
3706  * return False
3707  * elif op == 1: # <=
3708  */
3709  break;
3710  case 1:
3711 
3712  /* "PyClical.pyx":153
3713  * return False
3714  * elif op == 1: # <=
3715  * return eq # <<<<<<<<<<<<<<
3716  * elif op == 4: # >
3717  * return False
3718  */
3719  __Pyx_XDECREF(__pyx_r);
3720  __Pyx_INCREF(__pyx_v_eq);
3721  __pyx_r = __pyx_v_eq;
3722  goto __pyx_L0;
3723 
3724  /* "PyClical.pyx":152
3725  * if op == 0: # <
3726  * return False
3727  * elif op == 1: # <= # <<<<<<<<<<<<<<
3728  * return eq
3729  * elif op == 4: # >
3730  */
3731  break;
3732  case 4:
3733 
3734  /* "PyClical.pyx":155
3735  * return eq
3736  * elif op == 4: # >
3737  * return False # <<<<<<<<<<<<<<
3738  * elif op == 5: # >=
3739  * return eq
3740  */
3741  __Pyx_XDECREF(__pyx_r);
3742  __Pyx_INCREF(Py_False);
3743  __pyx_r = Py_False;
3744  goto __pyx_L0;
3745 
3746  /* "PyClical.pyx":154
3747  * elif op == 1: # <=
3748  * return eq
3749  * elif op == 4: # > # <<<<<<<<<<<<<<
3750  * return False
3751  * elif op == 5: # >=
3752  */
3753  break;
3754  case 5:
3755 
3756  /* "PyClical.pyx":157
3757  * return False
3758  * elif op == 5: # >=
3759  * return eq # <<<<<<<<<<<<<<
3760  * else:
3761  * return NotImplemented
3762  */
3763  __Pyx_XDECREF(__pyx_r);
3764  __Pyx_INCREF(__pyx_v_eq);
3765  __pyx_r = __pyx_v_eq;
3766  goto __pyx_L0;
3767 
3768  /* "PyClical.pyx":156
3769  * elif op == 4: # >
3770  * return False
3771  * elif op == 5: # >= # <<<<<<<<<<<<<<
3772  * return eq
3773  * else:
3774  */
3775  break;
3776  default:
3777 
3778  /* "PyClical.pyx":159
3779  * return eq
3780  * else:
3781  * return NotImplemented # <<<<<<<<<<<<<<
3782  * else:
3783  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3784  */
3785  __Pyx_XDECREF(__pyx_r);
3786  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3787  __pyx_r = __pyx_builtin_NotImplemented;
3788  goto __pyx_L0;
3789  break;
3790  }
3791  break;
3792  }
3793 
3794  /* "PyClical.pyx":143
3795  * False
3796  * """
3797  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3798  * eq = bool(lhs is rhs)
3799  * if op == 2: # ==
3800  */
3801  }
3802 
3803  /* "PyClical.pyx":161
3804  * return NotImplemented
3805  * else:
3806  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3807  * if op == 2: # ==
3808  * return eq
3809  */
3810  /*else*/ {
3811  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3812  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
3813  __Pyx_GOTREF(__pyx_t_4);
3814  __pyx_v_eq = __pyx_t_4;
3815  __pyx_t_4 = 0;
3816 
3817  /* "PyClical.pyx":162
3818  * else:
3819  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3820  * if op == 2: # == # <<<<<<<<<<<<<<
3821  * return eq
3822  * elif op == 3: # !=
3823  */
3824  switch (__pyx_v_op) {
3825  case 2:
3826 
3827  /* "PyClical.pyx":163
3828  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3829  * if op == 2: # ==
3830  * return eq # <<<<<<<<<<<<<<
3831  * elif op == 3: # !=
3832  * return not eq
3833  */
3834  __Pyx_XDECREF(__pyx_r);
3835  __Pyx_INCREF(__pyx_v_eq);
3836  __pyx_r = __pyx_v_eq;
3837  goto __pyx_L0;
3838 
3839  /* "PyClical.pyx":162
3840  * else:
3841  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3842  * if op == 2: # == # <<<<<<<<<<<<<<
3843  * return eq
3844  * elif op == 3: # !=
3845  */
3846  break;
3847  case 3:
3848 
3849  /* "PyClical.pyx":165
3850  * return eq
3851  * elif op == 3: # !=
3852  * return not eq # <<<<<<<<<<<<<<
3853  * else:
3854  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3855  */
3856  __Pyx_XDECREF(__pyx_r);
3857  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 165, __pyx_L1_error)
3858  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3859  __Pyx_GOTREF(__pyx_t_4);
3860  __pyx_r = __pyx_t_4;
3861  __pyx_t_4 = 0;
3862  goto __pyx_L0;
3863 
3864  /* "PyClical.pyx":164
3865  * if op == 2: # ==
3866  * return eq
3867  * elif op == 3: # != # <<<<<<<<<<<<<<
3868  * return not eq
3869  * else:
3870  */
3871  break;
3872  default:
3873 
3874  /* "PyClical.pyx":167
3875  * return not eq
3876  * else:
3877  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3878  * if op == 0: # <
3879  * return lt
3880  */
3881  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3882  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
3883  __Pyx_GOTREF(__pyx_t_4);
3884  __pyx_v_lt = __pyx_t_4;
3885  __pyx_t_4 = 0;
3886 
3887  /* "PyClical.pyx":168
3888  * else:
3889  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3890  * if op == 0: # < # <<<<<<<<<<<<<<
3891  * return lt
3892  * elif op == 1: # <=
3893  */
3894  switch (__pyx_v_op) {
3895  case 0:
3896 
3897  /* "PyClical.pyx":169
3898  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3899  * if op == 0: # <
3900  * return lt # <<<<<<<<<<<<<<
3901  * elif op == 1: # <=
3902  * return lt or eq
3903  */
3904  __Pyx_XDECREF(__pyx_r);
3905  __Pyx_INCREF(__pyx_v_lt);
3906  __pyx_r = __pyx_v_lt;
3907  goto __pyx_L0;
3908 
3909  /* "PyClical.pyx":168
3910  * else:
3911  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3912  * if op == 0: # < # <<<<<<<<<<<<<<
3913  * return lt
3914  * elif op == 1: # <=
3915  */
3916  break;
3917  case 1:
3918 
3919  /* "PyClical.pyx":171
3920  * return lt
3921  * elif op == 1: # <=
3922  * return lt or eq # <<<<<<<<<<<<<<
3923  * elif op == 4: # >
3924  * return not (lt or eq)
3925  */
3926  __Pyx_XDECREF(__pyx_r);
3927  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3928  if (!__pyx_t_1) {
3929  } else {
3930  __Pyx_INCREF(__pyx_v_lt);
3931  __pyx_t_4 = __pyx_v_lt;
3932  goto __pyx_L6_bool_binop_done;
3933  }
3934  __Pyx_INCREF(__pyx_v_eq);
3935  __pyx_t_4 = __pyx_v_eq;
3936  __pyx_L6_bool_binop_done:;
3937  __pyx_r = __pyx_t_4;
3938  __pyx_t_4 = 0;
3939  goto __pyx_L0;
3940 
3941  /* "PyClical.pyx":170
3942  * if op == 0: # <
3943  * return lt
3944  * elif op == 1: # <= # <<<<<<<<<<<<<<
3945  * return lt or eq
3946  * elif op == 4: # >
3947  */
3948  break;
3949  case 4:
3950 
3951  /* "PyClical.pyx":173
3952  * return lt or eq
3953  * elif op == 4: # >
3954  * return not (lt or eq) # <<<<<<<<<<<<<<
3955  * elif op == 5: # >=
3956  * return not lt
3957  */
3958  __Pyx_XDECREF(__pyx_r);
3959  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3960  if (!__pyx_t_2) {
3961  } else {
3962  __pyx_t_1 = __pyx_t_2;
3963  goto __pyx_L8_bool_binop_done;
3964  }
3965  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3966  __pyx_t_1 = __pyx_t_2;
3967  __pyx_L8_bool_binop_done:;
3968  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3969  __Pyx_GOTREF(__pyx_t_4);
3970  __pyx_r = __pyx_t_4;
3971  __pyx_t_4 = 0;
3972  goto __pyx_L0;
3973 
3974  /* "PyClical.pyx":172
3975  * elif op == 1: # <=
3976  * return lt or eq
3977  * elif op == 4: # > # <<<<<<<<<<<<<<
3978  * return not (lt or eq)
3979  * elif op == 5: # >=
3980  */
3981  break;
3982  case 5:
3983 
3984  /* "PyClical.pyx":175
3985  * return not (lt or eq)
3986  * elif op == 5: # >=
3987  * return not lt # <<<<<<<<<<<<<<
3988  * else:
3989  * return NotImplemented
3990  */
3991  __Pyx_XDECREF(__pyx_r);
3992  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 175, __pyx_L1_error)
3993  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
3994  __Pyx_GOTREF(__pyx_t_4);
3995  __pyx_r = __pyx_t_4;
3996  __pyx_t_4 = 0;
3997  goto __pyx_L0;
3998 
3999  /* "PyClical.pyx":174
4000  * elif op == 4: # >
4001  * return not (lt or eq)
4002  * elif op == 5: # >= # <<<<<<<<<<<<<<
4003  * return not lt
4004  * else:
4005  */
4006  break;
4007  default:
4008 
4009  /* "PyClical.pyx":177
4010  * return not lt
4011  * else:
4012  * return NotImplemented # <<<<<<<<<<<<<<
4013  *
4014  * def __setitem__(self, idx, val):
4015  */
4016  __Pyx_XDECREF(__pyx_r);
4017  __Pyx_INCREF(__pyx_builtin_NotImplemented);
4018  __pyx_r = __pyx_builtin_NotImplemented;
4019  goto __pyx_L0;
4020  break;
4021  }
4022  break;
4023  }
4024  }
4025 
4026  /* "PyClical.pyx":122
4027  * del self.instance
4028  *
4029  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
4030  * """
4031  * Compare two objects of class index_set.
4032  */
4033 
4034  /* function exit code */
4035  __pyx_L1_error:;
4036  __Pyx_XDECREF(__pyx_t_4);
4037  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4038  __pyx_r = NULL;
4039  __pyx_L0:;
4040  __Pyx_XDECREF(__pyx_v_eq);
4041  __Pyx_XDECREF(__pyx_v_lt);
4042  __Pyx_XGIVEREF(__pyx_r);
4043  __Pyx_RefNannyFinishContext();
4044  return __pyx_r;
4045 }
4046 
4047 /* "PyClical.pyx":179
4048  * return NotImplemented
4049  *
4050  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4051  * """
4052  * Set the value of an index_set object at index idx to value val.
4053  */
4054 
4055 /* Python wrapper */
4056 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
4057 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 ";
4058 #if CYTHON_COMPILING_IN_CPYTHON
4059 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
4060 #endif
4061 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
4062  int __pyx_r;
4063  __Pyx_RefNannyDeclarations
4064  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
4065  __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));
4066 
4067  /* function exit code */
4068  __Pyx_RefNannyFinishContext();
4069  return __pyx_r;
4070 }
4071 
4072 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) {
4073  int __pyx_r;
4074  __Pyx_RefNannyDeclarations
4075  int __pyx_t_1;
4076  int __pyx_t_2;
4077  int __pyx_lineno = 0;
4078  const char *__pyx_filename = NULL;
4079  int __pyx_clineno = 0;
4080  __Pyx_RefNannySetupContext("__setitem__", 0);
4081 
4082  /* "PyClical.pyx":188
4083  * {2}
4084  * """
4085  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
4086  * return
4087  *
4088  */
4089  __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)
4090  __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)
4091  try {
4092  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
4093  } catch(...) {
4094  __Pyx_CppExn2PyErr();
4095  __PYX_ERR(0, 188, __pyx_L1_error)
4096  }
4097 
4098  /* "PyClical.pyx":189
4099  * """
4100  * self.instance.set(idx, val)
4101  * return # <<<<<<<<<<<<<<
4102  *
4103  * def __getitem__(self, idx):
4104  */
4105  __pyx_r = 0;
4106  goto __pyx_L0;
4107 
4108  /* "PyClical.pyx":179
4109  * return NotImplemented
4110  *
4111  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4112  * """
4113  * Set the value of an index_set object at index idx to value val.
4114  */
4115 
4116  /* function exit code */
4117  __pyx_L1_error:;
4118  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4119  __pyx_r = -1;
4120  __pyx_L0:;
4121  __Pyx_RefNannyFinishContext();
4122  return __pyx_r;
4123 }
4124 
4125 /* "PyClical.pyx":191
4126  * return
4127  *
4128  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4129  * """
4130  * Get the value of an index_set object at an index.
4131  */
4132 
4133 /* Python wrapper */
4134 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4135 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 ";
4136 #if CYTHON_COMPILING_IN_CPYTHON
4137 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4138 #endif
4139 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4140  PyObject *__pyx_r = 0;
4141  __Pyx_RefNannyDeclarations
4142  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4143  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4144 
4145  /* function exit code */
4146  __Pyx_RefNannyFinishContext();
4147  return __pyx_r;
4148 }
4149 
4150 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4151  PyObject *__pyx_r = NULL;
4152  __Pyx_RefNannyDeclarations
4153  int __pyx_t_1;
4154  PyObject *__pyx_t_2 = NULL;
4155  int __pyx_lineno = 0;
4156  const char *__pyx_filename = NULL;
4157  int __pyx_clineno = 0;
4158  __Pyx_RefNannySetupContext("__getitem__", 0);
4159 
4160  /* "PyClical.pyx":208
4161  * False
4162  * """
4163  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4164  *
4165  * def __contains__(self, idx):
4166  */
4167  __Pyx_XDECREF(__pyx_r);
4168  __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)
4169  __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)
4170  __Pyx_GOTREF(__pyx_t_2);
4171  __pyx_r = __pyx_t_2;
4172  __pyx_t_2 = 0;
4173  goto __pyx_L0;
4174 
4175  /* "PyClical.pyx":191
4176  * return
4177  *
4178  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4179  * """
4180  * Get the value of an index_set object at an index.
4181  */
4182 
4183  /* function exit code */
4184  __pyx_L1_error:;
4185  __Pyx_XDECREF(__pyx_t_2);
4186  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4187  __pyx_r = NULL;
4188  __pyx_L0:;
4189  __Pyx_XGIVEREF(__pyx_r);
4190  __Pyx_RefNannyFinishContext();
4191  return __pyx_r;
4192 }
4193 
4194 /* "PyClical.pyx":210
4195  * return self.instance.getitem(idx)
4196  *
4197  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4198  * """
4199  * Check that an index_set object contains the index idx: idx in self.
4200  */
4201 
4202 /* Python wrapper */
4203 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4204 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 ";
4205 #if CYTHON_COMPILING_IN_CPYTHON
4206 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4207 #endif
4208 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4209  int __pyx_r;
4210  __Pyx_RefNannyDeclarations
4211  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4212  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4213 
4214  /* function exit code */
4215  __Pyx_RefNannyFinishContext();
4216  return __pyx_r;
4217 }
4218 
4219 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4220  int __pyx_r;
4221  __Pyx_RefNannyDeclarations
4222  int __pyx_t_1;
4223  int __pyx_lineno = 0;
4224  const char *__pyx_filename = NULL;
4225  int __pyx_clineno = 0;
4226  __Pyx_RefNannySetupContext("__contains__", 0);
4227 
4228  /* "PyClical.pyx":227
4229  * False
4230  * """
4231  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4232  *
4233  * def __iter__(self):
4234  */
4235  __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)
4236  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4237  goto __pyx_L0;
4238 
4239  /* "PyClical.pyx":210
4240  * return self.instance.getitem(idx)
4241  *
4242  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4243  * """
4244  * Check that an index_set object contains the index idx: idx in self.
4245  */
4246 
4247  /* function exit code */
4248  __pyx_L1_error:;
4249  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4250  __pyx_r = -1;
4251  __pyx_L0:;
4252  __Pyx_RefNannyFinishContext();
4253  return __pyx_r;
4254 }
4255 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4256 
4257 /* "PyClical.pyx":229
4258  * return self.instance.getitem(idx)
4259  *
4260  * def __iter__(self): # <<<<<<<<<<<<<<
4261  * """
4262  * Iterate over the indices of an index_set.
4263  */
4264 
4265 /* Python wrapper */
4266 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4267 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 ";
4268 #if CYTHON_COMPILING_IN_CPYTHON
4269 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4270 #endif
4271 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4272  PyObject *__pyx_r = 0;
4273  __Pyx_RefNannyDeclarations
4274  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4275  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4276 
4277  /* function exit code */
4278  __Pyx_RefNannyFinishContext();
4279  return __pyx_r;
4280 }
4281 
4282 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4283  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4284  PyObject *__pyx_r = NULL;
4285  __Pyx_RefNannyDeclarations
4286  int __pyx_lineno = 0;
4287  const char *__pyx_filename = NULL;
4288  int __pyx_clineno = 0;
4289  __Pyx_RefNannySetupContext("__iter__", 0);
4290  __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);
4291  if (unlikely(!__pyx_cur_scope)) {
4292  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4293  __Pyx_INCREF(Py_None);
4294  __PYX_ERR(0, 229, __pyx_L1_error)
4295  } else {
4296  __Pyx_GOTREF(__pyx_cur_scope);
4297  }
4298  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4299  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4300  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4301  {
4302  __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)
4303  __Pyx_DECREF(__pyx_cur_scope);
4304  __Pyx_RefNannyFinishContext();
4305  return (PyObject *) gen;
4306  }
4307 
4308  /* function exit code */
4309  __pyx_L1_error:;
4310  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4311  __pyx_r = NULL;
4312  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4313  __Pyx_XGIVEREF(__pyx_r);
4314  __Pyx_RefNannyFinishContext();
4315  return __pyx_r;
4316 }
4317 
4318 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4319 {
4320  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4321  PyObject *__pyx_r = NULL;
4322  PyObject *__pyx_t_1 = NULL;
4323  PyObject *__pyx_t_2 = NULL;
4324  PyObject *__pyx_t_3 = NULL;
4325  PyObject *__pyx_t_4 = NULL;
4326  Py_ssize_t __pyx_t_5;
4327  PyObject *(*__pyx_t_6)(PyObject *);
4328  int __pyx_t_7;
4329  int __pyx_t_8;
4330  int __pyx_lineno = 0;
4331  const char *__pyx_filename = NULL;
4332  int __pyx_clineno = 0;
4333  __Pyx_RefNannyDeclarations
4334  __Pyx_RefNannySetupContext("__iter__", 0);
4335  switch (__pyx_generator->resume_label) {
4336  case 0: goto __pyx_L3_first_run;
4337  case 1: goto __pyx_L7_resume_from_yield;
4338  default: /* CPython raises the right error here */
4339  __Pyx_RefNannyFinishContext();
4340  return NULL;
4341  }
4342  __pyx_L3_first_run:;
4343  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 229, __pyx_L1_error)
4344 
4345  /* "PyClical.pyx":236
4346  * -3,4,7,
4347  * """
4348  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4349  * if idx in self:
4350  * yield idx
4351  */
4352  __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)
4353  __Pyx_GOTREF(__pyx_t_2);
4354  __pyx_t_3 = NULL;
4355  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4356  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4357  if (likely(__pyx_t_3)) {
4358  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4359  __Pyx_INCREF(__pyx_t_3);
4360  __Pyx_INCREF(function);
4361  __Pyx_DECREF_SET(__pyx_t_2, function);
4362  }
4363  }
4364  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4365  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4366  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
4367  __Pyx_GOTREF(__pyx_t_1);
4368  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4369  __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)
4370  __Pyx_GOTREF(__pyx_t_3);
4371  __pyx_t_4 = NULL;
4372  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4373  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4374  if (likely(__pyx_t_4)) {
4375  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4376  __Pyx_INCREF(__pyx_t_4);
4377  __Pyx_INCREF(function);
4378  __Pyx_DECREF_SET(__pyx_t_3, function);
4379  }
4380  }
4381  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4382  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4383  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4384  __Pyx_GOTREF(__pyx_t_2);
4385  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4386  __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)
4387  __Pyx_GOTREF(__pyx_t_3);
4388  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4389  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4390  __Pyx_GOTREF(__pyx_t_2);
4391  __Pyx_GIVEREF(__pyx_t_1);
4392  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4393  __Pyx_GIVEREF(__pyx_t_3);
4394  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4395  __pyx_t_1 = 0;
4396  __pyx_t_3 = 0;
4397  __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)
4398  __Pyx_GOTREF(__pyx_t_3);
4399  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4400  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4401  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4402  __pyx_t_6 = NULL;
4403  } else {
4404  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4405  __Pyx_GOTREF(__pyx_t_2);
4406  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error)
4407  }
4408  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4409  for (;;) {
4410  if (likely(!__pyx_t_6)) {
4411  if (likely(PyList_CheckExact(__pyx_t_2))) {
4412  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4413  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4414  __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)
4415  #else
4416  __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)
4417  __Pyx_GOTREF(__pyx_t_3);
4418  #endif
4419  } else {
4420  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4421  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4422  __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)
4423  #else
4424  __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)
4425  __Pyx_GOTREF(__pyx_t_3);
4426  #endif
4427  }
4428  } else {
4429  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4430  if (unlikely(!__pyx_t_3)) {
4431  PyObject* exc_type = PyErr_Occurred();
4432  if (exc_type) {
4433  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4434  else __PYX_ERR(0, 236, __pyx_L1_error)
4435  }
4436  break;
4437  }
4438  __Pyx_GOTREF(__pyx_t_3);
4439  }
4440  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4441  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4442  __Pyx_GIVEREF(__pyx_t_3);
4443  __pyx_t_3 = 0;
4444 
4445  /* "PyClical.pyx":237
4446  * """
4447  * for idx in range(self.min(), self.max()+1):
4448  * if idx in self: # <<<<<<<<<<<<<<
4449  * yield idx
4450  *
4451  */
4452  __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)
4453  __pyx_t_8 = (__pyx_t_7 != 0);
4454  if (__pyx_t_8) {
4455 
4456  /* "PyClical.pyx":238
4457  * for idx in range(self.min(), self.max()+1):
4458  * if idx in self:
4459  * yield idx # <<<<<<<<<<<<<<
4460  *
4461  * def __invert__(self):
4462  */
4463  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4464  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4465  __Pyx_XGIVEREF(__pyx_t_2);
4466  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4467  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4468  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4469  __Pyx_XGIVEREF(__pyx_r);
4470  __Pyx_RefNannyFinishContext();
4471  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4472  /* return from generator, yielding value */
4473  __pyx_generator->resume_label = 1;
4474  return __pyx_r;
4475  __pyx_L7_resume_from_yield:;
4476  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4477  __pyx_cur_scope->__pyx_t_0 = 0;
4478  __Pyx_XGOTREF(__pyx_t_2);
4479  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4480  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4481  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error)
4482 
4483  /* "PyClical.pyx":237
4484  * """
4485  * for idx in range(self.min(), self.max()+1):
4486  * if idx in self: # <<<<<<<<<<<<<<
4487  * yield idx
4488  *
4489  */
4490  }
4491 
4492  /* "PyClical.pyx":236
4493  * -3,4,7,
4494  * """
4495  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4496  * if idx in self:
4497  * yield idx
4498  */
4499  }
4500  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4501  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4502 
4503  /* "PyClical.pyx":229
4504  * return self.instance.getitem(idx)
4505  *
4506  * def __iter__(self): # <<<<<<<<<<<<<<
4507  * """
4508  * Iterate over the indices of an index_set.
4509  */
4510 
4511  /* function exit code */
4512  PyErr_SetNone(PyExc_StopIteration);
4513  goto __pyx_L0;
4514  __pyx_L1_error:;
4515  __Pyx_XDECREF(__pyx_t_1);
4516  __Pyx_XDECREF(__pyx_t_2);
4517  __Pyx_XDECREF(__pyx_t_3);
4518  __Pyx_XDECREF(__pyx_t_4);
4519  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4520  __pyx_L0:;
4521  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4522  #if !CYTHON_USE_EXC_INFO_STACK
4523  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4524  #endif
4525  __pyx_generator->resume_label = -1;
4526  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4527  __Pyx_RefNannyFinishContext();
4528  return __pyx_r;
4529 }
4530 
4531 /* "PyClical.pyx":240
4532  * yield idx
4533  *
4534  * def __invert__(self): # <<<<<<<<<<<<<<
4535  * """
4536  * Set complement: not.
4537  */
4538 
4539 /* Python wrapper */
4540 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4541 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 ";
4542 #if CYTHON_COMPILING_IN_CPYTHON
4543 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4544 #endif
4545 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4546  PyObject *__pyx_r = 0;
4547  __Pyx_RefNannyDeclarations
4548  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4549  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4550 
4551  /* function exit code */
4552  __Pyx_RefNannyFinishContext();
4553  return __pyx_r;
4554 }
4555 
4556 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4557  PyObject *__pyx_r = NULL;
4558  __Pyx_RefNannyDeclarations
4559  PyObject *__pyx_t_1 = NULL;
4560  PyObject *__pyx_t_2 = NULL;
4561  int __pyx_lineno = 0;
4562  const char *__pyx_filename = NULL;
4563  int __pyx_clineno = 0;
4564  __Pyx_RefNannySetupContext("__invert__", 0);
4565 
4566  /* "PyClical.pyx":247
4567  * {-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}
4568  * """
4569  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4570  *
4571  * def __xor__(lhs, rhs):
4572  */
4573  __Pyx_XDECREF(__pyx_r);
4574  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
4575  __Pyx_GOTREF(__pyx_t_1);
4576  __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)
4577  __Pyx_GOTREF(__pyx_t_2);
4578  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4579  __pyx_r = __pyx_t_2;
4580  __pyx_t_2 = 0;
4581  goto __pyx_L0;
4582 
4583  /* "PyClical.pyx":240
4584  * yield idx
4585  *
4586  * def __invert__(self): # <<<<<<<<<<<<<<
4587  * """
4588  * Set complement: not.
4589  */
4590 
4591  /* function exit code */
4592  __pyx_L1_error:;
4593  __Pyx_XDECREF(__pyx_t_1);
4594  __Pyx_XDECREF(__pyx_t_2);
4595  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4596  __pyx_r = NULL;
4597  __pyx_L0:;
4598  __Pyx_XGIVEREF(__pyx_r);
4599  __Pyx_RefNannyFinishContext();
4600  return __pyx_r;
4601 }
4602 
4603 /* "PyClical.pyx":249
4604  * return index_set().wrap( self.instance.invert() )
4605  *
4606  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4607  * """
4608  * Symmetric set difference: exclusive or.
4609  */
4610 
4611 /* Python wrapper */
4612 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4613 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 ";
4614 #if CYTHON_COMPILING_IN_CPYTHON
4615 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4616 #endif
4617 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4618  PyObject *__pyx_r = 0;
4619  __Pyx_RefNannyDeclarations
4620  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4621  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4622 
4623  /* function exit code */
4624  __Pyx_RefNannyFinishContext();
4625  return __pyx_r;
4626 }
4627 
4628 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4629  PyObject *__pyx_r = NULL;
4630  __Pyx_RefNannyDeclarations
4631  PyObject *__pyx_t_1 = NULL;
4632  PyObject *__pyx_t_2 = NULL;
4633  int __pyx_lineno = 0;
4634  const char *__pyx_filename = NULL;
4635  int __pyx_clineno = 0;
4636  __Pyx_RefNannySetupContext("__xor__", 0);
4637 
4638  /* "PyClical.pyx":258
4639  * {1}
4640  * """
4641  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4642  *
4643  * def __ixor__(self, rhs):
4644  */
4645  __Pyx_XDECREF(__pyx_r);
4646  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
4647  __Pyx_GOTREF(__pyx_t_1);
4648  __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)
4649  __Pyx_GOTREF(__pyx_t_2);
4650  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4651  __pyx_r = __pyx_t_2;
4652  __pyx_t_2 = 0;
4653  goto __pyx_L0;
4654 
4655  /* "PyClical.pyx":249
4656  * return index_set().wrap( self.instance.invert() )
4657  *
4658  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4659  * """
4660  * Symmetric set difference: exclusive or.
4661  */
4662 
4663  /* function exit code */
4664  __pyx_L1_error:;
4665  __Pyx_XDECREF(__pyx_t_1);
4666  __Pyx_XDECREF(__pyx_t_2);
4667  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4668  __pyx_r = NULL;
4669  __pyx_L0:;
4670  __Pyx_XGIVEREF(__pyx_r);
4671  __Pyx_RefNannyFinishContext();
4672  return __pyx_r;
4673 }
4674 
4675 /* "PyClical.pyx":260
4676  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4677  *
4678  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4679  * """
4680  * Symmetric set difference: exclusive or.
4681  */
4682 
4683 /* Python wrapper */
4684 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4685 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 ";
4686 #if CYTHON_COMPILING_IN_CPYTHON
4687 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4688 #endif
4689 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4690  PyObject *__pyx_r = 0;
4691  __Pyx_RefNannyDeclarations
4692  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4693  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4694 
4695  /* function exit code */
4696  __Pyx_RefNannyFinishContext();
4697  return __pyx_r;
4698 }
4699 
4700 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4701  PyObject *__pyx_r = NULL;
4702  __Pyx_RefNannyDeclarations
4703  PyObject *__pyx_t_1 = NULL;
4704  int __pyx_lineno = 0;
4705  const char *__pyx_filename = NULL;
4706  int __pyx_clineno = 0;
4707  __Pyx_RefNannySetupContext("__ixor__", 0);
4708 
4709  /* "PyClical.pyx":269
4710  * {1}
4711  * """
4712  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4713  *
4714  * def __and__(lhs, rhs):
4715  */
4716  __Pyx_XDECREF(__pyx_r);
4717  __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)
4718  __Pyx_GOTREF(__pyx_t_1);
4719  __pyx_r = __pyx_t_1;
4720  __pyx_t_1 = 0;
4721  goto __pyx_L0;
4722 
4723  /* "PyClical.pyx":260
4724  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4725  *
4726  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4727  * """
4728  * Symmetric set difference: exclusive or.
4729  */
4730 
4731  /* function exit code */
4732  __pyx_L1_error:;
4733  __Pyx_XDECREF(__pyx_t_1);
4734  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4735  __pyx_r = NULL;
4736  __pyx_L0:;
4737  __Pyx_XGIVEREF(__pyx_r);
4738  __Pyx_RefNannyFinishContext();
4739  return __pyx_r;
4740 }
4741 
4742 /* "PyClical.pyx":271
4743  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4744  *
4745  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4746  * """
4747  * Set intersection: and.
4748  */
4749 
4750 /* Python wrapper */
4751 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4752 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 ";
4753 #if CYTHON_COMPILING_IN_CPYTHON
4754 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4755 #endif
4756 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4757  PyObject *__pyx_r = 0;
4758  __Pyx_RefNannyDeclarations
4759  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4760  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4761 
4762  /* function exit code */
4763  __Pyx_RefNannyFinishContext();
4764  return __pyx_r;
4765 }
4766 
4767 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4768  PyObject *__pyx_r = NULL;
4769  __Pyx_RefNannyDeclarations
4770  PyObject *__pyx_t_1 = NULL;
4771  PyObject *__pyx_t_2 = NULL;
4772  int __pyx_lineno = 0;
4773  const char *__pyx_filename = NULL;
4774  int __pyx_clineno = 0;
4775  __Pyx_RefNannySetupContext("__and__", 0);
4776 
4777  /* "PyClical.pyx":280
4778  * {2}
4779  * """
4780  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4781  *
4782  * def __iand__(self, rhs):
4783  */
4784  __Pyx_XDECREF(__pyx_r);
4785  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
4786  __Pyx_GOTREF(__pyx_t_1);
4787  __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)
4788  __Pyx_GOTREF(__pyx_t_2);
4789  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4790  __pyx_r = __pyx_t_2;
4791  __pyx_t_2 = 0;
4792  goto __pyx_L0;
4793 
4794  /* "PyClical.pyx":271
4795  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4796  *
4797  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4798  * """
4799  * Set intersection: and.
4800  */
4801 
4802  /* function exit code */
4803  __pyx_L1_error:;
4804  __Pyx_XDECREF(__pyx_t_1);
4805  __Pyx_XDECREF(__pyx_t_2);
4806  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4807  __pyx_r = NULL;
4808  __pyx_L0:;
4809  __Pyx_XGIVEREF(__pyx_r);
4810  __Pyx_RefNannyFinishContext();
4811  return __pyx_r;
4812 }
4813 
4814 /* "PyClical.pyx":282
4815  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4816  *
4817  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4818  * """
4819  * Set intersection: and.
4820  */
4821 
4822 /* Python wrapper */
4823 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4824 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 ";
4825 #if CYTHON_COMPILING_IN_CPYTHON
4826 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4827 #endif
4828 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4829  PyObject *__pyx_r = 0;
4830  __Pyx_RefNannyDeclarations
4831  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4832  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4833 
4834  /* function exit code */
4835  __Pyx_RefNannyFinishContext();
4836  return __pyx_r;
4837 }
4838 
4839 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4840  PyObject *__pyx_r = NULL;
4841  __Pyx_RefNannyDeclarations
4842  PyObject *__pyx_t_1 = NULL;
4843  int __pyx_lineno = 0;
4844  const char *__pyx_filename = NULL;
4845  int __pyx_clineno = 0;
4846  __Pyx_RefNannySetupContext("__iand__", 0);
4847 
4848  /* "PyClical.pyx":291
4849  * {2}
4850  * """
4851  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4852  *
4853  * def __or__(lhs, rhs):
4854  */
4855  __Pyx_XDECREF(__pyx_r);
4856  __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)
4857  __Pyx_GOTREF(__pyx_t_1);
4858  __pyx_r = __pyx_t_1;
4859  __pyx_t_1 = 0;
4860  goto __pyx_L0;
4861 
4862  /* "PyClical.pyx":282
4863  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4864  *
4865  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4866  * """
4867  * Set intersection: and.
4868  */
4869 
4870  /* function exit code */
4871  __pyx_L1_error:;
4872  __Pyx_XDECREF(__pyx_t_1);
4873  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4874  __pyx_r = NULL;
4875  __pyx_L0:;
4876  __Pyx_XGIVEREF(__pyx_r);
4877  __Pyx_RefNannyFinishContext();
4878  return __pyx_r;
4879 }
4880 
4881 /* "PyClical.pyx":293
4882  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4883  *
4884  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4885  * """
4886  * Set union: or.
4887  */
4888 
4889 /* Python wrapper */
4890 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4891 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 ";
4892 #if CYTHON_COMPILING_IN_CPYTHON
4893 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4894 #endif
4895 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4896  PyObject *__pyx_r = 0;
4897  __Pyx_RefNannyDeclarations
4898  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4899  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4900 
4901  /* function exit code */
4902  __Pyx_RefNannyFinishContext();
4903  return __pyx_r;
4904 }
4905 
4906 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4907  PyObject *__pyx_r = NULL;
4908  __Pyx_RefNannyDeclarations
4909  PyObject *__pyx_t_1 = NULL;
4910  PyObject *__pyx_t_2 = NULL;
4911  int __pyx_lineno = 0;
4912  const char *__pyx_filename = NULL;
4913  int __pyx_clineno = 0;
4914  __Pyx_RefNannySetupContext("__or__", 0);
4915 
4916  /* "PyClical.pyx":302
4917  * {1,2}
4918  * """
4919  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4920  *
4921  * def __ior__(self, rhs):
4922  */
4923  __Pyx_XDECREF(__pyx_r);
4924  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
4925  __Pyx_GOTREF(__pyx_t_1);
4926  __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)
4927  __Pyx_GOTREF(__pyx_t_2);
4928  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4929  __pyx_r = __pyx_t_2;
4930  __pyx_t_2 = 0;
4931  goto __pyx_L0;
4932 
4933  /* "PyClical.pyx":293
4934  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4935  *
4936  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4937  * """
4938  * Set union: or.
4939  */
4940 
4941  /* function exit code */
4942  __pyx_L1_error:;
4943  __Pyx_XDECREF(__pyx_t_1);
4944  __Pyx_XDECREF(__pyx_t_2);
4945  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4946  __pyx_r = NULL;
4947  __pyx_L0:;
4948  __Pyx_XGIVEREF(__pyx_r);
4949  __Pyx_RefNannyFinishContext();
4950  return __pyx_r;
4951 }
4952 
4953 /* "PyClical.pyx":304
4954  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4955  *
4956  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4957  * """
4958  * Set union: or.
4959  */
4960 
4961 /* Python wrapper */
4962 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4963 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 ";
4964 #if CYTHON_COMPILING_IN_CPYTHON
4965 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4966 #endif
4967 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4968  PyObject *__pyx_r = 0;
4969  __Pyx_RefNannyDeclarations
4970  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4971  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4972 
4973  /* function exit code */
4974  __Pyx_RefNannyFinishContext();
4975  return __pyx_r;
4976 }
4977 
4978 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4979  PyObject *__pyx_r = NULL;
4980  __Pyx_RefNannyDeclarations
4981  PyObject *__pyx_t_1 = NULL;
4982  int __pyx_lineno = 0;
4983  const char *__pyx_filename = NULL;
4984  int __pyx_clineno = 0;
4985  __Pyx_RefNannySetupContext("__ior__", 0);
4986 
4987  /* "PyClical.pyx":313
4988  * {1,2}
4989  * """
4990  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4991  *
4992  * def count(self):
4993  */
4994  __Pyx_XDECREF(__pyx_r);
4995  __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)
4996  __Pyx_GOTREF(__pyx_t_1);
4997  __pyx_r = __pyx_t_1;
4998  __pyx_t_1 = 0;
4999  goto __pyx_L0;
5000 
5001  /* "PyClical.pyx":304
5002  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
5003  *
5004  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
5005  * """
5006  * Set union: or.
5007  */
5008 
5009  /* function exit code */
5010  __pyx_L1_error:;
5011  __Pyx_XDECREF(__pyx_t_1);
5012  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5013  __pyx_r = NULL;
5014  __pyx_L0:;
5015  __Pyx_XGIVEREF(__pyx_r);
5016  __Pyx_RefNannyFinishContext();
5017  return __pyx_r;
5018 }
5019 
5020 /* "PyClical.pyx":315
5021  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
5022  *
5023  * def count(self): # <<<<<<<<<<<<<<
5024  * """
5025  * Cardinality: Number of indices included in set.
5026  */
5027 
5028 /* Python wrapper */
5029 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5030 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 ";
5031 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5032  PyObject *__pyx_r = 0;
5033  __Pyx_RefNannyDeclarations
5034  __Pyx_RefNannySetupContext("count (wrapper)", 0);
5035  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5036 
5037  /* function exit code */
5038  __Pyx_RefNannyFinishContext();
5039  return __pyx_r;
5040 }
5041 
5042 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5043  PyObject *__pyx_r = NULL;
5044  __Pyx_RefNannyDeclarations
5045  PyObject *__pyx_t_1 = NULL;
5046  int __pyx_lineno = 0;
5047  const char *__pyx_filename = NULL;
5048  int __pyx_clineno = 0;
5049  __Pyx_RefNannySetupContext("count", 0);
5050 
5051  /* "PyClical.pyx":322
5052  * 3
5053  * """
5054  * return self.instance.count() # <<<<<<<<<<<<<<
5055  *
5056  * def count_neg(self):
5057  */
5058  __Pyx_XDECREF(__pyx_r);
5059  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
5060  __Pyx_GOTREF(__pyx_t_1);
5061  __pyx_r = __pyx_t_1;
5062  __pyx_t_1 = 0;
5063  goto __pyx_L0;
5064 
5065  /* "PyClical.pyx":315
5066  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
5067  *
5068  * def count(self): # <<<<<<<<<<<<<<
5069  * """
5070  * Cardinality: Number of indices included in set.
5071  */
5072 
5073  /* function exit code */
5074  __pyx_L1_error:;
5075  __Pyx_XDECREF(__pyx_t_1);
5076  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
5077  __pyx_r = NULL;
5078  __pyx_L0:;
5079  __Pyx_XGIVEREF(__pyx_r);
5080  __Pyx_RefNannyFinishContext();
5081  return __pyx_r;
5082 }
5083 
5084 /* "PyClical.pyx":324
5085  * return self.instance.count()
5086  *
5087  * def count_neg(self): # <<<<<<<<<<<<<<
5088  * """
5089  * Number of negative indices included in set.
5090  */
5091 
5092 /* Python wrapper */
5093 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5094 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 ";
5095 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5096  PyObject *__pyx_r = 0;
5097  __Pyx_RefNannyDeclarations
5098  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
5099  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5100 
5101  /* function exit code */
5102  __Pyx_RefNannyFinishContext();
5103  return __pyx_r;
5104 }
5105 
5106 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5107  PyObject *__pyx_r = NULL;
5108  __Pyx_RefNannyDeclarations
5109  PyObject *__pyx_t_1 = NULL;
5110  int __pyx_lineno = 0;
5111  const char *__pyx_filename = NULL;
5112  int __pyx_clineno = 0;
5113  __Pyx_RefNannySetupContext("count_neg", 0);
5114 
5115  /* "PyClical.pyx":331
5116  * 1
5117  * """
5118  * return self.instance.count_neg() # <<<<<<<<<<<<<<
5119  *
5120  * def count_pos(self):
5121  */
5122  __Pyx_XDECREF(__pyx_r);
5123  __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)
5124  __Pyx_GOTREF(__pyx_t_1);
5125  __pyx_r = __pyx_t_1;
5126  __pyx_t_1 = 0;
5127  goto __pyx_L0;
5128 
5129  /* "PyClical.pyx":324
5130  * return self.instance.count()
5131  *
5132  * def count_neg(self): # <<<<<<<<<<<<<<
5133  * """
5134  * Number of negative indices included in set.
5135  */
5136 
5137  /* function exit code */
5138  __pyx_L1_error:;
5139  __Pyx_XDECREF(__pyx_t_1);
5140  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5141  __pyx_r = NULL;
5142  __pyx_L0:;
5143  __Pyx_XGIVEREF(__pyx_r);
5144  __Pyx_RefNannyFinishContext();
5145  return __pyx_r;
5146 }
5147 
5148 /* "PyClical.pyx":333
5149  * return self.instance.count_neg()
5150  *
5151  * def count_pos(self): # <<<<<<<<<<<<<<
5152  * """
5153  * Number of positive indices included in set.
5154  */
5155 
5156 /* Python wrapper */
5157 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5158 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 ";
5159 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5160  PyObject *__pyx_r = 0;
5161  __Pyx_RefNannyDeclarations
5162  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5163  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5164 
5165  /* function exit code */
5166  __Pyx_RefNannyFinishContext();
5167  return __pyx_r;
5168 }
5169 
5170 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5171  PyObject *__pyx_r = NULL;
5172  __Pyx_RefNannyDeclarations
5173  PyObject *__pyx_t_1 = NULL;
5174  int __pyx_lineno = 0;
5175  const char *__pyx_filename = NULL;
5176  int __pyx_clineno = 0;
5177  __Pyx_RefNannySetupContext("count_pos", 0);
5178 
5179  /* "PyClical.pyx":340
5180  * 2
5181  * """
5182  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5183  *
5184  * def min(self):
5185  */
5186  __Pyx_XDECREF(__pyx_r);
5187  __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)
5188  __Pyx_GOTREF(__pyx_t_1);
5189  __pyx_r = __pyx_t_1;
5190  __pyx_t_1 = 0;
5191  goto __pyx_L0;
5192 
5193  /* "PyClical.pyx":333
5194  * return self.instance.count_neg()
5195  *
5196  * def count_pos(self): # <<<<<<<<<<<<<<
5197  * """
5198  * Number of positive indices included in set.
5199  */
5200 
5201  /* function exit code */
5202  __pyx_L1_error:;
5203  __Pyx_XDECREF(__pyx_t_1);
5204  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5205  __pyx_r = NULL;
5206  __pyx_L0:;
5207  __Pyx_XGIVEREF(__pyx_r);
5208  __Pyx_RefNannyFinishContext();
5209  return __pyx_r;
5210 }
5211 
5212 /* "PyClical.pyx":342
5213  * return self.instance.count_pos()
5214  *
5215  * def min(self): # <<<<<<<<<<<<<<
5216  * """
5217  * Minimum member.
5218  */
5219 
5220 /* Python wrapper */
5221 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5222 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5223 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5224  PyObject *__pyx_r = 0;
5225  __Pyx_RefNannyDeclarations
5226  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5227  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5228 
5229  /* function exit code */
5230  __Pyx_RefNannyFinishContext();
5231  return __pyx_r;
5232 }
5233 
5234 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5235  PyObject *__pyx_r = NULL;
5236  __Pyx_RefNannyDeclarations
5237  PyObject *__pyx_t_1 = NULL;
5238  int __pyx_lineno = 0;
5239  const char *__pyx_filename = NULL;
5240  int __pyx_clineno = 0;
5241  __Pyx_RefNannySetupContext("min", 0);
5242 
5243  /* "PyClical.pyx":349
5244  * -1
5245  * """
5246  * return self.instance.min() # <<<<<<<<<<<<<<
5247  *
5248  * def max(self):
5249  */
5250  __Pyx_XDECREF(__pyx_r);
5251  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
5252  __Pyx_GOTREF(__pyx_t_1);
5253  __pyx_r = __pyx_t_1;
5254  __pyx_t_1 = 0;
5255  goto __pyx_L0;
5256 
5257  /* "PyClical.pyx":342
5258  * return self.instance.count_pos()
5259  *
5260  * def min(self): # <<<<<<<<<<<<<<
5261  * """
5262  * Minimum member.
5263  */
5264 
5265  /* function exit code */
5266  __pyx_L1_error:;
5267  __Pyx_XDECREF(__pyx_t_1);
5268  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5269  __pyx_r = NULL;
5270  __pyx_L0:;
5271  __Pyx_XGIVEREF(__pyx_r);
5272  __Pyx_RefNannyFinishContext();
5273  return __pyx_r;
5274 }
5275 
5276 /* "PyClical.pyx":351
5277  * return self.instance.min()
5278  *
5279  * def max(self): # <<<<<<<<<<<<<<
5280  * """
5281  * Maximum member.
5282  */
5283 
5284 /* Python wrapper */
5285 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5286 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5287 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5288  PyObject *__pyx_r = 0;
5289  __Pyx_RefNannyDeclarations
5290  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5291  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5292 
5293  /* function exit code */
5294  __Pyx_RefNannyFinishContext();
5295  return __pyx_r;
5296 }
5297 
5298 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5299  PyObject *__pyx_r = NULL;
5300  __Pyx_RefNannyDeclarations
5301  PyObject *__pyx_t_1 = NULL;
5302  int __pyx_lineno = 0;
5303  const char *__pyx_filename = NULL;
5304  int __pyx_clineno = 0;
5305  __Pyx_RefNannySetupContext("max", 0);
5306 
5307  /* "PyClical.pyx":358
5308  * 2
5309  * """
5310  * return self.instance.max() # <<<<<<<<<<<<<<
5311  *
5312  * def hash_fn(self):
5313  */
5314  __Pyx_XDECREF(__pyx_r);
5315  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
5316  __Pyx_GOTREF(__pyx_t_1);
5317  __pyx_r = __pyx_t_1;
5318  __pyx_t_1 = 0;
5319  goto __pyx_L0;
5320 
5321  /* "PyClical.pyx":351
5322  * return self.instance.min()
5323  *
5324  * def max(self): # <<<<<<<<<<<<<<
5325  * """
5326  * Maximum member.
5327  */
5328 
5329  /* function exit code */
5330  __pyx_L1_error:;
5331  __Pyx_XDECREF(__pyx_t_1);
5332  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5333  __pyx_r = NULL;
5334  __pyx_L0:;
5335  __Pyx_XGIVEREF(__pyx_r);
5336  __Pyx_RefNannyFinishContext();
5337  return __pyx_r;
5338 }
5339 
5340 /* "PyClical.pyx":360
5341  * return self.instance.max()
5342  *
5343  * def hash_fn(self): # <<<<<<<<<<<<<<
5344  * """
5345  * Hash function.
5346  */
5347 
5348 /* Python wrapper */
5349 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5350 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5351 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5352  PyObject *__pyx_r = 0;
5353  __Pyx_RefNannyDeclarations
5354  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5355  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5356 
5357  /* function exit code */
5358  __Pyx_RefNannyFinishContext();
5359  return __pyx_r;
5360 }
5361 
5362 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5363  PyObject *__pyx_r = NULL;
5364  __Pyx_RefNannyDeclarations
5365  PyObject *__pyx_t_1 = NULL;
5366  int __pyx_lineno = 0;
5367  const char *__pyx_filename = NULL;
5368  int __pyx_clineno = 0;
5369  __Pyx_RefNannySetupContext("hash_fn", 0);
5370 
5371  /* "PyClical.pyx":364
5372  * Hash function.
5373  * """
5374  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5375  *
5376  * def sign_of_mult(self, rhs):
5377  */
5378  __Pyx_XDECREF(__pyx_r);
5379  __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)
5380  __Pyx_GOTREF(__pyx_t_1);
5381  __pyx_r = __pyx_t_1;
5382  __pyx_t_1 = 0;
5383  goto __pyx_L0;
5384 
5385  /* "PyClical.pyx":360
5386  * return self.instance.max()
5387  *
5388  * def hash_fn(self): # <<<<<<<<<<<<<<
5389  * """
5390  * Hash function.
5391  */
5392 
5393  /* function exit code */
5394  __pyx_L1_error:;
5395  __Pyx_XDECREF(__pyx_t_1);
5396  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5397  __pyx_r = NULL;
5398  __pyx_L0:;
5399  __Pyx_XGIVEREF(__pyx_r);
5400  __Pyx_RefNannyFinishContext();
5401  return __pyx_r;
5402 }
5403 
5404 /* "PyClical.pyx":366
5405  * return self.instance.hash_fn()
5406  *
5407  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5408  * """
5409  * Sign of geometric product of two Clifford basis elements.
5410  */
5411 
5412 /* Python wrapper */
5413 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5414 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 ";
5415 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5416  PyObject *__pyx_r = 0;
5417  __Pyx_RefNannyDeclarations
5418  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5419  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5420 
5421  /* function exit code */
5422  __Pyx_RefNannyFinishContext();
5423  return __pyx_r;
5424 }
5425 
5426 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5427  PyObject *__pyx_r = NULL;
5428  __Pyx_RefNannyDeclarations
5429  PyObject *__pyx_t_1 = NULL;
5430  int __pyx_lineno = 0;
5431  const char *__pyx_filename = NULL;
5432  int __pyx_clineno = 0;
5433  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5434 
5435  /* "PyClical.pyx":373
5436  * 1
5437  * """
5438  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5439  *
5440  * def sign_of_square(self):
5441  */
5442  __Pyx_XDECREF(__pyx_r);
5443  __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)
5444  __Pyx_GOTREF(__pyx_t_1);
5445  __pyx_r = __pyx_t_1;
5446  __pyx_t_1 = 0;
5447  goto __pyx_L0;
5448 
5449  /* "PyClical.pyx":366
5450  * return self.instance.hash_fn()
5451  *
5452  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5453  * """
5454  * Sign of geometric product of two Clifford basis elements.
5455  */
5456 
5457  /* function exit code */
5458  __pyx_L1_error:;
5459  __Pyx_XDECREF(__pyx_t_1);
5460  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5461  __pyx_r = NULL;
5462  __pyx_L0:;
5463  __Pyx_XGIVEREF(__pyx_r);
5464  __Pyx_RefNannyFinishContext();
5465  return __pyx_r;
5466 }
5467 
5468 /* "PyClical.pyx":375
5469  * return self.instance.sign_of_mult(toIndexSet(rhs))
5470  *
5471  * def sign_of_square(self): # <<<<<<<<<<<<<<
5472  * """
5473  * Sign of geometric square of a Clifford basis element.
5474  */
5475 
5476 /* Python wrapper */
5477 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5478 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 ";
5479 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5480  PyObject *__pyx_r = 0;
5481  __Pyx_RefNannyDeclarations
5482  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5483  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5484 
5485  /* function exit code */
5486  __Pyx_RefNannyFinishContext();
5487  return __pyx_r;
5488 }
5489 
5490 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5491  PyObject *__pyx_r = NULL;
5492  __Pyx_RefNannyDeclarations
5493  PyObject *__pyx_t_1 = NULL;
5494  int __pyx_lineno = 0;
5495  const char *__pyx_filename = NULL;
5496  int __pyx_clineno = 0;
5497  __Pyx_RefNannySetupContext("sign_of_square", 0);
5498 
5499  /* "PyClical.pyx":382
5500  * -1
5501  * """
5502  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5503  *
5504  * def __repr__(self):
5505  */
5506  __Pyx_XDECREF(__pyx_r);
5507  __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)
5508  __Pyx_GOTREF(__pyx_t_1);
5509  __pyx_r = __pyx_t_1;
5510  __pyx_t_1 = 0;
5511  goto __pyx_L0;
5512 
5513  /* "PyClical.pyx":375
5514  * return self.instance.sign_of_mult(toIndexSet(rhs))
5515  *
5516  * def sign_of_square(self): # <<<<<<<<<<<<<<
5517  * """
5518  * Sign of geometric square of a Clifford basis element.
5519  */
5520 
5521  /* function exit code */
5522  __pyx_L1_error:;
5523  __Pyx_XDECREF(__pyx_t_1);
5524  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5525  __pyx_r = NULL;
5526  __pyx_L0:;
5527  __Pyx_XGIVEREF(__pyx_r);
5528  __Pyx_RefNannyFinishContext();
5529  return __pyx_r;
5530 }
5531 
5532 /* "PyClical.pyx":384
5533  * return self.instance.sign_of_square()
5534  *
5535  * def __repr__(self): # <<<<<<<<<<<<<<
5536  * """
5537  * The official string representation of self.
5538  */
5539 
5540 /* Python wrapper */
5541 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5542 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 ";
5543 #if CYTHON_COMPILING_IN_CPYTHON
5544 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5545 #endif
5546 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5547  PyObject *__pyx_r = 0;
5548  __Pyx_RefNannyDeclarations
5549  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5550  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5551 
5552  /* function exit code */
5553  __Pyx_RefNannyFinishContext();
5554  return __pyx_r;
5555 }
5556 
5557 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5558  PyObject *__pyx_r = NULL;
5559  __Pyx_RefNannyDeclarations
5560  PyObject *__pyx_t_1 = NULL;
5561  int __pyx_lineno = 0;
5562  const char *__pyx_filename = NULL;
5563  int __pyx_clineno = 0;
5564  __Pyx_RefNannySetupContext("__repr__", 0);
5565 
5566  /* "PyClical.pyx":393
5567  * 'index_set({1,2})'
5568  * """
5569  * return index_set_to_repr( self.unwrap() ).decode() # <<<<<<<<<<<<<<
5570  *
5571  * def __str__(self):
5572  */
5573  __Pyx_XDECREF(__pyx_r);
5574  __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)
5575  __Pyx_GOTREF(__pyx_t_1);
5576  __pyx_r = __pyx_t_1;
5577  __pyx_t_1 = 0;
5578  goto __pyx_L0;
5579 
5580  /* "PyClical.pyx":384
5581  * return self.instance.sign_of_square()
5582  *
5583  * def __repr__(self): # <<<<<<<<<<<<<<
5584  * """
5585  * The official string representation of self.
5586  */
5587 
5588  /* function exit code */
5589  __pyx_L1_error:;
5590  __Pyx_XDECREF(__pyx_t_1);
5591  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5592  __pyx_r = NULL;
5593  __pyx_L0:;
5594  __Pyx_XGIVEREF(__pyx_r);
5595  __Pyx_RefNannyFinishContext();
5596  return __pyx_r;
5597 }
5598 
5599 /* "PyClical.pyx":395
5600  * return index_set_to_repr( self.unwrap() ).decode()
5601  *
5602  * def __str__(self): # <<<<<<<<<<<<<<
5603  * """
5604  * The informal string representation of self.
5605  */
5606 
5607 /* Python wrapper */
5608 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5609 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 ";
5610 #if CYTHON_COMPILING_IN_CPYTHON
5611 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5612 #endif
5613 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5614  PyObject *__pyx_r = 0;
5615  __Pyx_RefNannyDeclarations
5616  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5617  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5618 
5619  /* function exit code */
5620  __Pyx_RefNannyFinishContext();
5621  return __pyx_r;
5622 }
5623 
5624 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5625  PyObject *__pyx_r = NULL;
5626  __Pyx_RefNannyDeclarations
5627  PyObject *__pyx_t_1 = NULL;
5628  int __pyx_lineno = 0;
5629  const char *__pyx_filename = NULL;
5630  int __pyx_clineno = 0;
5631  __Pyx_RefNannySetupContext("__str__", 0);
5632 
5633  /* "PyClical.pyx":404
5634  * '{1,2}'
5635  * """
5636  * return index_set_to_str( self.unwrap() ).decode() # <<<<<<<<<<<<<<
5637  *
5638  * def index_set_hidden_doctests():
5639  */
5640  __Pyx_XDECREF(__pyx_r);
5641  __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)
5642  __Pyx_GOTREF(__pyx_t_1);
5643  __pyx_r = __pyx_t_1;
5644  __pyx_t_1 = 0;
5645  goto __pyx_L0;
5646 
5647  /* "PyClical.pyx":395
5648  * return index_set_to_repr( self.unwrap() ).decode()
5649  *
5650  * def __str__(self): # <<<<<<<<<<<<<<
5651  * """
5652  * The informal string representation of self.
5653  */
5654 
5655  /* function exit code */
5656  __pyx_L1_error:;
5657  __Pyx_XDECREF(__pyx_t_1);
5658  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5659  __pyx_r = NULL;
5660  __pyx_L0:;
5661  __Pyx_XGIVEREF(__pyx_r);
5662  __Pyx_RefNannyFinishContext();
5663  return __pyx_r;
5664 }
5665 
5666 /* "(tree fragment)":1
5667  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5668  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5669  * def __setstate_cython__(self, __pyx_state):
5670  */
5671 
5672 /* Python wrapper */
5673 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5674 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5675  PyObject *__pyx_r = 0;
5676  __Pyx_RefNannyDeclarations
5677  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5678  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5679 
5680  /* function exit code */
5681  __Pyx_RefNannyFinishContext();
5682  return __pyx_r;
5683 }
5684 
5685 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5686  PyObject *__pyx_r = NULL;
5687  __Pyx_RefNannyDeclarations
5688  PyObject *__pyx_t_1 = NULL;
5689  int __pyx_lineno = 0;
5690  const char *__pyx_filename = NULL;
5691  int __pyx_clineno = 0;
5692  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5693 
5694  /* "(tree fragment)":2
5695  * def __reduce_cython__(self):
5696  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5697  * def __setstate_cython__(self, __pyx_state):
5698  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5699  */
5700  __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)
5701  __Pyx_GOTREF(__pyx_t_1);
5702  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5703  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5704  __PYX_ERR(1, 2, __pyx_L1_error)
5705 
5706  /* "(tree fragment)":1
5707  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5708  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5709  * def __setstate_cython__(self, __pyx_state):
5710  */
5711 
5712  /* function exit code */
5713  __pyx_L1_error:;
5714  __Pyx_XDECREF(__pyx_t_1);
5715  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5716  __pyx_r = NULL;
5717  __Pyx_XGIVEREF(__pyx_r);
5718  __Pyx_RefNannyFinishContext();
5719  return __pyx_r;
5720 }
5721 
5722 /* "(tree fragment)":3
5723  * def __reduce_cython__(self):
5724  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5725  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5726  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5727  */
5728 
5729 /* Python wrapper */
5730 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5731 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5732  PyObject *__pyx_r = 0;
5733  __Pyx_RefNannyDeclarations
5734  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5735  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5736 
5737  /* function exit code */
5738  __Pyx_RefNannyFinishContext();
5739  return __pyx_r;
5740 }
5741 
5742 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) {
5743  PyObject *__pyx_r = NULL;
5744  __Pyx_RefNannyDeclarations
5745  PyObject *__pyx_t_1 = NULL;
5746  int __pyx_lineno = 0;
5747  const char *__pyx_filename = NULL;
5748  int __pyx_clineno = 0;
5749  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5750 
5751  /* "(tree fragment)":4
5752  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5753  * def __setstate_cython__(self, __pyx_state):
5754  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5755  */
5756  __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)
5757  __Pyx_GOTREF(__pyx_t_1);
5758  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5759  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5760  __PYX_ERR(1, 4, __pyx_L1_error)
5761 
5762  /* "(tree fragment)":3
5763  * def __reduce_cython__(self):
5764  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5765  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5766  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5767  */
5768 
5769  /* function exit code */
5770  __pyx_L1_error:;
5771  __Pyx_XDECREF(__pyx_t_1);
5772  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5773  __pyx_r = NULL;
5774  __Pyx_XGIVEREF(__pyx_r);
5775  __Pyx_RefNannyFinishContext();
5776  return __pyx_r;
5777 }
5778 
5779 /* "PyClical.pyx":406
5780  * return index_set_to_str( self.unwrap() ).decode()
5781  *
5782  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5783  * """
5784  * Tests for functions that Doctest cannot see.
5785  */
5786 
5787 /* Python wrapper */
5788 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5789 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 ";
5790  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};
5791  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5792  PyObject *__pyx_r = 0;
5793  __Pyx_RefNannyDeclarations
5794  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5795  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5796 
5797  /* function exit code */
5798  __Pyx_RefNannyFinishContext();
5799  return __pyx_r;
5800  }
5801 
5802  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5803  PyObject *__pyx_r = NULL;
5804  __Pyx_RefNannyDeclarations
5805  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5806 
5807  /* "PyClical.pyx":490
5808  * False
5809  * """
5810  * return # <<<<<<<<<<<<<<
5811  *
5812  * cpdef inline compare(lhs,rhs):
5813  */
5814  __Pyx_XDECREF(__pyx_r);
5815  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5816  goto __pyx_L0;
5817 
5818  /* "PyClical.pyx":406
5819  * return index_set_to_str( self.unwrap() ).decode()
5820  *
5821  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5822  * """
5823  * Tests for functions that Doctest cannot see.
5824  */
5825 
5826  /* function exit code */
5827  __pyx_L0:;
5828  __Pyx_XGIVEREF(__pyx_r);
5829  __Pyx_RefNannyFinishContext();
5830  return __pyx_r;
5831  }
5832 
5833  /* "PyClical.pyx":492
5834  * return
5835  *
5836  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5837  * """
5838  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5839  */
5840 
5841  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5842  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5843  PyObject *__pyx_r = NULL;
5844  __Pyx_RefNannyDeclarations
5845  PyObject *__pyx_t_1 = NULL;
5846  int __pyx_lineno = 0;
5847  const char *__pyx_filename = NULL;
5848  int __pyx_clineno = 0;
5849  __Pyx_RefNannySetupContext("compare", 0);
5850 
5851  /* "PyClical.pyx":502
5852  * 1
5853  * """
5854  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5855  *
5856  * cpdef inline min_neg(obj):
5857  */
5858  __Pyx_XDECREF(__pyx_r);
5859  __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)
5860  __Pyx_GOTREF(__pyx_t_1);
5861  __pyx_r = __pyx_t_1;
5862  __pyx_t_1 = 0;
5863  goto __pyx_L0;
5864 
5865  /* "PyClical.pyx":492
5866  * return
5867  *
5868  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5869  * """
5870  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5871  */
5872 
5873  /* function exit code */
5874  __pyx_L1_error:;
5875  __Pyx_XDECREF(__pyx_t_1);
5876  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5877  __pyx_r = 0;
5878  __pyx_L0:;
5879  __Pyx_XGIVEREF(__pyx_r);
5880  __Pyx_RefNannyFinishContext();
5881  return __pyx_r;
5882  }
5883 
5884  /* Python wrapper */
5885  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5886  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 ";
5887  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5888  PyObject *__pyx_v_lhs = 0;
5889  PyObject *__pyx_v_rhs = 0;
5890  int __pyx_lineno = 0;
5891  const char *__pyx_filename = NULL;
5892  int __pyx_clineno = 0;
5893  PyObject *__pyx_r = 0;
5894  __Pyx_RefNannyDeclarations
5895  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5896  {
5897  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5898  PyObject* values[2] = {0,0};
5899  if (unlikely(__pyx_kwds)) {
5900  Py_ssize_t kw_args;
5901  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5902  switch (pos_args) {
5903  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5904  CYTHON_FALLTHROUGH;
5905  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5906  CYTHON_FALLTHROUGH;
5907  case 0: break;
5908  default: goto __pyx_L5_argtuple_error;
5909  }
5910  kw_args = PyDict_Size(__pyx_kwds);
5911  switch (pos_args) {
5912  case 0:
5913  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5914  else goto __pyx_L5_argtuple_error;
5915  CYTHON_FALLTHROUGH;
5916  case 1:
5917  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5918  else {
5919  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 492, __pyx_L3_error)
5920  }
5921  }
5922  if (unlikely(kw_args > 0)) {
5923  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 492, __pyx_L3_error)
5924  }
5925  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5926  goto __pyx_L5_argtuple_error;
5927  } else {
5928  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5929  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5930  }
5931  __pyx_v_lhs = values[0];
5932  __pyx_v_rhs = values[1];
5933  }
5934  goto __pyx_L4_argument_unpacking_done;
5935  __pyx_L5_argtuple_error:;
5936  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 492, __pyx_L3_error)
5937  __pyx_L3_error:;
5938  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5939  __Pyx_RefNannyFinishContext();
5940  return NULL;
5941  __pyx_L4_argument_unpacking_done:;
5942  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5943 
5944  /* function exit code */
5945  __Pyx_RefNannyFinishContext();
5946  return __pyx_r;
5947  }
5948 
5949  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5950  PyObject *__pyx_r = NULL;
5951  __Pyx_RefNannyDeclarations
5952  PyObject *__pyx_t_1 = NULL;
5953  int __pyx_lineno = 0;
5954  const char *__pyx_filename = NULL;
5955  int __pyx_clineno = 0;
5956  __Pyx_RefNannySetupContext("compare", 0);
5957  __Pyx_XDECREF(__pyx_r);
5958  __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)
5959  __Pyx_GOTREF(__pyx_t_1);
5960  __pyx_r = __pyx_t_1;
5961  __pyx_t_1 = 0;
5962  goto __pyx_L0;
5963 
5964  /* function exit code */
5965  __pyx_L1_error:;
5966  __Pyx_XDECREF(__pyx_t_1);
5967  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5968  __pyx_r = NULL;
5969  __pyx_L0:;
5970  __Pyx_XGIVEREF(__pyx_r);
5971  __Pyx_RefNannyFinishContext();
5972  return __pyx_r;
5973  }
5974 
5975  /* "PyClical.pyx":504
5976  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5977  *
5978  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5979  * """
5980  * Minimum negative index, or 0 if none.
5981  */
5982 
5983  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5984  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5985  PyObject *__pyx_r = NULL;
5986  __Pyx_RefNannyDeclarations
5987  PyObject *__pyx_t_1 = NULL;
5988  int __pyx_lineno = 0;
5989  const char *__pyx_filename = NULL;
5990  int __pyx_clineno = 0;
5991  __Pyx_RefNannySetupContext("min_neg", 0);
5992 
5993  /* "PyClical.pyx":511
5994  * 0
5995  * """
5996  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5997  *
5998  * cpdef inline max_pos(obj):
5999  */
6000  __Pyx_XDECREF(__pyx_r);
6001  __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)
6002  __Pyx_GOTREF(__pyx_t_1);
6003  __pyx_r = __pyx_t_1;
6004  __pyx_t_1 = 0;
6005  goto __pyx_L0;
6006 
6007  /* "PyClical.pyx":504
6008  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
6009  *
6010  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
6011  * """
6012  * Minimum negative index, or 0 if none.
6013  */
6014 
6015  /* function exit code */
6016  __pyx_L1_error:;
6017  __Pyx_XDECREF(__pyx_t_1);
6018  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
6019  __pyx_r = 0;
6020  __pyx_L0:;
6021  __Pyx_XGIVEREF(__pyx_r);
6022  __Pyx_RefNannyFinishContext();
6023  return __pyx_r;
6024  }
6025 
6026  /* Python wrapper */
6027  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6028  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 ";
6029  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6030  PyObject *__pyx_r = 0;
6031  __Pyx_RefNannyDeclarations
6032  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
6033  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
6034 
6035  /* function exit code */
6036  __Pyx_RefNannyFinishContext();
6037  return __pyx_r;
6038  }
6039 
6040  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6041  PyObject *__pyx_r = NULL;
6042  __Pyx_RefNannyDeclarations
6043  PyObject *__pyx_t_1 = NULL;
6044  int __pyx_lineno = 0;
6045  const char *__pyx_filename = NULL;
6046  int __pyx_clineno = 0;
6047  __Pyx_RefNannySetupContext("min_neg", 0);
6048  __Pyx_XDECREF(__pyx_r);
6049  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
6050  __Pyx_GOTREF(__pyx_t_1);
6051  __pyx_r = __pyx_t_1;
6052  __pyx_t_1 = 0;
6053  goto __pyx_L0;
6054 
6055  /* function exit code */
6056  __pyx_L1_error:;
6057  __Pyx_XDECREF(__pyx_t_1);
6058  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
6059  __pyx_r = NULL;
6060  __pyx_L0:;
6061  __Pyx_XGIVEREF(__pyx_r);
6062  __Pyx_RefNannyFinishContext();
6063  return __pyx_r;
6064  }
6065 
6066  /* "PyClical.pyx":513
6067  * return glucat.min_neg( toIndexSet(obj) )
6068  *
6069  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
6070  * """
6071  * Maximum positive index, or 0 if none.
6072  */
6073 
6074  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6075  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
6076  PyObject *__pyx_r = NULL;
6077  __Pyx_RefNannyDeclarations
6078  PyObject *__pyx_t_1 = NULL;
6079  int __pyx_lineno = 0;
6080  const char *__pyx_filename = NULL;
6081  int __pyx_clineno = 0;
6082  __Pyx_RefNannySetupContext("max_pos", 0);
6083 
6084  /* "PyClical.pyx":520
6085  * 2
6086  * """
6087  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
6088  *
6089  * cdef inline vector[scalar_t] list_to_vector(lst):
6090  */
6091  __Pyx_XDECREF(__pyx_r);
6092  __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)
6093  __Pyx_GOTREF(__pyx_t_1);
6094  __pyx_r = __pyx_t_1;
6095  __pyx_t_1 = 0;
6096  goto __pyx_L0;
6097 
6098  /* "PyClical.pyx":513
6099  * return glucat.min_neg( toIndexSet(obj) )
6100  *
6101  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
6102  * """
6103  * Maximum positive index, or 0 if none.
6104  */
6105 
6106  /* function exit code */
6107  __pyx_L1_error:;
6108  __Pyx_XDECREF(__pyx_t_1);
6109  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
6110  __pyx_r = 0;
6111  __pyx_L0:;
6112  __Pyx_XGIVEREF(__pyx_r);
6113  __Pyx_RefNannyFinishContext();
6114  return __pyx_r;
6115  }
6116 
6117  /* Python wrapper */
6118  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6119  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 ";
6120  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6121  PyObject *__pyx_r = 0;
6122  __Pyx_RefNannyDeclarations
6123  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
6124  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
6125 
6126  /* function exit code */
6127  __Pyx_RefNannyFinishContext();
6128  return __pyx_r;
6129  }
6130 
6131  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6132  PyObject *__pyx_r = NULL;
6133  __Pyx_RefNannyDeclarations
6134  PyObject *__pyx_t_1 = NULL;
6135  int __pyx_lineno = 0;
6136  const char *__pyx_filename = NULL;
6137  int __pyx_clineno = 0;
6138  __Pyx_RefNannySetupContext("max_pos", 0);
6139  __Pyx_XDECREF(__pyx_r);
6140  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
6141  __Pyx_GOTREF(__pyx_t_1);
6142  __pyx_r = __pyx_t_1;
6143  __pyx_t_1 = 0;
6144  goto __pyx_L0;
6145 
6146  /* function exit code */
6147  __pyx_L1_error:;
6148  __Pyx_XDECREF(__pyx_t_1);
6149  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
6150  __pyx_r = NULL;
6151  __pyx_L0:;
6152  __Pyx_XGIVEREF(__pyx_r);
6153  __Pyx_RefNannyFinishContext();
6154  return __pyx_r;
6155  }
6156 
6157  /* "PyClical.pyx":522
6158  * return glucat.max_pos( toIndexSet(obj) )
6159  *
6160  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6161  * """
6162  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6163  */
6164 
6165  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
6166  std::vector<scalar_t> __pyx_v_v;
6167  PyObject *__pyx_v_s = NULL;
6168  std::vector<scalar_t> __pyx_r;
6169  __Pyx_RefNannyDeclarations
6170  PyObject *__pyx_t_1 = NULL;
6171  Py_ssize_t __pyx_t_2;
6172  PyObject *(*__pyx_t_3)(PyObject *);
6173  PyObject *__pyx_t_4 = NULL;
6174  scalar_t __pyx_t_5;
6175  int __pyx_lineno = 0;
6176  const char *__pyx_filename = NULL;
6177  int __pyx_clineno = 0;
6178  __Pyx_RefNannySetupContext("list_to_vector", 0);
6179 
6180  /* "PyClical.pyx":527
6181  * """
6182  * cdef vector[scalar_t] v
6183  * for s in lst: # <<<<<<<<<<<<<<
6184  * v.push_back(<scalar_t>s)
6185  * return v
6186  */
6187  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
6188  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
6189  __pyx_t_3 = NULL;
6190  } else {
6191  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
6192  __Pyx_GOTREF(__pyx_t_1);
6193  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
6194  }
6195  for (;;) {
6196  if (likely(!__pyx_t_3)) {
6197  if (likely(PyList_CheckExact(__pyx_t_1))) {
6198  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
6199  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6200  __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)
6201  #else
6202  __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)
6203  __Pyx_GOTREF(__pyx_t_4);
6204  #endif
6205  } else {
6206  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
6207  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6208  __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)
6209  #else
6210  __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)
6211  __Pyx_GOTREF(__pyx_t_4);
6212  #endif
6213  }
6214  } else {
6215  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6216  if (unlikely(!__pyx_t_4)) {
6217  PyObject* exc_type = PyErr_Occurred();
6218  if (exc_type) {
6219  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6220  else __PYX_ERR(0, 527, __pyx_L1_error)
6221  }
6222  break;
6223  }
6224  __Pyx_GOTREF(__pyx_t_4);
6225  }
6226  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6227  __pyx_t_4 = 0;
6228 
6229  /* "PyClical.pyx":528
6230  * cdef vector[scalar_t] v
6231  * for s in lst:
6232  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6233  * return v
6234  *
6235  */
6236  __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)
6237  try {
6238  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6239  } catch(...) {
6240  __Pyx_CppExn2PyErr();
6241  __PYX_ERR(0, 528, __pyx_L1_error)
6242  }
6243 
6244  /* "PyClical.pyx":527
6245  * """
6246  * cdef vector[scalar_t] v
6247  * for s in lst: # <<<<<<<<<<<<<<
6248  * v.push_back(<scalar_t>s)
6249  * return v
6250  */
6251  }
6252  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6253 
6254  /* "PyClical.pyx":529
6255  * for s in lst:
6256  * v.push_back(<scalar_t>s)
6257  * return v # <<<<<<<<<<<<<<
6258  *
6259  * # Forward reference.
6260  */
6261  __pyx_r = __pyx_v_v;
6262  goto __pyx_L0;
6263 
6264  /* "PyClical.pyx":522
6265  * return glucat.max_pos( toIndexSet(obj) )
6266  *
6267  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6268  * """
6269  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6270  */
6271 
6272  /* function exit code */
6273  __pyx_L1_error:;
6274  __Pyx_XDECREF(__pyx_t_1);
6275  __Pyx_XDECREF(__pyx_t_4);
6276  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6277  __Pyx_pretend_to_initialize(&__pyx_r);
6278  __pyx_L0:;
6279  __Pyx_XDECREF(__pyx_v_s);
6280  __Pyx_RefNannyFinishContext();
6281  return __pyx_r;
6282  }
6283 
6284  /* "PyClical.pyx":534
6285  * cdef class clifford
6286  *
6287  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6288  * return clifford(obj).instance[0]
6289  *
6290  */
6291 
6292  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6293  Clifford __pyx_r;
6294  __Pyx_RefNannyDeclarations
6295  PyObject *__pyx_t_1 = NULL;
6296  int __pyx_lineno = 0;
6297  const char *__pyx_filename = NULL;
6298  int __pyx_clineno = 0;
6299  __Pyx_RefNannySetupContext("toClifford", 0);
6300 
6301  /* "PyClical.pyx":535
6302  *
6303  * cdef inline Clifford toClifford(obj):
6304  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6305  *
6306  * cdef class clifford:
6307  */
6308  __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)
6309  __Pyx_GOTREF(__pyx_t_1);
6310  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6311  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6312  goto __pyx_L0;
6313 
6314  /* "PyClical.pyx":534
6315  * cdef class clifford
6316  *
6317  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6318  * return clifford(obj).instance[0]
6319  *
6320  */
6321 
6322  /* function exit code */
6323  __pyx_L1_error:;
6324  __Pyx_XDECREF(__pyx_t_1);
6325  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6326  __Pyx_pretend_to_initialize(&__pyx_r);
6327  __pyx_L0:;
6328  __Pyx_RefNannyFinishContext();
6329  return __pyx_r;
6330  }
6331 
6332  /* "PyClical.pyx":543
6333  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6334  *
6335  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6336  * """
6337  * Wrap an instance of the C++ class Clifford.
6338  */
6339 
6340  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6341  PyObject *__pyx_r = NULL;
6342  __Pyx_RefNannyDeclarations
6343  __Pyx_RefNannySetupContext("wrap", 0);
6344 
6345  /* "PyClical.pyx":547
6346  * Wrap an instance of the C++ class Clifford.
6347  * """
6348  * self.instance[0] = other # <<<<<<<<<<<<<<
6349  * return self
6350  *
6351  */
6352  (__pyx_v_self->instance[0]) = __pyx_v_other;
6353 
6354  /* "PyClical.pyx":548
6355  * """
6356  * self.instance[0] = other
6357  * return self # <<<<<<<<<<<<<<
6358  *
6359  * cdef inline Clifford unwrap(clifford self):
6360  */
6361  __Pyx_XDECREF(__pyx_r);
6362  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6363  __pyx_r = ((PyObject *)__pyx_v_self);
6364  goto __pyx_L0;
6365 
6366  /* "PyClical.pyx":543
6367  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6368  *
6369  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6370  * """
6371  * Wrap an instance of the C++ class Clifford.
6372  */
6373 
6374  /* function exit code */
6375  __pyx_L0:;
6376  __Pyx_XGIVEREF(__pyx_r);
6377  __Pyx_RefNannyFinishContext();
6378  return __pyx_r;
6379  }
6380 
6381  /* "PyClical.pyx":550
6382  * return self
6383  *
6384  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6385  * """
6386  * Return the wrapped C++ Clifford instance.
6387  */
6388 
6389  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6390  Clifford __pyx_r;
6391  __Pyx_RefNannyDeclarations
6392  __Pyx_RefNannySetupContext("unwrap", 0);
6393 
6394  /* "PyClical.pyx":554
6395  * Return the wrapped C++ Clifford instance.
6396  * """
6397  * return self.instance[0] # <<<<<<<<<<<<<<
6398  *
6399  * cpdef copy(clifford self):
6400  */
6401  __pyx_r = (__pyx_v_self->instance[0]);
6402  goto __pyx_L0;
6403 
6404  /* "PyClical.pyx":550
6405  * return self
6406  *
6407  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6408  * """
6409  * Return the wrapped C++ Clifford instance.
6410  */
6411 
6412  /* function exit code */
6413  __pyx_L0:;
6414  __Pyx_RefNannyFinishContext();
6415  return __pyx_r;
6416  }
6417 
6418  /* "PyClical.pyx":556
6419  * return self.instance[0]
6420  *
6421  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6422  * """
6423  * Copy this clifford object.
6424  */
6425 
6426  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6427  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6428  PyObject *__pyx_r = NULL;
6429  __Pyx_RefNannyDeclarations
6430  PyObject *__pyx_t_1 = NULL;
6431  PyObject *__pyx_t_2 = NULL;
6432  PyObject *__pyx_t_3 = NULL;
6433  PyObject *__pyx_t_4 = NULL;
6434  int __pyx_lineno = 0;
6435  const char *__pyx_filename = NULL;
6436  int __pyx_clineno = 0;
6437  __Pyx_RefNannySetupContext("copy", 0);
6438  /* Check if called by wrapper */
6439  if (unlikely(__pyx_skip_dispatch)) ;
6440  /* Check if overridden in Python */
6441  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)))) {
6442  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6443  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6444  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6445  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6446  #endif
6447  __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)
6448  __Pyx_GOTREF(__pyx_t_1);
6449  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6450  __Pyx_XDECREF(__pyx_r);
6451  __Pyx_INCREF(__pyx_t_1);
6452  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6453  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6454  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6455  if (likely(__pyx_t_4)) {
6456  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6457  __Pyx_INCREF(__pyx_t_4);
6458  __Pyx_INCREF(function);
6459  __Pyx_DECREF_SET(__pyx_t_3, function);
6460  }
6461  }
6462  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6463  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6464  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
6465  __Pyx_GOTREF(__pyx_t_2);
6466  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6467  __pyx_r = __pyx_t_2;
6468  __pyx_t_2 = 0;
6469  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6470  goto __pyx_L0;
6471  }
6472  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6473  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6474  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6475  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6476  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6477  }
6478  #endif
6479  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6480  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6481  }
6482  #endif
6483  }
6484 
6485  /* "PyClical.pyx":563
6486  * {2}
6487  * """
6488  * return clifford(self) # <<<<<<<<<<<<<<
6489  *
6490  * def __cinit__(self, other = 0, ixt = None):
6491  */
6492  __Pyx_XDECREF(__pyx_r);
6493  __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)
6494  __Pyx_GOTREF(__pyx_t_1);
6495  __pyx_r = __pyx_t_1;
6496  __pyx_t_1 = 0;
6497  goto __pyx_L0;
6498 
6499  /* "PyClical.pyx":556
6500  * return self.instance[0]
6501  *
6502  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6503  * """
6504  * Copy this clifford object.
6505  */
6506 
6507  /* function exit code */
6508  __pyx_L1_error:;
6509  __Pyx_XDECREF(__pyx_t_1);
6510  __Pyx_XDECREF(__pyx_t_2);
6511  __Pyx_XDECREF(__pyx_t_3);
6512  __Pyx_XDECREF(__pyx_t_4);
6513  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6514  __pyx_r = 0;
6515  __pyx_L0:;
6516  __Pyx_XGIVEREF(__pyx_r);
6517  __Pyx_RefNannyFinishContext();
6518  return __pyx_r;
6519  }
6520 
6521  /* Python wrapper */
6522  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6523  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 ";
6524  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6525  PyObject *__pyx_r = 0;
6526  __Pyx_RefNannyDeclarations
6527  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6528  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6529 
6530  /* function exit code */
6531  __Pyx_RefNannyFinishContext();
6532  return __pyx_r;
6533  }
6534 
6535  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6536  PyObject *__pyx_r = NULL;
6537  __Pyx_RefNannyDeclarations
6538  PyObject *__pyx_t_1 = NULL;
6539  int __pyx_lineno = 0;
6540  const char *__pyx_filename = NULL;
6541  int __pyx_clineno = 0;
6542  __Pyx_RefNannySetupContext("copy", 0);
6543  __Pyx_XDECREF(__pyx_r);
6544  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
6545  __Pyx_GOTREF(__pyx_t_1);
6546  __pyx_r = __pyx_t_1;
6547  __pyx_t_1 = 0;
6548  goto __pyx_L0;
6549 
6550  /* function exit code */
6551  __pyx_L1_error:;
6552  __Pyx_XDECREF(__pyx_t_1);
6553  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6554  __pyx_r = NULL;
6555  __pyx_L0:;
6556  __Pyx_XGIVEREF(__pyx_r);
6557  __Pyx_RefNannyFinishContext();
6558  return __pyx_r;
6559  }
6560 
6561  /* "PyClical.pyx":565
6562  * return clifford(self)
6563  *
6564  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6565  * """
6566  * Construct an object of type clifford.
6567  */
6568 
6569  /* Python wrapper */
6570  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6571  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6572  PyObject *__pyx_v_other = 0;
6573  PyObject *__pyx_v_ixt = 0;
6574  int __pyx_lineno = 0;
6575  const char *__pyx_filename = NULL;
6576  int __pyx_clineno = 0;
6577  int __pyx_r;
6578  __Pyx_RefNannyDeclarations
6579  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6580  {
6581  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6582  PyObject* values[2] = {0,0};
6583  values[0] = ((PyObject *)__pyx_int_0);
6584  values[1] = ((PyObject *)Py_None);
6585  if (unlikely(__pyx_kwds)) {
6586  Py_ssize_t kw_args;
6587  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6588  switch (pos_args) {
6589  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6590  CYTHON_FALLTHROUGH;
6591  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6592  CYTHON_FALLTHROUGH;
6593  case 0: break;
6594  default: goto __pyx_L5_argtuple_error;
6595  }
6596  kw_args = PyDict_Size(__pyx_kwds);
6597  switch (pos_args) {
6598  case 0:
6599  if (kw_args > 0) {
6600  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6601  if (value) { values[0] = value; kw_args--; }
6602  }
6603  CYTHON_FALLTHROUGH;
6604  case 1:
6605  if (kw_args > 0) {
6606  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6607  if (value) { values[1] = value; kw_args--; }
6608  }
6609  }
6610  if (unlikely(kw_args > 0)) {
6611  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 565, __pyx_L3_error)
6612  }
6613  } else {
6614  switch (PyTuple_GET_SIZE(__pyx_args)) {
6615  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6616  CYTHON_FALLTHROUGH;
6617  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6618  CYTHON_FALLTHROUGH;
6619  case 0: break;
6620  default: goto __pyx_L5_argtuple_error;
6621  }
6622  }
6623  __pyx_v_other = values[0];
6624  __pyx_v_ixt = values[1];
6625  }
6626  goto __pyx_L4_argument_unpacking_done;
6627  __pyx_L5_argtuple_error:;
6628  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 565, __pyx_L3_error)
6629  __pyx_L3_error:;
6630  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6631  __Pyx_RefNannyFinishContext();
6632  return -1;
6633  __pyx_L4_argument_unpacking_done:;
6634  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6635 
6636  /* function exit code */
6637  __Pyx_RefNannyFinishContext();
6638  return __pyx_r;
6639  }
6640 
6641  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6642  PyObject *__pyx_v_error_msg_prefix = NULL;
6643  PyObject *__pyx_v_bother = NULL;
6644  PyObject *__pyx_v_err = NULL;
6645  int __pyx_r;
6646  __Pyx_RefNannyDeclarations
6647  int __pyx_t_1;
6648  int __pyx_t_2;
6649  PyObject *__pyx_t_3 = NULL;
6650  PyObject *__pyx_t_4 = NULL;
6651  PyObject *__pyx_t_5 = NULL;
6652  Clifford *__pyx_t_6;
6653  PyObject *__pyx_t_7 = NULL;
6654  PyObject *__pyx_t_8 = NULL;
6655  scalar_t __pyx_t_9;
6656  PyObject *__pyx_t_10 = NULL;
6657  PyObject *__pyx_t_11 = NULL;
6658  PyObject *__pyx_t_12 = NULL;
6659  PyObject *__pyx_t_13 = NULL;
6660  char *__pyx_t_14;
6661  int __pyx_t_15;
6662  PyObject *__pyx_t_16 = NULL;
6663  PyObject *__pyx_t_17 = NULL;
6664  PyObject *__pyx_t_18 = NULL;
6665  int __pyx_t_19;
6666  char const *__pyx_t_20;
6667  PyObject *__pyx_t_21 = NULL;
6668  PyObject *__pyx_t_22 = NULL;
6669  PyObject *__pyx_t_23 = NULL;
6670  int __pyx_lineno = 0;
6671  const char *__pyx_filename = NULL;
6672  int __pyx_clineno = 0;
6673  __Pyx_RefNannySetupContext("__cinit__", 0);
6674 
6675  /* "PyClical.pyx":588
6676  * 2{1}+3{2}
6677  * """
6678  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6679  * if ixt is None:
6680  * try:
6681  */
6682  __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_clifford_objec);
6683  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_clifford_objec;
6684 
6685  /* "PyClical.pyx":589
6686  * """
6687  * error_msg_prefix = "Cannot initialize clifford object from"
6688  * if ixt is None: # <<<<<<<<<<<<<<
6689  * try:
6690  * if isinstance(other, clifford):
6691  */
6692  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6693  __pyx_t_2 = (__pyx_t_1 != 0);
6694  if (__pyx_t_2) {
6695 
6696  /* "PyClical.pyx":590
6697  * error_msg_prefix = "Cannot initialize clifford object from"
6698  * if ixt is None:
6699  * try: # <<<<<<<<<<<<<<
6700  * if isinstance(other, clifford):
6701  * self.instance = new Clifford((<clifford>other).unwrap())
6702  */
6703  {
6704  __Pyx_PyThreadState_declare
6705  __Pyx_PyThreadState_assign
6706  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6707  __Pyx_XGOTREF(__pyx_t_3);
6708  __Pyx_XGOTREF(__pyx_t_4);
6709  __Pyx_XGOTREF(__pyx_t_5);
6710  /*try:*/ {
6711 
6712  /* "PyClical.pyx":591
6713  * if ixt is None:
6714  * try:
6715  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6716  * self.instance = new Clifford((<clifford>other).unwrap())
6717  * elif isinstance(other, index_set):
6718  */
6719  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6720  __pyx_t_1 = (__pyx_t_2 != 0);
6721  if (__pyx_t_1) {
6722 
6723  /* "PyClical.pyx":592
6724  * try:
6725  * if isinstance(other, clifford):
6726  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6727  * elif isinstance(other, index_set):
6728  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6729  */
6730  try {
6731  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6732  } catch(...) {
6733  __Pyx_CppExn2PyErr();
6734  __PYX_ERR(0, 592, __pyx_L4_error)
6735  }
6736  __pyx_v_self->instance = __pyx_t_6;
6737 
6738  /* "PyClical.pyx":591
6739  * if ixt is None:
6740  * try:
6741  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6742  * self.instance = new Clifford((<clifford>other).unwrap())
6743  * elif isinstance(other, index_set):
6744  */
6745  goto __pyx_L10;
6746  }
6747 
6748  /* "PyClical.pyx":593
6749  * if isinstance(other, clifford):
6750  * self.instance = new Clifford((<clifford>other).unwrap())
6751  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6752  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6753  * elif isinstance(other, numbers.Real):
6754  */
6755  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6756  __pyx_t_2 = (__pyx_t_1 != 0);
6757  if (__pyx_t_2) {
6758 
6759  /* "PyClical.pyx":594
6760  * self.instance = new Clifford((<clifford>other).unwrap())
6761  * elif isinstance(other, index_set):
6762  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6763  * elif isinstance(other, numbers.Real):
6764  * self.instance = new Clifford(<scalar_t>other)
6765  */
6766  try {
6767  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6768  } catch(...) {
6769  __Pyx_CppExn2PyErr();
6770  __PYX_ERR(0, 594, __pyx_L4_error)
6771  }
6772  __pyx_v_self->instance = __pyx_t_6;
6773 
6774  /* "PyClical.pyx":593
6775  * if isinstance(other, clifford):
6776  * self.instance = new Clifford((<clifford>other).unwrap())
6777  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6778  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6779  * elif isinstance(other, numbers.Real):
6780  */
6781  goto __pyx_L10;
6782  }
6783 
6784  /* "PyClical.pyx":595
6785  * elif isinstance(other, index_set):
6786  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6787  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6788  * self.instance = new Clifford(<scalar_t>other)
6789  * elif isinstance(other, str):
6790  */
6791  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6792  __Pyx_GOTREF(__pyx_t_7);
6793  __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)
6794  __Pyx_GOTREF(__pyx_t_8);
6795  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6796  __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)
6797  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6798  __pyx_t_1 = (__pyx_t_2 != 0);
6799  if (__pyx_t_1) {
6800 
6801  /* "PyClical.pyx":596
6802  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6803  * elif isinstance(other, numbers.Real):
6804  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6805  * elif isinstance(other, str):
6806  * try:
6807  */
6808  __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)
6809  try {
6810  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6811  } catch(...) {
6812  __Pyx_CppExn2PyErr();
6813  __PYX_ERR(0, 596, __pyx_L4_error)
6814  }
6815  __pyx_v_self->instance = __pyx_t_6;
6816 
6817  /* "PyClical.pyx":595
6818  * elif isinstance(other, index_set):
6819  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6820  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6821  * self.instance = new Clifford(<scalar_t>other)
6822  * elif isinstance(other, str):
6823  */
6824  goto __pyx_L10;
6825  }
6826 
6827  /* "PyClical.pyx":597
6828  * elif isinstance(other, numbers.Real):
6829  * self.instance = new Clifford(<scalar_t>other)
6830  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6831  * try:
6832  * bother = other.encode("UTF-8")
6833  */
6834  __pyx_t_1 = PyUnicode_Check(__pyx_v_other);
6835  __pyx_t_2 = (__pyx_t_1 != 0);
6836  if (likely(__pyx_t_2)) {
6837 
6838  /* "PyClical.pyx":598
6839  * self.instance = new Clifford(<scalar_t>other)
6840  * elif isinstance(other, str):
6841  * try: # <<<<<<<<<<<<<<
6842  * bother = other.encode("UTF-8")
6843  * self.instance = new Clifford(<char *>bother)
6844  */
6845  {
6846  __Pyx_PyThreadState_declare
6847  __Pyx_PyThreadState_assign
6848  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6849  __Pyx_XGOTREF(__pyx_t_10);
6850  __Pyx_XGOTREF(__pyx_t_11);
6851  __Pyx_XGOTREF(__pyx_t_12);
6852  /*try:*/ {
6853 
6854  /* "PyClical.pyx":599
6855  * elif isinstance(other, str):
6856  * try:
6857  * bother = other.encode("UTF-8") # <<<<<<<<<<<<<<
6858  * self.instance = new Clifford(<char *>bother)
6859  * except RuntimeError:
6860  */
6861  __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)
6862  __Pyx_GOTREF(__pyx_t_7);
6863  __pyx_t_13 = NULL;
6864  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
6865  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
6866  if (likely(__pyx_t_13)) {
6867  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
6868  __Pyx_INCREF(__pyx_t_13);
6869  __Pyx_INCREF(function);
6870  __Pyx_DECREF_SET(__pyx_t_7, function);
6871  }
6872  }
6873  __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);
6874  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6875  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L11_error)
6876  __Pyx_GOTREF(__pyx_t_8);
6877  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6878  __pyx_v_bother = __pyx_t_8;
6879  __pyx_t_8 = 0;
6880 
6881  /* "PyClical.pyx":600
6882  * try:
6883  * bother = other.encode("UTF-8")
6884  * self.instance = new Clifford(<char *>bother) # <<<<<<<<<<<<<<
6885  * except RuntimeError:
6886  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6887  */
6888  __pyx_t_14 = __Pyx_PyObject_AsWritableString(__pyx_v_bother); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 600, __pyx_L11_error)
6889  try {
6890  __pyx_t_6 = new Clifford(((char *)__pyx_t_14));
6891  } catch(...) {
6892  __Pyx_CppExn2PyErr();
6893  __PYX_ERR(0, 600, __pyx_L11_error)
6894  }
6895  __pyx_v_self->instance = __pyx_t_6;
6896 
6897  /* "PyClical.pyx":598
6898  * self.instance = new Clifford(<scalar_t>other)
6899  * elif isinstance(other, str):
6900  * try: # <<<<<<<<<<<<<<
6901  * bother = other.encode("UTF-8")
6902  * self.instance = new Clifford(<char *>bother)
6903  */
6904  }
6905  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6906  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6907  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6908  goto __pyx_L16_try_end;
6909  __pyx_L11_error:;
6910  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6911  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6912  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6913 
6914  /* "PyClical.pyx":601
6915  * bother = other.encode("UTF-8")
6916  * self.instance = new Clifford(<char *>bother)
6917  * except RuntimeError: # <<<<<<<<<<<<<<
6918  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6919  * else:
6920  */
6921  __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6922  if (__pyx_t_15) {
6923  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6924  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 601, __pyx_L13_except_error)
6925  __Pyx_GOTREF(__pyx_t_8);
6926  __Pyx_GOTREF(__pyx_t_7);
6927  __Pyx_GOTREF(__pyx_t_13);
6928 
6929  /* "PyClical.pyx":602
6930  * self.instance = new Clifford(<char *>bother)
6931  * except RuntimeError:
6932  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6933  * else:
6934  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6935  */
6936  __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)
6937  __Pyx_GOTREF(__pyx_t_16);
6938  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 602, __pyx_L13_except_error)
6939  __Pyx_GOTREF(__pyx_t_17);
6940  __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)
6941  __Pyx_GOTREF(__pyx_t_18);
6942  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6943  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6944  __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)
6945  __Pyx_GOTREF(__pyx_t_17);
6946  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6947  __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)
6948  __Pyx_GOTREF(__pyx_t_18);
6949  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6950  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6951  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6952  __PYX_ERR(0, 602, __pyx_L13_except_error)
6953  }
6954  goto __pyx_L13_except_error;
6955  __pyx_L13_except_error:;
6956 
6957  /* "PyClical.pyx":598
6958  * self.instance = new Clifford(<scalar_t>other)
6959  * elif isinstance(other, str):
6960  * try: # <<<<<<<<<<<<<<
6961  * bother = other.encode("UTF-8")
6962  * self.instance = new Clifford(<char *>bother)
6963  */
6964  __Pyx_XGIVEREF(__pyx_t_10);
6965  __Pyx_XGIVEREF(__pyx_t_11);
6966  __Pyx_XGIVEREF(__pyx_t_12);
6967  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6968  goto __pyx_L4_error;
6969  __pyx_L16_try_end:;
6970  }
6971 
6972  /* "PyClical.pyx":597
6973  * elif isinstance(other, numbers.Real):
6974  * self.instance = new Clifford(<scalar_t>other)
6975  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6976  * try:
6977  * bother = other.encode("UTF-8")
6978  */
6979  goto __pyx_L10;
6980  }
6981 
6982  /* "PyClical.pyx":604
6983  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6984  * else:
6985  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6986  * except RuntimeError as err:
6987  * raise ValueError(error_msg_prefix + " " + str(type(other))
6988  */
6989  /*else*/ {
6990  __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)
6991  __Pyx_GOTREF(__pyx_t_13);
6992  __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)
6993  __Pyx_GOTREF(__pyx_t_7);
6994  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
6995  __Pyx_GOTREF(__pyx_t_8);
6996  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6997  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6998  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L4_error)
6999  __Pyx_GOTREF(__pyx_t_7);
7000  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7001  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
7002  __Pyx_GOTREF(__pyx_t_8);
7003  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7004  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
7005  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7006  __PYX_ERR(0, 604, __pyx_L4_error)
7007  }
7008  __pyx_L10:;
7009 
7010  /* "PyClical.pyx":590
7011  * error_msg_prefix = "Cannot initialize clifford object from"
7012  * if ixt is None:
7013  * try: # <<<<<<<<<<<<<<
7014  * if isinstance(other, clifford):
7015  * self.instance = new Clifford((<clifford>other).unwrap())
7016  */
7017  }
7018  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7019  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7020  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7021  goto __pyx_L9_try_end;
7022  __pyx_L4_error:;
7023  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7024  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
7025  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
7026  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
7027  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7028  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
7029 
7030  /* "PyClical.pyx":605
7031  * else:
7032  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7033  * except RuntimeError as err: # <<<<<<<<<<<<<<
7034  * raise ValueError(error_msg_prefix + " " + str(type(other))
7035  * + " value " + repr(other) + ":"
7036  */
7037  __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7038  if (__pyx_t_15) {
7039  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7040  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 605, __pyx_L6_except_error)
7041  __Pyx_GOTREF(__pyx_t_8);
7042  __Pyx_GOTREF(__pyx_t_7);
7043  __Pyx_GOTREF(__pyx_t_13);
7044  __Pyx_INCREF(__pyx_t_7);
7045  __pyx_v_err = __pyx_t_7;
7046  /*try:*/ {
7047 
7048  /* "PyClical.pyx":606
7049  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7050  * except RuntimeError as err:
7051  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
7052  * + " value " + repr(other) + ":"
7053  * + "\n\t" + str(err))
7054  */
7055  __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)
7056  __Pyx_GOTREF(__pyx_t_18);
7057  __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)
7058  __Pyx_GOTREF(__pyx_t_17);
7059  __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L24_error)
7060  __Pyx_GOTREF(__pyx_t_16);
7061  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7062  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7063 
7064  /* "PyClical.pyx":607
7065  * except RuntimeError as err:
7066  * raise ValueError(error_msg_prefix + " " + str(type(other))
7067  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
7068  * + "\n\t" + str(err))
7069  * elif isinstance(ixt, index_set):
7070  */
7071  __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)
7072  __Pyx_GOTREF(__pyx_t_17);
7073  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7074  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L24_error)
7075  __Pyx_GOTREF(__pyx_t_16);
7076  __pyx_t_18 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L24_error)
7077  __Pyx_GOTREF(__pyx_t_18);
7078  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7079  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7080  __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)
7081  __Pyx_GOTREF(__pyx_t_16);
7082  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7083 
7084  /* "PyClical.pyx":608
7085  * raise ValueError(error_msg_prefix + " " + str(type(other))
7086  * + " value " + repr(other) + ":"
7087  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7088  * elif isinstance(ixt, index_set):
7089  * if isinstance(other, numbers.Real):
7090  */
7091  __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)
7092  __Pyx_GOTREF(__pyx_t_18);
7093  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7094  __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 608, __pyx_L24_error)
7095  __Pyx_GOTREF(__pyx_t_16);
7096  __pyx_t_17 = __Pyx_PyUnicode_Concat(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 608, __pyx_L24_error)
7097  __Pyx_GOTREF(__pyx_t_17);
7098  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7099  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7100 
7101  /* "PyClical.pyx":606
7102  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7103  * except RuntimeError as err:
7104  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
7105  * + " value " + repr(other) + ":"
7106  * + "\n\t" + str(err))
7107  */
7108  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L24_error)
7109  __Pyx_GOTREF(__pyx_t_16);
7110  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7111  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
7112  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7113  __PYX_ERR(0, 606, __pyx_L24_error)
7114  }
7115 
7116  /* "PyClical.pyx":605
7117  * else:
7118  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7119  * except RuntimeError as err: # <<<<<<<<<<<<<<
7120  * raise ValueError(error_msg_prefix + " " + str(type(other))
7121  * + " value " + repr(other) + ":"
7122  */
7123  /*finally:*/ {
7124  __pyx_L24_error:;
7125  /*exception exit:*/{
7126  __Pyx_PyThreadState_declare
7127  __Pyx_PyThreadState_assign
7128  __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
7129  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
7130  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
7131  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
7132  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
7133  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);
7134  __Pyx_XGOTREF(__pyx_t_12);
7135  __Pyx_XGOTREF(__pyx_t_11);
7136  __Pyx_XGOTREF(__pyx_t_10);
7137  __Pyx_XGOTREF(__pyx_t_21);
7138  __Pyx_XGOTREF(__pyx_t_22);
7139  __Pyx_XGOTREF(__pyx_t_23);
7140  __pyx_t_15 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
7141  {
7142  __Pyx_DECREF(__pyx_v_err);
7143  __pyx_v_err = NULL;
7144  }
7145  if (PY_MAJOR_VERSION >= 3) {
7146  __Pyx_XGIVEREF(__pyx_t_21);
7147  __Pyx_XGIVEREF(__pyx_t_22);
7148  __Pyx_XGIVEREF(__pyx_t_23);
7149  __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
7150  }
7151  __Pyx_XGIVEREF(__pyx_t_12);
7152  __Pyx_XGIVEREF(__pyx_t_11);
7153  __Pyx_XGIVEREF(__pyx_t_10);
7154  __Pyx_ErrRestore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
7155  __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
7156  __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20;
7157  goto __pyx_L6_except_error;
7158  }
7159  }
7160  }
7161  goto __pyx_L6_except_error;
7162  __pyx_L6_except_error:;
7163 
7164  /* "PyClical.pyx":590
7165  * error_msg_prefix = "Cannot initialize clifford object from"
7166  * if ixt is None:
7167  * try: # <<<<<<<<<<<<<<
7168  * if isinstance(other, clifford):
7169  * self.instance = new Clifford((<clifford>other).unwrap())
7170  */
7171  __Pyx_XGIVEREF(__pyx_t_3);
7172  __Pyx_XGIVEREF(__pyx_t_4);
7173  __Pyx_XGIVEREF(__pyx_t_5);
7174  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7175  goto __pyx_L1_error;
7176  __pyx_L9_try_end:;
7177  }
7178 
7179  /* "PyClical.pyx":589
7180  * """
7181  * error_msg_prefix = "Cannot initialize clifford object from"
7182  * if ixt is None: # <<<<<<<<<<<<<<
7183  * try:
7184  * if isinstance(other, clifford):
7185  */
7186  goto __pyx_L3;
7187  }
7188 
7189  /* "PyClical.pyx":609
7190  * + " value " + repr(other) + ":"
7191  * + "\n\t" + str(err))
7192  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7193  * if isinstance(other, numbers.Real):
7194  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7195  */
7196  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7197  __pyx_t_1 = (__pyx_t_2 != 0);
7198  if (likely(__pyx_t_1)) {
7199 
7200  /* "PyClical.pyx":610
7201  * + "\n\t" + str(err))
7202  * elif isinstance(ixt, index_set):
7203  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
7204  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7205  * elif isinstance(other, collections.abc.Sequence):
7206  */
7207  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_numbers); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 610, __pyx_L1_error)
7208  __Pyx_GOTREF(__pyx_t_13);
7209  __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)
7210  __Pyx_GOTREF(__pyx_t_7);
7211  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7212  __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)
7213  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7214  __pyx_t_2 = (__pyx_t_1 != 0);
7215  if (__pyx_t_2) {
7216 
7217  /* "PyClical.pyx":611
7218  * elif isinstance(ixt, index_set):
7219  * if isinstance(other, numbers.Real):
7220  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
7221  * elif isinstance(other, collections.abc.Sequence):
7222  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7223  */
7224  __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)
7225  try {
7226  __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));
7227  } catch(...) {
7228  __Pyx_CppExn2PyErr();
7229  __PYX_ERR(0, 611, __pyx_L1_error)
7230  }
7231  __pyx_v_self->instance = __pyx_t_6;
7232 
7233  /* "PyClical.pyx":610
7234  * + "\n\t" + str(err))
7235  * elif isinstance(ixt, index_set):
7236  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
7237  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7238  * elif isinstance(other, collections.abc.Sequence):
7239  */
7240  goto __pyx_L30;
7241  }
7242 
7243  /* "PyClical.pyx":612
7244  * if isinstance(other, numbers.Real):
7245  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7246  * elif isinstance(other, collections.abc.Sequence): # <<<<<<<<<<<<<<
7247  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7248  * else:
7249  */
7250  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
7251  __Pyx_GOTREF(__pyx_t_7);
7252  __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)
7253  __Pyx_GOTREF(__pyx_t_13);
7254  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7255  __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)
7256  __Pyx_GOTREF(__pyx_t_7);
7257  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7258  __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)
7259  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7260  __pyx_t_1 = (__pyx_t_2 != 0);
7261  if (likely(__pyx_t_1)) {
7262 
7263  /* "PyClical.pyx":613
7264  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7265  * elif isinstance(other, collections.abc.Sequence):
7266  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7267  * else:
7268  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7269  */
7270  try {
7271  __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)));
7272  } catch(...) {
7273  __Pyx_CppExn2PyErr();
7274  __PYX_ERR(0, 613, __pyx_L1_error)
7275  }
7276  __pyx_v_self->instance = __pyx_t_6;
7277 
7278  /* "PyClical.pyx":612
7279  * if isinstance(other, numbers.Real):
7280  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7281  * elif isinstance(other, collections.abc.Sequence): # <<<<<<<<<<<<<<
7282  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7283  * else:
7284  */
7285  goto __pyx_L30;
7286  }
7287 
7288  /* "PyClical.pyx":615
7289  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7290  * else:
7291  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7292  * + ", " + repr(ixt) + ").")
7293  * else:
7294  */
7295  /*else*/ {
7296  __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)
7297  __Pyx_GOTREF(__pyx_t_7);
7298  __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)
7299  __Pyx_GOTREF(__pyx_t_13);
7300  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7301  __Pyx_GOTREF(__pyx_t_8);
7302  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7303  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7304 
7305  /* "PyClical.pyx":616
7306  * else:
7307  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7308  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
7309  * else:
7310  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7311  */
7312  __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)
7313  __Pyx_GOTREF(__pyx_t_13);
7314  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7315  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 616, __pyx_L1_error)
7316  __Pyx_GOTREF(__pyx_t_8);
7317  __pyx_t_7 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_13, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 616, __pyx_L1_error)
7318  __Pyx_GOTREF(__pyx_t_7);
7319  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7320  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7321  __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)
7322  __Pyx_GOTREF(__pyx_t_8);
7323  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7324 
7325  /* "PyClical.pyx":615
7326  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7327  * else:
7328  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7329  * + ", " + repr(ixt) + ").")
7330  * else:
7331  */
7332  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7333  __Pyx_GOTREF(__pyx_t_7);
7334  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7335  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7336  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7337  __PYX_ERR(0, 615, __pyx_L1_error)
7338  }
7339  __pyx_L30:;
7340 
7341  /* "PyClical.pyx":609
7342  * + " value " + repr(other) + ":"
7343  * + "\n\t" + str(err))
7344  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7345  * if isinstance(other, numbers.Real):
7346  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7347  */
7348  goto __pyx_L3;
7349  }
7350 
7351  /* "PyClical.pyx":618
7352  * + ", " + repr(ixt) + ").")
7353  * else:
7354  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7355  * + ", " + str(type(ixt)) + ").")
7356  *
7357  */
7358  /*else*/ {
7359  __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)
7360  __Pyx_GOTREF(__pyx_t_7);
7361  __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)
7362  __Pyx_GOTREF(__pyx_t_8);
7363  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 618, __pyx_L1_error)
7364  __Pyx_GOTREF(__pyx_t_13);
7365  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7366  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7367 
7368  /* "PyClical.pyx":619
7369  * else:
7370  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7371  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7372  *
7373  * def __dealloc__(self):
7374  */
7375  __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)
7376  __Pyx_GOTREF(__pyx_t_8);
7377  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7378  __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)
7379  __Pyx_GOTREF(__pyx_t_13);
7380  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error)
7381  __Pyx_GOTREF(__pyx_t_7);
7382  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7383  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7384  __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)
7385  __Pyx_GOTREF(__pyx_t_13);
7386  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7387 
7388  /* "PyClical.pyx":618
7389  * + ", " + repr(ixt) + ").")
7390  * else:
7391  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7392  * + ", " + str(type(ixt)) + ").")
7393  *
7394  */
7395  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7396  __Pyx_GOTREF(__pyx_t_7);
7397  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7398  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7399  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7400  __PYX_ERR(0, 618, __pyx_L1_error)
7401  }
7402  __pyx_L3:;
7403 
7404  /* "PyClical.pyx":565
7405  * return clifford(self)
7406  *
7407  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7408  * """
7409  * Construct an object of type clifford.
7410  */
7411 
7412  /* function exit code */
7413  __pyx_r = 0;
7414  goto __pyx_L0;
7415  __pyx_L1_error:;
7416  __Pyx_XDECREF(__pyx_t_7);
7417  __Pyx_XDECREF(__pyx_t_8);
7418  __Pyx_XDECREF(__pyx_t_13);
7419  __Pyx_XDECREF(__pyx_t_16);
7420  __Pyx_XDECREF(__pyx_t_17);
7421  __Pyx_XDECREF(__pyx_t_18);
7422  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7423  __pyx_r = -1;
7424  __pyx_L0:;
7425  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7426  __Pyx_XDECREF(__pyx_v_bother);
7427  __Pyx_XDECREF(__pyx_v_err);
7428  __Pyx_RefNannyFinishContext();
7429  return __pyx_r;
7430  }
7431 
7432  /* "PyClical.pyx":621
7433  * + ", " + str(type(ixt)) + ").")
7434  *
7435  * def __dealloc__(self): # <<<<<<<<<<<<<<
7436  * """
7437  * Clean up by deallocating the instance of C++ class Clifford.
7438  */
7439 
7440  /* Python wrapper */
7441  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7442  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7443  __Pyx_RefNannyDeclarations
7444  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7445  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7446 
7447  /* function exit code */
7448  __Pyx_RefNannyFinishContext();
7449  }
7450 
7451  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7452  __Pyx_RefNannyDeclarations
7453  __Pyx_RefNannySetupContext("__dealloc__", 0);
7454 
7455  /* "PyClical.pyx":625
7456  * Clean up by deallocating the instance of C++ class Clifford.
7457  * """
7458  * del self.instance # <<<<<<<<<<<<<<
7459  *
7460  * def __contains__(self, x):
7461  */
7462  delete __pyx_v_self->instance;
7463 
7464  /* "PyClical.pyx":621
7465  * + ", " + str(type(ixt)) + ").")
7466  *
7467  * def __dealloc__(self): # <<<<<<<<<<<<<<
7468  * """
7469  * Clean up by deallocating the instance of C++ class Clifford.
7470  */
7471 
7472  /* function exit code */
7473  __Pyx_RefNannyFinishContext();
7474  }
7475 
7476  /* "PyClical.pyx":627
7477  * del self.instance
7478  *
7479  * def __contains__(self, x): # <<<<<<<<<<<<<<
7480  * """
7481  * Not applicable.
7482  */
7483 
7484  /* Python wrapper */
7485  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7486  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 ";
7487  #if CYTHON_COMPILING_IN_CPYTHON
7488  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7489  #endif
7490  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7491  int __pyx_r;
7492  __Pyx_RefNannyDeclarations
7493  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7494  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7495 
7496  /* function exit code */
7497  __Pyx_RefNannyFinishContext();
7498  return __pyx_r;
7499  }
7500 
7501  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7502  int __pyx_r;
7503  __Pyx_RefNannyDeclarations
7504  PyObject *__pyx_t_1 = NULL;
7505  int __pyx_lineno = 0;
7506  const char *__pyx_filename = NULL;
7507  int __pyx_clineno = 0;
7508  __Pyx_RefNannySetupContext("__contains__", 0);
7509 
7510  /* "PyClical.pyx":636
7511  * TypeError: Not applicable.
7512  * """
7513  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7514  *
7515  * def __iter__(self):
7516  */
7517  __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)
7518  __Pyx_GOTREF(__pyx_t_1);
7519  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7520  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7521  __PYX_ERR(0, 636, __pyx_L1_error)
7522 
7523  /* "PyClical.pyx":627
7524  * del self.instance
7525  *
7526  * def __contains__(self, x): # <<<<<<<<<<<<<<
7527  * """
7528  * Not applicable.
7529  */
7530 
7531  /* function exit code */
7532  __pyx_L1_error:;
7533  __Pyx_XDECREF(__pyx_t_1);
7534  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7535  __pyx_r = -1;
7536  __Pyx_RefNannyFinishContext();
7537  return __pyx_r;
7538  }
7539 
7540  /* "PyClical.pyx":638
7541  * raise TypeError("Not applicable.")
7542  *
7543  * def __iter__(self): # <<<<<<<<<<<<<<
7544  * """
7545  * Not applicable.
7546  */
7547 
7548  /* Python wrapper */
7549  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7550  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 ";
7551  #if CYTHON_COMPILING_IN_CPYTHON
7552  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7553  #endif
7554  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7555  PyObject *__pyx_r = 0;
7556  __Pyx_RefNannyDeclarations
7557  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7558  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7559 
7560  /* function exit code */
7561  __Pyx_RefNannyFinishContext();
7562  return __pyx_r;
7563  }
7564 
7565  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7566  PyObject *__pyx_r = NULL;
7567  __Pyx_RefNannyDeclarations
7568  PyObject *__pyx_t_1 = NULL;
7569  int __pyx_lineno = 0;
7570  const char *__pyx_filename = NULL;
7571  int __pyx_clineno = 0;
7572  __Pyx_RefNannySetupContext("__iter__", 0);
7573 
7574  /* "PyClical.pyx":647
7575  * TypeError: Not applicable.
7576  * """
7577  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7578  *
7579  * def reframe(self, ixt):
7580  */
7581  __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)
7582  __Pyx_GOTREF(__pyx_t_1);
7583  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7584  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7585  __PYX_ERR(0, 647, __pyx_L1_error)
7586 
7587  /* "PyClical.pyx":638
7588  * raise TypeError("Not applicable.")
7589  *
7590  * def __iter__(self): # <<<<<<<<<<<<<<
7591  * """
7592  * Not applicable.
7593  */
7594 
7595  /* function exit code */
7596  __pyx_L1_error:;
7597  __Pyx_XDECREF(__pyx_t_1);
7598  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7599  __pyx_r = NULL;
7600  __Pyx_XGIVEREF(__pyx_r);
7601  __Pyx_RefNannyFinishContext();
7602  return __pyx_r;
7603  }
7604 
7605  /* "PyClical.pyx":649
7606  * raise TypeError("Not applicable.")
7607  *
7608  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7609  * """
7610  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7611  */
7612 
7613  /* Python wrapper */
7614  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7615  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 ";
7616  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7617  PyObject *__pyx_r = 0;
7618  __Pyx_RefNannyDeclarations
7619  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7620  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7621 
7622  /* function exit code */
7623  __Pyx_RefNannyFinishContext();
7624  return __pyx_r;
7625  }
7626 
7627  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7628  PyObject *__pyx_v_error_msg_prefix = NULL;
7629  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7630  PyObject *__pyx_v_err = NULL;
7631  PyObject *__pyx_r = NULL;
7632  __Pyx_RefNannyDeclarations
7633  int __pyx_t_1;
7634  int __pyx_t_2;
7635  PyObject *__pyx_t_3 = NULL;
7636  PyObject *__pyx_t_4 = NULL;
7637  PyObject *__pyx_t_5 = NULL;
7638  PyObject *__pyx_t_6 = NULL;
7639  Clifford *__pyx_t_7;
7640  int __pyx_t_8;
7641  PyObject *__pyx_t_9 = NULL;
7642  PyObject *__pyx_t_10 = NULL;
7643  PyObject *__pyx_t_11 = NULL;
7644  PyObject *__pyx_t_12 = NULL;
7645  PyObject *__pyx_t_13 = NULL;
7646  int __pyx_t_14;
7647  char const *__pyx_t_15;
7648  PyObject *__pyx_t_16 = NULL;
7649  PyObject *__pyx_t_17 = NULL;
7650  PyObject *__pyx_t_18 = NULL;
7651  PyObject *__pyx_t_19 = NULL;
7652  PyObject *__pyx_t_20 = NULL;
7653  PyObject *__pyx_t_21 = NULL;
7654  int __pyx_lineno = 0;
7655  const char *__pyx_filename = NULL;
7656  int __pyx_clineno = 0;
7657  __Pyx_RefNannySetupContext("reframe", 0);
7658 
7659  /* "PyClical.pyx":659
7660  * True
7661  * """
7662  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7663  * if isinstance(ixt, index_set):
7664  * try:
7665  */
7666  __Pyx_INCREF(__pyx_kp_u_Cannot_reframe);
7667  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_reframe;
7668 
7669  /* "PyClical.pyx":660
7670  * """
7671  * error_msg_prefix = "Cannot reframe"
7672  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7673  * try:
7674  * result = clifford()
7675  */
7676  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7677  __pyx_t_2 = (__pyx_t_1 != 0);
7678  if (likely(__pyx_t_2)) {
7679 
7680  /* "PyClical.pyx":661
7681  * error_msg_prefix = "Cannot reframe"
7682  * if isinstance(ixt, index_set):
7683  * try: # <<<<<<<<<<<<<<
7684  * result = clifford()
7685  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7686  */
7687  {
7688  __Pyx_PyThreadState_declare
7689  __Pyx_PyThreadState_assign
7690  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7691  __Pyx_XGOTREF(__pyx_t_3);
7692  __Pyx_XGOTREF(__pyx_t_4);
7693  __Pyx_XGOTREF(__pyx_t_5);
7694  /*try:*/ {
7695 
7696  /* "PyClical.pyx":662
7697  * if isinstance(ixt, index_set):
7698  * try:
7699  * result = clifford() # <<<<<<<<<<<<<<
7700  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7701  * except RuntimeError as err:
7702  */
7703  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L4_error)
7704  __Pyx_GOTREF(__pyx_t_6);
7705  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7706  __pyx_t_6 = 0;
7707 
7708  /* "PyClical.pyx":663
7709  * try:
7710  * result = clifford()
7711  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7712  * except RuntimeError as err:
7713  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7714  */
7715  try {
7716  __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)));
7717  } catch(...) {
7718  __Pyx_CppExn2PyErr();
7719  __PYX_ERR(0, 663, __pyx_L4_error)
7720  }
7721  __pyx_v_result->instance = __pyx_t_7;
7722 
7723  /* "PyClical.pyx":661
7724  * error_msg_prefix = "Cannot reframe"
7725  * if isinstance(ixt, index_set):
7726  * try: # <<<<<<<<<<<<<<
7727  * result = clifford()
7728  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7729  */
7730  }
7731  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7732  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7733  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7734  goto __pyx_L9_try_end;
7735  __pyx_L4_error:;
7736  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7737 
7738  /* "PyClical.pyx":664
7739  * result = clifford()
7740  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7741  * except RuntimeError as err: # <<<<<<<<<<<<<<
7742  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7743  * + str(ixt) + ":"
7744  */
7745  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7746  if (__pyx_t_8) {
7747  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7748  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 664, __pyx_L6_except_error)
7749  __Pyx_GOTREF(__pyx_t_6);
7750  __Pyx_GOTREF(__pyx_t_9);
7751  __Pyx_GOTREF(__pyx_t_10);
7752  __Pyx_INCREF(__pyx_t_9);
7753  __pyx_v_err = __pyx_t_9;
7754  /*try:*/ {
7755 
7756  /* "PyClical.pyx":665
7757  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7758  * except RuntimeError as err:
7759  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7760  * + str(ixt) + ":"
7761  * + "\n\t" + str(err))
7762  */
7763  __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)
7764  __Pyx_GOTREF(__pyx_t_11);
7765  __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)
7766  __Pyx_GOTREF(__pyx_t_12);
7767  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
7768  __Pyx_GOTREF(__pyx_t_13);
7769  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7770  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7771  __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)
7772  __Pyx_GOTREF(__pyx_t_12);
7773  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7774 
7775  /* "PyClical.pyx":666
7776  * except RuntimeError as err:
7777  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7778  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7779  * + "\n\t" + str(err))
7780  * else:
7781  */
7782  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_ixt); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L15_error)
7783  __Pyx_GOTREF(__pyx_t_13);
7784  __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L15_error)
7785  __Pyx_GOTREF(__pyx_t_11);
7786  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7787  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7788  __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)
7789  __Pyx_GOTREF(__pyx_t_13);
7790  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7791 
7792  /* "PyClical.pyx":667
7793  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7794  * + str(ixt) + ":"
7795  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7796  * else:
7797  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7798  */
7799  __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)
7800  __Pyx_GOTREF(__pyx_t_11);
7801  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7802  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 667, __pyx_L15_error)
7803  __Pyx_GOTREF(__pyx_t_13);
7804  __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 667, __pyx_L15_error)
7805  __Pyx_GOTREF(__pyx_t_12);
7806  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7807  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7808 
7809  /* "PyClical.pyx":665
7810  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7811  * except RuntimeError as err:
7812  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7813  * + str(ixt) + ":"
7814  * + "\n\t" + str(err))
7815  */
7816  __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
7817  __Pyx_GOTREF(__pyx_t_13);
7818  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7819  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7820  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7821  __PYX_ERR(0, 665, __pyx_L15_error)
7822  }
7823 
7824  /* "PyClical.pyx":664
7825  * result = clifford()
7826  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7827  * except RuntimeError as err: # <<<<<<<<<<<<<<
7828  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7829  * + str(ixt) + ":"
7830  */
7831  /*finally:*/ {
7832  __pyx_L15_error:;
7833  /*exception exit:*/{
7834  __Pyx_PyThreadState_declare
7835  __Pyx_PyThreadState_assign
7836  __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
7837  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7838  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
7839  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7840  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
7841  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);
7842  __Pyx_XGOTREF(__pyx_t_16);
7843  __Pyx_XGOTREF(__pyx_t_17);
7844  __Pyx_XGOTREF(__pyx_t_18);
7845  __Pyx_XGOTREF(__pyx_t_19);
7846  __Pyx_XGOTREF(__pyx_t_20);
7847  __Pyx_XGOTREF(__pyx_t_21);
7848  __pyx_t_8 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
7849  {
7850  __Pyx_DECREF(__pyx_v_err);
7851  __pyx_v_err = NULL;
7852  }
7853  if (PY_MAJOR_VERSION >= 3) {
7854  __Pyx_XGIVEREF(__pyx_t_19);
7855  __Pyx_XGIVEREF(__pyx_t_20);
7856  __Pyx_XGIVEREF(__pyx_t_21);
7857  __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
7858  }
7859  __Pyx_XGIVEREF(__pyx_t_16);
7860  __Pyx_XGIVEREF(__pyx_t_17);
7861  __Pyx_XGIVEREF(__pyx_t_18);
7862  __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
7863  __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
7864  __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
7865  goto __pyx_L6_except_error;
7866  }
7867  }
7868  }
7869  goto __pyx_L6_except_error;
7870  __pyx_L6_except_error:;
7871 
7872  /* "PyClical.pyx":661
7873  * error_msg_prefix = "Cannot reframe"
7874  * if isinstance(ixt, index_set):
7875  * try: # <<<<<<<<<<<<<<
7876  * result = clifford()
7877  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7878  */
7879  __Pyx_XGIVEREF(__pyx_t_3);
7880  __Pyx_XGIVEREF(__pyx_t_4);
7881  __Pyx_XGIVEREF(__pyx_t_5);
7882  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7883  goto __pyx_L1_error;
7884  __pyx_L9_try_end:;
7885  }
7886 
7887  /* "PyClical.pyx":660
7888  * """
7889  * error_msg_prefix = "Cannot reframe"
7890  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7891  * try:
7892  * result = clifford()
7893  */
7894  goto __pyx_L3;
7895  }
7896 
7897  /* "PyClical.pyx":669
7898  * + "\n\t" + str(err))
7899  * else:
7900  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7901  * return result
7902  *
7903  */
7904  /*else*/ {
7905  __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)
7906  __Pyx_GOTREF(__pyx_t_10);
7907  __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)
7908  __Pyx_GOTREF(__pyx_t_9);
7909  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
7910  __Pyx_GOTREF(__pyx_t_6);
7911  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7912  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7913  __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)
7914  __Pyx_GOTREF(__pyx_t_9);
7915  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7916  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
7917  __Pyx_GOTREF(__pyx_t_6);
7918  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7919  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7920  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7921  __PYX_ERR(0, 669, __pyx_L1_error)
7922  }
7923  __pyx_L3:;
7924 
7925  /* "PyClical.pyx":670
7926  * else:
7927  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7928  * return result # <<<<<<<<<<<<<<
7929  *
7930  * def __richcmp__(lhs, rhs, int op):
7931  */
7932  __Pyx_XDECREF(__pyx_r);
7933  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7934  __pyx_r = ((PyObject *)__pyx_v_result);
7935  goto __pyx_L0;
7936 
7937  /* "PyClical.pyx":649
7938  * raise TypeError("Not applicable.")
7939  *
7940  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7941  * """
7942  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7943  */
7944 
7945  /* function exit code */
7946  __pyx_L1_error:;
7947  __Pyx_XDECREF(__pyx_t_6);
7948  __Pyx_XDECREF(__pyx_t_9);
7949  __Pyx_XDECREF(__pyx_t_10);
7950  __Pyx_XDECREF(__pyx_t_11);
7951  __Pyx_XDECREF(__pyx_t_12);
7952  __Pyx_XDECREF(__pyx_t_13);
7953  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7954  __pyx_r = NULL;
7955  __pyx_L0:;
7956  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7957  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7958  __Pyx_XDECREF(__pyx_v_err);
7959  __Pyx_XGIVEREF(__pyx_r);
7960  __Pyx_RefNannyFinishContext();
7961  return __pyx_r;
7962  }
7963 
7964  /* "PyClical.pyx":672
7965  * return result
7966  *
7967  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7968  * """
7969  * Compare objects of type clifford.
7970  */
7971 
7972  /* Python wrapper */
7973  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7974  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7975  PyObject *__pyx_r = 0;
7976  __Pyx_RefNannyDeclarations
7977  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7978  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7979 
7980  /* function exit code */
7981  __Pyx_RefNannyFinishContext();
7982  return __pyx_r;
7983  }
7984 
7985  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7986  PyObject *__pyx_r = NULL;
7987  __Pyx_RefNannyDeclarations
7988  int __pyx_t_1;
7989  int __pyx_t_2;
7990  int __pyx_t_3;
7991  PyObject *__pyx_t_4 = NULL;
7992  PyObject *__pyx_t_5 = NULL;
7993  PyObject *__pyx_t_6 = NULL;
7994  int __pyx_lineno = 0;
7995  const char *__pyx_filename = NULL;
7996  int __pyx_clineno = 0;
7997  __Pyx_RefNannySetupContext("__richcmp__", 0);
7998 
7999  /* "PyClical.pyx":691
8000  * True
8001  * """
8002  * if op == 2: # == # <<<<<<<<<<<<<<
8003  * if (lhs is None) or (rhs is None):
8004  * return bool(lhs is rhs)
8005  */
8006  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
8007  if (__pyx_t_1) {
8008 
8009  /* "PyClical.pyx":692
8010  * """
8011  * if op == 2: # ==
8012  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8013  * return bool(lhs is rhs)
8014  * else:
8015  */
8016  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
8017  __pyx_t_3 = (__pyx_t_2 != 0);
8018  if (!__pyx_t_3) {
8019  } else {
8020  __pyx_t_1 = __pyx_t_3;
8021  goto __pyx_L5_bool_binop_done;
8022  }
8023  __pyx_t_3 = (__pyx_v_rhs == Py_None);
8024  __pyx_t_2 = (__pyx_t_3 != 0);
8025  __pyx_t_1 = __pyx_t_2;
8026  __pyx_L5_bool_binop_done:;
8027  if (__pyx_t_1) {
8028 
8029  /* "PyClical.pyx":693
8030  * if op == 2: # ==
8031  * if (lhs is None) or (rhs is None):
8032  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
8033  * else:
8034  * return bool( toClifford(lhs) == toClifford(rhs) )
8035  */
8036  __Pyx_XDECREF(__pyx_r);
8037  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
8038  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error)
8039  __Pyx_GOTREF(__pyx_t_4);
8040  __pyx_r = __pyx_t_4;
8041  __pyx_t_4 = 0;
8042  goto __pyx_L0;
8043 
8044  /* "PyClical.pyx":692
8045  * """
8046  * if op == 2: # ==
8047  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8048  * return bool(lhs is rhs)
8049  * else:
8050  */
8051  }
8052 
8053  /* "PyClical.pyx":695
8054  * return bool(lhs is rhs)
8055  * else:
8056  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
8057  * elif op == 3: # !=
8058  * if (lhs is None) or (rhs is None):
8059  */
8060  /*else*/ {
8061  __Pyx_XDECREF(__pyx_r);
8062  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
8063  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error)
8064  __Pyx_GOTREF(__pyx_t_4);
8065  __pyx_r = __pyx_t_4;
8066  __pyx_t_4 = 0;
8067  goto __pyx_L0;
8068  }
8069 
8070  /* "PyClical.pyx":691
8071  * True
8072  * """
8073  * if op == 2: # == # <<<<<<<<<<<<<<
8074  * if (lhs is None) or (rhs is None):
8075  * return bool(lhs is rhs)
8076  */
8077  }
8078 
8079  /* "PyClical.pyx":696
8080  * else:
8081  * return bool( toClifford(lhs) == toClifford(rhs) )
8082  * elif op == 3: # != # <<<<<<<<<<<<<<
8083  * if (lhs is None) or (rhs is None):
8084  * return not bool(lhs is rhs)
8085  */
8086  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
8087  if (__pyx_t_1) {
8088 
8089  /* "PyClical.pyx":697
8090  * return bool( toClifford(lhs) == toClifford(rhs) )
8091  * elif op == 3: # !=
8092  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8093  * return not bool(lhs is rhs)
8094  * else:
8095  */
8096  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
8097  __pyx_t_3 = (__pyx_t_2 != 0);
8098  if (!__pyx_t_3) {
8099  } else {
8100  __pyx_t_1 = __pyx_t_3;
8101  goto __pyx_L8_bool_binop_done;
8102  }
8103  __pyx_t_3 = (__pyx_v_rhs == Py_None);
8104  __pyx_t_2 = (__pyx_t_3 != 0);
8105  __pyx_t_1 = __pyx_t_2;
8106  __pyx_L8_bool_binop_done:;
8107  if (__pyx_t_1) {
8108 
8109  /* "PyClical.pyx":698
8110  * elif op == 3: # !=
8111  * if (lhs is None) or (rhs is None):
8112  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
8113  * else:
8114  * return bool( toClifford(lhs) != toClifford(rhs) )
8115  */
8116  __Pyx_XDECREF(__pyx_r);
8117  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
8118  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
8119  __Pyx_GOTREF(__pyx_t_4);
8120  __pyx_r = __pyx_t_4;
8121  __pyx_t_4 = 0;
8122  goto __pyx_L0;
8123 
8124  /* "PyClical.pyx":697
8125  * return bool( toClifford(lhs) == toClifford(rhs) )
8126  * elif op == 3: # !=
8127  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8128  * return not bool(lhs is rhs)
8129  * else:
8130  */
8131  }
8132 
8133  /* "PyClical.pyx":700
8134  * return not bool(lhs is rhs)
8135  * else:
8136  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
8137  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8138  * raise TypeError("This comparison operator is not implemented for "
8139  */
8140  /*else*/ {
8141  __Pyx_XDECREF(__pyx_r);
8142  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
8143  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error)
8144  __Pyx_GOTREF(__pyx_t_4);
8145  __pyx_r = __pyx_t_4;
8146  __pyx_t_4 = 0;
8147  goto __pyx_L0;
8148  }
8149 
8150  /* "PyClical.pyx":696
8151  * else:
8152  * return bool( toClifford(lhs) == toClifford(rhs) )
8153  * elif op == 3: # != # <<<<<<<<<<<<<<
8154  * if (lhs is None) or (rhs is None):
8155  * return not bool(lhs is rhs)
8156  */
8157  }
8158 
8159  /* "PyClical.pyx":701
8160  * else:
8161  * return bool( toClifford(lhs) != toClifford(rhs) )
8162  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
8163  * raise TypeError("This comparison operator is not implemented for "
8164  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8165  */
8166  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
8167  __pyx_t_3 = (__pyx_t_2 != 0);
8168  if (!__pyx_t_3) {
8169  } else {
8170  __pyx_t_1 = __pyx_t_3;
8171  goto __pyx_L10_bool_binop_done;
8172  }
8173  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
8174  __pyx_t_2 = (__pyx_t_3 != 0);
8175  __pyx_t_1 = __pyx_t_2;
8176  __pyx_L10_bool_binop_done:;
8177  if (unlikely(__pyx_t_1)) {
8178 
8179  /* "PyClical.pyx":703
8180  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8181  * raise TypeError("This comparison operator is not implemented for "
8182  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
8183  * else:
8184  * return NotImplemented
8185  */
8186  __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)
8187  __Pyx_GOTREF(__pyx_t_4);
8188  __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)
8189  __Pyx_GOTREF(__pyx_t_5);
8190  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8191  __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)
8192  __Pyx_GOTREF(__pyx_t_4);
8193  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8194  __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)
8195  __Pyx_GOTREF(__pyx_t_5);
8196  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error)
8197  __Pyx_GOTREF(__pyx_t_6);
8198  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8199  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8200  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
8201  __Pyx_GOTREF(__pyx_t_5);
8202  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8203 
8204  /* "PyClical.pyx":702
8205  * return bool( toClifford(lhs) != toClifford(rhs) )
8206  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8207  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
8208  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8209  * else:
8210  */
8211  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
8212  __Pyx_GOTREF(__pyx_t_6);
8213  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8214  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
8215  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8216  __PYX_ERR(0, 702, __pyx_L1_error)
8217 
8218  /* "PyClical.pyx":701
8219  * else:
8220  * return bool( toClifford(lhs) != toClifford(rhs) )
8221  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
8222  * raise TypeError("This comparison operator is not implemented for "
8223  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8224  */
8225  }
8226 
8227  /* "PyClical.pyx":705
8228  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8229  * else:
8230  * return NotImplemented # <<<<<<<<<<<<<<
8231  *
8232  * def __getitem__(self, ixt):
8233  */
8234  /*else*/ {
8235  __Pyx_XDECREF(__pyx_r);
8236  __Pyx_INCREF(__pyx_builtin_NotImplemented);
8237  __pyx_r = __pyx_builtin_NotImplemented;
8238  goto __pyx_L0;
8239  }
8240 
8241  /* "PyClical.pyx":672
8242  * return result
8243  *
8244  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
8245  * """
8246  * Compare objects of type clifford.
8247  */
8248 
8249  /* function exit code */
8250  __pyx_L1_error:;
8251  __Pyx_XDECREF(__pyx_t_4);
8252  __Pyx_XDECREF(__pyx_t_5);
8253  __Pyx_XDECREF(__pyx_t_6);
8254  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8255  __pyx_r = NULL;
8256  __pyx_L0:;
8257  __Pyx_XGIVEREF(__pyx_r);
8258  __Pyx_RefNannyFinishContext();
8259  return __pyx_r;
8260  }
8261 
8262  /* "PyClical.pyx":707
8263  * return NotImplemented
8264  *
8265  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
8266  * """
8267  * Subscripting: map from index set to scalar coordinate.
8268  */
8269 
8270  /* Python wrapper */
8271  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
8272  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 ";
8273  #if CYTHON_COMPILING_IN_CPYTHON
8274  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
8275  #endif
8276  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
8277  PyObject *__pyx_r = 0;
8278  __Pyx_RefNannyDeclarations
8279  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
8280  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
8281 
8282  /* function exit code */
8283  __Pyx_RefNannyFinishContext();
8284  return __pyx_r;
8285  }
8286 
8287  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
8288  PyObject *__pyx_r = NULL;
8289  __Pyx_RefNannyDeclarations
8290  PyObject *__pyx_t_1 = NULL;
8291  int __pyx_lineno = 0;
8292  const char *__pyx_filename = NULL;
8293  int __pyx_clineno = 0;
8294  __Pyx_RefNannySetupContext("__getitem__", 0);
8295 
8296  /* "PyClical.pyx":720
8297  * 2.0
8298  * """
8299  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
8300  *
8301  * def __neg__(self):
8302  */
8303  __Pyx_XDECREF(__pyx_r);
8304  __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)
8305  __Pyx_GOTREF(__pyx_t_1);
8306  __pyx_r = __pyx_t_1;
8307  __pyx_t_1 = 0;
8308  goto __pyx_L0;
8309 
8310  /* "PyClical.pyx":707
8311  * return NotImplemented
8312  *
8313  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
8314  * """
8315  * Subscripting: map from index set to scalar coordinate.
8316  */
8317 
8318  /* function exit code */
8319  __pyx_L1_error:;
8320  __Pyx_XDECREF(__pyx_t_1);
8321  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8322  __pyx_r = NULL;
8323  __pyx_L0:;
8324  __Pyx_XGIVEREF(__pyx_r);
8325  __Pyx_RefNannyFinishContext();
8326  return __pyx_r;
8327  }
8328 
8329  /* "PyClical.pyx":722
8330  * return self.instance.getitem(toIndexSet(ixt))
8331  *
8332  * def __neg__(self): # <<<<<<<<<<<<<<
8333  * """
8334  * Unary -.
8335  */
8336 
8337  /* Python wrapper */
8338  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
8339  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ";
8340  #if CYTHON_COMPILING_IN_CPYTHON
8341  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
8342  #endif
8343  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
8344  PyObject *__pyx_r = 0;
8345  __Pyx_RefNannyDeclarations
8346  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
8347  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8348 
8349  /* function exit code */
8350  __Pyx_RefNannyFinishContext();
8351  return __pyx_r;
8352  }
8353 
8354  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8355  PyObject *__pyx_r = NULL;
8356  __Pyx_RefNannyDeclarations
8357  PyObject *__pyx_t_1 = NULL;
8358  PyObject *__pyx_t_2 = NULL;
8359  int __pyx_lineno = 0;
8360  const char *__pyx_filename = NULL;
8361  int __pyx_clineno = 0;
8362  __Pyx_RefNannySetupContext("__neg__", 0);
8363 
8364  /* "PyClical.pyx":729
8365  * -{1}
8366  * """
8367  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
8368  *
8369  * def __pos__(self):
8370  */
8371  __Pyx_XDECREF(__pyx_r);
8372  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
8373  __Pyx_GOTREF(__pyx_t_1);
8374  __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)
8375  __Pyx_GOTREF(__pyx_t_2);
8376  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8377  __pyx_r = __pyx_t_2;
8378  __pyx_t_2 = 0;
8379  goto __pyx_L0;
8380 
8381  /* "PyClical.pyx":722
8382  * return self.instance.getitem(toIndexSet(ixt))
8383  *
8384  * def __neg__(self): # <<<<<<<<<<<<<<
8385  * """
8386  * Unary -.
8387  */
8388 
8389  /* function exit code */
8390  __pyx_L1_error:;
8391  __Pyx_XDECREF(__pyx_t_1);
8392  __Pyx_XDECREF(__pyx_t_2);
8393  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8394  __pyx_r = NULL;
8395  __pyx_L0:;
8396  __Pyx_XGIVEREF(__pyx_r);
8397  __Pyx_RefNannyFinishContext();
8398  return __pyx_r;
8399  }
8400 
8401  /* "PyClical.pyx":731
8402  * return clifford().wrap( self.instance.neg() )
8403  *
8404  * def __pos__(self): # <<<<<<<<<<<<<<
8405  * """
8406  * Unary +.
8407  */
8408 
8409  /* Python wrapper */
8410  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8411  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ";
8412  #if CYTHON_COMPILING_IN_CPYTHON
8413  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8414  #endif
8415  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8416  PyObject *__pyx_r = 0;
8417  __Pyx_RefNannyDeclarations
8418  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8419  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8420 
8421  /* function exit code */
8422  __Pyx_RefNannyFinishContext();
8423  return __pyx_r;
8424  }
8425 
8426  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8427  PyObject *__pyx_r = NULL;
8428  __Pyx_RefNannyDeclarations
8429  PyObject *__pyx_t_1 = NULL;
8430  int __pyx_lineno = 0;
8431  const char *__pyx_filename = NULL;
8432  int __pyx_clineno = 0;
8433  __Pyx_RefNannySetupContext("__pos__", 0);
8434 
8435  /* "PyClical.pyx":738
8436  * {1}
8437  * """
8438  * return clifford(self) # <<<<<<<<<<<<<<
8439  *
8440  * def __add__(lhs, rhs):
8441  */
8442  __Pyx_XDECREF(__pyx_r);
8443  __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)
8444  __Pyx_GOTREF(__pyx_t_1);
8445  __pyx_r = __pyx_t_1;
8446  __pyx_t_1 = 0;
8447  goto __pyx_L0;
8448 
8449  /* "PyClical.pyx":731
8450  * return clifford().wrap( self.instance.neg() )
8451  *
8452  * def __pos__(self): # <<<<<<<<<<<<<<
8453  * """
8454  * Unary +.
8455  */
8456 
8457  /* function exit code */
8458  __pyx_L1_error:;
8459  __Pyx_XDECREF(__pyx_t_1);
8460  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8461  __pyx_r = NULL;
8462  __pyx_L0:;
8463  __Pyx_XGIVEREF(__pyx_r);
8464  __Pyx_RefNannyFinishContext();
8465  return __pyx_r;
8466  }
8467 
8468  /* "PyClical.pyx":740
8469  * return clifford(self)
8470  *
8471  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8472  * """
8473  * Geometric sum.
8474  */
8475 
8476  /* Python wrapper */
8477  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8478  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 ";
8479  #if CYTHON_COMPILING_IN_CPYTHON
8480  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8481  #endif
8482  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8483  PyObject *__pyx_r = 0;
8484  __Pyx_RefNannyDeclarations
8485  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8486  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8487 
8488  /* function exit code */
8489  __Pyx_RefNannyFinishContext();
8490  return __pyx_r;
8491  }
8492 
8493  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8494  PyObject *__pyx_r = NULL;
8495  __Pyx_RefNannyDeclarations
8496  PyObject *__pyx_t_1 = NULL;
8497  PyObject *__pyx_t_2 = NULL;
8498  int __pyx_lineno = 0;
8499  const char *__pyx_filename = NULL;
8500  int __pyx_clineno = 0;
8501  __Pyx_RefNannySetupContext("__add__", 0);
8502 
8503  /* "PyClical.pyx":749
8504  * {1}+{2}
8505  * """
8506  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8507  *
8508  * def __iadd__(self, rhs):
8509  */
8510  __Pyx_XDECREF(__pyx_r);
8511  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
8512  __Pyx_GOTREF(__pyx_t_1);
8513  __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)
8514  __Pyx_GOTREF(__pyx_t_2);
8515  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8516  __pyx_r = __pyx_t_2;
8517  __pyx_t_2 = 0;
8518  goto __pyx_L0;
8519 
8520  /* "PyClical.pyx":740
8521  * return clifford(self)
8522  *
8523  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8524  * """
8525  * Geometric sum.
8526  */
8527 
8528  /* function exit code */
8529  __pyx_L1_error:;
8530  __Pyx_XDECREF(__pyx_t_1);
8531  __Pyx_XDECREF(__pyx_t_2);
8532  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8533  __pyx_r = NULL;
8534  __pyx_L0:;
8535  __Pyx_XGIVEREF(__pyx_r);
8536  __Pyx_RefNannyFinishContext();
8537  return __pyx_r;
8538  }
8539 
8540  /* "PyClical.pyx":751
8541  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8542  *
8543  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8544  * """
8545  * Geometric sum.
8546  */
8547 
8548  /* Python wrapper */
8549  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8550  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 ";
8551  #if CYTHON_COMPILING_IN_CPYTHON
8552  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8553  #endif
8554  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8555  PyObject *__pyx_r = 0;
8556  __Pyx_RefNannyDeclarations
8557  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8558  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8559 
8560  /* function exit code */
8561  __Pyx_RefNannyFinishContext();
8562  return __pyx_r;
8563  }
8564 
8565  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8566  PyObject *__pyx_r = NULL;
8567  __Pyx_RefNannyDeclarations
8568  PyObject *__pyx_t_1 = NULL;
8569  int __pyx_lineno = 0;
8570  const char *__pyx_filename = NULL;
8571  int __pyx_clineno = 0;
8572  __Pyx_RefNannySetupContext("__iadd__", 0);
8573 
8574  /* "PyClical.pyx":758
8575  * 1+{2}
8576  * """
8577  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8578  *
8579  * def __sub__(lhs, rhs):
8580  */
8581  __Pyx_XDECREF(__pyx_r);
8582  __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)
8583  __Pyx_GOTREF(__pyx_t_1);
8584  __pyx_r = __pyx_t_1;
8585  __pyx_t_1 = 0;
8586  goto __pyx_L0;
8587 
8588  /* "PyClical.pyx":751
8589  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8590  *
8591  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8592  * """
8593  * Geometric sum.
8594  */
8595 
8596  /* function exit code */
8597  __pyx_L1_error:;
8598  __Pyx_XDECREF(__pyx_t_1);
8599  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8600  __pyx_r = NULL;
8601  __pyx_L0:;
8602  __Pyx_XGIVEREF(__pyx_r);
8603  __Pyx_RefNannyFinishContext();
8604  return __pyx_r;
8605  }
8606 
8607  /* "PyClical.pyx":760
8608  * return self.wrap( self.unwrap() + toClifford(rhs) )
8609  *
8610  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8611  * """
8612  * Geometric difference.
8613  */
8614 
8615  /* Python wrapper */
8616  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8617  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 ";
8618  #if CYTHON_COMPILING_IN_CPYTHON
8619  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8620  #endif
8621  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8622  PyObject *__pyx_r = 0;
8623  __Pyx_RefNannyDeclarations
8624  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8625  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8626 
8627  /* function exit code */
8628  __Pyx_RefNannyFinishContext();
8629  return __pyx_r;
8630  }
8631 
8632  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8633  PyObject *__pyx_r = NULL;
8634  __Pyx_RefNannyDeclarations
8635  PyObject *__pyx_t_1 = NULL;
8636  PyObject *__pyx_t_2 = NULL;
8637  int __pyx_lineno = 0;
8638  const char *__pyx_filename = NULL;
8639  int __pyx_clineno = 0;
8640  __Pyx_RefNannySetupContext("__sub__", 0);
8641 
8642  /* "PyClical.pyx":769
8643  * {1}-{2}
8644  * """
8645  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8646  *
8647  * def __isub__(self, rhs):
8648  */
8649  __Pyx_XDECREF(__pyx_r);
8650  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)
8651  __Pyx_GOTREF(__pyx_t_1);
8652  __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)
8653  __Pyx_GOTREF(__pyx_t_2);
8654  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8655  __pyx_r = __pyx_t_2;
8656  __pyx_t_2 = 0;
8657  goto __pyx_L0;
8658 
8659  /* "PyClical.pyx":760
8660  * return self.wrap( self.unwrap() + toClifford(rhs) )
8661  *
8662  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8663  * """
8664  * Geometric difference.
8665  */
8666 
8667  /* function exit code */
8668  __pyx_L1_error:;
8669  __Pyx_XDECREF(__pyx_t_1);
8670  __Pyx_XDECREF(__pyx_t_2);
8671  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8672  __pyx_r = NULL;
8673  __pyx_L0:;
8674  __Pyx_XGIVEREF(__pyx_r);
8675  __Pyx_RefNannyFinishContext();
8676  return __pyx_r;
8677  }
8678 
8679  /* "PyClical.pyx":771
8680  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8681  *
8682  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8683  * """
8684  * Geometric difference.
8685  */
8686 
8687  /* Python wrapper */
8688  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8689  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 ";
8690  #if CYTHON_COMPILING_IN_CPYTHON
8691  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8692  #endif
8693  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8694  PyObject *__pyx_r = 0;
8695  __Pyx_RefNannyDeclarations
8696  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8697  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8698 
8699  /* function exit code */
8700  __Pyx_RefNannyFinishContext();
8701  return __pyx_r;
8702  }
8703 
8704  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8705  PyObject *__pyx_r = NULL;
8706  __Pyx_RefNannyDeclarations
8707  PyObject *__pyx_t_1 = NULL;
8708  int __pyx_lineno = 0;
8709  const char *__pyx_filename = NULL;
8710  int __pyx_clineno = 0;
8711  __Pyx_RefNannySetupContext("__isub__", 0);
8712 
8713  /* "PyClical.pyx":778
8714  * 1-{2}
8715  * """
8716  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8717  *
8718  * def __mul__(lhs, rhs):
8719  */
8720  __Pyx_XDECREF(__pyx_r);
8721  __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)
8722  __Pyx_GOTREF(__pyx_t_1);
8723  __pyx_r = __pyx_t_1;
8724  __pyx_t_1 = 0;
8725  goto __pyx_L0;
8726 
8727  /* "PyClical.pyx":771
8728  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8729  *
8730  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8731  * """
8732  * Geometric difference.
8733  */
8734 
8735  /* function exit code */
8736  __pyx_L1_error:;
8737  __Pyx_XDECREF(__pyx_t_1);
8738  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8739  __pyx_r = NULL;
8740  __pyx_L0:;
8741  __Pyx_XGIVEREF(__pyx_r);
8742  __Pyx_RefNannyFinishContext();
8743  return __pyx_r;
8744  }
8745 
8746  /* "PyClical.pyx":780
8747  * return self.wrap( self.unwrap() - toClifford(rhs) )
8748  *
8749  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8750  * """
8751  * Geometric product.
8752  */
8753 
8754  /* Python wrapper */
8755  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8756  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 ";
8757  #if CYTHON_COMPILING_IN_CPYTHON
8758  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8759  #endif
8760  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8761  PyObject *__pyx_r = 0;
8762  __Pyx_RefNannyDeclarations
8763  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8764  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8765 
8766  /* function exit code */
8767  __Pyx_RefNannyFinishContext();
8768  return __pyx_r;
8769  }
8770 
8771  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8772  PyObject *__pyx_r = NULL;
8773  __Pyx_RefNannyDeclarations
8774  PyObject *__pyx_t_1 = NULL;
8775  PyObject *__pyx_t_2 = NULL;
8776  int __pyx_lineno = 0;
8777  const char *__pyx_filename = NULL;
8778  int __pyx_clineno = 0;
8779  __Pyx_RefNannySetupContext("__mul__", 0);
8780 
8781  /* "PyClical.pyx":791
8782  * {2}
8783  * """
8784  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8785  *
8786  * def __imul__(self, rhs):
8787  */
8788  __Pyx_XDECREF(__pyx_r);
8789  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
8790  __Pyx_GOTREF(__pyx_t_1);
8791  __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)
8792  __Pyx_GOTREF(__pyx_t_2);
8793  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8794  __pyx_r = __pyx_t_2;
8795  __pyx_t_2 = 0;
8796  goto __pyx_L0;
8797 
8798  /* "PyClical.pyx":780
8799  * return self.wrap( self.unwrap() - toClifford(rhs) )
8800  *
8801  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8802  * """
8803  * Geometric product.
8804  */
8805 
8806  /* function exit code */
8807  __pyx_L1_error:;
8808  __Pyx_XDECREF(__pyx_t_1);
8809  __Pyx_XDECREF(__pyx_t_2);
8810  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8811  __pyx_r = NULL;
8812  __pyx_L0:;
8813  __Pyx_XGIVEREF(__pyx_r);
8814  __Pyx_RefNannyFinishContext();
8815  return __pyx_r;
8816  }
8817 
8818  /* "PyClical.pyx":793
8819  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8820  *
8821  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8822  * """
8823  * Geometric product.
8824  */
8825 
8826  /* Python wrapper */
8827  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8828  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 ";
8829  #if CYTHON_COMPILING_IN_CPYTHON
8830  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8831  #endif
8832  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8833  PyObject *__pyx_r = 0;
8834  __Pyx_RefNannyDeclarations
8835  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8836  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8837 
8838  /* function exit code */
8839  __Pyx_RefNannyFinishContext();
8840  return __pyx_r;
8841  }
8842 
8843  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8844  PyObject *__pyx_r = NULL;
8845  __Pyx_RefNannyDeclarations
8846  PyObject *__pyx_t_1 = NULL;
8847  int __pyx_lineno = 0;
8848  const char *__pyx_filename = NULL;
8849  int __pyx_clineno = 0;
8850  __Pyx_RefNannySetupContext("__imul__", 0);
8851 
8852  /* "PyClical.pyx":804
8853  * {2}
8854  * """
8855  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8856  *
8857  * def __mod__(lhs, rhs):
8858  */
8859  __Pyx_XDECREF(__pyx_r);
8860  __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)
8861  __Pyx_GOTREF(__pyx_t_1);
8862  __pyx_r = __pyx_t_1;
8863  __pyx_t_1 = 0;
8864  goto __pyx_L0;
8865 
8866  /* "PyClical.pyx":793
8867  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8868  *
8869  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8870  * """
8871  * Geometric product.
8872  */
8873 
8874  /* function exit code */
8875  __pyx_L1_error:;
8876  __Pyx_XDECREF(__pyx_t_1);
8877  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8878  __pyx_r = NULL;
8879  __pyx_L0:;
8880  __Pyx_XGIVEREF(__pyx_r);
8881  __Pyx_RefNannyFinishContext();
8882  return __pyx_r;
8883  }
8884 
8885  /* "PyClical.pyx":806
8886  * return self.wrap( self.unwrap() * toClifford(rhs) )
8887  *
8888  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8889  * """
8890  * Contraction.
8891  */
8892 
8893  /* Python wrapper */
8894  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8895  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 ";
8896  #if CYTHON_COMPILING_IN_CPYTHON
8897  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8898  #endif
8899  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8900  PyObject *__pyx_r = 0;
8901  __Pyx_RefNannyDeclarations
8902  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8903  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8904 
8905  /* function exit code */
8906  __Pyx_RefNannyFinishContext();
8907  return __pyx_r;
8908  }
8909 
8910  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8911  PyObject *__pyx_r = NULL;
8912  __Pyx_RefNannyDeclarations
8913  PyObject *__pyx_t_1 = NULL;
8914  PyObject *__pyx_t_2 = NULL;
8915  int __pyx_lineno = 0;
8916  const char *__pyx_filename = NULL;
8917  int __pyx_clineno = 0;
8918  __Pyx_RefNannySetupContext("__mod__", 0);
8919 
8920  /* "PyClical.pyx":819
8921  * {2}
8922  * """
8923  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8924  *
8925  * def __imod__(self, rhs):
8926  */
8927  __Pyx_XDECREF(__pyx_r);
8928  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
8929  __Pyx_GOTREF(__pyx_t_1);
8930  __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)
8931  __Pyx_GOTREF(__pyx_t_2);
8932  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8933  __pyx_r = __pyx_t_2;
8934  __pyx_t_2 = 0;
8935  goto __pyx_L0;
8936 
8937  /* "PyClical.pyx":806
8938  * return self.wrap( self.unwrap() * toClifford(rhs) )
8939  *
8940  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8941  * """
8942  * Contraction.
8943  */
8944 
8945  /* function exit code */
8946  __pyx_L1_error:;
8947  __Pyx_XDECREF(__pyx_t_1);
8948  __Pyx_XDECREF(__pyx_t_2);
8949  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8950  __pyx_r = NULL;
8951  __pyx_L0:;
8952  __Pyx_XGIVEREF(__pyx_r);
8953  __Pyx_RefNannyFinishContext();
8954  return __pyx_r;
8955  }
8956 
8957  /* "PyClical.pyx":821
8958  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8959  *
8960  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8961  * """
8962  * Contraction.
8963  */
8964 
8965  /* Python wrapper */
8966  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8967  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 ";
8968  #if CYTHON_COMPILING_IN_CPYTHON
8969  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8970  #endif
8971  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8972  PyObject *__pyx_r = 0;
8973  __Pyx_RefNannyDeclarations
8974  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8975  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8976 
8977  /* function exit code */
8978  __Pyx_RefNannyFinishContext();
8979  return __pyx_r;
8980  }
8981 
8982  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8983  PyObject *__pyx_r = NULL;
8984  __Pyx_RefNannyDeclarations
8985  PyObject *__pyx_t_1 = NULL;
8986  int __pyx_lineno = 0;
8987  const char *__pyx_filename = NULL;
8988  int __pyx_clineno = 0;
8989  __Pyx_RefNannySetupContext("__imod__", 0);
8990 
8991  /* "PyClical.pyx":834
8992  * {2}
8993  * """
8994  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8995  *
8996  * def __and__(lhs, rhs):
8997  */
8998  __Pyx_XDECREF(__pyx_r);
8999  __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)
9000  __Pyx_GOTREF(__pyx_t_1);
9001  __pyx_r = __pyx_t_1;
9002  __pyx_t_1 = 0;
9003  goto __pyx_L0;
9004 
9005  /* "PyClical.pyx":821
9006  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
9007  *
9008  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
9009  * """
9010  * Contraction.
9011  */
9012 
9013  /* function exit code */
9014  __pyx_L1_error:;
9015  __Pyx_XDECREF(__pyx_t_1);
9016  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9017  __pyx_r = NULL;
9018  __pyx_L0:;
9019  __Pyx_XGIVEREF(__pyx_r);
9020  __Pyx_RefNannyFinishContext();
9021  return __pyx_r;
9022  }
9023 
9024  /* "PyClical.pyx":836
9025  * return self.wrap( self.unwrap() % toClifford(rhs) )
9026  *
9027  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
9028  * """
9029  * Inner product.
9030  */
9031 
9032  /* Python wrapper */
9033  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9034  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 ";
9035  #if CYTHON_COMPILING_IN_CPYTHON
9036  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
9037  #endif
9038  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9039  PyObject *__pyx_r = 0;
9040  __Pyx_RefNannyDeclarations
9041  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
9042  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9043 
9044  /* function exit code */
9045  __Pyx_RefNannyFinishContext();
9046  return __pyx_r;
9047  }
9048 
9049  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9050  PyObject *__pyx_r = NULL;
9051  __Pyx_RefNannyDeclarations
9052  PyObject *__pyx_t_1 = NULL;
9053  PyObject *__pyx_t_2 = NULL;
9054  int __pyx_lineno = 0;
9055  const char *__pyx_filename = NULL;
9056  int __pyx_clineno = 0;
9057  __Pyx_RefNannySetupContext("__and__", 0);
9058 
9059  /* "PyClical.pyx":849
9060  * {2}
9061  * """
9062  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
9063  *
9064  * def __iand__(self, rhs):
9065  */
9066  __Pyx_XDECREF(__pyx_r);
9067  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
9068  __Pyx_GOTREF(__pyx_t_1);
9069  __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)
9070  __Pyx_GOTREF(__pyx_t_2);
9071  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9072  __pyx_r = __pyx_t_2;
9073  __pyx_t_2 = 0;
9074  goto __pyx_L0;
9075 
9076  /* "PyClical.pyx":836
9077  * return self.wrap( self.unwrap() % toClifford(rhs) )
9078  *
9079  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
9080  * """
9081  * Inner product.
9082  */
9083 
9084  /* function exit code */
9085  __pyx_L1_error:;
9086  __Pyx_XDECREF(__pyx_t_1);
9087  __Pyx_XDECREF(__pyx_t_2);
9088  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9089  __pyx_r = NULL;
9090  __pyx_L0:;
9091  __Pyx_XGIVEREF(__pyx_r);
9092  __Pyx_RefNannyFinishContext();
9093  return __pyx_r;
9094  }
9095 
9096  /* "PyClical.pyx":851
9097  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
9098  *
9099  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
9100  * """
9101  * Inner product.
9102  */
9103 
9104  /* Python wrapper */
9105  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9106  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 ";
9107  #if CYTHON_COMPILING_IN_CPYTHON
9108  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
9109  #endif
9110  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9111  PyObject *__pyx_r = 0;
9112  __Pyx_RefNannyDeclarations
9113  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
9114  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9115 
9116  /* function exit code */
9117  __Pyx_RefNannyFinishContext();
9118  return __pyx_r;
9119  }
9120 
9121  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9122  PyObject *__pyx_r = NULL;
9123  __Pyx_RefNannyDeclarations
9124  PyObject *__pyx_t_1 = NULL;
9125  int __pyx_lineno = 0;
9126  const char *__pyx_filename = NULL;
9127  int __pyx_clineno = 0;
9128  __Pyx_RefNannySetupContext("__iand__", 0);
9129 
9130  /* "PyClical.pyx":864
9131  * {2}
9132  * """
9133  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
9134  *
9135  * def __xor__(lhs, rhs):
9136  */
9137  __Pyx_XDECREF(__pyx_r);
9138  __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)
9139  __Pyx_GOTREF(__pyx_t_1);
9140  __pyx_r = __pyx_t_1;
9141  __pyx_t_1 = 0;
9142  goto __pyx_L0;
9143 
9144  /* "PyClical.pyx":851
9145  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
9146  *
9147  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
9148  * """
9149  * Inner product.
9150  */
9151 
9152  /* function exit code */
9153  __pyx_L1_error:;
9154  __Pyx_XDECREF(__pyx_t_1);
9155  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9156  __pyx_r = NULL;
9157  __pyx_L0:;
9158  __Pyx_XGIVEREF(__pyx_r);
9159  __Pyx_RefNannyFinishContext();
9160  return __pyx_r;
9161  }
9162 
9163  /* "PyClical.pyx":866
9164  * return self.wrap( self.unwrap() & toClifford(rhs) )
9165  *
9166  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
9167  * """
9168  * Outer product.
9169  */
9170 
9171  /* Python wrapper */
9172  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9173  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 ";
9174  #if CYTHON_COMPILING_IN_CPYTHON
9175  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
9176  #endif
9177  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9178  PyObject *__pyx_r = 0;
9179  __Pyx_RefNannyDeclarations
9180  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
9181  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9182 
9183  /* function exit code */
9184  __Pyx_RefNannyFinishContext();
9185  return __pyx_r;
9186  }
9187 
9188  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9189  PyObject *__pyx_r = NULL;
9190  __Pyx_RefNannyDeclarations
9191  PyObject *__pyx_t_1 = NULL;
9192  PyObject *__pyx_t_2 = NULL;
9193  int __pyx_lineno = 0;
9194  const char *__pyx_filename = NULL;
9195  int __pyx_clineno = 0;
9196  __Pyx_RefNannySetupContext("__xor__", 0);
9197 
9198  /* "PyClical.pyx":879
9199  * 0
9200  * """
9201  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
9202  *
9203  * def __ixor__(self, rhs):
9204  */
9205  __Pyx_XDECREF(__pyx_r);
9206  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
9207  __Pyx_GOTREF(__pyx_t_1);
9208  __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)
9209  __Pyx_GOTREF(__pyx_t_2);
9210  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9211  __pyx_r = __pyx_t_2;
9212  __pyx_t_2 = 0;
9213  goto __pyx_L0;
9214 
9215  /* "PyClical.pyx":866
9216  * return self.wrap( self.unwrap() & toClifford(rhs) )
9217  *
9218  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
9219  * """
9220  * Outer product.
9221  */
9222 
9223  /* function exit code */
9224  __pyx_L1_error:;
9225  __Pyx_XDECREF(__pyx_t_1);
9226  __Pyx_XDECREF(__pyx_t_2);
9227  __Pyx_AddTraceback("PyClical.clifford.__xor__", __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 
9235  /* "PyClical.pyx":881
9236  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
9237  *
9238  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
9239  * """
9240  * Outer product.
9241  */
9242 
9243  /* Python wrapper */
9244  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9245  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 ";
9246  #if CYTHON_COMPILING_IN_CPYTHON
9247  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
9248  #endif
9249  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9250  PyObject *__pyx_r = 0;
9251  __Pyx_RefNannyDeclarations
9252  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
9253  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9254 
9255  /* function exit code */
9256  __Pyx_RefNannyFinishContext();
9257  return __pyx_r;
9258  }
9259 
9260  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9261  PyObject *__pyx_r = NULL;
9262  __Pyx_RefNannyDeclarations
9263  PyObject *__pyx_t_1 = NULL;
9264  int __pyx_lineno = 0;
9265  const char *__pyx_filename = NULL;
9266  int __pyx_clineno = 0;
9267  __Pyx_RefNannySetupContext("__ixor__", 0);
9268 
9269  /* "PyClical.pyx":894
9270  * 0
9271  * """
9272  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
9273  *
9274  * def __truediv__(lhs, rhs):
9275  */
9276  __Pyx_XDECREF(__pyx_r);
9277  __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)
9278  __Pyx_GOTREF(__pyx_t_1);
9279  __pyx_r = __pyx_t_1;
9280  __pyx_t_1 = 0;
9281  goto __pyx_L0;
9282 
9283  /* "PyClical.pyx":881
9284  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
9285  *
9286  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
9287  * """
9288  * Outer product.
9289  */
9290 
9291  /* function exit code */
9292  __pyx_L1_error:;
9293  __Pyx_XDECREF(__pyx_t_1);
9294  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __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":896
9303  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
9304  *
9305  * def __truediv__(lhs, rhs): # <<<<<<<<<<<<<<
9306  * """
9307  * Geometric quotient.
9308  */
9309 
9310  /* Python wrapper */
9311  static PyObject *__pyx_pw_8PyClical_8clifford_45__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9312  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 ";
9313  #if CYTHON_COMPILING_IN_CPYTHON
9314  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__truediv__;
9315  #endif
9316  static PyObject *__pyx_pw_8PyClical_8clifford_45__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9317  PyObject *__pyx_r = 0;
9318  __Pyx_RefNannyDeclarations
9319  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
9320  __pyx_r = __pyx_pf_8PyClical_8clifford_44__truediv__(((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_44__truediv__(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  int __pyx_lineno = 0;
9333  const char *__pyx_filename = NULL;
9334  int __pyx_clineno = 0;
9335  __Pyx_RefNannySetupContext("__truediv__", 0);
9336 
9337  /* "PyClical.pyx":909
9338  * -{2}
9339  * """
9340  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
9341  *
9342  * def __idiv__(self, rhs):
9343  */
9344  __Pyx_XDECREF(__pyx_r);
9345  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
9346  __Pyx_GOTREF(__pyx_t_1);
9347  __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)
9348  __Pyx_GOTREF(__pyx_t_2);
9349  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9350  __pyx_r = __pyx_t_2;
9351  __pyx_t_2 = 0;
9352  goto __pyx_L0;
9353 
9354  /* "PyClical.pyx":896
9355  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
9356  *
9357  * def __truediv__(lhs, rhs): # <<<<<<<<<<<<<<
9358  * """
9359  * Geometric quotient.
9360  */
9361 
9362  /* function exit code */
9363  __pyx_L1_error:;
9364  __Pyx_XDECREF(__pyx_t_1);
9365  __Pyx_XDECREF(__pyx_t_2);
9366  __Pyx_AddTraceback("PyClical.clifford.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9367  __pyx_r = NULL;
9368  __pyx_L0:;
9369  __Pyx_XGIVEREF(__pyx_r);
9370  __Pyx_RefNannyFinishContext();
9371  return __pyx_r;
9372  }
9373 
9374  /* "PyClical.pyx":911
9375  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9376  *
9377  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9378  * """
9379  * Geometric quotient.
9380  */
9381 
9382  /* Python wrapper */
9383  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9384  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9385  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 ";
9386  #if CYTHON_COMPILING_IN_CPYTHON
9387  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
9388  #endif
9389  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9390  PyObject *__pyx_r = 0;
9391  __Pyx_RefNannyDeclarations
9392  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
9393  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9394 
9395  /* function exit code */
9396  __Pyx_RefNannyFinishContext();
9397  return __pyx_r;
9398  }
9399  #endif
9401  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9402  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9403  PyObject *__pyx_r = NULL;
9404  __Pyx_RefNannyDeclarations
9405  PyObject *__pyx_t_1 = NULL;
9406  int __pyx_lineno = 0;
9407  const char *__pyx_filename = NULL;
9408  int __pyx_clineno = 0;
9409  __Pyx_RefNannySetupContext("__idiv__", 0);
9410 
9411  /* "PyClical.pyx":924
9412  * -{2}
9413  * """
9414  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
9415  *
9416  * def inv(self):
9417  */
9418  __Pyx_XDECREF(__pyx_r);
9419  __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)
9420  __Pyx_GOTREF(__pyx_t_1);
9421  __pyx_r = __pyx_t_1;
9422  __pyx_t_1 = 0;
9423  goto __pyx_L0;
9424 
9425  /* "PyClical.pyx":911
9426  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9427  *
9428  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9429  * """
9430  * Geometric quotient.
9431  */
9432 
9433  /* function exit code */
9434  __pyx_L1_error:;
9435  __Pyx_XDECREF(__pyx_t_1);
9436  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9437  __pyx_r = NULL;
9438  __pyx_L0:;
9439  __Pyx_XGIVEREF(__pyx_r);
9440  __Pyx_RefNannyFinishContext();
9441  return __pyx_r;
9442  }
9443  #endif
9445  /* "PyClical.pyx":926
9446  * return self.wrap( self.unwrap() / toClifford(rhs) )
9447  *
9448  * def inv(self): # <<<<<<<<<<<<<<
9449  * """
9450  * Geometric multiplicative inverse.
9451  */
9452 
9453  /* Python wrapper */
9454  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9455  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 ";
9456  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9457  PyObject *__pyx_r = 0;
9458  __Pyx_RefNannyDeclarations
9459  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9460  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9461 
9462  /* function exit code */
9463  __Pyx_RefNannyFinishContext();
9464  return __pyx_r;
9465  }
9466 
9467  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9468  PyObject *__pyx_r = NULL;
9469  __Pyx_RefNannyDeclarations
9470  PyObject *__pyx_t_1 = NULL;
9471  PyObject *__pyx_t_2 = NULL;
9472  int __pyx_lineno = 0;
9473  const char *__pyx_filename = NULL;
9474  int __pyx_clineno = 0;
9475  __Pyx_RefNannySetupContext("inv", 0);
9476 
9477  /* "PyClical.pyx":937
9478  * -{1,2}
9479  * """
9480  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9481  *
9482  * def __or__(lhs, rhs):
9483  */
9484  __Pyx_XDECREF(__pyx_r);
9485  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error)
9486  __Pyx_GOTREF(__pyx_t_1);
9487  __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)
9488  __Pyx_GOTREF(__pyx_t_2);
9489  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9490  __pyx_r = __pyx_t_2;
9491  __pyx_t_2 = 0;
9492  goto __pyx_L0;
9493 
9494  /* "PyClical.pyx":926
9495  * return self.wrap( self.unwrap() / toClifford(rhs) )
9496  *
9497  * def inv(self): # <<<<<<<<<<<<<<
9498  * """
9499  * Geometric multiplicative inverse.
9500  */
9501 
9502  /* function exit code */
9503  __pyx_L1_error:;
9504  __Pyx_XDECREF(__pyx_t_1);
9505  __Pyx_XDECREF(__pyx_t_2);
9506  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9507  __pyx_r = NULL;
9508  __pyx_L0:;
9509  __Pyx_XGIVEREF(__pyx_r);
9510  __Pyx_RefNannyFinishContext();
9511  return __pyx_r;
9512  }
9513 
9514  /* "PyClical.pyx":939
9515  * return clifford().wrap( self.instance.inv() )
9516  *
9517  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9518  * """
9519  * Transform left hand side, using right hand side as a transformation.
9520  */
9521 
9522  /* Python wrapper */
9523  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9524  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 ";
9525  #if CYTHON_COMPILING_IN_CPYTHON
9526  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9527  #endif
9528  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9529  PyObject *__pyx_r = 0;
9530  __Pyx_RefNannyDeclarations
9531  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9532  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9533 
9534  /* function exit code */
9535  __Pyx_RefNannyFinishContext();
9536  return __pyx_r;
9537  }
9538 
9539  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9540  PyObject *__pyx_r = NULL;
9541  __Pyx_RefNannyDeclarations
9542  PyObject *__pyx_t_1 = NULL;
9543  PyObject *__pyx_t_2 = NULL;
9544  int __pyx_lineno = 0;
9545  const char *__pyx_filename = NULL;
9546  int __pyx_clineno = 0;
9547  __Pyx_RefNannySetupContext("__or__", 0);
9548 
9549  /* "PyClical.pyx":948
9550  * -{1}
9551  * """
9552  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9553  *
9554  * def __ior__(self, rhs):
9555  */
9556  __Pyx_XDECREF(__pyx_r);
9557  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
9558  __Pyx_GOTREF(__pyx_t_1);
9559  __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)
9560  __Pyx_GOTREF(__pyx_t_2);
9561  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9562  __pyx_r = __pyx_t_2;
9563  __pyx_t_2 = 0;
9564  goto __pyx_L0;
9565 
9566  /* "PyClical.pyx":939
9567  * return clifford().wrap( self.instance.inv() )
9568  *
9569  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9570  * """
9571  * Transform left hand side, using right hand side as a transformation.
9572  */
9573 
9574  /* function exit code */
9575  __pyx_L1_error:;
9576  __Pyx_XDECREF(__pyx_t_1);
9577  __Pyx_XDECREF(__pyx_t_2);
9578  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9579  __pyx_r = NULL;
9580  __pyx_L0:;
9581  __Pyx_XGIVEREF(__pyx_r);
9582  __Pyx_RefNannyFinishContext();
9583  return __pyx_r;
9584  }
9585 
9586  /* "PyClical.pyx":950
9587  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9588  *
9589  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9590  * """
9591  * Transform left hand side, using right hand side as a transformation.
9592  */
9593 
9594  /* Python wrapper */
9595  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9596  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 ";
9597  #if CYTHON_COMPILING_IN_CPYTHON
9598  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9599  #endif
9600  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9601  PyObject *__pyx_r = 0;
9602  __Pyx_RefNannyDeclarations
9603  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9604  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9605 
9606  /* function exit code */
9607  __Pyx_RefNannyFinishContext();
9608  return __pyx_r;
9609  }
9610 
9611  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9612  PyObject *__pyx_r = NULL;
9613  __Pyx_RefNannyDeclarations
9614  PyObject *__pyx_t_1 = NULL;
9615  int __pyx_lineno = 0;
9616  const char *__pyx_filename = NULL;
9617  int __pyx_clineno = 0;
9618  __Pyx_RefNannySetupContext("__ior__", 0);
9619 
9620  /* "PyClical.pyx":959
9621  * -{1}
9622  * """
9623  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9624  *
9625  * def __pow__(self, m, dummy):
9626  */
9627  __Pyx_XDECREF(__pyx_r);
9628  __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)
9629  __Pyx_GOTREF(__pyx_t_1);
9630  __pyx_r = __pyx_t_1;
9631  __pyx_t_1 = 0;
9632  goto __pyx_L0;
9633 
9634  /* "PyClical.pyx":950
9635  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9636  *
9637  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9638  * """
9639  * Transform left hand side, using right hand side as a transformation.
9640  */
9641 
9642  /* function exit code */
9643  __pyx_L1_error:;
9644  __Pyx_XDECREF(__pyx_t_1);
9645  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9646  __pyx_r = NULL;
9647  __pyx_L0:;
9648  __Pyx_XGIVEREF(__pyx_r);
9649  __Pyx_RefNannyFinishContext();
9650  return __pyx_r;
9651  }
9652 
9653  /* "PyClical.pyx":961
9654  * return self.wrap( self.unwrap() | toClifford(rhs) )
9655  *
9656  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9657  * """
9658  * Power: self to the m.
9659  */
9660 
9661  /* Python wrapper */
9662  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9663  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 ";
9664  #if CYTHON_COMPILING_IN_CPYTHON
9665  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9666  #endif
9667  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9668  PyObject *__pyx_r = 0;
9669  __Pyx_RefNannyDeclarations
9670  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9671  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9672 
9673  /* function exit code */
9674  __Pyx_RefNannyFinishContext();
9675  return __pyx_r;
9676  }
9677 
9678  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9679  PyObject *__pyx_r = NULL;
9680  __Pyx_RefNannyDeclarations
9681  PyObject *__pyx_t_1 = NULL;
9682  int __pyx_lineno = 0;
9683  const char *__pyx_filename = NULL;
9684  int __pyx_clineno = 0;
9685  __Pyx_RefNannySetupContext("__pow__", 0);
9686 
9687  /* "PyClical.pyx":978
9688  * 1
9689  * """
9690  * return pow(self, m) # <<<<<<<<<<<<<<
9691  *
9692  * def pow(self, m):
9693  */
9694  __Pyx_XDECREF(__pyx_r);
9695  __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)
9696  __Pyx_GOTREF(__pyx_t_1);
9697  __pyx_r = __pyx_t_1;
9698  __pyx_t_1 = 0;
9699  goto __pyx_L0;
9700 
9701  /* "PyClical.pyx":961
9702  * return self.wrap( self.unwrap() | toClifford(rhs) )
9703  *
9704  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9705  * """
9706  * Power: self to the m.
9707  */
9708 
9709  /* function exit code */
9710  __pyx_L1_error:;
9711  __Pyx_XDECREF(__pyx_t_1);
9712  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9713  __pyx_r = NULL;
9714  __pyx_L0:;
9715  __Pyx_XGIVEREF(__pyx_r);
9716  __Pyx_RefNannyFinishContext();
9717  return __pyx_r;
9718  }
9719 
9720  /* "PyClical.pyx":980
9721  * return pow(self, m)
9722  *
9723  * def pow(self, m): # <<<<<<<<<<<<<<
9724  * """
9725  * Power: self to the m.
9726  */
9727 
9728  /* Python wrapper */
9729  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9730  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 ";
9731  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9732  PyObject *__pyx_r = 0;
9733  __Pyx_RefNannyDeclarations
9734  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9735  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9736 
9737  /* function exit code */
9738  __Pyx_RefNannyFinishContext();
9739  return __pyx_r;
9740  }
9741 
9742  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9743  PyObject *__pyx_r = NULL;
9744  __Pyx_RefNannyDeclarations
9745  PyObject *__pyx_t_1 = NULL;
9746  PyObject *__pyx_t_2 = NULL;
9747  int __pyx_t_3;
9748  int __pyx_t_4;
9749  int __pyx_t_5;
9750  int __pyx_lineno = 0;
9751  const char *__pyx_filename = NULL;
9752  int __pyx_clineno = 0;
9753  __Pyx_RefNannySetupContext("pow", 0);
9754 
9755  /* "PyClical.pyx":999
9756  * 1
9757  * """
9758  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9759  * return clifford().wrap( self.instance.pow(m) )
9760  * else:
9761  */
9762  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
9763  __Pyx_GOTREF(__pyx_t_1);
9764  __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)
9765  __Pyx_GOTREF(__pyx_t_2);
9766  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9767  __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)
9768  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9769  __pyx_t_4 = (__pyx_t_3 != 0);
9770  if (__pyx_t_4) {
9771 
9772  /* "PyClical.pyx":1000
9773  * """
9774  * if isinstance(m, numbers.Integral):
9775  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9776  * else:
9777  * return exp(m * log(self))
9778  */
9779  __Pyx_XDECREF(__pyx_r);
9780  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
9781  __Pyx_GOTREF(__pyx_t_2);
9782  __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)
9783  __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)
9784  __Pyx_GOTREF(__pyx_t_1);
9785  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9786  __pyx_r = __pyx_t_1;
9787  __pyx_t_1 = 0;
9788  goto __pyx_L0;
9789 
9790  /* "PyClical.pyx":999
9791  * 1
9792  * """
9793  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9794  * return clifford().wrap( self.instance.pow(m) )
9795  * else:
9796  */
9797  }
9798 
9799  /* "PyClical.pyx":1002
9800  * return clifford().wrap( self.instance.pow(m) )
9801  * else:
9802  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9803  *
9804  * def outer_pow(self, m):
9805  */
9806  /*else*/ {
9807  __Pyx_XDECREF(__pyx_r);
9808  __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)
9809  __Pyx_GOTREF(__pyx_t_1);
9810  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
9811  __Pyx_GOTREF(__pyx_t_2);
9812  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9813  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
9814  __Pyx_GOTREF(__pyx_t_1);
9815  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9816  __pyx_r = __pyx_t_1;
9817  __pyx_t_1 = 0;
9818  goto __pyx_L0;
9819  }
9820 
9821  /* "PyClical.pyx":980
9822  * return pow(self, m)
9823  *
9824  * def pow(self, m): # <<<<<<<<<<<<<<
9825  * """
9826  * Power: self to the m.
9827  */
9828 
9829  /* function exit code */
9830  __pyx_L1_error:;
9831  __Pyx_XDECREF(__pyx_t_1);
9832  __Pyx_XDECREF(__pyx_t_2);
9833  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9834  __pyx_r = NULL;
9835  __pyx_L0:;
9836  __Pyx_XGIVEREF(__pyx_r);
9837  __Pyx_RefNannyFinishContext();
9838  return __pyx_r;
9839  }
9840 
9841  /* "PyClical.pyx":1004
9842  * return exp(m * log(self))
9843  *
9844  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9845  * """
9846  * Outer product power.
9847  */
9848 
9849  /* Python wrapper */
9850  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9851  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 ";
9852  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9853  PyObject *__pyx_r = 0;
9854  __Pyx_RefNannyDeclarations
9855  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9856  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9857 
9858  /* function exit code */
9859  __Pyx_RefNannyFinishContext();
9860  return __pyx_r;
9861  }
9862 
9863  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9864  PyObject *__pyx_r = NULL;
9865  __Pyx_RefNannyDeclarations
9866  PyObject *__pyx_t_1 = NULL;
9867  int __pyx_t_2;
9868  PyObject *__pyx_t_3 = NULL;
9869  int __pyx_lineno = 0;
9870  const char *__pyx_filename = NULL;
9871  int __pyx_clineno = 0;
9872  __Pyx_RefNannySetupContext("outer_pow", 0);
9873 
9874  /* "PyClical.pyx":1018
9875  *
9876  * """
9877  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9878  *
9879  * def __call__(self, grade):
9880  */
9881  __Pyx_XDECREF(__pyx_r);
9882  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
9883  __Pyx_GOTREF(__pyx_t_1);
9884  __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)
9885  __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)
9886  __Pyx_GOTREF(__pyx_t_3);
9887  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9888  __pyx_r = __pyx_t_3;
9889  __pyx_t_3 = 0;
9890  goto __pyx_L0;
9891 
9892  /* "PyClical.pyx":1004
9893  * return exp(m * log(self))
9894  *
9895  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9896  * """
9897  * Outer product power.
9898  */
9899 
9900  /* function exit code */
9901  __pyx_L1_error:;
9902  __Pyx_XDECREF(__pyx_t_1);
9903  __Pyx_XDECREF(__pyx_t_3);
9904  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9905  __pyx_r = NULL;
9906  __pyx_L0:;
9907  __Pyx_XGIVEREF(__pyx_r);
9908  __Pyx_RefNannyFinishContext();
9909  return __pyx_r;
9910  }
9911 
9912  /* "PyClical.pyx":1020
9913  * return clifford().wrap( self.instance.outer_pow(m) )
9914  *
9915  * def __call__(self, grade): # <<<<<<<<<<<<<<
9916  * """
9917  * Pure grade-vector part.
9918  */
9919 
9920  /* Python wrapper */
9921  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9922  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 ";
9923  #if CYTHON_COMPILING_IN_CPYTHON
9924  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9925  #endif
9926  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9927  PyObject *__pyx_v_grade = 0;
9928  int __pyx_lineno = 0;
9929  const char *__pyx_filename = NULL;
9930  int __pyx_clineno = 0;
9931  PyObject *__pyx_r = 0;
9932  __Pyx_RefNannyDeclarations
9933  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9934  {
9935  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9936  PyObject* values[1] = {0};
9937  if (unlikely(__pyx_kwds)) {
9938  Py_ssize_t kw_args;
9939  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9940  switch (pos_args) {
9941  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9942  CYTHON_FALLTHROUGH;
9943  case 0: break;
9944  default: goto __pyx_L5_argtuple_error;
9945  }
9946  kw_args = PyDict_Size(__pyx_kwds);
9947  switch (pos_args) {
9948  case 0:
9949  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9950  else goto __pyx_L5_argtuple_error;
9951  }
9952  if (unlikely(kw_args > 0)) {
9953  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1020, __pyx_L3_error)
9954  }
9955  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9956  goto __pyx_L5_argtuple_error;
9957  } else {
9958  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9959  }
9960  __pyx_v_grade = values[0];
9961  }
9962  goto __pyx_L4_argument_unpacking_done;
9963  __pyx_L5_argtuple_error:;
9964  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1020, __pyx_L3_error)
9965  __pyx_L3_error:;
9966  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9967  __Pyx_RefNannyFinishContext();
9968  return NULL;
9969  __pyx_L4_argument_unpacking_done:;
9970  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9971 
9972  /* function exit code */
9973  __Pyx_RefNannyFinishContext();
9974  return __pyx_r;
9975  }
9976 
9977  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9978  PyObject *__pyx_r = NULL;
9979  __Pyx_RefNannyDeclarations
9980  PyObject *__pyx_t_1 = NULL;
9981  int __pyx_t_2;
9982  PyObject *__pyx_t_3 = NULL;
9983  int __pyx_lineno = 0;
9984  const char *__pyx_filename = NULL;
9985  int __pyx_clineno = 0;
9986  __Pyx_RefNannySetupContext("__call__", 0);
9987 
9988  /* "PyClical.pyx":1037
9989  * 0
9990  * """
9991  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9992  *
9993  * def scalar(self):
9994  */
9995  __Pyx_XDECREF(__pyx_r);
9996  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
9997  __Pyx_GOTREF(__pyx_t_1);
9998  __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)
9999  __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)
10000  __Pyx_GOTREF(__pyx_t_3);
10001  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10002  __pyx_r = __pyx_t_3;
10003  __pyx_t_3 = 0;
10004  goto __pyx_L0;
10005 
10006  /* "PyClical.pyx":1020
10007  * return clifford().wrap( self.instance.outer_pow(m) )
10008  *
10009  * def __call__(self, grade): # <<<<<<<<<<<<<<
10010  * """
10011  * Pure grade-vector part.
10012  */
10013 
10014  /* function exit code */
10015  __pyx_L1_error:;
10016  __Pyx_XDECREF(__pyx_t_1);
10017  __Pyx_XDECREF(__pyx_t_3);
10018  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10019  __pyx_r = NULL;
10020  __pyx_L0:;
10021  __Pyx_XGIVEREF(__pyx_r);
10022  __Pyx_RefNannyFinishContext();
10023  return __pyx_r;
10024  }
10025 
10026  /* "PyClical.pyx":1039
10027  * return clifford().wrap( self.instance.call(grade) )
10028  *
10029  * def scalar(self): # <<<<<<<<<<<<<<
10030  * """
10031  * Scalar part.
10032  */
10033 
10034  /* Python wrapper */
10035  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10036  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 ";
10037  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10038  PyObject *__pyx_r = 0;
10039  __Pyx_RefNannyDeclarations
10040  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
10041  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10042 
10043  /* function exit code */
10044  __Pyx_RefNannyFinishContext();
10045  return __pyx_r;
10046  }
10047 
10048  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10049  PyObject *__pyx_r = NULL;
10050  __Pyx_RefNannyDeclarations
10051  PyObject *__pyx_t_1 = NULL;
10052  int __pyx_lineno = 0;
10053  const char *__pyx_filename = NULL;
10054  int __pyx_clineno = 0;
10055  __Pyx_RefNannySetupContext("scalar", 0);
10056 
10057  /* "PyClical.pyx":1048
10058  * 0.0
10059  * """
10060  * return self.instance.scalar() # <<<<<<<<<<<<<<
10061  *
10062  * def pure(self):
10063  */
10064  __Pyx_XDECREF(__pyx_r);
10065  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
10066  __Pyx_GOTREF(__pyx_t_1);
10067  __pyx_r = __pyx_t_1;
10068  __pyx_t_1 = 0;
10069  goto __pyx_L0;
10070 
10071  /* "PyClical.pyx":1039
10072  * return clifford().wrap( self.instance.call(grade) )
10073  *
10074  * def scalar(self): # <<<<<<<<<<<<<<
10075  * """
10076  * Scalar part.
10077  */
10078 
10079  /* function exit code */
10080  __pyx_L1_error:;
10081  __Pyx_XDECREF(__pyx_t_1);
10082  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10083  __pyx_r = NULL;
10084  __pyx_L0:;
10085  __Pyx_XGIVEREF(__pyx_r);
10086  __Pyx_RefNannyFinishContext();
10087  return __pyx_r;
10088  }
10089 
10090  /* "PyClical.pyx":1050
10091  * return self.instance.scalar()
10092  *
10093  * def pure(self): # <<<<<<<<<<<<<<
10094  * """
10095  * Pure part.
10096  */
10097 
10098  /* Python wrapper */
10099  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10100  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 ";
10101  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10102  PyObject *__pyx_r = 0;
10103  __Pyx_RefNannyDeclarations
10104  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
10105  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10106 
10107  /* function exit code */
10108  __Pyx_RefNannyFinishContext();
10109  return __pyx_r;
10110  }
10111 
10112  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10113  PyObject *__pyx_r = NULL;
10114  __Pyx_RefNannyDeclarations
10115  PyObject *__pyx_t_1 = NULL;
10116  PyObject *__pyx_t_2 = NULL;
10117  int __pyx_lineno = 0;
10118  const char *__pyx_filename = NULL;
10119  int __pyx_clineno = 0;
10120  __Pyx_RefNannySetupContext("pure", 0);
10121 
10122  /* "PyClical.pyx":1059
10123  * {1,2}
10124  * """
10125  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
10126  *
10127  * def even(self):
10128  */
10129  __Pyx_XDECREF(__pyx_r);
10130  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L1_error)
10131  __Pyx_GOTREF(__pyx_t_1);
10132  __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)
10133  __Pyx_GOTREF(__pyx_t_2);
10134  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10135  __pyx_r = __pyx_t_2;
10136  __pyx_t_2 = 0;
10137  goto __pyx_L0;
10138 
10139  /* "PyClical.pyx":1050
10140  * return self.instance.scalar()
10141  *
10142  * def pure(self): # <<<<<<<<<<<<<<
10143  * """
10144  * Pure part.
10145  */
10146 
10147  /* function exit code */
10148  __pyx_L1_error:;
10149  __Pyx_XDECREF(__pyx_t_1);
10150  __Pyx_XDECREF(__pyx_t_2);
10151  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10152  __pyx_r = NULL;
10153  __pyx_L0:;
10154  __Pyx_XGIVEREF(__pyx_r);
10155  __Pyx_RefNannyFinishContext();
10156  return __pyx_r;
10157  }
10158 
10159  /* "PyClical.pyx":1061
10160  * return clifford().wrap( self.instance.pure() )
10161  *
10162  * def even(self): # <<<<<<<<<<<<<<
10163  * """
10164  * Even part of multivector, sum of even grade terms.
10165  */
10166 
10167  /* Python wrapper */
10168  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10169  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 ";
10170  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10171  PyObject *__pyx_r = 0;
10172  __Pyx_RefNannyDeclarations
10173  __Pyx_RefNannySetupContext("even (wrapper)", 0);
10174  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10175 
10176  /* function exit code */
10177  __Pyx_RefNannyFinishContext();
10178  return __pyx_r;
10179  }
10180 
10181  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10182  PyObject *__pyx_r = NULL;
10183  __Pyx_RefNannyDeclarations
10184  PyObject *__pyx_t_1 = NULL;
10185  PyObject *__pyx_t_2 = NULL;
10186  int __pyx_lineno = 0;
10187  const char *__pyx_filename = NULL;
10188  int __pyx_clineno = 0;
10189  __Pyx_RefNannySetupContext("even", 0);
10190 
10191  /* "PyClical.pyx":1068
10192  * 1+{1,2}
10193  * """
10194  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
10195  *
10196  * def odd(self):
10197  */
10198  __Pyx_XDECREF(__pyx_r);
10199  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
10200  __Pyx_GOTREF(__pyx_t_1);
10201  __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)
10202  __Pyx_GOTREF(__pyx_t_2);
10203  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10204  __pyx_r = __pyx_t_2;
10205  __pyx_t_2 = 0;
10206  goto __pyx_L0;
10207 
10208  /* "PyClical.pyx":1061
10209  * return clifford().wrap( self.instance.pure() )
10210  *
10211  * def even(self): # <<<<<<<<<<<<<<
10212  * """
10213  * Even part of multivector, sum of even grade terms.
10214  */
10215 
10216  /* function exit code */
10217  __pyx_L1_error:;
10218  __Pyx_XDECREF(__pyx_t_1);
10219  __Pyx_XDECREF(__pyx_t_2);
10220  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10221  __pyx_r = NULL;
10222  __pyx_L0:;
10223  __Pyx_XGIVEREF(__pyx_r);
10224  __Pyx_RefNannyFinishContext();
10225  return __pyx_r;
10226  }
10227 
10228  /* "PyClical.pyx":1070
10229  * return clifford().wrap( self.instance.even() )
10230  *
10231  * def odd(self): # <<<<<<<<<<<<<<
10232  * """
10233  * Odd part of multivector, sum of odd grade terms.
10234  */
10235 
10236  /* Python wrapper */
10237  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10238  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 ";
10239  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10240  PyObject *__pyx_r = 0;
10241  __Pyx_RefNannyDeclarations
10242  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
10243  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10244 
10245  /* function exit code */
10246  __Pyx_RefNannyFinishContext();
10247  return __pyx_r;
10248  }
10249 
10250  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10251  PyObject *__pyx_r = NULL;
10252  __Pyx_RefNannyDeclarations
10253  PyObject *__pyx_t_1 = NULL;
10254  PyObject *__pyx_t_2 = NULL;
10255  int __pyx_lineno = 0;
10256  const char *__pyx_filename = NULL;
10257  int __pyx_clineno = 0;
10258  __Pyx_RefNannySetupContext("odd", 0);
10259 
10260  /* "PyClical.pyx":1077
10261  * {1}
10262  * """
10263  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
10264  *
10265  * def vector_part(self, frm = None):
10266  */
10267  __Pyx_XDECREF(__pyx_r);
10268  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
10269  __Pyx_GOTREF(__pyx_t_1);
10270  __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)
10271  __Pyx_GOTREF(__pyx_t_2);
10272  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10273  __pyx_r = __pyx_t_2;
10274  __pyx_t_2 = 0;
10275  goto __pyx_L0;
10276 
10277  /* "PyClical.pyx":1070
10278  * return clifford().wrap( self.instance.even() )
10279  *
10280  * def odd(self): # <<<<<<<<<<<<<<
10281  * """
10282  * Odd part of multivector, sum of odd grade terms.
10283  */
10284 
10285  /* function exit code */
10286  __pyx_L1_error:;
10287  __Pyx_XDECREF(__pyx_t_1);
10288  __Pyx_XDECREF(__pyx_t_2);
10289  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
10290  __pyx_r = NULL;
10291  __pyx_L0:;
10292  __Pyx_XGIVEREF(__pyx_r);
10293  __Pyx_RefNannyFinishContext();
10294  return __pyx_r;
10295  }
10296 
10297  /* "PyClical.pyx":1079
10298  * return clifford().wrap( self.instance.odd() )
10299  *
10300  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10301  * """
10302  * Vector part of multivector, as a Python list, with respect to frm.
10303  */
10304 
10305  /* Python wrapper */
10306  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10307  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 ";
10308  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10309  PyObject *__pyx_v_frm = 0;
10310  int __pyx_lineno = 0;
10311  const char *__pyx_filename = NULL;
10312  int __pyx_clineno = 0;
10313  PyObject *__pyx_r = 0;
10314  __Pyx_RefNannyDeclarations
10315  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
10316  {
10317  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
10318  PyObject* values[1] = {0};
10319  values[0] = ((PyObject *)Py_None);
10320  if (unlikely(__pyx_kwds)) {
10321  Py_ssize_t kw_args;
10322  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10323  switch (pos_args) {
10324  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10325  CYTHON_FALLTHROUGH;
10326  case 0: break;
10327  default: goto __pyx_L5_argtuple_error;
10328  }
10329  kw_args = PyDict_Size(__pyx_kwds);
10330  switch (pos_args) {
10331  case 0:
10332  if (kw_args > 0) {
10333  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
10334  if (value) { values[0] = value; kw_args--; }
10335  }
10336  }
10337  if (unlikely(kw_args > 0)) {
10338  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1079, __pyx_L3_error)
10339  }
10340  } else {
10341  switch (PyTuple_GET_SIZE(__pyx_args)) {
10342  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10343  CYTHON_FALLTHROUGH;
10344  case 0: break;
10345  default: goto __pyx_L5_argtuple_error;
10346  }
10347  }
10348  __pyx_v_frm = values[0];
10349  }
10350  goto __pyx_L4_argument_unpacking_done;
10351  __pyx_L5_argtuple_error:;
10352  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1079, __pyx_L3_error)
10353  __pyx_L3_error:;
10354  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10355  __Pyx_RefNannyFinishContext();
10356  return NULL;
10357  __pyx_L4_argument_unpacking_done:;
10358  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
10359 
10360  /* function exit code */
10361  __Pyx_RefNannyFinishContext();
10362  return __pyx_r;
10363  }
10364 
10365  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
10366  PyObject *__pyx_v_error_msg_prefix = NULL;
10367  std::vector<scalar_t> __pyx_v_vec;
10368  int __pyx_v_n;
10369  int __pyx_v_i;
10370  PyObject *__pyx_v_lst = NULL;
10371  PyObject *__pyx_v_err = NULL;
10372  PyObject *__pyx_r = NULL;
10373  __Pyx_RefNannyDeclarations
10374  PyObject *__pyx_t_1 = NULL;
10375  PyObject *__pyx_t_2 = NULL;
10376  PyObject *__pyx_t_3 = NULL;
10377  int __pyx_t_4;
10378  int __pyx_t_5;
10379  std::vector<scalar_t> __pyx_t_6;
10380  PyObject *__pyx_t_7 = NULL;
10381  int __pyx_t_8;
10382  int __pyx_t_9;
10383  int __pyx_t_10;
10384  PyObject *__pyx_t_11 = NULL;
10385  PyObject *__pyx_t_12 = NULL;
10386  PyObject *__pyx_t_13 = NULL;
10387  PyObject *__pyx_t_14 = NULL;
10388  PyObject *__pyx_t_15 = NULL;
10389  char const *__pyx_t_16;
10390  PyObject *__pyx_t_17 = NULL;
10391  PyObject *__pyx_t_18 = NULL;
10392  PyObject *__pyx_t_19 = NULL;
10393  PyObject *__pyx_t_20 = NULL;
10394  PyObject *__pyx_t_21 = NULL;
10395  PyObject *__pyx_t_22 = NULL;
10396  int __pyx_lineno = 0;
10397  const char *__pyx_filename = NULL;
10398  int __pyx_clineno = 0;
10399  __Pyx_RefNannySetupContext("vector_part", 0);
10400 
10401  /* "PyClical.pyx":1088
10402  * [0.0, 2.0, 3.0]
10403  * """
10404  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
10405  * cdef vector[scalar_t] vec
10406  * cdef int n
10407  */
10408  __Pyx_INCREF(__pyx_kp_u_Cannot_take_vector_part_of);
10409  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_take_vector_part_of;
10410 
10411  /* "PyClical.pyx":1092
10412  * cdef int n
10413  * cdef int i
10414  * try: # <<<<<<<<<<<<<<
10415  * if frm is None:
10416  * vec = self.instance.vector_part()
10417  */
10418  {
10419  __Pyx_PyThreadState_declare
10420  __Pyx_PyThreadState_assign
10421  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10422  __Pyx_XGOTREF(__pyx_t_1);
10423  __Pyx_XGOTREF(__pyx_t_2);
10424  __Pyx_XGOTREF(__pyx_t_3);
10425  /*try:*/ {
10426 
10427  /* "PyClical.pyx":1093
10428  * cdef int i
10429  * try:
10430  * if frm is None: # <<<<<<<<<<<<<<
10431  * vec = self.instance.vector_part()
10432  * else:
10433  */
10434  __pyx_t_4 = (__pyx_v_frm == Py_None);
10435  __pyx_t_5 = (__pyx_t_4 != 0);
10436  if (__pyx_t_5) {
10437 
10438  /* "PyClical.pyx":1094
10439  * try:
10440  * if frm is None:
10441  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
10442  * else:
10443  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10444  */
10445  __pyx_t_6 = __pyx_v_self->instance->vector_part();
10446  __pyx_v_vec = __pyx_t_6;
10447 
10448  /* "PyClical.pyx":1093
10449  * cdef int i
10450  * try:
10451  * if frm is None: # <<<<<<<<<<<<<<
10452  * vec = self.instance.vector_part()
10453  * else:
10454  */
10455  goto __pyx_L9;
10456  }
10457 
10458  /* "PyClical.pyx":1096
10459  * vec = self.instance.vector_part()
10460  * else:
10461  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
10462  * n = vec.size()
10463  * lst = [0.0]*n
10464  */
10465  /*else*/ {
10466  try {
10467  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
10468  } catch(...) {
10469  __Pyx_CppExn2PyErr();
10470  __PYX_ERR(0, 1096, __pyx_L3_error)
10471  }
10472  __pyx_v_vec = __pyx_t_6;
10473  }
10474  __pyx_L9:;
10475 
10476  /* "PyClical.pyx":1097
10477  * else:
10478  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10479  * n = vec.size() # <<<<<<<<<<<<<<
10480  * lst = [0.0]*n
10481  * for i in xrange(n):
10482  */
10483  __pyx_v_n = __pyx_v_vec.size();
10484 
10485  /* "PyClical.pyx":1098
10486  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10487  * n = vec.size()
10488  * lst = [0.0]*n # <<<<<<<<<<<<<<
10489  * for i in xrange(n):
10490  * lst[i] = vec[i]
10491  */
10492  __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)
10493  __Pyx_GOTREF(__pyx_t_7);
10494  { Py_ssize_t __pyx_temp;
10495  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10496  __Pyx_INCREF(__pyx_float_0_0);
10497  __Pyx_GIVEREF(__pyx_float_0_0);
10498  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10499  }
10500  }
10501  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10502  __pyx_t_7 = 0;
10503 
10504  /* "PyClical.pyx":1099
10505  * n = vec.size()
10506  * lst = [0.0]*n
10507  * for i in xrange(n): # <<<<<<<<<<<<<<
10508  * lst[i] = vec[i]
10509  * return lst
10510  */
10511  __pyx_t_8 = __pyx_v_n;
10512  __pyx_t_9 = __pyx_t_8;
10513  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10514  __pyx_v_i = __pyx_t_10;
10515 
10516  /* "PyClical.pyx":1100
10517  * lst = [0.0]*n
10518  * for i in xrange(n):
10519  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10520  * return lst
10521  * except RuntimeError as err:
10522  */
10523  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L3_error)
10524  __Pyx_GOTREF(__pyx_t_7);
10525  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)
10526  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10527  }
10528 
10529  /* "PyClical.pyx":1101
10530  * for i in xrange(n):
10531  * lst[i] = vec[i]
10532  * return lst # <<<<<<<<<<<<<<
10533  * except RuntimeError as err:
10534  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10535  */
10536  __Pyx_XDECREF(__pyx_r);
10537  __Pyx_INCREF(__pyx_v_lst);
10538  __pyx_r = __pyx_v_lst;
10539  goto __pyx_L7_try_return;
10540 
10541  /* "PyClical.pyx":1092
10542  * cdef int n
10543  * cdef int i
10544  * try: # <<<<<<<<<<<<<<
10545  * if frm is None:
10546  * vec = self.instance.vector_part()
10547  */
10548  }
10549  __pyx_L3_error:;
10550  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10551 
10552  /* "PyClical.pyx":1102
10553  * lst[i] = vec[i]
10554  * return lst
10555  * except RuntimeError as err: # <<<<<<<<<<<<<<
10556  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10557  * + repr(frm) + " as frame:\n\t"
10558  */
10559  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10560  if (__pyx_t_8) {
10561  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10562  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10563  __Pyx_GOTREF(__pyx_t_7);
10564  __Pyx_GOTREF(__pyx_t_11);
10565  __Pyx_GOTREF(__pyx_t_12);
10566  __Pyx_INCREF(__pyx_t_11);
10567  __pyx_v_err = __pyx_t_11;
10568  /*try:*/ {
10569 
10570  /* "PyClical.pyx":1103
10571  * return lst
10572  * except RuntimeError as err:
10573  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10574  * + repr(frm) + " as frame:\n\t"
10575  * + str(err))
10576  */
10577  __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)
10578  __Pyx_GOTREF(__pyx_t_13);
10579  __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)
10580  __Pyx_GOTREF(__pyx_t_14);
10581  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10582  __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)
10583  __Pyx_GOTREF(__pyx_t_13);
10584  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10585 
10586  /* "PyClical.pyx":1104
10587  * except RuntimeError as err:
10588  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10589  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10590  * + str(err))
10591  *
10592  */
10593  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L17_error)
10594  __Pyx_GOTREF(__pyx_t_14);
10595  __pyx_t_15 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1104, __pyx_L17_error)
10596  __Pyx_GOTREF(__pyx_t_15);
10597  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10598  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10599  __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)
10600  __Pyx_GOTREF(__pyx_t_14);
10601  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10602 
10603  /* "PyClical.pyx":1105
10604  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10605  * + repr(frm) + " as frame:\n\t"
10606  * + str(err)) # <<<<<<<<<<<<<<
10607  *
10608  * def involute(self):
10609  */
10610  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1105, __pyx_L17_error)
10611  __Pyx_GOTREF(__pyx_t_15);
10612  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1105, __pyx_L17_error)
10613  __Pyx_GOTREF(__pyx_t_13);
10614  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10615  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10616 
10617  /* "PyClical.pyx":1103
10618  * return lst
10619  * except RuntimeError as err:
10620  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10621  * + repr(frm) + " as frame:\n\t"
10622  * + str(err))
10623  */
10624  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L17_error)
10625  __Pyx_GOTREF(__pyx_t_15);
10626  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10627  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10628  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10629  __PYX_ERR(0, 1103, __pyx_L17_error)
10630  }
10631 
10632  /* "PyClical.pyx":1102
10633  * lst[i] = vec[i]
10634  * return lst
10635  * except RuntimeError as err: # <<<<<<<<<<<<<<
10636  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10637  * + repr(frm) + " as frame:\n\t"
10638  */
10639  /*finally:*/ {
10640  __pyx_L17_error:;
10641  /*exception exit:*/{
10642  __Pyx_PyThreadState_declare
10643  __Pyx_PyThreadState_assign
10644  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
10645  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
10646  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
10647  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
10648  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
10649  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);
10650  __Pyx_XGOTREF(__pyx_t_17);
10651  __Pyx_XGOTREF(__pyx_t_18);
10652  __Pyx_XGOTREF(__pyx_t_19);
10653  __Pyx_XGOTREF(__pyx_t_20);
10654  __Pyx_XGOTREF(__pyx_t_21);
10655  __Pyx_XGOTREF(__pyx_t_22);
10656  __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
10657  {
10658  __Pyx_DECREF(__pyx_v_err);
10659  __pyx_v_err = NULL;
10660  }
10661  if (PY_MAJOR_VERSION >= 3) {
10662  __Pyx_XGIVEREF(__pyx_t_20);
10663  __Pyx_XGIVEREF(__pyx_t_21);
10664  __Pyx_XGIVEREF(__pyx_t_22);
10665  __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
10666  }
10667  __Pyx_XGIVEREF(__pyx_t_17);
10668  __Pyx_XGIVEREF(__pyx_t_18);
10669  __Pyx_XGIVEREF(__pyx_t_19);
10670  __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
10671  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
10672  __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_16;
10673  goto __pyx_L5_except_error;
10674  }
10675  }
10676  }
10677  goto __pyx_L5_except_error;
10678  __pyx_L5_except_error:;
10679 
10680  /* "PyClical.pyx":1092
10681  * cdef int n
10682  * cdef int i
10683  * try: # <<<<<<<<<<<<<<
10684  * if frm is None:
10685  * vec = self.instance.vector_part()
10686  */
10687  __Pyx_XGIVEREF(__pyx_t_1);
10688  __Pyx_XGIVEREF(__pyx_t_2);
10689  __Pyx_XGIVEREF(__pyx_t_3);
10690  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10691  goto __pyx_L1_error;
10692  __pyx_L7_try_return:;
10693  __Pyx_XGIVEREF(__pyx_t_1);
10694  __Pyx_XGIVEREF(__pyx_t_2);
10695  __Pyx_XGIVEREF(__pyx_t_3);
10696  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10697  goto __pyx_L0;
10698  }
10699 
10700  /* "PyClical.pyx":1079
10701  * return clifford().wrap( self.instance.odd() )
10702  *
10703  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10704  * """
10705  * Vector part of multivector, as a Python list, with respect to frm.
10706  */
10707 
10708  /* function exit code */
10709  __pyx_L1_error:;
10710  __Pyx_XDECREF(__pyx_t_7);
10711  __Pyx_XDECREF(__pyx_t_11);
10712  __Pyx_XDECREF(__pyx_t_12);
10713  __Pyx_XDECREF(__pyx_t_13);
10714  __Pyx_XDECREF(__pyx_t_14);
10715  __Pyx_XDECREF(__pyx_t_15);
10716  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10717  __pyx_r = NULL;
10718  __pyx_L0:;
10719  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10720  __Pyx_XDECREF(__pyx_v_lst);
10721  __Pyx_XDECREF(__pyx_v_err);
10722  __Pyx_XGIVEREF(__pyx_r);
10723  __Pyx_RefNannyFinishContext();
10724  return __pyx_r;
10725  }
10726 
10727  /* "PyClical.pyx":1107
10728  * + str(err))
10729  *
10730  * def involute(self): # <<<<<<<<<<<<<<
10731  * """
10732  * Main involution, each {i} is replaced by -{i} in each term,
10733  */
10734 
10735  /* Python wrapper */
10736  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10737  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 ";
10738  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10739  PyObject *__pyx_r = 0;
10740  __Pyx_RefNannyDeclarations
10741  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10742  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10743 
10744  /* function exit code */
10745  __Pyx_RefNannyFinishContext();
10746  return __pyx_r;
10747  }
10748 
10749  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10750  PyObject *__pyx_r = NULL;
10751  __Pyx_RefNannyDeclarations
10752  PyObject *__pyx_t_1 = NULL;
10753  PyObject *__pyx_t_2 = NULL;
10754  int __pyx_lineno = 0;
10755  const char *__pyx_filename = NULL;
10756  int __pyx_clineno = 0;
10757  __Pyx_RefNannySetupContext("involute", 0);
10758 
10759  /* "PyClical.pyx":1121
10760  * 1-{1}+{1,2}
10761  * """
10762  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10763  *
10764  * def reverse(self):
10765  */
10766  __Pyx_XDECREF(__pyx_r);
10767  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
10768  __Pyx_GOTREF(__pyx_t_1);
10769  __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)
10770  __Pyx_GOTREF(__pyx_t_2);
10771  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10772  __pyx_r = __pyx_t_2;
10773  __pyx_t_2 = 0;
10774  goto __pyx_L0;
10775 
10776  /* "PyClical.pyx":1107
10777  * + str(err))
10778  *
10779  * def involute(self): # <<<<<<<<<<<<<<
10780  * """
10781  * Main involution, each {i} is replaced by -{i} in each term,
10782  */
10783 
10784  /* function exit code */
10785  __pyx_L1_error:;
10786  __Pyx_XDECREF(__pyx_t_1);
10787  __Pyx_XDECREF(__pyx_t_2);
10788  __Pyx_AddTraceback("PyClical.clifford.involute", __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":1123
10797  * return clifford().wrap( self.instance.involute() )
10798  *
10799  * def reverse(self): # <<<<<<<<<<<<<<
10800  * """
10801  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10802  */
10803 
10804  /* Python wrapper */
10805  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10806  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 ";
10807  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10808  PyObject *__pyx_r = 0;
10809  __Pyx_RefNannyDeclarations
10810  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10811  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((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_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10819  PyObject *__pyx_r = NULL;
10820  __Pyx_RefNannyDeclarations
10821  PyObject *__pyx_t_1 = NULL;
10822  PyObject *__pyx_t_2 = NULL;
10823  int __pyx_lineno = 0;
10824  const char *__pyx_filename = NULL;
10825  int __pyx_clineno = 0;
10826  __Pyx_RefNannySetupContext("reverse", 0);
10827 
10828  /* "PyClical.pyx":1136
10829  * 1+{1}-{1,2}
10830  * """
10831  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10832  *
10833  * def conj(self):
10834  */
10835  __Pyx_XDECREF(__pyx_r);
10836  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
10837  __Pyx_GOTREF(__pyx_t_1);
10838  __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)
10839  __Pyx_GOTREF(__pyx_t_2);
10840  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10841  __pyx_r = __pyx_t_2;
10842  __pyx_t_2 = 0;
10843  goto __pyx_L0;
10844 
10845  /* "PyClical.pyx":1123
10846  * return clifford().wrap( self.instance.involute() )
10847  *
10848  * def reverse(self): # <<<<<<<<<<<<<<
10849  * """
10850  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10851  */
10852 
10853  /* function exit code */
10854  __pyx_L1_error:;
10855  __Pyx_XDECREF(__pyx_t_1);
10856  __Pyx_XDECREF(__pyx_t_2);
10857  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10858  __pyx_r = NULL;
10859  __pyx_L0:;
10860  __Pyx_XGIVEREF(__pyx_r);
10861  __Pyx_RefNannyFinishContext();
10862  return __pyx_r;
10863  }
10864 
10865  /* "PyClical.pyx":1138
10866  * return clifford().wrap( self.instance.reverse() )
10867  *
10868  * def conj(self): # <<<<<<<<<<<<<<
10869  * """
10870  * Conjugation, reverse o involute == involute o reverse.
10871  */
10872 
10873  /* Python wrapper */
10874  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10875  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 ";
10876  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10877  PyObject *__pyx_r = 0;
10878  __Pyx_RefNannyDeclarations
10879  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10880  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10881 
10882  /* function exit code */
10883  __Pyx_RefNannyFinishContext();
10884  return __pyx_r;
10885  }
10886 
10887  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10888  PyObject *__pyx_r = NULL;
10889  __Pyx_RefNannyDeclarations
10890  PyObject *__pyx_t_1 = NULL;
10891  PyObject *__pyx_t_2 = NULL;
10892  int __pyx_lineno = 0;
10893  const char *__pyx_filename = NULL;
10894  int __pyx_clineno = 0;
10895  __Pyx_RefNannySetupContext("conj", 0);
10896 
10897  /* "PyClical.pyx":1151
10898  * 1-{1}-{1,2}
10899  * """
10900  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10901  *
10902  * def quad(self):
10903  */
10904  __Pyx_XDECREF(__pyx_r);
10905  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error)
10906  __Pyx_GOTREF(__pyx_t_1);
10907  __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)
10908  __Pyx_GOTREF(__pyx_t_2);
10909  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10910  __pyx_r = __pyx_t_2;
10911  __pyx_t_2 = 0;
10912  goto __pyx_L0;
10913 
10914  /* "PyClical.pyx":1138
10915  * return clifford().wrap( self.instance.reverse() )
10916  *
10917  * def conj(self): # <<<<<<<<<<<<<<
10918  * """
10919  * Conjugation, reverse o involute == involute o reverse.
10920  */
10921 
10922  /* function exit code */
10923  __pyx_L1_error:;
10924  __Pyx_XDECREF(__pyx_t_1);
10925  __Pyx_XDECREF(__pyx_t_2);
10926  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10927  __pyx_r = NULL;
10928  __pyx_L0:;
10929  __Pyx_XGIVEREF(__pyx_r);
10930  __Pyx_RefNannyFinishContext();
10931  return __pyx_r;
10932  }
10933 
10934  /* "PyClical.pyx":1153
10935  * return clifford().wrap( self.instance.conj() )
10936  *
10937  * def quad(self): # <<<<<<<<<<<<<<
10938  * """
10939  * Quadratic form == (rev(x)*x)(0).
10940  */
10941 
10942  /* Python wrapper */
10943  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10944  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 ";
10945  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10946  PyObject *__pyx_r = 0;
10947  __Pyx_RefNannyDeclarations
10948  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10949  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10950 
10951  /* function exit code */
10952  __Pyx_RefNannyFinishContext();
10953  return __pyx_r;
10954  }
10955 
10956  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10957  PyObject *__pyx_r = NULL;
10958  __Pyx_RefNannyDeclarations
10959  PyObject *__pyx_t_1 = NULL;
10960  int __pyx_lineno = 0;
10961  const char *__pyx_filename = NULL;
10962  int __pyx_clineno = 0;
10963  __Pyx_RefNannySetupContext("quad", 0);
10964 
10965  /* "PyClical.pyx":1162
10966  * 2.0
10967  * """
10968  * return self.instance.quad() # <<<<<<<<<<<<<<
10969  *
10970  * def norm(self):
10971  */
10972  __Pyx_XDECREF(__pyx_r);
10973  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error)
10974  __Pyx_GOTREF(__pyx_t_1);
10975  __pyx_r = __pyx_t_1;
10976  __pyx_t_1 = 0;
10977  goto __pyx_L0;
10978 
10979  /* "PyClical.pyx":1153
10980  * return clifford().wrap( self.instance.conj() )
10981  *
10982  * def quad(self): # <<<<<<<<<<<<<<
10983  * """
10984  * Quadratic form == (rev(x)*x)(0).
10985  */
10986 
10987  /* function exit code */
10988  __pyx_L1_error:;
10989  __Pyx_XDECREF(__pyx_t_1);
10990  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10991  __pyx_r = NULL;
10992  __pyx_L0:;
10993  __Pyx_XGIVEREF(__pyx_r);
10994  __Pyx_RefNannyFinishContext();
10995  return __pyx_r;
10996  }
10997 
10998  /* "PyClical.pyx":1164
10999  * return self.instance.quad()
11000  *
11001  * def norm(self): # <<<<<<<<<<<<<<
11002  * """
11003  * Norm == sum of squares of coordinates.
11004  */
11005 
11006  /* Python wrapper */
11007  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11008  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 ";
11009  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11010  PyObject *__pyx_r = 0;
11011  __Pyx_RefNannyDeclarations
11012  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
11013  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11014 
11015  /* function exit code */
11016  __Pyx_RefNannyFinishContext();
11017  return __pyx_r;
11018  }
11019 
11020  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11021  PyObject *__pyx_r = NULL;
11022  __Pyx_RefNannyDeclarations
11023  PyObject *__pyx_t_1 = NULL;
11024  int __pyx_lineno = 0;
11025  const char *__pyx_filename = NULL;
11026  int __pyx_clineno = 0;
11027  __Pyx_RefNannySetupContext("norm", 0);
11028 
11029  /* "PyClical.pyx":1173
11030  * 4.0
11031  * """
11032  * return self.instance.norm() # <<<<<<<<<<<<<<
11033  *
11034  * def abs(self):
11035  */
11036  __Pyx_XDECREF(__pyx_r);
11037  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
11038  __Pyx_GOTREF(__pyx_t_1);
11039  __pyx_r = __pyx_t_1;
11040  __pyx_t_1 = 0;
11041  goto __pyx_L0;
11042 
11043  /* "PyClical.pyx":1164
11044  * return self.instance.quad()
11045  *
11046  * def norm(self): # <<<<<<<<<<<<<<
11047  * """
11048  * Norm == sum of squares of coordinates.
11049  */
11050 
11051  /* function exit code */
11052  __pyx_L1_error:;
11053  __Pyx_XDECREF(__pyx_t_1);
11054  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
11055  __pyx_r = NULL;
11056  __pyx_L0:;
11057  __Pyx_XGIVEREF(__pyx_r);
11058  __Pyx_RefNannyFinishContext();
11059  return __pyx_r;
11060  }
11061 
11062  /* "PyClical.pyx":1175
11063  * return self.instance.norm()
11064  *
11065  * def abs(self): # <<<<<<<<<<<<<<
11066  * """
11067  * Absolute value: square root of norm.
11068  */
11069 
11070  /* Python wrapper */
11071  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11072  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 ";
11073  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11074  PyObject *__pyx_r = 0;
11075  __Pyx_RefNannyDeclarations
11076  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
11077  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11078 
11079  /* function exit code */
11080  __Pyx_RefNannyFinishContext();
11081  return __pyx_r;
11082  }
11083 
11084  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11085  PyObject *__pyx_r = NULL;
11086  __Pyx_RefNannyDeclarations
11087  PyObject *__pyx_t_1 = NULL;
11088  int __pyx_lineno = 0;
11089  const char *__pyx_filename = NULL;
11090  int __pyx_clineno = 0;
11091  __Pyx_RefNannySetupContext("abs", 0);
11092 
11093  /* "PyClical.pyx":1182
11094  * 2.0
11095  * """
11096  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
11097  *
11098  * def max_abs(self):
11099  */
11100  __Pyx_XDECREF(__pyx_r);
11101  __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)
11102  __Pyx_GOTREF(__pyx_t_1);
11103  __pyx_r = __pyx_t_1;
11104  __pyx_t_1 = 0;
11105  goto __pyx_L0;
11106 
11107  /* "PyClical.pyx":1175
11108  * return self.instance.norm()
11109  *
11110  * def abs(self): # <<<<<<<<<<<<<<
11111  * """
11112  * Absolute value: square root of norm.
11113  */
11114 
11115  /* function exit code */
11116  __pyx_L1_error:;
11117  __Pyx_XDECREF(__pyx_t_1);
11118  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11119  __pyx_r = NULL;
11120  __pyx_L0:;
11121  __Pyx_XGIVEREF(__pyx_r);
11122  __Pyx_RefNannyFinishContext();
11123  return __pyx_r;
11124  }
11125 
11126  /* "PyClical.pyx":1184
11127  * return glucat.abs( self.unwrap() )
11128  *
11129  * def max_abs(self): # <<<<<<<<<<<<<<
11130  * """
11131  * Maximum of absolute values of components of multivector: multivector infinity norm.
11132  */
11133 
11134  /* Python wrapper */
11135  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11136  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 ";
11137  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11138  PyObject *__pyx_r = 0;
11139  __Pyx_RefNannyDeclarations
11140  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
11141  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11142 
11143  /* function exit code */
11144  __Pyx_RefNannyFinishContext();
11145  return __pyx_r;
11146  }
11147 
11148  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11149  PyObject *__pyx_r = NULL;
11150  __Pyx_RefNannyDeclarations
11151  PyObject *__pyx_t_1 = NULL;
11152  int __pyx_lineno = 0;
11153  const char *__pyx_filename = NULL;
11154  int __pyx_clineno = 0;
11155  __Pyx_RefNannySetupContext("max_abs", 0);
11156 
11157  /* "PyClical.pyx":1193
11158  * 3.0
11159  * """
11160  * return self.instance.max_abs() # <<<<<<<<<<<<<<
11161  *
11162  * def truncated(self, limit):
11163  */
11164  __Pyx_XDECREF(__pyx_r);
11165  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
11166  __Pyx_GOTREF(__pyx_t_1);
11167  __pyx_r = __pyx_t_1;
11168  __pyx_t_1 = 0;
11169  goto __pyx_L0;
11170 
11171  /* "PyClical.pyx":1184
11172  * return glucat.abs( self.unwrap() )
11173  *
11174  * def max_abs(self): # <<<<<<<<<<<<<<
11175  * """
11176  * Maximum of absolute values of components of multivector: multivector infinity norm.
11177  */
11178 
11179  /* function exit code */
11180  __pyx_L1_error:;
11181  __Pyx_XDECREF(__pyx_t_1);
11182  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11183  __pyx_r = NULL;
11184  __pyx_L0:;
11185  __Pyx_XGIVEREF(__pyx_r);
11186  __Pyx_RefNannyFinishContext();
11187  return __pyx_r;
11188  }
11189 
11190  /* "PyClical.pyx":1195
11191  * return self.instance.max_abs()
11192  *
11193  * def truncated(self, limit): # <<<<<<<<<<<<<<
11194  * """
11195  * Remove all terms of self with relative size smaller than limit.
11196  */
11197 
11198  /* Python wrapper */
11199  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
11200  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 ";
11201  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
11202  PyObject *__pyx_r = 0;
11203  __Pyx_RefNannyDeclarations
11204  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
11205  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
11206 
11207  /* function exit code */
11208  __Pyx_RefNannyFinishContext();
11209  return __pyx_r;
11210  }
11211 
11212  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
11213  PyObject *__pyx_r = NULL;
11214  __Pyx_RefNannyDeclarations
11215  PyObject *__pyx_t_1 = NULL;
11216  scalar_t __pyx_t_2;
11217  PyObject *__pyx_t_3 = NULL;
11218  int __pyx_lineno = 0;
11219  const char *__pyx_filename = NULL;
11220  int __pyx_clineno = 0;
11221  __Pyx_RefNannySetupContext("truncated", 0);
11222 
11223  /* "PyClical.pyx":1204
11224  * clifford("10000+{1}")
11225  * """
11226  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
11227  *
11228  * def isnan(self):
11229  */
11230  __Pyx_XDECREF(__pyx_r);
11231  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
11232  __Pyx_GOTREF(__pyx_t_1);
11233  __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)
11234  __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)
11235  __Pyx_GOTREF(__pyx_t_3);
11236  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11237  __pyx_r = __pyx_t_3;
11238  __pyx_t_3 = 0;
11239  goto __pyx_L0;
11240 
11241  /* "PyClical.pyx":1195
11242  * return self.instance.max_abs()
11243  *
11244  * def truncated(self, limit): # <<<<<<<<<<<<<<
11245  * """
11246  * Remove all terms of self with relative size smaller than limit.
11247  */
11248 
11249  /* function exit code */
11250  __pyx_L1_error:;
11251  __Pyx_XDECREF(__pyx_t_1);
11252  __Pyx_XDECREF(__pyx_t_3);
11253  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
11254  __pyx_r = NULL;
11255  __pyx_L0:;
11256  __Pyx_XGIVEREF(__pyx_r);
11257  __Pyx_RefNannyFinishContext();
11258  return __pyx_r;
11259  }
11260 
11261  /* "PyClical.pyx":1206
11262  * return clifford().wrap( self.instance.truncated(limit) )
11263  *
11264  * def isnan(self): # <<<<<<<<<<<<<<
11265  * """
11266  * Check if a multivector contains any IEEE NaN values.
11267  */
11268 
11269  /* Python wrapper */
11270  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11271  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
11272  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11273  PyObject *__pyx_r = 0;
11274  __Pyx_RefNannyDeclarations
11275  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
11276  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11277 
11278  /* function exit code */
11279  __Pyx_RefNannyFinishContext();
11280  return __pyx_r;
11281  }
11282 
11283  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11284  PyObject *__pyx_r = NULL;
11285  __Pyx_RefNannyDeclarations
11286  PyObject *__pyx_t_1 = NULL;
11287  int __pyx_lineno = 0;
11288  const char *__pyx_filename = NULL;
11289  int __pyx_clineno = 0;
11290  __Pyx_RefNannySetupContext("isnan", 0);
11291 
11292  /* "PyClical.pyx":1213
11293  * False
11294  * """
11295  * return self.instance.isnan() # <<<<<<<<<<<<<<
11296  *
11297  * def frame(self):
11298  */
11299  __Pyx_XDECREF(__pyx_r);
11300  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __pyx_L1_error)
11301  __Pyx_GOTREF(__pyx_t_1);
11302  __pyx_r = __pyx_t_1;
11303  __pyx_t_1 = 0;
11304  goto __pyx_L0;
11305 
11306  /* "PyClical.pyx":1206
11307  * return clifford().wrap( self.instance.truncated(limit) )
11308  *
11309  * def isnan(self): # <<<<<<<<<<<<<<
11310  * """
11311  * Check if a multivector contains any IEEE NaN values.
11312  */
11313 
11314  /* function exit code */
11315  __pyx_L1_error:;
11316  __Pyx_XDECREF(__pyx_t_1);
11317  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
11318  __pyx_r = NULL;
11319  __pyx_L0:;
11320  __Pyx_XGIVEREF(__pyx_r);
11321  __Pyx_RefNannyFinishContext();
11322  return __pyx_r;
11323  }
11324 
11325  /* "PyClical.pyx":1215
11326  * return self.instance.isnan()
11327  *
11328  * def frame(self): # <<<<<<<<<<<<<<
11329  * """
11330  * Subalgebra generated by all generators of terms of given multivector.
11331  */
11332 
11333  /* Python wrapper */
11334  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11335  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 ";
11336  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11337  PyObject *__pyx_r = 0;
11338  __Pyx_RefNannyDeclarations
11339  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
11340  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11341 
11342  /* function exit code */
11343  __Pyx_RefNannyFinishContext();
11344  return __pyx_r;
11345  }
11346 
11347  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11348  PyObject *__pyx_r = NULL;
11349  __Pyx_RefNannyDeclarations
11350  PyObject *__pyx_t_1 = NULL;
11351  PyObject *__pyx_t_2 = NULL;
11352  int __pyx_lineno = 0;
11353  const char *__pyx_filename = NULL;
11354  int __pyx_clineno = 0;
11355  __Pyx_RefNannySetupContext("frame", 0);
11356 
11357  /* "PyClical.pyx":1224
11358  * <class 'PyClical.index_set'>
11359  * """
11360  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
11361  *
11362  * def __repr__(self):
11363  */
11364  __Pyx_XDECREF(__pyx_r);
11365  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
11366  __Pyx_GOTREF(__pyx_t_1);
11367  __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)
11368  __Pyx_GOTREF(__pyx_t_2);
11369  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11370  __pyx_r = __pyx_t_2;
11371  __pyx_t_2 = 0;
11372  goto __pyx_L0;
11373 
11374  /* "PyClical.pyx":1215
11375  * return self.instance.isnan()
11376  *
11377  * def frame(self): # <<<<<<<<<<<<<<
11378  * """
11379  * Subalgebra generated by all generators of terms of given multivector.
11380  */
11381 
11382  /* function exit code */
11383  __pyx_L1_error:;
11384  __Pyx_XDECREF(__pyx_t_1);
11385  __Pyx_XDECREF(__pyx_t_2);
11386  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
11387  __pyx_r = NULL;
11388  __pyx_L0:;
11389  __Pyx_XGIVEREF(__pyx_r);
11390  __Pyx_RefNannyFinishContext();
11391  return __pyx_r;
11392  }
11393 
11394  /* "PyClical.pyx":1226
11395  * return index_set().wrap( self.instance.frame() )
11396  *
11397  * def __repr__(self): # <<<<<<<<<<<<<<
11398  * """
11399  * The official string representation of self.
11400  */
11401 
11402  /* Python wrapper */
11403  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
11404  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 ";
11405  #if CYTHON_COMPILING_IN_CPYTHON
11406  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
11407  #endif
11408  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
11409  PyObject *__pyx_r = 0;
11410  __Pyx_RefNannyDeclarations
11411  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
11412  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11413 
11414  /* function exit code */
11415  __Pyx_RefNannyFinishContext();
11416  return __pyx_r;
11417  }
11418 
11419  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11420  PyObject *__pyx_r = NULL;
11421  __Pyx_RefNannyDeclarations
11422  PyObject *__pyx_t_1 = NULL;
11423  int __pyx_lineno = 0;
11424  const char *__pyx_filename = NULL;
11425  int __pyx_clineno = 0;
11426  __Pyx_RefNannySetupContext("__repr__", 0);
11427 
11428  /* "PyClical.pyx":1233
11429  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
11430  * """
11431  * return clifford_to_repr( self.unwrap() ).decode() # <<<<<<<<<<<<<<
11432  *
11433  * def __str__(self):
11434  */
11435  __Pyx_XDECREF(__pyx_r);
11436  __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)
11437  __Pyx_GOTREF(__pyx_t_1);
11438  __pyx_r = __pyx_t_1;
11439  __pyx_t_1 = 0;
11440  goto __pyx_L0;
11441 
11442  /* "PyClical.pyx":1226
11443  * return index_set().wrap( self.instance.frame() )
11444  *
11445  * def __repr__(self): # <<<<<<<<<<<<<<
11446  * """
11447  * The official string representation of self.
11448  */
11449 
11450  /* function exit code */
11451  __pyx_L1_error:;
11452  __Pyx_XDECREF(__pyx_t_1);
11453  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11454  __pyx_r = NULL;
11455  __pyx_L0:;
11456  __Pyx_XGIVEREF(__pyx_r);
11457  __Pyx_RefNannyFinishContext();
11458  return __pyx_r;
11459  }
11460 
11461  /* "PyClical.pyx":1235
11462  * return clifford_to_repr( self.unwrap() ).decode()
11463  *
11464  * def __str__(self): # <<<<<<<<<<<<<<
11465  * """
11466  * The informal string representation of self.
11467  */
11468 
11469  /* Python wrapper */
11470  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
11471  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 ";
11472  #if CYTHON_COMPILING_IN_CPYTHON
11473  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
11474  #endif
11475  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
11476  PyObject *__pyx_r = 0;
11477  __Pyx_RefNannyDeclarations
11478  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
11479  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11480 
11481  /* function exit code */
11482  __Pyx_RefNannyFinishContext();
11483  return __pyx_r;
11484  }
11485 
11486  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11487  PyObject *__pyx_r = NULL;
11488  __Pyx_RefNannyDeclarations
11489  PyObject *__pyx_t_1 = NULL;
11490  int __pyx_lineno = 0;
11491  const char *__pyx_filename = NULL;
11492  int __pyx_clineno = 0;
11493  __Pyx_RefNannySetupContext("__str__", 0);
11494 
11495  /* "PyClical.pyx":1242
11496  * '1+3{-1}+2{1,2}+4{-2,7}'
11497  * """
11498  * return clifford_to_str( self.unwrap() ).decode() # <<<<<<<<<<<<<<
11499  *
11500  * def clifford_hidden_doctests():
11501  */
11502  __Pyx_XDECREF(__pyx_r);
11503  __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)
11504  __Pyx_GOTREF(__pyx_t_1);
11505  __pyx_r = __pyx_t_1;
11506  __pyx_t_1 = 0;
11507  goto __pyx_L0;
11508 
11509  /* "PyClical.pyx":1235
11510  * return clifford_to_repr( self.unwrap() ).decode()
11511  *
11512  * def __str__(self): # <<<<<<<<<<<<<<
11513  * """
11514  * The informal string representation of self.
11515  */
11516 
11517  /* function exit code */
11518  __pyx_L1_error:;
11519  __Pyx_XDECREF(__pyx_t_1);
11520  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11521  __pyx_r = NULL;
11522  __pyx_L0:;
11523  __Pyx_XGIVEREF(__pyx_r);
11524  __Pyx_RefNannyFinishContext();
11525  return __pyx_r;
11526  }
11527 
11528  /* "(tree fragment)":1
11529  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11530  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11531  * def __setstate_cython__(self, __pyx_state):
11532  */
11533 
11534  /* Python wrapper */
11535  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11536  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11537  PyObject *__pyx_r = 0;
11538  __Pyx_RefNannyDeclarations
11539  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
11540  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11541 
11542  /* function exit code */
11543  __Pyx_RefNannyFinishContext();
11544  return __pyx_r;
11545  }
11546 
11547  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11548  PyObject *__pyx_r = NULL;
11549  __Pyx_RefNannyDeclarations
11550  PyObject *__pyx_t_1 = NULL;
11551  int __pyx_lineno = 0;
11552  const char *__pyx_filename = NULL;
11553  int __pyx_clineno = 0;
11554  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11555 
11556  /* "(tree fragment)":2
11557  * def __reduce_cython__(self):
11558  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11559  * def __setstate_cython__(self, __pyx_state):
11560  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11561  */
11562  __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)
11563  __Pyx_GOTREF(__pyx_t_1);
11564  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11565  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11566  __PYX_ERR(1, 2, __pyx_L1_error)
11567 
11568  /* "(tree fragment)":1
11569  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11570  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11571  * def __setstate_cython__(self, __pyx_state):
11572  */
11573 
11574  /* function exit code */
11575  __pyx_L1_error:;
11576  __Pyx_XDECREF(__pyx_t_1);
11577  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11578  __pyx_r = NULL;
11579  __Pyx_XGIVEREF(__pyx_r);
11580  __Pyx_RefNannyFinishContext();
11581  return __pyx_r;
11582  }
11583 
11584  /* "(tree fragment)":3
11585  * def __reduce_cython__(self):
11586  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11587  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11588  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11589  */
11590 
11591  /* Python wrapper */
11592  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11593  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11594  PyObject *__pyx_r = 0;
11595  __Pyx_RefNannyDeclarations
11596  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11597  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11598 
11599  /* function exit code */
11600  __Pyx_RefNannyFinishContext();
11601  return __pyx_r;
11602  }
11603 
11604  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) {
11605  PyObject *__pyx_r = NULL;
11606  __Pyx_RefNannyDeclarations
11607  PyObject *__pyx_t_1 = NULL;
11608  int __pyx_lineno = 0;
11609  const char *__pyx_filename = NULL;
11610  int __pyx_clineno = 0;
11611  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11612 
11613  /* "(tree fragment)":4
11614  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11615  * def __setstate_cython__(self, __pyx_state):
11616  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11617  */
11618  __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)
11619  __Pyx_GOTREF(__pyx_t_1);
11620  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11621  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11622  __PYX_ERR(1, 4, __pyx_L1_error)
11623 
11624  /* "(tree fragment)":3
11625  * def __reduce_cython__(self):
11626  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11627  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11628  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11629  */
11630 
11631  /* function exit code */
11632  __pyx_L1_error:;
11633  __Pyx_XDECREF(__pyx_t_1);
11634  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11635  __pyx_r = NULL;
11636  __Pyx_XGIVEREF(__pyx_r);
11637  __Pyx_RefNannyFinishContext();
11638  return __pyx_r;
11639  }
11640 
11641  /* "PyClical.pyx":1244
11642  * return clifford_to_str( self.unwrap() ).decode()
11643  *
11644  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11645  * """
11646  * Tests for functions that Doctest cannot see.
11647  */
11648 
11649  /* Python wrapper */
11650  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11651  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 ";
11652  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};
11653  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11654  PyObject *__pyx_r = 0;
11655  __Pyx_RefNannyDeclarations
11656  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11657  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11658 
11659  /* function exit code */
11660  __Pyx_RefNannyFinishContext();
11661  return __pyx_r;
11662  }
11663 
11664  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11665  PyObject *__pyx_r = NULL;
11666  __Pyx_RefNannyDeclarations
11667  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11668 
11669  /* "PyClical.pyx":1326
11670  * True
11671  * """
11672  * return # <<<<<<<<<<<<<<
11673  *
11674  * cpdef inline inv(obj):
11675  */
11676  __Pyx_XDECREF(__pyx_r);
11677  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11678  goto __pyx_L0;
11679 
11680  /* "PyClical.pyx":1244
11681  * return clifford_to_str( self.unwrap() ).decode()
11682  *
11683  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11684  * """
11685  * Tests for functions that Doctest cannot see.
11686  */
11687 
11688  /* function exit code */
11689  __pyx_L0:;
11690  __Pyx_XGIVEREF(__pyx_r);
11691  __Pyx_RefNannyFinishContext();
11692  return __pyx_r;
11693  }
11694 
11695  /* "PyClical.pyx":1328
11696  * return
11697  *
11698  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11699  * """
11700  * Geometric multiplicative inverse.
11701  */
11702 
11703  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11704  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11705  PyObject *__pyx_r = NULL;
11706  __Pyx_RefNannyDeclarations
11707  PyObject *__pyx_t_1 = NULL;
11708  PyObject *__pyx_t_2 = NULL;
11709  PyObject *__pyx_t_3 = NULL;
11710  int __pyx_lineno = 0;
11711  const char *__pyx_filename = NULL;
11712  int __pyx_clineno = 0;
11713  __Pyx_RefNannySetupContext("inv", 0);
11714 
11715  /* "PyClical.pyx":1341
11716  * nan
11717  * """
11718  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11719  *
11720  * cpdef inline scalar(obj):
11721  */
11722  __Pyx_XDECREF(__pyx_r);
11723  __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)
11724  __Pyx_GOTREF(__pyx_t_2);
11725  __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)
11726  __Pyx_GOTREF(__pyx_t_3);
11727  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11728  __pyx_t_2 = NULL;
11729  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11730  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11731  if (likely(__pyx_t_2)) {
11732  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11733  __Pyx_INCREF(__pyx_t_2);
11734  __Pyx_INCREF(function);
11735  __Pyx_DECREF_SET(__pyx_t_3, function);
11736  }
11737  }
11738  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11739  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11740  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
11741  __Pyx_GOTREF(__pyx_t_1);
11742  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11743  __pyx_r = __pyx_t_1;
11744  __pyx_t_1 = 0;
11745  goto __pyx_L0;
11746 
11747  /* "PyClical.pyx":1328
11748  * return
11749  *
11750  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11751  * """
11752  * Geometric multiplicative inverse.
11753  */
11754 
11755  /* function exit code */
11756  __pyx_L1_error:;
11757  __Pyx_XDECREF(__pyx_t_1);
11758  __Pyx_XDECREF(__pyx_t_2);
11759  __Pyx_XDECREF(__pyx_t_3);
11760  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11761  __pyx_r = 0;
11762  __pyx_L0:;
11763  __Pyx_XGIVEREF(__pyx_r);
11764  __Pyx_RefNannyFinishContext();
11765  return __pyx_r;
11766  }
11767 
11768  /* Python wrapper */
11769  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11770  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 ";
11771  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11772  PyObject *__pyx_r = 0;
11773  __Pyx_RefNannyDeclarations
11774  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11775  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11776 
11777  /* function exit code */
11778  __Pyx_RefNannyFinishContext();
11779  return __pyx_r;
11780  }
11781 
11782  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11783  PyObject *__pyx_r = NULL;
11784  __Pyx_RefNannyDeclarations
11785  PyObject *__pyx_t_1 = NULL;
11786  int __pyx_lineno = 0;
11787  const char *__pyx_filename = NULL;
11788  int __pyx_clineno = 0;
11789  __Pyx_RefNannySetupContext("inv", 0);
11790  __Pyx_XDECREF(__pyx_r);
11791  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
11792  __Pyx_GOTREF(__pyx_t_1);
11793  __pyx_r = __pyx_t_1;
11794  __pyx_t_1 = 0;
11795  goto __pyx_L0;
11796 
11797  /* function exit code */
11798  __pyx_L1_error:;
11799  __Pyx_XDECREF(__pyx_t_1);
11800  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11801  __pyx_r = NULL;
11802  __pyx_L0:;
11803  __Pyx_XGIVEREF(__pyx_r);
11804  __Pyx_RefNannyFinishContext();
11805  return __pyx_r;
11806  }
11807 
11808  /* "PyClical.pyx":1343
11809  * return clifford(obj).inv()
11810  *
11811  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11812  * """
11813  * Scalar part.
11814  */
11815 
11816  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11817  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11818  PyObject *__pyx_r = NULL;
11819  __Pyx_RefNannyDeclarations
11820  PyObject *__pyx_t_1 = NULL;
11821  PyObject *__pyx_t_2 = NULL;
11822  PyObject *__pyx_t_3 = NULL;
11823  int __pyx_lineno = 0;
11824  const char *__pyx_filename = NULL;
11825  int __pyx_clineno = 0;
11826  __Pyx_RefNannySetupContext("scalar", 0);
11827 
11828  /* "PyClical.pyx":1352
11829  * 0.0
11830  * """
11831  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11832  *
11833  * cpdef inline real(obj):
11834  */
11835  __Pyx_XDECREF(__pyx_r);
11836  __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)
11837  __Pyx_GOTREF(__pyx_t_2);
11838  __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)
11839  __Pyx_GOTREF(__pyx_t_3);
11840  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11841  __pyx_t_2 = NULL;
11842  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11843  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11844  if (likely(__pyx_t_2)) {
11845  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11846  __Pyx_INCREF(__pyx_t_2);
11847  __Pyx_INCREF(function);
11848  __Pyx_DECREF_SET(__pyx_t_3, function);
11849  }
11850  }
11851  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11852  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11853  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error)
11854  __Pyx_GOTREF(__pyx_t_1);
11855  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11856  __pyx_r = __pyx_t_1;
11857  __pyx_t_1 = 0;
11858  goto __pyx_L0;
11859 
11860  /* "PyClical.pyx":1343
11861  * return clifford(obj).inv()
11862  *
11863  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11864  * """
11865  * Scalar part.
11866  */
11867 
11868  /* function exit code */
11869  __pyx_L1_error:;
11870  __Pyx_XDECREF(__pyx_t_1);
11871  __Pyx_XDECREF(__pyx_t_2);
11872  __Pyx_XDECREF(__pyx_t_3);
11873  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11874  __pyx_r = 0;
11875  __pyx_L0:;
11876  __Pyx_XGIVEREF(__pyx_r);
11877  __Pyx_RefNannyFinishContext();
11878  return __pyx_r;
11879  }
11880 
11881  /* Python wrapper */
11882  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11883  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 ";
11884  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11885  PyObject *__pyx_r = 0;
11886  __Pyx_RefNannyDeclarations
11887  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11888  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11889 
11890  /* function exit code */
11891  __Pyx_RefNannyFinishContext();
11892  return __pyx_r;
11893  }
11894 
11895  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11896  PyObject *__pyx_r = NULL;
11897  __Pyx_RefNannyDeclarations
11898  PyObject *__pyx_t_1 = NULL;
11899  int __pyx_lineno = 0;
11900  const char *__pyx_filename = NULL;
11901  int __pyx_clineno = 0;
11902  __Pyx_RefNannySetupContext("scalar", 0);
11903  __Pyx_XDECREF(__pyx_r);
11904  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
11905  __Pyx_GOTREF(__pyx_t_1);
11906  __pyx_r = __pyx_t_1;
11907  __pyx_t_1 = 0;
11908  goto __pyx_L0;
11909 
11910  /* function exit code */
11911  __pyx_L1_error:;
11912  __Pyx_XDECREF(__pyx_t_1);
11913  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11914  __pyx_r = NULL;
11915  __pyx_L0:;
11916  __Pyx_XGIVEREF(__pyx_r);
11917  __Pyx_RefNannyFinishContext();
11918  return __pyx_r;
11919  }
11920 
11921  /* "PyClical.pyx":1354
11922  * return clifford(obj).scalar()
11923  *
11924  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11925  * """
11926  * Real part: synonym for scalar part.
11927  */
11928 
11929  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11930  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11931  PyObject *__pyx_r = NULL;
11932  __Pyx_RefNannyDeclarations
11933  PyObject *__pyx_t_1 = NULL;
11934  PyObject *__pyx_t_2 = NULL;
11935  PyObject *__pyx_t_3 = NULL;
11936  int __pyx_lineno = 0;
11937  const char *__pyx_filename = NULL;
11938  int __pyx_clineno = 0;
11939  __Pyx_RefNannySetupContext("real", 0);
11940 
11941  /* "PyClical.pyx":1363
11942  * 0.0
11943  * """
11944  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11945  *
11946  * cpdef inline imag(obj):
11947  */
11948  __Pyx_XDECREF(__pyx_r);
11949  __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)
11950  __Pyx_GOTREF(__pyx_t_2);
11951  __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)
11952  __Pyx_GOTREF(__pyx_t_3);
11953  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11954  __pyx_t_2 = NULL;
11955  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11956  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11957  if (likely(__pyx_t_2)) {
11958  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11959  __Pyx_INCREF(__pyx_t_2);
11960  __Pyx_INCREF(function);
11961  __Pyx_DECREF_SET(__pyx_t_3, function);
11962  }
11963  }
11964  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11965  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11966  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error)
11967  __Pyx_GOTREF(__pyx_t_1);
11968  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11969  __pyx_r = __pyx_t_1;
11970  __pyx_t_1 = 0;
11971  goto __pyx_L0;
11972 
11973  /* "PyClical.pyx":1354
11974  * return clifford(obj).scalar()
11975  *
11976  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11977  * """
11978  * Real part: synonym for scalar part.
11979  */
11980 
11981  /* function exit code */
11982  __pyx_L1_error:;
11983  __Pyx_XDECREF(__pyx_t_1);
11984  __Pyx_XDECREF(__pyx_t_2);
11985  __Pyx_XDECREF(__pyx_t_3);
11986  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11987  __pyx_r = 0;
11988  __pyx_L0:;
11989  __Pyx_XGIVEREF(__pyx_r);
11990  __Pyx_RefNannyFinishContext();
11991  return __pyx_r;
11992  }
11993 
11994  /* Python wrapper */
11995  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11996  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 ";
11997  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11998  PyObject *__pyx_r = 0;
11999  __Pyx_RefNannyDeclarations
12000  __Pyx_RefNannySetupContext("real (wrapper)", 0);
12001  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
12002 
12003  /* function exit code */
12004  __Pyx_RefNannyFinishContext();
12005  return __pyx_r;
12006  }
12007 
12008  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12009  PyObject *__pyx_r = NULL;
12010  __Pyx_RefNannyDeclarations
12011  PyObject *__pyx_t_1 = NULL;
12012  int __pyx_lineno = 0;
12013  const char *__pyx_filename = NULL;
12014  int __pyx_clineno = 0;
12015  __Pyx_RefNannySetupContext("real", 0);
12016  __Pyx_XDECREF(__pyx_r);
12017  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
12018  __Pyx_GOTREF(__pyx_t_1);
12019  __pyx_r = __pyx_t_1;
12020  __pyx_t_1 = 0;
12021  goto __pyx_L0;
12022 
12023  /* function exit code */
12024  __pyx_L1_error:;
12025  __Pyx_XDECREF(__pyx_t_1);
12026  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
12027  __pyx_r = NULL;
12028  __pyx_L0:;
12029  __Pyx_XGIVEREF(__pyx_r);
12030  __Pyx_RefNannyFinishContext();
12031  return __pyx_r;
12032  }
12033 
12034  /* "PyClical.pyx":1365
12035  * return clifford(obj).scalar()
12036  *
12037  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
12038  * """
12039  * Imaginary part: deprecated (always 0).
12040  */
12041 
12042  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12043  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12044  PyObject *__pyx_r = NULL;
12045  __Pyx_RefNannyDeclarations
12046  __Pyx_RefNannySetupContext("imag", 0);
12047 
12048  /* "PyClical.pyx":1374
12049  * 0.0
12050  * """
12051  * return 0.0 # <<<<<<<<<<<<<<
12052  *
12053  * cpdef inline pure(obj):
12054  */
12055  __Pyx_XDECREF(__pyx_r);
12056  __Pyx_INCREF(__pyx_float_0_0);
12057  __pyx_r = __pyx_float_0_0;
12058  goto __pyx_L0;
12059 
12060  /* "PyClical.pyx":1365
12061  * return clifford(obj).scalar()
12062  *
12063  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
12064  * """
12065  * Imaginary part: deprecated (always 0).
12066  */
12067 
12068  /* function exit code */
12069  __pyx_L0:;
12070  __Pyx_XGIVEREF(__pyx_r);
12071  __Pyx_RefNannyFinishContext();
12072  return __pyx_r;
12073  }
12074 
12075  /* Python wrapper */
12076  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12077  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 ";
12078  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12079  PyObject *__pyx_r = 0;
12080  __Pyx_RefNannyDeclarations
12081  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
12082  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
12083 
12084  /* function exit code */
12085  __Pyx_RefNannyFinishContext();
12086  return __pyx_r;
12087  }
12088 
12089  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12090  PyObject *__pyx_r = NULL;
12091  __Pyx_RefNannyDeclarations
12092  PyObject *__pyx_t_1 = NULL;
12093  int __pyx_lineno = 0;
12094  const char *__pyx_filename = NULL;
12095  int __pyx_clineno = 0;
12096  __Pyx_RefNannySetupContext("imag", 0);
12097  __Pyx_XDECREF(__pyx_r);
12098  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error)
12099  __Pyx_GOTREF(__pyx_t_1);
12100  __pyx_r = __pyx_t_1;
12101  __pyx_t_1 = 0;
12102  goto __pyx_L0;
12103 
12104  /* function exit code */
12105  __pyx_L1_error:;
12106  __Pyx_XDECREF(__pyx_t_1);
12107  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
12108  __pyx_r = NULL;
12109  __pyx_L0:;
12110  __Pyx_XGIVEREF(__pyx_r);
12111  __Pyx_RefNannyFinishContext();
12112  return __pyx_r;
12113  }
12114 
12115  /* "PyClical.pyx":1376
12116  * return 0.0
12117  *
12118  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
12119  * """
12120  * Pure part
12121  */
12122 
12123  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12124  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12125  PyObject *__pyx_r = NULL;
12126  __Pyx_RefNannyDeclarations
12127  PyObject *__pyx_t_1 = NULL;
12128  PyObject *__pyx_t_2 = NULL;
12129  PyObject *__pyx_t_3 = NULL;
12130  int __pyx_lineno = 0;
12131  const char *__pyx_filename = NULL;
12132  int __pyx_clineno = 0;
12133  __Pyx_RefNannySetupContext("pure", 0);
12134 
12135  /* "PyClical.pyx":1385
12136  * {1,2}
12137  * """
12138  * return clifford(obj).pure() # <<<<<<<<<<<<<<
12139  *
12140  * cpdef inline even(obj):
12141  */
12142  __Pyx_XDECREF(__pyx_r);
12143  __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)
12144  __Pyx_GOTREF(__pyx_t_2);
12145  __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)
12146  __Pyx_GOTREF(__pyx_t_3);
12147  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12148  __pyx_t_2 = NULL;
12149  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12150  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12151  if (likely(__pyx_t_2)) {
12152  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12153  __Pyx_INCREF(__pyx_t_2);
12154  __Pyx_INCREF(function);
12155  __Pyx_DECREF_SET(__pyx_t_3, function);
12156  }
12157  }
12158  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12159  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12160  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
12161  __Pyx_GOTREF(__pyx_t_1);
12162  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12163  __pyx_r = __pyx_t_1;
12164  __pyx_t_1 = 0;
12165  goto __pyx_L0;
12166 
12167  /* "PyClical.pyx":1376
12168  * return 0.0
12169  *
12170  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
12171  * """
12172  * Pure part
12173  */
12174 
12175  /* function exit code */
12176  __pyx_L1_error:;
12177  __Pyx_XDECREF(__pyx_t_1);
12178  __Pyx_XDECREF(__pyx_t_2);
12179  __Pyx_XDECREF(__pyx_t_3);
12180  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
12181  __pyx_r = 0;
12182  __pyx_L0:;
12183  __Pyx_XGIVEREF(__pyx_r);
12184  __Pyx_RefNannyFinishContext();
12185  return __pyx_r;
12186  }
12187 
12188  /* Python wrapper */
12189  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12190  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 ";
12191  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12192  PyObject *__pyx_r = 0;
12193  __Pyx_RefNannyDeclarations
12194  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
12195  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
12196 
12197  /* function exit code */
12198  __Pyx_RefNannyFinishContext();
12199  return __pyx_r;
12200  }
12201 
12202  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12203  PyObject *__pyx_r = NULL;
12204  __Pyx_RefNannyDeclarations
12205  PyObject *__pyx_t_1 = NULL;
12206  int __pyx_lineno = 0;
12207  const char *__pyx_filename = NULL;
12208  int __pyx_clineno = 0;
12209  __Pyx_RefNannySetupContext("pure", 0);
12210  __Pyx_XDECREF(__pyx_r);
12211  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L1_error)
12212  __Pyx_GOTREF(__pyx_t_1);
12213  __pyx_r = __pyx_t_1;
12214  __pyx_t_1 = 0;
12215  goto __pyx_L0;
12216 
12217  /* function exit code */
12218  __pyx_L1_error:;
12219  __Pyx_XDECREF(__pyx_t_1);
12220  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
12221  __pyx_r = NULL;
12222  __pyx_L0:;
12223  __Pyx_XGIVEREF(__pyx_r);
12224  __Pyx_RefNannyFinishContext();
12225  return __pyx_r;
12226  }
12227 
12228  /* "PyClical.pyx":1387
12229  * return clifford(obj).pure()
12230  *
12231  * cpdef inline even(obj): # <<<<<<<<<<<<<<
12232  * """
12233  * Even part of multivector, sum of even grade terms.
12234  */
12235 
12236  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12237  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12238  PyObject *__pyx_r = NULL;
12239  __Pyx_RefNannyDeclarations
12240  PyObject *__pyx_t_1 = NULL;
12241  PyObject *__pyx_t_2 = NULL;
12242  PyObject *__pyx_t_3 = NULL;
12243  int __pyx_lineno = 0;
12244  const char *__pyx_filename = NULL;
12245  int __pyx_clineno = 0;
12246  __Pyx_RefNannySetupContext("even", 0);
12247 
12248  /* "PyClical.pyx":1394
12249  * 1+{1,2}
12250  * """
12251  * return clifford(obj).even() # <<<<<<<<<<<<<<
12252  *
12253  * cpdef inline odd(obj):
12254  */
12255  __Pyx_XDECREF(__pyx_r);
12256  __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)
12257  __Pyx_GOTREF(__pyx_t_2);
12258  __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)
12259  __Pyx_GOTREF(__pyx_t_3);
12260  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12261  __pyx_t_2 = NULL;
12262  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12263  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12264  if (likely(__pyx_t_2)) {
12265  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12266  __Pyx_INCREF(__pyx_t_2);
12267  __Pyx_INCREF(function);
12268  __Pyx_DECREF_SET(__pyx_t_3, function);
12269  }
12270  }
12271  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12272  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12273  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error)
12274  __Pyx_GOTREF(__pyx_t_1);
12275  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12276  __pyx_r = __pyx_t_1;
12277  __pyx_t_1 = 0;
12278  goto __pyx_L0;
12279 
12280  /* "PyClical.pyx":1387
12281  * return clifford(obj).pure()
12282  *
12283  * cpdef inline even(obj): # <<<<<<<<<<<<<<
12284  * """
12285  * Even part of multivector, sum of even grade terms.
12286  */
12287 
12288  /* function exit code */
12289  __pyx_L1_error:;
12290  __Pyx_XDECREF(__pyx_t_1);
12291  __Pyx_XDECREF(__pyx_t_2);
12292  __Pyx_XDECREF(__pyx_t_3);
12293  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
12294  __pyx_r = 0;
12295  __pyx_L0:;
12296  __Pyx_XGIVEREF(__pyx_r);
12297  __Pyx_RefNannyFinishContext();
12298  return __pyx_r;
12299  }
12300 
12301  /* Python wrapper */
12302  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12303  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 ";
12304  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12305  PyObject *__pyx_r = 0;
12306  __Pyx_RefNannyDeclarations
12307  __Pyx_RefNannySetupContext("even (wrapper)", 0);
12308  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
12309 
12310  /* function exit code */
12311  __Pyx_RefNannyFinishContext();
12312  return __pyx_r;
12313  }
12314 
12315  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12316  PyObject *__pyx_r = NULL;
12317  __Pyx_RefNannyDeclarations
12318  PyObject *__pyx_t_1 = NULL;
12319  int __pyx_lineno = 0;
12320  const char *__pyx_filename = NULL;
12321  int __pyx_clineno = 0;
12322  __Pyx_RefNannySetupContext("even", 0);
12323  __Pyx_XDECREF(__pyx_r);
12324  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
12325  __Pyx_GOTREF(__pyx_t_1);
12326  __pyx_r = __pyx_t_1;
12327  __pyx_t_1 = 0;
12328  goto __pyx_L0;
12329 
12330  /* function exit code */
12331  __pyx_L1_error:;
12332  __Pyx_XDECREF(__pyx_t_1);
12333  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
12334  __pyx_r = NULL;
12335  __pyx_L0:;
12336  __Pyx_XGIVEREF(__pyx_r);
12337  __Pyx_RefNannyFinishContext();
12338  return __pyx_r;
12339  }
12340 
12341  /* "PyClical.pyx":1396
12342  * return clifford(obj).even()
12343  *
12344  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
12345  * """
12346  * Odd part of multivector, sum of odd grade terms.
12347  */
12348 
12349  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12350  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12351  PyObject *__pyx_r = NULL;
12352  __Pyx_RefNannyDeclarations
12353  PyObject *__pyx_t_1 = NULL;
12354  PyObject *__pyx_t_2 = NULL;
12355  PyObject *__pyx_t_3 = NULL;
12356  int __pyx_lineno = 0;
12357  const char *__pyx_filename = NULL;
12358  int __pyx_clineno = 0;
12359  __Pyx_RefNannySetupContext("odd", 0);
12360 
12361  /* "PyClical.pyx":1403
12362  * {1}
12363  * """
12364  * return clifford(obj).odd() # <<<<<<<<<<<<<<
12365  *
12366  * cpdef inline involute(obj):
12367  */
12368  __Pyx_XDECREF(__pyx_r);
12369  __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)
12370  __Pyx_GOTREF(__pyx_t_2);
12371  __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)
12372  __Pyx_GOTREF(__pyx_t_3);
12373  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12374  __pyx_t_2 = NULL;
12375  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12376  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12377  if (likely(__pyx_t_2)) {
12378  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12379  __Pyx_INCREF(__pyx_t_2);
12380  __Pyx_INCREF(function);
12381  __Pyx_DECREF_SET(__pyx_t_3, function);
12382  }
12383  }
12384  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12385  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12386  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
12387  __Pyx_GOTREF(__pyx_t_1);
12388  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12389  __pyx_r = __pyx_t_1;
12390  __pyx_t_1 = 0;
12391  goto __pyx_L0;
12392 
12393  /* "PyClical.pyx":1396
12394  * return clifford(obj).even()
12395  *
12396  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
12397  * """
12398  * Odd part of multivector, sum of odd grade terms.
12399  */
12400 
12401  /* function exit code */
12402  __pyx_L1_error:;
12403  __Pyx_XDECREF(__pyx_t_1);
12404  __Pyx_XDECREF(__pyx_t_2);
12405  __Pyx_XDECREF(__pyx_t_3);
12406  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
12407  __pyx_r = 0;
12408  __pyx_L0:;
12409  __Pyx_XGIVEREF(__pyx_r);
12410  __Pyx_RefNannyFinishContext();
12411  return __pyx_r;
12412  }
12413 
12414  /* Python wrapper */
12415  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12416  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 ";
12417  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12418  PyObject *__pyx_r = 0;
12419  __Pyx_RefNannyDeclarations
12420  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
12421  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
12422 
12423  /* function exit code */
12424  __Pyx_RefNannyFinishContext();
12425  return __pyx_r;
12426  }
12427 
12428  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12429  PyObject *__pyx_r = NULL;
12430  __Pyx_RefNannyDeclarations
12431  PyObject *__pyx_t_1 = NULL;
12432  int __pyx_lineno = 0;
12433  const char *__pyx_filename = NULL;
12434  int __pyx_clineno = 0;
12435  __Pyx_RefNannySetupContext("odd", 0);
12436  __Pyx_XDECREF(__pyx_r);
12437  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error)
12438  __Pyx_GOTREF(__pyx_t_1);
12439  __pyx_r = __pyx_t_1;
12440  __pyx_t_1 = 0;
12441  goto __pyx_L0;
12442 
12443  /* function exit code */
12444  __pyx_L1_error:;
12445  __Pyx_XDECREF(__pyx_t_1);
12446  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
12447  __pyx_r = NULL;
12448  __pyx_L0:;
12449  __Pyx_XGIVEREF(__pyx_r);
12450  __Pyx_RefNannyFinishContext();
12451  return __pyx_r;
12452  }
12453 
12454  /* "PyClical.pyx":1405
12455  * return clifford(obj).odd()
12456  *
12457  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
12458  * """
12459  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
12460  */
12461 
12462  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12463  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12464  PyObject *__pyx_r = NULL;
12465  __Pyx_RefNannyDeclarations
12466  PyObject *__pyx_t_1 = NULL;
12467  PyObject *__pyx_t_2 = NULL;
12468  PyObject *__pyx_t_3 = NULL;
12469  int __pyx_lineno = 0;
12470  const char *__pyx_filename = NULL;
12471  int __pyx_clineno = 0;
12472  __Pyx_RefNannySetupContext("involute", 0);
12473 
12474  /* "PyClical.pyx":1418
12475  * 1-{1}+{1,2}
12476  * """
12477  * return clifford(obj).involute() # <<<<<<<<<<<<<<
12478  *
12479  * cpdef inline reverse(obj):
12480  */
12481  __Pyx_XDECREF(__pyx_r);
12482  __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)
12483  __Pyx_GOTREF(__pyx_t_2);
12484  __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)
12485  __Pyx_GOTREF(__pyx_t_3);
12486  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12487  __pyx_t_2 = NULL;
12488  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12489  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12490  if (likely(__pyx_t_2)) {
12491  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12492  __Pyx_INCREF(__pyx_t_2);
12493  __Pyx_INCREF(function);
12494  __Pyx_DECREF_SET(__pyx_t_3, function);
12495  }
12496  }
12497  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12498  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12499  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
12500  __Pyx_GOTREF(__pyx_t_1);
12501  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12502  __pyx_r = __pyx_t_1;
12503  __pyx_t_1 = 0;
12504  goto __pyx_L0;
12505 
12506  /* "PyClical.pyx":1405
12507  * return clifford(obj).odd()
12508  *
12509  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
12510  * """
12511  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
12512  */
12513 
12514  /* function exit code */
12515  __pyx_L1_error:;
12516  __Pyx_XDECREF(__pyx_t_1);
12517  __Pyx_XDECREF(__pyx_t_2);
12518  __Pyx_XDECREF(__pyx_t_3);
12519  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12520  __pyx_r = 0;
12521  __pyx_L0:;
12522  __Pyx_XGIVEREF(__pyx_r);
12523  __Pyx_RefNannyFinishContext();
12524  return __pyx_r;
12525  }
12526 
12527  /* Python wrapper */
12528  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12529  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 ";
12530  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12531  PyObject *__pyx_r = 0;
12532  __Pyx_RefNannyDeclarations
12533  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
12534  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
12535 
12536  /* function exit code */
12537  __Pyx_RefNannyFinishContext();
12538  return __pyx_r;
12539  }
12540 
12541  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12542  PyObject *__pyx_r = NULL;
12543  __Pyx_RefNannyDeclarations
12544  PyObject *__pyx_t_1 = NULL;
12545  int __pyx_lineno = 0;
12546  const char *__pyx_filename = NULL;
12547  int __pyx_clineno = 0;
12548  __Pyx_RefNannySetupContext("involute", 0);
12549  __Pyx_XDECREF(__pyx_r);
12550  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
12551  __Pyx_GOTREF(__pyx_t_1);
12552  __pyx_r = __pyx_t_1;
12553  __pyx_t_1 = 0;
12554  goto __pyx_L0;
12555 
12556  /* function exit code */
12557  __pyx_L1_error:;
12558  __Pyx_XDECREF(__pyx_t_1);
12559  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12560  __pyx_r = NULL;
12561  __pyx_L0:;
12562  __Pyx_XGIVEREF(__pyx_r);
12563  __Pyx_RefNannyFinishContext();
12564  return __pyx_r;
12565  }
12566 
12567  /* "PyClical.pyx":1420
12568  * return clifford(obj).involute()
12569  *
12570  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12571  * """
12572  * Reversion, eg. {1}*{2} -> {2}*{1}
12573  */
12574 
12575  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12576  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12577  PyObject *__pyx_r = NULL;
12578  __Pyx_RefNannyDeclarations
12579  PyObject *__pyx_t_1 = NULL;
12580  PyObject *__pyx_t_2 = NULL;
12581  PyObject *__pyx_t_3 = NULL;
12582  int __pyx_lineno = 0;
12583  const char *__pyx_filename = NULL;
12584  int __pyx_clineno = 0;
12585  __Pyx_RefNannySetupContext("reverse", 0);
12586 
12587  /* "PyClical.pyx":1433
12588  * 1+{1}-{1,2}
12589  * """
12590  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
12591  *
12592  * cpdef inline conj(obj):
12593  */
12594  __Pyx_XDECREF(__pyx_r);
12595  __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)
12596  __Pyx_GOTREF(__pyx_t_2);
12597  __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)
12598  __Pyx_GOTREF(__pyx_t_3);
12599  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12600  __pyx_t_2 = NULL;
12601  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12602  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12603  if (likely(__pyx_t_2)) {
12604  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12605  __Pyx_INCREF(__pyx_t_2);
12606  __Pyx_INCREF(function);
12607  __Pyx_DECREF_SET(__pyx_t_3, function);
12608  }
12609  }
12610  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12611  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12612  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __pyx_L1_error)
12613  __Pyx_GOTREF(__pyx_t_1);
12614  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12615  __pyx_r = __pyx_t_1;
12616  __pyx_t_1 = 0;
12617  goto __pyx_L0;
12618 
12619  /* "PyClical.pyx":1420
12620  * return clifford(obj).involute()
12621  *
12622  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12623  * """
12624  * Reversion, eg. {1}*{2} -> {2}*{1}
12625  */
12626 
12627  /* function exit code */
12628  __pyx_L1_error:;
12629  __Pyx_XDECREF(__pyx_t_1);
12630  __Pyx_XDECREF(__pyx_t_2);
12631  __Pyx_XDECREF(__pyx_t_3);
12632  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12633  __pyx_r = 0;
12634  __pyx_L0:;
12635  __Pyx_XGIVEREF(__pyx_r);
12636  __Pyx_RefNannyFinishContext();
12637  return __pyx_r;
12638  }
12639 
12640  /* Python wrapper */
12641  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12642  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 ";
12643  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12644  PyObject *__pyx_r = 0;
12645  __Pyx_RefNannyDeclarations
12646  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12647  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12648 
12649  /* function exit code */
12650  __Pyx_RefNannyFinishContext();
12651  return __pyx_r;
12652  }
12653 
12654  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12655  PyObject *__pyx_r = NULL;
12656  __Pyx_RefNannyDeclarations
12657  PyObject *__pyx_t_1 = NULL;
12658  int __pyx_lineno = 0;
12659  const char *__pyx_filename = NULL;
12660  int __pyx_clineno = 0;
12661  __Pyx_RefNannySetupContext("reverse", 0);
12662  __Pyx_XDECREF(__pyx_r);
12663  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
12664  __Pyx_GOTREF(__pyx_t_1);
12665  __pyx_r = __pyx_t_1;
12666  __pyx_t_1 = 0;
12667  goto __pyx_L0;
12668 
12669  /* function exit code */
12670  __pyx_L1_error:;
12671  __Pyx_XDECREF(__pyx_t_1);
12672  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12673  __pyx_r = NULL;
12674  __pyx_L0:;
12675  __Pyx_XGIVEREF(__pyx_r);
12676  __Pyx_RefNannyFinishContext();
12677  return __pyx_r;
12678  }
12679 
12680  /* "PyClical.pyx":1435
12681  * return clifford(obj).reverse()
12682  *
12683  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12684  * """
12685  * Conjugation, reverse o involute == involute o reverse.
12686  */
12687 
12688  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12689  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12690  PyObject *__pyx_r = NULL;
12691  __Pyx_RefNannyDeclarations
12692  PyObject *__pyx_t_1 = NULL;
12693  PyObject *__pyx_t_2 = NULL;
12694  PyObject *__pyx_t_3 = NULL;
12695  int __pyx_lineno = 0;
12696  const char *__pyx_filename = NULL;
12697  int __pyx_clineno = 0;
12698  __Pyx_RefNannySetupContext("conj", 0);
12699 
12700  /* "PyClical.pyx":1448
12701  * 1-{1}-{1,2}
12702  * """
12703  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12704  *
12705  * cpdef inline quad(obj):
12706  */
12707  __Pyx_XDECREF(__pyx_r);
12708  __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)
12709  __Pyx_GOTREF(__pyx_t_2);
12710  __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)
12711  __Pyx_GOTREF(__pyx_t_3);
12712  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12713  __pyx_t_2 = NULL;
12714  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12715  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12716  if (likely(__pyx_t_2)) {
12717  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12718  __Pyx_INCREF(__pyx_t_2);
12719  __Pyx_INCREF(function);
12720  __Pyx_DECREF_SET(__pyx_t_3, function);
12721  }
12722  }
12723  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12724  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12725  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1448, __pyx_L1_error)
12726  __Pyx_GOTREF(__pyx_t_1);
12727  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12728  __pyx_r = __pyx_t_1;
12729  __pyx_t_1 = 0;
12730  goto __pyx_L0;
12731 
12732  /* "PyClical.pyx":1435
12733  * return clifford(obj).reverse()
12734  *
12735  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12736  * """
12737  * Conjugation, reverse o involute == involute o reverse.
12738  */
12739 
12740  /* function exit code */
12741  __pyx_L1_error:;
12742  __Pyx_XDECREF(__pyx_t_1);
12743  __Pyx_XDECREF(__pyx_t_2);
12744  __Pyx_XDECREF(__pyx_t_3);
12745  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12746  __pyx_r = 0;
12747  __pyx_L0:;
12748  __Pyx_XGIVEREF(__pyx_r);
12749  __Pyx_RefNannyFinishContext();
12750  return __pyx_r;
12751  }
12752 
12753  /* Python wrapper */
12754  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12755  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 ";
12756  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12757  PyObject *__pyx_r = 0;
12758  __Pyx_RefNannyDeclarations
12759  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12760  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12761 
12762  /* function exit code */
12763  __Pyx_RefNannyFinishContext();
12764  return __pyx_r;
12765  }
12766 
12767  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12768  PyObject *__pyx_r = NULL;
12769  __Pyx_RefNannyDeclarations
12770  PyObject *__pyx_t_1 = NULL;
12771  int __pyx_lineno = 0;
12772  const char *__pyx_filename = NULL;
12773  int __pyx_clineno = 0;
12774  __Pyx_RefNannySetupContext("conj", 0);
12775  __Pyx_XDECREF(__pyx_r);
12776  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error)
12777  __Pyx_GOTREF(__pyx_t_1);
12778  __pyx_r = __pyx_t_1;
12779  __pyx_t_1 = 0;
12780  goto __pyx_L0;
12781 
12782  /* function exit code */
12783  __pyx_L1_error:;
12784  __Pyx_XDECREF(__pyx_t_1);
12785  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12786  __pyx_r = NULL;
12787  __pyx_L0:;
12788  __Pyx_XGIVEREF(__pyx_r);
12789  __Pyx_RefNannyFinishContext();
12790  return __pyx_r;
12791  }
12792 
12793  /* "PyClical.pyx":1450
12794  * return clifford(obj).conj()
12795  *
12796  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12797  * """
12798  * Quadratic form == (rev(x)*x)(0).
12799  */
12800 
12801  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12802  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12803  PyObject *__pyx_r = NULL;
12804  __Pyx_RefNannyDeclarations
12805  PyObject *__pyx_t_1 = NULL;
12806  PyObject *__pyx_t_2 = NULL;
12807  PyObject *__pyx_t_3 = NULL;
12808  int __pyx_lineno = 0;
12809  const char *__pyx_filename = NULL;
12810  int __pyx_clineno = 0;
12811  __Pyx_RefNannySetupContext("quad", 0);
12812 
12813  /* "PyClical.pyx":1459
12814  * 2.0
12815  * """
12816  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12817  *
12818  * cpdef inline norm(obj):
12819  */
12820  __Pyx_XDECREF(__pyx_r);
12821  __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)
12822  __Pyx_GOTREF(__pyx_t_2);
12823  __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)
12824  __Pyx_GOTREF(__pyx_t_3);
12825  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12826  __pyx_t_2 = NULL;
12827  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12828  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12829  if (likely(__pyx_t_2)) {
12830  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12831  __Pyx_INCREF(__pyx_t_2);
12832  __Pyx_INCREF(function);
12833  __Pyx_DECREF_SET(__pyx_t_3, function);
12834  }
12835  }
12836  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12837  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12838  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error)
12839  __Pyx_GOTREF(__pyx_t_1);
12840  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12841  __pyx_r = __pyx_t_1;
12842  __pyx_t_1 = 0;
12843  goto __pyx_L0;
12844 
12845  /* "PyClical.pyx":1450
12846  * return clifford(obj).conj()
12847  *
12848  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12849  * """
12850  * Quadratic form == (rev(x)*x)(0).
12851  */
12852 
12853  /* function exit code */
12854  __pyx_L1_error:;
12855  __Pyx_XDECREF(__pyx_t_1);
12856  __Pyx_XDECREF(__pyx_t_2);
12857  __Pyx_XDECREF(__pyx_t_3);
12858  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12859  __pyx_r = 0;
12860  __pyx_L0:;
12861  __Pyx_XGIVEREF(__pyx_r);
12862  __Pyx_RefNannyFinishContext();
12863  return __pyx_r;
12864  }
12865 
12866  /* Python wrapper */
12867  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12868  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 ";
12869  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12870  PyObject *__pyx_r = 0;
12871  __Pyx_RefNannyDeclarations
12872  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12873  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12874 
12875  /* function exit code */
12876  __Pyx_RefNannyFinishContext();
12877  return __pyx_r;
12878  }
12879 
12880  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12881  PyObject *__pyx_r = NULL;
12882  __Pyx_RefNannyDeclarations
12883  PyObject *__pyx_t_1 = NULL;
12884  int __pyx_lineno = 0;
12885  const char *__pyx_filename = NULL;
12886  int __pyx_clineno = 0;
12887  __Pyx_RefNannySetupContext("quad", 0);
12888  __Pyx_XDECREF(__pyx_r);
12889  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error)
12890  __Pyx_GOTREF(__pyx_t_1);
12891  __pyx_r = __pyx_t_1;
12892  __pyx_t_1 = 0;
12893  goto __pyx_L0;
12894 
12895  /* function exit code */
12896  __pyx_L1_error:;
12897  __Pyx_XDECREF(__pyx_t_1);
12898  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12899  __pyx_r = NULL;
12900  __pyx_L0:;
12901  __Pyx_XGIVEREF(__pyx_r);
12902  __Pyx_RefNannyFinishContext();
12903  return __pyx_r;
12904  }
12905 
12906  /* "PyClical.pyx":1461
12907  * return clifford(obj).quad()
12908  *
12909  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12910  * """
12911  * norm == sum of squares of coordinates.
12912  */
12913 
12914  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12915  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12916  PyObject *__pyx_r = NULL;
12917  __Pyx_RefNannyDeclarations
12918  PyObject *__pyx_t_1 = NULL;
12919  PyObject *__pyx_t_2 = NULL;
12920  PyObject *__pyx_t_3 = NULL;
12921  int __pyx_lineno = 0;
12922  const char *__pyx_filename = NULL;
12923  int __pyx_clineno = 0;
12924  __Pyx_RefNannySetupContext("norm", 0);
12925 
12926  /* "PyClical.pyx":1470
12927  * 4.0
12928  * """
12929  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12930  *
12931  * cpdef inline abs(obj):
12932  */
12933  __Pyx_XDECREF(__pyx_r);
12934  __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)
12935  __Pyx_GOTREF(__pyx_t_2);
12936  __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)
12937  __Pyx_GOTREF(__pyx_t_3);
12938  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12939  __pyx_t_2 = NULL;
12940  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12941  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12942  if (likely(__pyx_t_2)) {
12943  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12944  __Pyx_INCREF(__pyx_t_2);
12945  __Pyx_INCREF(function);
12946  __Pyx_DECREF_SET(__pyx_t_3, function);
12947  }
12948  }
12949  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12950  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12951  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error)
12952  __Pyx_GOTREF(__pyx_t_1);
12953  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12954  __pyx_r = __pyx_t_1;
12955  __pyx_t_1 = 0;
12956  goto __pyx_L0;
12957 
12958  /* "PyClical.pyx":1461
12959  * return clifford(obj).quad()
12960  *
12961  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12962  * """
12963  * norm == sum of squares of coordinates.
12964  */
12965 
12966  /* function exit code */
12967  __pyx_L1_error:;
12968  __Pyx_XDECREF(__pyx_t_1);
12969  __Pyx_XDECREF(__pyx_t_2);
12970  __Pyx_XDECREF(__pyx_t_3);
12971  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12972  __pyx_r = 0;
12973  __pyx_L0:;
12974  __Pyx_XGIVEREF(__pyx_r);
12975  __Pyx_RefNannyFinishContext();
12976  return __pyx_r;
12977  }
12978 
12979  /* Python wrapper */
12980  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12981  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 ";
12982  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12983  PyObject *__pyx_r = 0;
12984  __Pyx_RefNannyDeclarations
12985  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12986  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12987 
12988  /* function exit code */
12989  __Pyx_RefNannyFinishContext();
12990  return __pyx_r;
12991  }
12992 
12993  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12994  PyObject *__pyx_r = NULL;
12995  __Pyx_RefNannyDeclarations
12996  PyObject *__pyx_t_1 = NULL;
12997  int __pyx_lineno = 0;
12998  const char *__pyx_filename = NULL;
12999  int __pyx_clineno = 0;
13000  __Pyx_RefNannySetupContext("norm", 0);
13001  __Pyx_XDECREF(__pyx_r);
13002  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
13003  __Pyx_GOTREF(__pyx_t_1);
13004  __pyx_r = __pyx_t_1;
13005  __pyx_t_1 = 0;
13006  goto __pyx_L0;
13007 
13008  /* function exit code */
13009  __pyx_L1_error:;
13010  __Pyx_XDECREF(__pyx_t_1);
13011  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
13012  __pyx_r = NULL;
13013  __pyx_L0:;
13014  __Pyx_XGIVEREF(__pyx_r);
13015  __Pyx_RefNannyFinishContext();
13016  return __pyx_r;
13017  }
13018 
13019  /* "PyClical.pyx":1472
13020  * return clifford(obj).norm()
13021  *
13022  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
13023  * """
13024  * Absolute value of multivector: multivector 2-norm.
13025  */
13026 
13027  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13028  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13029  PyObject *__pyx_r = NULL;
13030  __Pyx_RefNannyDeclarations
13031  PyObject *__pyx_t_1 = NULL;
13032  int __pyx_lineno = 0;
13033  const char *__pyx_filename = NULL;
13034  int __pyx_clineno = 0;
13035  __Pyx_RefNannySetupContext("abs", 0);
13036 
13037  /* "PyClical.pyx":1479
13038  * 2.0
13039  * """
13040  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
13041  *
13042  * cpdef inline max_abs(obj):
13043  */
13044  __Pyx_XDECREF(__pyx_r);
13045  __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)
13046  __Pyx_GOTREF(__pyx_t_1);
13047  __pyx_r = __pyx_t_1;
13048  __pyx_t_1 = 0;
13049  goto __pyx_L0;
13050 
13051  /* "PyClical.pyx":1472
13052  * return clifford(obj).norm()
13053  *
13054  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
13055  * """
13056  * Absolute value of multivector: multivector 2-norm.
13057  */
13058 
13059  /* function exit code */
13060  __pyx_L1_error:;
13061  __Pyx_XDECREF(__pyx_t_1);
13062  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13063  __pyx_r = 0;
13064  __pyx_L0:;
13065  __Pyx_XGIVEREF(__pyx_r);
13066  __Pyx_RefNannyFinishContext();
13067  return __pyx_r;
13068  }
13069 
13070  /* Python wrapper */
13071  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13072  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 ";
13073  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13074  PyObject *__pyx_r = 0;
13075  __Pyx_RefNannyDeclarations
13076  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
13077  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
13078 
13079  /* function exit code */
13080  __Pyx_RefNannyFinishContext();
13081  return __pyx_r;
13082  }
13083 
13084  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13085  PyObject *__pyx_r = NULL;
13086  __Pyx_RefNannyDeclarations
13087  PyObject *__pyx_t_1 = NULL;
13088  int __pyx_lineno = 0;
13089  const char *__pyx_filename = NULL;
13090  int __pyx_clineno = 0;
13091  __Pyx_RefNannySetupContext("abs", 0);
13092  __Pyx_XDECREF(__pyx_r);
13093  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error)
13094  __Pyx_GOTREF(__pyx_t_1);
13095  __pyx_r = __pyx_t_1;
13096  __pyx_t_1 = 0;
13097  goto __pyx_L0;
13098 
13099  /* function exit code */
13100  __pyx_L1_error:;
13101  __Pyx_XDECREF(__pyx_t_1);
13102  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13103  __pyx_r = NULL;
13104  __pyx_L0:;
13105  __Pyx_XGIVEREF(__pyx_r);
13106  __Pyx_RefNannyFinishContext();
13107  return __pyx_r;
13108  }
13109 
13110  /* "PyClical.pyx":1481
13111  * return glucat.abs(toClifford(obj))
13112  *
13113  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
13114  * """
13115  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
13116  */
13117 
13118  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13119  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13120  PyObject *__pyx_r = NULL;
13121  __Pyx_RefNannyDeclarations
13122  PyObject *__pyx_t_1 = NULL;
13123  int __pyx_lineno = 0;
13124  const char *__pyx_filename = NULL;
13125  int __pyx_clineno = 0;
13126  __Pyx_RefNannySetupContext("max_abs", 0);
13127 
13128  /* "PyClical.pyx":1491
13129  *
13130  * """
13131  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
13132  *
13133  * cpdef inline pow(obj, m):
13134  */
13135  __Pyx_XDECREF(__pyx_r);
13136  __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)
13137  __Pyx_GOTREF(__pyx_t_1);
13138  __pyx_r = __pyx_t_1;
13139  __pyx_t_1 = 0;
13140  goto __pyx_L0;
13141 
13142  /* "PyClical.pyx":1481
13143  * return glucat.abs(toClifford(obj))
13144  *
13145  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
13146  * """
13147  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
13148  */
13149 
13150  /* function exit code */
13151  __pyx_L1_error:;
13152  __Pyx_XDECREF(__pyx_t_1);
13153  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13154  __pyx_r = 0;
13155  __pyx_L0:;
13156  __Pyx_XGIVEREF(__pyx_r);
13157  __Pyx_RefNannyFinishContext();
13158  return __pyx_r;
13159  }
13160 
13161  /* Python wrapper */
13162  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13163  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 ";
13164  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13165  PyObject *__pyx_r = 0;
13166  __Pyx_RefNannyDeclarations
13167  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
13168  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
13169 
13170  /* function exit code */
13171  __Pyx_RefNannyFinishContext();
13172  return __pyx_r;
13173  }
13174 
13175  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13176  PyObject *__pyx_r = NULL;
13177  __Pyx_RefNannyDeclarations
13178  PyObject *__pyx_t_1 = NULL;
13179  int __pyx_lineno = 0;
13180  const char *__pyx_filename = NULL;
13181  int __pyx_clineno = 0;
13182  __Pyx_RefNannySetupContext("max_abs", 0);
13183  __Pyx_XDECREF(__pyx_r);
13184  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
13185  __Pyx_GOTREF(__pyx_t_1);
13186  __pyx_r = __pyx_t_1;
13187  __pyx_t_1 = 0;
13188  goto __pyx_L0;
13189 
13190  /* function exit code */
13191  __pyx_L1_error:;
13192  __Pyx_XDECREF(__pyx_t_1);
13193  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13194  __pyx_r = NULL;
13195  __pyx_L0:;
13196  __Pyx_XGIVEREF(__pyx_r);
13197  __Pyx_RefNannyFinishContext();
13198  return __pyx_r;
13199  }
13200 
13201  /* "PyClical.pyx":1493
13202  * return glucat.max_abs(toClifford(obj))
13203  *
13204  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
13205  * """
13206  * Integer power of multivector: obj to the m.
13207  */
13208 
13209  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13210  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
13211  PyObject *__pyx_r = NULL;
13212  __Pyx_RefNannyDeclarations
13213  PyObject *__pyx_t_1 = NULL;
13214  PyObject *__pyx_t_2 = NULL;
13215  PyObject *__pyx_t_3 = NULL;
13216  PyObject *__pyx_t_4 = NULL;
13217  PyObject *__pyx_t_5 = NULL;
13218  PyObject *__pyx_t_6 = NULL;
13219  int __pyx_t_7;
13220  PyObject *__pyx_t_8 = NULL;
13221  PyObject *__pyx_t_9 = NULL;
13222  PyObject *__pyx_t_10 = NULL;
13223  int __pyx_lineno = 0;
13224  const char *__pyx_filename = NULL;
13225  int __pyx_clineno = 0;
13226  __Pyx_RefNannySetupContext("pow", 0);
13227 
13228  /* "PyClical.pyx":1512
13229  * 1
13230  * """
13231  * try: # <<<<<<<<<<<<<<
13232  * math.pow(obj, m)
13233  * except:
13234  */
13235  {
13236  __Pyx_PyThreadState_declare
13237  __Pyx_PyThreadState_assign
13238  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13239  __Pyx_XGOTREF(__pyx_t_1);
13240  __Pyx_XGOTREF(__pyx_t_2);
13241  __Pyx_XGOTREF(__pyx_t_3);
13242  /*try:*/ {
13243 
13244  /* "PyClical.pyx":1513
13245  * """
13246  * try:
13247  * math.pow(obj, m) # <<<<<<<<<<<<<<
13248  * except:
13249  * return clifford(obj).pow(m)
13250  */
13251  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1513, __pyx_L3_error)
13252  __Pyx_GOTREF(__pyx_t_5);
13253  __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)
13254  __Pyx_GOTREF(__pyx_t_6);
13255  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13256  __pyx_t_5 = NULL;
13257  __pyx_t_7 = 0;
13258  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13259  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13260  if (likely(__pyx_t_5)) {
13261  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13262  __Pyx_INCREF(__pyx_t_5);
13263  __Pyx_INCREF(function);
13264  __Pyx_DECREF_SET(__pyx_t_6, function);
13265  __pyx_t_7 = 1;
13266  }
13267  }
13268  #if CYTHON_FAST_PYCALL
13269  if (PyFunction_Check(__pyx_t_6)) {
13270  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
13271  __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)
13272  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13273  __Pyx_GOTREF(__pyx_t_4);
13274  } else
13275  #endif
13276  #if CYTHON_FAST_PYCCALL
13277  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13278  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
13279  __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)
13280  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13281  __Pyx_GOTREF(__pyx_t_4);
13282  } else
13283  #endif
13284  {
13285  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1513, __pyx_L3_error)
13286  __Pyx_GOTREF(__pyx_t_8);
13287  if (__pyx_t_5) {
13288  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
13289  }
13290  __Pyx_INCREF(__pyx_v_obj);
13291  __Pyx_GIVEREF(__pyx_v_obj);
13292  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
13293  __Pyx_INCREF(__pyx_v_m);
13294  __Pyx_GIVEREF(__pyx_v_m);
13295  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
13296  __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)
13297  __Pyx_GOTREF(__pyx_t_4);
13298  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13299  }
13300  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13301  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13302 
13303  /* "PyClical.pyx":1512
13304  * 1
13305  * """
13306  * try: # <<<<<<<<<<<<<<
13307  * math.pow(obj, m)
13308  * except:
13309  */
13310  }
13311  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13312  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13313  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13314  goto __pyx_L8_try_end;
13315  __pyx_L3_error:;
13316  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13317  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13318  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13319  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13320 
13321  /* "PyClical.pyx":1514
13322  * try:
13323  * math.pow(obj, m)
13324  * except: # <<<<<<<<<<<<<<
13325  * return clifford(obj).pow(m)
13326  *
13327  */
13328  /*except:*/ {
13329  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13330  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1514, __pyx_L5_except_error)
13331  __Pyx_GOTREF(__pyx_t_4);
13332  __Pyx_GOTREF(__pyx_t_6);
13333  __Pyx_GOTREF(__pyx_t_8);
13334 
13335  /* "PyClical.pyx":1515
13336  * math.pow(obj, m)
13337  * except:
13338  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
13339  *
13340  * cpdef inline outer_pow(obj, m):
13341  */
13342  __Pyx_XDECREF(__pyx_r);
13343  __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)
13344  __Pyx_GOTREF(__pyx_t_9);
13345  __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)
13346  __Pyx_GOTREF(__pyx_t_10);
13347  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13348  __pyx_t_9 = NULL;
13349  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
13350  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
13351  if (likely(__pyx_t_9)) {
13352  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
13353  __Pyx_INCREF(__pyx_t_9);
13354  __Pyx_INCREF(function);
13355  __Pyx_DECREF_SET(__pyx_t_10, function);
13356  }
13357  }
13358  __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);
13359  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13360  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L5_except_error)
13361  __Pyx_GOTREF(__pyx_t_5);
13362  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13363  __pyx_r = __pyx_t_5;
13364  __pyx_t_5 = 0;
13365  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13366  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13367  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13368  goto __pyx_L6_except_return;
13369  }
13370  __pyx_L5_except_error:;
13371 
13372  /* "PyClical.pyx":1512
13373  * 1
13374  * """
13375  * try: # <<<<<<<<<<<<<<
13376  * math.pow(obj, m)
13377  * except:
13378  */
13379  __Pyx_XGIVEREF(__pyx_t_1);
13380  __Pyx_XGIVEREF(__pyx_t_2);
13381  __Pyx_XGIVEREF(__pyx_t_3);
13382  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13383  goto __pyx_L1_error;
13384  __pyx_L6_except_return:;
13385  __Pyx_XGIVEREF(__pyx_t_1);
13386  __Pyx_XGIVEREF(__pyx_t_2);
13387  __Pyx_XGIVEREF(__pyx_t_3);
13388  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13389  goto __pyx_L0;
13390  __pyx_L8_try_end:;
13391  }
13392 
13393  /* "PyClical.pyx":1493
13394  * return glucat.max_abs(toClifford(obj))
13395  *
13396  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
13397  * """
13398  * Integer power of multivector: obj to the m.
13399  */
13400 
13401  /* function exit code */
13402  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13403  goto __pyx_L0;
13404  __pyx_L1_error:;
13405  __Pyx_XDECREF(__pyx_t_4);
13406  __Pyx_XDECREF(__pyx_t_5);
13407  __Pyx_XDECREF(__pyx_t_6);
13408  __Pyx_XDECREF(__pyx_t_8);
13409  __Pyx_XDECREF(__pyx_t_9);
13410  __Pyx_XDECREF(__pyx_t_10);
13411  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13412  __pyx_r = 0;
13413  __pyx_L0:;
13414  __Pyx_XGIVEREF(__pyx_r);
13415  __Pyx_RefNannyFinishContext();
13416  return __pyx_r;
13417  }
13418 
13419  /* Python wrapper */
13420  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13421  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 ";
13422  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13423  PyObject *__pyx_v_obj = 0;
13424  PyObject *__pyx_v_m = 0;
13425  int __pyx_lineno = 0;
13426  const char *__pyx_filename = NULL;
13427  int __pyx_clineno = 0;
13428  PyObject *__pyx_r = 0;
13429  __Pyx_RefNannyDeclarations
13430  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
13431  {
13432  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
13433  PyObject* values[2] = {0,0};
13434  if (unlikely(__pyx_kwds)) {
13435  Py_ssize_t kw_args;
13436  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13437  switch (pos_args) {
13438  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13439  CYTHON_FALLTHROUGH;
13440  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13441  CYTHON_FALLTHROUGH;
13442  case 0: break;
13443  default: goto __pyx_L5_argtuple_error;
13444  }
13445  kw_args = PyDict_Size(__pyx_kwds);
13446  switch (pos_args) {
13447  case 0:
13448  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13449  else goto __pyx_L5_argtuple_error;
13450  CYTHON_FALLTHROUGH;
13451  case 1:
13452  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13453  else {
13454  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1493, __pyx_L3_error)
13455  }
13456  }
13457  if (unlikely(kw_args > 0)) {
13458  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1493, __pyx_L3_error)
13459  }
13460  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13461  goto __pyx_L5_argtuple_error;
13462  } else {
13463  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13464  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13465  }
13466  __pyx_v_obj = values[0];
13467  __pyx_v_m = values[1];
13468  }
13469  goto __pyx_L4_argument_unpacking_done;
13470  __pyx_L5_argtuple_error:;
13471  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1493, __pyx_L3_error)
13472  __pyx_L3_error:;
13473  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13474  __Pyx_RefNannyFinishContext();
13475  return NULL;
13476  __pyx_L4_argument_unpacking_done:;
13477  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13478 
13479  /* function exit code */
13480  __Pyx_RefNannyFinishContext();
13481  return __pyx_r;
13482  }
13483 
13484  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13485  PyObject *__pyx_r = NULL;
13486  __Pyx_RefNannyDeclarations
13487  PyObject *__pyx_t_1 = NULL;
13488  int __pyx_lineno = 0;
13489  const char *__pyx_filename = NULL;
13490  int __pyx_clineno = 0;
13491  __Pyx_RefNannySetupContext("pow", 0);
13492  __Pyx_XDECREF(__pyx_r);
13493  __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)
13494  __Pyx_GOTREF(__pyx_t_1);
13495  __pyx_r = __pyx_t_1;
13496  __pyx_t_1 = 0;
13497  goto __pyx_L0;
13498 
13499  /* function exit code */
13500  __pyx_L1_error:;
13501  __Pyx_XDECREF(__pyx_t_1);
13502  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13503  __pyx_r = NULL;
13504  __pyx_L0:;
13505  __Pyx_XGIVEREF(__pyx_r);
13506  __Pyx_RefNannyFinishContext();
13507  return __pyx_r;
13508  }
13509 
13510  /* "PyClical.pyx":1517
13511  * return clifford(obj).pow(m)
13512  *
13513  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13514  * """
13515  * Outer product power of multivector.
13516  */
13517 
13518  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13519  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
13520  PyObject *__pyx_r = NULL;
13521  __Pyx_RefNannyDeclarations
13522  PyObject *__pyx_t_1 = NULL;
13523  PyObject *__pyx_t_2 = NULL;
13524  PyObject *__pyx_t_3 = NULL;
13525  int __pyx_lineno = 0;
13526  const char *__pyx_filename = NULL;
13527  int __pyx_clineno = 0;
13528  __Pyx_RefNannySetupContext("outer_pow", 0);
13529 
13530  /* "PyClical.pyx":1524
13531  * 1+3{1}+3{1,2}
13532  * """
13533  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
13534  *
13535  * cpdef inline complexifier(obj):
13536  */
13537  __Pyx_XDECREF(__pyx_r);
13538  __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)
13539  __Pyx_GOTREF(__pyx_t_2);
13540  __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)
13541  __Pyx_GOTREF(__pyx_t_3);
13542  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13543  __pyx_t_2 = NULL;
13544  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13545  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13546  if (likely(__pyx_t_2)) {
13547  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13548  __Pyx_INCREF(__pyx_t_2);
13549  __Pyx_INCREF(function);
13550  __Pyx_DECREF_SET(__pyx_t_3, function);
13551  }
13552  }
13553  __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);
13554  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13555  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error)
13556  __Pyx_GOTREF(__pyx_t_1);
13557  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13558  __pyx_r = __pyx_t_1;
13559  __pyx_t_1 = 0;
13560  goto __pyx_L0;
13561 
13562  /* "PyClical.pyx":1517
13563  * return clifford(obj).pow(m)
13564  *
13565  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13566  * """
13567  * Outer product power of multivector.
13568  */
13569 
13570  /* function exit code */
13571  __pyx_L1_error:;
13572  __Pyx_XDECREF(__pyx_t_1);
13573  __Pyx_XDECREF(__pyx_t_2);
13574  __Pyx_XDECREF(__pyx_t_3);
13575  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13576  __pyx_r = 0;
13577  __pyx_L0:;
13578  __Pyx_XGIVEREF(__pyx_r);
13579  __Pyx_RefNannyFinishContext();
13580  return __pyx_r;
13581  }
13582 
13583  /* Python wrapper */
13584  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13585  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 ";
13586  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13587  PyObject *__pyx_v_obj = 0;
13588  PyObject *__pyx_v_m = 0;
13589  int __pyx_lineno = 0;
13590  const char *__pyx_filename = NULL;
13591  int __pyx_clineno = 0;
13592  PyObject *__pyx_r = 0;
13593  __Pyx_RefNannyDeclarations
13594  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
13595  {
13596  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
13597  PyObject* values[2] = {0,0};
13598  if (unlikely(__pyx_kwds)) {
13599  Py_ssize_t kw_args;
13600  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13601  switch (pos_args) {
13602  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13603  CYTHON_FALLTHROUGH;
13604  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13605  CYTHON_FALLTHROUGH;
13606  case 0: break;
13607  default: goto __pyx_L5_argtuple_error;
13608  }
13609  kw_args = PyDict_Size(__pyx_kwds);
13610  switch (pos_args) {
13611  case 0:
13612  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13613  else goto __pyx_L5_argtuple_error;
13614  CYTHON_FALLTHROUGH;
13615  case 1:
13616  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13617  else {
13618  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1517, __pyx_L3_error)
13619  }
13620  }
13621  if (unlikely(kw_args > 0)) {
13622  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1517, __pyx_L3_error)
13623  }
13624  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13625  goto __pyx_L5_argtuple_error;
13626  } else {
13627  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13628  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13629  }
13630  __pyx_v_obj = values[0];
13631  __pyx_v_m = values[1];
13632  }
13633  goto __pyx_L4_argument_unpacking_done;
13634  __pyx_L5_argtuple_error:;
13635  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1517, __pyx_L3_error)
13636  __pyx_L3_error:;
13637  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13638  __Pyx_RefNannyFinishContext();
13639  return NULL;
13640  __pyx_L4_argument_unpacking_done:;
13641  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13642 
13643  /* function exit code */
13644  __Pyx_RefNannyFinishContext();
13645  return __pyx_r;
13646  }
13647 
13648  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13649  PyObject *__pyx_r = NULL;
13650  __Pyx_RefNannyDeclarations
13651  PyObject *__pyx_t_1 = NULL;
13652  int __pyx_lineno = 0;
13653  const char *__pyx_filename = NULL;
13654  int __pyx_clineno = 0;
13655  __Pyx_RefNannySetupContext("outer_pow", 0);
13656  __Pyx_XDECREF(__pyx_r);
13657  __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)
13658  __Pyx_GOTREF(__pyx_t_1);
13659  __pyx_r = __pyx_t_1;
13660  __pyx_t_1 = 0;
13661  goto __pyx_L0;
13662 
13663  /* function exit code */
13664  __pyx_L1_error:;
13665  __Pyx_XDECREF(__pyx_t_1);
13666  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13667  __pyx_r = NULL;
13668  __pyx_L0:;
13669  __Pyx_XGIVEREF(__pyx_r);
13670  __Pyx_RefNannyFinishContext();
13671  return __pyx_r;
13672  }
13673 
13674  /* "PyClical.pyx":1526
13675  * return clifford(obj).outer_pow(m)
13676  *
13677  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13678  * """
13679  * Square root of -1 which commutes with all members of the frame of the given multivector.
13680  */
13681 
13682  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13683  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13684  PyObject *__pyx_r = NULL;
13685  __Pyx_RefNannyDeclarations
13686  PyObject *__pyx_t_1 = NULL;
13687  PyObject *__pyx_t_2 = NULL;
13688  int __pyx_lineno = 0;
13689  const char *__pyx_filename = NULL;
13690  int __pyx_clineno = 0;
13691  __Pyx_RefNannySetupContext("complexifier", 0);
13692 
13693  /* "PyClical.pyx":1539
13694  * {-1}
13695  * """
13696  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13697  *
13698  * cpdef inline sqrt(obj, i = None):
13699  */
13700  __Pyx_XDECREF(__pyx_r);
13701  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L1_error)
13702  __Pyx_GOTREF(__pyx_t_1);
13703  __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)
13704  __Pyx_GOTREF(__pyx_t_2);
13705  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13706  __pyx_r = __pyx_t_2;
13707  __pyx_t_2 = 0;
13708  goto __pyx_L0;
13709 
13710  /* "PyClical.pyx":1526
13711  * return clifford(obj).outer_pow(m)
13712  *
13713  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13714  * """
13715  * Square root of -1 which commutes with all members of the frame of the given multivector.
13716  */
13717 
13718  /* function exit code */
13719  __pyx_L1_error:;
13720  __Pyx_XDECREF(__pyx_t_1);
13721  __Pyx_XDECREF(__pyx_t_2);
13722  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13723  __pyx_r = 0;
13724  __pyx_L0:;
13725  __Pyx_XGIVEREF(__pyx_r);
13726  __Pyx_RefNannyFinishContext();
13727  return __pyx_r;
13728  }
13729 
13730  /* Python wrapper */
13731  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13732  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 ";
13733  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13734  PyObject *__pyx_r = 0;
13735  __Pyx_RefNannyDeclarations
13736  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13737  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13738 
13739  /* function exit code */
13740  __Pyx_RefNannyFinishContext();
13741  return __pyx_r;
13742  }
13743 
13744  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13745  PyObject *__pyx_r = NULL;
13746  __Pyx_RefNannyDeclarations
13747  PyObject *__pyx_t_1 = NULL;
13748  int __pyx_lineno = 0;
13749  const char *__pyx_filename = NULL;
13750  int __pyx_clineno = 0;
13751  __Pyx_RefNannySetupContext("complexifier", 0);
13752  __Pyx_XDECREF(__pyx_r);
13753  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error)
13754  __Pyx_GOTREF(__pyx_t_1);
13755  __pyx_r = __pyx_t_1;
13756  __pyx_t_1 = 0;
13757  goto __pyx_L0;
13758 
13759  /* function exit code */
13760  __pyx_L1_error:;
13761  __Pyx_XDECREF(__pyx_t_1);
13762  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13763  __pyx_r = NULL;
13764  __pyx_L0:;
13765  __Pyx_XGIVEREF(__pyx_r);
13766  __Pyx_RefNannyFinishContext();
13767  return __pyx_r;
13768  }
13769 
13770  /* "PyClical.pyx":1541
13771  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13772  *
13773  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13774  * """
13775  * Square root of multivector with optional complexifier.
13776  */
13777 
13778  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13779  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) {
13780  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13781  PyObject *__pyx_r = NULL;
13782  __Pyx_RefNannyDeclarations
13783  int __pyx_t_1;
13784  int __pyx_t_2;
13785  PyObject *__pyx_t_3 = NULL;
13786  Clifford __pyx_t_4;
13787  PyObject *__pyx_t_5 = NULL;
13788  PyObject *__pyx_t_6 = NULL;
13789  PyObject *__pyx_t_7 = NULL;
13790  PyObject *__pyx_t_8 = NULL;
13791  PyObject *__pyx_t_9 = NULL;
13792  PyObject *__pyx_t_10 = NULL;
13793  PyObject *__pyx_t_11 = NULL;
13794  int __pyx_lineno = 0;
13795  const char *__pyx_filename = NULL;
13796  int __pyx_clineno = 0;
13797  __Pyx_RefNannySetupContext("sqrt", 0);
13798  if (__pyx_optional_args) {
13799  if (__pyx_optional_args->__pyx_n > 0) {
13800  __pyx_v_i = __pyx_optional_args->i;
13801  }
13802  }
13803 
13804  /* "PyClical.pyx":1556
13805  * -1
13806  * """
13807  * if not (i is None): # <<<<<<<<<<<<<<
13808  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13809  * else:
13810  */
13811  __pyx_t_1 = (__pyx_v_i != Py_None);
13812  __pyx_t_2 = (__pyx_t_1 != 0);
13813  if (__pyx_t_2) {
13814 
13815  /* "PyClical.pyx":1557
13816  * """
13817  * if not (i is None):
13818  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13819  * else:
13820  * try:
13821  */
13822  __Pyx_XDECREF(__pyx_r);
13823  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error)
13824  __Pyx_GOTREF(__pyx_t_3);
13825  try {
13826  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13827  } catch(...) {
13828  __Pyx_CppExn2PyErr();
13829  __PYX_ERR(0, 1557, __pyx_L1_error)
13830  }
13831  __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)
13832  __Pyx_GOTREF(__pyx_t_5);
13833  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13834  __pyx_r = __pyx_t_5;
13835  __pyx_t_5 = 0;
13836  goto __pyx_L0;
13837 
13838  /* "PyClical.pyx":1556
13839  * -1
13840  * """
13841  * if not (i is None): # <<<<<<<<<<<<<<
13842  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13843  * else:
13844  */
13845  }
13846 
13847  /* "PyClical.pyx":1559
13848  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13849  * else:
13850  * try: # <<<<<<<<<<<<<<
13851  * return math.sqrt(obj)
13852  * except:
13853  */
13854  /*else*/ {
13855  {
13856  __Pyx_PyThreadState_declare
13857  __Pyx_PyThreadState_assign
13858  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13859  __Pyx_XGOTREF(__pyx_t_6);
13860  __Pyx_XGOTREF(__pyx_t_7);
13861  __Pyx_XGOTREF(__pyx_t_8);
13862  /*try:*/ {
13863 
13864  /* "PyClical.pyx":1560
13865  * else:
13866  * try:
13867  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13868  * except:
13869  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13870  */
13871  __Pyx_XDECREF(__pyx_r);
13872  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L4_error)
13873  __Pyx_GOTREF(__pyx_t_3);
13874  __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)
13875  __Pyx_GOTREF(__pyx_t_9);
13876  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13877  __pyx_t_3 = NULL;
13878  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13879  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13880  if (likely(__pyx_t_3)) {
13881  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13882  __Pyx_INCREF(__pyx_t_3);
13883  __Pyx_INCREF(function);
13884  __Pyx_DECREF_SET(__pyx_t_9, function);
13885  }
13886  }
13887  __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);
13888  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13889  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1560, __pyx_L4_error)
13890  __Pyx_GOTREF(__pyx_t_5);
13891  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13892  __pyx_r = __pyx_t_5;
13893  __pyx_t_5 = 0;
13894  goto __pyx_L8_try_return;
13895 
13896  /* "PyClical.pyx":1559
13897  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13898  * else:
13899  * try: # <<<<<<<<<<<<<<
13900  * return math.sqrt(obj)
13901  * except:
13902  */
13903  }
13904  __pyx_L4_error:;
13905  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13906  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13907  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13908 
13909  /* "PyClical.pyx":1561
13910  * try:
13911  * return math.sqrt(obj)
13912  * except: # <<<<<<<<<<<<<<
13913  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13914  *
13915  */
13916  /*except:*/ {
13917  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13918  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1561, __pyx_L6_except_error)
13919  __Pyx_GOTREF(__pyx_t_5);
13920  __Pyx_GOTREF(__pyx_t_9);
13921  __Pyx_GOTREF(__pyx_t_3);
13922 
13923  /* "PyClical.pyx":1562
13924  * return math.sqrt(obj)
13925  * except:
13926  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13927  *
13928  * cpdef inline exp(obj):
13929  */
13930  __Pyx_XDECREF(__pyx_r);
13931  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13932  __Pyx_GOTREF(__pyx_t_10);
13933  __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)
13934  __Pyx_GOTREF(__pyx_t_11);
13935  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13936  __pyx_r = __pyx_t_11;
13937  __pyx_t_11 = 0;
13938  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13939  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13940  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13941  goto __pyx_L7_except_return;
13942  }
13943  __pyx_L6_except_error:;
13944 
13945  /* "PyClical.pyx":1559
13946  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13947  * else:
13948  * try: # <<<<<<<<<<<<<<
13949  * return math.sqrt(obj)
13950  * except:
13951  */
13952  __Pyx_XGIVEREF(__pyx_t_6);
13953  __Pyx_XGIVEREF(__pyx_t_7);
13954  __Pyx_XGIVEREF(__pyx_t_8);
13955  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13956  goto __pyx_L1_error;
13957  __pyx_L8_try_return:;
13958  __Pyx_XGIVEREF(__pyx_t_6);
13959  __Pyx_XGIVEREF(__pyx_t_7);
13960  __Pyx_XGIVEREF(__pyx_t_8);
13961  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13962  goto __pyx_L0;
13963  __pyx_L7_except_return:;
13964  __Pyx_XGIVEREF(__pyx_t_6);
13965  __Pyx_XGIVEREF(__pyx_t_7);
13966  __Pyx_XGIVEREF(__pyx_t_8);
13967  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13968  goto __pyx_L0;
13969  }
13970  }
13971 
13972  /* "PyClical.pyx":1541
13973  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13974  *
13975  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13976  * """
13977  * Square root of multivector with optional complexifier.
13978  */
13979 
13980  /* function exit code */
13981  __pyx_L1_error:;
13982  __Pyx_XDECREF(__pyx_t_3);
13983  __Pyx_XDECREF(__pyx_t_5);
13984  __Pyx_XDECREF(__pyx_t_9);
13985  __Pyx_XDECREF(__pyx_t_10);
13986  __Pyx_XDECREF(__pyx_t_11);
13987  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13988  __pyx_r = 0;
13989  __pyx_L0:;
13990  __Pyx_XGIVEREF(__pyx_r);
13991  __Pyx_RefNannyFinishContext();
13992  return __pyx_r;
13993  }
13994 
13995  /* Python wrapper */
13996  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13997  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 ";
13998  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13999  PyObject *__pyx_v_obj = 0;
14000  PyObject *__pyx_v_i = 0;
14001  int __pyx_lineno = 0;
14002  const char *__pyx_filename = NULL;
14003  int __pyx_clineno = 0;
14004  PyObject *__pyx_r = 0;
14005  __Pyx_RefNannyDeclarations
14006  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
14007  {
14008  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14009  PyObject* values[2] = {0,0};
14010  values[1] = ((PyObject *)Py_None);
14011  if (unlikely(__pyx_kwds)) {
14012  Py_ssize_t kw_args;
14013  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14014  switch (pos_args) {
14015  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14016  CYTHON_FALLTHROUGH;
14017  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14018  CYTHON_FALLTHROUGH;
14019  case 0: break;
14020  default: goto __pyx_L5_argtuple_error;
14021  }
14022  kw_args = PyDict_Size(__pyx_kwds);
14023  switch (pos_args) {
14024  case 0:
14025  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14026  else goto __pyx_L5_argtuple_error;
14027  CYTHON_FALLTHROUGH;
14028  case 1:
14029  if (kw_args > 0) {
14030  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14031  if (value) { values[1] = value; kw_args--; }
14032  }
14033  }
14034  if (unlikely(kw_args > 0)) {
14035  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1541, __pyx_L3_error)
14036  }
14037  } else {
14038  switch (PyTuple_GET_SIZE(__pyx_args)) {
14039  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14040  CYTHON_FALLTHROUGH;
14041  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14042  break;
14043  default: goto __pyx_L5_argtuple_error;
14044  }
14045  }
14046  __pyx_v_obj = values[0];
14047  __pyx_v_i = values[1];
14048  }
14049  goto __pyx_L4_argument_unpacking_done;
14050  __pyx_L5_argtuple_error:;
14051  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1541, __pyx_L3_error)
14052  __pyx_L3_error:;
14053  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14054  __Pyx_RefNannyFinishContext();
14055  return NULL;
14056  __pyx_L4_argument_unpacking_done:;
14057  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
14058 
14059  /* function exit code */
14060  __Pyx_RefNannyFinishContext();
14061  return __pyx_r;
14062  }
14063 
14064  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14065  PyObject *__pyx_r = NULL;
14066  __Pyx_RefNannyDeclarations
14067  PyObject *__pyx_t_1 = NULL;
14068  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
14069  int __pyx_lineno = 0;
14070  const char *__pyx_filename = NULL;
14071  int __pyx_clineno = 0;
14072  __Pyx_RefNannySetupContext("sqrt", 0);
14073  __Pyx_XDECREF(__pyx_r);
14074  __pyx_t_2.__pyx_n = 1;
14075  __pyx_t_2.i = __pyx_v_i;
14076  __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)
14077  __Pyx_GOTREF(__pyx_t_1);
14078  __pyx_r = __pyx_t_1;
14079  __pyx_t_1 = 0;
14080  goto __pyx_L0;
14081 
14082  /* function exit code */
14083  __pyx_L1_error:;
14084  __Pyx_XDECREF(__pyx_t_1);
14085  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14086  __pyx_r = NULL;
14087  __pyx_L0:;
14088  __Pyx_XGIVEREF(__pyx_r);
14089  __Pyx_RefNannyFinishContext();
14090  return __pyx_r;
14091  }
14092 
14093  /* "PyClical.pyx":1564
14094  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
14095  *
14096  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
14097  * """
14098  * Exponential of multivector.
14099  */
14100 
14101  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14102  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14103  PyObject *__pyx_r = NULL;
14104  __Pyx_RefNannyDeclarations
14105  PyObject *__pyx_t_1 = NULL;
14106  PyObject *__pyx_t_2 = NULL;
14107  PyObject *__pyx_t_3 = NULL;
14108  PyObject *__pyx_t_4 = NULL;
14109  PyObject *__pyx_t_5 = NULL;
14110  PyObject *__pyx_t_6 = NULL;
14111  PyObject *__pyx_t_7 = NULL;
14112  PyObject *__pyx_t_8 = NULL;
14113  int __pyx_lineno = 0;
14114  const char *__pyx_filename = NULL;
14115  int __pyx_clineno = 0;
14116  __Pyx_RefNannySetupContext("exp", 0);
14117 
14118  /* "PyClical.pyx":1573
14119  * {1,2}
14120  * """
14121  * try: # <<<<<<<<<<<<<<
14122  * return math.exp(obj)
14123  * except:
14124  */
14125  {
14126  __Pyx_PyThreadState_declare
14127  __Pyx_PyThreadState_assign
14128  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14129  __Pyx_XGOTREF(__pyx_t_1);
14130  __Pyx_XGOTREF(__pyx_t_2);
14131  __Pyx_XGOTREF(__pyx_t_3);
14132  /*try:*/ {
14133 
14134  /* "PyClical.pyx":1574
14135  * """
14136  * try:
14137  * return math.exp(obj) # <<<<<<<<<<<<<<
14138  * except:
14139  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14140  */
14141  __Pyx_XDECREF(__pyx_r);
14142  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1574, __pyx_L3_error)
14143  __Pyx_GOTREF(__pyx_t_5);
14144  __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)
14145  __Pyx_GOTREF(__pyx_t_6);
14146  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14147  __pyx_t_5 = NULL;
14148  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14149  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14150  if (likely(__pyx_t_5)) {
14151  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14152  __Pyx_INCREF(__pyx_t_5);
14153  __Pyx_INCREF(function);
14154  __Pyx_DECREF_SET(__pyx_t_6, function);
14155  }
14156  }
14157  __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);
14158  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14159  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1574, __pyx_L3_error)
14160  __Pyx_GOTREF(__pyx_t_4);
14161  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14162  __pyx_r = __pyx_t_4;
14163  __pyx_t_4 = 0;
14164  goto __pyx_L7_try_return;
14165 
14166  /* "PyClical.pyx":1573
14167  * {1,2}
14168  * """
14169  * try: # <<<<<<<<<<<<<<
14170  * return math.exp(obj)
14171  * except:
14172  */
14173  }
14174  __pyx_L3_error:;
14175  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14176  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14177  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14178 
14179  /* "PyClical.pyx":1575
14180  * try:
14181  * return math.exp(obj)
14182  * except: # <<<<<<<<<<<<<<
14183  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14184  *
14185  */
14186  /*except:*/ {
14187  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
14188  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1575, __pyx_L5_except_error)
14189  __Pyx_GOTREF(__pyx_t_4);
14190  __Pyx_GOTREF(__pyx_t_6);
14191  __Pyx_GOTREF(__pyx_t_5);
14192 
14193  /* "PyClical.pyx":1576
14194  * return math.exp(obj)
14195  * except:
14196  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
14197  *
14198  * cpdef inline log(obj,i = None):
14199  */
14200  __Pyx_XDECREF(__pyx_r);
14201  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1576, __pyx_L5_except_error)
14202  __Pyx_GOTREF(__pyx_t_7);
14203  __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)
14204  __Pyx_GOTREF(__pyx_t_8);
14205  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14206  __pyx_r = __pyx_t_8;
14207  __pyx_t_8 = 0;
14208  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14209  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14210  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14211  goto __pyx_L6_except_return;
14212  }
14213  __pyx_L5_except_error:;
14214 
14215  /* "PyClical.pyx":1573
14216  * {1,2}
14217  * """
14218  * try: # <<<<<<<<<<<<<<
14219  * return math.exp(obj)
14220  * except:
14221  */
14222  __Pyx_XGIVEREF(__pyx_t_1);
14223  __Pyx_XGIVEREF(__pyx_t_2);
14224  __Pyx_XGIVEREF(__pyx_t_3);
14225  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14226  goto __pyx_L1_error;
14227  __pyx_L7_try_return:;
14228  __Pyx_XGIVEREF(__pyx_t_1);
14229  __Pyx_XGIVEREF(__pyx_t_2);
14230  __Pyx_XGIVEREF(__pyx_t_3);
14231  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14232  goto __pyx_L0;
14233  __pyx_L6_except_return:;
14234  __Pyx_XGIVEREF(__pyx_t_1);
14235  __Pyx_XGIVEREF(__pyx_t_2);
14236  __Pyx_XGIVEREF(__pyx_t_3);
14237  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14238  goto __pyx_L0;
14239  }
14240 
14241  /* "PyClical.pyx":1564
14242  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
14243  *
14244  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
14245  * """
14246  * Exponential of multivector.
14247  */
14248 
14249  /* function exit code */
14250  __pyx_L1_error:;
14251  __Pyx_XDECREF(__pyx_t_4);
14252  __Pyx_XDECREF(__pyx_t_5);
14253  __Pyx_XDECREF(__pyx_t_6);
14254  __Pyx_XDECREF(__pyx_t_7);
14255  __Pyx_XDECREF(__pyx_t_8);
14256  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
14257  __pyx_r = 0;
14258  __pyx_L0:;
14259  __Pyx_XGIVEREF(__pyx_r);
14260  __Pyx_RefNannyFinishContext();
14261  return __pyx_r;
14262  }
14263 
14264  /* Python wrapper */
14265  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14266  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 ";
14267  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14268  PyObject *__pyx_r = 0;
14269  __Pyx_RefNannyDeclarations
14270  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
14271  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
14272 
14273  /* function exit code */
14274  __Pyx_RefNannyFinishContext();
14275  return __pyx_r;
14276  }
14277 
14278  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14279  PyObject *__pyx_r = NULL;
14280  __Pyx_RefNannyDeclarations
14281  PyObject *__pyx_t_1 = NULL;
14282  int __pyx_lineno = 0;
14283  const char *__pyx_filename = NULL;
14284  int __pyx_clineno = 0;
14285  __Pyx_RefNannySetupContext("exp", 0);
14286  __Pyx_XDECREF(__pyx_r);
14287  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error)
14288  __Pyx_GOTREF(__pyx_t_1);
14289  __pyx_r = __pyx_t_1;
14290  __pyx_t_1 = 0;
14291  goto __pyx_L0;
14292 
14293  /* function exit code */
14294  __pyx_L1_error:;
14295  __Pyx_XDECREF(__pyx_t_1);
14296  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
14297  __pyx_r = NULL;
14298  __pyx_L0:;
14299  __Pyx_XGIVEREF(__pyx_r);
14300  __Pyx_RefNannyFinishContext();
14301  return __pyx_r;
14302  }
14303 
14304  /* "PyClical.pyx":1578
14305  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14306  *
14307  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
14308  * """
14309  * Natural logarithm of multivector with optional complexifier.
14310  */
14311 
14312  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14313  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) {
14314  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14315  PyObject *__pyx_r = NULL;
14316  __Pyx_RefNannyDeclarations
14317  int __pyx_t_1;
14318  int __pyx_t_2;
14319  PyObject *__pyx_t_3 = NULL;
14320  Clifford __pyx_t_4;
14321  PyObject *__pyx_t_5 = NULL;
14322  PyObject *__pyx_t_6 = NULL;
14323  PyObject *__pyx_t_7 = NULL;
14324  PyObject *__pyx_t_8 = NULL;
14325  PyObject *__pyx_t_9 = NULL;
14326  PyObject *__pyx_t_10 = NULL;
14327  PyObject *__pyx_t_11 = NULL;
14328  int __pyx_lineno = 0;
14329  const char *__pyx_filename = NULL;
14330  int __pyx_clineno = 0;
14331  __Pyx_RefNannySetupContext("log", 0);
14332  if (__pyx_optional_args) {
14333  if (__pyx_optional_args->__pyx_n > 0) {
14334  __pyx_v_i = __pyx_optional_args->i;
14335  }
14336  }
14337 
14338  /* "PyClical.pyx":1593
14339  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
14340  * """
14341  * if not (i is None): # <<<<<<<<<<<<<<
14342  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14343  * else:
14344  */
14345  __pyx_t_1 = (__pyx_v_i != Py_None);
14346  __pyx_t_2 = (__pyx_t_1 != 0);
14347  if (__pyx_t_2) {
14348 
14349  /* "PyClical.pyx":1594
14350  * """
14351  * if not (i is None):
14352  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14353  * else:
14354  * try:
14355  */
14356  __Pyx_XDECREF(__pyx_r);
14357  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error)
14358  __Pyx_GOTREF(__pyx_t_3);
14359  try {
14360  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14361  } catch(...) {
14362  __Pyx_CppExn2PyErr();
14363  __PYX_ERR(0, 1594, __pyx_L1_error)
14364  }
14365  __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)
14366  __Pyx_GOTREF(__pyx_t_5);
14367  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14368  __pyx_r = __pyx_t_5;
14369  __pyx_t_5 = 0;
14370  goto __pyx_L0;
14371 
14372  /* "PyClical.pyx":1593
14373  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
14374  * """
14375  * if not (i is None): # <<<<<<<<<<<<<<
14376  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14377  * else:
14378  */
14379  }
14380 
14381  /* "PyClical.pyx":1596
14382  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14383  * else:
14384  * try: # <<<<<<<<<<<<<<
14385  * return math.log(obj)
14386  * except:
14387  */
14388  /*else*/ {
14389  {
14390  __Pyx_PyThreadState_declare
14391  __Pyx_PyThreadState_assign
14392  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14393  __Pyx_XGOTREF(__pyx_t_6);
14394  __Pyx_XGOTREF(__pyx_t_7);
14395  __Pyx_XGOTREF(__pyx_t_8);
14396  /*try:*/ {
14397 
14398  /* "PyClical.pyx":1597
14399  * else:
14400  * try:
14401  * return math.log(obj) # <<<<<<<<<<<<<<
14402  * except:
14403  * return clifford().wrap( glucat.log(toClifford(obj)) )
14404  */
14405  __Pyx_XDECREF(__pyx_r);
14406  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L4_error)
14407  __Pyx_GOTREF(__pyx_t_3);
14408  __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)
14409  __Pyx_GOTREF(__pyx_t_9);
14410  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14411  __pyx_t_3 = NULL;
14412  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14413  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14414  if (likely(__pyx_t_3)) {
14415  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14416  __Pyx_INCREF(__pyx_t_3);
14417  __Pyx_INCREF(function);
14418  __Pyx_DECREF_SET(__pyx_t_9, function);
14419  }
14420  }
14421  __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);
14422  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14423  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1597, __pyx_L4_error)
14424  __Pyx_GOTREF(__pyx_t_5);
14425  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14426  __pyx_r = __pyx_t_5;
14427  __pyx_t_5 = 0;
14428  goto __pyx_L8_try_return;
14429 
14430  /* "PyClical.pyx":1596
14431  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14432  * else:
14433  * try: # <<<<<<<<<<<<<<
14434  * return math.log(obj)
14435  * except:
14436  */
14437  }
14438  __pyx_L4_error:;
14439  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14440  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14441  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14442 
14443  /* "PyClical.pyx":1598
14444  * try:
14445  * return math.log(obj)
14446  * except: # <<<<<<<<<<<<<<
14447  * return clifford().wrap( glucat.log(toClifford(obj)) )
14448  *
14449  */
14450  /*except:*/ {
14451  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14452  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1598, __pyx_L6_except_error)
14453  __Pyx_GOTREF(__pyx_t_5);
14454  __Pyx_GOTREF(__pyx_t_9);
14455  __Pyx_GOTREF(__pyx_t_3);
14456 
14457  /* "PyClical.pyx":1599
14458  * return math.log(obj)
14459  * except:
14460  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
14461  *
14462  * cpdef inline cos(obj,i = None):
14463  */
14464  __Pyx_XDECREF(__pyx_r);
14465  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1599, __pyx_L6_except_error)
14466  __Pyx_GOTREF(__pyx_t_10);
14467  __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)
14468  __Pyx_GOTREF(__pyx_t_11);
14469  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14470  __pyx_r = __pyx_t_11;
14471  __pyx_t_11 = 0;
14472  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14473  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14474  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14475  goto __pyx_L7_except_return;
14476  }
14477  __pyx_L6_except_error:;
14478 
14479  /* "PyClical.pyx":1596
14480  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14481  * else:
14482  * try: # <<<<<<<<<<<<<<
14483  * return math.log(obj)
14484  * except:
14485  */
14486  __Pyx_XGIVEREF(__pyx_t_6);
14487  __Pyx_XGIVEREF(__pyx_t_7);
14488  __Pyx_XGIVEREF(__pyx_t_8);
14489  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14490  goto __pyx_L1_error;
14491  __pyx_L8_try_return:;
14492  __Pyx_XGIVEREF(__pyx_t_6);
14493  __Pyx_XGIVEREF(__pyx_t_7);
14494  __Pyx_XGIVEREF(__pyx_t_8);
14495  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14496  goto __pyx_L0;
14497  __pyx_L7_except_return:;
14498  __Pyx_XGIVEREF(__pyx_t_6);
14499  __Pyx_XGIVEREF(__pyx_t_7);
14500  __Pyx_XGIVEREF(__pyx_t_8);
14501  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14502  goto __pyx_L0;
14503  }
14504  }
14505 
14506  /* "PyClical.pyx":1578
14507  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14508  *
14509  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
14510  * """
14511  * Natural logarithm of multivector with optional complexifier.
14512  */
14513 
14514  /* function exit code */
14515  __pyx_L1_error:;
14516  __Pyx_XDECREF(__pyx_t_3);
14517  __Pyx_XDECREF(__pyx_t_5);
14518  __Pyx_XDECREF(__pyx_t_9);
14519  __Pyx_XDECREF(__pyx_t_10);
14520  __Pyx_XDECREF(__pyx_t_11);
14521  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14522  __pyx_r = 0;
14523  __pyx_L0:;
14524  __Pyx_XGIVEREF(__pyx_r);
14525  __Pyx_RefNannyFinishContext();
14526  return __pyx_r;
14527  }
14528 
14529  /* Python wrapper */
14530  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14531  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 ";
14532  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14533  PyObject *__pyx_v_obj = 0;
14534  PyObject *__pyx_v_i = 0;
14535  int __pyx_lineno = 0;
14536  const char *__pyx_filename = NULL;
14537  int __pyx_clineno = 0;
14538  PyObject *__pyx_r = 0;
14539  __Pyx_RefNannyDeclarations
14540  __Pyx_RefNannySetupContext("log (wrapper)", 0);
14541  {
14542  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14543  PyObject* values[2] = {0,0};
14544  values[1] = ((PyObject *)Py_None);
14545  if (unlikely(__pyx_kwds)) {
14546  Py_ssize_t kw_args;
14547  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14548  switch (pos_args) {
14549  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14550  CYTHON_FALLTHROUGH;
14551  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14552  CYTHON_FALLTHROUGH;
14553  case 0: break;
14554  default: goto __pyx_L5_argtuple_error;
14555  }
14556  kw_args = PyDict_Size(__pyx_kwds);
14557  switch (pos_args) {
14558  case 0:
14559  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14560  else goto __pyx_L5_argtuple_error;
14561  CYTHON_FALLTHROUGH;
14562  case 1:
14563  if (kw_args > 0) {
14564  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14565  if (value) { values[1] = value; kw_args--; }
14566  }
14567  }
14568  if (unlikely(kw_args > 0)) {
14569  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1578, __pyx_L3_error)
14570  }
14571  } else {
14572  switch (PyTuple_GET_SIZE(__pyx_args)) {
14573  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14574  CYTHON_FALLTHROUGH;
14575  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14576  break;
14577  default: goto __pyx_L5_argtuple_error;
14578  }
14579  }
14580  __pyx_v_obj = values[0];
14581  __pyx_v_i = values[1];
14582  }
14583  goto __pyx_L4_argument_unpacking_done;
14584  __pyx_L5_argtuple_error:;
14585  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1578, __pyx_L3_error)
14586  __pyx_L3_error:;
14587  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14588  __Pyx_RefNannyFinishContext();
14589  return NULL;
14590  __pyx_L4_argument_unpacking_done:;
14591  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
14592 
14593  /* function exit code */
14594  __Pyx_RefNannyFinishContext();
14595  return __pyx_r;
14596  }
14597 
14598  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14599  PyObject *__pyx_r = NULL;
14600  __Pyx_RefNannyDeclarations
14601  PyObject *__pyx_t_1 = NULL;
14602  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
14603  int __pyx_lineno = 0;
14604  const char *__pyx_filename = NULL;
14605  int __pyx_clineno = 0;
14606  __Pyx_RefNannySetupContext("log", 0);
14607  __Pyx_XDECREF(__pyx_r);
14608  __pyx_t_2.__pyx_n = 1;
14609  __pyx_t_2.i = __pyx_v_i;
14610  __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)
14611  __Pyx_GOTREF(__pyx_t_1);
14612  __pyx_r = __pyx_t_1;
14613  __pyx_t_1 = 0;
14614  goto __pyx_L0;
14615 
14616  /* function exit code */
14617  __pyx_L1_error:;
14618  __Pyx_XDECREF(__pyx_t_1);
14619  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14620  __pyx_r = NULL;
14621  __pyx_L0:;
14622  __Pyx_XGIVEREF(__pyx_r);
14623  __Pyx_RefNannyFinishContext();
14624  return __pyx_r;
14625  }
14626 
14627  /* "PyClical.pyx":1601
14628  * return clifford().wrap( glucat.log(toClifford(obj)) )
14629  *
14630  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14631  * """
14632  * Cosine of multivector with optional complexifier.
14633  */
14634 
14635  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14636  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) {
14637  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14638  PyObject *__pyx_r = NULL;
14639  __Pyx_RefNannyDeclarations
14640  int __pyx_t_1;
14641  int __pyx_t_2;
14642  PyObject *__pyx_t_3 = NULL;
14643  Clifford __pyx_t_4;
14644  PyObject *__pyx_t_5 = NULL;
14645  PyObject *__pyx_t_6 = NULL;
14646  PyObject *__pyx_t_7 = NULL;
14647  PyObject *__pyx_t_8 = NULL;
14648  PyObject *__pyx_t_9 = NULL;
14649  PyObject *__pyx_t_10 = NULL;
14650  PyObject *__pyx_t_11 = NULL;
14651  int __pyx_lineno = 0;
14652  const char *__pyx_filename = NULL;
14653  int __pyx_clineno = 0;
14654  __Pyx_RefNannySetupContext("cos", 0);
14655  if (__pyx_optional_args) {
14656  if (__pyx_optional_args->__pyx_n > 0) {
14657  __pyx_v_i = __pyx_optional_args->i;
14658  }
14659  }
14660 
14661  /* "PyClical.pyx":1610
14662  * {1,2}
14663  * """
14664  * if not (i is None): # <<<<<<<<<<<<<<
14665  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14666  * else:
14667  */
14668  __pyx_t_1 = (__pyx_v_i != Py_None);
14669  __pyx_t_2 = (__pyx_t_1 != 0);
14670  if (__pyx_t_2) {
14671 
14672  /* "PyClical.pyx":1611
14673  * """
14674  * if not (i is None):
14675  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14676  * else:
14677  * try:
14678  */
14679  __Pyx_XDECREF(__pyx_r);
14680  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1611, __pyx_L1_error)
14681  __Pyx_GOTREF(__pyx_t_3);
14682  try {
14683  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14684  } catch(...) {
14685  __Pyx_CppExn2PyErr();
14686  __PYX_ERR(0, 1611, __pyx_L1_error)
14687  }
14688  __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)
14689  __Pyx_GOTREF(__pyx_t_5);
14690  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14691  __pyx_r = __pyx_t_5;
14692  __pyx_t_5 = 0;
14693  goto __pyx_L0;
14694 
14695  /* "PyClical.pyx":1610
14696  * {1,2}
14697  * """
14698  * if not (i is None): # <<<<<<<<<<<<<<
14699  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14700  * else:
14701  */
14702  }
14703 
14704  /* "PyClical.pyx":1613
14705  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14706  * else:
14707  * try: # <<<<<<<<<<<<<<
14708  * return math.cos(obj)
14709  * except:
14710  */
14711  /*else*/ {
14712  {
14713  __Pyx_PyThreadState_declare
14714  __Pyx_PyThreadState_assign
14715  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14716  __Pyx_XGOTREF(__pyx_t_6);
14717  __Pyx_XGOTREF(__pyx_t_7);
14718  __Pyx_XGOTREF(__pyx_t_8);
14719  /*try:*/ {
14720 
14721  /* "PyClical.pyx":1614
14722  * else:
14723  * try:
14724  * return math.cos(obj) # <<<<<<<<<<<<<<
14725  * except:
14726  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14727  */
14728  __Pyx_XDECREF(__pyx_r);
14729  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1614, __pyx_L4_error)
14730  __Pyx_GOTREF(__pyx_t_3);
14731  __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)
14732  __Pyx_GOTREF(__pyx_t_9);
14733  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14734  __pyx_t_3 = NULL;
14735  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14736  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14737  if (likely(__pyx_t_3)) {
14738  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14739  __Pyx_INCREF(__pyx_t_3);
14740  __Pyx_INCREF(function);
14741  __Pyx_DECREF_SET(__pyx_t_9, function);
14742  }
14743  }
14744  __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);
14745  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14746  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1614, __pyx_L4_error)
14747  __Pyx_GOTREF(__pyx_t_5);
14748  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14749  __pyx_r = __pyx_t_5;
14750  __pyx_t_5 = 0;
14751  goto __pyx_L8_try_return;
14752 
14753  /* "PyClical.pyx":1613
14754  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14755  * else:
14756  * try: # <<<<<<<<<<<<<<
14757  * return math.cos(obj)
14758  * except:
14759  */
14760  }
14761  __pyx_L4_error:;
14762  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14763  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14764  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14765 
14766  /* "PyClical.pyx":1615
14767  * try:
14768  * return math.cos(obj)
14769  * except: # <<<<<<<<<<<<<<
14770  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14771  *
14772  */
14773  /*except:*/ {
14774  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14775  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1615, __pyx_L6_except_error)
14776  __Pyx_GOTREF(__pyx_t_5);
14777  __Pyx_GOTREF(__pyx_t_9);
14778  __Pyx_GOTREF(__pyx_t_3);
14779 
14780  /* "PyClical.pyx":1616
14781  * return math.cos(obj)
14782  * except:
14783  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14784  *
14785  * cpdef inline acos(obj,i = None):
14786  */
14787  __Pyx_XDECREF(__pyx_r);
14788  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14789  __Pyx_GOTREF(__pyx_t_10);
14790  __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)
14791  __Pyx_GOTREF(__pyx_t_11);
14792  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14793  __pyx_r = __pyx_t_11;
14794  __pyx_t_11 = 0;
14795  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14796  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14797  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14798  goto __pyx_L7_except_return;
14799  }
14800  __pyx_L6_except_error:;
14801 
14802  /* "PyClical.pyx":1613
14803  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14804  * else:
14805  * try: # <<<<<<<<<<<<<<
14806  * return math.cos(obj)
14807  * except:
14808  */
14809  __Pyx_XGIVEREF(__pyx_t_6);
14810  __Pyx_XGIVEREF(__pyx_t_7);
14811  __Pyx_XGIVEREF(__pyx_t_8);
14812  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14813  goto __pyx_L1_error;
14814  __pyx_L8_try_return:;
14815  __Pyx_XGIVEREF(__pyx_t_6);
14816  __Pyx_XGIVEREF(__pyx_t_7);
14817  __Pyx_XGIVEREF(__pyx_t_8);
14818  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14819  goto __pyx_L0;
14820  __pyx_L7_except_return:;
14821  __Pyx_XGIVEREF(__pyx_t_6);
14822  __Pyx_XGIVEREF(__pyx_t_7);
14823  __Pyx_XGIVEREF(__pyx_t_8);
14824  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14825  goto __pyx_L0;
14826  }
14827  }
14828 
14829  /* "PyClical.pyx":1601
14830  * return clifford().wrap( glucat.log(toClifford(obj)) )
14831  *
14832  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14833  * """
14834  * Cosine of multivector with optional complexifier.
14835  */
14836 
14837  /* function exit code */
14838  __pyx_L1_error:;
14839  __Pyx_XDECREF(__pyx_t_3);
14840  __Pyx_XDECREF(__pyx_t_5);
14841  __Pyx_XDECREF(__pyx_t_9);
14842  __Pyx_XDECREF(__pyx_t_10);
14843  __Pyx_XDECREF(__pyx_t_11);
14844  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14845  __pyx_r = 0;
14846  __pyx_L0:;
14847  __Pyx_XGIVEREF(__pyx_r);
14848  __Pyx_RefNannyFinishContext();
14849  return __pyx_r;
14850  }
14851 
14852  /* Python wrapper */
14853  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14854  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 ";
14855  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14856  PyObject *__pyx_v_obj = 0;
14857  PyObject *__pyx_v_i = 0;
14858  int __pyx_lineno = 0;
14859  const char *__pyx_filename = NULL;
14860  int __pyx_clineno = 0;
14861  PyObject *__pyx_r = 0;
14862  __Pyx_RefNannyDeclarations
14863  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14864  {
14865  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14866  PyObject* values[2] = {0,0};
14867  values[1] = ((PyObject *)Py_None);
14868  if (unlikely(__pyx_kwds)) {
14869  Py_ssize_t kw_args;
14870  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14871  switch (pos_args) {
14872  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14873  CYTHON_FALLTHROUGH;
14874  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14875  CYTHON_FALLTHROUGH;
14876  case 0: break;
14877  default: goto __pyx_L5_argtuple_error;
14878  }
14879  kw_args = PyDict_Size(__pyx_kwds);
14880  switch (pos_args) {
14881  case 0:
14882  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14883  else goto __pyx_L5_argtuple_error;
14884  CYTHON_FALLTHROUGH;
14885  case 1:
14886  if (kw_args > 0) {
14887  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14888  if (value) { values[1] = value; kw_args--; }
14889  }
14890  }
14891  if (unlikely(kw_args > 0)) {
14892  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1601, __pyx_L3_error)
14893  }
14894  } else {
14895  switch (PyTuple_GET_SIZE(__pyx_args)) {
14896  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14897  CYTHON_FALLTHROUGH;
14898  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14899  break;
14900  default: goto __pyx_L5_argtuple_error;
14901  }
14902  }
14903  __pyx_v_obj = values[0];
14904  __pyx_v_i = values[1];
14905  }
14906  goto __pyx_L4_argument_unpacking_done;
14907  __pyx_L5_argtuple_error:;
14908  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1601, __pyx_L3_error)
14909  __pyx_L3_error:;
14910  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14911  __Pyx_RefNannyFinishContext();
14912  return NULL;
14913  __pyx_L4_argument_unpacking_done:;
14914  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14915 
14916  /* function exit code */
14917  __Pyx_RefNannyFinishContext();
14918  return __pyx_r;
14919  }
14920 
14921  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14922  PyObject *__pyx_r = NULL;
14923  __Pyx_RefNannyDeclarations
14924  PyObject *__pyx_t_1 = NULL;
14925  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14926  int __pyx_lineno = 0;
14927  const char *__pyx_filename = NULL;
14928  int __pyx_clineno = 0;
14929  __Pyx_RefNannySetupContext("cos", 0);
14930  __Pyx_XDECREF(__pyx_r);
14931  __pyx_t_2.__pyx_n = 1;
14932  __pyx_t_2.i = __pyx_v_i;
14933  __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)
14934  __Pyx_GOTREF(__pyx_t_1);
14935  __pyx_r = __pyx_t_1;
14936  __pyx_t_1 = 0;
14937  goto __pyx_L0;
14938 
14939  /* function exit code */
14940  __pyx_L1_error:;
14941  __Pyx_XDECREF(__pyx_t_1);
14942  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14943  __pyx_r = NULL;
14944  __pyx_L0:;
14945  __Pyx_XGIVEREF(__pyx_r);
14946  __Pyx_RefNannyFinishContext();
14947  return __pyx_r;
14948  }
14949 
14950  /* "PyClical.pyx":1618
14951  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14952  *
14953  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14954  * """
14955  * Inverse cosine of multivector with optional complexifier.
14956  */
14957 
14958  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14959  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) {
14960  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14961  PyObject *__pyx_r = NULL;
14962  __Pyx_RefNannyDeclarations
14963  int __pyx_t_1;
14964  int __pyx_t_2;
14965  PyObject *__pyx_t_3 = NULL;
14966  Clifford __pyx_t_4;
14967  PyObject *__pyx_t_5 = NULL;
14968  PyObject *__pyx_t_6 = NULL;
14969  PyObject *__pyx_t_7 = NULL;
14970  PyObject *__pyx_t_8 = NULL;
14971  PyObject *__pyx_t_9 = NULL;
14972  PyObject *__pyx_t_10 = NULL;
14973  PyObject *__pyx_t_11 = NULL;
14974  int __pyx_lineno = 0;
14975  const char *__pyx_filename = NULL;
14976  int __pyx_clineno = 0;
14977  __Pyx_RefNannySetupContext("acos", 0);
14978  if (__pyx_optional_args) {
14979  if (__pyx_optional_args->__pyx_n > 0) {
14980  __pyx_v_i = __pyx_optional_args->i;
14981  }
14982  }
14983 
14984  /* "PyClical.pyx":1631
14985  * {1,2}
14986  * """
14987  * if not (i is None): # <<<<<<<<<<<<<<
14988  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14989  * else:
14990  */
14991  __pyx_t_1 = (__pyx_v_i != Py_None);
14992  __pyx_t_2 = (__pyx_t_1 != 0);
14993  if (__pyx_t_2) {
14994 
14995  /* "PyClical.pyx":1632
14996  * """
14997  * if not (i is None):
14998  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14999  * else:
15000  * try:
15001  */
15002  __Pyx_XDECREF(__pyx_r);
15003  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error)
15004  __Pyx_GOTREF(__pyx_t_3);
15005  try {
15006  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15007  } catch(...) {
15008  __Pyx_CppExn2PyErr();
15009  __PYX_ERR(0, 1632, __pyx_L1_error)
15010  }
15011  __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)
15012  __Pyx_GOTREF(__pyx_t_5);
15013  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15014  __pyx_r = __pyx_t_5;
15015  __pyx_t_5 = 0;
15016  goto __pyx_L0;
15017 
15018  /* "PyClical.pyx":1631
15019  * {1,2}
15020  * """
15021  * if not (i is None): # <<<<<<<<<<<<<<
15022  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15023  * else:
15024  */
15025  }
15026 
15027  /* "PyClical.pyx":1634
15028  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15029  * else:
15030  * try: # <<<<<<<<<<<<<<
15031  * return math.acos(obj)
15032  * except:
15033  */
15034  /*else*/ {
15035  {
15036  __Pyx_PyThreadState_declare
15037  __Pyx_PyThreadState_assign
15038  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15039  __Pyx_XGOTREF(__pyx_t_6);
15040  __Pyx_XGOTREF(__pyx_t_7);
15041  __Pyx_XGOTREF(__pyx_t_8);
15042  /*try:*/ {
15043 
15044  /* "PyClical.pyx":1635
15045  * else:
15046  * try:
15047  * return math.acos(obj) # <<<<<<<<<<<<<<
15048  * except:
15049  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15050  */
15051  __Pyx_XDECREF(__pyx_r);
15052  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L4_error)
15053  __Pyx_GOTREF(__pyx_t_3);
15054  __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)
15055  __Pyx_GOTREF(__pyx_t_9);
15056  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15057  __pyx_t_3 = NULL;
15058  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15059  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15060  if (likely(__pyx_t_3)) {
15061  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15062  __Pyx_INCREF(__pyx_t_3);
15063  __Pyx_INCREF(function);
15064  __Pyx_DECREF_SET(__pyx_t_9, function);
15065  }
15066  }
15067  __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);
15068  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15069  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1635, __pyx_L4_error)
15070  __Pyx_GOTREF(__pyx_t_5);
15071  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15072  __pyx_r = __pyx_t_5;
15073  __pyx_t_5 = 0;
15074  goto __pyx_L8_try_return;
15075 
15076  /* "PyClical.pyx":1634
15077  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15078  * else:
15079  * try: # <<<<<<<<<<<<<<
15080  * return math.acos(obj)
15081  * except:
15082  */
15083  }
15084  __pyx_L4_error:;
15085  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15086  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15087  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15088 
15089  /* "PyClical.pyx":1636
15090  * try:
15091  * return math.acos(obj)
15092  * except: # <<<<<<<<<<<<<<
15093  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15094  *
15095  */
15096  /*except:*/ {
15097  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15098  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1636, __pyx_L6_except_error)
15099  __Pyx_GOTREF(__pyx_t_5);
15100  __Pyx_GOTREF(__pyx_t_9);
15101  __Pyx_GOTREF(__pyx_t_3);
15102 
15103  /* "PyClical.pyx":1637
15104  * return math.acos(obj)
15105  * except:
15106  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
15107  *
15108  * cpdef inline cosh(obj):
15109  */
15110  __Pyx_XDECREF(__pyx_r);
15111  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1637, __pyx_L6_except_error)
15112  __Pyx_GOTREF(__pyx_t_10);
15113  __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)
15114  __Pyx_GOTREF(__pyx_t_11);
15115  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15116  __pyx_r = __pyx_t_11;
15117  __pyx_t_11 = 0;
15118  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15119  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15120  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15121  goto __pyx_L7_except_return;
15122  }
15123  __pyx_L6_except_error:;
15124 
15125  /* "PyClical.pyx":1634
15126  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15127  * else:
15128  * try: # <<<<<<<<<<<<<<
15129  * return math.acos(obj)
15130  * except:
15131  */
15132  __Pyx_XGIVEREF(__pyx_t_6);
15133  __Pyx_XGIVEREF(__pyx_t_7);
15134  __Pyx_XGIVEREF(__pyx_t_8);
15135  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15136  goto __pyx_L1_error;
15137  __pyx_L8_try_return:;
15138  __Pyx_XGIVEREF(__pyx_t_6);
15139  __Pyx_XGIVEREF(__pyx_t_7);
15140  __Pyx_XGIVEREF(__pyx_t_8);
15141  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15142  goto __pyx_L0;
15143  __pyx_L7_except_return:;
15144  __Pyx_XGIVEREF(__pyx_t_6);
15145  __Pyx_XGIVEREF(__pyx_t_7);
15146  __Pyx_XGIVEREF(__pyx_t_8);
15147  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15148  goto __pyx_L0;
15149  }
15150  }
15151 
15152  /* "PyClical.pyx":1618
15153  * return clifford().wrap( glucat.cos(toClifford(obj)) )
15154  *
15155  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
15156  * """
15157  * Inverse cosine of multivector with optional complexifier.
15158  */
15159 
15160  /* function exit code */
15161  __pyx_L1_error:;
15162  __Pyx_XDECREF(__pyx_t_3);
15163  __Pyx_XDECREF(__pyx_t_5);
15164  __Pyx_XDECREF(__pyx_t_9);
15165  __Pyx_XDECREF(__pyx_t_10);
15166  __Pyx_XDECREF(__pyx_t_11);
15167  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15168  __pyx_r = 0;
15169  __pyx_L0:;
15170  __Pyx_XGIVEREF(__pyx_r);
15171  __Pyx_RefNannyFinishContext();
15172  return __pyx_r;
15173  }
15174 
15175  /* Python wrapper */
15176  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15177  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 ";
15178  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15179  PyObject *__pyx_v_obj = 0;
15180  PyObject *__pyx_v_i = 0;
15181  int __pyx_lineno = 0;
15182  const char *__pyx_filename = NULL;
15183  int __pyx_clineno = 0;
15184  PyObject *__pyx_r = 0;
15185  __Pyx_RefNannyDeclarations
15186  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
15187  {
15188  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15189  PyObject* values[2] = {0,0};
15190  values[1] = ((PyObject *)Py_None);
15191  if (unlikely(__pyx_kwds)) {
15192  Py_ssize_t kw_args;
15193  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15194  switch (pos_args) {
15195  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15196  CYTHON_FALLTHROUGH;
15197  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15198  CYTHON_FALLTHROUGH;
15199  case 0: break;
15200  default: goto __pyx_L5_argtuple_error;
15201  }
15202  kw_args = PyDict_Size(__pyx_kwds);
15203  switch (pos_args) {
15204  case 0:
15205  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15206  else goto __pyx_L5_argtuple_error;
15207  CYTHON_FALLTHROUGH;
15208  case 1:
15209  if (kw_args > 0) {
15210  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15211  if (value) { values[1] = value; kw_args--; }
15212  }
15213  }
15214  if (unlikely(kw_args > 0)) {
15215  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1618, __pyx_L3_error)
15216  }
15217  } else {
15218  switch (PyTuple_GET_SIZE(__pyx_args)) {
15219  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15220  CYTHON_FALLTHROUGH;
15221  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15222  break;
15223  default: goto __pyx_L5_argtuple_error;
15224  }
15225  }
15226  __pyx_v_obj = values[0];
15227  __pyx_v_i = values[1];
15228  }
15229  goto __pyx_L4_argument_unpacking_done;
15230  __pyx_L5_argtuple_error:;
15231  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1618, __pyx_L3_error)
15232  __pyx_L3_error:;
15233  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15234  __Pyx_RefNannyFinishContext();
15235  return NULL;
15236  __pyx_L4_argument_unpacking_done:;
15237  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
15238 
15239  /* function exit code */
15240  __Pyx_RefNannyFinishContext();
15241  return __pyx_r;
15242  }
15243 
15244  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15245  PyObject *__pyx_r = NULL;
15246  __Pyx_RefNannyDeclarations
15247  PyObject *__pyx_t_1 = NULL;
15248  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
15249  int __pyx_lineno = 0;
15250  const char *__pyx_filename = NULL;
15251  int __pyx_clineno = 0;
15252  __Pyx_RefNannySetupContext("acos", 0);
15253  __Pyx_XDECREF(__pyx_r);
15254  __pyx_t_2.__pyx_n = 1;
15255  __pyx_t_2.i = __pyx_v_i;
15256  __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)
15257  __Pyx_GOTREF(__pyx_t_1);
15258  __pyx_r = __pyx_t_1;
15259  __pyx_t_1 = 0;
15260  goto __pyx_L0;
15261 
15262  /* function exit code */
15263  __pyx_L1_error:;
15264  __Pyx_XDECREF(__pyx_t_1);
15265  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15266  __pyx_r = NULL;
15267  __pyx_L0:;
15268  __Pyx_XGIVEREF(__pyx_r);
15269  __Pyx_RefNannyFinishContext();
15270  return __pyx_r;
15271  }
15272 
15273  /* "PyClical.pyx":1639
15274  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15275  *
15276  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
15277  * """
15278  * Hyperbolic cosine of multivector.
15279  */
15280 
15281  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15282  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15283  PyObject *__pyx_r = NULL;
15284  __Pyx_RefNannyDeclarations
15285  PyObject *__pyx_t_1 = NULL;
15286  PyObject *__pyx_t_2 = NULL;
15287  PyObject *__pyx_t_3 = NULL;
15288  PyObject *__pyx_t_4 = NULL;
15289  PyObject *__pyx_t_5 = NULL;
15290  PyObject *__pyx_t_6 = NULL;
15291  PyObject *__pyx_t_7 = NULL;
15292  PyObject *__pyx_t_8 = NULL;
15293  int __pyx_lineno = 0;
15294  const char *__pyx_filename = NULL;
15295  int __pyx_clineno = 0;
15296  __Pyx_RefNannySetupContext("cosh", 0);
15297 
15298  /* "PyClical.pyx":1650
15299  * {1,2}
15300  * """
15301  * try: # <<<<<<<<<<<<<<
15302  * return math.cosh(obj)
15303  * except:
15304  */
15305  {
15306  __Pyx_PyThreadState_declare
15307  __Pyx_PyThreadState_assign
15308  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15309  __Pyx_XGOTREF(__pyx_t_1);
15310  __Pyx_XGOTREF(__pyx_t_2);
15311  __Pyx_XGOTREF(__pyx_t_3);
15312  /*try:*/ {
15313 
15314  /* "PyClical.pyx":1651
15315  * """
15316  * try:
15317  * return math.cosh(obj) # <<<<<<<<<<<<<<
15318  * except:
15319  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15320  */
15321  __Pyx_XDECREF(__pyx_r);
15322  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1651, __pyx_L3_error)
15323  __Pyx_GOTREF(__pyx_t_5);
15324  __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)
15325  __Pyx_GOTREF(__pyx_t_6);
15326  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15327  __pyx_t_5 = NULL;
15328  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15329  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15330  if (likely(__pyx_t_5)) {
15331  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15332  __Pyx_INCREF(__pyx_t_5);
15333  __Pyx_INCREF(function);
15334  __Pyx_DECREF_SET(__pyx_t_6, function);
15335  }
15336  }
15337  __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);
15338  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15339  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L3_error)
15340  __Pyx_GOTREF(__pyx_t_4);
15341  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15342  __pyx_r = __pyx_t_4;
15343  __pyx_t_4 = 0;
15344  goto __pyx_L7_try_return;
15345 
15346  /* "PyClical.pyx":1650
15347  * {1,2}
15348  * """
15349  * try: # <<<<<<<<<<<<<<
15350  * return math.cosh(obj)
15351  * except:
15352  */
15353  }
15354  __pyx_L3_error:;
15355  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15356  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15357  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15358 
15359  /* "PyClical.pyx":1652
15360  * try:
15361  * return math.cosh(obj)
15362  * except: # <<<<<<<<<<<<<<
15363  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15364  *
15365  */
15366  /*except:*/ {
15367  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15368  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1652, __pyx_L5_except_error)
15369  __Pyx_GOTREF(__pyx_t_4);
15370  __Pyx_GOTREF(__pyx_t_6);
15371  __Pyx_GOTREF(__pyx_t_5);
15372 
15373  /* "PyClical.pyx":1653
15374  * return math.cosh(obj)
15375  * except:
15376  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15377  *
15378  * cpdef inline acosh(obj,i = None):
15379  */
15380  __Pyx_XDECREF(__pyx_r);
15381  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1653, __pyx_L5_except_error)
15382  __Pyx_GOTREF(__pyx_t_7);
15383  __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)
15384  __Pyx_GOTREF(__pyx_t_8);
15385  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15386  __pyx_r = __pyx_t_8;
15387  __pyx_t_8 = 0;
15388  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15389  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15390  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15391  goto __pyx_L6_except_return;
15392  }
15393  __pyx_L5_except_error:;
15394 
15395  /* "PyClical.pyx":1650
15396  * {1,2}
15397  * """
15398  * try: # <<<<<<<<<<<<<<
15399  * return math.cosh(obj)
15400  * except:
15401  */
15402  __Pyx_XGIVEREF(__pyx_t_1);
15403  __Pyx_XGIVEREF(__pyx_t_2);
15404  __Pyx_XGIVEREF(__pyx_t_3);
15405  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15406  goto __pyx_L1_error;
15407  __pyx_L7_try_return:;
15408  __Pyx_XGIVEREF(__pyx_t_1);
15409  __Pyx_XGIVEREF(__pyx_t_2);
15410  __Pyx_XGIVEREF(__pyx_t_3);
15411  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15412  goto __pyx_L0;
15413  __pyx_L6_except_return:;
15414  __Pyx_XGIVEREF(__pyx_t_1);
15415  __Pyx_XGIVEREF(__pyx_t_2);
15416  __Pyx_XGIVEREF(__pyx_t_3);
15417  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15418  goto __pyx_L0;
15419  }
15420 
15421  /* "PyClical.pyx":1639
15422  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15423  *
15424  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
15425  * """
15426  * Hyperbolic cosine of multivector.
15427  */
15428 
15429  /* function exit code */
15430  __pyx_L1_error:;
15431  __Pyx_XDECREF(__pyx_t_4);
15432  __Pyx_XDECREF(__pyx_t_5);
15433  __Pyx_XDECREF(__pyx_t_6);
15434  __Pyx_XDECREF(__pyx_t_7);
15435  __Pyx_XDECREF(__pyx_t_8);
15436  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15437  __pyx_r = 0;
15438  __pyx_L0:;
15439  __Pyx_XGIVEREF(__pyx_r);
15440  __Pyx_RefNannyFinishContext();
15441  return __pyx_r;
15442  }
15443 
15444  /* Python wrapper */
15445  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15446  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 ";
15447  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15448  PyObject *__pyx_r = 0;
15449  __Pyx_RefNannyDeclarations
15450  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
15451  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
15452 
15453  /* function exit code */
15454  __Pyx_RefNannyFinishContext();
15455  return __pyx_r;
15456  }
15457 
15458  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15459  PyObject *__pyx_r = NULL;
15460  __Pyx_RefNannyDeclarations
15461  PyObject *__pyx_t_1 = NULL;
15462  int __pyx_lineno = 0;
15463  const char *__pyx_filename = NULL;
15464  int __pyx_clineno = 0;
15465  __Pyx_RefNannySetupContext("cosh", 0);
15466  __Pyx_XDECREF(__pyx_r);
15467  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error)
15468  __Pyx_GOTREF(__pyx_t_1);
15469  __pyx_r = __pyx_t_1;
15470  __pyx_t_1 = 0;
15471  goto __pyx_L0;
15472 
15473  /* function exit code */
15474  __pyx_L1_error:;
15475  __Pyx_XDECREF(__pyx_t_1);
15476  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15477  __pyx_r = NULL;
15478  __pyx_L0:;
15479  __Pyx_XGIVEREF(__pyx_r);
15480  __Pyx_RefNannyFinishContext();
15481  return __pyx_r;
15482  }
15483 
15484  /* "PyClical.pyx":1655
15485  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15486  *
15487  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15488  * """
15489  * Inverse hyperbolic cosine of multivector with optional complexifier.
15490  */
15491 
15492  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15493  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) {
15494  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15495  PyObject *__pyx_r = NULL;
15496  __Pyx_RefNannyDeclarations
15497  int __pyx_t_1;
15498  int __pyx_t_2;
15499  PyObject *__pyx_t_3 = NULL;
15500  Clifford __pyx_t_4;
15501  PyObject *__pyx_t_5 = NULL;
15502  PyObject *__pyx_t_6 = NULL;
15503  PyObject *__pyx_t_7 = NULL;
15504  PyObject *__pyx_t_8 = NULL;
15505  PyObject *__pyx_t_9 = NULL;
15506  PyObject *__pyx_t_10 = NULL;
15507  PyObject *__pyx_t_11 = NULL;
15508  int __pyx_lineno = 0;
15509  const char *__pyx_filename = NULL;
15510  int __pyx_clineno = 0;
15511  __Pyx_RefNannySetupContext("acosh", 0);
15512  if (__pyx_optional_args) {
15513  if (__pyx_optional_args->__pyx_n > 0) {
15514  __pyx_v_i = __pyx_optional_args->i;
15515  }
15516  }
15517 
15518  /* "PyClical.pyx":1670
15519  * {1,2}
15520  * """
15521  * if not (i is None): # <<<<<<<<<<<<<<
15522  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15523  * else:
15524  */
15525  __pyx_t_1 = (__pyx_v_i != Py_None);
15526  __pyx_t_2 = (__pyx_t_1 != 0);
15527  if (__pyx_t_2) {
15528 
15529  /* "PyClical.pyx":1671
15530  * """
15531  * if not (i is None):
15532  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15533  * else:
15534  * try:
15535  */
15536  __Pyx_XDECREF(__pyx_r);
15537  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1671, __pyx_L1_error)
15538  __Pyx_GOTREF(__pyx_t_3);
15539  try {
15540  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15541  } catch(...) {
15542  __Pyx_CppExn2PyErr();
15543  __PYX_ERR(0, 1671, __pyx_L1_error)
15544  }
15545  __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)
15546  __Pyx_GOTREF(__pyx_t_5);
15547  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15548  __pyx_r = __pyx_t_5;
15549  __pyx_t_5 = 0;
15550  goto __pyx_L0;
15551 
15552  /* "PyClical.pyx":1670
15553  * {1,2}
15554  * """
15555  * if not (i is None): # <<<<<<<<<<<<<<
15556  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15557  * else:
15558  */
15559  }
15560 
15561  /* "PyClical.pyx":1673
15562  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15563  * else:
15564  * try: # <<<<<<<<<<<<<<
15565  * return math.acosh(obj)
15566  * except:
15567  */
15568  /*else*/ {
15569  {
15570  __Pyx_PyThreadState_declare
15571  __Pyx_PyThreadState_assign
15572  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15573  __Pyx_XGOTREF(__pyx_t_6);
15574  __Pyx_XGOTREF(__pyx_t_7);
15575  __Pyx_XGOTREF(__pyx_t_8);
15576  /*try:*/ {
15577 
15578  /* "PyClical.pyx":1674
15579  * else:
15580  * try:
15581  * return math.acosh(obj) # <<<<<<<<<<<<<<
15582  * except:
15583  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15584  */
15585  __Pyx_XDECREF(__pyx_r);
15586  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L4_error)
15587  __Pyx_GOTREF(__pyx_t_3);
15588  __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)
15589  __Pyx_GOTREF(__pyx_t_9);
15590  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15591  __pyx_t_3 = NULL;
15592  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15593  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15594  if (likely(__pyx_t_3)) {
15595  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15596  __Pyx_INCREF(__pyx_t_3);
15597  __Pyx_INCREF(function);
15598  __Pyx_DECREF_SET(__pyx_t_9, function);
15599  }
15600  }
15601  __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);
15602  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15603  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L4_error)
15604  __Pyx_GOTREF(__pyx_t_5);
15605  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15606  __pyx_r = __pyx_t_5;
15607  __pyx_t_5 = 0;
15608  goto __pyx_L8_try_return;
15609 
15610  /* "PyClical.pyx":1673
15611  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15612  * else:
15613  * try: # <<<<<<<<<<<<<<
15614  * return math.acosh(obj)
15615  * except:
15616  */
15617  }
15618  __pyx_L4_error:;
15619  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15620  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15621  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15622 
15623  /* "PyClical.pyx":1675
15624  * try:
15625  * return math.acosh(obj)
15626  * except: # <<<<<<<<<<<<<<
15627  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15628  *
15629  */
15630  /*except:*/ {
15631  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15632  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1675, __pyx_L6_except_error)
15633  __Pyx_GOTREF(__pyx_t_5);
15634  __Pyx_GOTREF(__pyx_t_9);
15635  __Pyx_GOTREF(__pyx_t_3);
15636 
15637  /* "PyClical.pyx":1676
15638  * return math.acosh(obj)
15639  * except:
15640  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15641  *
15642  * cpdef inline sin(obj,i = None):
15643  */
15644  __Pyx_XDECREF(__pyx_r);
15645  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1676, __pyx_L6_except_error)
15646  __Pyx_GOTREF(__pyx_t_10);
15647  __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)
15648  __Pyx_GOTREF(__pyx_t_11);
15649  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15650  __pyx_r = __pyx_t_11;
15651  __pyx_t_11 = 0;
15652  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15653  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15654  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15655  goto __pyx_L7_except_return;
15656  }
15657  __pyx_L6_except_error:;
15658 
15659  /* "PyClical.pyx":1673
15660  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15661  * else:
15662  * try: # <<<<<<<<<<<<<<
15663  * return math.acosh(obj)
15664  * except:
15665  */
15666  __Pyx_XGIVEREF(__pyx_t_6);
15667  __Pyx_XGIVEREF(__pyx_t_7);
15668  __Pyx_XGIVEREF(__pyx_t_8);
15669  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15670  goto __pyx_L1_error;
15671  __pyx_L8_try_return:;
15672  __Pyx_XGIVEREF(__pyx_t_6);
15673  __Pyx_XGIVEREF(__pyx_t_7);
15674  __Pyx_XGIVEREF(__pyx_t_8);
15675  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15676  goto __pyx_L0;
15677  __pyx_L7_except_return:;
15678  __Pyx_XGIVEREF(__pyx_t_6);
15679  __Pyx_XGIVEREF(__pyx_t_7);
15680  __Pyx_XGIVEREF(__pyx_t_8);
15681  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15682  goto __pyx_L0;
15683  }
15684  }
15685 
15686  /* "PyClical.pyx":1655
15687  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15688  *
15689  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15690  * """
15691  * Inverse hyperbolic cosine of multivector with optional complexifier.
15692  */
15693 
15694  /* function exit code */
15695  __pyx_L1_error:;
15696  __Pyx_XDECREF(__pyx_t_3);
15697  __Pyx_XDECREF(__pyx_t_5);
15698  __Pyx_XDECREF(__pyx_t_9);
15699  __Pyx_XDECREF(__pyx_t_10);
15700  __Pyx_XDECREF(__pyx_t_11);
15701  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15702  __pyx_r = 0;
15703  __pyx_L0:;
15704  __Pyx_XGIVEREF(__pyx_r);
15705  __Pyx_RefNannyFinishContext();
15706  return __pyx_r;
15707  }
15708 
15709  /* Python wrapper */
15710  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15711  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 ";
15712  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15713  PyObject *__pyx_v_obj = 0;
15714  PyObject *__pyx_v_i = 0;
15715  int __pyx_lineno = 0;
15716  const char *__pyx_filename = NULL;
15717  int __pyx_clineno = 0;
15718  PyObject *__pyx_r = 0;
15719  __Pyx_RefNannyDeclarations
15720  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15721  {
15722  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15723  PyObject* values[2] = {0,0};
15724  values[1] = ((PyObject *)Py_None);
15725  if (unlikely(__pyx_kwds)) {
15726  Py_ssize_t kw_args;
15727  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15728  switch (pos_args) {
15729  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15730  CYTHON_FALLTHROUGH;
15731  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15732  CYTHON_FALLTHROUGH;
15733  case 0: break;
15734  default: goto __pyx_L5_argtuple_error;
15735  }
15736  kw_args = PyDict_Size(__pyx_kwds);
15737  switch (pos_args) {
15738  case 0:
15739  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15740  else goto __pyx_L5_argtuple_error;
15741  CYTHON_FALLTHROUGH;
15742  case 1:
15743  if (kw_args > 0) {
15744  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15745  if (value) { values[1] = value; kw_args--; }
15746  }
15747  }
15748  if (unlikely(kw_args > 0)) {
15749  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1655, __pyx_L3_error)
15750  }
15751  } else {
15752  switch (PyTuple_GET_SIZE(__pyx_args)) {
15753  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15754  CYTHON_FALLTHROUGH;
15755  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15756  break;
15757  default: goto __pyx_L5_argtuple_error;
15758  }
15759  }
15760  __pyx_v_obj = values[0];
15761  __pyx_v_i = values[1];
15762  }
15763  goto __pyx_L4_argument_unpacking_done;
15764  __pyx_L5_argtuple_error:;
15765  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1655, __pyx_L3_error)
15766  __pyx_L3_error:;
15767  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15768  __Pyx_RefNannyFinishContext();
15769  return NULL;
15770  __pyx_L4_argument_unpacking_done:;
15771  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15772 
15773  /* function exit code */
15774  __Pyx_RefNannyFinishContext();
15775  return __pyx_r;
15776  }
15777 
15778  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15779  PyObject *__pyx_r = NULL;
15780  __Pyx_RefNannyDeclarations
15781  PyObject *__pyx_t_1 = NULL;
15782  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15783  int __pyx_lineno = 0;
15784  const char *__pyx_filename = NULL;
15785  int __pyx_clineno = 0;
15786  __Pyx_RefNannySetupContext("acosh", 0);
15787  __Pyx_XDECREF(__pyx_r);
15788  __pyx_t_2.__pyx_n = 1;
15789  __pyx_t_2.i = __pyx_v_i;
15790  __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)
15791  __Pyx_GOTREF(__pyx_t_1);
15792  __pyx_r = __pyx_t_1;
15793  __pyx_t_1 = 0;
15794  goto __pyx_L0;
15795 
15796  /* function exit code */
15797  __pyx_L1_error:;
15798  __Pyx_XDECREF(__pyx_t_1);
15799  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15800  __pyx_r = NULL;
15801  __pyx_L0:;
15802  __Pyx_XGIVEREF(__pyx_r);
15803  __Pyx_RefNannyFinishContext();
15804  return __pyx_r;
15805  }
15806 
15807  /* "PyClical.pyx":1678
15808  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15809  *
15810  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15811  * """
15812  * Sine of multivector with optional complexifier.
15813  */
15814 
15815  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15816  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) {
15817  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15818  PyObject *__pyx_r = NULL;
15819  __Pyx_RefNannyDeclarations
15820  int __pyx_t_1;
15821  int __pyx_t_2;
15822  PyObject *__pyx_t_3 = NULL;
15823  Clifford __pyx_t_4;
15824  PyObject *__pyx_t_5 = NULL;
15825  PyObject *__pyx_t_6 = NULL;
15826  PyObject *__pyx_t_7 = NULL;
15827  PyObject *__pyx_t_8 = NULL;
15828  PyObject *__pyx_t_9 = NULL;
15829  PyObject *__pyx_t_10 = NULL;
15830  PyObject *__pyx_t_11 = NULL;
15831  int __pyx_lineno = 0;
15832  const char *__pyx_filename = NULL;
15833  int __pyx_clineno = 0;
15834  __Pyx_RefNannySetupContext("sin", 0);
15835  if (__pyx_optional_args) {
15836  if (__pyx_optional_args->__pyx_n > 0) {
15837  __pyx_v_i = __pyx_optional_args->i;
15838  }
15839  }
15840 
15841  /* "PyClical.pyx":1689
15842  * {1,2,3}
15843  * """
15844  * if not (i is None): # <<<<<<<<<<<<<<
15845  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15846  * else:
15847  */
15848  __pyx_t_1 = (__pyx_v_i != Py_None);
15849  __pyx_t_2 = (__pyx_t_1 != 0);
15850  if (__pyx_t_2) {
15851 
15852  /* "PyClical.pyx":1690
15853  * """
15854  * if not (i is None):
15855  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15856  * else:
15857  * try:
15858  */
15859  __Pyx_XDECREF(__pyx_r);
15860  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
15861  __Pyx_GOTREF(__pyx_t_3);
15862  try {
15863  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15864  } catch(...) {
15865  __Pyx_CppExn2PyErr();
15866  __PYX_ERR(0, 1690, __pyx_L1_error)
15867  }
15868  __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)
15869  __Pyx_GOTREF(__pyx_t_5);
15870  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15871  __pyx_r = __pyx_t_5;
15872  __pyx_t_5 = 0;
15873  goto __pyx_L0;
15874 
15875  /* "PyClical.pyx":1689
15876  * {1,2,3}
15877  * """
15878  * if not (i is None): # <<<<<<<<<<<<<<
15879  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15880  * else:
15881  */
15882  }
15883 
15884  /* "PyClical.pyx":1692
15885  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15886  * else:
15887  * try: # <<<<<<<<<<<<<<
15888  * return math.sin(obj)
15889  * except:
15890  */
15891  /*else*/ {
15892  {
15893  __Pyx_PyThreadState_declare
15894  __Pyx_PyThreadState_assign
15895  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15896  __Pyx_XGOTREF(__pyx_t_6);
15897  __Pyx_XGOTREF(__pyx_t_7);
15898  __Pyx_XGOTREF(__pyx_t_8);
15899  /*try:*/ {
15900 
15901  /* "PyClical.pyx":1693
15902  * else:
15903  * try:
15904  * return math.sin(obj) # <<<<<<<<<<<<<<
15905  * except:
15906  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15907  */
15908  __Pyx_XDECREF(__pyx_r);
15909  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1693, __pyx_L4_error)
15910  __Pyx_GOTREF(__pyx_t_3);
15911  __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)
15912  __Pyx_GOTREF(__pyx_t_9);
15913  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15914  __pyx_t_3 = NULL;
15915  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15916  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15917  if (likely(__pyx_t_3)) {
15918  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15919  __Pyx_INCREF(__pyx_t_3);
15920  __Pyx_INCREF(function);
15921  __Pyx_DECREF_SET(__pyx_t_9, function);
15922  }
15923  }
15924  __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);
15925  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15926  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1693, __pyx_L4_error)
15927  __Pyx_GOTREF(__pyx_t_5);
15928  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15929  __pyx_r = __pyx_t_5;
15930  __pyx_t_5 = 0;
15931  goto __pyx_L8_try_return;
15932 
15933  /* "PyClical.pyx":1692
15934  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15935  * else:
15936  * try: # <<<<<<<<<<<<<<
15937  * return math.sin(obj)
15938  * except:
15939  */
15940  }
15941  __pyx_L4_error:;
15942  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15943  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15944  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15945 
15946  /* "PyClical.pyx":1694
15947  * try:
15948  * return math.sin(obj)
15949  * except: # <<<<<<<<<<<<<<
15950  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15951  *
15952  */
15953  /*except:*/ {
15954  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15955  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1694, __pyx_L6_except_error)
15956  __Pyx_GOTREF(__pyx_t_5);
15957  __Pyx_GOTREF(__pyx_t_9);
15958  __Pyx_GOTREF(__pyx_t_3);
15959 
15960  /* "PyClical.pyx":1695
15961  * return math.sin(obj)
15962  * except:
15963  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15964  *
15965  * cpdef inline asin(obj,i = None):
15966  */
15967  __Pyx_XDECREF(__pyx_r);
15968  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15969  __Pyx_GOTREF(__pyx_t_10);
15970  __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)
15971  __Pyx_GOTREF(__pyx_t_11);
15972  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15973  __pyx_r = __pyx_t_11;
15974  __pyx_t_11 = 0;
15975  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15976  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15977  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15978  goto __pyx_L7_except_return;
15979  }
15980  __pyx_L6_except_error:;
15981 
15982  /* "PyClical.pyx":1692
15983  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15984  * else:
15985  * try: # <<<<<<<<<<<<<<
15986  * return math.sin(obj)
15987  * except:
15988  */
15989  __Pyx_XGIVEREF(__pyx_t_6);
15990  __Pyx_XGIVEREF(__pyx_t_7);
15991  __Pyx_XGIVEREF(__pyx_t_8);
15992  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15993  goto __pyx_L1_error;
15994  __pyx_L8_try_return:;
15995  __Pyx_XGIVEREF(__pyx_t_6);
15996  __Pyx_XGIVEREF(__pyx_t_7);
15997  __Pyx_XGIVEREF(__pyx_t_8);
15998  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15999  goto __pyx_L0;
16000  __pyx_L7_except_return:;
16001  __Pyx_XGIVEREF(__pyx_t_6);
16002  __Pyx_XGIVEREF(__pyx_t_7);
16003  __Pyx_XGIVEREF(__pyx_t_8);
16004  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16005  goto __pyx_L0;
16006  }
16007  }
16008 
16009  /* "PyClical.pyx":1678
16010  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
16011  *
16012  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
16013  * """
16014  * Sine of multivector with optional complexifier.
16015  */
16016 
16017  /* function exit code */
16018  __pyx_L1_error:;
16019  __Pyx_XDECREF(__pyx_t_3);
16020  __Pyx_XDECREF(__pyx_t_5);
16021  __Pyx_XDECREF(__pyx_t_9);
16022  __Pyx_XDECREF(__pyx_t_10);
16023  __Pyx_XDECREF(__pyx_t_11);
16024  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16025  __pyx_r = 0;
16026  __pyx_L0:;
16027  __Pyx_XGIVEREF(__pyx_r);
16028  __Pyx_RefNannyFinishContext();
16029  return __pyx_r;
16030  }
16031 
16032  /* Python wrapper */
16033  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16034  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 ";
16035  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16036  PyObject *__pyx_v_obj = 0;
16037  PyObject *__pyx_v_i = 0;
16038  int __pyx_lineno = 0;
16039  const char *__pyx_filename = NULL;
16040  int __pyx_clineno = 0;
16041  PyObject *__pyx_r = 0;
16042  __Pyx_RefNannyDeclarations
16043  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
16044  {
16045  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16046  PyObject* values[2] = {0,0};
16047  values[1] = ((PyObject *)Py_None);
16048  if (unlikely(__pyx_kwds)) {
16049  Py_ssize_t kw_args;
16050  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16051  switch (pos_args) {
16052  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16053  CYTHON_FALLTHROUGH;
16054  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16055  CYTHON_FALLTHROUGH;
16056  case 0: break;
16057  default: goto __pyx_L5_argtuple_error;
16058  }
16059  kw_args = PyDict_Size(__pyx_kwds);
16060  switch (pos_args) {
16061  case 0:
16062  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16063  else goto __pyx_L5_argtuple_error;
16064  CYTHON_FALLTHROUGH;
16065  case 1:
16066  if (kw_args > 0) {
16067  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16068  if (value) { values[1] = value; kw_args--; }
16069  }
16070  }
16071  if (unlikely(kw_args > 0)) {
16072  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1678, __pyx_L3_error)
16073  }
16074  } else {
16075  switch (PyTuple_GET_SIZE(__pyx_args)) {
16076  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16077  CYTHON_FALLTHROUGH;
16078  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16079  break;
16080  default: goto __pyx_L5_argtuple_error;
16081  }
16082  }
16083  __pyx_v_obj = values[0];
16084  __pyx_v_i = values[1];
16085  }
16086  goto __pyx_L4_argument_unpacking_done;
16087  __pyx_L5_argtuple_error:;
16088  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1678, __pyx_L3_error)
16089  __pyx_L3_error:;
16090  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16091  __Pyx_RefNannyFinishContext();
16092  return NULL;
16093  __pyx_L4_argument_unpacking_done:;
16094  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
16095 
16096  /* function exit code */
16097  __Pyx_RefNannyFinishContext();
16098  return __pyx_r;
16099  }
16100 
16101  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16102  PyObject *__pyx_r = NULL;
16103  __Pyx_RefNannyDeclarations
16104  PyObject *__pyx_t_1 = NULL;
16105  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
16106  int __pyx_lineno = 0;
16107  const char *__pyx_filename = NULL;
16108  int __pyx_clineno = 0;
16109  __Pyx_RefNannySetupContext("sin", 0);
16110  __Pyx_XDECREF(__pyx_r);
16111  __pyx_t_2.__pyx_n = 1;
16112  __pyx_t_2.i = __pyx_v_i;
16113  __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)
16114  __Pyx_GOTREF(__pyx_t_1);
16115  __pyx_r = __pyx_t_1;
16116  __pyx_t_1 = 0;
16117  goto __pyx_L0;
16118 
16119  /* function exit code */
16120  __pyx_L1_error:;
16121  __Pyx_XDECREF(__pyx_t_1);
16122  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16123  __pyx_r = NULL;
16124  __pyx_L0:;
16125  __Pyx_XGIVEREF(__pyx_r);
16126  __Pyx_RefNannyFinishContext();
16127  return __pyx_r;
16128  }
16129 
16130  /* "PyClical.pyx":1697
16131  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16132  *
16133  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
16134  * """
16135  * Inverse sine of multivector with optional complexifier.
16136  */
16137 
16138  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16139  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) {
16140  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16141  PyObject *__pyx_r = NULL;
16142  __Pyx_RefNannyDeclarations
16143  int __pyx_t_1;
16144  int __pyx_t_2;
16145  PyObject *__pyx_t_3 = NULL;
16146  Clifford __pyx_t_4;
16147  PyObject *__pyx_t_5 = NULL;
16148  PyObject *__pyx_t_6 = NULL;
16149  PyObject *__pyx_t_7 = NULL;
16150  PyObject *__pyx_t_8 = NULL;
16151  PyObject *__pyx_t_9 = NULL;
16152  PyObject *__pyx_t_10 = NULL;
16153  PyObject *__pyx_t_11 = NULL;
16154  int __pyx_lineno = 0;
16155  const char *__pyx_filename = NULL;
16156  int __pyx_clineno = 0;
16157  __Pyx_RefNannySetupContext("asin", 0);
16158  if (__pyx_optional_args) {
16159  if (__pyx_optional_args->__pyx_n > 0) {
16160  __pyx_v_i = __pyx_optional_args->i;
16161  }
16162  }
16163 
16164  /* "PyClical.pyx":1710
16165  * {1,2,3}
16166  * """
16167  * if not (i is None): # <<<<<<<<<<<<<<
16168  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16169  * else:
16170  */
16171  __pyx_t_1 = (__pyx_v_i != Py_None);
16172  __pyx_t_2 = (__pyx_t_1 != 0);
16173  if (__pyx_t_2) {
16174 
16175  /* "PyClical.pyx":1711
16176  * """
16177  * if not (i is None):
16178  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16179  * else:
16180  * try:
16181  */
16182  __Pyx_XDECREF(__pyx_r);
16183  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L1_error)
16184  __Pyx_GOTREF(__pyx_t_3);
16185  try {
16186  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16187  } catch(...) {
16188  __Pyx_CppExn2PyErr();
16189  __PYX_ERR(0, 1711, __pyx_L1_error)
16190  }
16191  __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)
16192  __Pyx_GOTREF(__pyx_t_5);
16193  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16194  __pyx_r = __pyx_t_5;
16195  __pyx_t_5 = 0;
16196  goto __pyx_L0;
16197 
16198  /* "PyClical.pyx":1710
16199  * {1,2,3}
16200  * """
16201  * if not (i is None): # <<<<<<<<<<<<<<
16202  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16203  * else:
16204  */
16205  }
16206 
16207  /* "PyClical.pyx":1713
16208  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16209  * else:
16210  * try: # <<<<<<<<<<<<<<
16211  * return math.asin(obj)
16212  * except:
16213  */
16214  /*else*/ {
16215  {
16216  __Pyx_PyThreadState_declare
16217  __Pyx_PyThreadState_assign
16218  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16219  __Pyx_XGOTREF(__pyx_t_6);
16220  __Pyx_XGOTREF(__pyx_t_7);
16221  __Pyx_XGOTREF(__pyx_t_8);
16222  /*try:*/ {
16223 
16224  /* "PyClical.pyx":1714
16225  * else:
16226  * try:
16227  * return math.asin(obj) # <<<<<<<<<<<<<<
16228  * except:
16229  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16230  */
16231  __Pyx_XDECREF(__pyx_r);
16232  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L4_error)
16233  __Pyx_GOTREF(__pyx_t_3);
16234  __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)
16235  __Pyx_GOTREF(__pyx_t_9);
16236  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16237  __pyx_t_3 = NULL;
16238  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16239  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16240  if (likely(__pyx_t_3)) {
16241  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16242  __Pyx_INCREF(__pyx_t_3);
16243  __Pyx_INCREF(function);
16244  __Pyx_DECREF_SET(__pyx_t_9, function);
16245  }
16246  }
16247  __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);
16248  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16249  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L4_error)
16250  __Pyx_GOTREF(__pyx_t_5);
16251  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16252  __pyx_r = __pyx_t_5;
16253  __pyx_t_5 = 0;
16254  goto __pyx_L8_try_return;
16255 
16256  /* "PyClical.pyx":1713
16257  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16258  * else:
16259  * try: # <<<<<<<<<<<<<<
16260  * return math.asin(obj)
16261  * except:
16262  */
16263  }
16264  __pyx_L4_error:;
16265  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16266  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16267  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16268 
16269  /* "PyClical.pyx":1715
16270  * try:
16271  * return math.asin(obj)
16272  * except: # <<<<<<<<<<<<<<
16273  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16274  *
16275  */
16276  /*except:*/ {
16277  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16278  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1715, __pyx_L6_except_error)
16279  __Pyx_GOTREF(__pyx_t_5);
16280  __Pyx_GOTREF(__pyx_t_9);
16281  __Pyx_GOTREF(__pyx_t_3);
16282 
16283  /* "PyClical.pyx":1716
16284  * return math.asin(obj)
16285  * except:
16286  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
16287  *
16288  * cpdef inline sinh(obj):
16289  */
16290  __Pyx_XDECREF(__pyx_r);
16291  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1716, __pyx_L6_except_error)
16292  __Pyx_GOTREF(__pyx_t_10);
16293  __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)
16294  __Pyx_GOTREF(__pyx_t_11);
16295  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16296  __pyx_r = __pyx_t_11;
16297  __pyx_t_11 = 0;
16298  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16299  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16300  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16301  goto __pyx_L7_except_return;
16302  }
16303  __pyx_L6_except_error:;
16304 
16305  /* "PyClical.pyx":1713
16306  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16307  * else:
16308  * try: # <<<<<<<<<<<<<<
16309  * return math.asin(obj)
16310  * except:
16311  */
16312  __Pyx_XGIVEREF(__pyx_t_6);
16313  __Pyx_XGIVEREF(__pyx_t_7);
16314  __Pyx_XGIVEREF(__pyx_t_8);
16315  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16316  goto __pyx_L1_error;
16317  __pyx_L8_try_return:;
16318  __Pyx_XGIVEREF(__pyx_t_6);
16319  __Pyx_XGIVEREF(__pyx_t_7);
16320  __Pyx_XGIVEREF(__pyx_t_8);
16321  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16322  goto __pyx_L0;
16323  __pyx_L7_except_return:;
16324  __Pyx_XGIVEREF(__pyx_t_6);
16325  __Pyx_XGIVEREF(__pyx_t_7);
16326  __Pyx_XGIVEREF(__pyx_t_8);
16327  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16328  goto __pyx_L0;
16329  }
16330  }
16331 
16332  /* "PyClical.pyx":1697
16333  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16334  *
16335  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
16336  * """
16337  * Inverse sine of multivector with optional complexifier.
16338  */
16339 
16340  /* function exit code */
16341  __pyx_L1_error:;
16342  __Pyx_XDECREF(__pyx_t_3);
16343  __Pyx_XDECREF(__pyx_t_5);
16344  __Pyx_XDECREF(__pyx_t_9);
16345  __Pyx_XDECREF(__pyx_t_10);
16346  __Pyx_XDECREF(__pyx_t_11);
16347  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16348  __pyx_r = 0;
16349  __pyx_L0:;
16350  __Pyx_XGIVEREF(__pyx_r);
16351  __Pyx_RefNannyFinishContext();
16352  return __pyx_r;
16353  }
16354 
16355  /* Python wrapper */
16356  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16357  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 ";
16358  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16359  PyObject *__pyx_v_obj = 0;
16360  PyObject *__pyx_v_i = 0;
16361  int __pyx_lineno = 0;
16362  const char *__pyx_filename = NULL;
16363  int __pyx_clineno = 0;
16364  PyObject *__pyx_r = 0;
16365  __Pyx_RefNannyDeclarations
16366  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
16367  {
16368  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16369  PyObject* values[2] = {0,0};
16370  values[1] = ((PyObject *)Py_None);
16371  if (unlikely(__pyx_kwds)) {
16372  Py_ssize_t kw_args;
16373  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16374  switch (pos_args) {
16375  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16376  CYTHON_FALLTHROUGH;
16377  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16378  CYTHON_FALLTHROUGH;
16379  case 0: break;
16380  default: goto __pyx_L5_argtuple_error;
16381  }
16382  kw_args = PyDict_Size(__pyx_kwds);
16383  switch (pos_args) {
16384  case 0:
16385  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16386  else goto __pyx_L5_argtuple_error;
16387  CYTHON_FALLTHROUGH;
16388  case 1:
16389  if (kw_args > 0) {
16390  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16391  if (value) { values[1] = value; kw_args--; }
16392  }
16393  }
16394  if (unlikely(kw_args > 0)) {
16395  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1697, __pyx_L3_error)
16396  }
16397  } else {
16398  switch (PyTuple_GET_SIZE(__pyx_args)) {
16399  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16400  CYTHON_FALLTHROUGH;
16401  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16402  break;
16403  default: goto __pyx_L5_argtuple_error;
16404  }
16405  }
16406  __pyx_v_obj = values[0];
16407  __pyx_v_i = values[1];
16408  }
16409  goto __pyx_L4_argument_unpacking_done;
16410  __pyx_L5_argtuple_error:;
16411  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1697, __pyx_L3_error)
16412  __pyx_L3_error:;
16413  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16414  __Pyx_RefNannyFinishContext();
16415  return NULL;
16416  __pyx_L4_argument_unpacking_done:;
16417  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
16418 
16419  /* function exit code */
16420  __Pyx_RefNannyFinishContext();
16421  return __pyx_r;
16422  }
16423 
16424  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16425  PyObject *__pyx_r = NULL;
16426  __Pyx_RefNannyDeclarations
16427  PyObject *__pyx_t_1 = NULL;
16428  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
16429  int __pyx_lineno = 0;
16430  const char *__pyx_filename = NULL;
16431  int __pyx_clineno = 0;
16432  __Pyx_RefNannySetupContext("asin", 0);
16433  __Pyx_XDECREF(__pyx_r);
16434  __pyx_t_2.__pyx_n = 1;
16435  __pyx_t_2.i = __pyx_v_i;
16436  __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)
16437  __Pyx_GOTREF(__pyx_t_1);
16438  __pyx_r = __pyx_t_1;
16439  __pyx_t_1 = 0;
16440  goto __pyx_L0;
16441 
16442  /* function exit code */
16443  __pyx_L1_error:;
16444  __Pyx_XDECREF(__pyx_t_1);
16445  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16446  __pyx_r = NULL;
16447  __pyx_L0:;
16448  __Pyx_XGIVEREF(__pyx_r);
16449  __Pyx_RefNannyFinishContext();
16450  return __pyx_r;
16451  }
16452 
16453  /* "PyClical.pyx":1718
16454  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16455  *
16456  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16457  * """
16458  * Hyperbolic sine of multivector.
16459  */
16460 
16461  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16462  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16463  PyObject *__pyx_r = NULL;
16464  __Pyx_RefNannyDeclarations
16465  PyObject *__pyx_t_1 = NULL;
16466  PyObject *__pyx_t_2 = NULL;
16467  PyObject *__pyx_t_3 = NULL;
16468  PyObject *__pyx_t_4 = NULL;
16469  PyObject *__pyx_t_5 = NULL;
16470  PyObject *__pyx_t_6 = NULL;
16471  PyObject *__pyx_t_7 = NULL;
16472  PyObject *__pyx_t_8 = NULL;
16473  int __pyx_lineno = 0;
16474  const char *__pyx_filename = NULL;
16475  int __pyx_clineno = 0;
16476  __Pyx_RefNannySetupContext("sinh", 0);
16477 
16478  /* "PyClical.pyx":1727
16479  * 0.5{1,2}
16480  * """
16481  * try: # <<<<<<<<<<<<<<
16482  * return math.sinh(obj)
16483  * except:
16484  */
16485  {
16486  __Pyx_PyThreadState_declare
16487  __Pyx_PyThreadState_assign
16488  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16489  __Pyx_XGOTREF(__pyx_t_1);
16490  __Pyx_XGOTREF(__pyx_t_2);
16491  __Pyx_XGOTREF(__pyx_t_3);
16492  /*try:*/ {
16493 
16494  /* "PyClical.pyx":1728
16495  * """
16496  * try:
16497  * return math.sinh(obj) # <<<<<<<<<<<<<<
16498  * except:
16499  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16500  */
16501  __Pyx_XDECREF(__pyx_r);
16502  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1728, __pyx_L3_error)
16503  __Pyx_GOTREF(__pyx_t_5);
16504  __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)
16505  __Pyx_GOTREF(__pyx_t_6);
16506  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16507  __pyx_t_5 = NULL;
16508  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16509  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16510  if (likely(__pyx_t_5)) {
16511  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16512  __Pyx_INCREF(__pyx_t_5);
16513  __Pyx_INCREF(function);
16514  __Pyx_DECREF_SET(__pyx_t_6, function);
16515  }
16516  }
16517  __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);
16518  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16519  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1728, __pyx_L3_error)
16520  __Pyx_GOTREF(__pyx_t_4);
16521  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16522  __pyx_r = __pyx_t_4;
16523  __pyx_t_4 = 0;
16524  goto __pyx_L7_try_return;
16525 
16526  /* "PyClical.pyx":1727
16527  * 0.5{1,2}
16528  * """
16529  * try: # <<<<<<<<<<<<<<
16530  * return math.sinh(obj)
16531  * except:
16532  */
16533  }
16534  __pyx_L3_error:;
16535  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16536  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16537  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16538 
16539  /* "PyClical.pyx":1729
16540  * try:
16541  * return math.sinh(obj)
16542  * except: # <<<<<<<<<<<<<<
16543  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16544  *
16545  */
16546  /*except:*/ {
16547  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16548  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1729, __pyx_L5_except_error)
16549  __Pyx_GOTREF(__pyx_t_4);
16550  __Pyx_GOTREF(__pyx_t_6);
16551  __Pyx_GOTREF(__pyx_t_5);
16552 
16553  /* "PyClical.pyx":1730
16554  * return math.sinh(obj)
16555  * except:
16556  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16557  *
16558  * cpdef inline asinh(obj,i = None):
16559  */
16560  __Pyx_XDECREF(__pyx_r);
16561  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1730, __pyx_L5_except_error)
16562  __Pyx_GOTREF(__pyx_t_7);
16563  __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)
16564  __Pyx_GOTREF(__pyx_t_8);
16565  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16566  __pyx_r = __pyx_t_8;
16567  __pyx_t_8 = 0;
16568  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16569  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16570  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16571  goto __pyx_L6_except_return;
16572  }
16573  __pyx_L5_except_error:;
16574 
16575  /* "PyClical.pyx":1727
16576  * 0.5{1,2}
16577  * """
16578  * try: # <<<<<<<<<<<<<<
16579  * return math.sinh(obj)
16580  * except:
16581  */
16582  __Pyx_XGIVEREF(__pyx_t_1);
16583  __Pyx_XGIVEREF(__pyx_t_2);
16584  __Pyx_XGIVEREF(__pyx_t_3);
16585  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16586  goto __pyx_L1_error;
16587  __pyx_L7_try_return:;
16588  __Pyx_XGIVEREF(__pyx_t_1);
16589  __Pyx_XGIVEREF(__pyx_t_2);
16590  __Pyx_XGIVEREF(__pyx_t_3);
16591  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16592  goto __pyx_L0;
16593  __pyx_L6_except_return:;
16594  __Pyx_XGIVEREF(__pyx_t_1);
16595  __Pyx_XGIVEREF(__pyx_t_2);
16596  __Pyx_XGIVEREF(__pyx_t_3);
16597  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16598  goto __pyx_L0;
16599  }
16600 
16601  /* "PyClical.pyx":1718
16602  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16603  *
16604  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16605  * """
16606  * Hyperbolic sine of multivector.
16607  */
16608 
16609  /* function exit code */
16610  __pyx_L1_error:;
16611  __Pyx_XDECREF(__pyx_t_4);
16612  __Pyx_XDECREF(__pyx_t_5);
16613  __Pyx_XDECREF(__pyx_t_6);
16614  __Pyx_XDECREF(__pyx_t_7);
16615  __Pyx_XDECREF(__pyx_t_8);
16616  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16617  __pyx_r = 0;
16618  __pyx_L0:;
16619  __Pyx_XGIVEREF(__pyx_r);
16620  __Pyx_RefNannyFinishContext();
16621  return __pyx_r;
16622  }
16623 
16624  /* Python wrapper */
16625  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16626  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 ";
16627  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16628  PyObject *__pyx_r = 0;
16629  __Pyx_RefNannyDeclarations
16630  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
16631  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
16632 
16633  /* function exit code */
16634  __Pyx_RefNannyFinishContext();
16635  return __pyx_r;
16636  }
16637 
16638  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16639  PyObject *__pyx_r = NULL;
16640  __Pyx_RefNannyDeclarations
16641  PyObject *__pyx_t_1 = NULL;
16642  int __pyx_lineno = 0;
16643  const char *__pyx_filename = NULL;
16644  int __pyx_clineno = 0;
16645  __Pyx_RefNannySetupContext("sinh", 0);
16646  __Pyx_XDECREF(__pyx_r);
16647  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
16648  __Pyx_GOTREF(__pyx_t_1);
16649  __pyx_r = __pyx_t_1;
16650  __pyx_t_1 = 0;
16651  goto __pyx_L0;
16652 
16653  /* function exit code */
16654  __pyx_L1_error:;
16655  __Pyx_XDECREF(__pyx_t_1);
16656  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16657  __pyx_r = NULL;
16658  __pyx_L0:;
16659  __Pyx_XGIVEREF(__pyx_r);
16660  __Pyx_RefNannyFinishContext();
16661  return __pyx_r;
16662  }
16663 
16664  /* "PyClical.pyx":1732
16665  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16666  *
16667  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16668  * """
16669  * Inverse hyperbolic sine of multivector with optional complexifier.
16670  */
16671 
16672  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16673  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) {
16674  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16675  PyObject *__pyx_r = NULL;
16676  __Pyx_RefNannyDeclarations
16677  int __pyx_t_1;
16678  int __pyx_t_2;
16679  PyObject *__pyx_t_3 = NULL;
16680  Clifford __pyx_t_4;
16681  PyObject *__pyx_t_5 = NULL;
16682  PyObject *__pyx_t_6 = NULL;
16683  PyObject *__pyx_t_7 = NULL;
16684  PyObject *__pyx_t_8 = NULL;
16685  PyObject *__pyx_t_9 = NULL;
16686  PyObject *__pyx_t_10 = NULL;
16687  PyObject *__pyx_t_11 = NULL;
16688  int __pyx_lineno = 0;
16689  const char *__pyx_filename = NULL;
16690  int __pyx_clineno = 0;
16691  __Pyx_RefNannySetupContext("asinh", 0);
16692  if (__pyx_optional_args) {
16693  if (__pyx_optional_args->__pyx_n > 0) {
16694  __pyx_v_i = __pyx_optional_args->i;
16695  }
16696  }
16697 
16698  /* "PyClical.pyx":1743
16699  * {1,2}
16700  * """
16701  * if not (i is None): # <<<<<<<<<<<<<<
16702  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16703  * else:
16704  */
16705  __pyx_t_1 = (__pyx_v_i != Py_None);
16706  __pyx_t_2 = (__pyx_t_1 != 0);
16707  if (__pyx_t_2) {
16708 
16709  /* "PyClical.pyx":1744
16710  * """
16711  * if not (i is None):
16712  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16713  * else:
16714  * try:
16715  */
16716  __Pyx_XDECREF(__pyx_r);
16717  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1744, __pyx_L1_error)
16718  __Pyx_GOTREF(__pyx_t_3);
16719  try {
16720  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16721  } catch(...) {
16722  __Pyx_CppExn2PyErr();
16723  __PYX_ERR(0, 1744, __pyx_L1_error)
16724  }
16725  __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)
16726  __Pyx_GOTREF(__pyx_t_5);
16727  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16728  __pyx_r = __pyx_t_5;
16729  __pyx_t_5 = 0;
16730  goto __pyx_L0;
16731 
16732  /* "PyClical.pyx":1743
16733  * {1,2}
16734  * """
16735  * if not (i is None): # <<<<<<<<<<<<<<
16736  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16737  * else:
16738  */
16739  }
16740 
16741  /* "PyClical.pyx":1746
16742  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16743  * else:
16744  * try: # <<<<<<<<<<<<<<
16745  * return math.asinh(obj)
16746  * except:
16747  */
16748  /*else*/ {
16749  {
16750  __Pyx_PyThreadState_declare
16751  __Pyx_PyThreadState_assign
16752  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16753  __Pyx_XGOTREF(__pyx_t_6);
16754  __Pyx_XGOTREF(__pyx_t_7);
16755  __Pyx_XGOTREF(__pyx_t_8);
16756  /*try:*/ {
16757 
16758  /* "PyClical.pyx":1747
16759  * else:
16760  * try:
16761  * return math.asinh(obj) # <<<<<<<<<<<<<<
16762  * except:
16763  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16764  */
16765  __Pyx_XDECREF(__pyx_r);
16766  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1747, __pyx_L4_error)
16767  __Pyx_GOTREF(__pyx_t_3);
16768  __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)
16769  __Pyx_GOTREF(__pyx_t_9);
16770  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16771  __pyx_t_3 = NULL;
16772  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16773  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16774  if (likely(__pyx_t_3)) {
16775  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16776  __Pyx_INCREF(__pyx_t_3);
16777  __Pyx_INCREF(function);
16778  __Pyx_DECREF_SET(__pyx_t_9, function);
16779  }
16780  }
16781  __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);
16782  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16783  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1747, __pyx_L4_error)
16784  __Pyx_GOTREF(__pyx_t_5);
16785  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16786  __pyx_r = __pyx_t_5;
16787  __pyx_t_5 = 0;
16788  goto __pyx_L8_try_return;
16789 
16790  /* "PyClical.pyx":1746
16791  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16792  * else:
16793  * try: # <<<<<<<<<<<<<<
16794  * return math.asinh(obj)
16795  * except:
16796  */
16797  }
16798  __pyx_L4_error:;
16799  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16800  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16801  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16802 
16803  /* "PyClical.pyx":1748
16804  * try:
16805  * return math.asinh(obj)
16806  * except: # <<<<<<<<<<<<<<
16807  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16808  *
16809  */
16810  /*except:*/ {
16811  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16812  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1748, __pyx_L6_except_error)
16813  __Pyx_GOTREF(__pyx_t_5);
16814  __Pyx_GOTREF(__pyx_t_9);
16815  __Pyx_GOTREF(__pyx_t_3);
16816 
16817  /* "PyClical.pyx":1749
16818  * return math.asinh(obj)
16819  * except:
16820  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16821  *
16822  * cpdef inline tan(obj,i = None):
16823  */
16824  __Pyx_XDECREF(__pyx_r);
16825  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16826  __Pyx_GOTREF(__pyx_t_10);
16827  __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)
16828  __Pyx_GOTREF(__pyx_t_11);
16829  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16830  __pyx_r = __pyx_t_11;
16831  __pyx_t_11 = 0;
16832  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16833  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16834  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16835  goto __pyx_L7_except_return;
16836  }
16837  __pyx_L6_except_error:;
16838 
16839  /* "PyClical.pyx":1746
16840  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16841  * else:
16842  * try: # <<<<<<<<<<<<<<
16843  * return math.asinh(obj)
16844  * except:
16845  */
16846  __Pyx_XGIVEREF(__pyx_t_6);
16847  __Pyx_XGIVEREF(__pyx_t_7);
16848  __Pyx_XGIVEREF(__pyx_t_8);
16849  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16850  goto __pyx_L1_error;
16851  __pyx_L8_try_return:;
16852  __Pyx_XGIVEREF(__pyx_t_6);
16853  __Pyx_XGIVEREF(__pyx_t_7);
16854  __Pyx_XGIVEREF(__pyx_t_8);
16855  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16856  goto __pyx_L0;
16857  __pyx_L7_except_return:;
16858  __Pyx_XGIVEREF(__pyx_t_6);
16859  __Pyx_XGIVEREF(__pyx_t_7);
16860  __Pyx_XGIVEREF(__pyx_t_8);
16861  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16862  goto __pyx_L0;
16863  }
16864  }
16865 
16866  /* "PyClical.pyx":1732
16867  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16868  *
16869  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16870  * """
16871  * Inverse hyperbolic sine of multivector with optional complexifier.
16872  */
16873 
16874  /* function exit code */
16875  __pyx_L1_error:;
16876  __Pyx_XDECREF(__pyx_t_3);
16877  __Pyx_XDECREF(__pyx_t_5);
16878  __Pyx_XDECREF(__pyx_t_9);
16879  __Pyx_XDECREF(__pyx_t_10);
16880  __Pyx_XDECREF(__pyx_t_11);
16881  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16882  __pyx_r = 0;
16883  __pyx_L0:;
16884  __Pyx_XGIVEREF(__pyx_r);
16885  __Pyx_RefNannyFinishContext();
16886  return __pyx_r;
16887  }
16888 
16889  /* Python wrapper */
16890  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16891  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 ";
16892  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16893  PyObject *__pyx_v_obj = 0;
16894  PyObject *__pyx_v_i = 0;
16895  int __pyx_lineno = 0;
16896  const char *__pyx_filename = NULL;
16897  int __pyx_clineno = 0;
16898  PyObject *__pyx_r = 0;
16899  __Pyx_RefNannyDeclarations
16900  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16901  {
16902  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16903  PyObject* values[2] = {0,0};
16904  values[1] = ((PyObject *)Py_None);
16905  if (unlikely(__pyx_kwds)) {
16906  Py_ssize_t kw_args;
16907  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16908  switch (pos_args) {
16909  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16910  CYTHON_FALLTHROUGH;
16911  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16912  CYTHON_FALLTHROUGH;
16913  case 0: break;
16914  default: goto __pyx_L5_argtuple_error;
16915  }
16916  kw_args = PyDict_Size(__pyx_kwds);
16917  switch (pos_args) {
16918  case 0:
16919  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16920  else goto __pyx_L5_argtuple_error;
16921  CYTHON_FALLTHROUGH;
16922  case 1:
16923  if (kw_args > 0) {
16924  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16925  if (value) { values[1] = value; kw_args--; }
16926  }
16927  }
16928  if (unlikely(kw_args > 0)) {
16929  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1732, __pyx_L3_error)
16930  }
16931  } else {
16932  switch (PyTuple_GET_SIZE(__pyx_args)) {
16933  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16934  CYTHON_FALLTHROUGH;
16935  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16936  break;
16937  default: goto __pyx_L5_argtuple_error;
16938  }
16939  }
16940  __pyx_v_obj = values[0];
16941  __pyx_v_i = values[1];
16942  }
16943  goto __pyx_L4_argument_unpacking_done;
16944  __pyx_L5_argtuple_error:;
16945  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1732, __pyx_L3_error)
16946  __pyx_L3_error:;
16947  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16948  __Pyx_RefNannyFinishContext();
16949  return NULL;
16950  __pyx_L4_argument_unpacking_done:;
16951  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16952 
16953  /* function exit code */
16954  __Pyx_RefNannyFinishContext();
16955  return __pyx_r;
16956  }
16957 
16958  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16959  PyObject *__pyx_r = NULL;
16960  __Pyx_RefNannyDeclarations
16961  PyObject *__pyx_t_1 = NULL;
16962  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16963  int __pyx_lineno = 0;
16964  const char *__pyx_filename = NULL;
16965  int __pyx_clineno = 0;
16966  __Pyx_RefNannySetupContext("asinh", 0);
16967  __Pyx_XDECREF(__pyx_r);
16968  __pyx_t_2.__pyx_n = 1;
16969  __pyx_t_2.i = __pyx_v_i;
16970  __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)
16971  __Pyx_GOTREF(__pyx_t_1);
16972  __pyx_r = __pyx_t_1;
16973  __pyx_t_1 = 0;
16974  goto __pyx_L0;
16975 
16976  /* function exit code */
16977  __pyx_L1_error:;
16978  __Pyx_XDECREF(__pyx_t_1);
16979  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16980  __pyx_r = NULL;
16981  __pyx_L0:;
16982  __Pyx_XGIVEREF(__pyx_r);
16983  __Pyx_RefNannyFinishContext();
16984  return __pyx_r;
16985  }
16986 
16987  /* "PyClical.pyx":1751
16988  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16989  *
16990  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16991  * """
16992  * Tangent of multivector with optional complexifier.
16993  */
16994 
16995  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16996  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) {
16997  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16998  PyObject *__pyx_r = NULL;
16999  __Pyx_RefNannyDeclarations
17000  int __pyx_t_1;
17001  int __pyx_t_2;
17002  PyObject *__pyx_t_3 = NULL;
17003  Clifford __pyx_t_4;
17004  PyObject *__pyx_t_5 = NULL;
17005  PyObject *__pyx_t_6 = NULL;
17006  PyObject *__pyx_t_7 = NULL;
17007  PyObject *__pyx_t_8 = NULL;
17008  PyObject *__pyx_t_9 = NULL;
17009  PyObject *__pyx_t_10 = NULL;
17010  PyObject *__pyx_t_11 = NULL;
17011  int __pyx_lineno = 0;
17012  const char *__pyx_filename = NULL;
17013  int __pyx_clineno = 0;
17014  __Pyx_RefNannySetupContext("tan", 0);
17015  if (__pyx_optional_args) {
17016  if (__pyx_optional_args->__pyx_n > 0) {
17017  __pyx_v_i = __pyx_optional_args->i;
17018  }
17019  }
17020 
17021  /* "PyClical.pyx":1760
17022  * 0.7616{1,2}
17023  * """
17024  * if not (i is None): # <<<<<<<<<<<<<<
17025  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17026  * else:
17027  */
17028  __pyx_t_1 = (__pyx_v_i != Py_None);
17029  __pyx_t_2 = (__pyx_t_1 != 0);
17030  if (__pyx_t_2) {
17031 
17032  /* "PyClical.pyx":1761
17033  * """
17034  * if not (i is None):
17035  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17036  * else:
17037  * try:
17038  */
17039  __Pyx_XDECREF(__pyx_r);
17040  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1761, __pyx_L1_error)
17041  __Pyx_GOTREF(__pyx_t_3);
17042  try {
17043  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17044  } catch(...) {
17045  __Pyx_CppExn2PyErr();
17046  __PYX_ERR(0, 1761, __pyx_L1_error)
17047  }
17048  __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)
17049  __Pyx_GOTREF(__pyx_t_5);
17050  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17051  __pyx_r = __pyx_t_5;
17052  __pyx_t_5 = 0;
17053  goto __pyx_L0;
17054 
17055  /* "PyClical.pyx":1760
17056  * 0.7616{1,2}
17057  * """
17058  * if not (i is None): # <<<<<<<<<<<<<<
17059  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17060  * else:
17061  */
17062  }
17063 
17064  /* "PyClical.pyx":1763
17065  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17066  * else:
17067  * try: # <<<<<<<<<<<<<<
17068  * return math.tan(obj)
17069  * except:
17070  */
17071  /*else*/ {
17072  {
17073  __Pyx_PyThreadState_declare
17074  __Pyx_PyThreadState_assign
17075  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17076  __Pyx_XGOTREF(__pyx_t_6);
17077  __Pyx_XGOTREF(__pyx_t_7);
17078  __Pyx_XGOTREF(__pyx_t_8);
17079  /*try:*/ {
17080 
17081  /* "PyClical.pyx":1764
17082  * else:
17083  * try:
17084  * return math.tan(obj) # <<<<<<<<<<<<<<
17085  * except:
17086  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17087  */
17088  __Pyx_XDECREF(__pyx_r);
17089  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1764, __pyx_L4_error)
17090  __Pyx_GOTREF(__pyx_t_3);
17091  __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)
17092  __Pyx_GOTREF(__pyx_t_9);
17093  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17094  __pyx_t_3 = NULL;
17095  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17096  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17097  if (likely(__pyx_t_3)) {
17098  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17099  __Pyx_INCREF(__pyx_t_3);
17100  __Pyx_INCREF(function);
17101  __Pyx_DECREF_SET(__pyx_t_9, function);
17102  }
17103  }
17104  __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);
17105  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17106  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1764, __pyx_L4_error)
17107  __Pyx_GOTREF(__pyx_t_5);
17108  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17109  __pyx_r = __pyx_t_5;
17110  __pyx_t_5 = 0;
17111  goto __pyx_L8_try_return;
17112 
17113  /* "PyClical.pyx":1763
17114  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17115  * else:
17116  * try: # <<<<<<<<<<<<<<
17117  * return math.tan(obj)
17118  * except:
17119  */
17120  }
17121  __pyx_L4_error:;
17122  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17123  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17124  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17125 
17126  /* "PyClical.pyx":1765
17127  * try:
17128  * return math.tan(obj)
17129  * except: # <<<<<<<<<<<<<<
17130  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17131  *
17132  */
17133  /*except:*/ {
17134  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17135  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1765, __pyx_L6_except_error)
17136  __Pyx_GOTREF(__pyx_t_5);
17137  __Pyx_GOTREF(__pyx_t_9);
17138  __Pyx_GOTREF(__pyx_t_3);
17139 
17140  /* "PyClical.pyx":1766
17141  * return math.tan(obj)
17142  * except:
17143  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17144  *
17145  * cpdef inline atan(obj,i = None):
17146  */
17147  __Pyx_XDECREF(__pyx_r);
17148  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1766, __pyx_L6_except_error)
17149  __Pyx_GOTREF(__pyx_t_10);
17150  __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)
17151  __Pyx_GOTREF(__pyx_t_11);
17152  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17153  __pyx_r = __pyx_t_11;
17154  __pyx_t_11 = 0;
17155  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17156  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17157  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17158  goto __pyx_L7_except_return;
17159  }
17160  __pyx_L6_except_error:;
17161 
17162  /* "PyClical.pyx":1763
17163  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17164  * else:
17165  * try: # <<<<<<<<<<<<<<
17166  * return math.tan(obj)
17167  * except:
17168  */
17169  __Pyx_XGIVEREF(__pyx_t_6);
17170  __Pyx_XGIVEREF(__pyx_t_7);
17171  __Pyx_XGIVEREF(__pyx_t_8);
17172  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17173  goto __pyx_L1_error;
17174  __pyx_L8_try_return:;
17175  __Pyx_XGIVEREF(__pyx_t_6);
17176  __Pyx_XGIVEREF(__pyx_t_7);
17177  __Pyx_XGIVEREF(__pyx_t_8);
17178  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17179  goto __pyx_L0;
17180  __pyx_L7_except_return:;
17181  __Pyx_XGIVEREF(__pyx_t_6);
17182  __Pyx_XGIVEREF(__pyx_t_7);
17183  __Pyx_XGIVEREF(__pyx_t_8);
17184  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17185  goto __pyx_L0;
17186  }
17187  }
17188 
17189  /* "PyClical.pyx":1751
17190  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
17191  *
17192  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
17193  * """
17194  * Tangent of multivector with optional complexifier.
17195  */
17196 
17197  /* function exit code */
17198  __pyx_L1_error:;
17199  __Pyx_XDECREF(__pyx_t_3);
17200  __Pyx_XDECREF(__pyx_t_5);
17201  __Pyx_XDECREF(__pyx_t_9);
17202  __Pyx_XDECREF(__pyx_t_10);
17203  __Pyx_XDECREF(__pyx_t_11);
17204  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17205  __pyx_r = 0;
17206  __pyx_L0:;
17207  __Pyx_XGIVEREF(__pyx_r);
17208  __Pyx_RefNannyFinishContext();
17209  return __pyx_r;
17210  }
17211 
17212  /* Python wrapper */
17213  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17214  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 ";
17215  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17216  PyObject *__pyx_v_obj = 0;
17217  PyObject *__pyx_v_i = 0;
17218  int __pyx_lineno = 0;
17219  const char *__pyx_filename = NULL;
17220  int __pyx_clineno = 0;
17221  PyObject *__pyx_r = 0;
17222  __Pyx_RefNannyDeclarations
17223  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
17224  {
17225  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17226  PyObject* values[2] = {0,0};
17227  values[1] = ((PyObject *)Py_None);
17228  if (unlikely(__pyx_kwds)) {
17229  Py_ssize_t kw_args;
17230  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17231  switch (pos_args) {
17232  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17233  CYTHON_FALLTHROUGH;
17234  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17235  CYTHON_FALLTHROUGH;
17236  case 0: break;
17237  default: goto __pyx_L5_argtuple_error;
17238  }
17239  kw_args = PyDict_Size(__pyx_kwds);
17240  switch (pos_args) {
17241  case 0:
17242  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17243  else goto __pyx_L5_argtuple_error;
17244  CYTHON_FALLTHROUGH;
17245  case 1:
17246  if (kw_args > 0) {
17247  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17248  if (value) { values[1] = value; kw_args--; }
17249  }
17250  }
17251  if (unlikely(kw_args > 0)) {
17252  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1751, __pyx_L3_error)
17253  }
17254  } else {
17255  switch (PyTuple_GET_SIZE(__pyx_args)) {
17256  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17257  CYTHON_FALLTHROUGH;
17258  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17259  break;
17260  default: goto __pyx_L5_argtuple_error;
17261  }
17262  }
17263  __pyx_v_obj = values[0];
17264  __pyx_v_i = values[1];
17265  }
17266  goto __pyx_L4_argument_unpacking_done;
17267  __pyx_L5_argtuple_error:;
17268  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1751, __pyx_L3_error)
17269  __pyx_L3_error:;
17270  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17271  __Pyx_RefNannyFinishContext();
17272  return NULL;
17273  __pyx_L4_argument_unpacking_done:;
17274  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17275 
17276  /* function exit code */
17277  __Pyx_RefNannyFinishContext();
17278  return __pyx_r;
17279  }
17280 
17281  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17282  PyObject *__pyx_r = NULL;
17283  __Pyx_RefNannyDeclarations
17284  PyObject *__pyx_t_1 = NULL;
17285  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
17286  int __pyx_lineno = 0;
17287  const char *__pyx_filename = NULL;
17288  int __pyx_clineno = 0;
17289  __Pyx_RefNannySetupContext("tan", 0);
17290  __Pyx_XDECREF(__pyx_r);
17291  __pyx_t_2.__pyx_n = 1;
17292  __pyx_t_2.i = __pyx_v_i;
17293  __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)
17294  __Pyx_GOTREF(__pyx_t_1);
17295  __pyx_r = __pyx_t_1;
17296  __pyx_t_1 = 0;
17297  goto __pyx_L0;
17298 
17299  /* function exit code */
17300  __pyx_L1_error:;
17301  __Pyx_XDECREF(__pyx_t_1);
17302  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17303  __pyx_r = NULL;
17304  __pyx_L0:;
17305  __Pyx_XGIVEREF(__pyx_r);
17306  __Pyx_RefNannyFinishContext();
17307  return __pyx_r;
17308  }
17309 
17310  /* "PyClical.pyx":1768
17311  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17312  *
17313  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17314  * """
17315  * Inverse tangent of multivector with optional complexifier.
17316  */
17317 
17318  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17319  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) {
17320  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17321  PyObject *__pyx_r = NULL;
17322  __Pyx_RefNannyDeclarations
17323  int __pyx_t_1;
17324  int __pyx_t_2;
17325  PyObject *__pyx_t_3 = NULL;
17326  Clifford __pyx_t_4;
17327  PyObject *__pyx_t_5 = NULL;
17328  PyObject *__pyx_t_6 = NULL;
17329  PyObject *__pyx_t_7 = NULL;
17330  PyObject *__pyx_t_8 = NULL;
17331  PyObject *__pyx_t_9 = NULL;
17332  PyObject *__pyx_t_10 = NULL;
17333  PyObject *__pyx_t_11 = NULL;
17334  int __pyx_lineno = 0;
17335  const char *__pyx_filename = NULL;
17336  int __pyx_clineno = 0;
17337  __Pyx_RefNannySetupContext("atan", 0);
17338  if (__pyx_optional_args) {
17339  if (__pyx_optional_args->__pyx_n > 0) {
17340  __pyx_v_i = __pyx_optional_args->i;
17341  }
17342  }
17343 
17344  /* "PyClical.pyx":1777
17345  * {1}
17346  * """
17347  * if not (i is None): # <<<<<<<<<<<<<<
17348  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17349  * else:
17350  */
17351  __pyx_t_1 = (__pyx_v_i != Py_None);
17352  __pyx_t_2 = (__pyx_t_1 != 0);
17353  if (__pyx_t_2) {
17354 
17355  /* "PyClical.pyx":1778
17356  * """
17357  * if not (i is None):
17358  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17359  * else:
17360  * try:
17361  */
17362  __Pyx_XDECREF(__pyx_r);
17363  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1778, __pyx_L1_error)
17364  __Pyx_GOTREF(__pyx_t_3);
17365  try {
17366  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17367  } catch(...) {
17368  __Pyx_CppExn2PyErr();
17369  __PYX_ERR(0, 1778, __pyx_L1_error)
17370  }
17371  __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)
17372  __Pyx_GOTREF(__pyx_t_5);
17373  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17374  __pyx_r = __pyx_t_5;
17375  __pyx_t_5 = 0;
17376  goto __pyx_L0;
17377 
17378  /* "PyClical.pyx":1777
17379  * {1}
17380  * """
17381  * if not (i is None): # <<<<<<<<<<<<<<
17382  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17383  * else:
17384  */
17385  }
17386 
17387  /* "PyClical.pyx":1780
17388  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17389  * else:
17390  * try: # <<<<<<<<<<<<<<
17391  * return math.atan(obj)
17392  * except:
17393  */
17394  /*else*/ {
17395  {
17396  __Pyx_PyThreadState_declare
17397  __Pyx_PyThreadState_assign
17398  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17399  __Pyx_XGOTREF(__pyx_t_6);
17400  __Pyx_XGOTREF(__pyx_t_7);
17401  __Pyx_XGOTREF(__pyx_t_8);
17402  /*try:*/ {
17403 
17404  /* "PyClical.pyx":1781
17405  * else:
17406  * try:
17407  * return math.atan(obj) # <<<<<<<<<<<<<<
17408  * except:
17409  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17410  */
17411  __Pyx_XDECREF(__pyx_r);
17412  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L4_error)
17413  __Pyx_GOTREF(__pyx_t_3);
17414  __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)
17415  __Pyx_GOTREF(__pyx_t_9);
17416  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17417  __pyx_t_3 = NULL;
17418  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17419  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17420  if (likely(__pyx_t_3)) {
17421  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17422  __Pyx_INCREF(__pyx_t_3);
17423  __Pyx_INCREF(function);
17424  __Pyx_DECREF_SET(__pyx_t_9, function);
17425  }
17426  }
17427  __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);
17428  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17429  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1781, __pyx_L4_error)
17430  __Pyx_GOTREF(__pyx_t_5);
17431  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17432  __pyx_r = __pyx_t_5;
17433  __pyx_t_5 = 0;
17434  goto __pyx_L8_try_return;
17435 
17436  /* "PyClical.pyx":1780
17437  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17438  * else:
17439  * try: # <<<<<<<<<<<<<<
17440  * return math.atan(obj)
17441  * except:
17442  */
17443  }
17444  __pyx_L4_error:;
17445  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17446  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17447  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17448 
17449  /* "PyClical.pyx":1782
17450  * try:
17451  * return math.atan(obj)
17452  * except: # <<<<<<<<<<<<<<
17453  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17454  *
17455  */
17456  /*except:*/ {
17457  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17458  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1782, __pyx_L6_except_error)
17459  __Pyx_GOTREF(__pyx_t_5);
17460  __Pyx_GOTREF(__pyx_t_9);
17461  __Pyx_GOTREF(__pyx_t_3);
17462 
17463  /* "PyClical.pyx":1783
17464  * return math.atan(obj)
17465  * except:
17466  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17467  *
17468  * cpdef inline tanh(obj):
17469  */
17470  __Pyx_XDECREF(__pyx_r);
17471  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1783, __pyx_L6_except_error)
17472  __Pyx_GOTREF(__pyx_t_10);
17473  __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)
17474  __Pyx_GOTREF(__pyx_t_11);
17475  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17476  __pyx_r = __pyx_t_11;
17477  __pyx_t_11 = 0;
17478  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17479  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17480  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17481  goto __pyx_L7_except_return;
17482  }
17483  __pyx_L6_except_error:;
17484 
17485  /* "PyClical.pyx":1780
17486  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17487  * else:
17488  * try: # <<<<<<<<<<<<<<
17489  * return math.atan(obj)
17490  * except:
17491  */
17492  __Pyx_XGIVEREF(__pyx_t_6);
17493  __Pyx_XGIVEREF(__pyx_t_7);
17494  __Pyx_XGIVEREF(__pyx_t_8);
17495  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17496  goto __pyx_L1_error;
17497  __pyx_L8_try_return:;
17498  __Pyx_XGIVEREF(__pyx_t_6);
17499  __Pyx_XGIVEREF(__pyx_t_7);
17500  __Pyx_XGIVEREF(__pyx_t_8);
17501  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17502  goto __pyx_L0;
17503  __pyx_L7_except_return:;
17504  __Pyx_XGIVEREF(__pyx_t_6);
17505  __Pyx_XGIVEREF(__pyx_t_7);
17506  __Pyx_XGIVEREF(__pyx_t_8);
17507  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17508  goto __pyx_L0;
17509  }
17510  }
17511 
17512  /* "PyClical.pyx":1768
17513  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17514  *
17515  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17516  * """
17517  * Inverse tangent of multivector with optional complexifier.
17518  */
17519 
17520  /* function exit code */
17521  __pyx_L1_error:;
17522  __Pyx_XDECREF(__pyx_t_3);
17523  __Pyx_XDECREF(__pyx_t_5);
17524  __Pyx_XDECREF(__pyx_t_9);
17525  __Pyx_XDECREF(__pyx_t_10);
17526  __Pyx_XDECREF(__pyx_t_11);
17527  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17528  __pyx_r = 0;
17529  __pyx_L0:;
17530  __Pyx_XGIVEREF(__pyx_r);
17531  __Pyx_RefNannyFinishContext();
17532  return __pyx_r;
17533  }
17534 
17535  /* Python wrapper */
17536  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17537  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 ";
17538  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17539  PyObject *__pyx_v_obj = 0;
17540  PyObject *__pyx_v_i = 0;
17541  int __pyx_lineno = 0;
17542  const char *__pyx_filename = NULL;
17543  int __pyx_clineno = 0;
17544  PyObject *__pyx_r = 0;
17545  __Pyx_RefNannyDeclarations
17546  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
17547  {
17548  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17549  PyObject* values[2] = {0,0};
17550  values[1] = ((PyObject *)Py_None);
17551  if (unlikely(__pyx_kwds)) {
17552  Py_ssize_t kw_args;
17553  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17554  switch (pos_args) {
17555  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17556  CYTHON_FALLTHROUGH;
17557  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17558  CYTHON_FALLTHROUGH;
17559  case 0: break;
17560  default: goto __pyx_L5_argtuple_error;
17561  }
17562  kw_args = PyDict_Size(__pyx_kwds);
17563  switch (pos_args) {
17564  case 0:
17565  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17566  else goto __pyx_L5_argtuple_error;
17567  CYTHON_FALLTHROUGH;
17568  case 1:
17569  if (kw_args > 0) {
17570  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17571  if (value) { values[1] = value; kw_args--; }
17572  }
17573  }
17574  if (unlikely(kw_args > 0)) {
17575  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1768, __pyx_L3_error)
17576  }
17577  } else {
17578  switch (PyTuple_GET_SIZE(__pyx_args)) {
17579  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17580  CYTHON_FALLTHROUGH;
17581  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17582  break;
17583  default: goto __pyx_L5_argtuple_error;
17584  }
17585  }
17586  __pyx_v_obj = values[0];
17587  __pyx_v_i = values[1];
17588  }
17589  goto __pyx_L4_argument_unpacking_done;
17590  __pyx_L5_argtuple_error:;
17591  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1768, __pyx_L3_error)
17592  __pyx_L3_error:;
17593  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17594  __Pyx_RefNannyFinishContext();
17595  return NULL;
17596  __pyx_L4_argument_unpacking_done:;
17597  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17598 
17599  /* function exit code */
17600  __Pyx_RefNannyFinishContext();
17601  return __pyx_r;
17602  }
17603 
17604  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17605  PyObject *__pyx_r = NULL;
17606  __Pyx_RefNannyDeclarations
17607  PyObject *__pyx_t_1 = NULL;
17608  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
17609  int __pyx_lineno = 0;
17610  const char *__pyx_filename = NULL;
17611  int __pyx_clineno = 0;
17612  __Pyx_RefNannySetupContext("atan", 0);
17613  __Pyx_XDECREF(__pyx_r);
17614  __pyx_t_2.__pyx_n = 1;
17615  __pyx_t_2.i = __pyx_v_i;
17616  __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)
17617  __Pyx_GOTREF(__pyx_t_1);
17618  __pyx_r = __pyx_t_1;
17619  __pyx_t_1 = 0;
17620  goto __pyx_L0;
17621 
17622  /* function exit code */
17623  __pyx_L1_error:;
17624  __Pyx_XDECREF(__pyx_t_1);
17625  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17626  __pyx_r = NULL;
17627  __pyx_L0:;
17628  __Pyx_XGIVEREF(__pyx_r);
17629  __Pyx_RefNannyFinishContext();
17630  return __pyx_r;
17631  }
17632 
17633  /* "PyClical.pyx":1785
17634  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17635  *
17636  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17637  * """
17638  * Hyperbolic tangent of multivector.
17639  */
17640 
17641  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17642  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17643  PyObject *__pyx_r = NULL;
17644  __Pyx_RefNannyDeclarations
17645  PyObject *__pyx_t_1 = NULL;
17646  PyObject *__pyx_t_2 = NULL;
17647  PyObject *__pyx_t_3 = NULL;
17648  PyObject *__pyx_t_4 = NULL;
17649  PyObject *__pyx_t_5 = NULL;
17650  PyObject *__pyx_t_6 = NULL;
17651  PyObject *__pyx_t_7 = NULL;
17652  PyObject *__pyx_t_8 = NULL;
17653  int __pyx_lineno = 0;
17654  const char *__pyx_filename = NULL;
17655  int __pyx_clineno = 0;
17656  __Pyx_RefNannySetupContext("tanh", 0);
17657 
17658  /* "PyClical.pyx":1792
17659  * {1,2}
17660  * """
17661  * try: # <<<<<<<<<<<<<<
17662  * return math.tanh(obj)
17663  * except:
17664  */
17665  {
17666  __Pyx_PyThreadState_declare
17667  __Pyx_PyThreadState_assign
17668  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
17669  __Pyx_XGOTREF(__pyx_t_1);
17670  __Pyx_XGOTREF(__pyx_t_2);
17671  __Pyx_XGOTREF(__pyx_t_3);
17672  /*try:*/ {
17673 
17674  /* "PyClical.pyx":1793
17675  * """
17676  * try:
17677  * return math.tanh(obj) # <<<<<<<<<<<<<<
17678  * except:
17679  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17680  */
17681  __Pyx_XDECREF(__pyx_r);
17682  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1793, __pyx_L3_error)
17683  __Pyx_GOTREF(__pyx_t_5);
17684  __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)
17685  __Pyx_GOTREF(__pyx_t_6);
17686  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17687  __pyx_t_5 = NULL;
17688  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17689  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
17690  if (likely(__pyx_t_5)) {
17691  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17692  __Pyx_INCREF(__pyx_t_5);
17693  __Pyx_INCREF(function);
17694  __Pyx_DECREF_SET(__pyx_t_6, function);
17695  }
17696  }
17697  __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);
17698  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17699  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1793, __pyx_L3_error)
17700  __Pyx_GOTREF(__pyx_t_4);
17701  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17702  __pyx_r = __pyx_t_4;
17703  __pyx_t_4 = 0;
17704  goto __pyx_L7_try_return;
17705 
17706  /* "PyClical.pyx":1792
17707  * {1,2}
17708  * """
17709  * try: # <<<<<<<<<<<<<<
17710  * return math.tanh(obj)
17711  * except:
17712  */
17713  }
17714  __pyx_L3_error:;
17715  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17716  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17717  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17718 
17719  /* "PyClical.pyx":1794
17720  * try:
17721  * return math.tanh(obj)
17722  * except: # <<<<<<<<<<<<<<
17723  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17724  *
17725  */
17726  /*except:*/ {
17727  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17728  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1794, __pyx_L5_except_error)
17729  __Pyx_GOTREF(__pyx_t_4);
17730  __Pyx_GOTREF(__pyx_t_6);
17731  __Pyx_GOTREF(__pyx_t_5);
17732 
17733  /* "PyClical.pyx":1795
17734  * return math.tanh(obj)
17735  * except:
17736  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17737  *
17738  * cpdef inline atanh(obj,i = None):
17739  */
17740  __Pyx_XDECREF(__pyx_r);
17741  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1795, __pyx_L5_except_error)
17742  __Pyx_GOTREF(__pyx_t_7);
17743  __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)
17744  __Pyx_GOTREF(__pyx_t_8);
17745  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17746  __pyx_r = __pyx_t_8;
17747  __pyx_t_8 = 0;
17748  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17749  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17750  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17751  goto __pyx_L6_except_return;
17752  }
17753  __pyx_L5_except_error:;
17754 
17755  /* "PyClical.pyx":1792
17756  * {1,2}
17757  * """
17758  * try: # <<<<<<<<<<<<<<
17759  * return math.tanh(obj)
17760  * except:
17761  */
17762  __Pyx_XGIVEREF(__pyx_t_1);
17763  __Pyx_XGIVEREF(__pyx_t_2);
17764  __Pyx_XGIVEREF(__pyx_t_3);
17765  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17766  goto __pyx_L1_error;
17767  __pyx_L7_try_return:;
17768  __Pyx_XGIVEREF(__pyx_t_1);
17769  __Pyx_XGIVEREF(__pyx_t_2);
17770  __Pyx_XGIVEREF(__pyx_t_3);
17771  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17772  goto __pyx_L0;
17773  __pyx_L6_except_return:;
17774  __Pyx_XGIVEREF(__pyx_t_1);
17775  __Pyx_XGIVEREF(__pyx_t_2);
17776  __Pyx_XGIVEREF(__pyx_t_3);
17777  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17778  goto __pyx_L0;
17779  }
17780 
17781  /* "PyClical.pyx":1785
17782  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17783  *
17784  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17785  * """
17786  * Hyperbolic tangent of multivector.
17787  */
17788 
17789  /* function exit code */
17790  __pyx_L1_error:;
17791  __Pyx_XDECREF(__pyx_t_4);
17792  __Pyx_XDECREF(__pyx_t_5);
17793  __Pyx_XDECREF(__pyx_t_6);
17794  __Pyx_XDECREF(__pyx_t_7);
17795  __Pyx_XDECREF(__pyx_t_8);
17796  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17797  __pyx_r = 0;
17798  __pyx_L0:;
17799  __Pyx_XGIVEREF(__pyx_r);
17800  __Pyx_RefNannyFinishContext();
17801  return __pyx_r;
17802  }
17803 
17804  /* Python wrapper */
17805  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17806  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 ";
17807  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17808  PyObject *__pyx_r = 0;
17809  __Pyx_RefNannyDeclarations
17810  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17811  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17812 
17813  /* function exit code */
17814  __Pyx_RefNannyFinishContext();
17815  return __pyx_r;
17816  }
17817 
17818  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17819  PyObject *__pyx_r = NULL;
17820  __Pyx_RefNannyDeclarations
17821  PyObject *__pyx_t_1 = NULL;
17822  int __pyx_lineno = 0;
17823  const char *__pyx_filename = NULL;
17824  int __pyx_clineno = 0;
17825  __Pyx_RefNannySetupContext("tanh", 0);
17826  __Pyx_XDECREF(__pyx_r);
17827  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error)
17828  __Pyx_GOTREF(__pyx_t_1);
17829  __pyx_r = __pyx_t_1;
17830  __pyx_t_1 = 0;
17831  goto __pyx_L0;
17832 
17833  /* function exit code */
17834  __pyx_L1_error:;
17835  __Pyx_XDECREF(__pyx_t_1);
17836  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17837  __pyx_r = NULL;
17838  __pyx_L0:;
17839  __Pyx_XGIVEREF(__pyx_r);
17840  __Pyx_RefNannyFinishContext();
17841  return __pyx_r;
17842  }
17843 
17844  /* "PyClical.pyx":1797
17845  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17846  *
17847  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17848  * """
17849  * Inverse hyperbolic tangent of multivector with optional complexifier.
17850  */
17851 
17852  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17853  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) {
17854  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17855  PyObject *__pyx_r = NULL;
17856  __Pyx_RefNannyDeclarations
17857  int __pyx_t_1;
17858  int __pyx_t_2;
17859  PyObject *__pyx_t_3 = NULL;
17860  Clifford __pyx_t_4;
17861  PyObject *__pyx_t_5 = NULL;
17862  PyObject *__pyx_t_6 = NULL;
17863  PyObject *__pyx_t_7 = NULL;
17864  PyObject *__pyx_t_8 = NULL;
17865  PyObject *__pyx_t_9 = NULL;
17866  PyObject *__pyx_t_10 = NULL;
17867  PyObject *__pyx_t_11 = NULL;
17868  int __pyx_lineno = 0;
17869  const char *__pyx_filename = NULL;
17870  int __pyx_clineno = 0;
17871  __Pyx_RefNannySetupContext("atanh", 0);
17872  if (__pyx_optional_args) {
17873  if (__pyx_optional_args->__pyx_n > 0) {
17874  __pyx_v_i = __pyx_optional_args->i;
17875  }
17876  }
17877 
17878  /* "PyClical.pyx":1806
17879  * {1,2}
17880  * """
17881  * if not (i is None): # <<<<<<<<<<<<<<
17882  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17883  * else:
17884  */
17885  __pyx_t_1 = (__pyx_v_i != Py_None);
17886  __pyx_t_2 = (__pyx_t_1 != 0);
17887  if (__pyx_t_2) {
17888 
17889  /* "PyClical.pyx":1807
17890  * """
17891  * if not (i is None):
17892  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17893  * else:
17894  * try:
17895  */
17896  __Pyx_XDECREF(__pyx_r);
17897  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1807, __pyx_L1_error)
17898  __Pyx_GOTREF(__pyx_t_3);
17899  try {
17900  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17901  } catch(...) {
17902  __Pyx_CppExn2PyErr();
17903  __PYX_ERR(0, 1807, __pyx_L1_error)
17904  }
17905  __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)
17906  __Pyx_GOTREF(__pyx_t_5);
17907  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17908  __pyx_r = __pyx_t_5;
17909  __pyx_t_5 = 0;
17910  goto __pyx_L0;
17911 
17912  /* "PyClical.pyx":1806
17913  * {1,2}
17914  * """
17915  * if not (i is None): # <<<<<<<<<<<<<<
17916  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17917  * else:
17918  */
17919  }
17920 
17921  /* "PyClical.pyx":1809
17922  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17923  * else:
17924  * try: # <<<<<<<<<<<<<<
17925  * return math.atanh(obj)
17926  * except:
17927  */
17928  /*else*/ {
17929  {
17930  __Pyx_PyThreadState_declare
17931  __Pyx_PyThreadState_assign
17932  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17933  __Pyx_XGOTREF(__pyx_t_6);
17934  __Pyx_XGOTREF(__pyx_t_7);
17935  __Pyx_XGOTREF(__pyx_t_8);
17936  /*try:*/ {
17937 
17938  /* "PyClical.pyx":1810
17939  * else:
17940  * try:
17941  * return math.atanh(obj) # <<<<<<<<<<<<<<
17942  * except:
17943  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17944  */
17945  __Pyx_XDECREF(__pyx_r);
17946  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1810, __pyx_L4_error)
17947  __Pyx_GOTREF(__pyx_t_3);
17948  __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)
17949  __Pyx_GOTREF(__pyx_t_9);
17950  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17951  __pyx_t_3 = NULL;
17952  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17953  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17954  if (likely(__pyx_t_3)) {
17955  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17956  __Pyx_INCREF(__pyx_t_3);
17957  __Pyx_INCREF(function);
17958  __Pyx_DECREF_SET(__pyx_t_9, function);
17959  }
17960  }
17961  __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);
17962  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17963  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1810, __pyx_L4_error)
17964  __Pyx_GOTREF(__pyx_t_5);
17965  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17966  __pyx_r = __pyx_t_5;
17967  __pyx_t_5 = 0;
17968  goto __pyx_L8_try_return;
17969 
17970  /* "PyClical.pyx":1809
17971  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17972  * else:
17973  * try: # <<<<<<<<<<<<<<
17974  * return math.atanh(obj)
17975  * except:
17976  */
17977  }
17978  __pyx_L4_error:;
17979  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17980  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17981  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17982 
17983  /* "PyClical.pyx":1811
17984  * try:
17985  * return math.atanh(obj)
17986  * except: # <<<<<<<<<<<<<<
17987  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17988  *
17989  */
17990  /*except:*/ {
17991  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17992  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1811, __pyx_L6_except_error)
17993  __Pyx_GOTREF(__pyx_t_5);
17994  __Pyx_GOTREF(__pyx_t_9);
17995  __Pyx_GOTREF(__pyx_t_3);
17996 
17997  /* "PyClical.pyx":1812
17998  * return math.atanh(obj)
17999  * except:
18000  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
18001  *
18002  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
18003  */
18004  __Pyx_XDECREF(__pyx_r);
18005  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1812, __pyx_L6_except_error)
18006  __Pyx_GOTREF(__pyx_t_10);
18007  __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)
18008  __Pyx_GOTREF(__pyx_t_11);
18009  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18010  __pyx_r = __pyx_t_11;
18011  __pyx_t_11 = 0;
18012  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18013  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18014  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18015  goto __pyx_L7_except_return;
18016  }
18017  __pyx_L6_except_error:;
18018 
18019  /* "PyClical.pyx":1809
18020  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
18021  * else:
18022  * try: # <<<<<<<<<<<<<<
18023  * return math.atanh(obj)
18024  * except:
18025  */
18026  __Pyx_XGIVEREF(__pyx_t_6);
18027  __Pyx_XGIVEREF(__pyx_t_7);
18028  __Pyx_XGIVEREF(__pyx_t_8);
18029  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18030  goto __pyx_L1_error;
18031  __pyx_L8_try_return:;
18032  __Pyx_XGIVEREF(__pyx_t_6);
18033  __Pyx_XGIVEREF(__pyx_t_7);
18034  __Pyx_XGIVEREF(__pyx_t_8);
18035  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18036  goto __pyx_L0;
18037  __pyx_L7_except_return:;
18038  __Pyx_XGIVEREF(__pyx_t_6);
18039  __Pyx_XGIVEREF(__pyx_t_7);
18040  __Pyx_XGIVEREF(__pyx_t_8);
18041  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18042  goto __pyx_L0;
18043  }
18044  }
18045 
18046  /* "PyClical.pyx":1797
18047  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
18048  *
18049  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
18050  * """
18051  * Inverse hyperbolic tangent of multivector with optional complexifier.
18052  */
18053 
18054  /* function exit code */
18055  __pyx_L1_error:;
18056  __Pyx_XDECREF(__pyx_t_3);
18057  __Pyx_XDECREF(__pyx_t_5);
18058  __Pyx_XDECREF(__pyx_t_9);
18059  __Pyx_XDECREF(__pyx_t_10);
18060  __Pyx_XDECREF(__pyx_t_11);
18061  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18062  __pyx_r = 0;
18063  __pyx_L0:;
18064  __Pyx_XGIVEREF(__pyx_r);
18065  __Pyx_RefNannyFinishContext();
18066  return __pyx_r;
18067  }
18068 
18069  /* Python wrapper */
18070  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18071  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 ";
18072  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18073  PyObject *__pyx_v_obj = 0;
18074  PyObject *__pyx_v_i = 0;
18075  int __pyx_lineno = 0;
18076  const char *__pyx_filename = NULL;
18077  int __pyx_clineno = 0;
18078  PyObject *__pyx_r = 0;
18079  __Pyx_RefNannyDeclarations
18080  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
18081  {
18082  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
18083  PyObject* values[2] = {0,0};
18084  values[1] = ((PyObject *)Py_None);
18085  if (unlikely(__pyx_kwds)) {
18086  Py_ssize_t kw_args;
18087  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18088  switch (pos_args) {
18089  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18090  CYTHON_FALLTHROUGH;
18091  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18092  CYTHON_FALLTHROUGH;
18093  case 0: break;
18094  default: goto __pyx_L5_argtuple_error;
18095  }
18096  kw_args = PyDict_Size(__pyx_kwds);
18097  switch (pos_args) {
18098  case 0:
18099  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
18100  else goto __pyx_L5_argtuple_error;
18101  CYTHON_FALLTHROUGH;
18102  case 1:
18103  if (kw_args > 0) {
18104  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
18105  if (value) { values[1] = value; kw_args--; }
18106  }
18107  }
18108  if (unlikely(kw_args > 0)) {
18109  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1797, __pyx_L3_error)
18110  }
18111  } else {
18112  switch (PyTuple_GET_SIZE(__pyx_args)) {
18113  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18114  CYTHON_FALLTHROUGH;
18115  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18116  break;
18117  default: goto __pyx_L5_argtuple_error;
18118  }
18119  }
18120  __pyx_v_obj = values[0];
18121  __pyx_v_i = values[1];
18122  }
18123  goto __pyx_L4_argument_unpacking_done;
18124  __pyx_L5_argtuple_error:;
18125  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1797, __pyx_L3_error)
18126  __pyx_L3_error:;
18127  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18128  __Pyx_RefNannyFinishContext();
18129  return NULL;
18130  __pyx_L4_argument_unpacking_done:;
18131  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
18132 
18133  /* function exit code */
18134  __Pyx_RefNannyFinishContext();
18135  return __pyx_r;
18136  }
18137 
18138  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
18139  PyObject *__pyx_r = NULL;
18140  __Pyx_RefNannyDeclarations
18141  PyObject *__pyx_t_1 = NULL;
18142  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
18143  int __pyx_lineno = 0;
18144  const char *__pyx_filename = NULL;
18145  int __pyx_clineno = 0;
18146  __Pyx_RefNannySetupContext("atanh", 0);
18147  __Pyx_XDECREF(__pyx_r);
18148  __pyx_t_2.__pyx_n = 1;
18149  __pyx_t_2.i = __pyx_v_i;
18150  __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)
18151  __Pyx_GOTREF(__pyx_t_1);
18152  __pyx_r = __pyx_t_1;
18153  __pyx_t_1 = 0;
18154  goto __pyx_L0;
18155 
18156  /* function exit code */
18157  __pyx_L1_error:;
18158  __Pyx_XDECREF(__pyx_t_1);
18159  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18160  __pyx_r = NULL;
18161  __pyx_L0:;
18162  __Pyx_XGIVEREF(__pyx_r);
18163  __Pyx_RefNannyFinishContext();
18164  return __pyx_r;
18165  }
18166 
18167  /* "PyClical.pyx":1814
18168  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18169  *
18170  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18171  * """
18172  * Random multivector within a frame.
18173  */
18174 
18175  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18176  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) {
18177  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
18178  PyObject *__pyx_r = NULL;
18179  __Pyx_RefNannyDeclarations
18180  PyObject *__pyx_t_1 = NULL;
18181  PyObject *__pyx_t_2 = NULL;
18182  scalar_t __pyx_t_3;
18183  PyObject *__pyx_t_4 = NULL;
18184  int __pyx_lineno = 0;
18185  const char *__pyx_filename = NULL;
18186  int __pyx_clineno = 0;
18187  __Pyx_RefNannySetupContext("random_clifford", 0);
18188  if (__pyx_optional_args) {
18189  if (__pyx_optional_args->__pyx_n > 0) {
18190  __pyx_v_fill = __pyx_optional_args->fill;
18191  }
18192  }
18193 
18194  /* "PyClical.pyx":1821
18195  * {-3,-1,2}
18196  * """
18197  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
18198  *
18199  * cpdef inline cga3(obj):
18200  */
18201  __Pyx_XDECREF(__pyx_r);
18202  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
18203  __Pyx_GOTREF(__pyx_t_1);
18204  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error)
18205  __Pyx_GOTREF(__pyx_t_2);
18206  __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)
18207  __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)
18208  __Pyx_GOTREF(__pyx_t_4);
18209  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18210  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18211  __pyx_r = __pyx_t_4;
18212  __pyx_t_4 = 0;
18213  goto __pyx_L0;
18214 
18215  /* "PyClical.pyx":1814
18216  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18217  *
18218  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18219  * """
18220  * Random multivector within a frame.
18221  */
18222 
18223  /* function exit code */
18224  __pyx_L1_error:;
18225  __Pyx_XDECREF(__pyx_t_1);
18226  __Pyx_XDECREF(__pyx_t_2);
18227  __Pyx_XDECREF(__pyx_t_4);
18228  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18229  __pyx_r = 0;
18230  __pyx_L0:;
18231  __Pyx_XGIVEREF(__pyx_r);
18232  __Pyx_RefNannyFinishContext();
18233  return __pyx_r;
18234  }
18235 
18236  /* Python wrapper */
18237  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18238  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 ";
18239  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18240  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
18241  PyObject *__pyx_v_fill = 0;
18242  int __pyx_lineno = 0;
18243  const char *__pyx_filename = NULL;
18244  int __pyx_clineno = 0;
18245  PyObject *__pyx_r = 0;
18246  __Pyx_RefNannyDeclarations
18247  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
18248  {
18249  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
18250  PyObject* values[2] = {0,0};
18251  values[1] = ((PyObject *)__pyx_float_1_0);
18252  if (unlikely(__pyx_kwds)) {
18253  Py_ssize_t kw_args;
18254  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18255  switch (pos_args) {
18256  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18257  CYTHON_FALLTHROUGH;
18258  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18259  CYTHON_FALLTHROUGH;
18260  case 0: break;
18261  default: goto __pyx_L5_argtuple_error;
18262  }
18263  kw_args = PyDict_Size(__pyx_kwds);
18264  switch (pos_args) {
18265  case 0:
18266  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
18267  else goto __pyx_L5_argtuple_error;
18268  CYTHON_FALLTHROUGH;
18269  case 1:
18270  if (kw_args > 0) {
18271  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
18272  if (value) { values[1] = value; kw_args--; }
18273  }
18274  }
18275  if (unlikely(kw_args > 0)) {
18276  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1814, __pyx_L3_error)
18277  }
18278  } else {
18279  switch (PyTuple_GET_SIZE(__pyx_args)) {
18280  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18281  CYTHON_FALLTHROUGH;
18282  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18283  break;
18284  default: goto __pyx_L5_argtuple_error;
18285  }
18286  }
18287  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
18288  __pyx_v_fill = values[1];
18289  }
18290  goto __pyx_L4_argument_unpacking_done;
18291  __pyx_L5_argtuple_error:;
18292  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1814, __pyx_L3_error)
18293  __pyx_L3_error:;
18294  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18295  __Pyx_RefNannyFinishContext();
18296  return NULL;
18297  __pyx_L4_argument_unpacking_done:;
18298  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1814, __pyx_L1_error)
18299  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
18300 
18301  /* function exit code */
18302  goto __pyx_L0;
18303  __pyx_L1_error:;
18304  __pyx_r = NULL;
18305  __pyx_L0:;
18306  __Pyx_RefNannyFinishContext();
18307  return __pyx_r;
18308  }
18309 
18310  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) {
18311  PyObject *__pyx_r = NULL;
18312  __Pyx_RefNannyDeclarations
18313  PyObject *__pyx_t_1 = NULL;
18314  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
18315  int __pyx_lineno = 0;
18316  const char *__pyx_filename = NULL;
18317  int __pyx_clineno = 0;
18318  __Pyx_RefNannySetupContext("random_clifford", 0);
18319  __Pyx_XDECREF(__pyx_r);
18320  __pyx_t_2.__pyx_n = 1;
18321  __pyx_t_2.fill = __pyx_v_fill;
18322  __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)
18323  __Pyx_GOTREF(__pyx_t_1);
18324  __pyx_r = __pyx_t_1;
18325  __pyx_t_1 = 0;
18326  goto __pyx_L0;
18327 
18328  /* function exit code */
18329  __pyx_L1_error:;
18330  __Pyx_XDECREF(__pyx_t_1);
18331  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18332  __pyx_r = NULL;
18333  __pyx_L0:;
18334  __Pyx_XGIVEREF(__pyx_r);
18335  __Pyx_RefNannyFinishContext();
18336  return __pyx_r;
18337  }
18338 
18339  /* "PyClical.pyx":1823
18340  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18341  *
18342  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18343  * """
18344  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18345  */
18346 
18347  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18348  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18349  PyObject *__pyx_r = NULL;
18350  __Pyx_RefNannyDeclarations
18351  PyObject *__pyx_t_1 = NULL;
18352  PyObject *__pyx_t_2 = NULL;
18353  int __pyx_lineno = 0;
18354  const char *__pyx_filename = NULL;
18355  int __pyx_clineno = 0;
18356  __Pyx_RefNannySetupContext("cga3", 0);
18357 
18358  /* "PyClical.pyx":1830
18359  * 87{-1}+4{1}+18{2}+2{3}+85{4}
18360  * """
18361  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18362  *
18363  * cpdef inline cga3std(obj):
18364  */
18365  __Pyx_XDECREF(__pyx_r);
18366  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
18367  __Pyx_GOTREF(__pyx_t_1);
18368  __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)
18369  __Pyx_GOTREF(__pyx_t_2);
18370  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18371  __pyx_r = __pyx_t_2;
18372  __pyx_t_2 = 0;
18373  goto __pyx_L0;
18374 
18375  /* "PyClical.pyx":1823
18376  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18377  *
18378  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18379  * """
18380  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18381  */
18382 
18383  /* function exit code */
18384  __pyx_L1_error:;
18385  __Pyx_XDECREF(__pyx_t_1);
18386  __Pyx_XDECREF(__pyx_t_2);
18387  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18388  __pyx_r = 0;
18389  __pyx_L0:;
18390  __Pyx_XGIVEREF(__pyx_r);
18391  __Pyx_RefNannyFinishContext();
18392  return __pyx_r;
18393  }
18394 
18395  /* Python wrapper */
18396  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18397  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 ";
18398  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18399  PyObject *__pyx_r = 0;
18400  __Pyx_RefNannyDeclarations
18401  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
18402  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
18403 
18404  /* function exit code */
18405  __Pyx_RefNannyFinishContext();
18406  return __pyx_r;
18407  }
18408 
18409  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18410  PyObject *__pyx_r = NULL;
18411  __Pyx_RefNannyDeclarations
18412  PyObject *__pyx_t_1 = NULL;
18413  int __pyx_lineno = 0;
18414  const char *__pyx_filename = NULL;
18415  int __pyx_clineno = 0;
18416  __Pyx_RefNannySetupContext("cga3", 0);
18417  __Pyx_XDECREF(__pyx_r);
18418  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1823, __pyx_L1_error)
18419  __Pyx_GOTREF(__pyx_t_1);
18420  __pyx_r = __pyx_t_1;
18421  __pyx_t_1 = 0;
18422  goto __pyx_L0;
18423 
18424  /* function exit code */
18425  __pyx_L1_error:;
18426  __Pyx_XDECREF(__pyx_t_1);
18427  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18428  __pyx_r = NULL;
18429  __pyx_L0:;
18430  __Pyx_XGIVEREF(__pyx_r);
18431  __Pyx_RefNannyFinishContext();
18432  return __pyx_r;
18433  }
18434 
18435  /* "PyClical.pyx":1832
18436  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18437  *
18438  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18439  * """
18440  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18441  */
18442 
18443  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18444  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18445  PyObject *__pyx_r = NULL;
18446  __Pyx_RefNannyDeclarations
18447  PyObject *__pyx_t_1 = NULL;
18448  PyObject *__pyx_t_2 = NULL;
18449  int __pyx_lineno = 0;
18450  const char *__pyx_filename = NULL;
18451  int __pyx_clineno = 0;
18452  __Pyx_RefNannySetupContext("cga3std", 0);
18453 
18454  /* "PyClical.pyx":1841
18455  * 0
18456  * """
18457  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
18458  *
18459  * cpdef inline agc3(obj):
18460  */
18461  __Pyx_XDECREF(__pyx_r);
18462  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error)
18463  __Pyx_GOTREF(__pyx_t_1);
18464  __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)
18465  __Pyx_GOTREF(__pyx_t_2);
18466  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18467  __pyx_r = __pyx_t_2;
18468  __pyx_t_2 = 0;
18469  goto __pyx_L0;
18470 
18471  /* "PyClical.pyx":1832
18472  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18473  *
18474  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18475  * """
18476  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18477  */
18478 
18479  /* function exit code */
18480  __pyx_L1_error:;
18481  __Pyx_XDECREF(__pyx_t_1);
18482  __Pyx_XDECREF(__pyx_t_2);
18483  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18484  __pyx_r = 0;
18485  __pyx_L0:;
18486  __Pyx_XGIVEREF(__pyx_r);
18487  __Pyx_RefNannyFinishContext();
18488  return __pyx_r;
18489  }
18490 
18491  /* Python wrapper */
18492  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18493  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 ";
18494  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18495  PyObject *__pyx_r = 0;
18496  __Pyx_RefNannyDeclarations
18497  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
18498  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
18499 
18500  /* function exit code */
18501  __Pyx_RefNannyFinishContext();
18502  return __pyx_r;
18503  }
18504 
18505  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18506  PyObject *__pyx_r = NULL;
18507  __Pyx_RefNannyDeclarations
18508  PyObject *__pyx_t_1 = NULL;
18509  int __pyx_lineno = 0;
18510  const char *__pyx_filename = NULL;
18511  int __pyx_clineno = 0;
18512  __Pyx_RefNannySetupContext("cga3std", 0);
18513  __Pyx_XDECREF(__pyx_r);
18514  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L1_error)
18515  __Pyx_GOTREF(__pyx_t_1);
18516  __pyx_r = __pyx_t_1;
18517  __pyx_t_1 = 0;
18518  goto __pyx_L0;
18519 
18520  /* function exit code */
18521  __pyx_L1_error:;
18522  __Pyx_XDECREF(__pyx_t_1);
18523  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18524  __pyx_r = NULL;
18525  __pyx_L0:;
18526  __Pyx_XGIVEREF(__pyx_r);
18527  __Pyx_RefNannyFinishContext();
18528  return __pyx_r;
18529  }
18530 
18531  /* "PyClical.pyx":1843
18532  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18533  *
18534  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18535  * """
18536  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18537  */
18538 
18539  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18540  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18541  PyObject *__pyx_r = NULL;
18542  __Pyx_RefNannyDeclarations
18543  PyObject *__pyx_t_1 = NULL;
18544  PyObject *__pyx_t_2 = NULL;
18545  int __pyx_lineno = 0;
18546  const char *__pyx_filename = NULL;
18547  int __pyx_clineno = 0;
18548  __Pyx_RefNannySetupContext("agc3", 0);
18549 
18550  /* "PyClical.pyx":1852
18551  * 0
18552  * """
18553  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18554  *
18555  * # Some abbreviations.
18556  */
18557  __Pyx_XDECREF(__pyx_r);
18558  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error)
18559  __Pyx_GOTREF(__pyx_t_1);
18560  __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)
18561  __Pyx_GOTREF(__pyx_t_2);
18562  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18563  __pyx_r = __pyx_t_2;
18564  __pyx_t_2 = 0;
18565  goto __pyx_L0;
18566 
18567  /* "PyClical.pyx":1843
18568  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18569  *
18570  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18571  * """
18572  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18573  */
18574 
18575  /* function exit code */
18576  __pyx_L1_error:;
18577  __Pyx_XDECREF(__pyx_t_1);
18578  __Pyx_XDECREF(__pyx_t_2);
18579  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18580  __pyx_r = 0;
18581  __pyx_L0:;
18582  __Pyx_XGIVEREF(__pyx_r);
18583  __Pyx_RefNannyFinishContext();
18584  return __pyx_r;
18585  }
18586 
18587  /* Python wrapper */
18588  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18589  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 ";
18590  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18591  PyObject *__pyx_r = 0;
18592  __Pyx_RefNannyDeclarations
18593  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
18594  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
18595 
18596  /* function exit code */
18597  __Pyx_RefNannyFinishContext();
18598  return __pyx_r;
18599  }
18600 
18601  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18602  PyObject *__pyx_r = NULL;
18603  __Pyx_RefNannyDeclarations
18604  PyObject *__pyx_t_1 = NULL;
18605  int __pyx_lineno = 0;
18606  const char *__pyx_filename = NULL;
18607  int __pyx_clineno = 0;
18608  __Pyx_RefNannySetupContext("agc3", 0);
18609  __Pyx_XDECREF(__pyx_r);
18610  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
18611  __Pyx_GOTREF(__pyx_t_1);
18612  __pyx_r = __pyx_t_1;
18613  __pyx_t_1 = 0;
18614  goto __pyx_L0;
18615 
18616  /* function exit code */
18617  __pyx_L1_error:;
18618  __Pyx_XDECREF(__pyx_t_1);
18619  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18620  __pyx_r = NULL;
18621  __pyx_L0:;
18622  __Pyx_XGIVEREF(__pyx_r);
18623  __Pyx_RefNannyFinishContext();
18624  return __pyx_r;
18625  }
18626 
18627  /* "PyClical.pyx":1886
18628  * """
18629  *
18630  * def e(obj): # <<<<<<<<<<<<<<
18631  * """
18632  * Abbreviation for clifford(index_set(obj)).
18633  */
18634 
18635  /* Python wrapper */
18636  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18637  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 ";
18638  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
18639  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18640  PyObject *__pyx_r = 0;
18641  __Pyx_RefNannyDeclarations
18642  __Pyx_RefNannySetupContext("e (wrapper)", 0);
18643  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
18644 
18645  /* function exit code */
18646  __Pyx_RefNannyFinishContext();
18647  return __pyx_r;
18648  }
18649 
18650  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18651  PyObject *__pyx_r = NULL;
18652  __Pyx_RefNannyDeclarations
18653  PyObject *__pyx_t_1 = NULL;
18654  PyObject *__pyx_t_2 = NULL;
18655  int __pyx_lineno = 0;
18656  const char *__pyx_filename = NULL;
18657  int __pyx_clineno = 0;
18658  __Pyx_RefNannySetupContext("e", 0);
18659 
18660  /* "PyClical.pyx":1897
18661  * 1
18662  * """
18663  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
18664  *
18665  * def istpq(p, q):
18666  */
18667  __Pyx_XDECREF(__pyx_r);
18668  __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)
18669  __Pyx_GOTREF(__pyx_t_1);
18670  __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)
18671  __Pyx_GOTREF(__pyx_t_2);
18672  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18673  __pyx_r = __pyx_t_2;
18674  __pyx_t_2 = 0;
18675  goto __pyx_L0;
18676 
18677  /* "PyClical.pyx":1886
18678  * """
18679  *
18680  * def e(obj): # <<<<<<<<<<<<<<
18681  * """
18682  * Abbreviation for clifford(index_set(obj)).
18683  */
18684 
18685  /* function exit code */
18686  __pyx_L1_error:;
18687  __Pyx_XDECREF(__pyx_t_1);
18688  __Pyx_XDECREF(__pyx_t_2);
18689  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
18690  __pyx_r = NULL;
18691  __pyx_L0:;
18692  __Pyx_XGIVEREF(__pyx_r);
18693  __Pyx_RefNannyFinishContext();
18694  return __pyx_r;
18695  }
18696 
18697  /* "PyClical.pyx":1899
18698  * return clifford(index_set(obj))
18699  *
18700  * def istpq(p, q): # <<<<<<<<<<<<<<
18701  * """
18702  * Abbreviation for index_set({-q,...p}).
18703  */
18704 
18705  /* Python wrapper */
18706  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18707  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 ";
18708  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
18709  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18710  PyObject *__pyx_v_p = 0;
18711  PyObject *__pyx_v_q = 0;
18712  int __pyx_lineno = 0;
18713  const char *__pyx_filename = NULL;
18714  int __pyx_clineno = 0;
18715  PyObject *__pyx_r = 0;
18716  __Pyx_RefNannyDeclarations
18717  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
18718  {
18719  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
18720  PyObject* values[2] = {0,0};
18721  if (unlikely(__pyx_kwds)) {
18722  Py_ssize_t kw_args;
18723  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18724  switch (pos_args) {
18725  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18726  CYTHON_FALLTHROUGH;
18727  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18728  CYTHON_FALLTHROUGH;
18729  case 0: break;
18730  default: goto __pyx_L5_argtuple_error;
18731  }
18732  kw_args = PyDict_Size(__pyx_kwds);
18733  switch (pos_args) {
18734  case 0:
18735  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
18736  else goto __pyx_L5_argtuple_error;
18737  CYTHON_FALLTHROUGH;
18738  case 1:
18739  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
18740  else {
18741  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1899, __pyx_L3_error)
18742  }
18743  }
18744  if (unlikely(kw_args > 0)) {
18745  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1899, __pyx_L3_error)
18746  }
18747  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18748  goto __pyx_L5_argtuple_error;
18749  } else {
18750  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18751  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18752  }
18753  __pyx_v_p = values[0];
18754  __pyx_v_q = values[1];
18755  }
18756  goto __pyx_L4_argument_unpacking_done;
18757  __pyx_L5_argtuple_error:;
18758  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1899, __pyx_L3_error)
18759  __pyx_L3_error:;
18760  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18761  __Pyx_RefNannyFinishContext();
18762  return NULL;
18763  __pyx_L4_argument_unpacking_done:;
18764  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18765 
18766  /* function exit code */
18767  __Pyx_RefNannyFinishContext();
18768  return __pyx_r;
18769  }
18770 
18771  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18772  PyObject *__pyx_r = NULL;
18773  __Pyx_RefNannyDeclarations
18774  PyObject *__pyx_t_1 = NULL;
18775  PyObject *__pyx_t_2 = NULL;
18776  PyObject *__pyx_t_3 = NULL;
18777  int __pyx_lineno = 0;
18778  const char *__pyx_filename = NULL;
18779  int __pyx_clineno = 0;
18780  __Pyx_RefNannySetupContext("istpq", 0);
18781 
18782  /* "PyClical.pyx":1906
18783  * {-3,-2,-1,1,2}
18784  * """
18785  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
18786  *
18787  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18788  */
18789  __Pyx_XDECREF(__pyx_r);
18790  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error)
18791  __Pyx_GOTREF(__pyx_t_1);
18792  __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)
18793  __Pyx_GOTREF(__pyx_t_2);
18794  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error)
18795  __Pyx_GOTREF(__pyx_t_3);
18796  __Pyx_GIVEREF(__pyx_t_1);
18797  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18798  __Pyx_GIVEREF(__pyx_t_2);
18799  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18800  __pyx_t_1 = 0;
18801  __pyx_t_2 = 0;
18802  __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)
18803  __Pyx_GOTREF(__pyx_t_2);
18804  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18805  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error)
18806  __Pyx_GOTREF(__pyx_t_3);
18807  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18808  __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)
18809  __Pyx_GOTREF(__pyx_t_2);
18810  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18811  __pyx_r = __pyx_t_2;
18812  __pyx_t_2 = 0;
18813  goto __pyx_L0;
18814 
18815  /* "PyClical.pyx":1899
18816  * return clifford(index_set(obj))
18817  *
18818  * def istpq(p, q): # <<<<<<<<<<<<<<
18819  * """
18820  * Abbreviation for index_set({-q,...p}).
18821  */
18822 
18823  /* function exit code */
18824  __pyx_L1_error:;
18825  __Pyx_XDECREF(__pyx_t_1);
18826  __Pyx_XDECREF(__pyx_t_2);
18827  __Pyx_XDECREF(__pyx_t_3);
18828  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18829  __pyx_r = NULL;
18830  __pyx_L0:;
18831  __Pyx_XGIVEREF(__pyx_r);
18832  __Pyx_RefNannyFinishContext();
18833  return __pyx_r;
18834  }
18835 
18836  /* "PyClical.pyx":1912
18837  *
18838  * # Doctest interface.
18839  * def _test(): # <<<<<<<<<<<<<<
18840  * import PyClical, doctest
18841  * return doctest.testmod(PyClical)
18842  */
18843 
18844  /* Python wrapper */
18845  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18846  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18847  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18848  PyObject *__pyx_r = 0;
18849  __Pyx_RefNannyDeclarations
18850  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18851  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18852 
18853  /* function exit code */
18854  __Pyx_RefNannyFinishContext();
18855  return __pyx_r;
18856  }
18857 
18858  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18859  PyObject *__pyx_v_PyClical = NULL;
18860  PyObject *__pyx_v_doctest = NULL;
18861  PyObject *__pyx_r = NULL;
18862  __Pyx_RefNannyDeclarations
18863  PyObject *__pyx_t_1 = NULL;
18864  PyObject *__pyx_t_2 = NULL;
18865  PyObject *__pyx_t_3 = NULL;
18866  int __pyx_lineno = 0;
18867  const char *__pyx_filename = NULL;
18868  int __pyx_clineno = 0;
18869  __Pyx_RefNannySetupContext("_test", 0);
18870 
18871  /* "PyClical.pyx":1913
18872  * # Doctest interface.
18873  * def _test():
18874  * import PyClical, doctest # <<<<<<<<<<<<<<
18875  * return doctest.testmod(PyClical)
18876  *
18877  */
18878  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
18879  __Pyx_GOTREF(__pyx_t_1);
18880  __pyx_v_PyClical = __pyx_t_1;
18881  __pyx_t_1 = 0;
18882  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
18883  __Pyx_GOTREF(__pyx_t_1);
18884  __pyx_v_doctest = __pyx_t_1;
18885  __pyx_t_1 = 0;
18886 
18887  /* "PyClical.pyx":1914
18888  * def _test():
18889  * import PyClical, doctest
18890  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18891  *
18892  * if __name__ == "__main__":
18893  */
18894  __Pyx_XDECREF(__pyx_r);
18895  __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)
18896  __Pyx_GOTREF(__pyx_t_2);
18897  __pyx_t_3 = NULL;
18898  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18899  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18900  if (likely(__pyx_t_3)) {
18901  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18902  __Pyx_INCREF(__pyx_t_3);
18903  __Pyx_INCREF(function);
18904  __Pyx_DECREF_SET(__pyx_t_2, function);
18905  }
18906  }
18907  __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);
18908  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18909  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18910  __Pyx_GOTREF(__pyx_t_1);
18911  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18912  __pyx_r = __pyx_t_1;
18913  __pyx_t_1 = 0;
18914  goto __pyx_L0;
18915 
18916  /* "PyClical.pyx":1912
18917  *
18918  * # Doctest interface.
18919  * def _test(): # <<<<<<<<<<<<<<
18920  * import PyClical, doctest
18921  * return doctest.testmod(PyClical)
18922  */
18923 
18924  /* function exit code */
18925  __pyx_L1_error:;
18926  __Pyx_XDECREF(__pyx_t_1);
18927  __Pyx_XDECREF(__pyx_t_2);
18928  __Pyx_XDECREF(__pyx_t_3);
18929  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18930  __pyx_r = NULL;
18931  __pyx_L0:;
18932  __Pyx_XDECREF(__pyx_v_PyClical);
18933  __Pyx_XDECREF(__pyx_v_doctest);
18934  __Pyx_XGIVEREF(__pyx_r);
18935  __Pyx_RefNannyFinishContext();
18936  return __pyx_r;
18937  }
18938 
18939  /* "string.to_py":31
18940  *
18941  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
18942  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18943  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
18944  * cdef extern from *:
18945  */
18946 
18947  static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) {
18948  PyObject *__pyx_r = NULL;
18949  __Pyx_RefNannyDeclarations
18950  PyObject *__pyx_t_1 = NULL;
18951  int __pyx_lineno = 0;
18952  const char *__pyx_filename = NULL;
18953  int __pyx_clineno = 0;
18954  __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0);
18955 
18956  /* "string.to_py":32
18957  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
18958  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):
18959  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
18960  * cdef extern from *:
18961  * cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
18962  */
18963  __Pyx_XDECREF(__pyx_r);
18964  __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)
18965  __Pyx_GOTREF(__pyx_t_1);
18966  __pyx_r = __pyx_t_1;
18967  __pyx_t_1 = 0;
18968  goto __pyx_L0;
18969 
18970  /* "string.to_py":31
18971  *
18972  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
18973  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18974  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
18975  * cdef extern from *:
18976  */
18977 
18978  /* function exit code */
18979  __pyx_L1_error:;
18980  __Pyx_XDECREF(__pyx_t_1);
18981  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
18982  __pyx_r = 0;
18983  __pyx_L0:;
18984  __Pyx_XGIVEREF(__pyx_r);
18985  __Pyx_RefNannyFinishContext();
18986  return __pyx_r;
18987  }
18988 
18989  /* "string.to_py":37
18990  *
18991  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
18992  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18993  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
18994  * cdef extern from *:
18995  */
18996 
18997  static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) {
18998  PyObject *__pyx_r = NULL;
18999  __Pyx_RefNannyDeclarations
19000  PyObject *__pyx_t_1 = NULL;
19001  int __pyx_lineno = 0;
19002  const char *__pyx_filename = NULL;
19003  int __pyx_clineno = 0;
19004  __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0);
19005 
19006  /* "string.to_py":38
19007  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
19008  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):
19009  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19010  * cdef extern from *:
19011  * cdef object __Pyx_PyStr_FromStringAndSize(const char*, size_t)
19012  */
19013  __Pyx_XDECREF(__pyx_r);
19014  __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)
19015  __Pyx_GOTREF(__pyx_t_1);
19016  __pyx_r = __pyx_t_1;
19017  __pyx_t_1 = 0;
19018  goto __pyx_L0;
19019 
19020  /* "string.to_py":37
19021  *
19022  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
19023  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19024  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
19025  * cdef extern from *:
19026  */
19027 
19028  /* function exit code */
19029  __pyx_L1_error:;
19030  __Pyx_XDECREF(__pyx_t_1);
19031  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19032  __pyx_r = 0;
19033  __pyx_L0:;
19034  __Pyx_XGIVEREF(__pyx_r);
19035  __Pyx_RefNannyFinishContext();
19036  return __pyx_r;
19037  }
19038 
19039  /* "string.to_py":43
19040  *
19041  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
19042  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19043  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
19044  * cdef extern from *:
19045  */
19046 
19047  static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19048  PyObject *__pyx_r = NULL;
19049  __Pyx_RefNannyDeclarations
19050  PyObject *__pyx_t_1 = NULL;
19051  int __pyx_lineno = 0;
19052  const char *__pyx_filename = NULL;
19053  int __pyx_clineno = 0;
19054  __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0);
19055 
19056  /* "string.to_py":44
19057  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
19058  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):
19059  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19060  * cdef extern from *:
19061  * cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
19062  */
19063  __Pyx_XDECREF(__pyx_r);
19064  __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)
19065  __Pyx_GOTREF(__pyx_t_1);
19066  __pyx_r = __pyx_t_1;
19067  __pyx_t_1 = 0;
19068  goto __pyx_L0;
19069 
19070  /* "string.to_py":43
19071  *
19072  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
19073  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19074  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
19075  * cdef extern from *:
19076  */
19077 
19078  /* function exit code */
19079  __pyx_L1_error:;
19080  __Pyx_XDECREF(__pyx_t_1);
19081  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19082  __pyx_r = 0;
19083  __pyx_L0:;
19084  __Pyx_XGIVEREF(__pyx_r);
19085  __Pyx_RefNannyFinishContext();
19086  return __pyx_r;
19087  }
19088 
19089  /* "string.to_py":49
19090  *
19091  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
19092  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19093  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
19094  * cdef extern from *:
19095  */
19096 
19097  static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19098  PyObject *__pyx_r = NULL;
19099  __Pyx_RefNannyDeclarations
19100  PyObject *__pyx_t_1 = NULL;
19101  int __pyx_lineno = 0;
19102  const char *__pyx_filename = NULL;
19103  int __pyx_clineno = 0;
19104  __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0);
19105 
19106  /* "string.to_py":50
19107  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
19108  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):
19109  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19110  * cdef extern from *:
19111  * cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
19112  */
19113  __Pyx_XDECREF(__pyx_r);
19114  __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)
19115  __Pyx_GOTREF(__pyx_t_1);
19116  __pyx_r = __pyx_t_1;
19117  __pyx_t_1 = 0;
19118  goto __pyx_L0;
19119 
19120  /* "string.to_py":49
19121  *
19122  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
19123  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19124  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
19125  * cdef extern from *:
19126  */
19127 
19128  /* function exit code */
19129  __pyx_L1_error:;
19130  __Pyx_XDECREF(__pyx_t_1);
19131  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19132  __pyx_r = 0;
19133  __pyx_L0:;
19134  __Pyx_XGIVEREF(__pyx_r);
19135  __Pyx_RefNannyFinishContext();
19136  return __pyx_r;
19137  }
19138 
19139  /* "string.to_py":55
19140  *
19141  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
19142  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19143  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
19144  *
19145  */
19146 
19147  static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19148  PyObject *__pyx_r = NULL;
19149  __Pyx_RefNannyDeclarations
19150  PyObject *__pyx_t_1 = NULL;
19151  int __pyx_lineno = 0;
19152  const char *__pyx_filename = NULL;
19153  int __pyx_clineno = 0;
19154  __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0);
19155 
19156  /* "string.to_py":56
19157  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
19158  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):
19159  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19160  *
19161  */
19162  __Pyx_XDECREF(__pyx_r);
19163  __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)
19164  __Pyx_GOTREF(__pyx_t_1);
19165  __pyx_r = __pyx_t_1;
19166  __pyx_t_1 = 0;
19167  goto __pyx_L0;
19168 
19169  /* "string.to_py":55
19170  *
19171  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
19172  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19173  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
19174  *
19175  */
19176 
19177  /* function exit code */
19178  __pyx_L1_error:;
19179  __Pyx_XDECREF(__pyx_t_1);
19180  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19181  __pyx_r = 0;
19182  __pyx_L0:;
19183  __Pyx_XGIVEREF(__pyx_r);
19184  __Pyx_RefNannyFinishContext();
19185  return __pyx_r;
19186  }
19187  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
19188 
19189  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
19190  struct __pyx_obj_8PyClical_index_set *p;
19191  PyObject *o;
19192  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19193  o = (*t->tp_alloc)(t, 0);
19194  } else {
19195  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19196  }
19197  if (unlikely(!o)) return 0;
19198  p = ((struct __pyx_obj_8PyClical_index_set *)o);
19199  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
19200  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
19201  return o;
19202  bad:
19203  Py_DECREF(o); o = 0;
19204  return NULL;
19205  }
19206 
19207  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
19208  #if CYTHON_USE_TP_FINALIZE
19209  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))) {
19210  if (PyObject_CallFinalizerFromDealloc(o)) return;
19211  }
19212  #endif
19213  {
19214  PyObject *etype, *eval, *etb;
19215  PyErr_Fetch(&etype, &eval, &etb);
19216  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
19217  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
19218  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
19219  PyErr_Restore(etype, eval, etb);
19220  }
19221  (*Py_TYPE(o)->tp_free)(o);
19222  }
19223  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
19224  PyObject *r;
19225  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19226  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19227  Py_DECREF(x);
19228  return r;
19229  }
19230 
19231  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
19232  if (v) {
19233  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
19234  }
19235  else {
19236  PyErr_Format(PyExc_NotImplementedError,
19237  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
19238  return -1;
19239  }
19240  }
19241 
19242  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
19243  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
19244  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
19245  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
19246  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
19247  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
19248  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
19249  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
19250  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
19251  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
19252  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
19253  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
19254  {0, 0, 0, 0}
19255  };
19256 
19257  static PyNumberMethods __pyx_tp_as_number_index_set = {
19258  0, /*nb_add*/
19259  0, /*nb_subtract*/
19260  0, /*nb_multiply*/
19261  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19262  0, /*nb_divide*/
19263  #endif
19264  0, /*nb_remainder*/
19265  0, /*nb_divmod*/
19266  0, /*nb_power*/
19267  0, /*nb_negative*/
19268  0, /*nb_positive*/
19269  0, /*nb_absolute*/
19270  0, /*nb_nonzero*/
19271  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
19272  0, /*nb_lshift*/
19273  0, /*nb_rshift*/
19274  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
19275  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
19276  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
19277  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19278  0, /*nb_coerce*/
19279  #endif
19280  0, /*nb_int*/
19281  #if PY_MAJOR_VERSION < 3
19282  0, /*nb_long*/
19283  #else
19284  0, /*reserved*/
19285  #endif
19286  0, /*nb_float*/
19287  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19288  0, /*nb_oct*/
19289  #endif
19290  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19291  0, /*nb_hex*/
19292  #endif
19293  0, /*nb_inplace_add*/
19294  0, /*nb_inplace_subtract*/
19295  0, /*nb_inplace_multiply*/
19296  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19297  0, /*nb_inplace_divide*/
19298  #endif
19299  0, /*nb_inplace_remainder*/
19300  0, /*nb_inplace_power*/
19301  0, /*nb_inplace_lshift*/
19302  0, /*nb_inplace_rshift*/
19303  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
19304  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
19305  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
19306  0, /*nb_floor_divide*/
19307  0, /*nb_true_divide*/
19308  0, /*nb_inplace_floor_divide*/
19309  0, /*nb_inplace_true_divide*/
19310  0, /*nb_index*/
19311  #if PY_VERSION_HEX >= 0x03050000
19312  0, /*nb_matrix_multiply*/
19313  #endif
19314  #if PY_VERSION_HEX >= 0x03050000
19315  0, /*nb_inplace_matrix_multiply*/
19316  #endif
19317  };
19318 
19319  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
19320  0, /*sq_length*/
19321  0, /*sq_concat*/
19322  0, /*sq_repeat*/
19323  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
19324  0, /*sq_slice*/
19325  0, /*sq_ass_item*/
19326  0, /*sq_ass_slice*/
19327  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
19328  0, /*sq_inplace_concat*/
19329  0, /*sq_inplace_repeat*/
19330  };
19331 
19332  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
19333  0, /*mp_length*/
19334  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
19335  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
19336  };
19337 
19338  static PyTypeObject __pyx_type_8PyClical_index_set = {
19339  PyVarObject_HEAD_INIT(0, 0)
19340  "PyClical.index_set", /*tp_name*/
19341  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
19342  0, /*tp_itemsize*/
19343  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
19344  #if PY_VERSION_HEX < 0x030800b4
19345  0, /*tp_print*/
19346  #endif
19347  #if PY_VERSION_HEX >= 0x030800b4
19348  0, /*tp_vectorcall_offset*/
19349  #endif
19350  0, /*tp_getattr*/
19351  0, /*tp_setattr*/
19352  #if PY_MAJOR_VERSION < 3
19353  0, /*tp_compare*/
19354  #endif
19355  #if PY_MAJOR_VERSION >= 3
19356  0, /*tp_as_async*/
19357  #endif
19358  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
19359  &__pyx_tp_as_number_index_set, /*tp_as_number*/
19360  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
19361  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
19362  0, /*tp_hash*/
19363  0, /*tp_call*/
19364  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
19365  0, /*tp_getattro*/
19366  0, /*tp_setattro*/
19367  0, /*tp_as_buffer*/
19368  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19369  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
19370  0, /*tp_traverse*/
19371  0, /*tp_clear*/
19372  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
19373  0, /*tp_weaklistoffset*/
19374  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
19375  0, /*tp_iternext*/
19376  __pyx_methods_8PyClical_index_set, /*tp_methods*/
19377  0, /*tp_members*/
19378  0, /*tp_getset*/
19379  0, /*tp_base*/
19380  0, /*tp_dict*/
19381  0, /*tp_descr_get*/
19382  0, /*tp_descr_set*/
19383  0, /*tp_dictoffset*/
19384  0, /*tp_init*/
19385  0, /*tp_alloc*/
19386  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
19387  0, /*tp_free*/
19388  0, /*tp_is_gc*/
19389  0, /*tp_bases*/
19390  0, /*tp_mro*/
19391  0, /*tp_cache*/
19392  0, /*tp_subclasses*/
19393  0, /*tp_weaklist*/
19394  0, /*tp_del*/
19395  0, /*tp_version_tag*/
19396  #if PY_VERSION_HEX >= 0x030400a1
19397  0, /*tp_finalize*/
19398  #endif
19399  #if PY_VERSION_HEX >= 0x030800b1
19400  0, /*tp_vectorcall*/
19401  #endif
19402  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19403  0, /*tp_print*/
19404  #endif
19405  };
19406  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
19407 
19408  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
19409  struct __pyx_obj_8PyClical_clifford *p;
19410  PyObject *o;
19411  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19412  o = (*t->tp_alloc)(t, 0);
19413  } else {
19414  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19415  }
19416  if (unlikely(!o)) return 0;
19417  p = ((struct __pyx_obj_8PyClical_clifford *)o);
19418  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
19419  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
19420  return o;
19421  bad:
19422  Py_DECREF(o); o = 0;
19423  return NULL;
19424  }
19425 
19426  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
19427  #if CYTHON_USE_TP_FINALIZE
19428  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))) {
19429  if (PyObject_CallFinalizerFromDealloc(o)) return;
19430  }
19431  #endif
19432  {
19433  PyObject *etype, *eval, *etb;
19434  PyErr_Fetch(&etype, &eval, &etb);
19435  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
19436  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
19437  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
19438  PyErr_Restore(etype, eval, etb);
19439  }
19440  (*Py_TYPE(o)->tp_free)(o);
19441  }
19442  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
19443  PyObject *r;
19444  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19445  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19446  Py_DECREF(x);
19447  return r;
19448  }
19449 
19450  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
19451  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
19452  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
19453  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
19454  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
19455  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
19456  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
19457  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
19458  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
19459  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
19460  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
19461  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
19462  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
19463  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
19464  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
19465  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
19466  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
19467  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
19468  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
19469  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
19470  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
19471  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
19472  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
19473  {0, 0, 0, 0}
19474  };
19475 
19476  static PyNumberMethods __pyx_tp_as_number_clifford = {
19477  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
19478  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
19479  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
19480  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19481  0, /*nb_divide*/
19482  #endif
19483  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
19484  0, /*nb_divmod*/
19485  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
19486  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
19487  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
19488  0, /*nb_absolute*/
19489  0, /*nb_nonzero*/
19490  0, /*nb_invert*/
19491  0, /*nb_lshift*/
19492  0, /*nb_rshift*/
19493  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
19494  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
19495  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
19496  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19497  0, /*nb_coerce*/
19498  #endif
19499  0, /*nb_int*/
19500  #if PY_MAJOR_VERSION < 3
19501  0, /*nb_long*/
19502  #else
19503  0, /*reserved*/
19504  #endif
19505  0, /*nb_float*/
19506  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19507  0, /*nb_oct*/
19508  #endif
19509  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19510  0, /*nb_hex*/
19511  #endif
19512  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
19513  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
19514  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
19515  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19516  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
19517  #endif
19518  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
19519  0, /*nb_inplace_power*/
19520  0, /*nb_inplace_lshift*/
19521  0, /*nb_inplace_rshift*/
19522  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
19523  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
19524  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
19525  0, /*nb_floor_divide*/
19526  __pyx_pw_8PyClical_8clifford_45__truediv__, /*nb_true_divide*/
19527  0, /*nb_inplace_floor_divide*/
19528  0, /*nb_inplace_true_divide*/
19529  0, /*nb_index*/
19530  #if PY_VERSION_HEX >= 0x03050000
19531  0, /*nb_matrix_multiply*/
19532  #endif
19533  #if PY_VERSION_HEX >= 0x03050000
19534  0, /*nb_inplace_matrix_multiply*/
19535  #endif
19536  };
19537 
19538  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
19539  0, /*sq_length*/
19540  0, /*sq_concat*/
19541  0, /*sq_repeat*/
19542  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
19543  0, /*sq_slice*/
19544  0, /*sq_ass_item*/
19545  0, /*sq_ass_slice*/
19546  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
19547  0, /*sq_inplace_concat*/
19548  0, /*sq_inplace_repeat*/
19549  };
19550 
19551  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
19552  0, /*mp_length*/
19553  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
19554  0, /*mp_ass_subscript*/
19555  };
19556 
19557  static PyTypeObject __pyx_type_8PyClical_clifford = {
19558  PyVarObject_HEAD_INIT(0, 0)
19559  "PyClical.clifford", /*tp_name*/
19560  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
19561  0, /*tp_itemsize*/
19562  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
19563  #if PY_VERSION_HEX < 0x030800b4
19564  0, /*tp_print*/
19565  #endif
19566  #if PY_VERSION_HEX >= 0x030800b4
19567  0, /*tp_vectorcall_offset*/
19568  #endif
19569  0, /*tp_getattr*/
19570  0, /*tp_setattr*/
19571  #if PY_MAJOR_VERSION < 3
19572  0, /*tp_compare*/
19573  #endif
19574  #if PY_MAJOR_VERSION >= 3
19575  0, /*tp_as_async*/
19576  #endif
19577  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
19578  &__pyx_tp_as_number_clifford, /*tp_as_number*/
19579  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
19580  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
19581  0, /*tp_hash*/
19582  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
19583  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
19584  0, /*tp_getattro*/
19585  0, /*tp_setattro*/
19586  0, /*tp_as_buffer*/
19587  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19588  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
19589  0, /*tp_traverse*/
19590  0, /*tp_clear*/
19591  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
19592  0, /*tp_weaklistoffset*/
19593  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
19594  0, /*tp_iternext*/
19595  __pyx_methods_8PyClical_clifford, /*tp_methods*/
19596  0, /*tp_members*/
19597  0, /*tp_getset*/
19598  0, /*tp_base*/
19599  0, /*tp_dict*/
19600  0, /*tp_descr_get*/
19601  0, /*tp_descr_set*/
19602  0, /*tp_dictoffset*/
19603  0, /*tp_init*/
19604  0, /*tp_alloc*/
19605  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
19606  0, /*tp_free*/
19607  0, /*tp_is_gc*/
19608  0, /*tp_bases*/
19609  0, /*tp_mro*/
19610  0, /*tp_cache*/
19611  0, /*tp_subclasses*/
19612  0, /*tp_weaklist*/
19613  0, /*tp_del*/
19614  0, /*tp_version_tag*/
19615  #if PY_VERSION_HEX >= 0x030400a1
19616  0, /*tp_finalize*/
19617  #endif
19618  #if PY_VERSION_HEX >= 0x030800b1
19619  0, /*tp_vectorcall*/
19620  #endif
19621  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19622  0, /*tp_print*/
19623  #endif
19624  };
19625 
19626  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
19627  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
19628 
19629  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
19630  PyObject *o;
19631  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__)))) {
19632  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
19633  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
19634  (void) PyObject_INIT(o, t);
19635  PyObject_GC_Track(o);
19636  } else {
19637  o = (*t->tp_alloc)(t, 0);
19638  if (unlikely(!o)) return 0;
19639  }
19640  return o;
19641  }
19642 
19643  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
19644  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19645  PyObject_GC_UnTrack(o);
19646  Py_CLEAR(p->__pyx_v_idx);
19647  Py_CLEAR(p->__pyx_v_self);
19648  Py_CLEAR(p->__pyx_t_0);
19649  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__)))) {
19650  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
19651  } else {
19652  (*Py_TYPE(o)->tp_free)(o);
19653  }
19654  }
19655 
19656  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
19657  int e;
19658  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19659  if (p->__pyx_v_idx) {
19660  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
19661  }
19662  if (p->__pyx_v_self) {
19663  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
19664  }
19665  if (p->__pyx_t_0) {
19666  e = (*v)(p->__pyx_t_0, a); if (e) return e;
19667  }
19668  return 0;
19669  }
19670 
19671  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
19672  PyVarObject_HEAD_INIT(0, 0)
19673  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
19674  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
19675  0, /*tp_itemsize*/
19676  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
19677  #if PY_VERSION_HEX < 0x030800b4
19678  0, /*tp_print*/
19679  #endif
19680  #if PY_VERSION_HEX >= 0x030800b4
19681  0, /*tp_vectorcall_offset*/
19682  #endif
19683  0, /*tp_getattr*/
19684  0, /*tp_setattr*/
19685  #if PY_MAJOR_VERSION < 3
19686  0, /*tp_compare*/
19687  #endif
19688  #if PY_MAJOR_VERSION >= 3
19689  0, /*tp_as_async*/
19690  #endif
19691  0, /*tp_repr*/
19692  0, /*tp_as_number*/
19693  0, /*tp_as_sequence*/
19694  0, /*tp_as_mapping*/
19695  0, /*tp_hash*/
19696  0, /*tp_call*/
19697  0, /*tp_str*/
19698  0, /*tp_getattro*/
19699  0, /*tp_setattro*/
19700  0, /*tp_as_buffer*/
19701  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19702  0, /*tp_doc*/
19703  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
19704  0, /*tp_clear*/
19705  0, /*tp_richcompare*/
19706  0, /*tp_weaklistoffset*/
19707  0, /*tp_iter*/
19708  0, /*tp_iternext*/
19709  0, /*tp_methods*/
19710  0, /*tp_members*/
19711  0, /*tp_getset*/
19712  0, /*tp_base*/
19713  0, /*tp_dict*/
19714  0, /*tp_descr_get*/
19715  0, /*tp_descr_set*/
19716  0, /*tp_dictoffset*/
19717  0, /*tp_init*/
19718  0, /*tp_alloc*/
19719  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
19720  0, /*tp_free*/
19721  0, /*tp_is_gc*/
19722  0, /*tp_bases*/
19723  0, /*tp_mro*/
19724  0, /*tp_cache*/
19725  0, /*tp_subclasses*/
19726  0, /*tp_weaklist*/
19727  0, /*tp_del*/
19728  0, /*tp_version_tag*/
19729  #if PY_VERSION_HEX >= 0x030400a1
19730  0, /*tp_finalize*/
19731  #endif
19732  #if PY_VERSION_HEX >= 0x030800b1
19733  0, /*tp_vectorcall*/
19734  #endif
19735  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19736  0, /*tp_print*/
19737  #endif
19738  };
19739 
19740  static PyMethodDef __pyx_methods[] = {
19741  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
19742  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
19743  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
19744  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
19745  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
19746  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
19747  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
19748  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
19749  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
19750  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
19751  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
19752  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
19753  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
19754  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
19755  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
19756  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
19757  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
19758  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
19759  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
19760  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
19761  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
19762  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
19763  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
19764  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
19765  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
19766  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
19767  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
19768  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
19769  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
19770  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
19771  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
19772  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
19773  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
19774  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
19775  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
19776  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
19777  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
19778  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
19779  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
19780  {0, 0, 0, 0}
19781  };
19782 
19783  #if PY_MAJOR_VERSION >= 3
19784  #if CYTHON_PEP489_MULTI_PHASE_INIT
19785  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
19786  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
19787  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19788  {Py_mod_create, (void*)__pyx_pymod_create},
19789  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
19790  {0, NULL}
19791  };
19792  #endif
19793 
19794  static struct PyModuleDef __pyx_moduledef = {
19795  PyModuleDef_HEAD_INIT,
19796  "PyClical",
19797  0, /* m_doc */
19798  #if CYTHON_PEP489_MULTI_PHASE_INIT
19799  0, /* m_size */
19800  #else
19801  -1, /* m_size */
19802  #endif
19803  __pyx_methods /* m_methods */,
19804  #if CYTHON_PEP489_MULTI_PHASE_INIT
19805  __pyx_moduledef_slots, /* m_slots */
19806  #else
19807  NULL, /* m_reload */
19808  #endif
19809  NULL, /* m_traverse */
19810  NULL, /* m_clear */
19811  NULL /* m_free */
19812  };
19813  #endif
19814  #ifndef CYTHON_SMALL_CODE
19815 #if defined(__clang__)
19816  #define CYTHON_SMALL_CODE
19817 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
19818  #define CYTHON_SMALL_CODE __attribute__((cold))
19819 #else
19820  #define CYTHON_SMALL_CODE
19821 #endif
19822 #endif
19823 
19824 static __Pyx_StringTabEntry __pyx_string_tab[] = {
19825  {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
19826  {&__pyx_kp_u_0_8_4, __pyx_k_0_8_4, sizeof(__pyx_k_0_8_4), 0, 1, 0, 0},
19827  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
19828  {&__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},
19829  {&__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},
19830  {&__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},
19831  {&__pyx_kp_u_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 1, 0, 0},
19832  {&__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},
19833  {&__pyx_kp_u_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 1, 0, 0},
19834  {&__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},
19835  {&__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},
19836  {&__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},
19837  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
19838  {&__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},
19839  {&__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},
19840  {&__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},
19841  {&__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},
19842  {&__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},
19843  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
19844  {&__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},
19845  {&__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},
19846  {&__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},
19847  {&__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},
19848  {&__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},
19849  {&__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},
19850  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
19851  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
19852  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
19853  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
19854  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
19855  {&__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},
19856  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
19857  {&__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},
19858  {&__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},
19859  {&__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},
19860  {&__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},
19861  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
19862  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
19863  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
19864  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
19865  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
19866  {&__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},
19867  {&__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},
19868  {&__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},
19869  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
19870  {&__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},
19871  {&__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},
19872  {&__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},
19873  {&__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},
19874  {&__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},
19875  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
19876  {&__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},
19877  {&__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},
19878  {&__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},
19879  {&__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},
19880  {&__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},
19881  {&__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},
19882  {&__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},
19883  {&__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},
19884  {&__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},
19885  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
19886  {&__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},
19887  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
19888  {&__pyx_kp_u_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 1, 0, 0},
19889  {&__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},
19890  {&__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},
19891  {&__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},
19892  {&__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},
19893  {&__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},
19894  {&__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},
19895  {&__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},
19896  {&__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},
19897  {&__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},
19898  {&__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},
19899  {&__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},
19900  {&__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},
19901  {&__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},
19902  {&__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},
19903  {&__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},
19904  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
19905  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
19906  {&__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},
19907  {&__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},
19908  {&__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},
19909  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
19910  {&__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},
19911  {&__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},
19912  {&__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},
19913  {&__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},
19914  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
19915  {&__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},
19916  {&__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},
19917  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
19918  {&__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},
19919  {&__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},
19920  {&__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},
19921  {&__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},
19922  {&__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},
19923  {&__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},
19924  {&__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},
19925  {&__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},
19926  {&__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},
19927  {&__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},
19928  {&__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},
19929  {&__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},
19930  {&__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},
19931  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
19932  {&__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},
19933  {&__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},
19934  {&__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},
19935  {&__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},
19936  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
19937  {&__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},
19938  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
19939  {&__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},
19940  {&__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},
19941  {&__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},
19942  {&__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},
19943  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
19944  {&__pyx_kp_u_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 1, 0, 0},
19945  {&__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},
19946  {&__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},
19947  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
19948  {&__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},
19949  {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
19950  {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
19951  {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
19952  {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
19953  {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0},
19954  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
19955  {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
19956  {&__pyx_kp_u_abs_line_1472, __pyx_k_abs_line_1472, sizeof(__pyx_k_abs_line_1472), 0, 1, 0, 0},
19957  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
19958  {&__pyx_kp_u_acos_line_1618, __pyx_k_acos_line_1618, sizeof(__pyx_k_acos_line_1618), 0, 1, 0, 0},
19959  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
19960  {&__pyx_kp_u_acosh_line_1655, __pyx_k_acosh_line_1655, sizeof(__pyx_k_acosh_line_1655), 0, 1, 0, 0},
19961  {&__pyx_kp_u_agc3_line_1843, __pyx_k_agc3_line_1843, sizeof(__pyx_k_agc3_line_1843), 0, 1, 0, 0},
19962  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
19963  {&__pyx_kp_u_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 1, 0, 0},
19964  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
19965  {&__pyx_kp_u_asin_line_1697, __pyx_k_asin_line_1697, sizeof(__pyx_k_asin_line_1697), 0, 1, 0, 0},
19966  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
19967  {&__pyx_kp_u_asinh_line_1732, __pyx_k_asinh_line_1732, sizeof(__pyx_k_asinh_line_1732), 0, 1, 0, 0},
19968  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
19969  {&__pyx_kp_u_atan_line_1768, __pyx_k_atan_line_1768, sizeof(__pyx_k_atan_line_1768), 0, 1, 0, 0},
19970  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
19971  {&__pyx_kp_u_atanh_line_1797, __pyx_k_atanh_line_1797, sizeof(__pyx_k_atanh_line_1797), 0, 1, 0, 0},
19972  {&__pyx_kp_u_cga3_line_1823, __pyx_k_cga3_line_1823, sizeof(__pyx_k_cga3_line_1823), 0, 1, 0, 0},
19973  {&__pyx_kp_u_cga3std_line_1832, __pyx_k_cga3std_line_1832, sizeof(__pyx_k_cga3std_line_1832), 0, 1, 0, 0},
19974  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
19975  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
19976  {&__pyx_kp_u_clifford___add___line_740, __pyx_k_clifford___add___line_740, sizeof(__pyx_k_clifford___add___line_740), 0, 1, 0, 0},
19977  {&__pyx_kp_u_clifford___and___line_836, __pyx_k_clifford___and___line_836, sizeof(__pyx_k_clifford___and___line_836), 0, 1, 0, 0},
19978  {&__pyx_kp_u_clifford___call___line_1020, __pyx_k_clifford___call___line_1020, sizeof(__pyx_k_clifford___call___line_1020), 0, 1, 0, 0},
19979  {&__pyx_kp_u_clifford___getitem___line_707, __pyx_k_clifford___getitem___line_707, sizeof(__pyx_k_clifford___getitem___line_707), 0, 1, 0, 0},
19980  {&__pyx_kp_u_clifford___iadd___line_751, __pyx_k_clifford___iadd___line_751, sizeof(__pyx_k_clifford___iadd___line_751), 0, 1, 0, 0},
19981  {&__pyx_kp_u_clifford___iand___line_851, __pyx_k_clifford___iand___line_851, sizeof(__pyx_k_clifford___iand___line_851), 0, 1, 0, 0},
19982  {&__pyx_kp_u_clifford___idiv___line_911, __pyx_k_clifford___idiv___line_911, sizeof(__pyx_k_clifford___idiv___line_911), 0, 1, 0, 0},
19983  {&__pyx_kp_u_clifford___imod___line_821, __pyx_k_clifford___imod___line_821, sizeof(__pyx_k_clifford___imod___line_821), 0, 1, 0, 0},
19984  {&__pyx_kp_u_clifford___imul___line_793, __pyx_k_clifford___imul___line_793, sizeof(__pyx_k_clifford___imul___line_793), 0, 1, 0, 0},
19985  {&__pyx_kp_u_clifford___ior___line_950, __pyx_k_clifford___ior___line_950, sizeof(__pyx_k_clifford___ior___line_950), 0, 1, 0, 0},
19986  {&__pyx_kp_u_clifford___isub___line_771, __pyx_k_clifford___isub___line_771, sizeof(__pyx_k_clifford___isub___line_771), 0, 1, 0, 0},
19987  {&__pyx_kp_u_clifford___iter___line_638, __pyx_k_clifford___iter___line_638, sizeof(__pyx_k_clifford___iter___line_638), 0, 1, 0, 0},
19988  {&__pyx_kp_u_clifford___ixor___line_881, __pyx_k_clifford___ixor___line_881, sizeof(__pyx_k_clifford___ixor___line_881), 0, 1, 0, 0},
19989  {&__pyx_kp_u_clifford___mod___line_806, __pyx_k_clifford___mod___line_806, sizeof(__pyx_k_clifford___mod___line_806), 0, 1, 0, 0},
19990  {&__pyx_kp_u_clifford___mul___line_780, __pyx_k_clifford___mul___line_780, sizeof(__pyx_k_clifford___mul___line_780), 0, 1, 0, 0},
19991  {&__pyx_kp_u_clifford___neg___line_722, __pyx_k_clifford___neg___line_722, sizeof(__pyx_k_clifford___neg___line_722), 0, 1, 0, 0},
19992  {&__pyx_kp_u_clifford___or___line_939, __pyx_k_clifford___or___line_939, sizeof(__pyx_k_clifford___or___line_939), 0, 1, 0, 0},
19993  {&__pyx_kp_u_clifford___pos___line_731, __pyx_k_clifford___pos___line_731, sizeof(__pyx_k_clifford___pos___line_731), 0, 1, 0, 0},
19994  {&__pyx_kp_u_clifford___pow___line_961, __pyx_k_clifford___pow___line_961, sizeof(__pyx_k_clifford___pow___line_961), 0, 1, 0, 0},
19995  {&__pyx_kp_u_clifford___repr___line_1226, __pyx_k_clifford___repr___line_1226, sizeof(__pyx_k_clifford___repr___line_1226), 0, 1, 0, 0},
19996  {&__pyx_kp_u_clifford___str___line_1235, __pyx_k_clifford___str___line_1235, sizeof(__pyx_k_clifford___str___line_1235), 0, 1, 0, 0},
19997  {&__pyx_kp_u_clifford___sub___line_760, __pyx_k_clifford___sub___line_760, sizeof(__pyx_k_clifford___sub___line_760), 0, 1, 0, 0},
19998  {&__pyx_kp_u_clifford___truediv___line_896, __pyx_k_clifford___truediv___line_896, sizeof(__pyx_k_clifford___truediv___line_896), 0, 1, 0, 0},
19999  {&__pyx_kp_u_clifford___xor___line_866, __pyx_k_clifford___xor___line_866, sizeof(__pyx_k_clifford___xor___line_866), 0, 1, 0, 0},
20000  {&__pyx_kp_u_clifford_abs_line_1175, __pyx_k_clifford_abs_line_1175, sizeof(__pyx_k_clifford_abs_line_1175), 0, 1, 0, 0},
20001  {&__pyx_kp_u_clifford_conj_line_1138, __pyx_k_clifford_conj_line_1138, sizeof(__pyx_k_clifford_conj_line_1138), 0, 1, 0, 0},
20002  {&__pyx_kp_u_clifford_copy_line_556, __pyx_k_clifford_copy_line_556, sizeof(__pyx_k_clifford_copy_line_556), 0, 1, 0, 0},
20003  {&__pyx_kp_u_clifford_even_line_1061, __pyx_k_clifford_even_line_1061, sizeof(__pyx_k_clifford_even_line_1061), 0, 1, 0, 0},
20004  {&__pyx_kp_u_clifford_frame_line_1215, __pyx_k_clifford_frame_line_1215, sizeof(__pyx_k_clifford_frame_line_1215), 0, 1, 0, 0},
20005  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
20006  {&__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},
20007  {&__pyx_kp_u_clifford_inv_line_926, __pyx_k_clifford_inv_line_926, sizeof(__pyx_k_clifford_inv_line_926), 0, 1, 0, 0},
20008  {&__pyx_kp_u_clifford_involute_line_1107, __pyx_k_clifford_involute_line_1107, sizeof(__pyx_k_clifford_involute_line_1107), 0, 1, 0, 0},
20009  {&__pyx_kp_u_clifford_isnan_line_1206, __pyx_k_clifford_isnan_line_1206, sizeof(__pyx_k_clifford_isnan_line_1206), 0, 1, 0, 0},
20010  {&__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},
20011  {&__pyx_kp_u_clifford_norm_line_1164, __pyx_k_clifford_norm_line_1164, sizeof(__pyx_k_clifford_norm_line_1164), 0, 1, 0, 0},
20012  {&__pyx_kp_u_clifford_odd_line_1070, __pyx_k_clifford_odd_line_1070, sizeof(__pyx_k_clifford_odd_line_1070), 0, 1, 0, 0},
20013  {&__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},
20014  {&__pyx_kp_u_clifford_pow_line_980, __pyx_k_clifford_pow_line_980, sizeof(__pyx_k_clifford_pow_line_980), 0, 1, 0, 0},
20015  {&__pyx_kp_u_clifford_pure_line_1050, __pyx_k_clifford_pure_line_1050, sizeof(__pyx_k_clifford_pure_line_1050), 0, 1, 0, 0},
20016  {&__pyx_kp_u_clifford_quad_line_1153, __pyx_k_clifford_quad_line_1153, sizeof(__pyx_k_clifford_quad_line_1153), 0, 1, 0, 0},
20017  {&__pyx_kp_u_clifford_reframe_line_649, __pyx_k_clifford_reframe_line_649, sizeof(__pyx_k_clifford_reframe_line_649), 0, 1, 0, 0},
20018  {&__pyx_kp_u_clifford_reverse_line_1123, __pyx_k_clifford_reverse_line_1123, sizeof(__pyx_k_clifford_reverse_line_1123), 0, 1, 0, 0},
20019  {&__pyx_kp_u_clifford_scalar_line_1039, __pyx_k_clifford_scalar_line_1039, sizeof(__pyx_k_clifford_scalar_line_1039), 0, 1, 0, 0},
20020  {&__pyx_kp_u_clifford_truncated_line_1195, __pyx_k_clifford_truncated_line_1195, sizeof(__pyx_k_clifford_truncated_line_1195), 0, 1, 0, 0},
20021  {&__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},
20022  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
20023  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
20024  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
20025  {&__pyx_kp_u_compare_line_492, __pyx_k_compare_line_492, sizeof(__pyx_k_compare_line_492), 0, 1, 0, 0},
20026  {&__pyx_kp_u_complexifier_line_1526, __pyx_k_complexifier_line_1526, sizeof(__pyx_k_complexifier_line_1526), 0, 1, 0, 0},
20027  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
20028  {&__pyx_kp_u_conj_line_1435, __pyx_k_conj_line_1435, sizeof(__pyx_k_conj_line_1435), 0, 1, 0, 0},
20029  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
20030  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
20031  {&__pyx_kp_u_cos_line_1601, __pyx_k_cos_line_1601, sizeof(__pyx_k_cos_line_1601), 0, 1, 0, 0},
20032  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
20033  {&__pyx_kp_u_cosh_line_1639, __pyx_k_cosh_line_1639, sizeof(__pyx_k_cosh_line_1639), 0, 1, 0, 0},
20034  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
20035  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
20036  {&__pyx_kp_u_e_line_1886, __pyx_k_e_line_1886, sizeof(__pyx_k_e_line_1886), 0, 1, 0, 0},
20037  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
20038  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
20039  {&__pyx_kp_u_even_line_1387, __pyx_k_even_line_1387, sizeof(__pyx_k_even_line_1387), 0, 1, 0, 0},
20040  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
20041  {&__pyx_kp_u_exp_line_1564, __pyx_k_exp_line_1564, sizeof(__pyx_k_exp_line_1564), 0, 1, 0, 0},
20042  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
20043  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
20044  {&__pyx_kp_u_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 1, 0, 0},
20045  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
20046  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
20047  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
20048  {&__pyx_kp_u_imag_line_1365, __pyx_k_imag_line_1365, sizeof(__pyx_k_imag_line_1365), 0, 1, 0, 0},
20049  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
20050  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
20051  {&__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},
20052  {&__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},
20053  {&__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},
20054  {&__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},
20055  {&__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},
20056  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
20057  {&__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},
20058  {&__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},
20059  {&__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},
20060  {&__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},
20061  {&__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},
20062  {&__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},
20063  {&__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},
20064  {&__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},
20065  {&__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},
20066  {&__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},
20067  {&__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},
20068  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
20069  {&__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},
20070  {&__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},
20071  {&__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},
20072  {&__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},
20073  {&__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},
20074  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
20075  {&__pyx_kp_u_inv_line_1328, __pyx_k_inv_line_1328, sizeof(__pyx_k_inv_line_1328), 0, 1, 0, 0},
20076  {&__pyx_kp_u_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 1, 0, 0},
20077  {&__pyx_kp_u_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 1, 0, 0},
20078  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
20079  {&__pyx_kp_u_involute_line_1405, __pyx_k_involute_line_1405, sizeof(__pyx_k_involute_line_1405), 0, 1, 0, 0},
20080  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
20081  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
20082  {&__pyx_kp_u_istpq_line_1899, __pyx_k_istpq_line_1899, sizeof(__pyx_k_istpq_line_1899), 0, 1, 0, 0},
20083  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
20084  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
20085  {&__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},
20086  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
20087  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
20088  {&__pyx_kp_u_log_line_1578, __pyx_k_log_line_1578, sizeof(__pyx_k_log_line_1578), 0, 1, 0, 0},
20089  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
20090  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
20091  {&__pyx_n_u_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 1, 0, 1},
20092  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
20093  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
20094  {&__pyx_kp_u_max_abs_line_1481, __pyx_k_max_abs_line_1481, sizeof(__pyx_k_max_abs_line_1481), 0, 1, 0, 0},
20095  {&__pyx_kp_u_max_pos_line_513, __pyx_k_max_pos_line_513, sizeof(__pyx_k_max_pos_line_513), 0, 1, 0, 0},
20096  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
20097  {&__pyx_kp_u_min_neg_line_504, __pyx_k_min_neg_line_504, sizeof(__pyx_k_min_neg_line_504), 0, 1, 0, 0},
20098  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
20099  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
20100  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
20101  {&__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},
20102  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
20103  {&__pyx_kp_u_norm_line_1461, __pyx_k_norm_line_1461, sizeof(__pyx_k_norm_line_1461), 0, 1, 0, 0},
20104  {&__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},
20105  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
20106  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
20107  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
20108  {&__pyx_kp_u_odd_line_1396, __pyx_k_odd_line_1396, sizeof(__pyx_k_odd_line_1396), 0, 1, 0, 0},
20109  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
20110  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
20111  {&__pyx_kp_u_outer_pow_line_1517, __pyx_k_outer_pow_line_1517, sizeof(__pyx_k_outer_pow_line_1517), 0, 1, 0, 0},
20112  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
20113  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
20114  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
20115  {&__pyx_kp_u_pow_line_1493, __pyx_k_pow_line_1493, sizeof(__pyx_k_pow_line_1493), 0, 1, 0, 0},
20116  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
20117  {&__pyx_kp_u_pure_line_1376, __pyx_k_pure_line_1376, sizeof(__pyx_k_pure_line_1376), 0, 1, 0, 0},
20118  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
20119  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
20120  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
20121  {&__pyx_kp_u_quad_line_1450, __pyx_k_quad_line_1450, sizeof(__pyx_k_quad_line_1450), 0, 1, 0, 0},
20122  {&__pyx_kp_u_random_clifford_line_1814, __pyx_k_random_clifford_line_1814, sizeof(__pyx_k_random_clifford_line_1814), 0, 1, 0, 0},
20123  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
20124  {&__pyx_kp_u_real_line_1354, __pyx_k_real_line_1354, sizeof(__pyx_k_real_line_1354), 0, 1, 0, 0},
20125  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
20126  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
20127  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
20128  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
20129  {&__pyx_kp_u_reverse_line_1420, __pyx_k_reverse_line_1420, sizeof(__pyx_k_reverse_line_1420), 0, 1, 0, 0},
20130  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
20131  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
20132  {&__pyx_n_s_scalar_epsilon, __pyx_k_scalar_epsilon, sizeof(__pyx_k_scalar_epsilon), 0, 0, 1, 1},
20133  {&__pyx_kp_u_scalar_line_1343, __pyx_k_scalar_line_1343, sizeof(__pyx_k_scalar_line_1343), 0, 1, 0, 0},
20134  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
20135  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
20136  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
20137  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
20138  {&__pyx_kp_u_sin_line_1678, __pyx_k_sin_line_1678, sizeof(__pyx_k_sin_line_1678), 0, 1, 0, 0},
20139  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
20140  {&__pyx_kp_u_sinh_line_1718, __pyx_k_sinh_line_1718, sizeof(__pyx_k_sinh_line_1718), 0, 1, 0, 0},
20141  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
20142  {&__pyx_kp_u_sqrt_line_1541, __pyx_k_sqrt_line_1541, sizeof(__pyx_k_sqrt_line_1541), 0, 1, 0, 0},
20143  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
20144  {&__pyx_kp_u_tan_line_1751, __pyx_k_tan_line_1751, sizeof(__pyx_k_tan_line_1751), 0, 1, 0, 0},
20145  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
20146  {&__pyx_kp_u_tanh_line_1785, __pyx_k_tanh_line_1785, sizeof(__pyx_k_tanh_line_1785), 0, 1, 0, 0},
20147  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
20148  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
20149  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
20150  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
20151  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
20152  {&__pyx_kp_u_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 1, 0, 0},
20153  {&__pyx_kp_u_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 1, 0, 0},
20154  {&__pyx_kp_u_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 1, 0, 0},
20155  {&__pyx_kp_u_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 1, 0, 0},
20156  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
20157  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
20158  {0, 0, 0, 0, 0, 0, 0}
20159 };
20160 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
20161  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 103, __pyx_L1_error)
20162  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 105, __pyx_L1_error)
20163  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 105, __pyx_L1_error)
20164  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 106, __pyx_L1_error)
20165  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 159, __pyx_L1_error)
20166  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 236, __pyx_L1_error)
20167  #if PY_MAJOR_VERSION >= 3
20168  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1099, __pyx_L1_error)
20169  #else
20170  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1099, __pyx_L1_error)
20171  #endif
20172  return 0;
20173  __pyx_L1_error:;
20174  return -1;
20175 }
20176 
20177 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
20178  __Pyx_RefNannyDeclarations
20179  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
20180 
20181  /* "(tree fragment)":2
20182  * def __reduce_cython__(self):
20183  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20184  * def __setstate_cython__(self, __pyx_state):
20185  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20186  */
20187  __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)
20188  __Pyx_GOTREF(__pyx_tuple__3);
20189  __Pyx_GIVEREF(__pyx_tuple__3);
20190 
20191  /* "(tree fragment)":4
20192  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20193  * def __setstate_cython__(self, __pyx_state):
20194  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20195  */
20196  __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)
20197  __Pyx_GOTREF(__pyx_tuple__4);
20198  __Pyx_GIVEREF(__pyx_tuple__4);
20199 
20200  /* "PyClical.pyx":636
20201  * TypeError: Not applicable.
20202  * """
20203  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
20204  *
20205  * def __iter__(self):
20206  */
20207  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 636, __pyx_L1_error)
20208  __Pyx_GOTREF(__pyx_tuple__10);
20209  __Pyx_GIVEREF(__pyx_tuple__10);
20210 
20211  /* "(tree fragment)":2
20212  * def __reduce_cython__(self):
20213  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20214  * def __setstate_cython__(self, __pyx_state):
20215  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20216  */
20217  __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)
20218  __Pyx_GOTREF(__pyx_tuple__11);
20219  __Pyx_GIVEREF(__pyx_tuple__11);
20220 
20221  /* "(tree fragment)":4
20222  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20223  * def __setstate_cython__(self, __pyx_state):
20224  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20225  */
20226  __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)
20227  __Pyx_GOTREF(__pyx_tuple__12);
20228  __Pyx_GIVEREF(__pyx_tuple__12);
20229 
20230  /* "PyClical.pyx":406
20231  * return index_set_to_str( self.unwrap() ).decode()
20232  *
20233  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
20234  * """
20235  * Tests for functions that Doctest cannot see.
20236  */
20237  __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)
20238 
20239  /* "PyClical.pyx":1244
20240  * return clifford_to_str( self.unwrap() ).decode()
20241  *
20242  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20243  * """
20244  * Tests for functions that Doctest cannot see.
20245  */
20246  __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)
20247 
20248  /* "PyClical.pyx":1857
20249  * scalar_epsilon = epsilon
20250  *
20251  * pi = atan(clifford(1.0)) * 4.0 # <<<<<<<<<<<<<<
20252  * tau = atan(clifford(1.0)) * 8.0
20253  *
20254  */
20255  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1857, __pyx_L1_error)
20256  __Pyx_GOTREF(__pyx_tuple__15);
20257  __Pyx_GIVEREF(__pyx_tuple__15);
20258 
20259  /* "PyClical.pyx":1886
20260  * """
20261  *
20262  * def e(obj): # <<<<<<<<<<<<<<
20263  * """
20264  * Abbreviation for clifford(index_set(obj)).
20265  */
20266  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1886, __pyx_L1_error)
20267  __Pyx_GOTREF(__pyx_tuple__16);
20268  __Pyx_GIVEREF(__pyx_tuple__16);
20269  __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)
20270 
20271  /* "PyClical.pyx":1899
20272  * return clifford(index_set(obj))
20273  *
20274  * def istpq(p, q): # <<<<<<<<<<<<<<
20275  * """
20276  * Abbreviation for index_set({-q,...p}).
20277  */
20278  __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)
20279  __Pyx_GOTREF(__pyx_tuple__18);
20280  __Pyx_GIVEREF(__pyx_tuple__18);
20281  __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)
20282 
20283  /* "PyClical.pyx":1908
20284  * return index_set(set(range(-q,p+1)))
20285  *
20286  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20287  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20288  *
20289  */
20290  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1908, __pyx_L1_error)
20291  __Pyx_GOTREF(__pyx_tuple__20);
20292  __Pyx_GIVEREF(__pyx_tuple__20);
20293  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1908, __pyx_L1_error)
20294  __Pyx_GOTREF(__pyx_tuple__21);
20295  __Pyx_GIVEREF(__pyx_tuple__21);
20296 
20297  /* "PyClical.pyx":1912
20298  *
20299  * # Doctest interface.
20300  * def _test(): # <<<<<<<<<<<<<<
20301  * import PyClical, doctest
20302  * return doctest.testmod(PyClical)
20303  */
20304  __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)
20305  __Pyx_GOTREF(__pyx_tuple__22);
20306  __Pyx_GIVEREF(__pyx_tuple__22);
20307  __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)
20308  __Pyx_RefNannyFinishContext();
20309  return 0;
20310  __pyx_L1_error:;
20311  __Pyx_RefNannyFinishContext();
20312  return -1;
20313 }
20314 
20315 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
20316  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20317  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20318  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20319  __pyx_float_4_0 = PyFloat_FromDouble(4.0); if (unlikely(!__pyx_float_4_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20320  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20321  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20322  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20323  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
20324  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20325  return 0;
20326  __pyx_L1_error:;
20327  return -1;
20328 }
20329 
20330 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
20331 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
20332 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
20333 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
20334 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
20335 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
20336 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
20337 
20338 static int __Pyx_modinit_global_init_code(void) {
20339  __Pyx_RefNannyDeclarations
20340  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
20341  /*--- Global init code ---*/
20342  __Pyx_RefNannyFinishContext();
20343  return 0;
20344 }
20345 
20346 static int __Pyx_modinit_variable_export_code(void) {
20347  __Pyx_RefNannyDeclarations
20348  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
20349  /*--- Variable export code ---*/
20350  __Pyx_RefNannyFinishContext();
20351  return 0;
20352 }
20353 
20354 static int __Pyx_modinit_function_export_code(void) {
20355  __Pyx_RefNannyDeclarations
20356  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
20357  /*--- Function export code ---*/
20358  __Pyx_RefNannyFinishContext();
20359  return 0;
20360 }
20361 
20362 static int __Pyx_modinit_type_init_code(void) {
20363  __Pyx_RefNannyDeclarations
20364  int __pyx_lineno = 0;
20365  const char *__pyx_filename = NULL;
20366  int __pyx_clineno = 0;
20367  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
20368  /*--- Type init code ---*/
20369  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
20370  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
20371  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
20372  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
20373  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
20374  #if PY_VERSION_HEX < 0x030800B1
20375  __pyx_type_8PyClical_index_set.tp_print = 0;
20376  #endif
20377  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)) {
20378  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
20379  }
20380  #if CYTHON_COMPILING_IN_CPYTHON
20381  {
20382  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20383  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20384  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20385  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
20386  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
20387  }
20388  }
20389  #endif
20390  #if CYTHON_COMPILING_IN_CPYTHON
20391  {
20392  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20393  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20394  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20395  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
20396  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
20397  }
20398  }
20399  #endif
20400  #if CYTHON_COMPILING_IN_CPYTHON
20401  {
20402  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20403  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20404  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20405  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
20406  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
20407  }
20408  }
20409  #endif
20410  #if CYTHON_COMPILING_IN_CPYTHON
20411  {
20412  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20413  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20414  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20415  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
20416  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
20417  }
20418  }
20419  #endif
20420  #if CYTHON_COMPILING_IN_CPYTHON
20421  {
20422  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20423  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20424  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20425  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
20426  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
20427  }
20428  }
20429  #endif
20430  #if CYTHON_COMPILING_IN_CPYTHON
20431  {
20432  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20433  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20434  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20435  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
20436  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
20437  }
20438  }
20439  #endif
20440  #if CYTHON_COMPILING_IN_CPYTHON
20441  {
20442  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20443  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20444  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20445  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
20446  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
20447  }
20448  }
20449  #endif
20450  #if CYTHON_COMPILING_IN_CPYTHON
20451  {
20452  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20453  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20454  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20455  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
20456  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
20457  }
20458  }
20459  #endif
20460  #if CYTHON_COMPILING_IN_CPYTHON
20461  {
20462  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20463  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20464  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20465  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
20466  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
20467  }
20468  }
20469  #endif
20470  #if CYTHON_COMPILING_IN_CPYTHON
20471  {
20472  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20473  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20474  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20475  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
20476  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
20477  }
20478  }
20479  #endif
20480  #if CYTHON_COMPILING_IN_CPYTHON
20481  {
20482  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20483  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20484  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20485  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
20486  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
20487  }
20488  }
20489  #endif
20490  #if CYTHON_COMPILING_IN_CPYTHON
20491  {
20492  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20493  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20494  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20495  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
20496  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
20497  }
20498  }
20499  #endif
20500  #if CYTHON_COMPILING_IN_CPYTHON
20501  {
20502  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20503  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20504  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20505  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
20506  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
20507  }
20508  }
20509  #endif
20510  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
20511  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
20512  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
20513  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
20514  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
20515  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
20516  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
20517  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
20518  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20519  #if PY_VERSION_HEX < 0x030800B1
20520  __pyx_type_8PyClical_clifford.tp_print = 0;
20521  #endif
20522  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
20523  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
20524  }
20525  #if CYTHON_COMPILING_IN_CPYTHON
20526  {
20527  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20528  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20529  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20530  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
20531  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
20532  }
20533  }
20534  #endif
20535  #if CYTHON_COMPILING_IN_CPYTHON
20536  {
20537  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20538  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20539  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20540  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
20541  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
20542  }
20543  }
20544  #endif
20545  #if CYTHON_COMPILING_IN_CPYTHON
20546  {
20547  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20548  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20549  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20550  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
20551  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
20552  }
20553  }
20554  #endif
20555  #if CYTHON_COMPILING_IN_CPYTHON
20556  {
20557  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20558  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20559  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20560  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
20561  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
20562  }
20563  }
20564  #endif
20565  #if CYTHON_COMPILING_IN_CPYTHON
20566  {
20567  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20568  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20569  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20570  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
20571  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
20572  }
20573  }
20574  #endif
20575  #if CYTHON_COMPILING_IN_CPYTHON
20576  {
20577  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20578  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20579  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20580  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
20581  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
20582  }
20583  }
20584  #endif
20585  #if CYTHON_COMPILING_IN_CPYTHON
20586  {
20587  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20588  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20589  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20590  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
20591  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
20592  }
20593  }
20594  #endif
20595  #if CYTHON_COMPILING_IN_CPYTHON
20596  {
20597  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20598  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20599  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20600  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
20601  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
20602  }
20603  }
20604  #endif
20605  #if CYTHON_COMPILING_IN_CPYTHON
20606  {
20607  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20608  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20609  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20610  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
20611  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
20612  }
20613  }
20614  #endif
20615  #if CYTHON_COMPILING_IN_CPYTHON
20616  {
20617  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20618  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20619  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20620  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
20621  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
20622  }
20623  }
20624  #endif
20625  #if CYTHON_COMPILING_IN_CPYTHON
20626  {
20627  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20628  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20629  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20630  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
20631  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
20632  }
20633  }
20634  #endif
20635  #if CYTHON_COMPILING_IN_CPYTHON
20636  {
20637  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20638  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20639  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20640  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
20641  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
20642  }
20643  }
20644  #endif
20645  #if CYTHON_COMPILING_IN_CPYTHON
20646  {
20647  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20648  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20649  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20650  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
20651  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
20652  }
20653  }
20654  #endif
20655  #if CYTHON_COMPILING_IN_CPYTHON
20656  {
20657  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20658  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20659  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20660  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
20661  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
20662  }
20663  }
20664  #endif
20665  #if CYTHON_COMPILING_IN_CPYTHON
20666  {
20667  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20668  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20669  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20670  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
20671  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
20672  }
20673  }
20674  #endif
20675  #if CYTHON_COMPILING_IN_CPYTHON
20676  {
20677  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20678  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20679  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20680  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
20681  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
20682  }
20683  }
20684  #endif
20685  #if CYTHON_COMPILING_IN_CPYTHON
20686  {
20687  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20688  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20689  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20690  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
20691  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
20692  }
20693  }
20694  #endif
20695  #if CYTHON_COMPILING_IN_CPYTHON
20696  {
20697  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__truediv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20698  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20699  __pyx_wrapperbase_8PyClical_8clifford_44__truediv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20700  __pyx_wrapperbase_8PyClical_8clifford_44__truediv__.doc = __pyx_doc_8PyClical_8clifford_44__truediv__;
20701  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__truediv__;
20702  }
20703  }
20704  #endif
20705  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20706  #if CYTHON_COMPILING_IN_CPYTHON
20707  {
20708  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20709  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20710  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20711  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
20712  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
20713  }
20714  }
20715  #endif
20716  #endif
20717  #if CYTHON_COMPILING_IN_CPYTHON
20718  {
20719  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20720  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20721  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20722  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
20723  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
20724  }
20725  }
20726  #endif
20727  #if CYTHON_COMPILING_IN_CPYTHON
20728  {
20729  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20730  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20731  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20732  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
20733  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
20734  }
20735  }
20736  #endif
20737  #if CYTHON_COMPILING_IN_CPYTHON
20738  {
20739  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20740  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20741  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20742  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
20743  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
20744  }
20745  }
20746  #endif
20747  #if CYTHON_COMPILING_IN_CPYTHON
20748  {
20749  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20750  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20751  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20752  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
20753  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
20754  }
20755  }
20756  #endif
20757  #if CYTHON_COMPILING_IN_CPYTHON
20758  {
20759  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20760  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20761  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20762  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
20763  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
20764  }
20765  }
20766  #endif
20767  #if CYTHON_COMPILING_IN_CPYTHON
20768  {
20769  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20770  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20771  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20772  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
20773  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
20774  }
20775  }
20776  #endif
20777  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20778  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20779  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20780  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
20781  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
20782  #if PY_VERSION_HEX < 0x030800B1
20783  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
20784  #endif
20785  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)) {
20786  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
20787  }
20788  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
20789  __Pyx_RefNannyFinishContext();
20790  return 0;
20791  __pyx_L1_error:;
20792  __Pyx_RefNannyFinishContext();
20793  return -1;
20794 }
20795 
20796 static int __Pyx_modinit_type_import_code(void) {
20797  __Pyx_RefNannyDeclarations
20798  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
20799  /*--- Type import code ---*/
20800  __Pyx_RefNannyFinishContext();
20801  return 0;
20802 }
20803 
20804 static int __Pyx_modinit_variable_import_code(void) {
20805  __Pyx_RefNannyDeclarations
20806  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
20807  /*--- Variable import code ---*/
20808  __Pyx_RefNannyFinishContext();
20809  return 0;
20810 }
20811 
20812 static int __Pyx_modinit_function_import_code(void) {
20813  __Pyx_RefNannyDeclarations
20814  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
20815  /*--- Function import code ---*/
20816  __Pyx_RefNannyFinishContext();
20817  return 0;
20818 }
20819 
20820 
20821 #ifndef CYTHON_NO_PYINIT_EXPORT
20822 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
20823 #elif PY_MAJOR_VERSION < 3
20824 #ifdef __cplusplus
20825 #define __Pyx_PyMODINIT_FUNC extern "C" void
20826 #else
20827 #define __Pyx_PyMODINIT_FUNC void
20828 #endif
20829 #else
20830 #ifdef __cplusplus
20831 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
20832 #else
20833 #define __Pyx_PyMODINIT_FUNC PyObject *
20834 #endif
20835 #endif
20836 
20837 
20838 #if PY_MAJOR_VERSION < 3
20839 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
20840 __Pyx_PyMODINIT_FUNC initPyClical(void)
20841 #else
20842 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
20843 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
20844 #if CYTHON_PEP489_MULTI_PHASE_INIT
20845 {
20846  return PyModuleDef_Init(&__pyx_moduledef);
20847 }
20848 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
20849  #if PY_VERSION_HEX >= 0x030700A1
20850  static PY_INT64_T main_interpreter_id = -1;
20851  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
20852  if (main_interpreter_id == -1) {
20853  main_interpreter_id = current_id;
20854  return (unlikely(current_id == -1)) ? -1 : 0;
20855  } else if (unlikely(main_interpreter_id != current_id))
20856  #else
20857  static PyInterpreterState *main_interpreter = NULL;
20858  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
20859  if (!main_interpreter) {
20860  main_interpreter = current_interpreter;
20861  } else if (unlikely(main_interpreter != current_interpreter))
20862  #endif
20863  {
20864  PyErr_SetString(
20865  PyExc_ImportError,
20866  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
20867  return -1;
20868  }
20869  return 0;
20870 }
20871 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) {
20872  PyObject *value = PyObject_GetAttrString(spec, from_name);
20873  int result = 0;
20874  if (likely(value)) {
20875  if (allow_none || value != Py_None) {
20876  result = PyDict_SetItemString(moddict, to_name, value);
20877  }
20878  Py_DECREF(value);
20879  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
20880  PyErr_Clear();
20881  } else {
20882  result = -1;
20883  }
20884  return result;
20885 }
20886 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
20887  PyObject *module = NULL, *moddict, *modname;
20888  if (__Pyx_check_single_interpreter())
20889  return NULL;
20890  if (__pyx_m)
20891  return __Pyx_NewRef(__pyx_m);
20892  modname = PyObject_GetAttrString(spec, "name");
20893  if (unlikely(!modname)) goto bad;
20894  module = PyModule_NewObject(modname);
20895  Py_DECREF(modname);
20896  if (unlikely(!module)) goto bad;
20897  moddict = PyModule_GetDict(module);
20898  if (unlikely(!moddict)) goto bad;
20899  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
20900  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
20901  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
20902  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
20903  return module;
20904 bad:
20905  Py_XDECREF(module);
20906  return NULL;
20907 }
20908 
20909 
20910 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
20911 #endif
20912 #endif
20913 {
20914  PyObject *__pyx_t_1 = NULL;
20915  PyObject *__pyx_t_2 = NULL;
20916  PyObject *__pyx_t_3 = NULL;
20917  int __pyx_t_4;
20918  int __pyx_lineno = 0;
20919  const char *__pyx_filename = NULL;
20920  int __pyx_clineno = 0;
20921  __Pyx_RefNannyDeclarations
20922  #if CYTHON_PEP489_MULTI_PHASE_INIT
20923  if (__pyx_m) {
20924  if (__pyx_m == __pyx_pyinit_module) return 0;
20925  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
20926  return -1;
20927  }
20928  #elif PY_MAJOR_VERSION >= 3
20929  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
20930  #endif
20931  #if CYTHON_REFNANNY
20932 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
20933 if (!__Pyx_RefNanny) {
20934  PyErr_Clear();
20935  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
20936  if (!__Pyx_RefNanny)
20937  Py_FatalError("failed to import 'refnanny' module");
20938 }
20939 #endif
20940  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
20941  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20942  #ifdef __Pxy_PyFrame_Initialize_Offsets
20943  __Pxy_PyFrame_Initialize_Offsets();
20944  #endif
20945  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
20946  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
20947  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
20948  #ifdef __Pyx_CyFunction_USED
20949  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20950  #endif
20951  #ifdef __Pyx_FusedFunction_USED
20952  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20953  #endif
20954  #ifdef __Pyx_Coroutine_USED
20955  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20956  #endif
20957  #ifdef __Pyx_Generator_USED
20958  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20959  #endif
20960  #ifdef __Pyx_AsyncGen_USED
20961  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20962  #endif
20963  #ifdef __Pyx_StopAsyncIteration_USED
20964  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20965  #endif
20966  /*--- Library function declarations ---*/
20967  /*--- Threads initialization code ---*/
20968  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
20969  #ifdef WITH_THREAD /* Python build with threading support? */
20970  PyEval_InitThreads();
20971  #endif
20972  #endif
20973  /*--- Module creation code ---*/
20974  #if CYTHON_PEP489_MULTI_PHASE_INIT
20975  __pyx_m = __pyx_pyinit_module;
20976  Py_INCREF(__pyx_m);
20977  #else
20978  #if PY_MAJOR_VERSION < 3
20979  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
20980  #else
20981  __pyx_m = PyModule_Create(&__pyx_moduledef);
20982  #endif
20983  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
20984  #endif
20985  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
20986  Py_INCREF(__pyx_d);
20987  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
20988  Py_INCREF(__pyx_b);
20989  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
20990  Py_INCREF(__pyx_cython_runtime);
20991  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20992  /*--- Initialize various global constants etc. ---*/
20993  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20994  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
20995  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20996  #endif
20997  if (__pyx_module_is_main_PyClical) {
20998  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20999  }
21000  #if PY_MAJOR_VERSION >= 3
21001  {
21002  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
21003  if (!PyDict_GetItemString(modules, "PyClical")) {
21004  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
21005  }
21006  }
21007  #endif
21008  /*--- Builtin init code ---*/
21009  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21010  /*--- Constants init code ---*/
21011  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21012  /*--- Global type/function init code ---*/
21013  (void)__Pyx_modinit_global_init_code();
21014  (void)__Pyx_modinit_variable_export_code();
21015  (void)__Pyx_modinit_function_export_code();
21016  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
21017  (void)__Pyx_modinit_type_import_code();
21018  (void)__Pyx_modinit_variable_import_code();
21019  (void)__Pyx_modinit_function_import_code();
21020  /*--- Execution code ---*/
21021  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
21022  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21023  #endif
21024 
21025  /* "PyClical.pyx":29
21026  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
21027  *
21028  * import math # <<<<<<<<<<<<<<
21029  * import numbers
21030  * import collections
21031  */
21032  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
21033  __Pyx_GOTREF(__pyx_t_1);
21034  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
21035  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21036 
21037  /* "PyClical.pyx":30
21038  *
21039  * import math
21040  * import numbers # <<<<<<<<<<<<<<
21041  * import collections
21042  *
21043  */
21044  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
21045  __Pyx_GOTREF(__pyx_t_1);
21046  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
21047  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21048 
21049  /* "PyClical.pyx":31
21050  * import math
21051  * import numbers
21052  * import collections # <<<<<<<<<<<<<<
21053  *
21054  * __version__ = "0.8.4"
21055  */
21056  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
21057  __Pyx_GOTREF(__pyx_t_1);
21058  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
21059  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21060 
21061  /* "PyClical.pyx":33
21062  * import collections
21063  *
21064  * __version__ = "0.8.4" # <<<<<<<<<<<<<<
21065  *
21066  * from PyClical cimport *
21067  */
21068  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_0_8_4) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
21069 
21070  /* "PyClical.pyx":406
21071  * return index_set_to_str( self.unwrap() ).decode()
21072  *
21073  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
21074  * """
21075  * Tests for functions that Doctest cannot see.
21076  */
21077  __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)
21078  __Pyx_GOTREF(__pyx_t_1);
21079  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 406, __pyx_L1_error)
21080  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21081 
21082  /* "PyClical.pyx":1244
21083  * return clifford_to_str( self.unwrap() ).decode()
21084  *
21085  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
21086  * """
21087  * Tests for functions that Doctest cannot see.
21088  */
21089  __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)
21090  __Pyx_GOTREF(__pyx_t_1);
21091  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1244, __pyx_L1_error)
21092  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21093 
21094  /* "PyClical.pyx":1855
21095  *
21096  * # Some abbreviations.
21097  * scalar_epsilon = epsilon # <<<<<<<<<<<<<<
21098  *
21099  * pi = atan(clifford(1.0)) * 4.0
21100  */
21101  __pyx_t_1 = PyFloat_FromDouble(epsilon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
21102  __Pyx_GOTREF(__pyx_t_1);
21103  if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalar_epsilon, __pyx_t_1) < 0) __PYX_ERR(0, 1855, __pyx_L1_error)
21104  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21105 
21106  /* "PyClical.pyx":1857
21107  * scalar_epsilon = epsilon
21108  *
21109  * pi = atan(clifford(1.0)) * 4.0 # <<<<<<<<<<<<<<
21110  * tau = atan(clifford(1.0)) * 8.0
21111  *
21112  */
21113  __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)
21114  __Pyx_GOTREF(__pyx_t_1);
21115  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
21116  __Pyx_GOTREF(__pyx_t_2);
21117  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21118  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_4_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
21119  __Pyx_GOTREF(__pyx_t_1);
21120  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21121  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_1) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
21122  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21123 
21124  /* "PyClical.pyx":1858
21125  *
21126  * pi = atan(clifford(1.0)) * 4.0
21127  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
21128  *
21129  * cl = clifford
21130  */
21131  __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)
21132  __Pyx_GOTREF(__pyx_t_1);
21133  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1858, __pyx_L1_error)
21134  __Pyx_GOTREF(__pyx_t_2);
21135  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21136  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __pyx_L1_error)
21137  __Pyx_GOTREF(__pyx_t_1);
21138  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21139  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1858, __pyx_L1_error)
21140  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21141 
21142  /* "PyClical.pyx":1860
21143  * tau = atan(clifford(1.0)) * 8.0
21144  *
21145  * cl = clifford # <<<<<<<<<<<<<<
21146  * """
21147  * Abbreviation for clifford.
21148  */
21149  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1860, __pyx_L1_error)
21150 
21151  /* "PyClical.pyx":1878
21152  * """
21153  *
21154  * ist = index_set # <<<<<<<<<<<<<<
21155  * """
21156  * Abbreviation for index_set.
21157  */
21158  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1878, __pyx_L1_error)
21159 
21160  /* "PyClical.pyx":1886
21161  * """
21162  *
21163  * def e(obj): # <<<<<<<<<<<<<<
21164  * """
21165  * Abbreviation for clifford(index_set(obj)).
21166  */
21167  __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)
21168  __Pyx_GOTREF(__pyx_t_1);
21169  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_1) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
21170  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21171 
21172  /* "PyClical.pyx":1899
21173  * return clifford(index_set(obj))
21174  *
21175  * def istpq(p, q): # <<<<<<<<<<<<<<
21176  * """
21177  * Abbreviation for index_set({-q,...p}).
21178  */
21179  __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)
21180  __Pyx_GOTREF(__pyx_t_1);
21181  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_1) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
21182  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21183 
21184  /* "PyClical.pyx":1908
21185  * return index_set(set(range(-q,p+1)))
21186  *
21187  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
21188  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
21189  *
21190  */
21191  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
21192  __Pyx_GOTREF(__pyx_t_1);
21193  __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)
21194  __Pyx_GOTREF(__pyx_t_2);
21195  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21196  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
21197  __Pyx_GOTREF(__pyx_t_1);
21198  __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)
21199  __Pyx_GOTREF(__pyx_t_3);
21200  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21201  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
21202  __Pyx_GOTREF(__pyx_t_1);
21203  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21204  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21205  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_1) < 0) __PYX_ERR(0, 1908, __pyx_L1_error)
21206  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21207 
21208  /* "PyClical.pyx":1909
21209  *
21210  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
21211  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
21212  *
21213  * # Doctest interface.
21214  */
21215  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
21216  __Pyx_GOTREF(__pyx_t_1);
21217  __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)
21218  __Pyx_GOTREF(__pyx_t_3);
21219  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21220  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
21221  __Pyx_GOTREF(__pyx_t_1);
21222  __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)
21223  __Pyx_GOTREF(__pyx_t_2);
21224  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21225  __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
21226  __Pyx_GOTREF(__pyx_t_1);
21227  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21228  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21229  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_1) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
21230  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21231 
21232  /* "PyClical.pyx":1912
21233  *
21234  * # Doctest interface.
21235  * def _test(): # <<<<<<<<<<<<<<
21236  * import PyClical, doctest
21237  * return doctest.testmod(PyClical)
21238  */
21239  __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)
21240  __Pyx_GOTREF(__pyx_t_1);
21241  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1912, __pyx_L1_error)
21242  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21243 
21244  /* "PyClical.pyx":1916
21245  * return doctest.testmod(PyClical)
21246  *
21247  * if __name__ == "__main__": # <<<<<<<<<<<<<<
21248  * _test()
21249  */
21250  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
21251  __Pyx_GOTREF(__pyx_t_1);
21252  __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)
21253  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21254  if (__pyx_t_4) {
21255 
21256  /* "PyClical.pyx":1917
21257  *
21258  * if __name__ == "__main__":
21259  * _test() # <<<<<<<<<<<<<<
21260  */
21261  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __pyx_L1_error)
21262  __Pyx_GOTREF(__pyx_t_1);
21263  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
21264  __Pyx_GOTREF(__pyx_t_2);
21265  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21266  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21267 
21268  /* "PyClical.pyx":1916
21269  * return doctest.testmod(PyClical)
21270  *
21271  * if __name__ == "__main__": # <<<<<<<<<<<<<<
21272  * _test()
21273  */
21274  }
21275 
21276  /* "PyClical.pyx":1
21277  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
21278  * # cython: language_level=3
21279  * # distutils: language = c++
21280  */
21281  __pyx_t_2 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
21282  __Pyx_GOTREF(__pyx_t_2);
21283  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)
21284  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)
21285  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)
21286  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)
21287  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)
21288  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)
21289  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)
21290  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)
21291  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)
21292  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)
21293  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)
21294  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)
21295  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)
21296  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)
21297  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)
21298  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)
21299  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)
21300  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)
21301  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)
21302  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)
21303  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)
21304  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)
21305  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)
21306  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)
21307  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)
21308  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)
21309  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)
21310  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)
21311  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)
21312  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)
21313  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)
21314  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)
21315  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)
21316  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)
21317  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)
21318  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)
21319  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)
21320  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)
21321  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)
21322  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)
21323  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)
21324  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)
21325  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)
21326  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)
21327  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)
21328  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)
21329  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)
21330  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)
21331  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)
21332  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)
21333  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)
21334  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)
21335  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)
21336  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)
21337  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)
21338  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)
21339  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)
21340  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)
21341  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)
21342  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)
21343  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)
21344  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)
21345  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)
21346  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)
21347  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)
21348  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)
21349  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)
21350  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)
21351  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)
21352  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)
21353  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)
21354  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)
21355  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)
21356  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)
21357  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)
21358  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)
21359  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)
21360  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)
21361  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)
21362  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)
21363  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)
21364  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)
21365  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)
21366  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)
21367  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)
21368  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)
21369  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)
21370  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)
21371  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)
21372  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)
21373  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)
21374  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)
21375  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)
21376  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)
21377  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)
21378  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)
21379  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)
21380  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)
21381  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)
21382  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)
21383  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)
21384  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)
21385  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)
21386  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)
21387  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)
21388  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)
21389  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)
21390  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21391  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21392 
21393  /* "string.to_py":55
21394  *
21395  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
21396  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
21397  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
21398  *
21399  */
21400 
21401  /*--- Wrapped vars code ---*/
21402 
21403  goto __pyx_L0;
21404  __pyx_L1_error:;
21405  __Pyx_XDECREF(__pyx_t_1);
21406  __Pyx_XDECREF(__pyx_t_2);
21407  __Pyx_XDECREF(__pyx_t_3);
21408  if (__pyx_m) {
21409  if (__pyx_d) {
21410  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
21411  }
21412  Py_CLEAR(__pyx_m);
21413  } else if (!PyErr_Occurred()) {
21414  PyErr_SetString(PyExc_ImportError, "init PyClical");
21415  }
21416  __pyx_L0:;
21417  __Pyx_RefNannyFinishContext();
21418  #if CYTHON_PEP489_MULTI_PHASE_INIT
21419  return (__pyx_m != NULL) ? 0 : -1;
21420  #elif PY_MAJOR_VERSION >= 3
21421  return __pyx_m;
21422  #else
21423  return;
21424  #endif
21425 }
21426 
21427 /* --- Runtime support code --- */
21428 /* Refnanny */
21429 #if CYTHON_REFNANNY
21430 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
21431  PyObject *m = NULL, *p = NULL;
21432  void *r = NULL;
21433  m = PyImport_ImportModule(modname);
21434  if (!m) goto end;
21435  p = PyObject_GetAttrString(m, "RefNannyAPI");
21436  if (!p) goto end;
21437  r = PyLong_AsVoidPtr(p);
21438 end:
21439  Py_XDECREF(p);
21440  Py_XDECREF(m);
21441  return (__Pyx_RefNannyAPIStruct *)r;
21442 }
21443 #endif
21444 
21445 /* PyObjectGetAttrStr */
21446 #if CYTHON_USE_TYPE_SLOTS
21447 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
21448  PyTypeObject* tp = Py_TYPE(obj);
21449  if (likely(tp->tp_getattro))
21450  return tp->tp_getattro(obj, attr_name);
21451 #if PY_MAJOR_VERSION < 3
21452  if (likely(tp->tp_getattr))
21453  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
21454 #endif
21455  return PyObject_GetAttr(obj, attr_name);
21456 }
21457 #endif
21458 
21459 /* GetBuiltinName */
21460 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
21461  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
21462  if (unlikely(!result)) {
21463  PyErr_Format(PyExc_NameError,
21464 #if PY_MAJOR_VERSION >= 3
21465  "name '%U' is not defined", name);
21466 #else
21467  "name '%.200s' is not defined", PyString_AS_STRING(name));
21468 #endif
21469  }
21470  return result;
21471 }
21472 
21473 /* PyCFunctionFastCall */
21474 #if CYTHON_FAST_PYCCALL
21475 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
21476  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
21477  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
21478  PyObject *self = PyCFunction_GET_SELF(func);
21479  int flags = PyCFunction_GET_FLAGS(func);
21480  assert(PyCFunction_Check(func));
21481  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
21482  assert(nargs >= 0);
21483  assert(nargs == 0 || args != NULL);
21484  /* _PyCFunction_FastCallDict() must not be called with an exception set,
21485  because it may clear it (directly or indirectly) and so the
21486  caller loses its exception */
21487  assert(!PyErr_Occurred());
21488  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
21489  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
21490  } else {
21491  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
21492  }
21493 }
21494 #endif
21495 
21496 /* PyFunctionFastCall */
21497 #if CYTHON_FAST_PYCALL
21498 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
21499  PyObject *globals) {
21500  PyFrameObject *f;
21501  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21502  PyObject **fastlocals;
21503  Py_ssize_t i;
21504  PyObject *result;
21505  assert(globals != NULL);
21506  /* XXX Perhaps we should create a specialized
21507  PyFrame_New() that doesn't take locals, but does
21508  take builtins without sanity checking them.
21509  */
21510  assert(tstate != NULL);
21511  f = PyFrame_New(tstate, co, globals, NULL);
21512  if (f == NULL) {
21513  return NULL;
21514  }
21515  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
21516  for (i = 0; i < na; i++) {
21517  Py_INCREF(*args);
21518  fastlocals[i] = *args++;
21519  }
21520  result = PyEval_EvalFrameEx(f,0);
21521  ++tstate->recursion_depth;
21522  Py_DECREF(f);
21523  --tstate->recursion_depth;
21524  return result;
21525 }
21526 #if 1 || PY_VERSION_HEX < 0x030600B1
21527 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
21528  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
21529  PyObject *globals = PyFunction_GET_GLOBALS(func);
21530  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
21531  PyObject *closure;
21532 #if PY_MAJOR_VERSION >= 3
21533  PyObject *kwdefs;
21534 #endif
21535  PyObject *kwtuple, **k;
21536  PyObject **d;
21537  Py_ssize_t nd;
21538  Py_ssize_t nk;
21539  PyObject *result;
21540  assert(kwargs == NULL || PyDict_Check(kwargs));
21541  nk = kwargs ? PyDict_Size(kwargs) : 0;
21542  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
21543  return NULL;
21544  }
21545  if (
21546 #if PY_MAJOR_VERSION >= 3
21547  co->co_kwonlyargcount == 0 &&
21548 #endif
21549  likely(kwargs == NULL || nk == 0) &&
21550  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
21551  if (argdefs == NULL && co->co_argcount == nargs) {
21552  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
21553  goto done;
21554  }
21555  else if (nargs == 0 && argdefs != NULL
21556  && co->co_argcount == Py_SIZE(argdefs)) {
21557  /* function called with no arguments, but all parameters have
21558  a default value: use default values as arguments .*/
21559  args = &PyTuple_GET_ITEM(argdefs, 0);
21560  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
21561  goto done;
21562  }
21563  }
21564  if (kwargs != NULL) {
21565  Py_ssize_t pos, i;
21566  kwtuple = PyTuple_New(2 * nk);
21567  if (kwtuple == NULL) {
21568  result = NULL;
21569  goto done;
21570  }
21571  k = &PyTuple_GET_ITEM(kwtuple, 0);
21572  pos = i = 0;
21573  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
21574  Py_INCREF(k[i]);
21575  Py_INCREF(k[i+1]);
21576  i += 2;
21577  }
21578  nk = i / 2;
21579  }
21580  else {
21581  kwtuple = NULL;
21582  k = NULL;
21583  }
21584  closure = PyFunction_GET_CLOSURE(func);
21585 #if PY_MAJOR_VERSION >= 3
21586  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
21587 #endif
21588  if (argdefs != NULL) {
21589  d = &PyTuple_GET_ITEM(argdefs, 0);
21590  nd = Py_SIZE(argdefs);
21591  }
21592  else {
21593  d = NULL;
21594  nd = 0;
21595  }
21596 #if PY_MAJOR_VERSION >= 3
21597  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
21598  args, (int)nargs,
21599  k, (int)nk,
21600  d, (int)nd, kwdefs, closure);
21601 #else
21602  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
21603  args, (int)nargs,
21604  k, (int)nk,
21605  d, (int)nd, closure);
21606 #endif
21607  Py_XDECREF(kwtuple);
21608 done:
21609  Py_LeaveRecursiveCall();
21610  return result;
21611 }
21612 #endif
21613 #endif
21614 
21615 /* PyObjectCall */
21616 #if CYTHON_COMPILING_IN_CPYTHON
21617 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
21618  PyObject *result;
21619  ternaryfunc call = func->ob_type->tp_call;
21620  if (unlikely(!call))
21621  return PyObject_Call(func, arg, kw);
21622  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21623  return NULL;
21624  result = (*call)(func, arg, kw);
21625  Py_LeaveRecursiveCall();
21626  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21627  PyErr_SetString(
21628  PyExc_SystemError,
21629  "NULL result without error in PyObject_Call");
21630  }
21631  return result;
21632 }
21633 #endif
21634 
21635 /* PyObjectCallMethO */
21636 #if CYTHON_COMPILING_IN_CPYTHON
21637 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
21638  PyObject *self, *result;
21639  PyCFunction cfunc;
21640  cfunc = PyCFunction_GET_FUNCTION(func);
21641  self = PyCFunction_GET_SELF(func);
21642  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21643  return NULL;
21644  result = cfunc(self, arg);
21645  Py_LeaveRecursiveCall();
21646  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21647  PyErr_SetString(
21648  PyExc_SystemError,
21649  "NULL result without error in PyObject_Call");
21650  }
21651  return result;
21652 }
21653 #endif
21654 
21655 /* PyObjectCallOneArg */
21656 #if CYTHON_COMPILING_IN_CPYTHON
21657 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21658  PyObject *result;
21659  PyObject *args = PyTuple_New(1);
21660  if (unlikely(!args)) return NULL;
21661  Py_INCREF(arg);
21662  PyTuple_SET_ITEM(args, 0, arg);
21663  result = __Pyx_PyObject_Call(func, args, NULL);
21664  Py_DECREF(args);
21665  return result;
21666 }
21667 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21668 #if CYTHON_FAST_PYCALL
21669  if (PyFunction_Check(func)) {
21670  return __Pyx_PyFunction_FastCall(func, &arg, 1);
21671  }
21672 #endif
21673  if (likely(PyCFunction_Check(func))) {
21674  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
21675  return __Pyx_PyObject_CallMethO(func, arg);
21676 #if CYTHON_FAST_PYCCALL
21677  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
21678  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
21679 #endif
21680  }
21681  }
21682  return __Pyx__PyObject_CallOneArg(func, arg);
21683 }
21684 #else
21685 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21686  PyObject *result;
21687  PyObject *args = PyTuple_Pack(1, arg);
21688  if (unlikely(!args)) return NULL;
21689  result = __Pyx_PyObject_Call(func, args, NULL);
21690  Py_DECREF(args);
21691  return result;
21692 }
21693 #endif
21694 
21695 /* PyErrFetchRestore */
21696 #if CYTHON_FAST_THREAD_STATE
21697 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21698  PyObject *tmp_type, *tmp_value, *tmp_tb;
21699  tmp_type = tstate->curexc_type;
21700  tmp_value = tstate->curexc_value;
21701  tmp_tb = tstate->curexc_traceback;
21702  tstate->curexc_type = type;
21703  tstate->curexc_value = value;
21704  tstate->curexc_traceback = tb;
21705  Py_XDECREF(tmp_type);
21706  Py_XDECREF(tmp_value);
21707  Py_XDECREF(tmp_tb);
21708 }
21709 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21710  *type = tstate->curexc_type;
21711  *value = tstate->curexc_value;
21712  *tb = tstate->curexc_traceback;
21713  tstate->curexc_type = 0;
21714  tstate->curexc_value = 0;
21715  tstate->curexc_traceback = 0;
21716 }
21717 #endif
21718 
21719 /* WriteUnraisableException */
21720 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
21721  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
21722  int full_traceback, CYTHON_UNUSED int nogil) {
21723  PyObject *old_exc, *old_val, *old_tb;
21724  PyObject *ctx;
21725  __Pyx_PyThreadState_declare
21726 #ifdef WITH_THREAD
21727  PyGILState_STATE state;
21728  if (nogil)
21729  state = PyGILState_Ensure();
21730 #ifdef _MSC_VER
21731  else state = (PyGILState_STATE)-1;
21732 #endif
21733 #endif
21734  __Pyx_PyThreadState_assign
21735  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
21736  if (full_traceback) {
21737  Py_XINCREF(old_exc);
21738  Py_XINCREF(old_val);
21739  Py_XINCREF(old_tb);
21740  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21741  PyErr_PrintEx(1);
21742  }
21743  #if PY_MAJOR_VERSION < 3
21744  ctx = PyString_FromString(name);
21745  #else
21746  ctx = PyUnicode_FromString(name);
21747  #endif
21748  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21749  if (!ctx) {
21750  PyErr_WriteUnraisable(Py_None);
21751  } else {
21752  PyErr_WriteUnraisable(ctx);
21753  Py_DECREF(ctx);
21754  }
21755 #ifdef WITH_THREAD
21756  if (nogil)
21757  PyGILState_Release(state);
21758 #endif
21759 }
21760 
21761 /* PyDictVersioning */
21762 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
21763 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
21764  PyObject *dict = Py_TYPE(obj)->tp_dict;
21765  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
21766 }
21767 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
21768  PyObject **dictptr = NULL;
21769  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
21770  if (offset) {
21771 #if CYTHON_COMPILING_IN_CPYTHON
21772  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
21773 #else
21774  dictptr = _PyObject_GetDictPtr(obj);
21775 #endif
21776  }
21777  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
21778 }
21779 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
21780  PyObject *dict = Py_TYPE(obj)->tp_dict;
21781  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
21782  return 0;
21783  return obj_dict_version == __Pyx_get_object_dict_version(obj);
21784 }
21785 #endif
21786 
21787 /* PyObjectCallNoArg */
21788 #if CYTHON_COMPILING_IN_CPYTHON
21789 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
21790 #if CYTHON_FAST_PYCALL
21791  if (PyFunction_Check(func)) {
21792  return __Pyx_PyFunction_FastCall(func, NULL, 0);
21793  }
21794 #endif
21795 #ifdef __Pyx_CyFunction_USED
21796  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
21797 #else
21798  if (likely(PyCFunction_Check(func)))
21799 #endif
21800  {
21801  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
21802  return __Pyx_PyObject_CallMethO(func, NULL);
21803  }
21804  }
21805  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
21806 }
21807 #endif
21808 
21809 /* RaiseDoubleKeywords */
21810 static void __Pyx_RaiseDoubleKeywordsError(
21811  const char* func_name,
21812  PyObject* kw_name)
21813 {
21814  PyErr_Format(PyExc_TypeError,
21815  #if PY_MAJOR_VERSION >= 3
21816  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
21817  #else
21818  "%s() got multiple values for keyword argument '%s'", func_name,
21819  PyString_AsString(kw_name));
21820  #endif
21821 }
21822 
21823 /* ParseKeywords */
21824 static int __Pyx_ParseOptionalKeywords(
21825  PyObject *kwds,
21826  PyObject **argnames[],
21827  PyObject *kwds2,
21828  PyObject *values[],
21829  Py_ssize_t num_pos_args,
21830  const char* function_name)
21831 {
21832  PyObject *key = 0, *value = 0;
21833  Py_ssize_t pos = 0;
21834  PyObject*** name;
21835  PyObject*** first_kw_arg = argnames + num_pos_args;
21836  while (PyDict_Next(kwds, &pos, &key, &value)) {
21837  name = first_kw_arg;
21838  while (*name && (**name != key)) name++;
21839  if (*name) {
21840  values[name-argnames] = value;
21841  continue;
21842  }
21843  name = first_kw_arg;
21844  #if PY_MAJOR_VERSION < 3
21845  if (likely(PyString_Check(key))) {
21846  while (*name) {
21847  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
21848  && _PyString_Eq(**name, key)) {
21849  values[name-argnames] = value;
21850  break;
21851  }
21852  name++;
21853  }
21854  if (*name) continue;
21855  else {
21856  PyObject*** argname = argnames;
21857  while (argname != first_kw_arg) {
21858  if ((**argname == key) || (
21859  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
21860  && _PyString_Eq(**argname, key))) {
21861  goto arg_passed_twice;
21862  }
21863  argname++;
21864  }
21865  }
21866  } else
21867  #endif
21868  if (likely(PyUnicode_Check(key))) {
21869  while (*name) {
21870  int cmp = (**name == key) ? 0 :
21871  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21872  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
21873  #endif
21874  PyUnicode_Compare(**name, key);
21875  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21876  if (cmp == 0) {
21877  values[name-argnames] = value;
21878  break;
21879  }
21880  name++;
21881  }
21882  if (*name) continue;
21883  else {
21884  PyObject*** argname = argnames;
21885  while (argname != first_kw_arg) {
21886  int cmp = (**argname == key) ? 0 :
21887  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21888  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
21889  #endif
21890  PyUnicode_Compare(**argname, key);
21891  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21892  if (cmp == 0) goto arg_passed_twice;
21893  argname++;
21894  }
21895  }
21896  } else
21897  goto invalid_keyword_type;
21898  if (kwds2) {
21899  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
21900  } else {
21901  goto invalid_keyword;
21902  }
21903  }
21904  return 0;
21905 arg_passed_twice:
21906  __Pyx_RaiseDoubleKeywordsError(function_name, key);
21907  goto bad;
21908 invalid_keyword_type:
21909  PyErr_Format(PyExc_TypeError,
21910  "%.200s() keywords must be strings", function_name);
21911  goto bad;
21912 invalid_keyword:
21913  PyErr_Format(PyExc_TypeError,
21914  #if PY_MAJOR_VERSION < 3
21915  "%.200s() got an unexpected keyword argument '%.200s'",
21916  function_name, PyString_AsString(key));
21917  #else
21918  "%s() got an unexpected keyword argument '%U'",
21919  function_name, key);
21920  #endif
21921 bad:
21922  return -1;
21923 }
21924 
21925 /* RaiseArgTupleInvalid */
21926 static void __Pyx_RaiseArgtupleInvalid(
21927  const char* func_name,
21928  int exact,
21929  Py_ssize_t num_min,
21930  Py_ssize_t num_max,
21931  Py_ssize_t num_found)
21932 {
21933  Py_ssize_t num_expected;
21934  const char *more_or_less;
21935  if (num_found < num_min) {
21936  num_expected = num_min;
21937  more_or_less = "at least";
21938  } else {
21939  num_expected = num_max;
21940  more_or_less = "at most";
21941  }
21942  if (exact) {
21943  more_or_less = "exactly";
21944  }
21945  PyErr_Format(PyExc_TypeError,
21946  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
21947  func_name, more_or_less, num_expected,
21948  (num_expected == 1) ? "" : "s", num_found);
21949 }
21950 
21951 /* GetModuleGlobalName */
21952 #if CYTHON_USE_DICT_VERSIONS
21953 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
21954 #else
21955 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
21956 #endif
21957 {
21958  PyObject *result;
21959 #if !CYTHON_AVOID_BORROWED_REFS
21960 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
21961  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
21962  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21963  if (likely(result)) {
21964  return __Pyx_NewRef(result);
21965  } else if (unlikely(PyErr_Occurred())) {
21966  return NULL;
21967  }
21968 #else
21969  result = PyDict_GetItem(__pyx_d, name);
21970  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21971  if (likely(result)) {
21972  return __Pyx_NewRef(result);
21973  }
21974 #endif
21975 #else
21976  result = PyObject_GetItem(__pyx_d, name);
21977  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21978  if (likely(result)) {
21979  return __Pyx_NewRef(result);
21980  }
21981  PyErr_Clear();
21982 #endif
21983  return __Pyx_GetBuiltinName(name);
21984 }
21985 
21986 /* GetTopmostException */
21987 #if CYTHON_USE_EXC_INFO_STACK
21988 static _PyErr_StackItem *
21989 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
21990 {
21991  _PyErr_StackItem *exc_info = tstate->exc_info;
21992  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
21993  exc_info->previous_item != NULL)
21994  {
21995  exc_info = exc_info->previous_item;
21996  }
21997  return exc_info;
21998 }
21999 #endif
22000 
22001 /* SaveResetException */
22002 #if CYTHON_FAST_THREAD_STATE
22003 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22004  #if CYTHON_USE_EXC_INFO_STACK
22005  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
22006  *type = exc_info->exc_type;
22007  *value = exc_info->exc_value;
22008  *tb = exc_info->exc_traceback;
22009  #else
22010  *type = tstate->exc_type;
22011  *value = tstate->exc_value;
22012  *tb = tstate->exc_traceback;
22013  #endif
22014  Py_XINCREF(*type);
22015  Py_XINCREF(*value);
22016  Py_XINCREF(*tb);
22017 }
22018 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
22019  PyObject *tmp_type, *tmp_value, *tmp_tb;
22020  #if CYTHON_USE_EXC_INFO_STACK
22021  _PyErr_StackItem *exc_info = tstate->exc_info;
22022  tmp_type = exc_info->exc_type;
22023  tmp_value = exc_info->exc_value;
22024  tmp_tb = exc_info->exc_traceback;
22025  exc_info->exc_type = type;
22026  exc_info->exc_value = value;
22027  exc_info->exc_traceback = tb;
22028  #else
22029  tmp_type = tstate->exc_type;
22030  tmp_value = tstate->exc_value;
22031  tmp_tb = tstate->exc_traceback;
22032  tstate->exc_type = type;
22033  tstate->exc_value = value;
22034  tstate->exc_traceback = tb;
22035  #endif
22036  Py_XDECREF(tmp_type);
22037  Py_XDECREF(tmp_value);
22038  Py_XDECREF(tmp_tb);
22039 }
22040 #endif
22041 
22042 /* PyErrExceptionMatches */
22043 #if CYTHON_FAST_THREAD_STATE
22044 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22045  Py_ssize_t i, n;
22046  n = PyTuple_GET_SIZE(tuple);
22047 #if PY_MAJOR_VERSION >= 3
22048  for (i=0; i<n; i++) {
22049  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22050  }
22051 #endif
22052  for (i=0; i<n; i++) {
22053  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
22054  }
22055  return 0;
22056 }
22057 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
22058  PyObject *exc_type = tstate->curexc_type;
22059  if (exc_type == err) return 1;
22060  if (unlikely(!exc_type)) return 0;
22061  if (unlikely(PyTuple_Check(err)))
22062  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
22063  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
22064 }
22065 #endif
22066 
22067 /* GetException */
22068 #if CYTHON_FAST_THREAD_STATE
22069 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
22070 #else
22071 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
22072 #endif
22073 {
22074  PyObject *local_type, *local_value, *local_tb;
22075 #if CYTHON_FAST_THREAD_STATE
22076  PyObject *tmp_type, *tmp_value, *tmp_tb;
22077  local_type = tstate->curexc_type;
22078  local_value = tstate->curexc_value;
22079  local_tb = tstate->curexc_traceback;
22080  tstate->curexc_type = 0;
22081  tstate->curexc_value = 0;
22082  tstate->curexc_traceback = 0;
22083 #else
22084  PyErr_Fetch(&local_type, &local_value, &local_tb);
22085 #endif
22086  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
22087 #if CYTHON_FAST_THREAD_STATE
22088  if (unlikely(tstate->curexc_type))
22089 #else
22090  if (unlikely(PyErr_Occurred()))
22091 #endif
22092  goto bad;
22093  #if PY_MAJOR_VERSION >= 3
22094  if (local_tb) {
22095  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
22096  goto bad;
22097  }
22098  #endif
22099  Py_XINCREF(local_tb);
22100  Py_XINCREF(local_type);
22101  Py_XINCREF(local_value);
22102  *type = local_type;
22103  *value = local_value;
22104  *tb = local_tb;
22105 #if CYTHON_FAST_THREAD_STATE
22106  #if CYTHON_USE_EXC_INFO_STACK
22107  {
22108  _PyErr_StackItem *exc_info = tstate->exc_info;
22109  tmp_type = exc_info->exc_type;
22110  tmp_value = exc_info->exc_value;
22111  tmp_tb = exc_info->exc_traceback;
22112  exc_info->exc_type = local_type;
22113  exc_info->exc_value = local_value;
22114  exc_info->exc_traceback = local_tb;
22115  }
22116  #else
22117  tmp_type = tstate->exc_type;
22118  tmp_value = tstate->exc_value;
22119  tmp_tb = tstate->exc_traceback;
22120  tstate->exc_type = local_type;
22121  tstate->exc_value = local_value;
22122  tstate->exc_traceback = local_tb;
22123  #endif
22124  Py_XDECREF(tmp_type);
22125  Py_XDECREF(tmp_value);
22126  Py_XDECREF(tmp_tb);
22127 #else
22128  PyErr_SetExcInfo(local_type, local_value, local_tb);
22129 #endif
22130  return 0;
22131 bad:
22132  *type = 0;
22133  *value = 0;
22134  *tb = 0;
22135  Py_XDECREF(local_type);
22136  Py_XDECREF(local_value);
22137  Py_XDECREF(local_tb);
22138  return -1;
22139 }
22140 
22141 /* RaiseException */
22142 #if PY_MAJOR_VERSION < 3
22143 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
22144  CYTHON_UNUSED PyObject *cause) {
22145  __Pyx_PyThreadState_declare
22146  Py_XINCREF(type);
22147  if (!value || value == Py_None)
22148  value = NULL;
22149  else
22150  Py_INCREF(value);
22151  if (!tb || tb == Py_None)
22152  tb = NULL;
22153  else {
22154  Py_INCREF(tb);
22155  if (!PyTraceBack_Check(tb)) {
22156  PyErr_SetString(PyExc_TypeError,
22157  "raise: arg 3 must be a traceback or None");
22158  goto raise_error;
22159  }
22160  }
22161  if (PyType_Check(type)) {
22162 #if CYTHON_COMPILING_IN_PYPY
22163  if (!value) {
22164  Py_INCREF(Py_None);
22165  value = Py_None;
22166  }
22167 #endif
22168  PyErr_NormalizeException(&type, &value, &tb);
22169  } else {
22170  if (value) {
22171  PyErr_SetString(PyExc_TypeError,
22172  "instance exception may not have a separate value");
22173  goto raise_error;
22174  }
22175  value = type;
22176  type = (PyObject*) Py_TYPE(type);
22177  Py_INCREF(type);
22178  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
22179  PyErr_SetString(PyExc_TypeError,
22180  "raise: exception class must be a subclass of BaseException");
22181  goto raise_error;
22182  }
22183  }
22184  __Pyx_PyThreadState_assign
22185  __Pyx_ErrRestore(type, value, tb);
22186  return;
22187 raise_error:
22188  Py_XDECREF(value);
22189  Py_XDECREF(type);
22190  Py_XDECREF(tb);
22191  return;
22192 }
22193 #else
22194 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
22195  PyObject* owned_instance = NULL;
22196  if (tb == Py_None) {
22197  tb = 0;
22198  } else if (tb && !PyTraceBack_Check(tb)) {
22199  PyErr_SetString(PyExc_TypeError,
22200  "raise: arg 3 must be a traceback or None");
22201  goto bad;
22202  }
22203  if (value == Py_None)
22204  value = 0;
22205  if (PyExceptionInstance_Check(type)) {
22206  if (value) {
22207  PyErr_SetString(PyExc_TypeError,
22208  "instance exception may not have a separate value");
22209  goto bad;
22210  }
22211  value = type;
22212  type = (PyObject*) Py_TYPE(value);
22213  } else if (PyExceptionClass_Check(type)) {
22214  PyObject *instance_class = NULL;
22215  if (value && PyExceptionInstance_Check(value)) {
22216  instance_class = (PyObject*) Py_TYPE(value);
22217  if (instance_class != type) {
22218  int is_subclass = PyObject_IsSubclass(instance_class, type);
22219  if (!is_subclass) {
22220  instance_class = NULL;
22221  } else if (unlikely(is_subclass == -1)) {
22222  goto bad;
22223  } else {
22224  type = instance_class;
22225  }
22226  }
22227  }
22228  if (!instance_class) {
22229  PyObject *args;
22230  if (!value)
22231  args = PyTuple_New(0);
22232  else if (PyTuple_Check(value)) {
22233  Py_INCREF(value);
22234  args = value;
22235  } else
22236  args = PyTuple_Pack(1, value);
22237  if (!args)
22238  goto bad;
22239  owned_instance = PyObject_Call(type, args, NULL);
22240  Py_DECREF(args);
22241  if (!owned_instance)
22242  goto bad;
22243  value = owned_instance;
22244  if (!PyExceptionInstance_Check(value)) {
22245  PyErr_Format(PyExc_TypeError,
22246  "calling %R should have returned an instance of "
22247  "BaseException, not %R",
22248  type, Py_TYPE(value));
22249  goto bad;
22250  }
22251  }
22252  } else {
22253  PyErr_SetString(PyExc_TypeError,
22254  "raise: exception class must be a subclass of BaseException");
22255  goto bad;
22256  }
22257  if (cause) {
22258  PyObject *fixed_cause;
22259  if (cause == Py_None) {
22260  fixed_cause = NULL;
22261  } else if (PyExceptionClass_Check(cause)) {
22262  fixed_cause = PyObject_CallObject(cause, NULL);
22263  if (fixed_cause == NULL)
22264  goto bad;
22265  } else if (PyExceptionInstance_Check(cause)) {
22266  fixed_cause = cause;
22267  Py_INCREF(fixed_cause);
22268  } else {
22269  PyErr_SetString(PyExc_TypeError,
22270  "exception causes must derive from "
22271  "BaseException");
22272  goto bad;
22273  }
22274  PyException_SetCause(value, fixed_cause);
22275  }
22276  PyErr_SetObject(type, value);
22277  if (tb) {
22278 #if CYTHON_COMPILING_IN_PYPY
22279  PyObject *tmp_type, *tmp_value, *tmp_tb;
22280  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
22281  Py_INCREF(tb);
22282  PyErr_Restore(tmp_type, tmp_value, tb);
22283  Py_XDECREF(tmp_tb);
22284 #else
22285  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22286  PyObject* tmp_tb = tstate->curexc_traceback;
22287  if (tb != tmp_tb) {
22288  Py_INCREF(tb);
22289  tstate->curexc_traceback = tb;
22290  Py_XDECREF(tmp_tb);
22291  }
22292 #endif
22293  }
22294 bad:
22295  Py_XDECREF(owned_instance);
22296  return;
22297 }
22298 #endif
22299 
22300 /* PyObjectCall2Args */
22301 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
22302  PyObject *args, *result = NULL;
22303  #if CYTHON_FAST_PYCALL
22304  if (PyFunction_Check(function)) {
22305  PyObject *args[2] = {arg1, arg2};
22306  return __Pyx_PyFunction_FastCall(function, args, 2);
22307  }
22308  #endif
22309  #if CYTHON_FAST_PYCCALL
22310  if (__Pyx_PyFastCFunction_Check(function)) {
22311  PyObject *args[2] = {arg1, arg2};
22312  return __Pyx_PyCFunction_FastCall(function, args, 2);
22313  }
22314  #endif
22315  args = PyTuple_New(2);
22316  if (unlikely(!args)) goto done;
22317  Py_INCREF(arg1);
22318  PyTuple_SET_ITEM(args, 0, arg1);
22319  Py_INCREF(arg2);
22320  PyTuple_SET_ITEM(args, 1, arg2);
22321  Py_INCREF(function);
22322  result = __Pyx_PyObject_Call(function, args, NULL);
22323  Py_DECREF(args);
22324  Py_DECREF(function);
22325 done:
22326  return result;
22327 }
22328 
22329 /* PyIntBinop */
22330 #if !CYTHON_COMPILING_IN_PYPY
22331 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
22332  (void)inplace;
22333  (void)zerodivision_check;
22334  #if PY_MAJOR_VERSION < 3
22335  if (likely(PyInt_CheckExact(op1))) {
22336  const long b = intval;
22337  long x;
22338  long a = PyInt_AS_LONG(op1);
22339  x = (long)((unsigned long)a + b);
22340  if (likely((x^a) >= 0 || (x^b) >= 0))
22341  return PyInt_FromLong(x);
22342  return PyLong_Type.tp_as_number->nb_add(op1, op2);
22343  }
22344  #endif
22345  #if CYTHON_USE_PYLONG_INTERNALS
22346  if (likely(PyLong_CheckExact(op1))) {
22347  const long b = intval;
22348  long a, x;
22349 #ifdef HAVE_LONG_LONG
22350  const PY_LONG_LONG llb = intval;
22351  PY_LONG_LONG lla, llx;
22352 #endif
22353  const digit* digits = ((PyLongObject*)op1)->ob_digit;
22354  const Py_ssize_t size = Py_SIZE(op1);
22355  if (likely(__Pyx_sst_abs(size) <= 1)) {
22356  a = likely(size) ? digits[0] : 0;
22357  if (size == -1) a = -a;
22358  } else {
22359  switch (size) {
22360  case -2:
22361  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22362  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22363  break;
22364 #ifdef HAVE_LONG_LONG
22365  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
22366  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22367  goto long_long;
22368 #endif
22369  }
22370  CYTHON_FALLTHROUGH;
22371  case 2:
22372  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22373  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22374  break;
22375 #ifdef HAVE_LONG_LONG
22376  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
22377  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22378  goto long_long;
22379 #endif
22380  }
22381  CYTHON_FALLTHROUGH;
22382  case -3:
22383  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22384  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22385  break;
22386 #ifdef HAVE_LONG_LONG
22387  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
22388  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]));
22389  goto long_long;
22390 #endif
22391  }
22392  CYTHON_FALLTHROUGH;
22393  case 3:
22394  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22395  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22396  break;
22397 #ifdef HAVE_LONG_LONG
22398  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
22399  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]));
22400  goto long_long;
22401 #endif
22402  }
22403  CYTHON_FALLTHROUGH;
22404  case -4:
22405  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22406  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22407  break;
22408 #ifdef HAVE_LONG_LONG
22409  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
22410  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]));
22411  goto long_long;
22412 #endif
22413  }
22414  CYTHON_FALLTHROUGH;
22415  case 4:
22416  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22417  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22418  break;
22419 #ifdef HAVE_LONG_LONG
22420  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
22421  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]));
22422  goto long_long;
22423 #endif
22424  }
22425  CYTHON_FALLTHROUGH;
22426  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
22427  }
22428  }
22429  x = a + b;
22430  return PyLong_FromLong(x);
22431 #ifdef HAVE_LONG_LONG
22432  long_long:
22433  llx = lla + llb;
22434  return PyLong_FromLongLong(llx);
22435 #endif
22436 
22437 
22438  }
22439  #endif
22440  if (PyFloat_CheckExact(op1)) {
22441  const long b = intval;
22442  double a = PyFloat_AS_DOUBLE(op1);
22443  double result;
22444  PyFPE_START_PROTECT("add", return NULL)
22445  result = ((double)a) + (double)b;
22446  PyFPE_END_PROTECT(result)
22447  return PyFloat_FromDouble(result);
22448  }
22449  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
22450 }
22451 #endif
22452 
22453 /* decode_c_bytes */
22454 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
22455  const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
22456  const char* encoding, const char* errors,
22457  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
22458  if (unlikely((start < 0) | (stop < 0))) {
22459  if (start < 0) {
22460  start += length;
22461  if (start < 0)
22462  start = 0;
22463  }
22464  if (stop < 0)
22465  stop += length;
22466  }
22467  if (stop > length)
22468  stop = length;
22469  if (unlikely(stop <= start))
22470  return __Pyx_NewRef(__pyx_empty_unicode);
22471  length = stop - start;
22472  cstring += start;
22473  if (decode_func) {
22474  return decode_func(cstring, length, errors);
22475  } else {
22476  return PyUnicode_Decode(cstring, length, encoding, errors);
22477  }
22478 }
22479 
22480 /* SwapException */
22481 #if CYTHON_FAST_THREAD_STATE
22482 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22483  PyObject *tmp_type, *tmp_value, *tmp_tb;
22484  #if CYTHON_USE_EXC_INFO_STACK
22485  _PyErr_StackItem *exc_info = tstate->exc_info;
22486  tmp_type = exc_info->exc_type;
22487  tmp_value = exc_info->exc_value;
22488  tmp_tb = exc_info->exc_traceback;
22489  exc_info->exc_type = *type;
22490  exc_info->exc_value = *value;
22491  exc_info->exc_traceback = *tb;
22492  #else
22493  tmp_type = tstate->exc_type;
22494  tmp_value = tstate->exc_value;
22495  tmp_tb = tstate->exc_traceback;
22496  tstate->exc_type = *type;
22497  tstate->exc_value = *value;
22498  tstate->exc_traceback = *tb;
22499  #endif
22500  *type = tmp_type;
22501  *value = tmp_value;
22502  *tb = tmp_tb;
22503 }
22504 #else
22505 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22506  PyObject *tmp_type, *tmp_value, *tmp_tb;
22507  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22508  PyErr_SetExcInfo(*type, *value, *tb);
22509  *type = tmp_type;
22510  *value = tmp_value;
22511  *tb = tmp_tb;
22512 }
22513 #endif
22514 
22515 /* SetItemInt */
22516 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
22517  int r;
22518  if (!j) return -1;
22519  r = PyObject_SetItem(o, j, v);
22520  Py_DECREF(j);
22521  return r;
22522 }
22523 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
22524  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
22525 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
22526  if (is_list || PyList_CheckExact(o)) {
22527  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
22528  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
22529  PyObject* old = PyList_GET_ITEM(o, n);
22530  Py_INCREF(v);
22531  PyList_SET_ITEM(o, n, v);
22532  Py_DECREF(old);
22533  return 1;
22534  }
22535  } else {
22536  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
22537  if (likely(m && m->sq_ass_item)) {
22538  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
22539  Py_ssize_t l = m->sq_length(o);
22540  if (likely(l >= 0)) {
22541  i += l;
22542  } else {
22543  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
22544  return -1;
22545  PyErr_Clear();
22546  }
22547  }
22548  return m->sq_ass_item(o, i, v);
22549  }
22550  }
22551 #else
22552 #if CYTHON_COMPILING_IN_PYPY
22553  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
22554 #else
22555  if (is_list || PySequence_Check(o))
22556 #endif
22557  {
22558  return PySequence_SetItem(o, i, v);
22559  }
22560 #endif
22561  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
22562 }
22563 
22564 /* ArgTypeTest */
22565 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
22566 {
22567  if (unlikely(!type)) {
22568  PyErr_SetString(PyExc_SystemError, "Missing type object");
22569  return 0;
22570  }
22571  else if (exact) {
22572  #if PY_MAJOR_VERSION == 2
22573  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
22574  #endif
22575  }
22576  else {
22577  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
22578  }
22579  PyErr_Format(PyExc_TypeError,
22580  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
22581  name, type->tp_name, Py_TYPE(obj)->tp_name);
22582  return 0;
22583 }
22584 
22585 /* Import */
22586 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
22587  PyObject *empty_list = 0;
22588  PyObject *module = 0;
22589  PyObject *global_dict = 0;
22590  PyObject *empty_dict = 0;
22591  PyObject *list;
22592  #if PY_MAJOR_VERSION < 3
22593  PyObject *py_import;
22594  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
22595  if (!py_import)
22596  goto bad;
22597  #endif
22598  if (from_list)
22599  list = from_list;
22600  else {
22601  empty_list = PyList_New(0);
22602  if (!empty_list)
22603  goto bad;
22604  list = empty_list;
22605  }
22606  global_dict = PyModule_GetDict(__pyx_m);
22607  if (!global_dict)
22608  goto bad;
22609  empty_dict = PyDict_New();
22610  if (!empty_dict)
22611  goto bad;
22612  {
22613  #if PY_MAJOR_VERSION >= 3
22614  if (level == -1) {
22615  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
22616  module = PyImport_ImportModuleLevelObject(
22617  name, global_dict, empty_dict, list, 1);
22618  if (!module) {
22619  if (!PyErr_ExceptionMatches(PyExc_ImportError))
22620  goto bad;
22621  PyErr_Clear();
22622  }
22623  }
22624  level = 0;
22625  }
22626  #endif
22627  if (!module) {
22628  #if PY_MAJOR_VERSION < 3
22629  PyObject *py_level = PyInt_FromLong(level);
22630  if (!py_level)
22631  goto bad;
22632  module = PyObject_CallFunctionObjArgs(py_import,
22633  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
22634  Py_DECREF(py_level);
22635  #else
22636  module = PyImport_ImportModuleLevelObject(
22637  name, global_dict, empty_dict, list, level);
22638  #endif
22639  }
22640  }
22641 bad:
22642  #if PY_MAJOR_VERSION < 3
22643  Py_XDECREF(py_import);
22644  #endif
22645  Py_XDECREF(empty_list);
22646  Py_XDECREF(empty_dict);
22647  return module;
22648 }
22649 
22650 /* PyObject_GenericGetAttrNoDict */
22651 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
22652 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
22653  PyErr_Format(PyExc_AttributeError,
22654 #if PY_MAJOR_VERSION >= 3
22655  "'%.50s' object has no attribute '%U'",
22656  tp->tp_name, attr_name);
22657 #else
22658  "'%.50s' object has no attribute '%.400s'",
22659  tp->tp_name, PyString_AS_STRING(attr_name));
22660 #endif
22661  return NULL;
22662 }
22663 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
22664  PyObject *descr;
22665  PyTypeObject *tp = Py_TYPE(obj);
22666  if (unlikely(!PyString_Check(attr_name))) {
22667  return PyObject_GenericGetAttr(obj, attr_name);
22668  }
22669  assert(!tp->tp_dictoffset);
22670  descr = _PyType_Lookup(tp, attr_name);
22671  if (unlikely(!descr)) {
22672  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
22673  }
22674  Py_INCREF(descr);
22675  #if PY_MAJOR_VERSION < 3
22676  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
22677  #endif
22678  {
22679  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
22680  if (unlikely(f)) {
22681  PyObject *res = f(descr, obj, (PyObject *)tp);
22682  Py_DECREF(descr);
22683  return res;
22684  }
22685  }
22686  return descr;
22687 }
22688 #endif
22689 
22690 /* PyObject_GenericGetAttr */
22691 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
22692 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
22693  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
22694  return PyObject_GenericGetAttr(obj, attr_name);
22695  }
22696  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
22697 }
22698 #endif
22699 
22700 /* SetVTable */
22701 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
22702 #if PY_VERSION_HEX >= 0x02070000
22703  PyObject *ob = PyCapsule_New(vtable, 0, 0);
22704 #else
22705  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
22706 #endif
22707  if (!ob)
22708  goto bad;
22709  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
22710  goto bad;
22711  Py_DECREF(ob);
22712  return 0;
22713 bad:
22714  Py_XDECREF(ob);
22715  return -1;
22716 }
22717 
22718 /* PyObjectGetAttrStrNoError */
22719 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
22720  __Pyx_PyThreadState_declare
22721  __Pyx_PyThreadState_assign
22722  if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
22723  __Pyx_PyErr_Clear();
22724 }
22725 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
22726  PyObject *result;
22727 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
22728  PyTypeObject* tp = Py_TYPE(obj);
22729  if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
22730  return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
22731  }
22732 #endif
22733  result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
22734  if (unlikely(!result)) {
22735  __Pyx_PyObject_GetAttrStr_ClearAttributeError();
22736  }
22737  return result;
22738 }
22739 
22740 /* SetupReduce */
22741 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
22742  int ret;
22743  PyObject *name_attr;
22744  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
22745  if (likely(name_attr)) {
22746  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
22747  } else {
22748  ret = -1;
22749  }
22750  if (unlikely(ret < 0)) {
22751  PyErr_Clear();
22752  ret = 0;
22753  }
22754  Py_XDECREF(name_attr);
22755  return ret;
22756 }
22757 static int __Pyx_setup_reduce(PyObject* type_obj) {
22758  int ret = 0;
22759  PyObject *object_reduce = NULL;
22760  PyObject *object_reduce_ex = NULL;
22761  PyObject *reduce = NULL;
22762  PyObject *reduce_ex = NULL;
22763  PyObject *reduce_cython = NULL;
22764  PyObject *setstate = NULL;
22765  PyObject *setstate_cython = NULL;
22766 #if CYTHON_USE_PYTYPE_LOOKUP
22767  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
22768 #else
22769  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
22770 #endif
22771 #if CYTHON_USE_PYTYPE_LOOKUP
22772  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
22773 #else
22774  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
22775 #endif
22776  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
22777  if (reduce_ex == object_reduce_ex) {
22778 #if CYTHON_USE_PYTYPE_LOOKUP
22779  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
22780 #else
22781  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
22782 #endif
22783  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
22784  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
22785  reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
22786  if (likely(reduce_cython)) {
22787  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22788  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22789  } else if (reduce == object_reduce || PyErr_Occurred()) {
22790  goto __PYX_BAD;
22791  }
22792  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
22793  if (!setstate) PyErr_Clear();
22794  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
22795  setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
22796  if (likely(setstate_cython)) {
22797  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22798  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22799  } else if (!setstate || PyErr_Occurred()) {
22800  goto __PYX_BAD;
22801  }
22802  }
22803  PyType_Modified((PyTypeObject*)type_obj);
22804  }
22805  }
22806  goto __PYX_GOOD;
22807 __PYX_BAD:
22808  if (!PyErr_Occurred())
22809  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
22810  ret = -1;
22811 __PYX_GOOD:
22812 #if !CYTHON_USE_PYTYPE_LOOKUP
22813  Py_XDECREF(object_reduce);
22814  Py_XDECREF(object_reduce_ex);
22815 #endif
22816  Py_XDECREF(reduce);
22817  Py_XDECREF(reduce_ex);
22818  Py_XDECREF(reduce_cython);
22819  Py_XDECREF(setstate);
22820  Py_XDECREF(setstate_cython);
22821  return ret;
22822 }
22823 
22824 /* BytesEquals */
22825 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
22826 #if CYTHON_COMPILING_IN_PYPY
22827  return PyObject_RichCompareBool(s1, s2, equals);
22828 #else
22829  if (s1 == s2) {
22830  return (equals == Py_EQ);
22831  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
22832  const char *ps1, *ps2;
22833  Py_ssize_t length = PyBytes_GET_SIZE(s1);
22834  if (length != PyBytes_GET_SIZE(s2))
22835  return (equals == Py_NE);
22836  ps1 = PyBytes_AS_STRING(s1);
22837  ps2 = PyBytes_AS_STRING(s2);
22838  if (ps1[0] != ps2[0]) {
22839  return (equals == Py_NE);
22840  } else if (length == 1) {
22841  return (equals == Py_EQ);
22842  } else {
22843  int result;
22844 #if CYTHON_USE_UNICODE_INTERNALS
22845  Py_hash_t hash1, hash2;
22846  hash1 = ((PyBytesObject*)s1)->ob_shash;
22847  hash2 = ((PyBytesObject*)s2)->ob_shash;
22848  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22849  return (equals == Py_NE);
22850  }
22851 #endif
22852  result = memcmp(ps1, ps2, (size_t)length);
22853  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22854  }
22855  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
22856  return (equals == Py_NE);
22857  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
22858  return (equals == Py_NE);
22859  } else {
22860  int result;
22861  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22862  if (!py_result)
22863  return -1;
22864  result = __Pyx_PyObject_IsTrue(py_result);
22865  Py_DECREF(py_result);
22866  return result;
22867  }
22868 #endif
22869 }
22870 
22871 /* UnicodeEquals */
22872 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
22873 #if CYTHON_COMPILING_IN_PYPY
22874  return PyObject_RichCompareBool(s1, s2, equals);
22875 #else
22876 #if PY_MAJOR_VERSION < 3
22877  PyObject* owned_ref = NULL;
22878 #endif
22879  int s1_is_unicode, s2_is_unicode;
22880  if (s1 == s2) {
22881  goto return_eq;
22882  }
22883  s1_is_unicode = PyUnicode_CheckExact(s1);
22884  s2_is_unicode = PyUnicode_CheckExact(s2);
22885 #if PY_MAJOR_VERSION < 3
22886  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
22887  owned_ref = PyUnicode_FromObject(s2);
22888  if (unlikely(!owned_ref))
22889  return -1;
22890  s2 = owned_ref;
22891  s2_is_unicode = 1;
22892  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
22893  owned_ref = PyUnicode_FromObject(s1);
22894  if (unlikely(!owned_ref))
22895  return -1;
22896  s1 = owned_ref;
22897  s1_is_unicode = 1;
22898  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
22899  return __Pyx_PyBytes_Equals(s1, s2, equals);
22900  }
22901 #endif
22902  if (s1_is_unicode & s2_is_unicode) {
22903  Py_ssize_t length;
22904  int kind;
22905  void *data1, *data2;
22906  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
22907  return -1;
22908  length = __Pyx_PyUnicode_GET_LENGTH(s1);
22909  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
22910  goto return_ne;
22911  }
22912 #if CYTHON_USE_UNICODE_INTERNALS
22913  {
22914  Py_hash_t hash1, hash2;
22915  #if CYTHON_PEP393_ENABLED
22916  hash1 = ((PyASCIIObject*)s1)->hash;
22917  hash2 = ((PyASCIIObject*)s2)->hash;
22918  #else
22919  hash1 = ((PyUnicodeObject*)s1)->hash;
22920  hash2 = ((PyUnicodeObject*)s2)->hash;
22921  #endif
22922  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22923  goto return_ne;
22924  }
22925  }
22926 #endif
22927  kind = __Pyx_PyUnicode_KIND(s1);
22928  if (kind != __Pyx_PyUnicode_KIND(s2)) {
22929  goto return_ne;
22930  }
22931  data1 = __Pyx_PyUnicode_DATA(s1);
22932  data2 = __Pyx_PyUnicode_DATA(s2);
22933  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
22934  goto return_ne;
22935  } else if (length == 1) {
22936  goto return_eq;
22937  } else {
22938  int result = memcmp(data1, data2, (size_t)(length * kind));
22939  #if PY_MAJOR_VERSION < 3
22940  Py_XDECREF(owned_ref);
22941  #endif
22942  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22943  }
22944  } else if ((s1 == Py_None) & s2_is_unicode) {
22945  goto return_ne;
22946  } else if ((s2 == Py_None) & s1_is_unicode) {
22947  goto return_ne;
22948  } else {
22949  int result;
22950  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22951  #if PY_MAJOR_VERSION < 3
22952  Py_XDECREF(owned_ref);
22953  #endif
22954  if (!py_result)
22955  return -1;
22956  result = __Pyx_PyObject_IsTrue(py_result);
22957  Py_DECREF(py_result);
22958  return result;
22959  }
22960 return_eq:
22961  #if PY_MAJOR_VERSION < 3
22962  Py_XDECREF(owned_ref);
22963  #endif
22964  return (equals == Py_EQ);
22965 return_ne:
22966  #if PY_MAJOR_VERSION < 3
22967  Py_XDECREF(owned_ref);
22968  #endif
22969  return (equals == Py_NE);
22970 #endif
22971 }
22972 
22973 /* CLineInTraceback */
22974 #ifndef CYTHON_CLINE_IN_TRACEBACK
22975 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
22976  PyObject *use_cline;
22977  PyObject *ptype, *pvalue, *ptraceback;
22978 #if CYTHON_COMPILING_IN_CPYTHON
22979  PyObject **cython_runtime_dict;
22980 #endif
22981  if (unlikely(!__pyx_cython_runtime)) {
22982  return c_line;
22983  }
22984  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
22985 #if CYTHON_COMPILING_IN_CPYTHON
22986  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
22987  if (likely(cython_runtime_dict)) {
22988  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
22989  use_cline, *cython_runtime_dict,
22990  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
22991  } else
22992 #endif
22993  {
22994  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
22995  if (use_cline_obj) {
22996  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
22997  Py_DECREF(use_cline_obj);
22998  } else {
22999  PyErr_Clear();
23000  use_cline = NULL;
23001  }
23002  }
23003  if (!use_cline) {
23004  c_line = 0;
23005  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
23006  }
23007  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
23008  c_line = 0;
23009  }
23010  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
23011  return c_line;
23012 }
23013 #endif
23014 
23015 /* CodeObjectCache */
23016 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
23017  int start = 0, mid = 0, end = count - 1;
23018  if (end >= 0 && code_line > entries[end].code_line) {
23019  return count;
23020  }
23021  while (start < end) {
23022  mid = start + (end - start) / 2;
23023  if (code_line < entries[mid].code_line) {
23024  end = mid;
23025  } else if (code_line > entries[mid].code_line) {
23026  start = mid + 1;
23027  } else {
23028  return mid;
23029  }
23030  }
23031  if (code_line <= entries[mid].code_line) {
23032  return mid;
23033  } else {
23034  return mid + 1;
23035  }
23036 }
23037 static PyCodeObject *__pyx_find_code_object(int code_line) {
23038  PyCodeObject* code_object;
23039  int pos;
23040  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
23041  return NULL;
23042  }
23043  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
23044  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
23045  return NULL;
23046  }
23047  code_object = __pyx_code_cache.entries[pos].code_object;
23048  Py_INCREF(code_object);
23049  return code_object;
23050 }
23051 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
23052  int pos, i;
23053  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
23054  if (unlikely(!code_line)) {
23055  return;
23056  }
23057  if (unlikely(!entries)) {
23058  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
23059  if (likely(entries)) {
23060  __pyx_code_cache.entries = entries;
23061  __pyx_code_cache.max_count = 64;
23062  __pyx_code_cache.count = 1;
23063  entries[0].code_line = code_line;
23064  entries[0].code_object = code_object;
23065  Py_INCREF(code_object);
23066  }
23067  return;
23068  }
23069  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
23070  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
23071  PyCodeObject* tmp = entries[pos].code_object;
23072  entries[pos].code_object = code_object;
23073  Py_DECREF(tmp);
23074  return;
23075  }
23076  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
23077  int new_max = __pyx_code_cache.max_count + 64;
23078  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
23079  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
23080  if (unlikely(!entries)) {
23081  return;
23082  }
23083  __pyx_code_cache.entries = entries;
23084  __pyx_code_cache.max_count = new_max;
23085  }
23086  for (i=__pyx_code_cache.count; i>pos; i--) {
23087  entries[i] = entries[i-1];
23088  }
23089  entries[pos].code_line = code_line;
23090  entries[pos].code_object = code_object;
23091  __pyx_code_cache.count++;
23092  Py_INCREF(code_object);
23093 }
23094 
23095 /* AddTraceback */
23096 #include "compile.h"
23097 #include "frameobject.h"
23098 #include "traceback.h"
23099 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
23100  const char *funcname, int c_line,
23101  int py_line, const char *filename) {
23102  PyCodeObject *py_code = 0;
23103  PyObject *py_srcfile = 0;
23104  PyObject *py_funcname = 0;
23105  #if PY_MAJOR_VERSION < 3
23106  py_srcfile = PyString_FromString(filename);
23107  #else
23108  py_srcfile = PyUnicode_FromString(filename);
23109  #endif
23110  if (!py_srcfile) goto bad;
23111  if (c_line) {
23112  #if PY_MAJOR_VERSION < 3
23113  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
23114  #else
23115  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
23116  #endif
23117  }
23118  else {
23119  #if PY_MAJOR_VERSION < 3
23120  py_funcname = PyString_FromString(funcname);
23121  #else
23122  py_funcname = PyUnicode_FromString(funcname);
23123  #endif
23124  }
23125  if (!py_funcname) goto bad;
23126  py_code = __Pyx_PyCode_New(
23127  0,
23128  0,
23129  0,
23130  0,
23131  0,
23132  __pyx_empty_bytes, /*PyObject *code,*/
23133  __pyx_empty_tuple, /*PyObject *consts,*/
23134  __pyx_empty_tuple, /*PyObject *names,*/
23135  __pyx_empty_tuple, /*PyObject *varnames,*/
23136  __pyx_empty_tuple, /*PyObject *freevars,*/
23137  __pyx_empty_tuple, /*PyObject *cellvars,*/
23138  py_srcfile, /*PyObject *filename,*/
23139  py_funcname, /*PyObject *name,*/
23140  py_line,
23141  __pyx_empty_bytes /*PyObject *lnotab*/
23142  );
23143  Py_DECREF(py_srcfile);
23144  Py_DECREF(py_funcname);
23145  return py_code;
23146 bad:
23147  Py_XDECREF(py_srcfile);
23148  Py_XDECREF(py_funcname);
23149  return NULL;
23150 }
23151 static void __Pyx_AddTraceback(const char *funcname, int c_line,
23152  int py_line, const char *filename) {
23153  PyCodeObject *py_code = 0;
23154  PyFrameObject *py_frame = 0;
23155  PyThreadState *tstate = __Pyx_PyThreadState_Current;
23156  if (c_line) {
23157  c_line = __Pyx_CLineForTraceback(tstate, c_line);
23158  }
23159  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
23160  if (!py_code) {
23161  py_code = __Pyx_CreateCodeObjectForTraceback(
23162  funcname, c_line, py_line, filename);
23163  if (!py_code) goto bad;
23164  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
23165  }
23166  py_frame = PyFrame_New(
23167  tstate, /*PyThreadState *tstate,*/
23168  py_code, /*PyCodeObject *code,*/
23169  __pyx_d, /*PyObject *globals,*/
23170  0 /*PyObject *locals*/
23171  );
23172  if (!py_frame) goto bad;
23173  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
23174  PyTraceBack_Here(py_frame);
23175 bad:
23176  Py_XDECREF(py_code);
23177  Py_XDECREF(py_frame);
23178 }
23179 
23180 /* CIntFromPyVerify */
23181 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
23182  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
23183 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
23184  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
23185 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
23186  {\
23187  func_type value = func_value;\
23188  if (sizeof(target_type) < sizeof(func_type)) {\
23189  if (unlikely(value != (func_type) (target_type) value)) {\
23190  func_type zero = 0;\
23191  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
23192  return (target_type) -1;\
23193  if (is_unsigned && unlikely(value < zero))\
23194  goto raise_neg_overflow;\
23195  else\
23196  goto raise_overflow;\
23197  }\
23198  }\
23199  return (target_type) value;\
23200  }
23201 
23202 /* CIntToPy */
23203 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
23204  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
23205  const int is_unsigned = neg_one > const_zero;
23206  if (is_unsigned) {
23207  if (sizeof(int) < sizeof(long)) {
23208  return PyInt_FromLong((long) value);
23209  } else if (sizeof(int) <= sizeof(unsigned long)) {
23210  return PyLong_FromUnsignedLong((unsigned long) value);
23211 #ifdef HAVE_LONG_LONG
23212  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
23213  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
23214 #endif
23215  }
23216  } else {
23217  if (sizeof(int) <= sizeof(long)) {
23218  return PyInt_FromLong((long) value);
23219 #ifdef HAVE_LONG_LONG
23220  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
23221  return PyLong_FromLongLong((PY_LONG_LONG) value);
23222 #endif
23223  }
23224  }
23225  {
23226  int one = 1; int little = (int)*(unsigned char *)&one;
23227  unsigned char *bytes = (unsigned char *)&value;
23228  return _PyLong_FromByteArray(bytes, sizeof(int),
23229  little, !is_unsigned);
23230  }
23231 }
23232 
23233 /* CIntFromPy */
23234 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
23235  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
23236  const int is_unsigned = neg_one > const_zero;
23237 #if PY_MAJOR_VERSION < 3
23238  if (likely(PyInt_Check(x))) {
23239  if (sizeof(int) < sizeof(long)) {
23240  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
23241  } else {
23242  long val = PyInt_AS_LONG(x);
23243  if (is_unsigned && unlikely(val < 0)) {
23244  goto raise_neg_overflow;
23245  }
23246  return (int) val;
23247  }
23248  } else
23249 #endif
23250  if (likely(PyLong_Check(x))) {
23251  if (is_unsigned) {
23252 #if CYTHON_USE_PYLONG_INTERNALS
23253  const digit* digits = ((PyLongObject*)x)->ob_digit;
23254  switch (Py_SIZE(x)) {
23255  case 0: return (int) 0;
23256  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
23257  case 2:
23258  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
23259  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23260  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23261  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
23262  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23263  }
23264  }
23265  break;
23266  case 3:
23267  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
23268  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23269  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23270  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
23271  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23272  }
23273  }
23274  break;
23275  case 4:
23276  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
23277  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23278  __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])))
23279  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
23280  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23281  }
23282  }
23283  break;
23284  }
23285 #endif
23286 #if CYTHON_COMPILING_IN_CPYTHON
23287  if (unlikely(Py_SIZE(x) < 0)) {
23288  goto raise_neg_overflow;
23289  }
23290 #else
23291  {
23292  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
23293  if (unlikely(result < 0))
23294  return (int) -1;
23295  if (unlikely(result == 1))
23296  goto raise_neg_overflow;
23297  }
23298 #endif
23299  if (sizeof(int) <= sizeof(unsigned long)) {
23300  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
23301 #ifdef HAVE_LONG_LONG
23302  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
23303  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
23304 #endif
23305  }
23306  } else {
23307 #if CYTHON_USE_PYLONG_INTERNALS
23308  const digit* digits = ((PyLongObject*)x)->ob_digit;
23309  switch (Py_SIZE(x)) {
23310  case 0: return (int) 0;
23311  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
23312  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
23313  case -2:
23314  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
23315  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23316  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23317  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23318  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23319  }
23320  }
23321  break;
23322  case 2:
23323  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
23324  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23325  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23326  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23327  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23328  }
23329  }
23330  break;
23331  case -3:
23332  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23333  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23334  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23335  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23336  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23337  }
23338  }
23339  break;
23340  case 3:
23341  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
23342  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23343  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23344  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23345  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23346  }
23347  }
23348  break;
23349  case -4:
23350  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23351  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23352  __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])))
23353  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
23354  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23355  }
23356  }
23357  break;
23358  case 4:
23359  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
23360  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23361  __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])))
23362  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
23363  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23364  }
23365  }
23366  break;
23367  }
23368 #endif
23369  if (sizeof(int) <= sizeof(long)) {
23370  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
23371 #ifdef HAVE_LONG_LONG
23372  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
23373  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
23374 #endif
23375  }
23376  }
23377  {
23378 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
23379  PyErr_SetString(PyExc_RuntimeError,
23380  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
23381 #else
23382  int val;
23383  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
23384  #if PY_MAJOR_VERSION < 3
23385  if (likely(v) && !PyLong_Check(v)) {
23386  PyObject *tmp = v;
23387  v = PyNumber_Long(tmp);
23388  Py_DECREF(tmp);
23389  }
23390  #endif
23391  if (likely(v)) {
23392  int one = 1; int is_little = (int)*(unsigned char *)&one;
23393  unsigned char *bytes = (unsigned char *)&val;
23394  int ret = _PyLong_AsByteArray((PyLongObject *)v,
23395  bytes, sizeof(val),
23396  is_little, !is_unsigned);
23397  Py_DECREF(v);
23398  if (likely(!ret))
23399  return val;
23400  }
23401 #endif
23402  return (int) -1;
23403  }
23404  } else {
23405  int val;
23406  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
23407  if (!tmp) return (int) -1;
23408  val = __Pyx_PyInt_As_int(tmp);
23409  Py_DECREF(tmp);
23410  return val;
23411  }
23412 raise_overflow:
23413  PyErr_SetString(PyExc_OverflowError,
23414  "value too large to convert to int");
23415  return (int) -1;
23416 raise_neg_overflow:
23417  PyErr_SetString(PyExc_OverflowError,
23418  "can't convert negative value to int");
23419  return (int) -1;
23420 }
23421 
23422 /* CIntToPy */
23423 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
23424  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
23425  const int is_unsigned = neg_one > const_zero;
23426  if (is_unsigned) {
23427  if (sizeof(long) < sizeof(long)) {
23428  return PyInt_FromLong((long) value);
23429  } else if (sizeof(long) <= sizeof(unsigned long)) {
23430  return PyLong_FromUnsignedLong((unsigned long) value);
23431 #ifdef HAVE_LONG_LONG
23432  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
23433  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
23434 #endif
23435  }
23436  } else {
23437  if (sizeof(long) <= sizeof(long)) {
23438  return PyInt_FromLong((long) value);
23439 #ifdef HAVE_LONG_LONG
23440  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
23441  return PyLong_FromLongLong((PY_LONG_LONG) value);
23442 #endif
23443  }
23444  }
23445  {
23446  int one = 1; int little = (int)*(unsigned char *)&one;
23447  unsigned char *bytes = (unsigned char *)&value;
23448  return _PyLong_FromByteArray(bytes, sizeof(long),
23449  little, !is_unsigned);
23450  }
23451 }
23452 
23453 /* CIntFromPy */
23454 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
23455  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
23456  const int is_unsigned = neg_one > const_zero;
23457 #if PY_MAJOR_VERSION < 3
23458  if (likely(PyInt_Check(x))) {
23459  if (sizeof(long) < sizeof(long)) {
23460  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
23461  } else {
23462  long val = PyInt_AS_LONG(x);
23463  if (is_unsigned && unlikely(val < 0)) {
23464  goto raise_neg_overflow;
23465  }
23466  return (long) val;
23467  }
23468  } else
23469 #endif
23470  if (likely(PyLong_Check(x))) {
23471  if (is_unsigned) {
23472 #if CYTHON_USE_PYLONG_INTERNALS
23473  const digit* digits = ((PyLongObject*)x)->ob_digit;
23474  switch (Py_SIZE(x)) {
23475  case 0: return (long) 0;
23476  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
23477  case 2:
23478  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
23479  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23480  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23481  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
23482  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
23483  }
23484  }
23485  break;
23486  case 3:
23487  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
23488  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23489  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23490  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
23491  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
23492  }
23493  }
23494  break;
23495  case 4:
23496  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
23497  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23498  __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])))
23499  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
23500  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
23501  }
23502  }
23503  break;
23504  }
23505 #endif
23506 #if CYTHON_COMPILING_IN_CPYTHON
23507  if (unlikely(Py_SIZE(x) < 0)) {
23508  goto raise_neg_overflow;
23509  }
23510 #else
23511  {
23512  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
23513  if (unlikely(result < 0))
23514  return (long) -1;
23515  if (unlikely(result == 1))
23516  goto raise_neg_overflow;
23517  }
23518 #endif
23519  if (sizeof(long) <= sizeof(unsigned long)) {
23520  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
23521 #ifdef HAVE_LONG_LONG
23522  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
23523  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
23524 #endif
23525  }
23526  } else {
23527 #if CYTHON_USE_PYLONG_INTERNALS
23528  const digit* digits = ((PyLongObject*)x)->ob_digit;
23529  switch (Py_SIZE(x)) {
23530  case 0: return (long) 0;
23531  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
23532  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
23533  case -2:
23534  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
23535  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23536  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23537  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
23538  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23539  }
23540  }
23541  break;
23542  case 2:
23543  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
23544  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23545  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23546  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
23547  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23548  }
23549  }
23550  break;
23551  case -3:
23552  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
23553  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23554  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23555  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
23556  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23557  }
23558  }
23559  break;
23560  case 3:
23561  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
23562  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23563  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23564  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
23565  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23566  }
23567  }
23568  break;
23569  case -4:
23570  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
23571  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23572  __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])))
23573  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
23574  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23575  }
23576  }
23577  break;
23578  case 4:
23579  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
23580  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23581  __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])))
23582  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
23583  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23584  }
23585  }
23586  break;
23587  }
23588 #endif
23589  if (sizeof(long) <= sizeof(long)) {
23590  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
23591 #ifdef HAVE_LONG_LONG
23592  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
23593  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
23594 #endif
23595  }
23596  }
23597  {
23598 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
23599  PyErr_SetString(PyExc_RuntimeError,
23600  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
23601 #else
23602  long val;
23603  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
23604  #if PY_MAJOR_VERSION < 3
23605  if (likely(v) && !PyLong_Check(v)) {
23606  PyObject *tmp = v;
23607  v = PyNumber_Long(tmp);
23608  Py_DECREF(tmp);
23609  }
23610  #endif
23611  if (likely(v)) {
23612  int one = 1; int is_little = (int)*(unsigned char *)&one;
23613  unsigned char *bytes = (unsigned char *)&val;
23614  int ret = _PyLong_AsByteArray((PyLongObject *)v,
23615  bytes, sizeof(val),
23616  is_little, !is_unsigned);
23617  Py_DECREF(v);
23618  if (likely(!ret))
23619  return val;
23620  }
23621 #endif
23622  return (long) -1;
23623  }
23624  } else {
23625  long val;
23626  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
23627  if (!tmp) return (long) -1;
23628  val = __Pyx_PyInt_As_long(tmp);
23629  Py_DECREF(tmp);
23630  return val;
23631  }
23632 raise_overflow:
23633  PyErr_SetString(PyExc_OverflowError,
23634  "value too large to convert to long");
23635  return (long) -1;
23636 raise_neg_overflow:
23637  PyErr_SetString(PyExc_OverflowError,
23638  "can't convert negative value to long");
23639  return (long) -1;
23640 }
23641 
23642 /* FastTypeChecks */
23643 #if CYTHON_COMPILING_IN_CPYTHON
23644 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
23645  while (a) {
23646  a = a->tp_base;
23647  if (a == b)
23648  return 1;
23649  }
23650  return b == &PyBaseObject_Type;
23651 }
23652 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
23653  PyObject *mro;
23654  if (a == b) return 1;
23655  mro = a->tp_mro;
23656  if (likely(mro)) {
23657  Py_ssize_t i, n;
23658  n = PyTuple_GET_SIZE(mro);
23659  for (i = 0; i < n; i++) {
23660  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
23661  return 1;
23662  }
23663  return 0;
23664  }
23665  return __Pyx_InBases(a, b);
23666 }
23667 #if PY_MAJOR_VERSION == 2
23668 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
23669  PyObject *exception, *value, *tb;
23670  int res;
23671  __Pyx_PyThreadState_declare
23672  __Pyx_PyThreadState_assign
23673  __Pyx_ErrFetch(&exception, &value, &tb);
23674  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
23675  if (unlikely(res == -1)) {
23676  PyErr_WriteUnraisable(err);
23677  res = 0;
23678  }
23679  if (!res) {
23680  res = PyObject_IsSubclass(err, exc_type2);
23681  if (unlikely(res == -1)) {
23682  PyErr_WriteUnraisable(err);
23683  res = 0;
23684  }
23685  }
23686  __Pyx_ErrRestore(exception, value, tb);
23687  return res;
23688 }
23689 #else
23690 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
23691  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
23692  if (!res) {
23693  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
23694  }
23695  return res;
23696 }
23697 #endif
23698 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
23699  Py_ssize_t i, n;
23700  assert(PyExceptionClass_Check(exc_type));
23701  n = PyTuple_GET_SIZE(tuple);
23702 #if PY_MAJOR_VERSION >= 3
23703  for (i=0; i<n; i++) {
23704  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
23705  }
23706 #endif
23707  for (i=0; i<n; i++) {
23708  PyObject *t = PyTuple_GET_ITEM(tuple, i);
23709  #if PY_MAJOR_VERSION < 3
23710  if (likely(exc_type == t)) return 1;
23711  #endif
23712  if (likely(PyExceptionClass_Check(t))) {
23713  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
23714  } else {
23715  }
23716  }
23717  return 0;
23718 }
23719 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
23720  if (likely(err == exc_type)) return 1;
23721  if (likely(PyExceptionClass_Check(err))) {
23722  if (likely(PyExceptionClass_Check(exc_type))) {
23723  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
23724  } else if (likely(PyTuple_Check(exc_type))) {
23725  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
23726  } else {
23727  }
23728  }
23729  return PyErr_GivenExceptionMatches(err, exc_type);
23730 }
23731 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
23732  assert(PyExceptionClass_Check(exc_type1));
23733  assert(PyExceptionClass_Check(exc_type2));
23734  if (likely(err == exc_type1 || err == exc_type2)) return 1;
23735  if (likely(PyExceptionClass_Check(err))) {
23736  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
23737  }
23738  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
23739 }
23740 #endif
23741 
23742 /* FetchCommonType */
23743 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
23744  PyObject* fake_module;
23745  PyTypeObject* cached_type = NULL;
23746  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
23747  if (!fake_module) return NULL;
23748  Py_INCREF(fake_module);
23749  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
23750  if (cached_type) {
23751  if (!PyType_Check((PyObject*)cached_type)) {
23752  PyErr_Format(PyExc_TypeError,
23753  "Shared Cython type %.200s is not a type object",
23754  type->tp_name);
23755  goto bad;
23756  }
23757  if (cached_type->tp_basicsize != type->tp_basicsize) {
23758  PyErr_Format(PyExc_TypeError,
23759  "Shared Cython type %.200s has the wrong size, try recompiling",
23760  type->tp_name);
23761  goto bad;
23762  }
23763  } else {
23764  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
23765  PyErr_Clear();
23766  if (PyType_Ready(type) < 0) goto bad;
23767  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
23768  goto bad;
23769  Py_INCREF(type);
23770  cached_type = type;
23771  }
23772 done:
23773  Py_DECREF(fake_module);
23774  return cached_type;
23775 bad:
23776  Py_XDECREF(cached_type);
23777  cached_type = NULL;
23778  goto done;
23779 }
23780 
23781 /* PyObjectGetMethod */
23782 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
23783  PyObject *attr;
23784 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
23785  PyTypeObject *tp = Py_TYPE(obj);
23786  PyObject *descr;
23787  descrgetfunc f = NULL;
23788  PyObject **dictptr, *dict;
23789  int meth_found = 0;
23790  assert (*method == NULL);
23791  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
23792  attr = __Pyx_PyObject_GetAttrStr(obj, name);
23793  goto try_unpack;
23794  }
23795  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
23796  return 0;
23797  }
23798  descr = _PyType_Lookup(tp, name);
23799  if (likely(descr != NULL)) {
23800  Py_INCREF(descr);
23801 #if PY_MAJOR_VERSION >= 3
23802  #ifdef __Pyx_CyFunction_USED
23803  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
23804  #else
23805  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
23806  #endif
23807 #else
23808  #ifdef __Pyx_CyFunction_USED
23809  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
23810  #else
23811  if (likely(PyFunction_Check(descr)))
23812  #endif
23813 #endif
23814  {
23815  meth_found = 1;
23816  } else {
23817  f = Py_TYPE(descr)->tp_descr_get;
23818  if (f != NULL && PyDescr_IsData(descr)) {
23819  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
23820  Py_DECREF(descr);
23821  goto try_unpack;
23822  }
23823  }
23824  }
23825  dictptr = _PyObject_GetDictPtr(obj);
23826  if (dictptr != NULL && (dict = *dictptr) != NULL) {
23827  Py_INCREF(dict);
23828  attr = __Pyx_PyDict_GetItemStr(dict, name);
23829  if (attr != NULL) {
23830  Py_INCREF(attr);
23831  Py_DECREF(dict);
23832  Py_XDECREF(descr);
23833  goto try_unpack;
23834  }
23835  Py_DECREF(dict);
23836  }
23837  if (meth_found) {
23838  *method = descr;
23839  return 1;
23840  }
23841  if (f != NULL) {
23842  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
23843  Py_DECREF(descr);
23844  goto try_unpack;
23845  }
23846  if (descr != NULL) {
23847  *method = descr;
23848  return 0;
23849  }
23850  PyErr_Format(PyExc_AttributeError,
23851 #if PY_MAJOR_VERSION >= 3
23852  "'%.50s' object has no attribute '%U'",
23853  tp->tp_name, name);
23854 #else
23855  "'%.50s' object has no attribute '%.400s'",
23856  tp->tp_name, PyString_AS_STRING(name));
23857 #endif
23858  return 0;
23859 #else
23860  attr = __Pyx_PyObject_GetAttrStr(obj, name);
23861  goto try_unpack;
23862 #endif
23863 try_unpack:
23864 #if CYTHON_UNPACK_METHODS
23865  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
23866  PyObject *function = PyMethod_GET_FUNCTION(attr);
23867  Py_INCREF(function);
23868  Py_DECREF(attr);
23869  *method = function;
23870  return 1;
23871  }
23872 #endif
23873  *method = attr;
23874  return 0;
23875 }
23876 
23877 /* PyObjectCallMethod1 */
23878 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
23879  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
23880  Py_DECREF(method);
23881  return result;
23882 }
23883 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
23884  PyObject *method = NULL, *result;
23885  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
23886  if (likely(is_method)) {
23887  result = __Pyx_PyObject_Call2Args(method, obj, arg);
23888  Py_DECREF(method);
23889  return result;
23890  }
23891  if (unlikely(!method)) return NULL;
23892  return __Pyx__PyObject_CallMethod1(method, arg);
23893 }
23894 
23895 /* CoroutineBase */
23896 #include <structmember.h>
23897 #include <frameobject.h>
23898 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
23899 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
23900  PyObject *et, *ev, *tb;
23901  PyObject *value = NULL;
23902  __Pyx_ErrFetch(&et, &ev, &tb);
23903  if (!et) {
23904  Py_XDECREF(tb);
23905  Py_XDECREF(ev);
23906  Py_INCREF(Py_None);
23907  *pvalue = Py_None;
23908  return 0;
23909  }
23910  if (likely(et == PyExc_StopIteration)) {
23911  if (!ev) {
23912  Py_INCREF(Py_None);
23913  value = Py_None;
23914  }
23915 #if PY_VERSION_HEX >= 0x030300A0
23916  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
23917  value = ((PyStopIterationObject *)ev)->value;
23918  Py_INCREF(value);
23919  Py_DECREF(ev);
23920  }
23921 #endif
23922  else if (unlikely(PyTuple_Check(ev))) {
23923  if (PyTuple_GET_SIZE(ev) >= 1) {
23924 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23925  value = PyTuple_GET_ITEM(ev, 0);
23926  Py_INCREF(value);
23927 #else
23928  value = PySequence_ITEM(ev, 0);
23929 #endif
23930  } else {
23931  Py_INCREF(Py_None);
23932  value = Py_None;
23933  }
23934  Py_DECREF(ev);
23935  }
23936  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
23937  value = ev;
23938  }
23939  if (likely(value)) {
23940  Py_XDECREF(tb);
23941  Py_DECREF(et);
23942  *pvalue = value;
23943  return 0;
23944  }
23945  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
23946  __Pyx_ErrRestore(et, ev, tb);
23947  return -1;
23948  }
23949  PyErr_NormalizeException(&et, &ev, &tb);
23950  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
23951  __Pyx_ErrRestore(et, ev, tb);
23952  return -1;
23953  }
23954  Py_XDECREF(tb);
23955  Py_DECREF(et);
23956 #if PY_VERSION_HEX >= 0x030300A0
23957  value = ((PyStopIterationObject *)ev)->value;
23958  Py_INCREF(value);
23959  Py_DECREF(ev);
23960 #else
23961  {
23962  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
23963  Py_DECREF(ev);
23964  if (likely(args)) {
23965  value = PySequence_GetItem(args, 0);
23966  Py_DECREF(args);
23967  }
23968  if (unlikely(!value)) {
23969  __Pyx_ErrRestore(NULL, NULL, NULL);
23970  Py_INCREF(Py_None);
23971  value = Py_None;
23972  }
23973  }
23974 #endif
23975  *pvalue = value;
23976  return 0;
23977 }
23978 static CYTHON_INLINE
23979 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
23980  PyObject *t, *v, *tb;
23981  t = exc_state->exc_type;
23982  v = exc_state->exc_value;
23983  tb = exc_state->exc_traceback;
23984  exc_state->exc_type = NULL;
23985  exc_state->exc_value = NULL;
23986  exc_state->exc_traceback = NULL;
23987  Py_XDECREF(t);
23988  Py_XDECREF(v);
23989  Py_XDECREF(tb);
23990 }
23991 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
23992 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
23993  const char *msg;
23994  if ((0)) {
23995  #ifdef __Pyx_Coroutine_USED
23996  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
23997  msg = "coroutine already executing";
23998  #endif
23999  #ifdef __Pyx_AsyncGen_USED
24000  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
24001  msg = "async generator already executing";
24002  #endif
24003  } else {
24004  msg = "generator already executing";
24005  }
24006  PyErr_SetString(PyExc_ValueError, msg);
24007 }
24008 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
24009 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
24010  const char *msg;
24011  if ((0)) {
24012  #ifdef __Pyx_Coroutine_USED
24013  } else if (__Pyx_Coroutine_Check(gen)) {
24014  msg = "can't send non-None value to a just-started coroutine";
24015  #endif
24016  #ifdef __Pyx_AsyncGen_USED
24017  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
24018  msg = "can't send non-None value to a just-started async generator";
24019  #endif
24020  } else {
24021  msg = "can't send non-None value to a just-started generator";
24022  }
24023  PyErr_SetString(PyExc_TypeError, msg);
24024 }
24025 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
24026 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
24027  #ifdef __Pyx_Coroutine_USED
24028  if (!closing && __Pyx_Coroutine_Check(gen)) {
24029  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
24030  } else
24031  #endif
24032  if (value) {
24033  #ifdef __Pyx_AsyncGen_USED
24034  if (__Pyx_AsyncGen_CheckExact(gen))
24035  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
24036  else
24037  #endif
24038  PyErr_SetNone(PyExc_StopIteration);
24039  }
24040 }
24041 static
24042 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
24043  __Pyx_PyThreadState_declare
24044  PyThreadState *tstate;
24045  __Pyx_ExcInfoStruct *exc_state;
24046  PyObject *retval;
24047  assert(!self->is_running);
24048  if (unlikely(self->resume_label == 0)) {
24049  if (unlikely(value && value != Py_None)) {
24050  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
24051  }
24052  }
24053  if (unlikely(self->resume_label == -1)) {
24054  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
24055  }
24056 #if CYTHON_FAST_THREAD_STATE
24057  __Pyx_PyThreadState_assign
24058  tstate = __pyx_tstate;
24059 #else
24060  tstate = __Pyx_PyThreadState_Current;
24061 #endif
24062  exc_state = &self->gi_exc_state;
24063  if (exc_state->exc_type) {
24064  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
24065  #else
24066  if (exc_state->exc_traceback) {
24067  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
24068  PyFrameObject *f = tb->tb_frame;
24069  Py_XINCREF(tstate->frame);
24070  assert(f->f_back == NULL);
24071  f->f_back = tstate->frame;
24072  }
24073  #endif
24074  }
24075 #if CYTHON_USE_EXC_INFO_STACK
24076  exc_state->previous_item = tstate->exc_info;
24077  tstate->exc_info = exc_state;
24078 #else
24079  if (exc_state->exc_type) {
24080  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
24081  } else {
24082  __Pyx_Coroutine_ExceptionClear(exc_state);
24083  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
24084  }
24085 #endif
24086  self->is_running = 1;
24087  retval = self->body((PyObject *) self, tstate, value);
24088  self->is_running = 0;
24089 #if CYTHON_USE_EXC_INFO_STACK
24090  exc_state = &self->gi_exc_state;
24091  tstate->exc_info = exc_state->previous_item;
24092  exc_state->previous_item = NULL;
24093  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
24094 #endif
24095  return retval;
24096 }
24097 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
24098  PyObject *exc_tb = exc_state->exc_traceback;
24099  if (likely(exc_tb)) {
24100 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
24101 #else
24102  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
24103  PyFrameObject *f = tb->tb_frame;
24104  Py_CLEAR(f->f_back);
24105 #endif
24106  }
24107 }
24108 static CYTHON_INLINE
24109 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
24110  if (unlikely(!retval)) {
24111  __Pyx_PyThreadState_declare
24112  __Pyx_PyThreadState_assign
24113  if (!__Pyx_PyErr_Occurred()) {
24114  PyObject *exc = PyExc_StopIteration;
24115  #ifdef __Pyx_AsyncGen_USED
24116  if (__Pyx_AsyncGen_CheckExact(gen))
24117  exc = __Pyx_PyExc_StopAsyncIteration;
24118  #endif
24119  __Pyx_PyErr_SetNone(exc);
24120  }
24121  }
24122  return retval;
24123 }
24124 static CYTHON_INLINE
24125 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
24126  PyObject *ret;
24127  PyObject *val = NULL;
24128  __Pyx_Coroutine_Undelegate(gen);
24129  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
24130  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
24131  Py_XDECREF(val);
24132  return ret;
24133 }
24134 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
24135  PyObject *retval;
24136  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
24137  PyObject *yf = gen->yieldfrom;
24138  if (unlikely(gen->is_running))
24139  return __Pyx_Coroutine_AlreadyRunningError(gen);
24140  if (yf) {
24141  PyObject *ret;
24142  gen->is_running = 1;
24143  #ifdef __Pyx_Generator_USED
24144  if (__Pyx_Generator_CheckExact(yf)) {
24145  ret = __Pyx_Coroutine_Send(yf, value);
24146  } else
24147  #endif
24148  #ifdef __Pyx_Coroutine_USED
24149  if (__Pyx_Coroutine_Check(yf)) {
24150  ret = __Pyx_Coroutine_Send(yf, value);
24151  } else
24152  #endif
24153  #ifdef __Pyx_AsyncGen_USED
24154  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
24155  ret = __Pyx_async_gen_asend_send(yf, value);
24156  } else
24157  #endif
24158  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24159  if (PyGen_CheckExact(yf)) {
24160  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
24161  } else
24162  #endif
24163  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24164  if (PyCoro_CheckExact(yf)) {
24165  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
24166  } else
24167  #endif
24168  {
24169  if (value == Py_None)
24170  ret = Py_TYPE(yf)->tp_iternext(yf);
24171  else
24172  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
24173  }
24174  gen->is_running = 0;
24175  if (likely(ret)) {
24176  return ret;
24177  }
24178  retval = __Pyx_Coroutine_FinishDelegation(gen);
24179  } else {
24180  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
24181  }
24182  return __Pyx_Coroutine_MethodReturn(self, retval);
24183 }
24184 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
24185  PyObject *retval = NULL;
24186  int err = 0;
24187  #ifdef __Pyx_Generator_USED
24188  if (__Pyx_Generator_CheckExact(yf)) {
24189  retval = __Pyx_Coroutine_Close(yf);
24190  if (!retval)
24191  return -1;
24192  } else
24193  #endif
24194  #ifdef __Pyx_Coroutine_USED
24195  if (__Pyx_Coroutine_Check(yf)) {
24196  retval = __Pyx_Coroutine_Close(yf);
24197  if (!retval)
24198  return -1;
24199  } else
24200  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
24201  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
24202  if (!retval)
24203  return -1;
24204  } else
24205  #endif
24206  #ifdef __Pyx_AsyncGen_USED
24207  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
24208  retval = __Pyx_async_gen_asend_close(yf, NULL);
24209  } else
24210  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
24211  retval = __Pyx_async_gen_athrow_close(yf, NULL);
24212  } else
24213  #endif
24214  {
24215  PyObject *meth;
24216  gen->is_running = 1;
24217  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
24218  if (unlikely(!meth)) {
24219  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
24220  PyErr_WriteUnraisable(yf);
24221  }
24222  PyErr_Clear();
24223  } else {
24224  retval = PyObject_CallFunction(meth, NULL);
24225  Py_DECREF(meth);
24226  if (!retval)
24227  err = -1;
24228  }
24229  gen->is_running = 0;
24230  }
24231  Py_XDECREF(retval);
24232  return err;
24233 }
24234 static PyObject *__Pyx_Generator_Next(PyObject *self) {
24235  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
24236  PyObject *yf = gen->yieldfrom;
24237  if (unlikely(gen->is_running))
24238  return __Pyx_Coroutine_AlreadyRunningError(gen);
24239  if (yf) {
24240  PyObject *ret;
24241  gen->is_running = 1;
24242  #ifdef __Pyx_Generator_USED
24243  if (__Pyx_Generator_CheckExact(yf)) {
24244  ret = __Pyx_Generator_Next(yf);
24245  } else
24246  #endif
24247  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24248  if (PyGen_CheckExact(yf)) {
24249  ret = _PyGen_Send((PyGenObject*)yf, NULL);
24250  } else
24251  #endif
24252  #ifdef __Pyx_Coroutine_USED
24253  if (__Pyx_Coroutine_Check(yf)) {
24254  ret = __Pyx_Coroutine_Send(yf, Py_None);
24255  } else
24256  #endif
24257  ret = Py_TYPE(yf)->tp_iternext(yf);
24258  gen->is_running = 0;
24259  if (likely(ret)) {
24260  return ret;
24261  }
24262  return __Pyx_Coroutine_FinishDelegation(gen);
24263  }
24264  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
24265 }
24266 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
24267  return __Pyx_Coroutine_Close(self);
24268 }
24269 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
24270  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24271  PyObject *retval, *raised_exception;
24272  PyObject *yf = gen->yieldfrom;
24273  int err = 0;
24274  if (unlikely(gen->is_running))
24275  return __Pyx_Coroutine_AlreadyRunningError(gen);
24276  if (yf) {
24277  Py_INCREF(yf);
24278  err = __Pyx_Coroutine_CloseIter(gen, yf);
24279  __Pyx_Coroutine_Undelegate(gen);
24280  Py_DECREF(yf);
24281  }
24282  if (err == 0)
24283  PyErr_SetNone(PyExc_GeneratorExit);
24284  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
24285  if (unlikely(retval)) {
24286  const char *msg;
24287  Py_DECREF(retval);
24288  if ((0)) {
24289  #ifdef __Pyx_Coroutine_USED
24290  } else if (__Pyx_Coroutine_Check(self)) {
24291  msg = "coroutine ignored GeneratorExit";
24292  #endif
24293  #ifdef __Pyx_AsyncGen_USED
24294  } else if (__Pyx_AsyncGen_CheckExact(self)) {
24295 #if PY_VERSION_HEX < 0x03060000
24296  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
24297 #else
24298  msg = "async generator ignored GeneratorExit";
24299 #endif
24300  #endif
24301  } else {
24302  msg = "generator ignored GeneratorExit";
24303  }
24304  PyErr_SetString(PyExc_RuntimeError, msg);
24305  return NULL;
24306  }
24307  raised_exception = PyErr_Occurred();
24308  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
24309  if (raised_exception) PyErr_Clear();
24310  Py_INCREF(Py_None);
24311  return Py_None;
24312  }
24313  return NULL;
24314 }
24315 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
24316  PyObject *args, int close_on_genexit) {
24317  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24318  PyObject *yf = gen->yieldfrom;
24319  if (unlikely(gen->is_running))
24320  return __Pyx_Coroutine_AlreadyRunningError(gen);
24321  if (yf) {
24322  PyObject *ret;
24323  Py_INCREF(yf);
24324  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
24325  int err = __Pyx_Coroutine_CloseIter(gen, yf);
24326  Py_DECREF(yf);
24327  __Pyx_Coroutine_Undelegate(gen);
24328  if (err < 0)
24329  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
24330  goto throw_here;
24331  }
24332  gen->is_running = 1;
24333  if (0
24334  #ifdef __Pyx_Generator_USED
24335  || __Pyx_Generator_CheckExact(yf)
24336  #endif
24337  #ifdef __Pyx_Coroutine_USED
24338  || __Pyx_Coroutine_Check(yf)
24339  #endif
24340  ) {
24341  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
24342  #ifdef __Pyx_Coroutine_USED
24343  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
24344  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
24345  #endif
24346  } else {
24347  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
24348  if (unlikely(!meth)) {
24349  Py_DECREF(yf);
24350  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
24351  gen->is_running = 0;
24352  return NULL;
24353  }
24354  PyErr_Clear();
24355  __Pyx_Coroutine_Undelegate(gen);
24356  gen->is_running = 0;
24357  goto throw_here;
24358  }
24359  if (likely(args)) {
24360  ret = PyObject_CallObject(meth, args);
24361  } else {
24362  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
24363  }
24364  Py_DECREF(meth);
24365  }
24366  gen->is_running = 0;
24367  Py_DECREF(yf);
24368  if (!ret) {
24369  ret = __Pyx_Coroutine_FinishDelegation(gen);
24370  }
24371  return __Pyx_Coroutine_MethodReturn(self, ret);
24372  }
24373 throw_here:
24374  __Pyx_Raise(typ, val, tb, NULL);
24375  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
24376 }
24377 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
24378  PyObject *typ;
24379  PyObject *val = NULL;
24380  PyObject *tb = NULL;
24381  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
24382  return NULL;
24383  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
24384 }
24385 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
24386  Py_VISIT(exc_state->exc_type);
24387  Py_VISIT(exc_state->exc_value);
24388  Py_VISIT(exc_state->exc_traceback);
24389  return 0;
24390 }
24391 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
24392  Py_VISIT(gen->closure);
24393  Py_VISIT(gen->classobj);
24394  Py_VISIT(gen->yieldfrom);
24395  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
24396 }
24397 static int __Pyx_Coroutine_clear(PyObject *self) {
24398  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24399  Py_CLEAR(gen->closure);
24400  Py_CLEAR(gen->classobj);
24401  Py_CLEAR(gen->yieldfrom);
24402  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
24403 #ifdef __Pyx_AsyncGen_USED
24404  if (__Pyx_AsyncGen_CheckExact(self)) {
24405  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
24406  }
24407 #endif
24408  Py_CLEAR(gen->gi_code);
24409  Py_CLEAR(gen->gi_name);
24410  Py_CLEAR(gen->gi_qualname);
24411  Py_CLEAR(gen->gi_modulename);
24412  return 0;
24413 }
24414 static void __Pyx_Coroutine_dealloc(PyObject *self) {
24415  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24416  PyObject_GC_UnTrack(gen);
24417  if (gen->gi_weakreflist != NULL)
24418  PyObject_ClearWeakRefs(self);
24419  if (gen->resume_label >= 0) {
24420  PyObject_GC_Track(self);
24421 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
24422  if (PyObject_CallFinalizerFromDealloc(self))
24423 #else
24424  Py_TYPE(gen)->tp_del(self);
24425  if (self->ob_refcnt > 0)
24426 #endif
24427  {
24428  return;
24429  }
24430  PyObject_GC_UnTrack(self);
24431  }
24432 #ifdef __Pyx_AsyncGen_USED
24433  if (__Pyx_AsyncGen_CheckExact(self)) {
24434  /* We have to handle this case for asynchronous generators
24435  right here, because this code has to be between UNTRACK
24436  and GC_Del. */
24437  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
24438  }
24439 #endif
24440  __Pyx_Coroutine_clear(self);
24441  PyObject_GC_Del(gen);
24442 }
24443 static void __Pyx_Coroutine_del(PyObject *self) {
24444  PyObject *error_type, *error_value, *error_traceback;
24445  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24446  __Pyx_PyThreadState_declare
24447  if (gen->resume_label < 0) {
24448  return;
24449  }
24450 #if !CYTHON_USE_TP_FINALIZE
24451  assert(self->ob_refcnt == 0);
24452  self->ob_refcnt = 1;
24453 #endif
24454  __Pyx_PyThreadState_assign
24455  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
24456 #ifdef __Pyx_AsyncGen_USED
24457  if (__Pyx_AsyncGen_CheckExact(self)) {
24458  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
24459  PyObject *finalizer = agen->ag_finalizer;
24460  if (finalizer && !agen->ag_closed) {
24461  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
24462  if (unlikely(!res)) {
24463  PyErr_WriteUnraisable(self);
24464  } else {
24465  Py_DECREF(res);
24466  }
24467  __Pyx_ErrRestore(error_type, error_value, error_traceback);
24468  return;
24469  }
24470  }
24471 #endif
24472  if (unlikely(gen->resume_label == 0 && !error_value)) {
24473 #ifdef __Pyx_Coroutine_USED
24474 #ifdef __Pyx_Generator_USED
24475  if (!__Pyx_Generator_CheckExact(self))
24476 #endif
24477  {
24478  PyObject_GC_UnTrack(self);
24479 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
24480  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
24481  PyErr_WriteUnraisable(self);
24482 #else
24483  {PyObject *msg;
24484  char *cmsg;
24485  #if CYTHON_COMPILING_IN_PYPY
24486  msg = NULL;
24487  cmsg = (char*) "coroutine was never awaited";
24488  #else
24489  char *cname;
24490  PyObject *qualname;
24491  qualname = gen->gi_qualname;
24492  cname = PyString_AS_STRING(qualname);
24493  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
24494  if (unlikely(!msg)) {
24495  PyErr_Clear();
24496  cmsg = (char*) "coroutine was never awaited";
24497  } else {
24498  cmsg = PyString_AS_STRING(msg);
24499  }
24500  #endif
24501  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
24502  PyErr_WriteUnraisable(self);
24503  Py_XDECREF(msg);}
24504 #endif
24505  PyObject_GC_Track(self);
24506  }
24507 #endif
24508  } else {
24509  PyObject *res = __Pyx_Coroutine_Close(self);
24510  if (unlikely(!res)) {
24511  if (PyErr_Occurred())
24512  PyErr_WriteUnraisable(self);
24513  } else {
24514  Py_DECREF(res);
24515  }
24516  }
24517  __Pyx_ErrRestore(error_type, error_value, error_traceback);
24518 #if !CYTHON_USE_TP_FINALIZE
24519  assert(self->ob_refcnt > 0);
24520  if (--self->ob_refcnt == 0) {
24521  return;
24522  }
24523  {
24524  Py_ssize_t refcnt = self->ob_refcnt;
24525  _Py_NewReference(self);
24526  self->ob_refcnt = refcnt;
24527  }
24528 #if CYTHON_COMPILING_IN_CPYTHON
24529  assert(PyType_IS_GC(self->ob_type) &&
24530  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
24531  _Py_DEC_REFTOTAL;
24532 #endif
24533 #ifdef COUNT_ALLOCS
24534  --Py_TYPE(self)->tp_frees;
24535  --Py_TYPE(self)->tp_allocs;
24536 #endif
24537 #endif
24538 }
24539 static PyObject *
24540 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
24541 {
24542  PyObject *name = self->gi_name;
24543  if (unlikely(!name)) name = Py_None;
24544  Py_INCREF(name);
24545  return name;
24546 }
24547 static int
24548 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
24549 {
24550  PyObject *tmp;
24551 #if PY_MAJOR_VERSION >= 3
24552  if (unlikely(value == NULL || !PyUnicode_Check(value)))
24553 #else
24554  if (unlikely(value == NULL || !PyString_Check(value)))
24555 #endif
24556  {
24557  PyErr_SetString(PyExc_TypeError,
24558  "__name__ must be set to a string object");
24559  return -1;
24560  }
24561  tmp = self->gi_name;
24562  Py_INCREF(value);
24563  self->gi_name = value;
24564  Py_XDECREF(tmp);
24565  return 0;
24566 }
24567 static PyObject *
24568 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
24569 {
24570  PyObject *name = self->gi_qualname;
24571  if (unlikely(!name)) name = Py_None;
24572  Py_INCREF(name);
24573  return name;
24574 }
24575 static int
24576 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
24577 {
24578  PyObject *tmp;
24579 #if PY_MAJOR_VERSION >= 3
24580  if (unlikely(value == NULL || !PyUnicode_Check(value)))
24581 #else
24582  if (unlikely(value == NULL || !PyString_Check(value)))
24583 #endif
24584  {
24585  PyErr_SetString(PyExc_TypeError,
24586  "__qualname__ must be set to a string object");
24587  return -1;
24588  }
24589  tmp = self->gi_qualname;
24590  Py_INCREF(value);
24591  self->gi_qualname = value;
24592  Py_XDECREF(tmp);
24593  return 0;
24594 }
24595 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
24596  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
24597  PyObject *name, PyObject *qualname, PyObject *module_name) {
24598  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
24599  if (unlikely(!gen))
24600  return NULL;
24601  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
24602 }
24603 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
24604  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
24605  PyObject *name, PyObject *qualname, PyObject *module_name) {
24606  gen->body = body;
24607  gen->closure = closure;
24608  Py_XINCREF(closure);
24609  gen->is_running = 0;
24610  gen->resume_label = 0;
24611  gen->classobj = NULL;
24612  gen->yieldfrom = NULL;
24613  gen->gi_exc_state.exc_type = NULL;
24614  gen->gi_exc_state.exc_value = NULL;
24615  gen->gi_exc_state.exc_traceback = NULL;
24616 #if CYTHON_USE_EXC_INFO_STACK
24617  gen->gi_exc_state.previous_item = NULL;
24618 #endif
24619  gen->gi_weakreflist = NULL;
24620  Py_XINCREF(qualname);
24621  gen->gi_qualname = qualname;
24622  Py_XINCREF(name);
24623  gen->gi_name = name;
24624  Py_XINCREF(module_name);
24625  gen->gi_modulename = module_name;
24626  Py_XINCREF(code);
24627  gen->gi_code = code;
24628  PyObject_GC_Track(gen);
24629  return gen;
24630 }
24631 
24632 /* PatchModuleWithCoroutine */
24633 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
24634 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
24635  int result;
24636  PyObject *globals, *result_obj;
24637  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
24638  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
24639  #ifdef __Pyx_Coroutine_USED
24640  (PyObject*)__pyx_CoroutineType);
24641  #else
24642  Py_None);
24643  #endif
24644  if (unlikely(result < 0)) goto ignore;
24645  result = PyDict_SetItemString(globals, "_cython_generator_type",
24646  #ifdef __Pyx_Generator_USED
24647  (PyObject*)__pyx_GeneratorType);
24648  #else
24649  Py_None);
24650  #endif
24651  if (unlikely(result < 0)) goto ignore;
24652  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
24653  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
24654  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
24655  if (unlikely(!result_obj)) goto ignore;
24656  Py_DECREF(result_obj);
24657  Py_DECREF(globals);
24658  return module;
24659 ignore:
24660  Py_XDECREF(globals);
24661  PyErr_WriteUnraisable(module);
24662  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
24663  Py_DECREF(module);
24664  module = NULL;
24665  }
24666 #else
24667  py_code++;
24668 #endif
24669  return module;
24670 }
24671 
24672 /* PatchGeneratorABC */
24673 #ifndef CYTHON_REGISTER_ABCS
24674 #define CYTHON_REGISTER_ABCS 1
24675 #endif
24676 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
24677 static PyObject* __Pyx_patch_abc_module(PyObject *module);
24678 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
24679  module = __Pyx_Coroutine_patch_module(
24680  module, ""
24681 "if _cython_generator_type is not None:\n"
24682 " try: Generator = _module.Generator\n"
24683 " except AttributeError: pass\n"
24684 " else: Generator.register(_cython_generator_type)\n"
24685 "if _cython_coroutine_type is not None:\n"
24686 " try: Coroutine = _module.Coroutine\n"
24687 " except AttributeError: pass\n"
24688 " else: Coroutine.register(_cython_coroutine_type)\n"
24689  );
24690  return module;
24691 }
24692 #endif
24693 static int __Pyx_patch_abc(void) {
24694 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
24695  static int abc_patched = 0;
24696  if (CYTHON_REGISTER_ABCS && !abc_patched) {
24697  PyObject *module;
24698  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
24699  if (!module) {
24700  PyErr_WriteUnraisable(NULL);
24701  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
24702  ((PY_MAJOR_VERSION >= 3) ?
24703  "Cython module failed to register with collections.abc module" :
24704  "Cython module failed to register with collections module"), 1) < 0)) {
24705  return -1;
24706  }
24707  } else {
24708  module = __Pyx_patch_abc_module(module);
24709  abc_patched = 1;
24710  if (unlikely(!module))
24711  return -1;
24712  Py_DECREF(module);
24713  }
24714  module = PyImport_ImportModule("backports_abc");
24715  if (module) {
24716  module = __Pyx_patch_abc_module(module);
24717  Py_XDECREF(module);
24718  }
24719  if (!module) {
24720  PyErr_Clear();
24721  }
24722  }
24723 #else
24724  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
24725 #endif
24726  return 0;
24727 }
24728 
24729 /* Generator */
24730 static PyMethodDef __pyx_Generator_methods[] = {
24731  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
24732  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
24733  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
24734  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
24735  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
24736  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
24737  {0, 0, 0, 0}
24738 };
24739 static PyMemberDef __pyx_Generator_memberlist[] = {
24740  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
24741  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
24742  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
24743  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
24744  {0, 0, 0, 0, 0}
24745 };
24746 static PyGetSetDef __pyx_Generator_getsets[] = {
24747  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
24748  (char*) PyDoc_STR("name of the generator"), 0},
24749  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
24750  (char*) PyDoc_STR("qualified name of the generator"), 0},
24751  {0, 0, 0, 0, 0}
24752 };
24753 static PyTypeObject __pyx_GeneratorType_type = {
24754  PyVarObject_HEAD_INIT(0, 0)
24755  "generator",
24756  sizeof(__pyx_CoroutineObject),
24757  0,
24758  (destructor) __Pyx_Coroutine_dealloc,
24759  0,
24760  0,
24761  0,
24762  0,
24763  0,
24764  0,
24765  0,
24766  0,
24767  0,
24768  0,
24769  0,
24770  0,
24771  0,
24772  0,
24773  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
24774  0,
24775  (traverseproc) __Pyx_Coroutine_traverse,
24776  0,
24777  0,
24778  offsetof(__pyx_CoroutineObject, gi_weakreflist),
24779  0,
24780  (iternextfunc) __Pyx_Generator_Next,
24781  __pyx_Generator_methods,
24782  __pyx_Generator_memberlist,
24783  __pyx_Generator_getsets,
24784  0,
24785  0,
24786  0,
24787  0,
24788  0,
24789  0,
24790  0,
24791  0,
24792  0,
24793  0,
24794  0,
24795  0,
24796  0,
24797  0,
24798  0,
24799 #if CYTHON_USE_TP_FINALIZE
24800  0,
24801 #else
24802  __Pyx_Coroutine_del,
24803 #endif
24804  0,
24805 #if CYTHON_USE_TP_FINALIZE
24806  __Pyx_Coroutine_del,
24807 #elif PY_VERSION_HEX >= 0x030400a1
24808  0,
24809 #endif
24810 #if PY_VERSION_HEX >= 0x030800b1
24811  0,
24812 #endif
24813 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
24814  0,
24815 #endif
24816 };
24817 static int __pyx_Generator_init(void) {
24818  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
24819  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
24820  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
24821  if (unlikely(!__pyx_GeneratorType)) {
24822  return -1;
24823  }
24824  return 0;
24825 }
24826 
24827 /* CheckBinaryVersion */
24828 static int __Pyx_check_binary_version(void) {
24829  char ctversion[4], rtversion[4];
24830  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
24831  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
24832  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
24833  char message[200];
24834  PyOS_snprintf(message, sizeof(message),
24835  "compiletime version %s of module '%.100s' "
24836  "does not match runtime version %s",
24837  ctversion, __Pyx_MODULE_NAME, rtversion);
24838  return PyErr_WarnEx(NULL, message, 1);
24839  }
24840  return 0;
24841 }
24842 
24843 /* InitStrings */
24844 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
24845  while (t->p) {
24846  #if PY_MAJOR_VERSION < 3
24847  if (t->is_unicode) {
24848  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
24849  } else if (t->intern) {
24850  *t->p = PyString_InternFromString(t->s);
24851  } else {
24852  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
24853  }
24854  #else
24855  if (t->is_unicode | t->is_str) {
24856  if (t->intern) {
24857  *t->p = PyUnicode_InternFromString(t->s);
24858  } else if (t->encoding) {
24859  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
24860  } else {
24861  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
24862  }
24863  } else {
24864  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
24865  }
24866  #endif
24867  if (!*t->p)
24868  return -1;
24869  if (PyObject_Hash(*t->p) == -1)
24870  return -1;
24871  ++t;
24872  }
24873  return 0;
24874 }
24875 
24876 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
24877  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
24878 }
24879 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
24880  Py_ssize_t ignore;
24881  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
24882 }
24883 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24884 #if !CYTHON_PEP393_ENABLED
24885 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24886  char* defenc_c;
24887  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
24888  if (!defenc) return NULL;
24889  defenc_c = PyBytes_AS_STRING(defenc);
24890 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24891  {
24892  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
24893  char* c;
24894  for (c = defenc_c; c < end; c++) {
24895  if ((unsigned char) (*c) >= 128) {
24896  PyUnicode_AsASCIIString(o);
24897  return NULL;
24898  }
24899  }
24900  }
24901 #endif
24902  *length = PyBytes_GET_SIZE(defenc);
24903  return defenc_c;
24904 }
24905 #else
24906 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24907  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
24908 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24909  if (likely(PyUnicode_IS_ASCII(o))) {
24910  *length = PyUnicode_GET_LENGTH(o);
24911  return PyUnicode_AsUTF8(o);
24912  } else {
24913  PyUnicode_AsASCIIString(o);
24914  return NULL;
24915  }
24916 #else
24917  return PyUnicode_AsUTF8AndSize(o, length);
24918 #endif
24919 }
24920 #endif
24921 #endif
24922 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24923 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24924  if (
24925 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24926  __Pyx_sys_getdefaultencoding_not_ascii &&
24927 #endif
24928  PyUnicode_Check(o)) {
24929  return __Pyx_PyUnicode_AsStringAndSize(o, length);
24930  } else
24931 #endif
24932 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
24933  if (PyByteArray_Check(o)) {
24934  *length = PyByteArray_GET_SIZE(o);
24935  return PyByteArray_AS_STRING(o);
24936  } else
24937 #endif
24938  {
24939  char* result;
24940  int r = PyBytes_AsStringAndSize(o, &result, length);
24941  if (unlikely(r < 0)) {
24942  return NULL;
24943  } else {
24944  return result;
24945  }
24946  }
24947 }
24948 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
24949  int is_true = x == Py_True;
24950  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
24951  else return PyObject_IsTrue(x);
24952 }
24953 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
24954  int retval;
24955  if (unlikely(!x)) return -1;
24956  retval = __Pyx_PyObject_IsTrue(x);
24957  Py_DECREF(x);
24958  return retval;
24959 }
24960 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
24961 #if PY_MAJOR_VERSION >= 3
24962  if (PyLong_Check(result)) {
24963  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
24964  "__int__ returned non-int (type %.200s). "
24965  "The ability to return an instance of a strict subclass of int "
24966  "is deprecated, and may be removed in a future version of Python.",
24967  Py_TYPE(result)->tp_name)) {
24968  Py_DECREF(result);
24969  return NULL;
24970  }
24971  return result;
24972  }
24973 #endif
24974  PyErr_Format(PyExc_TypeError,
24975  "__%.4s__ returned non-%.4s (type %.200s)",
24976  type_name, type_name, Py_TYPE(result)->tp_name);
24977  Py_DECREF(result);
24978  return NULL;
24979 }
24980 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
24981 #if CYTHON_USE_TYPE_SLOTS
24982  PyNumberMethods *m;
24983 #endif
24984  const char *name = NULL;
24985  PyObject *res = NULL;
24986 #if PY_MAJOR_VERSION < 3
24987  if (likely(PyInt_Check(x) || PyLong_Check(x)))
24988 #else
24989  if (likely(PyLong_Check(x)))
24990 #endif
24991  return __Pyx_NewRef(x);
24992 #if CYTHON_USE_TYPE_SLOTS
24993  m = Py_TYPE(x)->tp_as_number;
24994  #if PY_MAJOR_VERSION < 3
24995  if (m && m->nb_int) {
24996  name = "int";
24997  res = m->nb_int(x);
24998  }
24999  else if (m && m->nb_long) {
25000  name = "long";
25001  res = m->nb_long(x);
25002  }
25003  #else
25004  if (likely(m && m->nb_int)) {
25005  name = "int";
25006  res = m->nb_int(x);
25007  }
25008  #endif
25009 #else
25010  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
25011  res = PyNumber_Int(x);
25012  }
25013 #endif
25014  if (likely(res)) {
25015 #if PY_MAJOR_VERSION < 3
25016  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
25017 #else
25018  if (unlikely(!PyLong_CheckExact(res))) {
25019 #endif
25020  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
25021  }
25022  }
25023  else if (!PyErr_Occurred()) {
25024  PyErr_SetString(PyExc_TypeError,
25025  "an integer is required");
25026  }
25027  return res;
25028 }
25029 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
25030  Py_ssize_t ival;
25031  PyObject *x;
25032 #if PY_MAJOR_VERSION < 3
25033  if (likely(PyInt_CheckExact(b))) {
25034  if (sizeof(Py_ssize_t) >= sizeof(long))
25035  return PyInt_AS_LONG(b);
25036  else
25037  return PyInt_AsSsize_t(b);
25038  }
25039 #endif
25040  if (likely(PyLong_CheckExact(b))) {
25041  #if CYTHON_USE_PYLONG_INTERNALS
25042  const digit* digits = ((PyLongObject*)b)->ob_digit;
25043  const Py_ssize_t size = Py_SIZE(b);
25044  if (likely(__Pyx_sst_abs(size) <= 1)) {
25045  ival = likely(size) ? digits[0] : 0;
25046  if (size == -1) ival = -ival;
25047  return ival;
25048  } else {
25049  switch (size) {
25050  case 2:
25051  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
25052  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25053  }
25054  break;
25055  case -2:
25056  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
25057  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25058  }
25059  break;
25060  case 3:
25061  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
25062  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25063  }
25064  break;
25065  case -3:
25066  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
25067  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25068  }
25069  break;
25070  case 4:
25071  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
25072  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]));
25073  }
25074  break;
25075  case -4:
25076  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
25077  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]));
25078  }
25079  break;
25080  }
25081  }
25082  #endif
25083  return PyLong_AsSsize_t(b);
25084  }
25085  x = PyNumber_Index(b);
25086  if (!x) return -1;
25087  ival = PyInt_AsSsize_t(x);
25088  Py_DECREF(x);
25089  return ival;
25090 }
25091 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
25092  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
25093 }
25094 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
25095  return PyInt_FromSize_t(ival);
25096 }
25097 
25098 
25099 #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