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  "-finline-limit=8000",
28  "--param",
29  "large-function-insns=8000",
30  "--param",
31  "max-inline-insns-auto=8000",
32  "--param",
33  "max-inline-insns-single=8000",
34  "--param",
35  "inline-unit-growth=200",
36  "--param",
37  "large-function-growth=200",
38  "-funroll-loops",
39  "-fvariable-expansion-in-unroller",
40  "-DNDEBUG",
41  "-DHAVE_BITS_WORDSIZE_H",
42  "-D_GLUCAT_HAVE_BOOST_SERIALIZATION_ARRAY_WRAPPER_H",
43  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
44  "-D_GLUCAT_USE_DENSE_MATRICES",
45  "-D_GLUCAT_CHECK_ISNAN",
46  "-Wno-misleading-indentation",
47  "-Wno-self-assign-overloaded",
48  "-Wno-unused-local-typedefs",
49  "-Wno-deprecated-register",
50  "-fno-check-new",
51  "-fexceptions"
52  ],
53  "include_dirs": [
54  ".",
55  ".."
56  ],
57  "language": "c++",
58  "name": "PyClical",
59  "sources": [
60  "PyClical.pyx"
61  ]
62  },
63  "module_name": "PyClical"
64 }
65 END: Cython Metadata */
66 
67 #define PY_SSIZE_T_CLEAN
68 #include "Python.h"
69 #ifndef Py_PYTHON_H
70  #error Python headers needed to compile C extensions, please install development version of Python.
71 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
72  #error Cython requires Python 2.6+ or Python 3.3+.
73 #else
74 #define CYTHON_ABI "0_29_21"
75 #define CYTHON_HEX_VERSION 0x001D15F0
76 #define CYTHON_FUTURE_DIVISION 1
77 #include <stddef.h>
78 #ifndef offsetof
79  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
80 #endif
81 #if !defined(WIN32) && !defined(MS_WINDOWS)
82  #ifndef __stdcall
83  #define __stdcall
84  #endif
85  #ifndef __cdecl
86  #define __cdecl
87  #endif
88  #ifndef __fastcall
89  #define __fastcall
90  #endif
91 #endif
92 #ifndef DL_IMPORT
93  #define DL_IMPORT(t) t
94 #endif
95 #ifndef DL_EXPORT
96  #define DL_EXPORT(t) t
97 #endif
98 #define __PYX_COMMA ,
99 #ifndef HAVE_LONG_LONG
100  #if PY_VERSION_HEX >= 0x02070000
101  #define HAVE_LONG_LONG
102  #endif
103 #endif
104 #ifndef PY_LONG_LONG
105  #define PY_LONG_LONG LONG_LONG
106 #endif
107 #ifndef Py_HUGE_VAL
108  #define Py_HUGE_VAL HUGE_VAL
109 #endif
110 #ifdef PYPY_VERSION
111  #define CYTHON_COMPILING_IN_PYPY 1
112  #define CYTHON_COMPILING_IN_PYSTON 0
113  #define CYTHON_COMPILING_IN_CPYTHON 0
114  #undef CYTHON_USE_TYPE_SLOTS
115  #define CYTHON_USE_TYPE_SLOTS 0
116  #undef CYTHON_USE_PYTYPE_LOOKUP
117  #define CYTHON_USE_PYTYPE_LOOKUP 0
118  #if PY_VERSION_HEX < 0x03050000
119  #undef CYTHON_USE_ASYNC_SLOTS
120  #define CYTHON_USE_ASYNC_SLOTS 0
121  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
122  #define CYTHON_USE_ASYNC_SLOTS 1
123  #endif
124  #undef CYTHON_USE_PYLIST_INTERNALS
125  #define CYTHON_USE_PYLIST_INTERNALS 0
126  #undef CYTHON_USE_UNICODE_INTERNALS
127  #define CYTHON_USE_UNICODE_INTERNALS 0
128  #undef CYTHON_USE_UNICODE_WRITER
129  #define CYTHON_USE_UNICODE_WRITER 0
130  #undef CYTHON_USE_PYLONG_INTERNALS
131  #define CYTHON_USE_PYLONG_INTERNALS 0
132  #undef CYTHON_AVOID_BORROWED_REFS
133  #define CYTHON_AVOID_BORROWED_REFS 1
134  #undef CYTHON_ASSUME_SAFE_MACROS
135  #define CYTHON_ASSUME_SAFE_MACROS 0
136  #undef CYTHON_UNPACK_METHODS
137  #define CYTHON_UNPACK_METHODS 0
138  #undef CYTHON_FAST_THREAD_STATE
139  #define CYTHON_FAST_THREAD_STATE 0
140  #undef CYTHON_FAST_PYCALL
141  #define CYTHON_FAST_PYCALL 0
142  #undef CYTHON_PEP489_MULTI_PHASE_INIT
143  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
144  #undef CYTHON_USE_TP_FINALIZE
145  #define CYTHON_USE_TP_FINALIZE 0
146  #undef CYTHON_USE_DICT_VERSIONS
147  #define CYTHON_USE_DICT_VERSIONS 0
148  #undef CYTHON_USE_EXC_INFO_STACK
149  #define CYTHON_USE_EXC_INFO_STACK 0
150 #elif defined(PYSTON_VERSION)
151  #define CYTHON_COMPILING_IN_PYPY 0
152  #define CYTHON_COMPILING_IN_PYSTON 1
153  #define CYTHON_COMPILING_IN_CPYTHON 0
154  #ifndef CYTHON_USE_TYPE_SLOTS
155  #define CYTHON_USE_TYPE_SLOTS 1
156  #endif
157  #undef CYTHON_USE_PYTYPE_LOOKUP
158  #define CYTHON_USE_PYTYPE_LOOKUP 0
159  #undef CYTHON_USE_ASYNC_SLOTS
160  #define CYTHON_USE_ASYNC_SLOTS 0
161  #undef CYTHON_USE_PYLIST_INTERNALS
162  #define CYTHON_USE_PYLIST_INTERNALS 0
163  #ifndef CYTHON_USE_UNICODE_INTERNALS
164  #define CYTHON_USE_UNICODE_INTERNALS 1
165  #endif
166  #undef CYTHON_USE_UNICODE_WRITER
167  #define CYTHON_USE_UNICODE_WRITER 0
168  #undef CYTHON_USE_PYLONG_INTERNALS
169  #define CYTHON_USE_PYLONG_INTERNALS 0
170  #ifndef CYTHON_AVOID_BORROWED_REFS
171  #define CYTHON_AVOID_BORROWED_REFS 0
172  #endif
173  #ifndef CYTHON_ASSUME_SAFE_MACROS
174  #define CYTHON_ASSUME_SAFE_MACROS 1
175  #endif
176  #ifndef CYTHON_UNPACK_METHODS
177  #define CYTHON_UNPACK_METHODS 1
178  #endif
179  #undef CYTHON_FAST_THREAD_STATE
180  #define CYTHON_FAST_THREAD_STATE 0
181  #undef CYTHON_FAST_PYCALL
182  #define CYTHON_FAST_PYCALL 0
183  #undef CYTHON_PEP489_MULTI_PHASE_INIT
184  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
185  #undef CYTHON_USE_TP_FINALIZE
186  #define CYTHON_USE_TP_FINALIZE 0
187  #undef CYTHON_USE_DICT_VERSIONS
188  #define CYTHON_USE_DICT_VERSIONS 0
189  #undef CYTHON_USE_EXC_INFO_STACK
190  #define CYTHON_USE_EXC_INFO_STACK 0
191 #else
192  #define CYTHON_COMPILING_IN_PYPY 0
193  #define CYTHON_COMPILING_IN_PYSTON 0
194  #define CYTHON_COMPILING_IN_CPYTHON 1
195  #ifndef CYTHON_USE_TYPE_SLOTS
196  #define CYTHON_USE_TYPE_SLOTS 1
197  #endif
198  #if PY_VERSION_HEX < 0x02070000
199  #undef CYTHON_USE_PYTYPE_LOOKUP
200  #define CYTHON_USE_PYTYPE_LOOKUP 0
201  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
202  #define CYTHON_USE_PYTYPE_LOOKUP 1
203  #endif
204  #if PY_MAJOR_VERSION < 3
205  #undef CYTHON_USE_ASYNC_SLOTS
206  #define CYTHON_USE_ASYNC_SLOTS 0
207  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
208  #define CYTHON_USE_ASYNC_SLOTS 1
209  #endif
210  #if PY_VERSION_HEX < 0x02070000
211  #undef CYTHON_USE_PYLONG_INTERNALS
212  #define CYTHON_USE_PYLONG_INTERNALS 0
213  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
214  #define CYTHON_USE_PYLONG_INTERNALS 1
215  #endif
216  #ifndef CYTHON_USE_PYLIST_INTERNALS
217  #define CYTHON_USE_PYLIST_INTERNALS 1
218  #endif
219  #ifndef CYTHON_USE_UNICODE_INTERNALS
220  #define CYTHON_USE_UNICODE_INTERNALS 1
221  #endif
222  #if PY_VERSION_HEX < 0x030300F0
223  #undef CYTHON_USE_UNICODE_WRITER
224  #define CYTHON_USE_UNICODE_WRITER 0
225  #elif !defined(CYTHON_USE_UNICODE_WRITER)
226  #define CYTHON_USE_UNICODE_WRITER 1
227  #endif
228  #ifndef CYTHON_AVOID_BORROWED_REFS
229  #define CYTHON_AVOID_BORROWED_REFS 0
230  #endif
231  #ifndef CYTHON_ASSUME_SAFE_MACROS
232  #define CYTHON_ASSUME_SAFE_MACROS 1
233  #endif
234  #ifndef CYTHON_UNPACK_METHODS
235  #define CYTHON_UNPACK_METHODS 1
236  #endif
237  #ifndef CYTHON_FAST_THREAD_STATE
238  #define CYTHON_FAST_THREAD_STATE 1
239  #endif
240  #ifndef CYTHON_FAST_PYCALL
241  #define CYTHON_FAST_PYCALL 1
242  #endif
243  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
244  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
245  #endif
246  #ifndef CYTHON_USE_TP_FINALIZE
247  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
248  #endif
249  #ifndef CYTHON_USE_DICT_VERSIONS
250  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
251  #endif
252  #ifndef CYTHON_USE_EXC_INFO_STACK
253  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
254  #endif
255 #endif
256 #if !defined(CYTHON_FAST_PYCCALL)
257 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
258 #endif
259 #if CYTHON_USE_PYLONG_INTERNALS
260  #include "longintrepr.h"
261  #undef SHIFT
262  #undef BASE
263  #undef MASK
264  #ifdef SIZEOF_VOID_P
265  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
266  #endif
267 #endif
268 #ifndef __has_attribute
269  #define __has_attribute(x) 0
270 #endif
271 #ifndef __has_cpp_attribute
272  #define __has_cpp_attribute(x) 0
273 #endif
274 #ifndef CYTHON_RESTRICT
275  #if defined(__GNUC__)
276  #define CYTHON_RESTRICT __restrict__
277  #elif defined(_MSC_VER) && _MSC_VER >= 1400
278  #define CYTHON_RESTRICT __restrict
279  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
280  #define CYTHON_RESTRICT restrict
281  #else
282  #define CYTHON_RESTRICT
283  #endif
284 #endif
285 #ifndef CYTHON_UNUSED
286 # if defined(__GNUC__)
287 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
288 # define CYTHON_UNUSED __attribute__ ((__unused__))
289 # else
290 # define CYTHON_UNUSED
291 # endif
292 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
293 # define CYTHON_UNUSED __attribute__ ((__unused__))
294 # else
295 # define CYTHON_UNUSED
296 # endif
297 #endif
298 #ifndef CYTHON_MAYBE_UNUSED_VAR
299 # if defined(__cplusplus)
300  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
301 # else
302 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
303 # endif
304 #endif
305 #ifndef CYTHON_NCP_UNUSED
306 # if CYTHON_COMPILING_IN_CPYTHON
307 # define CYTHON_NCP_UNUSED
308 # else
309 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
310 # endif
311 #endif
312 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
313 #ifdef _MSC_VER
314  #ifndef _MSC_STDINT_H_
315  #if _MSC_VER < 1300
316  typedef unsigned char uint8_t;
317  typedef unsigned int uint32_t;
318  #else
319  typedef unsigned __int8 uint8_t;
320  typedef unsigned __int32 uint32_t;
321  #endif
322  #endif
323 #else
324  #include <stdint.h>
325 #endif
326 #ifndef CYTHON_FALLTHROUGH
327  #if defined(__cplusplus) && __cplusplus >= 201103L
328  #if __has_cpp_attribute(fallthrough)
329  #define CYTHON_FALLTHROUGH [[fallthrough]]
330  #elif __has_cpp_attribute(clang::fallthrough)
331  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
332  #elif __has_cpp_attribute(gnu::fallthrough)
333  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
334  #endif
335  #endif
336  #ifndef CYTHON_FALLTHROUGH
337  #if __has_attribute(fallthrough)
338  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
339  #else
340  #define CYTHON_FALLTHROUGH
341  #endif
342  #endif
343  #if defined(__clang__ ) && defined(__apple_build_version__)
344  #if __apple_build_version__ < 7000000
345  #undef CYTHON_FALLTHROUGH
346  #define CYTHON_FALLTHROUGH
347  #endif
348  #endif
349 #endif
350 
351 #ifndef __cplusplus
352  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
353 #endif
354 #ifndef CYTHON_INLINE
355  #if defined(__clang__)
356  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
357  #else
358  #define CYTHON_INLINE inline
359  #endif
360 #endif
361 template<typename T>
362 void __Pyx_call_destructor(T& x) {
363  x.~T();
364 }
365 template<typename T>
366 class __Pyx_FakeReference {
367  public:
368  __Pyx_FakeReference() : ptr(NULL) { }
369  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
370  T *operator->() { return ptr; }
371  T *operator&() { return ptr; }
372  operator T&() { return *ptr; }
373  template<typename U> bool operator ==(U other) { return *ptr == other; }
374  template<typename U> bool operator !=(U other) { return *ptr != other; }
375  private:
376  T *ptr;
377 };
378 
379 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
380  #define Py_OptimizeFlag 0
381 #endif
382 #define __PYX_BUILD_PY_SSIZE_T "n"
383 #define CYTHON_FORMAT_SSIZE_T "z"
384 #if PY_MAJOR_VERSION < 3
385  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
386  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
387  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
388  #define __Pyx_DefaultClassType PyClass_Type
389 #else
390  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
391 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
392  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
393  PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
394 #else
395  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
396  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
397 #endif
398  #define __Pyx_DefaultClassType PyType_Type
399 #endif
400 #ifndef Py_TPFLAGS_CHECKTYPES
401  #define Py_TPFLAGS_CHECKTYPES 0
402 #endif
403 #ifndef Py_TPFLAGS_HAVE_INDEX
404  #define Py_TPFLAGS_HAVE_INDEX 0
405 #endif
406 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
407  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
408 #endif
409 #ifndef Py_TPFLAGS_HAVE_FINALIZE
410  #define Py_TPFLAGS_HAVE_FINALIZE 0
411 #endif
412 #ifndef METH_STACKLESS
413  #define METH_STACKLESS 0
414 #endif
415 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
416  #ifndef METH_FASTCALL
417  #define METH_FASTCALL 0x80
418  #endif
419  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
420  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
421  Py_ssize_t nargs, PyObject *kwnames);
422 #else
423  #define __Pyx_PyCFunctionFast _PyCFunctionFast
424  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
425 #endif
426 #if CYTHON_FAST_PYCCALL
427 #define __Pyx_PyFastCFunction_Check(func)\
428  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
429 #else
430 #define __Pyx_PyFastCFunction_Check(func) 0
431 #endif
432 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
433  #define PyObject_Malloc(s) PyMem_Malloc(s)
434  #define PyObject_Free(p) PyMem_Free(p)
435  #define PyObject_Realloc(p) PyMem_Realloc(p)
436 #endif
437 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
438  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
439  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
440  #define PyMem_RawFree(p) PyMem_Free(p)
441 #endif
442 #if CYTHON_COMPILING_IN_PYSTON
443  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
444  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
445 #else
446  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
447  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
448 #endif
449 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
450  #define __Pyx_PyThreadState_Current PyThreadState_GET()
451 #elif PY_VERSION_HEX >= 0x03060000
452  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
453 #elif PY_VERSION_HEX >= 0x03000000
454  #define __Pyx_PyThreadState_Current PyThreadState_GET()
455 #else
456  #define __Pyx_PyThreadState_Current _PyThreadState_Current
457 #endif
458 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
459 #include "pythread.h"
460 #define Py_tss_NEEDS_INIT 0
461 typedef int Py_tss_t;
462 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
463  *key = PyThread_create_key();
464  return 0;
465 }
466 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
467  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
468  *key = Py_tss_NEEDS_INIT;
469  return key;
470 }
471 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
472  PyObject_Free(key);
473 }
474 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
475  return *key != Py_tss_NEEDS_INIT;
476 }
477 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
478  PyThread_delete_key(*key);
479  *key = Py_tss_NEEDS_INIT;
480 }
481 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
482  return PyThread_set_key_value(*key, value);
483 }
484 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
485  return PyThread_get_key_value(*key);
486 }
487 #endif
488 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
489 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
490 #else
491 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
492 #endif
493 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
494  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
495  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
496 #else
497  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
498  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
499 #endif
500 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
501 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
502 #else
503 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
504 #endif
505 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
506  #define CYTHON_PEP393_ENABLED 1
507  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
508  0 : _PyUnicode_Ready((PyObject *)(op)))
509  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
510  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
511  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
512  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
513  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
514  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
515  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
516  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
517  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
518  #else
519  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
520  #endif
521 #else
522  #define CYTHON_PEP393_ENABLED 0
523  #define PyUnicode_1BYTE_KIND 1
524  #define PyUnicode_2BYTE_KIND 2
525  #define PyUnicode_4BYTE_KIND 4
526  #define __Pyx_PyUnicode_READY(op) (0)
527  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
528  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
529  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
530  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
531  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
532  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
533  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
534  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
535 #endif
536 #if CYTHON_COMPILING_IN_PYPY
537  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
538  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
539 #else
540  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
541  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
542  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
543 #endif
544 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
545  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
546 #endif
547 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
548  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
549 #endif
550 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
551  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
552 #endif
553 #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))
554 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
555 #if PY_MAJOR_VERSION >= 3
556  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
557 #else
558  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
559 #endif
560 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
561  #define PyObject_ASCII(o) PyObject_Repr(o)
562 #endif
563 #if PY_MAJOR_VERSION >= 3
564  #define PyBaseString_Type PyUnicode_Type
565  #define PyStringObject PyUnicodeObject
566  #define PyString_Type PyUnicode_Type
567  #define PyString_Check PyUnicode_Check
568  #define PyString_CheckExact PyUnicode_CheckExact
569 #ifndef PyObject_Unicode
570  #define PyObject_Unicode PyObject_Str
571 #endif
572 #endif
573 #if PY_MAJOR_VERSION >= 3
574  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
575  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
576 #else
577  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
578  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
579 #endif
580 #ifndef PySet_CheckExact
581  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
582 #endif
583 #if PY_VERSION_HEX >= 0x030900A4
584  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
585  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
586 #else
587  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
588  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
589 #endif
590 #if CYTHON_ASSUME_SAFE_MACROS
591  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
592 #else
593  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
594 #endif
595 #if PY_MAJOR_VERSION >= 3
596  #define PyIntObject PyLongObject
597  #define PyInt_Type PyLong_Type
598  #define PyInt_Check(op) PyLong_Check(op)
599  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
600  #define PyInt_FromString PyLong_FromString
601  #define PyInt_FromUnicode PyLong_FromUnicode
602  #define PyInt_FromLong PyLong_FromLong
603  #define PyInt_FromSize_t PyLong_FromSize_t
604  #define PyInt_FromSsize_t PyLong_FromSsize_t
605  #define PyInt_AsLong PyLong_AsLong
606  #define PyInt_AS_LONG PyLong_AS_LONG
607  #define PyInt_AsSsize_t PyLong_AsSsize_t
608  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
609  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
610  #define PyNumber_Int PyNumber_Long
611 #endif
612 #if PY_MAJOR_VERSION >= 3
613  #define PyBoolObject PyLongObject
614 #endif
615 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
616  #ifndef PyUnicode_InternFromString
617  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
618  #endif
619 #endif
620 #if PY_VERSION_HEX < 0x030200A4
621  typedef long Py_hash_t;
622  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
623  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
624 #else
625  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
626  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
627 #endif
628 #if PY_MAJOR_VERSION >= 3
629  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
630 #else
631  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
632 #endif
633 #if CYTHON_USE_ASYNC_SLOTS
634  #if PY_VERSION_HEX >= 0x030500B1
635  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
636  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
637  #else
638  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
639  #endif
640 #else
641  #define __Pyx_PyType_AsAsync(obj) NULL
642 #endif
643 #ifndef __Pyx_PyAsyncMethodsStruct
644  typedef struct {
645  unaryfunc am_await;
646  unaryfunc am_aiter;
647  unaryfunc am_anext;
648  } __Pyx_PyAsyncMethodsStruct;
649 #endif
650 
651 #if defined(WIN32) || defined(MS_WINDOWS)
652  #define _USE_MATH_DEFINES
653 #endif
654 #include <math.h>
655 #ifdef NAN
656 #define __PYX_NAN() ((float) NAN)
657 #else
658 static CYTHON_INLINE float __PYX_NAN() {
659  float value;
660  memset(&value, 0xFF, sizeof(value));
661  return value;
662 }
663 #endif
664 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
665 #define __Pyx_truncl trunc
666 #else
667 #define __Pyx_truncl truncl
668 #endif
669 
670 #define __PYX_MARK_ERR_POS(f_index, lineno) \
671  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
672 #define __PYX_ERR(f_index, lineno, Ln_error) \
673  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
674 
675 #ifndef __PYX_EXTERN_C
676  #ifdef __cplusplus
677  #define __PYX_EXTERN_C extern "C"
678  #else
679  #define __PYX_EXTERN_C extern
680  #endif
681 #endif
682 
683 #define __PYX_HAVE__PyClical
684 #define __PYX_HAVE_API__PyClical
685 /* Early includes */
686 #include "ios"
687 #include "new"
688 #include "stdexcept"
689 #include "typeinfo"
690 #include <vector>
691 #include "PyClical.h"
692 #include <string.h>
693 #include <string>
694 #ifdef _OPENMP
695 #include <omp.h>
696 #endif /* _OPENMP */
697 
698 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
699 #define CYTHON_WITHOUT_ASSERTIONS
700 #endif
701 
702 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
703  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
704 
705 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
706 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
707 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
708 #define __PYX_DEFAULT_STRING_ENCODING ""
709 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
710 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
711 #define __Pyx_uchar_cast(c) ((unsigned char)c)
712 #define __Pyx_long_cast(x) ((long)x)
713 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
714  (sizeof(type) < sizeof(Py_ssize_t)) ||\
715  (sizeof(type) > sizeof(Py_ssize_t) &&\
716  likely(v < (type)PY_SSIZE_T_MAX ||\
717  v == (type)PY_SSIZE_T_MAX) &&\
718  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
719  v == (type)PY_SSIZE_T_MIN))) ||\
720  (sizeof(type) == sizeof(Py_ssize_t) &&\
721  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
722  v == (type)PY_SSIZE_T_MAX))) )
723 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
724  return (size_t) i < (size_t) limit;
725 }
726 #if defined (__cplusplus) && __cplusplus >= 201103L
727  #include <cstdlib>
728  #define __Pyx_sst_abs(value) std::abs(value)
729 #elif SIZEOF_INT >= SIZEOF_SIZE_T
730  #define __Pyx_sst_abs(value) abs(value)
731 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
732  #define __Pyx_sst_abs(value) labs(value)
733 #elif defined (_MSC_VER)
734  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
735 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
736  #define __Pyx_sst_abs(value) llabs(value)
737 #elif defined (__GNUC__)
738  #define __Pyx_sst_abs(value) __builtin_llabs(value)
739 #else
740  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
741 #endif
742 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
743 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
744 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
745 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
746 #define __Pyx_PyBytes_FromString PyBytes_FromString
747 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
748 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
749 #if PY_MAJOR_VERSION < 3
750  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
751  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
752 #else
753  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
754  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
755 #endif
756 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
757 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
758 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
759 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
760 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
761 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
762 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
763 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
764 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
765 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
766 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
767 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
768 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
769 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
770 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
771 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
772 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
773  const Py_UNICODE *u_end = u;
774  while (*u_end++) ;
775  return (size_t)(u_end - u - 1);
776 }
777 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
778 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
779 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
780 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
781 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
782 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
783 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
784 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
785 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
786 #define __Pyx_PySequence_Tuple(obj)\
787  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
788 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
789 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
790 #if CYTHON_ASSUME_SAFE_MACROS
791 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
792 #else
793 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
794 #endif
795 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
796 #if PY_MAJOR_VERSION >= 3
797 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
798 #else
799 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
800 #endif
801 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
802 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
803 static int __Pyx_sys_getdefaultencoding_not_ascii;
804 static int __Pyx_init_sys_getdefaultencoding_params(void) {
805  PyObject* sys;
806  PyObject* default_encoding = NULL;
807  PyObject* ascii_chars_u = NULL;
808  PyObject* ascii_chars_b = NULL;
809  const char* default_encoding_c;
810  sys = PyImport_ImportModule("sys");
811  if (!sys) goto bad;
812  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
813  Py_DECREF(sys);
814  if (!default_encoding) goto bad;
815  default_encoding_c = PyBytes_AsString(default_encoding);
816  if (!default_encoding_c) goto bad;
817  if (strcmp(default_encoding_c, "ascii") == 0) {
818  __Pyx_sys_getdefaultencoding_not_ascii = 0;
819  } else {
820  char ascii_chars[128];
821  int c;
822  for (c = 0; c < 128; c++) {
823  ascii_chars[c] = c;
824  }
825  __Pyx_sys_getdefaultencoding_not_ascii = 1;
826  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
827  if (!ascii_chars_u) goto bad;
828  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
829  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
830  PyErr_Format(
831  PyExc_ValueError,
832  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
833  default_encoding_c);
834  goto bad;
835  }
836  Py_DECREF(ascii_chars_u);
837  Py_DECREF(ascii_chars_b);
838  }
839  Py_DECREF(default_encoding);
840  return 0;
841 bad:
842  Py_XDECREF(default_encoding);
843  Py_XDECREF(ascii_chars_u);
844  Py_XDECREF(ascii_chars_b);
845  return -1;
846 }
847 #endif
848 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
849 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
850 #else
851 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
852 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
853 static char* __PYX_DEFAULT_STRING_ENCODING;
854 static int __Pyx_init_sys_getdefaultencoding_params(void) {
855  PyObject* sys;
856  PyObject* default_encoding = NULL;
857  char* default_encoding_c;
858  sys = PyImport_ImportModule("sys");
859  if (!sys) goto bad;
860  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
861  Py_DECREF(sys);
862  if (!default_encoding) goto bad;
863  default_encoding_c = PyBytes_AsString(default_encoding);
864  if (!default_encoding_c) goto bad;
865  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
866  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
867  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
868  Py_DECREF(default_encoding);
869  return 0;
870 bad:
871  Py_XDECREF(default_encoding);
872  return -1;
873 }
874 #endif
875 #endif
876 
877 
878 /* Test for GCC > 2.95 */
879 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
880  #define likely(x) __builtin_expect(!!(x), 1)
881  #define unlikely(x) __builtin_expect(!!(x), 0)
882 #else /* !__GNUC__ or GCC < 2.95 */
883  #define likely(x) (x)
884  #define unlikely(x) (x)
885 #endif /* __GNUC__ */
886 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
887 
888 static PyObject *__pyx_m = NULL;
889 static PyObject *__pyx_d;
890 static PyObject *__pyx_b;
891 static PyObject *__pyx_cython_runtime = NULL;
892 static PyObject *__pyx_empty_tuple;
893 static PyObject *__pyx_empty_bytes;
894 static PyObject *__pyx_empty_unicode;
895 static int __pyx_lineno;
896 static int __pyx_clineno = 0;
897 static const char * __pyx_cfilenm= __FILE__;
898 static const char *__pyx_filename;
899 
900 
901 static const char *__pyx_f[] = {
902  "PyClical.pyx",
903  "stringsource",
904 };
905 
906 /*--- Type declarations ---*/
907 struct __pyx_obj_8PyClical_index_set;
908 struct __pyx_obj_8PyClical_clifford;
909 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
910 struct __pyx_opt_args_8PyClical_sqrt;
911 struct __pyx_opt_args_8PyClical_log;
912 struct __pyx_opt_args_8PyClical_cos;
913 struct __pyx_opt_args_8PyClical_acos;
914 struct __pyx_opt_args_8PyClical_acosh;
915 struct __pyx_opt_args_8PyClical_sin;
916 struct __pyx_opt_args_8PyClical_asin;
917 struct __pyx_opt_args_8PyClical_asinh;
918 struct __pyx_opt_args_8PyClical_tan;
919 struct __pyx_opt_args_8PyClical_atan;
920 struct __pyx_opt_args_8PyClical_atanh;
921 struct __pyx_opt_args_8PyClical_random_clifford;
922 
923 /* "PyClical.pyx":1541
924  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
925  *
926  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
927  * """
928  * Square root of multivector with optional complexifier.
929  */
930 struct __pyx_opt_args_8PyClical_sqrt {
931  int __pyx_n;
932  PyObject *i;
933 };
934 
935 /* "PyClical.pyx":1578
936  * return clifford().wrap( glucat.exp(toClifford(obj)) )
937  *
938  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
939  * """
940  * Natural logarithm of multivector with optional complexifier.
941  */
942 struct __pyx_opt_args_8PyClical_log {
943  int __pyx_n;
944  PyObject *i;
945 };
946 
947 /* "PyClical.pyx":1601
948  * return clifford().wrap( glucat.log(toClifford(obj)) )
949  *
950  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
951  * """
952  * Cosine of multivector with optional complexifier.
953  */
954 struct __pyx_opt_args_8PyClical_cos {
955  int __pyx_n;
956  PyObject *i;
957 };
958 
959 /* "PyClical.pyx":1618
960  * return clifford().wrap( glucat.cos(toClifford(obj)) )
961  *
962  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
963  * """
964  * Inverse cosine of multivector with optional complexifier.
965  */
966 struct __pyx_opt_args_8PyClical_acos {
967  int __pyx_n;
968  PyObject *i;
969 };
970 
971 /* "PyClical.pyx":1655
972  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
973  *
974  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
975  * """
976  * Inverse hyperbolic cosine of multivector with optional complexifier.
977  */
978 struct __pyx_opt_args_8PyClical_acosh {
979  int __pyx_n;
980  PyObject *i;
981 };
982 
983 /* "PyClical.pyx":1678
984  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
985  *
986  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
987  * """
988  * Sine of multivector with optional complexifier.
989  */
990 struct __pyx_opt_args_8PyClical_sin {
991  int __pyx_n;
992  PyObject *i;
993 };
994 
995 /* "PyClical.pyx":1697
996  * return clifford().wrap( glucat.sin(toClifford(obj)) )
997  *
998  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
999  * """
1000  * Inverse sine of multivector with optional complexifier.
1001  */
1002 struct __pyx_opt_args_8PyClical_asin {
1003  int __pyx_n;
1004  PyObject *i;
1005 };
1006 
1007 /* "PyClical.pyx":1732
1008  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
1009  *
1010  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
1011  * """
1012  * Inverse hyperbolic sine of multivector with optional complexifier.
1013  */
1014 struct __pyx_opt_args_8PyClical_asinh {
1015  int __pyx_n;
1016  PyObject *i;
1017 };
1018 
1019 /* "PyClical.pyx":1751
1020  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
1021  *
1022  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
1023  * """
1024  * Tangent of multivector with optional complexifier.
1025  */
1026 struct __pyx_opt_args_8PyClical_tan {
1027  int __pyx_n;
1028  PyObject *i;
1029 };
1030 
1031 /* "PyClical.pyx":1768
1032  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1033  *
1034  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1035  * """
1036  * Inverse tangent of multivector with optional complexifier.
1037  */
1038 struct __pyx_opt_args_8PyClical_atan {
1039  int __pyx_n;
1040  PyObject *i;
1041 };
1042 
1043 /* "PyClical.pyx":1797
1044  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1045  *
1046  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1047  * """
1048  * Inverse hyperbolic tangent of multivector with optional complexifier.
1049  */
1050 struct __pyx_opt_args_8PyClical_atanh {
1051  int __pyx_n;
1052  PyObject *i;
1053 };
1054 
1055 /* "PyClical.pyx":1814
1056  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1057  *
1058  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1059  * """
1060  * Random multivector within a frame.
1061  */
1062 struct __pyx_opt_args_8PyClical_random_clifford {
1063  int __pyx_n;
1064  PyObject *fill;
1065 };
1066 
1067 /* "PyClical.pyx":38
1068  *
1069  * # Forward reference
1070  * cdef class index_set # <<<<<<<<<<<<<<
1071  *
1072  * cdef inline IndexSet toIndexSet(obj):
1073  */
1074 struct __pyx_obj_8PyClical_index_set {
1075  PyObject_HEAD
1076  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1077  IndexSet *instance;
1078 };
1079 
1080 
1081 /* "PyClical.pyx":532
1082  *
1083  * # Forward reference.
1084  * cdef class clifford # <<<<<<<<<<<<<<
1085  *
1086  * cdef inline Clifford toClifford(obj):
1087  */
1088 struct __pyx_obj_8PyClical_clifford {
1089  PyObject_HEAD
1090  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1091  Clifford *instance;
1092 };
1093 
1094 
1095 /* "PyClical.pyx":229
1096  * return self.instance.getitem(idx)
1097  *
1098  * def __iter__(self): # <<<<<<<<<<<<<<
1099  * """
1100  * Iterate over the indices of an index_set.
1101  */
1102 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1103  PyObject_HEAD
1104  PyObject *__pyx_v_idx;
1105  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1106  PyObject *__pyx_t_0;
1107  Py_ssize_t __pyx_t_1;
1108  PyObject *(*__pyx_t_2)(PyObject *);
1109 };
1110 
1111 
1112 
1113 /* "PyClical.pyx":46
1114  * return index_set(obj).instance[0]
1115  *
1116  * cdef class index_set: # <<<<<<<<<<<<<<
1117  * """
1118  * Python class index_set wraps C++ class IndexSet.
1119  */
1120 
1121 struct __pyx_vtabstruct_8PyClical_index_set {
1122  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1123  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1124  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1125 };
1126 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1127 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1128 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1129 
1130 
1131 /* "PyClical.pyx":537
1132  * return clifford(obj).instance[0]
1133  *
1134  * cdef class clifford: # <<<<<<<<<<<<<<
1135  * """
1136  * Python class clifford wraps C++ class Clifford.
1137  */
1138 
1139 struct __pyx_vtabstruct_8PyClical_clifford {
1140  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1141  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1142  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1143 };
1144 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1145 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1146 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1147 
1148 /* --- Runtime support code (head) --- */
1149 /* Refnanny.proto */
1150 #ifndef CYTHON_REFNANNY
1151  #define CYTHON_REFNANNY 0
1152 #endif
1153 #if CYTHON_REFNANNY
1154  typedef struct {
1155  void (*INCREF)(void*, PyObject*, int);
1156  void (*DECREF)(void*, PyObject*, int);
1157  void (*GOTREF)(void*, PyObject*, int);
1158  void (*GIVEREF)(void*, PyObject*, int);
1159  void* (*SetupContext)(const char*, int, const char*);
1160  void (*FinishContext)(void**);
1161  } __Pyx_RefNannyAPIStruct;
1162  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1163  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1164  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1165 #ifdef WITH_THREAD
1166  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1167  if (acquire_gil) {\
1168  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1169  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1170  PyGILState_Release(__pyx_gilstate_save);\
1171  } else {\
1172  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1173  }
1174 #else
1175  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1176  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1177 #endif
1178  #define __Pyx_RefNannyFinishContext()\
1179  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1180  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1181  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1182  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1183  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1184  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1185  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1186  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1187  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1188 #else
1189  #define __Pyx_RefNannyDeclarations
1190  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1191  #define __Pyx_RefNannyFinishContext()
1192  #define __Pyx_INCREF(r) Py_INCREF(r)
1193  #define __Pyx_DECREF(r) Py_DECREF(r)
1194  #define __Pyx_GOTREF(r)
1195  #define __Pyx_GIVEREF(r)
1196  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1197  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1198  #define __Pyx_XGOTREF(r)
1199  #define __Pyx_XGIVEREF(r)
1200 #endif
1201 #define __Pyx_XDECREF_SET(r, v) do {\
1202  PyObject *tmp = (PyObject *) r;\
1203  r = v; __Pyx_XDECREF(tmp);\
1204  } while (0)
1205 #define __Pyx_DECREF_SET(r, v) do {\
1206  PyObject *tmp = (PyObject *) r;\
1207  r = v; __Pyx_DECREF(tmp);\
1208  } while (0)
1209 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1210 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1211 
1212 /* PyObjectGetAttrStr.proto */
1213 #if CYTHON_USE_TYPE_SLOTS
1214 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1215 #else
1216 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1217 #endif
1218 
1219 /* GetBuiltinName.proto */
1220 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1221 
1222 /* PyCFunctionFastCall.proto */
1223 #if CYTHON_FAST_PYCCALL
1224 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1225 #else
1226 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1227 #endif
1228 
1229 /* PyFunctionFastCall.proto */
1230 #if CYTHON_FAST_PYCALL
1231 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1232  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1233 #if 1 || PY_VERSION_HEX < 0x030600B1
1234 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1235 #else
1236 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1237 #endif
1238 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1239  (sizeof(char [1 - 2*!(cond)]) - 1)
1240 #ifndef Py_MEMBER_SIZE
1241 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1242 #endif
1243  static size_t __pyx_pyframe_localsplus_offset = 0;
1244  #include "frameobject.h"
1245  #define __Pxy_PyFrame_Initialize_Offsets()\
1246  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1247  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1248  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1249  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1250 #endif
1251 
1252 /* PyObjectCall.proto */
1253 #if CYTHON_COMPILING_IN_CPYTHON
1254 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1255 #else
1256 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1257 #endif
1258 
1259 /* PyObjectCallMethO.proto */
1260 #if CYTHON_COMPILING_IN_CPYTHON
1261 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1262 #endif
1263 
1264 /* PyObjectCallOneArg.proto */
1265 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1266 
1267 /* PyThreadStateGet.proto */
1268 #if CYTHON_FAST_THREAD_STATE
1269 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1270 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1271 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1272 #else
1273 #define __Pyx_PyThreadState_declare
1274 #define __Pyx_PyThreadState_assign
1275 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1276 #endif
1277 
1278 /* PyErrFetchRestore.proto */
1279 #if CYTHON_FAST_THREAD_STATE
1280 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1281 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1282 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1283 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1284 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1285 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1286 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1287 #if CYTHON_COMPILING_IN_CPYTHON
1288 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1289 #else
1290 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1291 #endif
1292 #else
1293 #define __Pyx_PyErr_Clear() PyErr_Clear()
1294 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1295 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1296 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1297 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1298 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1299 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1300 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1301 #endif
1302 
1303 /* WriteUnraisableException.proto */
1304 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1305  int lineno, const char *filename,
1306  int full_traceback, int nogil);
1307 
1308 /* PyDictVersioning.proto */
1309 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1310 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1311 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1312 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1313  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1314  (cache_var) = (value);
1315 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1316  static PY_UINT64_T __pyx_dict_version = 0;\
1317  static PyObject *__pyx_dict_cached_value = NULL;\
1318  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1319  (VAR) = __pyx_dict_cached_value;\
1320  } else {\
1321  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1322  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1323  }\
1324 }
1325 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1326 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1327 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1328 #else
1329 #define __PYX_GET_DICT_VERSION(dict) (0)
1330 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1331 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1332 #endif
1333 
1334 /* PyObjectCallNoArg.proto */
1335 #if CYTHON_COMPILING_IN_CPYTHON
1336 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1337 #else
1338 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1339 #endif
1340 
1341 /* RaiseDoubleKeywords.proto */
1342 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1343 
1344 /* ParseKeywords.proto */
1345 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1346  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1347  const char* function_name);
1348 
1349 /* RaiseArgTupleInvalid.proto */
1350 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1351  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1352 
1353 /* GetModuleGlobalName.proto */
1354 #if CYTHON_USE_DICT_VERSIONS
1355 #define __Pyx_GetModuleGlobalName(var, name) {\
1356  static PY_UINT64_T __pyx_dict_version = 0;\
1357  static PyObject *__pyx_dict_cached_value = NULL;\
1358  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1359  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1360  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1361 }
1362 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1363  PY_UINT64_T __pyx_dict_version;\
1364  PyObject *__pyx_dict_cached_value;\
1365  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1366 }
1367 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1368 #else
1369 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1370 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1371 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1372 #endif
1373 
1374 /* GetTopmostException.proto */
1375 #if CYTHON_USE_EXC_INFO_STACK
1376 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1377 #endif
1378 
1379 /* SaveResetException.proto */
1380 #if CYTHON_FAST_THREAD_STATE
1381 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1382 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1383 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1384 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1385 #else
1386 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1387 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1388 #endif
1389 
1390 /* PyErrExceptionMatches.proto */
1391 #if CYTHON_FAST_THREAD_STATE
1392 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1393 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1394 #else
1395 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1396 #endif
1397 
1398 /* GetException.proto */
1399 #if CYTHON_FAST_THREAD_STATE
1400 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1401 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1402 #else
1403 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1404 #endif
1405 
1406 /* RaiseException.proto */
1407 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1408 
1409 /* PyObjectCall2Args.proto */
1410 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1411 
1412 /* PyIntBinop.proto */
1413 #if !CYTHON_COMPILING_IN_PYPY
1414 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1415 #else
1416 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1417  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1418 #endif
1419 
1420 /* PySequenceContains.proto */
1421 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1422  int result = PySequence_Contains(seq, item);
1423  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1424 }
1425 
1426 /* IncludeCppStringH.proto */
1427 #include <string>
1428 
1429 /* decode_c_string_utf16.proto */
1430 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1431  int byteorder = 0;
1432  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1433 }
1434 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1435  int byteorder = -1;
1436  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1437 }
1438 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1439  int byteorder = 1;
1440  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1441 }
1442 
1443 /* decode_c_bytes.proto */
1444 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
1445  const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
1446  const char* encoding, const char* errors,
1447  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1448 
1449 /* decode_cpp_string.proto */
1450 static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string(
1451  std::string cppstring, Py_ssize_t start, Py_ssize_t stop,
1452  const char* encoding, const char* errors,
1453  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
1454  return __Pyx_decode_c_bytes(
1455  cppstring.data(), cppstring.size(), start, stop, encoding, errors, decode_func);
1456 }
1457 
1458 /* SwapException.proto */
1459 #if CYTHON_FAST_THREAD_STATE
1460 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1461 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1462 #else
1463 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1464 #endif
1465 
1466 /* SetItemInt.proto */
1467 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1468  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1469  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1470  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1471  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1472 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1473 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1474  int is_list, int wraparound, int boundscheck);
1475 
1476 /* ArgTypeTest.proto */
1477 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1478  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1479  __Pyx__ArgTypeTest(obj, type, name, exact))
1480 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1481 
1482 /* Import.proto */
1483 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1484 
1485 /* IncludeStringH.proto */
1486 #include <string.h>
1487 
1488 /* PyObject_GenericGetAttrNoDict.proto */
1489 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1490 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1491 #else
1492 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1493 #endif
1494 
1495 /* PyObject_GenericGetAttr.proto */
1496 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1497 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1498 #else
1499 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1500 #endif
1501 
1502 /* SetVTable.proto */
1503 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1504 
1505 /* PyObjectGetAttrStrNoError.proto */
1506 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
1507 
1508 /* SetupReduce.proto */
1509 static int __Pyx_setup_reduce(PyObject* type_obj);
1510 
1511 /* BytesEquals.proto */
1512 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1513 
1514 /* UnicodeEquals.proto */
1515 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1516 
1517 /* CLineInTraceback.proto */
1518 #ifdef CYTHON_CLINE_IN_TRACEBACK
1519 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1520 #else
1521 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1522 #endif
1523 
1524 /* CodeObjectCache.proto */
1525 typedef struct {
1526  PyCodeObject* code_object;
1527  int code_line;
1528 } __Pyx_CodeObjectCacheEntry;
1529 struct __Pyx_CodeObjectCache {
1530  int count;
1531  int max_count;
1532  __Pyx_CodeObjectCacheEntry* entries;
1533 };
1534 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1535 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1536 static PyCodeObject *__pyx_find_code_object(int code_line);
1537 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1538 
1539 /* AddTraceback.proto */
1540 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1541  int py_line, const char *filename);
1542 
1543 /* CppExceptionConversion.proto */
1544 #ifndef __Pyx_CppExn2PyErr
1545 #include <new>
1546 #include <typeinfo>
1547 #include <stdexcept>
1548 #include <ios>
1549 static void __Pyx_CppExn2PyErr() {
1550  try {
1551  if (PyErr_Occurred())
1552  ; // let the latest Python exn pass through and ignore the current one
1553  else
1554  throw;
1555  } catch (const std::bad_alloc& exn) {
1556  PyErr_SetString(PyExc_MemoryError, exn.what());
1557  } catch (const std::bad_cast& exn) {
1558  PyErr_SetString(PyExc_TypeError, exn.what());
1559  } catch (const std::bad_typeid& exn) {
1560  PyErr_SetString(PyExc_TypeError, exn.what());
1561  } catch (const std::domain_error& exn) {
1562  PyErr_SetString(PyExc_ValueError, exn.what());
1563  } catch (const std::invalid_argument& exn) {
1564  PyErr_SetString(PyExc_ValueError, exn.what());
1565  } catch (const std::ios_base::failure& exn) {
1566  PyErr_SetString(PyExc_IOError, exn.what());
1567  } catch (const std::out_of_range& exn) {
1568  PyErr_SetString(PyExc_IndexError, exn.what());
1569  } catch (const std::overflow_error& exn) {
1570  PyErr_SetString(PyExc_OverflowError, exn.what());
1571  } catch (const std::range_error& exn) {
1572  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1573  } catch (const std::underflow_error& exn) {
1574  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1575  } catch (const std::exception& exn) {
1576  PyErr_SetString(PyExc_RuntimeError, exn.what());
1577  }
1578  catch (...)
1579  {
1580  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1581  }
1582 }
1583 #endif
1584 
1585 /* CIntToPy.proto */
1586 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1587 
1588 /* CIntFromPy.proto */
1589 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1590 
1591 /* CIntToPy.proto */
1592 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1593 
1594 /* CIntFromPy.proto */
1595 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1596 
1597 /* FastTypeChecks.proto */
1598 #if CYTHON_COMPILING_IN_CPYTHON
1599 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1600 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1601 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1602 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1603 #else
1604 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1605 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1606 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1607 #endif
1608 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1609 
1610 /* FetchCommonType.proto */
1611 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1612 
1613 /* PyObjectGetMethod.proto */
1614 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1615 
1616 /* PyObjectCallMethod1.proto */
1617 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1618 
1619 /* CoroutineBase.proto */
1620 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1621 #if CYTHON_USE_EXC_INFO_STACK
1622 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1623 #else
1624 typedef struct {
1625  PyObject *exc_type;
1626  PyObject *exc_value;
1627  PyObject *exc_traceback;
1628 } __Pyx_ExcInfoStruct;
1629 #endif
1630 typedef struct {
1631  PyObject_HEAD
1632  __pyx_coroutine_body_t body;
1633  PyObject *closure;
1634  __Pyx_ExcInfoStruct gi_exc_state;
1635  PyObject *gi_weakreflist;
1636  PyObject *classobj;
1637  PyObject *yieldfrom;
1638  PyObject *gi_name;
1639  PyObject *gi_qualname;
1640  PyObject *gi_modulename;
1641  PyObject *gi_code;
1642  int resume_label;
1643  char is_running;
1644 } __pyx_CoroutineObject;
1645 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1646  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1647  PyObject *name, PyObject *qualname, PyObject *module_name);
1648 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1649  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1650  PyObject *name, PyObject *qualname, PyObject *module_name);
1651 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1652 static int __Pyx_Coroutine_clear(PyObject *self);
1653 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1654 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1655 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1656 #if CYTHON_USE_EXC_INFO_STACK
1657 #define __Pyx_Coroutine_SwapException(self)
1658 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1659 #else
1660 #define __Pyx_Coroutine_SwapException(self) {\
1661  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1662  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1663  }
1664 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1665  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1666  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1667  }
1668 #endif
1669 #if CYTHON_FAST_THREAD_STATE
1670 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1671  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1672 #else
1673 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1674  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1675 #endif
1676 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1677 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1678 
1679 /* PatchModuleWithCoroutine.proto */
1680 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1681 
1682 /* PatchGeneratorABC.proto */
1683 static int __Pyx_patch_abc(void);
1684 
1685 /* Generator.proto */
1686 #define __Pyx_Generator_USED
1687 static PyTypeObject *__pyx_GeneratorType = 0;
1688 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1689 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1690  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1691 static PyObject *__Pyx_Generator_Next(PyObject *self);
1692 static int __pyx_Generator_init(void);
1693 
1694 /* CheckBinaryVersion.proto */
1695 static int __Pyx_check_binary_version(void);
1696 
1697 /* InitStrings.proto */
1698 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1699 
1700 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1701 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1702 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1703 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1704 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1705 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1706 
1707 /* Module declarations from 'libcpp.vector' */
1708 
1709 /* Module declarations from 'glucat' */
1710 
1711 /* Module declarations from 'libc.string' */
1712 
1713 /* Module declarations from 'libcpp.string' */
1714 
1715 /* Module declarations from 'PyClical' */
1716 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1717 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1718 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1719 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1720 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1721 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1722 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1723 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1724 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1725 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1726 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1727 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1728 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1729 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1730 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1731 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1732 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1733 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1734 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1735 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1736 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1737 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1738 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1739 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1740 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1741 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1742 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1743 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1744 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1745 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1746 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1747 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1748 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1749 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1750 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1751 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1752 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1753 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1754 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1755 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1756 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1757 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*/
1758 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1759 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1760 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1761 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/
1762 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/
1763 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/
1764 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/
1765 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/
1766 #define __Pyx_MODULE_NAME "PyClical"
1767 extern int __pyx_module_is_main_PyClical;
1768 int __pyx_module_is_main_PyClical = 0;
1769 
1770 /* Implementation of 'PyClical' */
1771 static PyObject *__pyx_builtin_IndexError;
1772 static PyObject *__pyx_builtin_RuntimeError;
1773 static PyObject *__pyx_builtin_TypeError;
1774 static PyObject *__pyx_builtin_ValueError;
1775 static PyObject *__pyx_builtin_NotImplemented;
1776 static PyObject *__pyx_builtin_range;
1777 static PyObject *__pyx_builtin_xrange;
1778 static const char __pyx_k_[] = ".";
1779 static const char __pyx_k_e[] = "e";
1780 static const char __pyx_k_i[] = "i";
1781 static const char __pyx_k_m[] = "m";
1782 static const char __pyx_k_p[] = "p";
1783 static const char __pyx_k_q[] = "q";
1784 static const char __pyx_k__2[] = " ";
1785 static const char __pyx_k__5[] = ":";
1786 static const char __pyx_k__6[] = "\n\t";
1787 static const char __pyx_k__7[] = " (";
1788 static const char __pyx_k__8[] = ", ";
1789 static const char __pyx_k__9[] = ").";
1790 static const char __pyx_k_cl[] = "cl";
1791 static const char __pyx_k_pi[] = "pi";
1792 static const char __pyx_k_abc[] = "abc";
1793 static const char __pyx_k_cos[] = "cos";
1794 static const char __pyx_k_exp[] = "exp";
1795 static const char __pyx_k_frm[] = "frm";
1796 static const char __pyx_k_inv[] = "inv";
1797 static const char __pyx_k_ist[] = "ist";
1798 static const char __pyx_k_ixt[] = "ixt";
1799 static const char __pyx_k_lhs[] = "lhs";
1800 static const char __pyx_k_log[] = "log";
1801 static const char __pyx_k_max[] = "max";
1802 static const char __pyx_k_min[] = "min";
1803 static const char __pyx_k_obj[] = "obj";
1804 static const char __pyx_k_odd[] = "odd";
1805 static const char __pyx_k_pow[] = "pow";
1806 static const char __pyx_k_rhs[] = "rhs";
1807 static const char __pyx_k_sin[] = "sin";
1808 static const char __pyx_k_tan[] = "tan";
1809 static const char __pyx_k_tau[] = "tau";
1810 static const char __pyx_k_Real[] = "Real";
1811 static const char __pyx_k_acos[] = "acos";
1812 static const char __pyx_k_args[] = "args";
1813 static const char __pyx_k_asin[] = "asin";
1814 static const char __pyx_k_atan[] = "atan";
1815 static const char __pyx_k_conj[] = "conj";
1816 static const char __pyx_k_copy[] = "copy";
1817 static const char __pyx_k_cosh[] = "cosh";
1818 static const char __pyx_k_even[] = "even";
1819 static const char __pyx_k_fill[] = "fill";
1820 static const char __pyx_k_from[] = " from ";
1821 static const char __pyx_k_iter[] = "__iter__";
1822 static const char __pyx_k_main[] = "__main__";
1823 static const char __pyx_k_math[] = "math";
1824 static const char __pyx_k_name[] = "__name__";
1825 static const char __pyx_k_norm[] = "norm";
1826 static const char __pyx_k_pure[] = "pure";
1827 static const char __pyx_k_quad[] = "quad";
1828 static const char __pyx_k_send[] = "send";
1829 static const char __pyx_k_sinh[] = "sinh";
1830 static const char __pyx_k_sqrt[] = "sqrt";
1831 static const char __pyx_k_tanh[] = "tanh";
1832 static const char __pyx_k_test[] = "_test";
1833 static const char __pyx_k_0_8_4[] = "0.8.4";
1834 static const char __pyx_k_UTF_8[] = "UTF-8";
1835 static const char __pyx_k_acosh[] = "acosh";
1836 static const char __pyx_k_asinh[] = "asinh";
1837 static const char __pyx_k_atanh[] = "atanh";
1838 static const char __pyx_k_close[] = "close";
1839 static const char __pyx_k_grade[] = "grade";
1840 static const char __pyx_k_istpq[] = "istpq";
1841 static const char __pyx_k_nbar3[] = "nbar3";
1842 static const char __pyx_k_ninf3[] = "ninf3";
1843 static const char __pyx_k_other[] = "other";
1844 static const char __pyx_k_range[] = "range";
1845 static const char __pyx_k_throw[] = "throw";
1846 static const char __pyx_k_using[] = " using (";
1847 static const char __pyx_k_value[] = " value ";
1848 static const char __pyx_k_encode[] = "encode";
1849 static const char __pyx_k_import[] = "__import__";
1850 static const char __pyx_k_reduce[] = "__reduce__";
1851 static const char __pyx_k_scalar[] = "scalar";
1852 static const char __pyx_k_test_2[] = "__test__";
1853 static const char __pyx_k_xrange[] = "xrange";
1854 static const char __pyx_k_doctest[] = "doctest";
1855 static const char __pyx_k_invalid[] = " invalid ";
1856 static const char __pyx_k_numbers[] = "numbers";
1857 static const char __pyx_k_reverse[] = "reverse";
1858 static const char __pyx_k_testmod[] = "testmod";
1859 static const char __pyx_k_version[] = "__version__";
1860 static const char __pyx_k_Integral[] = "Integral";
1861 static const char __pyx_k_PyClical[] = "PyClical";
1862 static const char __pyx_k_Sequence[] = "Sequence";
1863 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1864 static const char __pyx_k_clifford[] = "clifford";
1865 static const char __pyx_k_getstate[] = "__getstate__";
1866 static const char __pyx_k_involute[] = "involute";
1867 static const char __pyx_k_setstate[] = "__setstate__";
1868 static const char __pyx_k_to_frame[] = " to frame ";
1869 static const char __pyx_k_TypeError[] = "TypeError";
1870 static const char __pyx_k_index_set[] = "index_set";
1871 static const char __pyx_k_outer_pow[] = "outer_pow";
1872 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1873 static const char __pyx_k_IndexError[] = "IndexError";
1874 static const char __pyx_k_ValueError[] = "ValueError";
1875 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1876 static const char __pyx_k_collections[] = "collections";
1877 static const char __pyx_k_e_line_1886[] = "e (line 1886)";
1878 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1879 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1880 static const char __pyx_k_abs_line_1472[] = "abs (line 1472)";
1881 static const char __pyx_k_cos_line_1601[] = "cos (line 1601)";
1882 static const char __pyx_k_exp_line_1564[] = "exp (line 1564)";
1883 static const char __pyx_k_inv_line_1328[] = "inv (line 1328)";
1884 static const char __pyx_k_log_line_1578[] = "log (line 1578)";
1885 static const char __pyx_k_odd_line_1396[] = "odd (line 1396)";
1886 static const char __pyx_k_pow_line_1493[] = "pow (line 1493)";
1887 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1888 static const char __pyx_k_sin_line_1678[] = "sin (line 1678)";
1889 static const char __pyx_k_tan_line_1751[] = "tan (line 1751)";
1890 static const char __pyx_k_using_invalid[] = " using invalid ";
1891 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1892 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1893 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1894 static const char __pyx_k_acos_line_1618[] = "acos (line 1618)";
1895 static const char __pyx_k_agc3_line_1843[] = "agc3 (line 1843)";
1896 static const char __pyx_k_asin_line_1697[] = "asin (line 1697)";
1897 static const char __pyx_k_atan_line_1768[] = "atan (line 1768)";
1898 static const char __pyx_k_cga3_line_1823[] = "cga3 (line 1823)";
1899 static const char __pyx_k_conj_line_1435[] = "conj (line 1435)";
1900 static const char __pyx_k_cosh_line_1639[] = "cosh (line 1639)";
1901 static const char __pyx_k_even_line_1387[] = "even (line 1387)";
1902 static const char __pyx_k_imag_line_1365[] = "imag (line 1365)";
1903 static const char __pyx_k_invalid_string[] = " invalid string ";
1904 static const char __pyx_k_norm_line_1461[] = "norm (line 1461)";
1905 static const char __pyx_k_pure_line_1376[] = "pure (line 1376)";
1906 static const char __pyx_k_quad_line_1450[] = "quad (line 1450)";
1907 static const char __pyx_k_real_line_1354[] = "real (line 1354)";
1908 static const char __pyx_k_scalar_epsilon[] = "scalar_epsilon";
1909 static const char __pyx_k_sinh_line_1718[] = "sinh (line 1718)";
1910 static const char __pyx_k_sqrt_line_1541[] = "sqrt (line 1541)";
1911 static const char __pyx_k_tanh_line_1785[] = "tanh (line 1785)";
1912 static const char __pyx_k_acosh_line_1655[] = "acosh (line 1655)";
1913 static const char __pyx_k_asinh_line_1732[] = "asinh (line 1732)";
1914 static const char __pyx_k_atanh_line_1797[] = "atanh (line 1797)";
1915 static const char __pyx_k_istpq_line_1899[] = "istpq (line 1899)";
1916 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1917 static const char __pyx_k_compare_line_492[] = "compare (line 492)";
1918 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1919 static const char __pyx_k_max_pos_line_513[] = "max_pos (line 513)";
1920 static const char __pyx_k_min_neg_line_504[] = "min_neg (line 504)";
1921 static const char __pyx_k_scalar_line_1343[] = "scalar (line 1343)";
1922 static const char __pyx_k_cga3std_line_1832[] = "cga3std (line 1832)";
1923 static const char __pyx_k_max_abs_line_1481[] = "max_abs (line 1481)";
1924 static const char __pyx_k_reverse_line_1420[] = "reverse (line 1420)";
1925 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1926 static const char __pyx_k_involute_line_1405[] = "involute (line 1405)";
1927 static const char __pyx_k_outer_pow_line_1517[] = "outer_pow (line 1517)";
1928 static const char __pyx_k_clifford_inv_line_926[] = "clifford.inv (line 926)";
1929 static const char __pyx_k_clifford_pow_line_980[] = "clifford.pow (line 980)";
1930 static const char __pyx_k_clifford_abs_line_1175[] = "clifford.abs (line 1175)";
1931 static const char __pyx_k_clifford_copy_line_556[] = "clifford.copy (line 556)";
1932 static const char __pyx_k_clifford_odd_line_1070[] = "clifford.odd (line 1070)";
1933 static const char __pyx_k_complexifier_line_1526[] = "complexifier (line 1526)";
1934 static const char __pyx_k_index_set_copy_line_65[] = "index_set.copy (line 65)";
1935 static const char __pyx_k_index_set_max_line_351[] = "index_set.max (line 351)";
1936 static const char __pyx_k_index_set_min_line_342[] = "index_set.min (line 342)";
1937 static const char __pyx_k_clifford_conj_line_1138[] = "clifford.conj (line 1138)";
1938 static const char __pyx_k_clifford_even_line_1061[] = "clifford.even (line 1061)";
1939 static const char __pyx_k_clifford_norm_line_1164[] = "clifford.norm (line 1164)";
1940 static const char __pyx_k_clifford_pure_line_1050[] = "clifford.pure (line 1050)";
1941 static const char __pyx_k_clifford_quad_line_1153[] = "clifford.quad (line 1153)";
1942 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ";
1943 static const char __pyx_k_clifford___or___line_939[] = "clifford.__or__ (line 939)";
1944 static const char __pyx_k_clifford_frame_line_1215[] = "clifford.frame (line 1215)";
1945 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1946 static const char __pyx_k_clifford_isnan_line_1206[] = "clifford.isnan (line 1206)";
1947 static const char __pyx_k_index_set_count_line_315[] = "index_set.count (line 315)";
1948 static const char __pyx_k_clifford___add___line_740[] = "clifford.__add__ (line 740)";
1949 static const char __pyx_k_clifford___and___line_836[] = "clifford.__and__ (line 836)";
1950 static const char __pyx_k_clifford___ior___line_950[] = "clifford.__ior__ (line 950)";
1951 static const char __pyx_k_clifford___mod___line_806[] = "clifford.__mod__ (line 806)";
1952 static const char __pyx_k_clifford___mul___line_780[] = "clifford.__mul__ (line 780)";
1953 static const char __pyx_k_clifford___neg___line_722[] = "clifford.__neg__ (line 722)";
1954 static const char __pyx_k_clifford___pos___line_731[] = "clifford.__pos__ (line 731)";
1955 static const char __pyx_k_clifford___pow___line_961[] = "clifford.__pow__ (line 961)";
1956 static const char __pyx_k_clifford___sub___line_760[] = "clifford.__sub__ (line 760)";
1957 static const char __pyx_k_clifford___xor___line_866[] = "clifford.__xor__ (line 866)";
1958 static const char __pyx_k_clifford_reframe_line_649[] = "clifford.reframe (line 649)";
1959 static const char __pyx_k_clifford_scalar_line_1039[] = "clifford.scalar (line 1039)";
1960 static const char __pyx_k_index_set___or___line_293[] = "index_set.__or__ (line 293)";
1961 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1962 static const char __pyx_k_random_clifford_line_1814[] = "random_clifford (line 1814)";
1963 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1964 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ";
1965 static const char __pyx_k_clifford___iadd___line_751[] = "clifford.__iadd__ (line 751)";
1966 static const char __pyx_k_clifford___iand___line_851[] = "clifford.__iand__ (line 851)";
1967 static const char __pyx_k_clifford___idiv___line_911[] = "clifford.__idiv__ (line 911)";
1968 static const char __pyx_k_clifford___imod___line_821[] = "clifford.__imod__ (line 821)";
1969 static const char __pyx_k_clifford___imul___line_793[] = "clifford.__imul__ (line 793)";
1970 static const char __pyx_k_clifford___isub___line_771[] = "clifford.__isub__ (line 771)";
1971 static const char __pyx_k_clifford___iter___line_638[] = "clifford.__iter__ (line 638)";
1972 static const char __pyx_k_clifford___ixor___line_881[] = "clifford.__ixor__ (line 881)";
1973 static const char __pyx_k_clifford___str___line_1235[] = "clifford.__str__ (line 1235)";
1974 static const char __pyx_k_clifford_max_abs_line_1184[] = "clifford.max_abs (line 1184)";
1975 static const char __pyx_k_clifford_reverse_line_1123[] = "clifford.reverse (line 1123)";
1976 static const char __pyx_k_index_set___and___line_271[] = "index_set.__and__ (line 271)";
1977 static const char __pyx_k_index_set___ior___line_304[] = "index_set.__ior__ (line 304)";
1978 static const char __pyx_k_index_set___str___line_395[] = "index_set.__str__ (line 395)";
1979 static const char __pyx_k_index_set___xor___line_249[] = "index_set.__xor__ (line 249)";
1980 static const char __pyx_k_clifford___call___line_1020[] = "clifford.__call__ (line 1020)";
1981 static const char __pyx_k_clifford___repr___line_1226[] = "clifford.__repr__ (line 1226)";
1982 static const char __pyx_k_clifford_involute_line_1107[] = "clifford.involute (line 1107)";
1983 static const char __pyx_k_index_set___iand___line_282[] = "index_set.__iand__ (line 282)";
1984 static const char __pyx_k_index_set___iter___line_229[] = "index_set.__iter__ (line 229)";
1985 static const char __pyx_k_index_set___ixor___line_260[] = "index_set.__ixor__ (line 260)";
1986 static const char __pyx_k_index_set___repr___line_384[] = "index_set.__repr__ (line 384)";
1987 static const char __pyx_k_clifford_outer_pow_line_1004[] = "clifford.outer_pow (line 1004)";
1988 static const char __pyx_k_clifford_truncated_line_1195[] = "clifford.truncated (line 1195)";
1989 static const char __pyx_k_index_set_count_neg_line_324[] = "index_set.count_neg (line 324)";
1990 static const char __pyx_k_index_set_count_pos_line_333[] = "index_set.count_pos (line 333)";
1991 static const char __pyx_k_clifford___getitem___line_707[] = "clifford.__getitem__ (line 707)";
1992 static const char __pyx_k_clifford___truediv___line_896[] = "clifford.__truediv__ (line 896)";
1993 static const char __pyx_k_index_set___invert___line_240[] = "index_set.__invert__ (line 240)";
1994 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 ";
1995 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 ";
1996 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 ";
1997 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 ";
1998 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 ";
1999 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 ";
2000 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 ";
2001 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 ";
2002 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 ";
2003 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 ";
2004 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 ";
2005 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 ";
2006 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 ";
2007 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 ";
2008 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 ";
2009 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 ";
2010 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 ";
2011 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 ";
2012 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 ";
2013 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 ";
2014 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 ";
2015 static const char __pyx_k_clifford_vector_part_line_1079[] = "clifford.vector_part (line 1079)";
2016 static const char __pyx_k_index_set___getitem___line_191[] = "index_set.__getitem__ (line 191)";
2017 static const char __pyx_k_index_set___setitem___line_179[] = "index_set.__setitem__ (line 179)";
2018 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 ";
2019 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 ";
2020 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 ";
2021 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 ";
2022 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 ";
2023 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 ";
2024 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 ";
2025 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 ";
2026 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 ";
2027 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 ";
2028 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 ";
2029 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 ";
2030 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 ";
2031 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 ";
2032 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 ";
2033 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 ";
2034 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 ";
2035 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 ";
2036 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 ";
2037 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 ";
2038 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 ";
2039 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 ";
2040 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 ";
2041 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 ";
2042 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 ";
2043 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 ";
2044 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 ";
2045 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 ";
2046 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 ";
2047 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 ";
2048 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 ";
2049 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 ";
2050 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 ";
2051 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 ";
2052 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 ";
2053 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 ";
2054 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 ";
2055 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 ";
2056 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 ";
2057 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 ";
2058 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 ";
2059 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 ";
2060 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 ";
2061 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 ";
2062 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 ";
2063 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 ";
2064 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 ";
2065 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 ";
2066 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 ";
2067 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 ";
2068 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 ";
2069 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 ";
2070 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 ";
2071 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 ";
2072 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 ";
2073 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 ";
2074 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 ";
2075 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 ";
2076 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 ";
2077 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 ";
2078 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 ";
2079 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 ";
2080 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 ";
2081 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 ";
2082 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 ";
2083 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 ";
2084 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 ";
2085 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 ";
2086  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 ";
2087  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 ";
2088  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2089  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 ";
2090  static const char __pyx_k_index_set_sign_of_mult_line_366[] = "index_set.sign_of_mult (line 366)";
2091  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 ";
2092  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2093  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2094  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 ";
2095  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 ";
2096  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 ";
2097  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 ";
2098  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 ";
2099  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1244)";
2100  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 406)";
2101  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 375)";
2102  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2103  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 ";
2104  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 ";
2105  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 ";
2106  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 ";
2107  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 ";
2108  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 ";
2109  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 ";
2110  static PyObject *__pyx_kp_u_;
2111  static PyObject *__pyx_kp_u_0_8_4;
2112  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2113  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2114  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2115  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2116  static PyObject *__pyx_kp_u_Cannot_initialize_clifford_objec;
2117  static PyObject *__pyx_kp_u_Cannot_initialize_index_set_obje;
2118  static PyObject *__pyx_kp_u_Cannot_reframe;
2119  static PyObject *__pyx_kp_u_Cannot_take_vector_part_of;
2120  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2121  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2122  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2123  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2124  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2125  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2126  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2127  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2128  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2129  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2130  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2131  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2132  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2133  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2134  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2135  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2136  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2137  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2138  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2139  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2140  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2141  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2142  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2143  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2144  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2145  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2146  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2147  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2148  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2149  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2150  static PyObject *__pyx_n_s_IndexError;
2151  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2152  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2153  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2154  static PyObject *__pyx_n_s_Integral;
2155  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2156  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2157  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2158  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2159  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2160  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2161  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2162  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2163  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2164  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2165  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2166  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2167  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2168  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2169  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2170  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2171  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2172  static PyObject *__pyx_n_s_NotImplemented;
2173  static PyObject *__pyx_kp_u_Not_applicable;
2174  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2175  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2176  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2177  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2178  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2179  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2180  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2181  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2182  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2183  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2184  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2185  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2186  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2187  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2188  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2189  static PyObject *__pyx_n_s_PyClical;
2190  static PyObject *__pyx_kp_s_PyClical_pyx;
2191  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2192  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2193  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2194  static PyObject *__pyx_n_s_Real;
2195  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2196  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2197  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2198  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2199  static PyObject *__pyx_n_s_RuntimeError;
2200  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2201  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2202  static PyObject *__pyx_n_s_Sequence;
2203  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2204  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2205  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2206  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2207  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2208  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2209  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2210  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2211  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2212  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2213  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2214  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2215  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2216  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2217  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2218  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2219  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2220  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2221  static PyObject *__pyx_kp_u_The_informal_string_representat;
2222  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2223  static PyObject *__pyx_kp_u_The_official_string_representat;
2224  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2225  static PyObject *__pyx_kp_u_This_comparison_operator_is_not;
2226  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2227  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2228  static PyObject *__pyx_n_s_TypeError;
2229  static PyObject *__pyx_kp_u_UTF_8;
2230  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2231  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2232  static PyObject *__pyx_n_s_ValueError;
2233  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2234  static PyObject *__pyx_kp_u__2;
2235  static PyObject *__pyx_kp_u__5;
2236  static PyObject *__pyx_kp_u__6;
2237  static PyObject *__pyx_kp_u__7;
2238  static PyObject *__pyx_kp_u__8;
2239  static PyObject *__pyx_kp_u__9;
2240  static PyObject *__pyx_n_s_abc;
2241  static PyObject *__pyx_kp_u_abs_line_1472;
2242  static PyObject *__pyx_n_s_acos;
2243  static PyObject *__pyx_kp_u_acos_line_1618;
2244  static PyObject *__pyx_n_s_acosh;
2245  static PyObject *__pyx_kp_u_acosh_line_1655;
2246  static PyObject *__pyx_kp_u_agc3_line_1843;
2247  static PyObject *__pyx_n_s_args;
2248  static PyObject *__pyx_kp_u_as_frame;
2249  static PyObject *__pyx_n_s_asin;
2250  static PyObject *__pyx_kp_u_asin_line_1697;
2251  static PyObject *__pyx_n_s_asinh;
2252  static PyObject *__pyx_kp_u_asinh_line_1732;
2253  static PyObject *__pyx_n_s_atan;
2254  static PyObject *__pyx_kp_u_atan_line_1768;
2255  static PyObject *__pyx_n_s_atanh;
2256  static PyObject *__pyx_kp_u_atanh_line_1797;
2257  static PyObject *__pyx_kp_u_cga3_line_1823;
2258  static PyObject *__pyx_kp_u_cga3std_line_1832;
2259  static PyObject *__pyx_n_s_cl;
2260  static PyObject *__pyx_n_s_clifford;
2261  static PyObject *__pyx_kp_u_clifford___add___line_740;
2262  static PyObject *__pyx_kp_u_clifford___and___line_836;
2263  static PyObject *__pyx_kp_u_clifford___call___line_1020;
2264  static PyObject *__pyx_kp_u_clifford___getitem___line_707;
2265  static PyObject *__pyx_kp_u_clifford___iadd___line_751;
2266  static PyObject *__pyx_kp_u_clifford___iand___line_851;
2267  static PyObject *__pyx_kp_u_clifford___idiv___line_911;
2268  static PyObject *__pyx_kp_u_clifford___imod___line_821;
2269  static PyObject *__pyx_kp_u_clifford___imul___line_793;
2270  static PyObject *__pyx_kp_u_clifford___ior___line_950;
2271  static PyObject *__pyx_kp_u_clifford___isub___line_771;
2272  static PyObject *__pyx_kp_u_clifford___iter___line_638;
2273  static PyObject *__pyx_kp_u_clifford___ixor___line_881;
2274  static PyObject *__pyx_kp_u_clifford___mod___line_806;
2275  static PyObject *__pyx_kp_u_clifford___mul___line_780;
2276  static PyObject *__pyx_kp_u_clifford___neg___line_722;
2277  static PyObject *__pyx_kp_u_clifford___or___line_939;
2278  static PyObject *__pyx_kp_u_clifford___pos___line_731;
2279  static PyObject *__pyx_kp_u_clifford___pow___line_961;
2280  static PyObject *__pyx_kp_u_clifford___repr___line_1226;
2281  static PyObject *__pyx_kp_u_clifford___str___line_1235;
2282  static PyObject *__pyx_kp_u_clifford___sub___line_760;
2283  static PyObject *__pyx_kp_u_clifford___truediv___line_896;
2284  static PyObject *__pyx_kp_u_clifford___xor___line_866;
2285  static PyObject *__pyx_kp_u_clifford_abs_line_1175;
2286  static PyObject *__pyx_kp_u_clifford_conj_line_1138;
2287  static PyObject *__pyx_kp_u_clifford_copy_line_556;
2288  static PyObject *__pyx_kp_u_clifford_even_line_1061;
2289  static PyObject *__pyx_kp_u_clifford_frame_line_1215;
2290  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2291  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2292  static PyObject *__pyx_kp_u_clifford_inv_line_926;
2293  static PyObject *__pyx_kp_u_clifford_involute_line_1107;
2294  static PyObject *__pyx_kp_u_clifford_isnan_line_1206;
2295  static PyObject *__pyx_kp_u_clifford_max_abs_line_1184;
2296  static PyObject *__pyx_kp_u_clifford_norm_line_1164;
2297  static PyObject *__pyx_kp_u_clifford_odd_line_1070;
2298  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1004;
2299  static PyObject *__pyx_kp_u_clifford_pow_line_980;
2300  static PyObject *__pyx_kp_u_clifford_pure_line_1050;
2301  static PyObject *__pyx_kp_u_clifford_quad_line_1153;
2302  static PyObject *__pyx_kp_u_clifford_reframe_line_649;
2303  static PyObject *__pyx_kp_u_clifford_reverse_line_1123;
2304  static PyObject *__pyx_kp_u_clifford_scalar_line_1039;
2305  static PyObject *__pyx_kp_u_clifford_truncated_line_1195;
2306  static PyObject *__pyx_kp_u_clifford_vector_part_line_1079;
2307  static PyObject *__pyx_n_s_cline_in_traceback;
2308  static PyObject *__pyx_n_s_close;
2309  static PyObject *__pyx_n_s_collections;
2310  static PyObject *__pyx_kp_u_compare_line_492;
2311  static PyObject *__pyx_kp_u_complexifier_line_1526;
2312  static PyObject *__pyx_n_s_conj;
2313  static PyObject *__pyx_kp_u_conj_line_1435;
2314  static PyObject *__pyx_n_s_copy;
2315  static PyObject *__pyx_n_s_cos;
2316  static PyObject *__pyx_kp_u_cos_line_1601;
2317  static PyObject *__pyx_n_s_cosh;
2318  static PyObject *__pyx_kp_u_cosh_line_1639;
2319  static PyObject *__pyx_n_s_doctest;
2320  static PyObject *__pyx_n_s_e;
2321  static PyObject *__pyx_kp_u_e_line_1886;
2322  static PyObject *__pyx_n_s_encode;
2323  static PyObject *__pyx_n_s_even;
2324  static PyObject *__pyx_kp_u_even_line_1387;
2325  static PyObject *__pyx_n_s_exp;
2326  static PyObject *__pyx_kp_u_exp_line_1564;
2327  static PyObject *__pyx_n_s_fill;
2328  static PyObject *__pyx_n_s_frm;
2329  static PyObject *__pyx_kp_u_from;
2330  static PyObject *__pyx_n_s_getstate;
2331  static PyObject *__pyx_n_s_grade;
2332  static PyObject *__pyx_n_s_i;
2333  static PyObject *__pyx_kp_u_imag_line_1365;
2334  static PyObject *__pyx_n_s_import;
2335  static PyObject *__pyx_n_s_index_set;
2336  static PyObject *__pyx_kp_u_index_set___and___line_271;
2337  static PyObject *__pyx_kp_u_index_set___getitem___line_191;
2338  static PyObject *__pyx_kp_u_index_set___iand___line_282;
2339  static PyObject *__pyx_kp_u_index_set___invert___line_240;
2340  static PyObject *__pyx_kp_u_index_set___ior___line_304;
2341  static PyObject *__pyx_n_s_index_set___iter;
2342  static PyObject *__pyx_kp_u_index_set___iter___line_229;
2343  static PyObject *__pyx_kp_u_index_set___ixor___line_260;
2344  static PyObject *__pyx_kp_u_index_set___or___line_293;
2345  static PyObject *__pyx_kp_u_index_set___repr___line_384;
2346  static PyObject *__pyx_kp_u_index_set___setitem___line_179;
2347  static PyObject *__pyx_kp_u_index_set___str___line_395;
2348  static PyObject *__pyx_kp_u_index_set___xor___line_249;
2349  static PyObject *__pyx_kp_u_index_set_copy_line_65;
2350  static PyObject *__pyx_kp_u_index_set_count_line_315;
2351  static PyObject *__pyx_kp_u_index_set_count_neg_line_324;
2352  static PyObject *__pyx_kp_u_index_set_count_pos_line_333;
2353  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2354  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2355  static PyObject *__pyx_kp_u_index_set_max_line_351;
2356  static PyObject *__pyx_kp_u_index_set_min_line_342;
2357  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_366;
2358  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2359  static PyObject *__pyx_n_s_inv;
2360  static PyObject *__pyx_kp_u_inv_line_1328;
2361  static PyObject *__pyx_kp_u_invalid;
2362  static PyObject *__pyx_kp_u_invalid_string;
2363  static PyObject *__pyx_n_s_involute;
2364  static PyObject *__pyx_kp_u_involute_line_1405;
2365  static PyObject *__pyx_n_s_ist;
2366  static PyObject *__pyx_n_s_istpq;
2367  static PyObject *__pyx_kp_u_istpq_line_1899;
2368  static PyObject *__pyx_n_s_iter;
2369  static PyObject *__pyx_n_s_ixt;
2370  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2371  static PyObject *__pyx_n_s_lhs;
2372  static PyObject *__pyx_n_s_log;
2373  static PyObject *__pyx_kp_u_log_line_1578;
2374  static PyObject *__pyx_n_s_m;
2375  static PyObject *__pyx_n_s_main;
2376  static PyObject *__pyx_n_u_main;
2377  static PyObject *__pyx_n_s_math;
2378  static PyObject *__pyx_n_s_max;
2379  static PyObject *__pyx_kp_u_max_abs_line_1481;
2380  static PyObject *__pyx_kp_u_max_pos_line_513;
2381  static PyObject *__pyx_n_s_min;
2382  static PyObject *__pyx_kp_u_min_neg_line_504;
2383  static PyObject *__pyx_n_s_name;
2384  static PyObject *__pyx_n_s_nbar3;
2385  static PyObject *__pyx_n_s_ninf3;
2386  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2387  static PyObject *__pyx_n_s_norm;
2388  static PyObject *__pyx_kp_u_norm_line_1461;
2389  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2390  static PyObject *__pyx_n_s_numbers;
2391  static PyObject *__pyx_n_s_obj;
2392  static PyObject *__pyx_n_s_odd;
2393  static PyObject *__pyx_kp_u_odd_line_1396;
2394  static PyObject *__pyx_n_s_other;
2395  static PyObject *__pyx_n_s_outer_pow;
2396  static PyObject *__pyx_kp_u_outer_pow_line_1517;
2397  static PyObject *__pyx_n_s_p;
2398  static PyObject *__pyx_n_s_pi;
2399  static PyObject *__pyx_n_s_pow;
2400  static PyObject *__pyx_kp_u_pow_line_1493;
2401  static PyObject *__pyx_n_s_pure;
2402  static PyObject *__pyx_kp_u_pure_line_1376;
2403  static PyObject *__pyx_n_s_pyx_vtable;
2404  static PyObject *__pyx_n_s_q;
2405  static PyObject *__pyx_n_s_quad;
2406  static PyObject *__pyx_kp_u_quad_line_1450;
2407  static PyObject *__pyx_kp_u_random_clifford_line_1814;
2408  static PyObject *__pyx_n_s_range;
2409  static PyObject *__pyx_kp_u_real_line_1354;
2410  static PyObject *__pyx_n_s_reduce;
2411  static PyObject *__pyx_n_s_reduce_cython;
2412  static PyObject *__pyx_n_s_reduce_ex;
2413  static PyObject *__pyx_n_s_reverse;
2414  static PyObject *__pyx_kp_u_reverse_line_1420;
2415  static PyObject *__pyx_n_s_rhs;
2416  static PyObject *__pyx_n_s_scalar;
2417  static PyObject *__pyx_n_s_scalar_epsilon;
2418  static PyObject *__pyx_kp_u_scalar_line_1343;
2419  static PyObject *__pyx_n_s_send;
2420  static PyObject *__pyx_n_s_setstate;
2421  static PyObject *__pyx_n_s_setstate_cython;
2422  static PyObject *__pyx_n_s_sin;
2423  static PyObject *__pyx_kp_u_sin_line_1678;
2424  static PyObject *__pyx_n_s_sinh;
2425  static PyObject *__pyx_kp_u_sinh_line_1718;
2426  static PyObject *__pyx_n_s_sqrt;
2427  static PyObject *__pyx_kp_u_sqrt_line_1541;
2428  static PyObject *__pyx_n_s_tan;
2429  static PyObject *__pyx_kp_u_tan_line_1751;
2430  static PyObject *__pyx_n_s_tanh;
2431  static PyObject *__pyx_kp_u_tanh_line_1785;
2432  static PyObject *__pyx_n_s_tau;
2433  static PyObject *__pyx_n_s_test;
2434  static PyObject *__pyx_n_s_test_2;
2435  static PyObject *__pyx_n_s_testmod;
2436  static PyObject *__pyx_n_s_throw;
2437  static PyObject *__pyx_kp_u_to_frame;
2438  static PyObject *__pyx_kp_u_using;
2439  static PyObject *__pyx_kp_u_using_invalid;
2440  static PyObject *__pyx_kp_u_value;
2441  static PyObject *__pyx_n_s_version;
2442  static PyObject *__pyx_n_s_xrange;
2443 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2444 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2445 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2446 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 */
2447 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 */
2448 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2449 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2450 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2451 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2452 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2453 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2454 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2455 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2456 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2457 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2458 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2459 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2460 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2461 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2462 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2463 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2464 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2465 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2466 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2467 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2468 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2469 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 */
2470 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2471 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2472 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2473 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2474 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2475 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 */
2476 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2477 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 */
2478 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2479 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2480 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 */
2481 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2482 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2483 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2484 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2485 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2486 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2487 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2488 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2489 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2490 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2491 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2492 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2493 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2494 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2495 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2496 static PyObject *__pyx_pf_8PyClical_8clifford_44__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2497 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2498 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2499 #endif
2500 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2501 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2502 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2503 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2504 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2505 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2506 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2507 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2508 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2509 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2510 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2511 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2512 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2513 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2514 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2515 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2516 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2517 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2518 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2519 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2520 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2521 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2522 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2523 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2524 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2525 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 */
2526 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2527 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2528 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2529 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2530 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2531 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2532 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2533 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2534 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2535 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2536 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2537 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2538 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2539 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2540 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2541 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2542 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2543 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2544 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2545 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2546 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2547 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2548 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2549 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2550 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2551 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2552 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2553 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2554 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2555 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2556 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2557 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2558 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2559 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 */
2560 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2561 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2562 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2563 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2564 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2565 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2566 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2567 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2568 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2569 static PyObject *__pyx_float_0_0;
2570 static PyObject *__pyx_float_1_0;
2571 static PyObject *__pyx_float_4_0;
2572 static PyObject *__pyx_float_8_0;
2573 static PyObject *__pyx_int_0;
2574 static PyObject *__pyx_int_1;
2575 static PyObject *__pyx_int_4;
2576 static PyObject *__pyx_int_neg_1;
2577 static PyObject *__pyx_tuple__3;
2578 static PyObject *__pyx_tuple__4;
2579 static PyObject *__pyx_tuple__10;
2580 static PyObject *__pyx_tuple__11;
2581 static PyObject *__pyx_tuple__12;
2582 static PyObject *__pyx_tuple__15;
2583 static PyObject *__pyx_tuple__16;
2584 static PyObject *__pyx_tuple__18;
2585 static PyObject *__pyx_tuple__20;
2586 static PyObject *__pyx_tuple__21;
2587 static PyObject *__pyx_tuple__22;
2588 static PyObject *__pyx_codeobj__13;
2589 static PyObject *__pyx_codeobj__14;
2590 static PyObject *__pyx_codeobj__17;
2591 static PyObject *__pyx_codeobj__19;
2592 static PyObject *__pyx_codeobj__23;
2593 /* Late includes */
2594 
2595 /* "PyClical.pyx":40
2596  * cdef class index_set
2597  *
2598  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2599  * """
2600  * Return the C++ IndexSet instance wrapped by index_set(obj).
2601  */
2602 
2603 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2604  IndexSet __pyx_r;
2605  __Pyx_RefNannyDeclarations
2606  PyObject *__pyx_t_1 = NULL;
2607  int __pyx_lineno = 0;
2608  const char *__pyx_filename = NULL;
2609  int __pyx_clineno = 0;
2610  __Pyx_RefNannySetupContext("toIndexSet", 0);
2611 
2612  /* "PyClical.pyx":44
2613  * Return the C++ IndexSet instance wrapped by index_set(obj).
2614  * """
2615  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2616  *
2617  * cdef class index_set:
2618  */
2619  __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)
2620  __Pyx_GOTREF(__pyx_t_1);
2621  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2622  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2623  goto __pyx_L0;
2624 
2625  /* "PyClical.pyx":40
2626  * cdef class index_set
2627  *
2628  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2629  * """
2630  * Return the C++ IndexSet instance wrapped by index_set(obj).
2631  */
2632 
2633  /* function exit code */
2634  __pyx_L1_error:;
2635  __Pyx_XDECREF(__pyx_t_1);
2636  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2637  __Pyx_pretend_to_initialize(&__pyx_r);
2638  __pyx_L0:;
2639  __Pyx_RefNannyFinishContext();
2640  return __pyx_r;
2641 }
2642 
2643 /* "PyClical.pyx":52
2644  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2645  *
2646  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2647  * """
2648  * Wrap an instance of the C++ class IndexSet.
2649  */
2650 
2651 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2652  PyObject *__pyx_r = NULL;
2653  __Pyx_RefNannyDeclarations
2654  __Pyx_RefNannySetupContext("wrap", 0);
2655 
2656  /* "PyClical.pyx":56
2657  * Wrap an instance of the C++ class IndexSet.
2658  * """
2659  * self.instance[0] = other # <<<<<<<<<<<<<<
2660  * return self
2661  *
2662  */
2663  (__pyx_v_self->instance[0]) = __pyx_v_other;
2664 
2665  /* "PyClical.pyx":57
2666  * """
2667  * self.instance[0] = other
2668  * return self # <<<<<<<<<<<<<<
2669  *
2670  * cdef inline IndexSet unwrap(index_set self):
2671  */
2672  __Pyx_XDECREF(__pyx_r);
2673  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2674  __pyx_r = ((PyObject *)__pyx_v_self);
2675  goto __pyx_L0;
2676 
2677  /* "PyClical.pyx":52
2678  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2679  *
2680  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2681  * """
2682  * Wrap an instance of the C++ class IndexSet.
2683  */
2684 
2685  /* function exit code */
2686  __pyx_L0:;
2687  __Pyx_XGIVEREF(__pyx_r);
2688  __Pyx_RefNannyFinishContext();
2689  return __pyx_r;
2690 }
2691 
2692 /* "PyClical.pyx":59
2693  * return self
2694  *
2695  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2696  * """
2697  * Return the wrapped C++ IndexSet instance.
2698  */
2699 
2700 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2701  IndexSet __pyx_r;
2702  __Pyx_RefNannyDeclarations
2703  __Pyx_RefNannySetupContext("unwrap", 0);
2704 
2705  /* "PyClical.pyx":63
2706  * Return the wrapped C++ IndexSet instance.
2707  * """
2708  * return self.instance[0] # <<<<<<<<<<<<<<
2709  *
2710  * cpdef copy(index_set self):
2711  */
2712  __pyx_r = (__pyx_v_self->instance[0]);
2713  goto __pyx_L0;
2714 
2715  /* "PyClical.pyx":59
2716  * return self
2717  *
2718  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2719  * """
2720  * Return the wrapped C++ IndexSet instance.
2721  */
2722 
2723  /* function exit code */
2724  __pyx_L0:;
2725  __Pyx_RefNannyFinishContext();
2726  return __pyx_r;
2727 }
2728 
2729 /* "PyClical.pyx":65
2730  * return self.instance[0]
2731  *
2732  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2733  * """
2734  * Copy this index_set object.
2735  */
2736 
2737 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2738 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2739  PyObject *__pyx_r = NULL;
2740  __Pyx_RefNannyDeclarations
2741  PyObject *__pyx_t_1 = NULL;
2742  PyObject *__pyx_t_2 = NULL;
2743  PyObject *__pyx_t_3 = NULL;
2744  PyObject *__pyx_t_4 = NULL;
2745  int __pyx_lineno = 0;
2746  const char *__pyx_filename = NULL;
2747  int __pyx_clineno = 0;
2748  __Pyx_RefNannySetupContext("copy", 0);
2749  /* Check if called by wrapper */
2750  if (unlikely(__pyx_skip_dispatch)) ;
2751  /* Check if overridden in Python */
2752  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)))) {
2753  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2754  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2755  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2756  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2757  #endif
2758  __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)
2759  __Pyx_GOTREF(__pyx_t_1);
2760  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2761  __Pyx_XDECREF(__pyx_r);
2762  __Pyx_INCREF(__pyx_t_1);
2763  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2764  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2765  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2766  if (likely(__pyx_t_4)) {
2767  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2768  __Pyx_INCREF(__pyx_t_4);
2769  __Pyx_INCREF(function);
2770  __Pyx_DECREF_SET(__pyx_t_3, function);
2771  }
2772  }
2773  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2774  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2775  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
2776  __Pyx_GOTREF(__pyx_t_2);
2777  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2778  __pyx_r = __pyx_t_2;
2779  __pyx_t_2 = 0;
2780  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2781  goto __pyx_L0;
2782  }
2783  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2784  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2785  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2786  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2787  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2788  }
2789  #endif
2790  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2791  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2792  }
2793  #endif
2794  }
2795 
2796  /* "PyClical.pyx":72
2797  * {1}
2798  * """
2799  * return index_set(self) # <<<<<<<<<<<<<<
2800  *
2801  * def __cinit__(self, other = 0):
2802  */
2803  __Pyx_XDECREF(__pyx_r);
2804  __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)
2805  __Pyx_GOTREF(__pyx_t_1);
2806  __pyx_r = __pyx_t_1;
2807  __pyx_t_1 = 0;
2808  goto __pyx_L0;
2809 
2810  /* "PyClical.pyx":65
2811  * return self.instance[0]
2812  *
2813  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2814  * """
2815  * Copy this index_set object.
2816  */
2817 
2818  /* function exit code */
2819  __pyx_L1_error:;
2820  __Pyx_XDECREF(__pyx_t_1);
2821  __Pyx_XDECREF(__pyx_t_2);
2822  __Pyx_XDECREF(__pyx_t_3);
2823  __Pyx_XDECREF(__pyx_t_4);
2824  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2825  __pyx_r = 0;
2826  __pyx_L0:;
2827  __Pyx_XGIVEREF(__pyx_r);
2828  __Pyx_RefNannyFinishContext();
2829  return __pyx_r;
2830 }
2831 
2832 /* Python wrapper */
2833 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2834 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 ";
2835 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2836  PyObject *__pyx_r = 0;
2837  __Pyx_RefNannyDeclarations
2838  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2839  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2840 
2841  /* function exit code */
2842  __Pyx_RefNannyFinishContext();
2843  return __pyx_r;
2844 }
2845 
2846 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2847  PyObject *__pyx_r = NULL;
2848  __Pyx_RefNannyDeclarations
2849  PyObject *__pyx_t_1 = NULL;
2850  int __pyx_lineno = 0;
2851  const char *__pyx_filename = NULL;
2852  int __pyx_clineno = 0;
2853  __Pyx_RefNannySetupContext("copy", 0);
2854  __Pyx_XDECREF(__pyx_r);
2855  __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)
2856  __Pyx_GOTREF(__pyx_t_1);
2857  __pyx_r = __pyx_t_1;
2858  __pyx_t_1 = 0;
2859  goto __pyx_L0;
2860 
2861  /* function exit code */
2862  __pyx_L1_error:;
2863  __Pyx_XDECREF(__pyx_t_1);
2864  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2865  __pyx_r = NULL;
2866  __pyx_L0:;
2867  __Pyx_XGIVEREF(__pyx_r);
2868  __Pyx_RefNannyFinishContext();
2869  return __pyx_r;
2870 }
2871 
2872 /* "PyClical.pyx":74
2873  * return index_set(self)
2874  *
2875  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2876  * """
2877  * Construct an object of type index_set.
2878  */
2879 
2880 /* Python wrapper */
2881 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2882 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2883  PyObject *__pyx_v_other = 0;
2884  int __pyx_lineno = 0;
2885  const char *__pyx_filename = NULL;
2886  int __pyx_clineno = 0;
2887  int __pyx_r;
2888  __Pyx_RefNannyDeclarations
2889  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2890  {
2891  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2892  PyObject* values[1] = {0};
2893  values[0] = ((PyObject *)__pyx_int_0);
2894  if (unlikely(__pyx_kwds)) {
2895  Py_ssize_t kw_args;
2896  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2897  switch (pos_args) {
2898  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2899  CYTHON_FALLTHROUGH;
2900  case 0: break;
2901  default: goto __pyx_L5_argtuple_error;
2902  }
2903  kw_args = PyDict_Size(__pyx_kwds);
2904  switch (pos_args) {
2905  case 0:
2906  if (kw_args > 0) {
2907  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2908  if (value) { values[0] = value; kw_args--; }
2909  }
2910  }
2911  if (unlikely(kw_args > 0)) {
2912  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 74, __pyx_L3_error)
2913  }
2914  } else {
2915  switch (PyTuple_GET_SIZE(__pyx_args)) {
2916  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2917  CYTHON_FALLTHROUGH;
2918  case 0: break;
2919  default: goto __pyx_L5_argtuple_error;
2920  }
2921  }
2922  __pyx_v_other = values[0];
2923  }
2924  goto __pyx_L4_argument_unpacking_done;
2925  __pyx_L5_argtuple_error:;
2926  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 74, __pyx_L3_error)
2927  __pyx_L3_error:;
2928  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2929  __Pyx_RefNannyFinishContext();
2930  return -1;
2931  __pyx_L4_argument_unpacking_done:;
2932  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2933 
2934  /* function exit code */
2935  __Pyx_RefNannyFinishContext();
2936  return __pyx_r;
2937 }
2938 
2939 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2940  PyObject *__pyx_v_error_msg_prefix = NULL;
2941  PyObject *__pyx_v_idx = NULL;
2942  PyObject *__pyx_v_bother = NULL;
2943  int __pyx_r;
2944  __Pyx_RefNannyDeclarations
2945  int __pyx_t_1;
2946  int __pyx_t_2;
2947  IndexSet *__pyx_t_3;
2948  PyObject *__pyx_t_4 = NULL;
2949  PyObject *__pyx_t_5 = NULL;
2950  int __pyx_t_6;
2951  int __pyx_t_7;
2952  PyObject *__pyx_t_8 = NULL;
2953  PyObject *__pyx_t_9 = NULL;
2954  PyObject *__pyx_t_10 = NULL;
2955  Py_ssize_t __pyx_t_11;
2956  PyObject *(*__pyx_t_12)(PyObject *);
2957  PyObject *__pyx_t_13 = NULL;
2958  PyObject *__pyx_t_14 = NULL;
2959  PyObject *__pyx_t_15 = NULL;
2960  PyObject *__pyx_t_16 = NULL;
2961  char *__pyx_t_17;
2962  int __pyx_lineno = 0;
2963  const char *__pyx_filename = NULL;
2964  int __pyx_clineno = 0;
2965  __Pyx_RefNannySetupContext("__cinit__", 0);
2966 
2967  /* "PyClical.pyx":93
2968  * {}
2969  * """
2970  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2971  * if isinstance(other, index_set):
2972  * self.instance = new IndexSet((<index_set>other).unwrap())
2973  */
2974  __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_index_set_obje);
2975  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_index_set_obje;
2976 
2977  /* "PyClical.pyx":94
2978  * """
2979  * error_msg_prefix = "Cannot initialize index_set object from"
2980  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2981  * self.instance = new IndexSet((<index_set>other).unwrap())
2982  * elif isinstance(other, numbers.Integral):
2983  */
2984  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2985  __pyx_t_2 = (__pyx_t_1 != 0);
2986  if (__pyx_t_2) {
2987 
2988  /* "PyClical.pyx":95
2989  * error_msg_prefix = "Cannot initialize index_set object from"
2990  * if isinstance(other, index_set):
2991  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2992  * elif isinstance(other, numbers.Integral):
2993  * self.instance = new IndexSet(<int>other)
2994  */
2995  try {
2996  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2997  } catch(...) {
2998  __Pyx_CppExn2PyErr();
2999  __PYX_ERR(0, 95, __pyx_L1_error)
3000  }
3001  __pyx_v_self->instance = __pyx_t_3;
3002 
3003  /* "PyClical.pyx":94
3004  * """
3005  * error_msg_prefix = "Cannot initialize index_set object from"
3006  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
3007  * self.instance = new IndexSet((<index_set>other).unwrap())
3008  * elif isinstance(other, numbers.Integral):
3009  */
3010  goto __pyx_L3;
3011  }
3012 
3013  /* "PyClical.pyx":96
3014  * if isinstance(other, index_set):
3015  * self.instance = new IndexSet((<index_set>other).unwrap())
3016  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
3017  * self.instance = new IndexSet(<int>other)
3018  * elif isinstance(other, (set, frozenset)):
3019  */
3020  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
3021  __Pyx_GOTREF(__pyx_t_4);
3022  __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)
3023  __Pyx_GOTREF(__pyx_t_5);
3024  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3025  __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)
3026  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3027  __pyx_t_1 = (__pyx_t_2 != 0);
3028  if (__pyx_t_1) {
3029 
3030  /* "PyClical.pyx":97
3031  * self.instance = new IndexSet((<index_set>other).unwrap())
3032  * elif isinstance(other, numbers.Integral):
3033  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
3034  * elif isinstance(other, (set, frozenset)):
3035  * try:
3036  */
3037  __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)
3038  try {
3039  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
3040  } catch(...) {
3041  __Pyx_CppExn2PyErr();
3042  __PYX_ERR(0, 97, __pyx_L1_error)
3043  }
3044  __pyx_v_self->instance = __pyx_t_3;
3045 
3046  /* "PyClical.pyx":96
3047  * if isinstance(other, index_set):
3048  * self.instance = new IndexSet((<index_set>other).unwrap())
3049  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
3050  * self.instance = new IndexSet(<int>other)
3051  * elif isinstance(other, (set, frozenset)):
3052  */
3053  goto __pyx_L3;
3054  }
3055 
3056  /* "PyClical.pyx":98
3057  * elif isinstance(other, numbers.Integral):
3058  * self.instance = new IndexSet(<int>other)
3059  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3060  * try:
3061  * self.instance = new IndexSet()
3062  */
3063  __pyx_t_2 = PySet_Check(__pyx_v_other);
3064  __pyx_t_7 = (__pyx_t_2 != 0);
3065  if (!__pyx_t_7) {
3066  } else {
3067  __pyx_t_1 = __pyx_t_7;
3068  goto __pyx_L4_bool_binop_done;
3069  }
3070  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
3071  __pyx_t_2 = (__pyx_t_7 != 0);
3072  __pyx_t_1 = __pyx_t_2;
3073  __pyx_L4_bool_binop_done:;
3074  __pyx_t_2 = (__pyx_t_1 != 0);
3075  if (__pyx_t_2) {
3076 
3077  /* "PyClical.pyx":99
3078  * self.instance = new IndexSet(<int>other)
3079  * elif isinstance(other, (set, frozenset)):
3080  * try: # <<<<<<<<<<<<<<
3081  * self.instance = new IndexSet()
3082  * for idx in other:
3083  */
3084  {
3085  __Pyx_PyThreadState_declare
3086  __Pyx_PyThreadState_assign
3087  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3088  __Pyx_XGOTREF(__pyx_t_8);
3089  __Pyx_XGOTREF(__pyx_t_9);
3090  __Pyx_XGOTREF(__pyx_t_10);
3091  /*try:*/ {
3092 
3093  /* "PyClical.pyx":100
3094  * elif isinstance(other, (set, frozenset)):
3095  * try:
3096  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3097  * for idx in other:
3098  * self[idx] = True
3099  */
3100  __pyx_t_3 = new IndexSet();
3101  __pyx_v_self->instance = __pyx_t_3;
3102 
3103  /* "PyClical.pyx":101
3104  * try:
3105  * self.instance = new IndexSet()
3106  * for idx in other: # <<<<<<<<<<<<<<
3107  * self[idx] = True
3108  * except IndexError:
3109  */
3110  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3111  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3112  __pyx_t_12 = NULL;
3113  } else {
3114  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L6_error)
3115  __Pyx_GOTREF(__pyx_t_5);
3116  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 101, __pyx_L6_error)
3117  }
3118  for (;;) {
3119  if (likely(!__pyx_t_12)) {
3120  if (likely(PyList_CheckExact(__pyx_t_5))) {
3121  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3122  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3123  __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)
3124  #else
3125  __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)
3126  __Pyx_GOTREF(__pyx_t_4);
3127  #endif
3128  } else {
3129  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3130  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3131  __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)
3132  #else
3133  __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)
3134  __Pyx_GOTREF(__pyx_t_4);
3135  #endif
3136  }
3137  } else {
3138  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3139  if (unlikely(!__pyx_t_4)) {
3140  PyObject* exc_type = PyErr_Occurred();
3141  if (exc_type) {
3142  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3143  else __PYX_ERR(0, 101, __pyx_L6_error)
3144  }
3145  break;
3146  }
3147  __Pyx_GOTREF(__pyx_t_4);
3148  }
3149  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3150  __pyx_t_4 = 0;
3151 
3152  /* "PyClical.pyx":102
3153  * self.instance = new IndexSet()
3154  * for idx in other:
3155  * self[idx] = True # <<<<<<<<<<<<<<
3156  * except IndexError:
3157  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3158  */
3159  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 102, __pyx_L6_error)
3160 
3161  /* "PyClical.pyx":101
3162  * try:
3163  * self.instance = new IndexSet()
3164  * for idx in other: # <<<<<<<<<<<<<<
3165  * self[idx] = True
3166  * except IndexError:
3167  */
3168  }
3169  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3170 
3171  /* "PyClical.pyx":99
3172  * self.instance = new IndexSet(<int>other)
3173  * elif isinstance(other, (set, frozenset)):
3174  * try: # <<<<<<<<<<<<<<
3175  * self.instance = new IndexSet()
3176  * for idx in other:
3177  */
3178  }
3179  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3180  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3181  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3182  goto __pyx_L11_try_end;
3183  __pyx_L6_error:;
3184  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3185  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3186 
3187  /* "PyClical.pyx":103
3188  * for idx in other:
3189  * self[idx] = True
3190  * except IndexError: # <<<<<<<<<<<<<<
3191  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3192  * except (RuntimeError, TypeError):
3193  */
3194  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3195  if (__pyx_t_6) {
3196  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3197  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 103, __pyx_L8_except_error)
3198  __Pyx_GOTREF(__pyx_t_5);
3199  __Pyx_GOTREF(__pyx_t_4);
3200  __Pyx_GOTREF(__pyx_t_13);
3201 
3202  /* "PyClical.pyx":104
3203  * self[idx] = True
3204  * except IndexError:
3205  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3206  * except (RuntimeError, TypeError):
3207  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3208  */
3209  __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)
3210  __Pyx_GOTREF(__pyx_t_14);
3211  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3212  __Pyx_GOTREF(__pyx_t_15);
3213  __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)
3214  __Pyx_GOTREF(__pyx_t_16);
3215  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3216  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3217  __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)
3218  __Pyx_GOTREF(__pyx_t_15);
3219  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3220  __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)
3221  __Pyx_GOTREF(__pyx_t_16);
3222  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3223  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3224  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3225  __PYX_ERR(0, 104, __pyx_L8_except_error)
3226  }
3227 
3228  /* "PyClical.pyx":105
3229  * except IndexError:
3230  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3231  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3232  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3233  * elif isinstance(other, str):
3234  */
3235  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3236  if (__pyx_t_6) {
3237  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3238  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 105, __pyx_L8_except_error)
3239  __Pyx_GOTREF(__pyx_t_13);
3240  __Pyx_GOTREF(__pyx_t_4);
3241  __Pyx_GOTREF(__pyx_t_5);
3242 
3243  /* "PyClical.pyx":106
3244  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3245  * except (RuntimeError, TypeError):
3246  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3247  * elif isinstance(other, str):
3248  * try:
3249  */
3250  __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)
3251  __Pyx_GOTREF(__pyx_t_16);
3252  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3253  __Pyx_GOTREF(__pyx_t_15);
3254  __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)
3255  __Pyx_GOTREF(__pyx_t_14);
3256  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3257  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3258  __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)
3259  __Pyx_GOTREF(__pyx_t_15);
3260  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3261  __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)
3262  __Pyx_GOTREF(__pyx_t_14);
3263  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3264  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3265  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3266  __PYX_ERR(0, 106, __pyx_L8_except_error)
3267  }
3268  goto __pyx_L8_except_error;
3269  __pyx_L8_except_error:;
3270 
3271  /* "PyClical.pyx":99
3272  * self.instance = new IndexSet(<int>other)
3273  * elif isinstance(other, (set, frozenset)):
3274  * try: # <<<<<<<<<<<<<<
3275  * self.instance = new IndexSet()
3276  * for idx in other:
3277  */
3278  __Pyx_XGIVEREF(__pyx_t_8);
3279  __Pyx_XGIVEREF(__pyx_t_9);
3280  __Pyx_XGIVEREF(__pyx_t_10);
3281  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3282  goto __pyx_L1_error;
3283  __pyx_L11_try_end:;
3284  }
3285 
3286  /* "PyClical.pyx":98
3287  * elif isinstance(other, numbers.Integral):
3288  * self.instance = new IndexSet(<int>other)
3289  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3290  * try:
3291  * self.instance = new IndexSet()
3292  */
3293  goto __pyx_L3;
3294  }
3295 
3296  /* "PyClical.pyx":107
3297  * except (RuntimeError, TypeError):
3298  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3299  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3300  * try:
3301  * bother = other.encode("UTF-8")
3302  */
3303  __pyx_t_2 = PyUnicode_Check(__pyx_v_other);
3304  __pyx_t_1 = (__pyx_t_2 != 0);
3305  if (likely(__pyx_t_1)) {
3306 
3307  /* "PyClical.pyx":108
3308  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3309  * elif isinstance(other, str):
3310  * try: # <<<<<<<<<<<<<<
3311  * bother = other.encode("UTF-8")
3312  * self.instance = new IndexSet(<char *>bother)
3313  */
3314  {
3315  __Pyx_PyThreadState_declare
3316  __Pyx_PyThreadState_assign
3317  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3318  __Pyx_XGOTREF(__pyx_t_10);
3319  __Pyx_XGOTREF(__pyx_t_9);
3320  __Pyx_XGOTREF(__pyx_t_8);
3321  /*try:*/ {
3322 
3323  /* "PyClical.pyx":109
3324  * elif isinstance(other, str):
3325  * try:
3326  * bother = other.encode("UTF-8") # <<<<<<<<<<<<<<
3327  * self.instance = new IndexSet(<char *>bother)
3328  * except RuntimeError:
3329  */
3330  __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)
3331  __Pyx_GOTREF(__pyx_t_4);
3332  __pyx_t_13 = NULL;
3333  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
3334  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
3335  if (likely(__pyx_t_13)) {
3336  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3337  __Pyx_INCREF(__pyx_t_13);
3338  __Pyx_INCREF(function);
3339  __Pyx_DECREF_SET(__pyx_t_4, function);
3340  }
3341  }
3342  __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);
3343  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3344  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L18_error)
3345  __Pyx_GOTREF(__pyx_t_5);
3346  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3347  __pyx_v_bother = __pyx_t_5;
3348  __pyx_t_5 = 0;
3349 
3350  /* "PyClical.pyx":110
3351  * try:
3352  * bother = other.encode("UTF-8")
3353  * self.instance = new IndexSet(<char *>bother) # <<<<<<<<<<<<<<
3354  * except RuntimeError:
3355  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3356  */
3357  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_bother); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L18_error)
3358  try {
3359  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3360  } catch(...) {
3361  __Pyx_CppExn2PyErr();
3362  __PYX_ERR(0, 110, __pyx_L18_error)
3363  }
3364  __pyx_v_self->instance = __pyx_t_3;
3365 
3366  /* "PyClical.pyx":108
3367  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3368  * elif isinstance(other, str):
3369  * try: # <<<<<<<<<<<<<<
3370  * bother = other.encode("UTF-8")
3371  * self.instance = new IndexSet(<char *>bother)
3372  */
3373  }
3374  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3375  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3376  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3377  goto __pyx_L23_try_end;
3378  __pyx_L18_error:;
3379  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3380  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3381  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3382  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3383  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3384  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3385 
3386  /* "PyClical.pyx":111
3387  * bother = other.encode("UTF-8")
3388  * self.instance = new IndexSet(<char *>bother)
3389  * except RuntimeError: # <<<<<<<<<<<<<<
3390  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3391  * else:
3392  */
3393  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3394  if (__pyx_t_6) {
3395  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3396  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 111, __pyx_L20_except_error)
3397  __Pyx_GOTREF(__pyx_t_5);
3398  __Pyx_GOTREF(__pyx_t_4);
3399  __Pyx_GOTREF(__pyx_t_13);
3400 
3401  /* "PyClical.pyx":112
3402  * self.instance = new IndexSet(<char *>bother)
3403  * except RuntimeError:
3404  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3405  * else:
3406  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3407  */
3408  __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)
3409  __Pyx_GOTREF(__pyx_t_14);
3410  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3411  __Pyx_GOTREF(__pyx_t_15);
3412  __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)
3413  __Pyx_GOTREF(__pyx_t_16);
3414  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3415  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3416  __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)
3417  __Pyx_GOTREF(__pyx_t_15);
3418  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3419  __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)
3420  __Pyx_GOTREF(__pyx_t_16);
3421  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3422  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3423  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3424  __PYX_ERR(0, 112, __pyx_L20_except_error)
3425  }
3426  goto __pyx_L20_except_error;
3427  __pyx_L20_except_error:;
3428 
3429  /* "PyClical.pyx":108
3430  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3431  * elif isinstance(other, str):
3432  * try: # <<<<<<<<<<<<<<
3433  * bother = other.encode("UTF-8")
3434  * self.instance = new IndexSet(<char *>bother)
3435  */
3436  __Pyx_XGIVEREF(__pyx_t_10);
3437  __Pyx_XGIVEREF(__pyx_t_9);
3438  __Pyx_XGIVEREF(__pyx_t_8);
3439  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3440  goto __pyx_L1_error;
3441  __pyx_L23_try_end:;
3442  }
3443 
3444  /* "PyClical.pyx":107
3445  * except (RuntimeError, TypeError):
3446  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3447  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3448  * try:
3449  * bother = other.encode("UTF-8")
3450  */
3451  goto __pyx_L3;
3452  }
3453 
3454  /* "PyClical.pyx":114
3455  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3456  * else:
3457  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3458  *
3459  * def __dealloc__(self):
3460  */
3461  /*else*/ {
3462  __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)
3463  __Pyx_GOTREF(__pyx_t_13);
3464  __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)
3465  __Pyx_GOTREF(__pyx_t_4);
3466  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
3467  __Pyx_GOTREF(__pyx_t_5);
3468  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3469  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3470  __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
3471  __Pyx_GOTREF(__pyx_t_4);
3472  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3473  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
3474  __Pyx_GOTREF(__pyx_t_5);
3475  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3476  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3477  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3478  __PYX_ERR(0, 114, __pyx_L1_error)
3479  }
3480  __pyx_L3:;
3481 
3482  /* "PyClical.pyx":74
3483  * return index_set(self)
3484  *
3485  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3486  * """
3487  * Construct an object of type index_set.
3488  */
3489 
3490  /* function exit code */
3491  __pyx_r = 0;
3492  goto __pyx_L0;
3493  __pyx_L1_error:;
3494  __Pyx_XDECREF(__pyx_t_4);
3495  __Pyx_XDECREF(__pyx_t_5);
3496  __Pyx_XDECREF(__pyx_t_13);
3497  __Pyx_XDECREF(__pyx_t_14);
3498  __Pyx_XDECREF(__pyx_t_15);
3499  __Pyx_XDECREF(__pyx_t_16);
3500  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3501  __pyx_r = -1;
3502  __pyx_L0:;
3503  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3504  __Pyx_XDECREF(__pyx_v_idx);
3505  __Pyx_XDECREF(__pyx_v_bother);
3506  __Pyx_RefNannyFinishContext();
3507  return __pyx_r;
3508 }
3509 
3510 /* "PyClical.pyx":116
3511  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3512  *
3513  * def __dealloc__(self): # <<<<<<<<<<<<<<
3514  * """
3515  * Clean up by deallocating the instance of C++ class IndexSet.
3516  */
3517 
3518 /* Python wrapper */
3519 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3520 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3521  __Pyx_RefNannyDeclarations
3522  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3523  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3524 
3525  /* function exit code */
3526  __Pyx_RefNannyFinishContext();
3527 }
3528 
3529 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3530  __Pyx_RefNannyDeclarations
3531  __Pyx_RefNannySetupContext("__dealloc__", 0);
3532 
3533  /* "PyClical.pyx":120
3534  * Clean up by deallocating the instance of C++ class IndexSet.
3535  * """
3536  * del self.instance # <<<<<<<<<<<<<<
3537  *
3538  * def __richcmp__(lhs, rhs, int op):
3539  */
3540  delete __pyx_v_self->instance;
3541 
3542  /* "PyClical.pyx":116
3543  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3544  *
3545  * def __dealloc__(self): # <<<<<<<<<<<<<<
3546  * """
3547  * Clean up by deallocating the instance of C++ class IndexSet.
3548  */
3549 
3550  /* function exit code */
3551  __Pyx_RefNannyFinishContext();
3552 }
3553 
3554 /* "PyClical.pyx":122
3555  * del self.instance
3556  *
3557  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3558  * """
3559  * Compare two objects of class index_set.
3560  */
3561 
3562 /* Python wrapper */
3563 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3564 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3565  PyObject *__pyx_r = 0;
3566  __Pyx_RefNannyDeclarations
3567  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3568  __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));
3569 
3570  /* function exit code */
3571  __Pyx_RefNannyFinishContext();
3572  return __pyx_r;
3573 }
3574 
3575 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) {
3576  PyObject *__pyx_v_eq = NULL;
3577  PyObject *__pyx_v_lt = NULL;
3578  PyObject *__pyx_r = NULL;
3579  __Pyx_RefNannyDeclarations
3580  int __pyx_t_1;
3581  int __pyx_t_2;
3582  int __pyx_t_3;
3583  PyObject *__pyx_t_4 = NULL;
3584  int __pyx_lineno = 0;
3585  const char *__pyx_filename = NULL;
3586  int __pyx_clineno = 0;
3587  __Pyx_RefNannySetupContext("__richcmp__", 0);
3588 
3589  /* "PyClical.pyx":143
3590  * False
3591  * """
3592  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3593  * eq = bool(lhs is rhs)
3594  * if op == 2: # ==
3595  */
3596  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3597  __pyx_t_3 = (__pyx_t_2 != 0);
3598  if (!__pyx_t_3) {
3599  } else {
3600  __pyx_t_1 = __pyx_t_3;
3601  goto __pyx_L4_bool_binop_done;
3602  }
3603  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3604  __pyx_t_2 = (__pyx_t_3 != 0);
3605  __pyx_t_1 = __pyx_t_2;
3606  __pyx_L4_bool_binop_done:;
3607  if (__pyx_t_1) {
3608 
3609  /* "PyClical.pyx":144
3610  * """
3611  * if (lhs is None) or (rhs is None):
3612  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3613  * if op == 2: # ==
3614  * return eq
3615  */
3616  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3617  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
3618  __Pyx_GOTREF(__pyx_t_4);
3619  __pyx_v_eq = __pyx_t_4;
3620  __pyx_t_4 = 0;
3621 
3622  /* "PyClical.pyx":145
3623  * if (lhs is None) or (rhs is None):
3624  * eq = bool(lhs is rhs)
3625  * if op == 2: # == # <<<<<<<<<<<<<<
3626  * return eq
3627  * elif op == 3: # !=
3628  */
3629  switch (__pyx_v_op) {
3630  case 2:
3631 
3632  /* "PyClical.pyx":146
3633  * eq = bool(lhs is rhs)
3634  * if op == 2: # ==
3635  * return eq # <<<<<<<<<<<<<<
3636  * elif op == 3: # !=
3637  * return not eq
3638  */
3639  __Pyx_XDECREF(__pyx_r);
3640  __Pyx_INCREF(__pyx_v_eq);
3641  __pyx_r = __pyx_v_eq;
3642  goto __pyx_L0;
3643 
3644  /* "PyClical.pyx":145
3645  * if (lhs is None) or (rhs is None):
3646  * eq = bool(lhs is rhs)
3647  * if op == 2: # == # <<<<<<<<<<<<<<
3648  * return eq
3649  * elif op == 3: # !=
3650  */
3651  break;
3652  case 3:
3653 
3654  /* "PyClical.pyx":148
3655  * return eq
3656  * elif op == 3: # !=
3657  * return not eq # <<<<<<<<<<<<<<
3658  * else:
3659  * if op == 0: # <
3660  */
3661  __Pyx_XDECREF(__pyx_r);
3662  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 148, __pyx_L1_error)
3663  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
3664  __Pyx_GOTREF(__pyx_t_4);
3665  __pyx_r = __pyx_t_4;
3666  __pyx_t_4 = 0;
3667  goto __pyx_L0;
3668 
3669  /* "PyClical.pyx":147
3670  * if op == 2: # ==
3671  * return eq
3672  * elif op == 3: # != # <<<<<<<<<<<<<<
3673  * return not eq
3674  * else:
3675  */
3676  break;
3677  default:
3678 
3679  /* "PyClical.pyx":150
3680  * return not eq
3681  * else:
3682  * if op == 0: # < # <<<<<<<<<<<<<<
3683  * return False
3684  * elif op == 1: # <=
3685  */
3686  switch (__pyx_v_op) {
3687  case 0:
3688 
3689  /* "PyClical.pyx":151
3690  * else:
3691  * if op == 0: # <
3692  * return False # <<<<<<<<<<<<<<
3693  * elif op == 1: # <=
3694  * return eq
3695  */
3696  __Pyx_XDECREF(__pyx_r);
3697  __Pyx_INCREF(Py_False);
3698  __pyx_r = Py_False;
3699  goto __pyx_L0;
3700 
3701  /* "PyClical.pyx":150
3702  * return not eq
3703  * else:
3704  * if op == 0: # < # <<<<<<<<<<<<<<
3705  * return False
3706  * elif op == 1: # <=
3707  */
3708  break;
3709  case 1:
3710 
3711  /* "PyClical.pyx":153
3712  * return False
3713  * elif op == 1: # <=
3714  * return eq # <<<<<<<<<<<<<<
3715  * elif op == 4: # >
3716  * return False
3717  */
3718  __Pyx_XDECREF(__pyx_r);
3719  __Pyx_INCREF(__pyx_v_eq);
3720  __pyx_r = __pyx_v_eq;
3721  goto __pyx_L0;
3722 
3723  /* "PyClical.pyx":152
3724  * if op == 0: # <
3725  * return False
3726  * elif op == 1: # <= # <<<<<<<<<<<<<<
3727  * return eq
3728  * elif op == 4: # >
3729  */
3730  break;
3731  case 4:
3732 
3733  /* "PyClical.pyx":155
3734  * return eq
3735  * elif op == 4: # >
3736  * return False # <<<<<<<<<<<<<<
3737  * elif op == 5: # >=
3738  * return eq
3739  */
3740  __Pyx_XDECREF(__pyx_r);
3741  __Pyx_INCREF(Py_False);
3742  __pyx_r = Py_False;
3743  goto __pyx_L0;
3744 
3745  /* "PyClical.pyx":154
3746  * elif op == 1: # <=
3747  * return eq
3748  * elif op == 4: # > # <<<<<<<<<<<<<<
3749  * return False
3750  * elif op == 5: # >=
3751  */
3752  break;
3753  case 5:
3754 
3755  /* "PyClical.pyx":157
3756  * return False
3757  * elif op == 5: # >=
3758  * return eq # <<<<<<<<<<<<<<
3759  * else:
3760  * return NotImplemented
3761  */
3762  __Pyx_XDECREF(__pyx_r);
3763  __Pyx_INCREF(__pyx_v_eq);
3764  __pyx_r = __pyx_v_eq;
3765  goto __pyx_L0;
3766 
3767  /* "PyClical.pyx":156
3768  * elif op == 4: # >
3769  * return False
3770  * elif op == 5: # >= # <<<<<<<<<<<<<<
3771  * return eq
3772  * else:
3773  */
3774  break;
3775  default:
3776 
3777  /* "PyClical.pyx":159
3778  * return eq
3779  * else:
3780  * return NotImplemented # <<<<<<<<<<<<<<
3781  * else:
3782  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3783  */
3784  __Pyx_XDECREF(__pyx_r);
3785  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3786  __pyx_r = __pyx_builtin_NotImplemented;
3787  goto __pyx_L0;
3788  break;
3789  }
3790  break;
3791  }
3792 
3793  /* "PyClical.pyx":143
3794  * False
3795  * """
3796  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3797  * eq = bool(lhs is rhs)
3798  * if op == 2: # ==
3799  */
3800  }
3801 
3802  /* "PyClical.pyx":161
3803  * return NotImplemented
3804  * else:
3805  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3806  * if op == 2: # ==
3807  * return eq
3808  */
3809  /*else*/ {
3810  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3811  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
3812  __Pyx_GOTREF(__pyx_t_4);
3813  __pyx_v_eq = __pyx_t_4;
3814  __pyx_t_4 = 0;
3815 
3816  /* "PyClical.pyx":162
3817  * else:
3818  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3819  * if op == 2: # == # <<<<<<<<<<<<<<
3820  * return eq
3821  * elif op == 3: # !=
3822  */
3823  switch (__pyx_v_op) {
3824  case 2:
3825 
3826  /* "PyClical.pyx":163
3827  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3828  * if op == 2: # ==
3829  * return eq # <<<<<<<<<<<<<<
3830  * elif op == 3: # !=
3831  * return not eq
3832  */
3833  __Pyx_XDECREF(__pyx_r);
3834  __Pyx_INCREF(__pyx_v_eq);
3835  __pyx_r = __pyx_v_eq;
3836  goto __pyx_L0;
3837 
3838  /* "PyClical.pyx":162
3839  * else:
3840  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3841  * if op == 2: # == # <<<<<<<<<<<<<<
3842  * return eq
3843  * elif op == 3: # !=
3844  */
3845  break;
3846  case 3:
3847 
3848  /* "PyClical.pyx":165
3849  * return eq
3850  * elif op == 3: # !=
3851  * return not eq # <<<<<<<<<<<<<<
3852  * else:
3853  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3854  */
3855  __Pyx_XDECREF(__pyx_r);
3856  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 165, __pyx_L1_error)
3857  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3858  __Pyx_GOTREF(__pyx_t_4);
3859  __pyx_r = __pyx_t_4;
3860  __pyx_t_4 = 0;
3861  goto __pyx_L0;
3862 
3863  /* "PyClical.pyx":164
3864  * if op == 2: # ==
3865  * return eq
3866  * elif op == 3: # != # <<<<<<<<<<<<<<
3867  * return not eq
3868  * else:
3869  */
3870  break;
3871  default:
3872 
3873  /* "PyClical.pyx":167
3874  * return not eq
3875  * else:
3876  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3877  * if op == 0: # <
3878  * return lt
3879  */
3880  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3881  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
3882  __Pyx_GOTREF(__pyx_t_4);
3883  __pyx_v_lt = __pyx_t_4;
3884  __pyx_t_4 = 0;
3885 
3886  /* "PyClical.pyx":168
3887  * else:
3888  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3889  * if op == 0: # < # <<<<<<<<<<<<<<
3890  * return lt
3891  * elif op == 1: # <=
3892  */
3893  switch (__pyx_v_op) {
3894  case 0:
3895 
3896  /* "PyClical.pyx":169
3897  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3898  * if op == 0: # <
3899  * return lt # <<<<<<<<<<<<<<
3900  * elif op == 1: # <=
3901  * return lt or eq
3902  */
3903  __Pyx_XDECREF(__pyx_r);
3904  __Pyx_INCREF(__pyx_v_lt);
3905  __pyx_r = __pyx_v_lt;
3906  goto __pyx_L0;
3907 
3908  /* "PyClical.pyx":168
3909  * else:
3910  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3911  * if op == 0: # < # <<<<<<<<<<<<<<
3912  * return lt
3913  * elif op == 1: # <=
3914  */
3915  break;
3916  case 1:
3917 
3918  /* "PyClical.pyx":171
3919  * return lt
3920  * elif op == 1: # <=
3921  * return lt or eq # <<<<<<<<<<<<<<
3922  * elif op == 4: # >
3923  * return not (lt or eq)
3924  */
3925  __Pyx_XDECREF(__pyx_r);
3926  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3927  if (!__pyx_t_1) {
3928  } else {
3929  __Pyx_INCREF(__pyx_v_lt);
3930  __pyx_t_4 = __pyx_v_lt;
3931  goto __pyx_L6_bool_binop_done;
3932  }
3933  __Pyx_INCREF(__pyx_v_eq);
3934  __pyx_t_4 = __pyx_v_eq;
3935  __pyx_L6_bool_binop_done:;
3936  __pyx_r = __pyx_t_4;
3937  __pyx_t_4 = 0;
3938  goto __pyx_L0;
3939 
3940  /* "PyClical.pyx":170
3941  * if op == 0: # <
3942  * return lt
3943  * elif op == 1: # <= # <<<<<<<<<<<<<<
3944  * return lt or eq
3945  * elif op == 4: # >
3946  */
3947  break;
3948  case 4:
3949 
3950  /* "PyClical.pyx":173
3951  * return lt or eq
3952  * elif op == 4: # >
3953  * return not (lt or eq) # <<<<<<<<<<<<<<
3954  * elif op == 5: # >=
3955  * return not lt
3956  */
3957  __Pyx_XDECREF(__pyx_r);
3958  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3959  if (!__pyx_t_2) {
3960  } else {
3961  __pyx_t_1 = __pyx_t_2;
3962  goto __pyx_L8_bool_binop_done;
3963  }
3964  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3965  __pyx_t_1 = __pyx_t_2;
3966  __pyx_L8_bool_binop_done:;
3967  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3968  __Pyx_GOTREF(__pyx_t_4);
3969  __pyx_r = __pyx_t_4;
3970  __pyx_t_4 = 0;
3971  goto __pyx_L0;
3972 
3973  /* "PyClical.pyx":172
3974  * elif op == 1: # <=
3975  * return lt or eq
3976  * elif op == 4: # > # <<<<<<<<<<<<<<
3977  * return not (lt or eq)
3978  * elif op == 5: # >=
3979  */
3980  break;
3981  case 5:
3982 
3983  /* "PyClical.pyx":175
3984  * return not (lt or eq)
3985  * elif op == 5: # >=
3986  * return not lt # <<<<<<<<<<<<<<
3987  * else:
3988  * return NotImplemented
3989  */
3990  __Pyx_XDECREF(__pyx_r);
3991  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 175, __pyx_L1_error)
3992  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
3993  __Pyx_GOTREF(__pyx_t_4);
3994  __pyx_r = __pyx_t_4;
3995  __pyx_t_4 = 0;
3996  goto __pyx_L0;
3997 
3998  /* "PyClical.pyx":174
3999  * elif op == 4: # >
4000  * return not (lt or eq)
4001  * elif op == 5: # >= # <<<<<<<<<<<<<<
4002  * return not lt
4003  * else:
4004  */
4005  break;
4006  default:
4007 
4008  /* "PyClical.pyx":177
4009  * return not lt
4010  * else:
4011  * return NotImplemented # <<<<<<<<<<<<<<
4012  *
4013  * def __setitem__(self, idx, val):
4014  */
4015  __Pyx_XDECREF(__pyx_r);
4016  __Pyx_INCREF(__pyx_builtin_NotImplemented);
4017  __pyx_r = __pyx_builtin_NotImplemented;
4018  goto __pyx_L0;
4019  break;
4020  }
4021  break;
4022  }
4023  }
4024 
4025  /* "PyClical.pyx":122
4026  * del self.instance
4027  *
4028  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
4029  * """
4030  * Compare two objects of class index_set.
4031  */
4032 
4033  /* function exit code */
4034  __pyx_L1_error:;
4035  __Pyx_XDECREF(__pyx_t_4);
4036  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4037  __pyx_r = NULL;
4038  __pyx_L0:;
4039  __Pyx_XDECREF(__pyx_v_eq);
4040  __Pyx_XDECREF(__pyx_v_lt);
4041  __Pyx_XGIVEREF(__pyx_r);
4042  __Pyx_RefNannyFinishContext();
4043  return __pyx_r;
4044 }
4045 
4046 /* "PyClical.pyx":179
4047  * return NotImplemented
4048  *
4049  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4050  * """
4051  * Set the value of an index_set object at index idx to value val.
4052  */
4053 
4054 /* Python wrapper */
4055 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
4056 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 ";
4057 #if CYTHON_COMPILING_IN_CPYTHON
4058 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
4059 #endif
4060 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
4061  int __pyx_r;
4062  __Pyx_RefNannyDeclarations
4063  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
4064  __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));
4065 
4066  /* function exit code */
4067  __Pyx_RefNannyFinishContext();
4068  return __pyx_r;
4069 }
4070 
4071 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) {
4072  int __pyx_r;
4073  __Pyx_RefNannyDeclarations
4074  int __pyx_t_1;
4075  int __pyx_t_2;
4076  int __pyx_lineno = 0;
4077  const char *__pyx_filename = NULL;
4078  int __pyx_clineno = 0;
4079  __Pyx_RefNannySetupContext("__setitem__", 0);
4080 
4081  /* "PyClical.pyx":188
4082  * {2}
4083  * """
4084  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
4085  * return
4086  *
4087  */
4088  __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)
4089  __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)
4090  try {
4091  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
4092  } catch(...) {
4093  __Pyx_CppExn2PyErr();
4094  __PYX_ERR(0, 188, __pyx_L1_error)
4095  }
4096 
4097  /* "PyClical.pyx":189
4098  * """
4099  * self.instance.set(idx, val)
4100  * return # <<<<<<<<<<<<<<
4101  *
4102  * def __getitem__(self, idx):
4103  */
4104  __pyx_r = 0;
4105  goto __pyx_L0;
4106 
4107  /* "PyClical.pyx":179
4108  * return NotImplemented
4109  *
4110  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4111  * """
4112  * Set the value of an index_set object at index idx to value val.
4113  */
4114 
4115  /* function exit code */
4116  __pyx_L1_error:;
4117  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4118  __pyx_r = -1;
4119  __pyx_L0:;
4120  __Pyx_RefNannyFinishContext();
4121  return __pyx_r;
4122 }
4123 
4124 /* "PyClical.pyx":191
4125  * return
4126  *
4127  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4128  * """
4129  * Get the value of an index_set object at an index.
4130  */
4131 
4132 /* Python wrapper */
4133 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4134 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 ";
4135 #if CYTHON_COMPILING_IN_CPYTHON
4136 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4137 #endif
4138 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4139  PyObject *__pyx_r = 0;
4140  __Pyx_RefNannyDeclarations
4141  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4142  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4143 
4144  /* function exit code */
4145  __Pyx_RefNannyFinishContext();
4146  return __pyx_r;
4147 }
4148 
4149 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4150  PyObject *__pyx_r = NULL;
4151  __Pyx_RefNannyDeclarations
4152  int __pyx_t_1;
4153  PyObject *__pyx_t_2 = NULL;
4154  int __pyx_lineno = 0;
4155  const char *__pyx_filename = NULL;
4156  int __pyx_clineno = 0;
4157  __Pyx_RefNannySetupContext("__getitem__", 0);
4158 
4159  /* "PyClical.pyx":208
4160  * False
4161  * """
4162  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4163  *
4164  * def __contains__(self, idx):
4165  */
4166  __Pyx_XDECREF(__pyx_r);
4167  __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)
4168  __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)
4169  __Pyx_GOTREF(__pyx_t_2);
4170  __pyx_r = __pyx_t_2;
4171  __pyx_t_2 = 0;
4172  goto __pyx_L0;
4173 
4174  /* "PyClical.pyx":191
4175  * return
4176  *
4177  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4178  * """
4179  * Get the value of an index_set object at an index.
4180  */
4181 
4182  /* function exit code */
4183  __pyx_L1_error:;
4184  __Pyx_XDECREF(__pyx_t_2);
4185  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4186  __pyx_r = NULL;
4187  __pyx_L0:;
4188  __Pyx_XGIVEREF(__pyx_r);
4189  __Pyx_RefNannyFinishContext();
4190  return __pyx_r;
4191 }
4192 
4193 /* "PyClical.pyx":210
4194  * return self.instance.getitem(idx)
4195  *
4196  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4197  * """
4198  * Check that an index_set object contains the index idx: idx in self.
4199  */
4200 
4201 /* Python wrapper */
4202 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4203 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 ";
4204 #if CYTHON_COMPILING_IN_CPYTHON
4205 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4206 #endif
4207 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4208  int __pyx_r;
4209  __Pyx_RefNannyDeclarations
4210  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4211  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4212 
4213  /* function exit code */
4214  __Pyx_RefNannyFinishContext();
4215  return __pyx_r;
4216 }
4217 
4218 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4219  int __pyx_r;
4220  __Pyx_RefNannyDeclarations
4221  int __pyx_t_1;
4222  int __pyx_lineno = 0;
4223  const char *__pyx_filename = NULL;
4224  int __pyx_clineno = 0;
4225  __Pyx_RefNannySetupContext("__contains__", 0);
4226 
4227  /* "PyClical.pyx":227
4228  * False
4229  * """
4230  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4231  *
4232  * def __iter__(self):
4233  */
4234  __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)
4235  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4236  goto __pyx_L0;
4237 
4238  /* "PyClical.pyx":210
4239  * return self.instance.getitem(idx)
4240  *
4241  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4242  * """
4243  * Check that an index_set object contains the index idx: idx in self.
4244  */
4245 
4246  /* function exit code */
4247  __pyx_L1_error:;
4248  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4249  __pyx_r = -1;
4250  __pyx_L0:;
4251  __Pyx_RefNannyFinishContext();
4252  return __pyx_r;
4253 }
4254 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4255 
4256 /* "PyClical.pyx":229
4257  * return self.instance.getitem(idx)
4258  *
4259  * def __iter__(self): # <<<<<<<<<<<<<<
4260  * """
4261  * Iterate over the indices of an index_set.
4262  */
4263 
4264 /* Python wrapper */
4265 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4266 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 ";
4267 #if CYTHON_COMPILING_IN_CPYTHON
4268 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4269 #endif
4270 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4271  PyObject *__pyx_r = 0;
4272  __Pyx_RefNannyDeclarations
4273  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4274  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4275 
4276  /* function exit code */
4277  __Pyx_RefNannyFinishContext();
4278  return __pyx_r;
4279 }
4280 
4281 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4282  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4283  PyObject *__pyx_r = NULL;
4284  __Pyx_RefNannyDeclarations
4285  int __pyx_lineno = 0;
4286  const char *__pyx_filename = NULL;
4287  int __pyx_clineno = 0;
4288  __Pyx_RefNannySetupContext("__iter__", 0);
4289  __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);
4290  if (unlikely(!__pyx_cur_scope)) {
4291  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4292  __Pyx_INCREF(Py_None);
4293  __PYX_ERR(0, 229, __pyx_L1_error)
4294  } else {
4295  __Pyx_GOTREF(__pyx_cur_scope);
4296  }
4297  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4298  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4299  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4300  {
4301  __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)
4302  __Pyx_DECREF(__pyx_cur_scope);
4303  __Pyx_RefNannyFinishContext();
4304  return (PyObject *) gen;
4305  }
4306 
4307  /* function exit code */
4308  __pyx_L1_error:;
4309  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4310  __pyx_r = NULL;
4311  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4312  __Pyx_XGIVEREF(__pyx_r);
4313  __Pyx_RefNannyFinishContext();
4314  return __pyx_r;
4315 }
4316 
4317 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4318 {
4319  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4320  PyObject *__pyx_r = NULL;
4321  PyObject *__pyx_t_1 = NULL;
4322  PyObject *__pyx_t_2 = NULL;
4323  PyObject *__pyx_t_3 = NULL;
4324  PyObject *__pyx_t_4 = NULL;
4325  Py_ssize_t __pyx_t_5;
4326  PyObject *(*__pyx_t_6)(PyObject *);
4327  int __pyx_t_7;
4328  int __pyx_t_8;
4329  int __pyx_lineno = 0;
4330  const char *__pyx_filename = NULL;
4331  int __pyx_clineno = 0;
4332  __Pyx_RefNannyDeclarations
4333  __Pyx_RefNannySetupContext("__iter__", 0);
4334  switch (__pyx_generator->resume_label) {
4335  case 0: goto __pyx_L3_first_run;
4336  case 1: goto __pyx_L7_resume_from_yield;
4337  default: /* CPython raises the right error here */
4338  __Pyx_RefNannyFinishContext();
4339  return NULL;
4340  }
4341  __pyx_L3_first_run:;
4342  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 229, __pyx_L1_error)
4343 
4344  /* "PyClical.pyx":236
4345  * -3,4,7,
4346  * """
4347  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4348  * if idx in self:
4349  * yield idx
4350  */
4351  __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)
4352  __Pyx_GOTREF(__pyx_t_2);
4353  __pyx_t_3 = NULL;
4354  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4355  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4356  if (likely(__pyx_t_3)) {
4357  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4358  __Pyx_INCREF(__pyx_t_3);
4359  __Pyx_INCREF(function);
4360  __Pyx_DECREF_SET(__pyx_t_2, function);
4361  }
4362  }
4363  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4364  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4365  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
4366  __Pyx_GOTREF(__pyx_t_1);
4367  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4368  __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)
4369  __Pyx_GOTREF(__pyx_t_3);
4370  __pyx_t_4 = NULL;
4371  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4372  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4373  if (likely(__pyx_t_4)) {
4374  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4375  __Pyx_INCREF(__pyx_t_4);
4376  __Pyx_INCREF(function);
4377  __Pyx_DECREF_SET(__pyx_t_3, function);
4378  }
4379  }
4380  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4381  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4382  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4383  __Pyx_GOTREF(__pyx_t_2);
4384  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4385  __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)
4386  __Pyx_GOTREF(__pyx_t_3);
4387  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4388  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4389  __Pyx_GOTREF(__pyx_t_2);
4390  __Pyx_GIVEREF(__pyx_t_1);
4391  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4392  __Pyx_GIVEREF(__pyx_t_3);
4393  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4394  __pyx_t_1 = 0;
4395  __pyx_t_3 = 0;
4396  __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)
4397  __Pyx_GOTREF(__pyx_t_3);
4398  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4399  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4400  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4401  __pyx_t_6 = NULL;
4402  } else {
4403  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4404  __Pyx_GOTREF(__pyx_t_2);
4405  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error)
4406  }
4407  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4408  for (;;) {
4409  if (likely(!__pyx_t_6)) {
4410  if (likely(PyList_CheckExact(__pyx_t_2))) {
4411  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4412  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4413  __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)
4414  #else
4415  __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)
4416  __Pyx_GOTREF(__pyx_t_3);
4417  #endif
4418  } else {
4419  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4420  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4421  __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)
4422  #else
4423  __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)
4424  __Pyx_GOTREF(__pyx_t_3);
4425  #endif
4426  }
4427  } else {
4428  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4429  if (unlikely(!__pyx_t_3)) {
4430  PyObject* exc_type = PyErr_Occurred();
4431  if (exc_type) {
4432  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4433  else __PYX_ERR(0, 236, __pyx_L1_error)
4434  }
4435  break;
4436  }
4437  __Pyx_GOTREF(__pyx_t_3);
4438  }
4439  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4440  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4441  __Pyx_GIVEREF(__pyx_t_3);
4442  __pyx_t_3 = 0;
4443 
4444  /* "PyClical.pyx":237
4445  * """
4446  * for idx in range(self.min(), self.max()+1):
4447  * if idx in self: # <<<<<<<<<<<<<<
4448  * yield idx
4449  *
4450  */
4451  __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)
4452  __pyx_t_8 = (__pyx_t_7 != 0);
4453  if (__pyx_t_8) {
4454 
4455  /* "PyClical.pyx":238
4456  * for idx in range(self.min(), self.max()+1):
4457  * if idx in self:
4458  * yield idx # <<<<<<<<<<<<<<
4459  *
4460  * def __invert__(self):
4461  */
4462  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4463  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4464  __Pyx_XGIVEREF(__pyx_t_2);
4465  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4466  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4467  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4468  __Pyx_XGIVEREF(__pyx_r);
4469  __Pyx_RefNannyFinishContext();
4470  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4471  /* return from generator, yielding value */
4472  __pyx_generator->resume_label = 1;
4473  return __pyx_r;
4474  __pyx_L7_resume_from_yield:;
4475  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4476  __pyx_cur_scope->__pyx_t_0 = 0;
4477  __Pyx_XGOTREF(__pyx_t_2);
4478  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4479  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4480  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error)
4481 
4482  /* "PyClical.pyx":237
4483  * """
4484  * for idx in range(self.min(), self.max()+1):
4485  * if idx in self: # <<<<<<<<<<<<<<
4486  * yield idx
4487  *
4488  */
4489  }
4490 
4491  /* "PyClical.pyx":236
4492  * -3,4,7,
4493  * """
4494  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4495  * if idx in self:
4496  * yield idx
4497  */
4498  }
4499  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4500  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4501 
4502  /* "PyClical.pyx":229
4503  * return self.instance.getitem(idx)
4504  *
4505  * def __iter__(self): # <<<<<<<<<<<<<<
4506  * """
4507  * Iterate over the indices of an index_set.
4508  */
4509 
4510  /* function exit code */
4511  PyErr_SetNone(PyExc_StopIteration);
4512  goto __pyx_L0;
4513  __pyx_L1_error:;
4514  __Pyx_XDECREF(__pyx_t_1);
4515  __Pyx_XDECREF(__pyx_t_2);
4516  __Pyx_XDECREF(__pyx_t_3);
4517  __Pyx_XDECREF(__pyx_t_4);
4518  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4519  __pyx_L0:;
4520  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4521  #if !CYTHON_USE_EXC_INFO_STACK
4522  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4523  #endif
4524  __pyx_generator->resume_label = -1;
4525  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4526  __Pyx_RefNannyFinishContext();
4527  return __pyx_r;
4528 }
4529 
4530 /* "PyClical.pyx":240
4531  * yield idx
4532  *
4533  * def __invert__(self): # <<<<<<<<<<<<<<
4534  * """
4535  * Set complement: not.
4536  */
4537 
4538 /* Python wrapper */
4539 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4540 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 ";
4541 #if CYTHON_COMPILING_IN_CPYTHON
4542 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4543 #endif
4544 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4545  PyObject *__pyx_r = 0;
4546  __Pyx_RefNannyDeclarations
4547  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4548  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4549 
4550  /* function exit code */
4551  __Pyx_RefNannyFinishContext();
4552  return __pyx_r;
4553 }
4554 
4555 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4556  PyObject *__pyx_r = NULL;
4557  __Pyx_RefNannyDeclarations
4558  PyObject *__pyx_t_1 = NULL;
4559  PyObject *__pyx_t_2 = NULL;
4560  int __pyx_lineno = 0;
4561  const char *__pyx_filename = NULL;
4562  int __pyx_clineno = 0;
4563  __Pyx_RefNannySetupContext("__invert__", 0);
4564 
4565  /* "PyClical.pyx":247
4566  * {-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}
4567  * """
4568  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4569  *
4570  * def __xor__(lhs, rhs):
4571  */
4572  __Pyx_XDECREF(__pyx_r);
4573  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
4574  __Pyx_GOTREF(__pyx_t_1);
4575  __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)
4576  __Pyx_GOTREF(__pyx_t_2);
4577  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4578  __pyx_r = __pyx_t_2;
4579  __pyx_t_2 = 0;
4580  goto __pyx_L0;
4581 
4582  /* "PyClical.pyx":240
4583  * yield idx
4584  *
4585  * def __invert__(self): # <<<<<<<<<<<<<<
4586  * """
4587  * Set complement: not.
4588  */
4589 
4590  /* function exit code */
4591  __pyx_L1_error:;
4592  __Pyx_XDECREF(__pyx_t_1);
4593  __Pyx_XDECREF(__pyx_t_2);
4594  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4595  __pyx_r = NULL;
4596  __pyx_L0:;
4597  __Pyx_XGIVEREF(__pyx_r);
4598  __Pyx_RefNannyFinishContext();
4599  return __pyx_r;
4600 }
4601 
4602 /* "PyClical.pyx":249
4603  * return index_set().wrap( self.instance.invert() )
4604  *
4605  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4606  * """
4607  * Symmetric set difference: exclusive or.
4608  */
4609 
4610 /* Python wrapper */
4611 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4612 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 ";
4613 #if CYTHON_COMPILING_IN_CPYTHON
4614 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4615 #endif
4616 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4617  PyObject *__pyx_r = 0;
4618  __Pyx_RefNannyDeclarations
4619  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4620  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4621 
4622  /* function exit code */
4623  __Pyx_RefNannyFinishContext();
4624  return __pyx_r;
4625 }
4626 
4627 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4628  PyObject *__pyx_r = NULL;
4629  __Pyx_RefNannyDeclarations
4630  PyObject *__pyx_t_1 = NULL;
4631  PyObject *__pyx_t_2 = NULL;
4632  int __pyx_lineno = 0;
4633  const char *__pyx_filename = NULL;
4634  int __pyx_clineno = 0;
4635  __Pyx_RefNannySetupContext("__xor__", 0);
4636 
4637  /* "PyClical.pyx":258
4638  * {1}
4639  * """
4640  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4641  *
4642  * def __ixor__(self, rhs):
4643  */
4644  __Pyx_XDECREF(__pyx_r);
4645  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
4646  __Pyx_GOTREF(__pyx_t_1);
4647  __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)
4648  __Pyx_GOTREF(__pyx_t_2);
4649  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4650  __pyx_r = __pyx_t_2;
4651  __pyx_t_2 = 0;
4652  goto __pyx_L0;
4653 
4654  /* "PyClical.pyx":249
4655  * return index_set().wrap( self.instance.invert() )
4656  *
4657  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4658  * """
4659  * Symmetric set difference: exclusive or.
4660  */
4661 
4662  /* function exit code */
4663  __pyx_L1_error:;
4664  __Pyx_XDECREF(__pyx_t_1);
4665  __Pyx_XDECREF(__pyx_t_2);
4666  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4667  __pyx_r = NULL;
4668  __pyx_L0:;
4669  __Pyx_XGIVEREF(__pyx_r);
4670  __Pyx_RefNannyFinishContext();
4671  return __pyx_r;
4672 }
4673 
4674 /* "PyClical.pyx":260
4675  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4676  *
4677  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4678  * """
4679  * Symmetric set difference: exclusive or.
4680  */
4681 
4682 /* Python wrapper */
4683 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4684 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 ";
4685 #if CYTHON_COMPILING_IN_CPYTHON
4686 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4687 #endif
4688 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4689  PyObject *__pyx_r = 0;
4690  __Pyx_RefNannyDeclarations
4691  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4692  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4693 
4694  /* function exit code */
4695  __Pyx_RefNannyFinishContext();
4696  return __pyx_r;
4697 }
4698 
4699 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4700  PyObject *__pyx_r = NULL;
4701  __Pyx_RefNannyDeclarations
4702  PyObject *__pyx_t_1 = NULL;
4703  int __pyx_lineno = 0;
4704  const char *__pyx_filename = NULL;
4705  int __pyx_clineno = 0;
4706  __Pyx_RefNannySetupContext("__ixor__", 0);
4707 
4708  /* "PyClical.pyx":269
4709  * {1}
4710  * """
4711  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4712  *
4713  * def __and__(lhs, rhs):
4714  */
4715  __Pyx_XDECREF(__pyx_r);
4716  __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)
4717  __Pyx_GOTREF(__pyx_t_1);
4718  __pyx_r = __pyx_t_1;
4719  __pyx_t_1 = 0;
4720  goto __pyx_L0;
4721 
4722  /* "PyClical.pyx":260
4723  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4724  *
4725  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4726  * """
4727  * Symmetric set difference: exclusive or.
4728  */
4729 
4730  /* function exit code */
4731  __pyx_L1_error:;
4732  __Pyx_XDECREF(__pyx_t_1);
4733  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4734  __pyx_r = NULL;
4735  __pyx_L0:;
4736  __Pyx_XGIVEREF(__pyx_r);
4737  __Pyx_RefNannyFinishContext();
4738  return __pyx_r;
4739 }
4740 
4741 /* "PyClical.pyx":271
4742  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4743  *
4744  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4745  * """
4746  * Set intersection: and.
4747  */
4748 
4749 /* Python wrapper */
4750 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4751 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 ";
4752 #if CYTHON_COMPILING_IN_CPYTHON
4753 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4754 #endif
4755 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4756  PyObject *__pyx_r = 0;
4757  __Pyx_RefNannyDeclarations
4758  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4759  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4760 
4761  /* function exit code */
4762  __Pyx_RefNannyFinishContext();
4763  return __pyx_r;
4764 }
4765 
4766 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4767  PyObject *__pyx_r = NULL;
4768  __Pyx_RefNannyDeclarations
4769  PyObject *__pyx_t_1 = NULL;
4770  PyObject *__pyx_t_2 = NULL;
4771  int __pyx_lineno = 0;
4772  const char *__pyx_filename = NULL;
4773  int __pyx_clineno = 0;
4774  __Pyx_RefNannySetupContext("__and__", 0);
4775 
4776  /* "PyClical.pyx":280
4777  * {2}
4778  * """
4779  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4780  *
4781  * def __iand__(self, rhs):
4782  */
4783  __Pyx_XDECREF(__pyx_r);
4784  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
4785  __Pyx_GOTREF(__pyx_t_1);
4786  __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)
4787  __Pyx_GOTREF(__pyx_t_2);
4788  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4789  __pyx_r = __pyx_t_2;
4790  __pyx_t_2 = 0;
4791  goto __pyx_L0;
4792 
4793  /* "PyClical.pyx":271
4794  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4795  *
4796  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4797  * """
4798  * Set intersection: and.
4799  */
4800 
4801  /* function exit code */
4802  __pyx_L1_error:;
4803  __Pyx_XDECREF(__pyx_t_1);
4804  __Pyx_XDECREF(__pyx_t_2);
4805  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4806  __pyx_r = NULL;
4807  __pyx_L0:;
4808  __Pyx_XGIVEREF(__pyx_r);
4809  __Pyx_RefNannyFinishContext();
4810  return __pyx_r;
4811 }
4812 
4813 /* "PyClical.pyx":282
4814  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4815  *
4816  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4817  * """
4818  * Set intersection: and.
4819  */
4820 
4821 /* Python wrapper */
4822 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4823 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 ";
4824 #if CYTHON_COMPILING_IN_CPYTHON
4825 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4826 #endif
4827 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4828  PyObject *__pyx_r = 0;
4829  __Pyx_RefNannyDeclarations
4830  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4831  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4832 
4833  /* function exit code */
4834  __Pyx_RefNannyFinishContext();
4835  return __pyx_r;
4836 }
4837 
4838 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4839  PyObject *__pyx_r = NULL;
4840  __Pyx_RefNannyDeclarations
4841  PyObject *__pyx_t_1 = NULL;
4842  int __pyx_lineno = 0;
4843  const char *__pyx_filename = NULL;
4844  int __pyx_clineno = 0;
4845  __Pyx_RefNannySetupContext("__iand__", 0);
4846 
4847  /* "PyClical.pyx":291
4848  * {2}
4849  * """
4850  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4851  *
4852  * def __or__(lhs, rhs):
4853  */
4854  __Pyx_XDECREF(__pyx_r);
4855  __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)
4856  __Pyx_GOTREF(__pyx_t_1);
4857  __pyx_r = __pyx_t_1;
4858  __pyx_t_1 = 0;
4859  goto __pyx_L0;
4860 
4861  /* "PyClical.pyx":282
4862  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4863  *
4864  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4865  * """
4866  * Set intersection: and.
4867  */
4868 
4869  /* function exit code */
4870  __pyx_L1_error:;
4871  __Pyx_XDECREF(__pyx_t_1);
4872  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4873  __pyx_r = NULL;
4874  __pyx_L0:;
4875  __Pyx_XGIVEREF(__pyx_r);
4876  __Pyx_RefNannyFinishContext();
4877  return __pyx_r;
4878 }
4879 
4880 /* "PyClical.pyx":293
4881  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4882  *
4883  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4884  * """
4885  * Set union: or.
4886  */
4887 
4888 /* Python wrapper */
4889 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4890 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 ";
4891 #if CYTHON_COMPILING_IN_CPYTHON
4892 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4893 #endif
4894 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4895  PyObject *__pyx_r = 0;
4896  __Pyx_RefNannyDeclarations
4897  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4898  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4899 
4900  /* function exit code */
4901  __Pyx_RefNannyFinishContext();
4902  return __pyx_r;
4903 }
4904 
4905 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4906  PyObject *__pyx_r = NULL;
4907  __Pyx_RefNannyDeclarations
4908  PyObject *__pyx_t_1 = NULL;
4909  PyObject *__pyx_t_2 = NULL;
4910  int __pyx_lineno = 0;
4911  const char *__pyx_filename = NULL;
4912  int __pyx_clineno = 0;
4913  __Pyx_RefNannySetupContext("__or__", 0);
4914 
4915  /* "PyClical.pyx":302
4916  * {1,2}
4917  * """
4918  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4919  *
4920  * def __ior__(self, rhs):
4921  */
4922  __Pyx_XDECREF(__pyx_r);
4923  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
4924  __Pyx_GOTREF(__pyx_t_1);
4925  __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)
4926  __Pyx_GOTREF(__pyx_t_2);
4927  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4928  __pyx_r = __pyx_t_2;
4929  __pyx_t_2 = 0;
4930  goto __pyx_L0;
4931 
4932  /* "PyClical.pyx":293
4933  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4934  *
4935  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4936  * """
4937  * Set union: or.
4938  */
4939 
4940  /* function exit code */
4941  __pyx_L1_error:;
4942  __Pyx_XDECREF(__pyx_t_1);
4943  __Pyx_XDECREF(__pyx_t_2);
4944  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4945  __pyx_r = NULL;
4946  __pyx_L0:;
4947  __Pyx_XGIVEREF(__pyx_r);
4948  __Pyx_RefNannyFinishContext();
4949  return __pyx_r;
4950 }
4951 
4952 /* "PyClical.pyx":304
4953  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4954  *
4955  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4956  * """
4957  * Set union: or.
4958  */
4959 
4960 /* Python wrapper */
4961 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4962 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 ";
4963 #if CYTHON_COMPILING_IN_CPYTHON
4964 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4965 #endif
4966 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4967  PyObject *__pyx_r = 0;
4968  __Pyx_RefNannyDeclarations
4969  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4970  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4971 
4972  /* function exit code */
4973  __Pyx_RefNannyFinishContext();
4974  return __pyx_r;
4975 }
4976 
4977 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4978  PyObject *__pyx_r = NULL;
4979  __Pyx_RefNannyDeclarations
4980  PyObject *__pyx_t_1 = NULL;
4981  int __pyx_lineno = 0;
4982  const char *__pyx_filename = NULL;
4983  int __pyx_clineno = 0;
4984  __Pyx_RefNannySetupContext("__ior__", 0);
4985 
4986  /* "PyClical.pyx":313
4987  * {1,2}
4988  * """
4989  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4990  *
4991  * def count(self):
4992  */
4993  __Pyx_XDECREF(__pyx_r);
4994  __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)
4995  __Pyx_GOTREF(__pyx_t_1);
4996  __pyx_r = __pyx_t_1;
4997  __pyx_t_1 = 0;
4998  goto __pyx_L0;
4999 
5000  /* "PyClical.pyx":304
5001  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
5002  *
5003  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
5004  * """
5005  * Set union: or.
5006  */
5007 
5008  /* function exit code */
5009  __pyx_L1_error:;
5010  __Pyx_XDECREF(__pyx_t_1);
5011  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5012  __pyx_r = NULL;
5013  __pyx_L0:;
5014  __Pyx_XGIVEREF(__pyx_r);
5015  __Pyx_RefNannyFinishContext();
5016  return __pyx_r;
5017 }
5018 
5019 /* "PyClical.pyx":315
5020  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
5021  *
5022  * def count(self): # <<<<<<<<<<<<<<
5023  * """
5024  * Cardinality: Number of indices included in set.
5025  */
5026 
5027 /* Python wrapper */
5028 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5029 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 ";
5030 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5031  PyObject *__pyx_r = 0;
5032  __Pyx_RefNannyDeclarations
5033  __Pyx_RefNannySetupContext("count (wrapper)", 0);
5034  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5035 
5036  /* function exit code */
5037  __Pyx_RefNannyFinishContext();
5038  return __pyx_r;
5039 }
5040 
5041 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5042  PyObject *__pyx_r = NULL;
5043  __Pyx_RefNannyDeclarations
5044  PyObject *__pyx_t_1 = NULL;
5045  int __pyx_lineno = 0;
5046  const char *__pyx_filename = NULL;
5047  int __pyx_clineno = 0;
5048  __Pyx_RefNannySetupContext("count", 0);
5049 
5050  /* "PyClical.pyx":322
5051  * 3
5052  * """
5053  * return self.instance.count() # <<<<<<<<<<<<<<
5054  *
5055  * def count_neg(self):
5056  */
5057  __Pyx_XDECREF(__pyx_r);
5058  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
5059  __Pyx_GOTREF(__pyx_t_1);
5060  __pyx_r = __pyx_t_1;
5061  __pyx_t_1 = 0;
5062  goto __pyx_L0;
5063 
5064  /* "PyClical.pyx":315
5065  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
5066  *
5067  * def count(self): # <<<<<<<<<<<<<<
5068  * """
5069  * Cardinality: Number of indices included in set.
5070  */
5071 
5072  /* function exit code */
5073  __pyx_L1_error:;
5074  __Pyx_XDECREF(__pyx_t_1);
5075  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
5076  __pyx_r = NULL;
5077  __pyx_L0:;
5078  __Pyx_XGIVEREF(__pyx_r);
5079  __Pyx_RefNannyFinishContext();
5080  return __pyx_r;
5081 }
5082 
5083 /* "PyClical.pyx":324
5084  * return self.instance.count()
5085  *
5086  * def count_neg(self): # <<<<<<<<<<<<<<
5087  * """
5088  * Number of negative indices included in set.
5089  */
5090 
5091 /* Python wrapper */
5092 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5093 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 ";
5094 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5095  PyObject *__pyx_r = 0;
5096  __Pyx_RefNannyDeclarations
5097  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
5098  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5099 
5100  /* function exit code */
5101  __Pyx_RefNannyFinishContext();
5102  return __pyx_r;
5103 }
5104 
5105 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5106  PyObject *__pyx_r = NULL;
5107  __Pyx_RefNannyDeclarations
5108  PyObject *__pyx_t_1 = NULL;
5109  int __pyx_lineno = 0;
5110  const char *__pyx_filename = NULL;
5111  int __pyx_clineno = 0;
5112  __Pyx_RefNannySetupContext("count_neg", 0);
5113 
5114  /* "PyClical.pyx":331
5115  * 1
5116  * """
5117  * return self.instance.count_neg() # <<<<<<<<<<<<<<
5118  *
5119  * def count_pos(self):
5120  */
5121  __Pyx_XDECREF(__pyx_r);
5122  __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)
5123  __Pyx_GOTREF(__pyx_t_1);
5124  __pyx_r = __pyx_t_1;
5125  __pyx_t_1 = 0;
5126  goto __pyx_L0;
5127 
5128  /* "PyClical.pyx":324
5129  * return self.instance.count()
5130  *
5131  * def count_neg(self): # <<<<<<<<<<<<<<
5132  * """
5133  * Number of negative indices included in set.
5134  */
5135 
5136  /* function exit code */
5137  __pyx_L1_error:;
5138  __Pyx_XDECREF(__pyx_t_1);
5139  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5140  __pyx_r = NULL;
5141  __pyx_L0:;
5142  __Pyx_XGIVEREF(__pyx_r);
5143  __Pyx_RefNannyFinishContext();
5144  return __pyx_r;
5145 }
5146 
5147 /* "PyClical.pyx":333
5148  * return self.instance.count_neg()
5149  *
5150  * def count_pos(self): # <<<<<<<<<<<<<<
5151  * """
5152  * Number of positive indices included in set.
5153  */
5154 
5155 /* Python wrapper */
5156 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5157 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 ";
5158 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5159  PyObject *__pyx_r = 0;
5160  __Pyx_RefNannyDeclarations
5161  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5162  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5163 
5164  /* function exit code */
5165  __Pyx_RefNannyFinishContext();
5166  return __pyx_r;
5167 }
5168 
5169 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5170  PyObject *__pyx_r = NULL;
5171  __Pyx_RefNannyDeclarations
5172  PyObject *__pyx_t_1 = NULL;
5173  int __pyx_lineno = 0;
5174  const char *__pyx_filename = NULL;
5175  int __pyx_clineno = 0;
5176  __Pyx_RefNannySetupContext("count_pos", 0);
5177 
5178  /* "PyClical.pyx":340
5179  * 2
5180  * """
5181  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5182  *
5183  * def min(self):
5184  */
5185  __Pyx_XDECREF(__pyx_r);
5186  __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)
5187  __Pyx_GOTREF(__pyx_t_1);
5188  __pyx_r = __pyx_t_1;
5189  __pyx_t_1 = 0;
5190  goto __pyx_L0;
5191 
5192  /* "PyClical.pyx":333
5193  * return self.instance.count_neg()
5194  *
5195  * def count_pos(self): # <<<<<<<<<<<<<<
5196  * """
5197  * Number of positive indices included in set.
5198  */
5199 
5200  /* function exit code */
5201  __pyx_L1_error:;
5202  __Pyx_XDECREF(__pyx_t_1);
5203  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5204  __pyx_r = NULL;
5205  __pyx_L0:;
5206  __Pyx_XGIVEREF(__pyx_r);
5207  __Pyx_RefNannyFinishContext();
5208  return __pyx_r;
5209 }
5210 
5211 /* "PyClical.pyx":342
5212  * return self.instance.count_pos()
5213  *
5214  * def min(self): # <<<<<<<<<<<<<<
5215  * """
5216  * Minimum member.
5217  */
5218 
5219 /* Python wrapper */
5220 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5221 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5222 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5223  PyObject *__pyx_r = 0;
5224  __Pyx_RefNannyDeclarations
5225  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5226  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5227 
5228  /* function exit code */
5229  __Pyx_RefNannyFinishContext();
5230  return __pyx_r;
5231 }
5232 
5233 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5234  PyObject *__pyx_r = NULL;
5235  __Pyx_RefNannyDeclarations
5236  PyObject *__pyx_t_1 = NULL;
5237  int __pyx_lineno = 0;
5238  const char *__pyx_filename = NULL;
5239  int __pyx_clineno = 0;
5240  __Pyx_RefNannySetupContext("min", 0);
5241 
5242  /* "PyClical.pyx":349
5243  * -1
5244  * """
5245  * return self.instance.min() # <<<<<<<<<<<<<<
5246  *
5247  * def max(self):
5248  */
5249  __Pyx_XDECREF(__pyx_r);
5250  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
5251  __Pyx_GOTREF(__pyx_t_1);
5252  __pyx_r = __pyx_t_1;
5253  __pyx_t_1 = 0;
5254  goto __pyx_L0;
5255 
5256  /* "PyClical.pyx":342
5257  * return self.instance.count_pos()
5258  *
5259  * def min(self): # <<<<<<<<<<<<<<
5260  * """
5261  * Minimum member.
5262  */
5263 
5264  /* function exit code */
5265  __pyx_L1_error:;
5266  __Pyx_XDECREF(__pyx_t_1);
5267  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5268  __pyx_r = NULL;
5269  __pyx_L0:;
5270  __Pyx_XGIVEREF(__pyx_r);
5271  __Pyx_RefNannyFinishContext();
5272  return __pyx_r;
5273 }
5274 
5275 /* "PyClical.pyx":351
5276  * return self.instance.min()
5277  *
5278  * def max(self): # <<<<<<<<<<<<<<
5279  * """
5280  * Maximum member.
5281  */
5282 
5283 /* Python wrapper */
5284 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5285 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5286 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5287  PyObject *__pyx_r = 0;
5288  __Pyx_RefNannyDeclarations
5289  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5290  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5291 
5292  /* function exit code */
5293  __Pyx_RefNannyFinishContext();
5294  return __pyx_r;
5295 }
5296 
5297 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5298  PyObject *__pyx_r = NULL;
5299  __Pyx_RefNannyDeclarations
5300  PyObject *__pyx_t_1 = NULL;
5301  int __pyx_lineno = 0;
5302  const char *__pyx_filename = NULL;
5303  int __pyx_clineno = 0;
5304  __Pyx_RefNannySetupContext("max", 0);
5305 
5306  /* "PyClical.pyx":358
5307  * 2
5308  * """
5309  * return self.instance.max() # <<<<<<<<<<<<<<
5310  *
5311  * def hash_fn(self):
5312  */
5313  __Pyx_XDECREF(__pyx_r);
5314  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
5315  __Pyx_GOTREF(__pyx_t_1);
5316  __pyx_r = __pyx_t_1;
5317  __pyx_t_1 = 0;
5318  goto __pyx_L0;
5319 
5320  /* "PyClical.pyx":351
5321  * return self.instance.min()
5322  *
5323  * def max(self): # <<<<<<<<<<<<<<
5324  * """
5325  * Maximum member.
5326  */
5327 
5328  /* function exit code */
5329  __pyx_L1_error:;
5330  __Pyx_XDECREF(__pyx_t_1);
5331  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5332  __pyx_r = NULL;
5333  __pyx_L0:;
5334  __Pyx_XGIVEREF(__pyx_r);
5335  __Pyx_RefNannyFinishContext();
5336  return __pyx_r;
5337 }
5338 
5339 /* "PyClical.pyx":360
5340  * return self.instance.max()
5341  *
5342  * def hash_fn(self): # <<<<<<<<<<<<<<
5343  * """
5344  * Hash function.
5345  */
5346 
5347 /* Python wrapper */
5348 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5349 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5350 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5351  PyObject *__pyx_r = 0;
5352  __Pyx_RefNannyDeclarations
5353  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5354  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5355 
5356  /* function exit code */
5357  __Pyx_RefNannyFinishContext();
5358  return __pyx_r;
5359 }
5360 
5361 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5362  PyObject *__pyx_r = NULL;
5363  __Pyx_RefNannyDeclarations
5364  PyObject *__pyx_t_1 = NULL;
5365  int __pyx_lineno = 0;
5366  const char *__pyx_filename = NULL;
5367  int __pyx_clineno = 0;
5368  __Pyx_RefNannySetupContext("hash_fn", 0);
5369 
5370  /* "PyClical.pyx":364
5371  * Hash function.
5372  * """
5373  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5374  *
5375  * def sign_of_mult(self, rhs):
5376  */
5377  __Pyx_XDECREF(__pyx_r);
5378  __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)
5379  __Pyx_GOTREF(__pyx_t_1);
5380  __pyx_r = __pyx_t_1;
5381  __pyx_t_1 = 0;
5382  goto __pyx_L0;
5383 
5384  /* "PyClical.pyx":360
5385  * return self.instance.max()
5386  *
5387  * def hash_fn(self): # <<<<<<<<<<<<<<
5388  * """
5389  * Hash function.
5390  */
5391 
5392  /* function exit code */
5393  __pyx_L1_error:;
5394  __Pyx_XDECREF(__pyx_t_1);
5395  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5396  __pyx_r = NULL;
5397  __pyx_L0:;
5398  __Pyx_XGIVEREF(__pyx_r);
5399  __Pyx_RefNannyFinishContext();
5400  return __pyx_r;
5401 }
5402 
5403 /* "PyClical.pyx":366
5404  * return self.instance.hash_fn()
5405  *
5406  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5407  * """
5408  * Sign of geometric product of two Clifford basis elements.
5409  */
5410 
5411 /* Python wrapper */
5412 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5413 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 ";
5414 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5415  PyObject *__pyx_r = 0;
5416  __Pyx_RefNannyDeclarations
5417  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5418  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5419 
5420  /* function exit code */
5421  __Pyx_RefNannyFinishContext();
5422  return __pyx_r;
5423 }
5424 
5425 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5426  PyObject *__pyx_r = NULL;
5427  __Pyx_RefNannyDeclarations
5428  PyObject *__pyx_t_1 = NULL;
5429  int __pyx_lineno = 0;
5430  const char *__pyx_filename = NULL;
5431  int __pyx_clineno = 0;
5432  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5433 
5434  /* "PyClical.pyx":373
5435  * 1
5436  * """
5437  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5438  *
5439  * def sign_of_square(self):
5440  */
5441  __Pyx_XDECREF(__pyx_r);
5442  __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)
5443  __Pyx_GOTREF(__pyx_t_1);
5444  __pyx_r = __pyx_t_1;
5445  __pyx_t_1 = 0;
5446  goto __pyx_L0;
5447 
5448  /* "PyClical.pyx":366
5449  * return self.instance.hash_fn()
5450  *
5451  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5452  * """
5453  * Sign of geometric product of two Clifford basis elements.
5454  */
5455 
5456  /* function exit code */
5457  __pyx_L1_error:;
5458  __Pyx_XDECREF(__pyx_t_1);
5459  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5460  __pyx_r = NULL;
5461  __pyx_L0:;
5462  __Pyx_XGIVEREF(__pyx_r);
5463  __Pyx_RefNannyFinishContext();
5464  return __pyx_r;
5465 }
5466 
5467 /* "PyClical.pyx":375
5468  * return self.instance.sign_of_mult(toIndexSet(rhs))
5469  *
5470  * def sign_of_square(self): # <<<<<<<<<<<<<<
5471  * """
5472  * Sign of geometric square of a Clifford basis element.
5473  */
5474 
5475 /* Python wrapper */
5476 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5477 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 ";
5478 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5479  PyObject *__pyx_r = 0;
5480  __Pyx_RefNannyDeclarations
5481  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5482  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5483 
5484  /* function exit code */
5485  __Pyx_RefNannyFinishContext();
5486  return __pyx_r;
5487 }
5488 
5489 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5490  PyObject *__pyx_r = NULL;
5491  __Pyx_RefNannyDeclarations
5492  PyObject *__pyx_t_1 = NULL;
5493  int __pyx_lineno = 0;
5494  const char *__pyx_filename = NULL;
5495  int __pyx_clineno = 0;
5496  __Pyx_RefNannySetupContext("sign_of_square", 0);
5497 
5498  /* "PyClical.pyx":382
5499  * -1
5500  * """
5501  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5502  *
5503  * def __repr__(self):
5504  */
5505  __Pyx_XDECREF(__pyx_r);
5506  __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)
5507  __Pyx_GOTREF(__pyx_t_1);
5508  __pyx_r = __pyx_t_1;
5509  __pyx_t_1 = 0;
5510  goto __pyx_L0;
5511 
5512  /* "PyClical.pyx":375
5513  * return self.instance.sign_of_mult(toIndexSet(rhs))
5514  *
5515  * def sign_of_square(self): # <<<<<<<<<<<<<<
5516  * """
5517  * Sign of geometric square of a Clifford basis element.
5518  */
5519 
5520  /* function exit code */
5521  __pyx_L1_error:;
5522  __Pyx_XDECREF(__pyx_t_1);
5523  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5524  __pyx_r = NULL;
5525  __pyx_L0:;
5526  __Pyx_XGIVEREF(__pyx_r);
5527  __Pyx_RefNannyFinishContext();
5528  return __pyx_r;
5529 }
5530 
5531 /* "PyClical.pyx":384
5532  * return self.instance.sign_of_square()
5533  *
5534  * def __repr__(self): # <<<<<<<<<<<<<<
5535  * """
5536  * The official string representation of self.
5537  */
5538 
5539 /* Python wrapper */
5540 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5541 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 ";
5542 #if CYTHON_COMPILING_IN_CPYTHON
5543 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5544 #endif
5545 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5546  PyObject *__pyx_r = 0;
5547  __Pyx_RefNannyDeclarations
5548  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5549  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5550 
5551  /* function exit code */
5552  __Pyx_RefNannyFinishContext();
5553  return __pyx_r;
5554 }
5555 
5556 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5557  PyObject *__pyx_r = NULL;
5558  __Pyx_RefNannyDeclarations
5559  PyObject *__pyx_t_1 = NULL;
5560  int __pyx_lineno = 0;
5561  const char *__pyx_filename = NULL;
5562  int __pyx_clineno = 0;
5563  __Pyx_RefNannySetupContext("__repr__", 0);
5564 
5565  /* "PyClical.pyx":393
5566  * 'index_set({1,2})'
5567  * """
5568  * return index_set_to_repr( self.unwrap() ).decode() # <<<<<<<<<<<<<<
5569  *
5570  * def __str__(self):
5571  */
5572  __Pyx_XDECREF(__pyx_r);
5573  __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)
5574  __Pyx_GOTREF(__pyx_t_1);
5575  __pyx_r = __pyx_t_1;
5576  __pyx_t_1 = 0;
5577  goto __pyx_L0;
5578 
5579  /* "PyClical.pyx":384
5580  * return self.instance.sign_of_square()
5581  *
5582  * def __repr__(self): # <<<<<<<<<<<<<<
5583  * """
5584  * The official string representation of self.
5585  */
5586 
5587  /* function exit code */
5588  __pyx_L1_error:;
5589  __Pyx_XDECREF(__pyx_t_1);
5590  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5591  __pyx_r = NULL;
5592  __pyx_L0:;
5593  __Pyx_XGIVEREF(__pyx_r);
5594  __Pyx_RefNannyFinishContext();
5595  return __pyx_r;
5596 }
5597 
5598 /* "PyClical.pyx":395
5599  * return index_set_to_repr( self.unwrap() ).decode()
5600  *
5601  * def __str__(self): # <<<<<<<<<<<<<<
5602  * """
5603  * The informal string representation of self.
5604  */
5605 
5606 /* Python wrapper */
5607 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5608 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 ";
5609 #if CYTHON_COMPILING_IN_CPYTHON
5610 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5611 #endif
5612 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5613  PyObject *__pyx_r = 0;
5614  __Pyx_RefNannyDeclarations
5615  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5616  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5617 
5618  /* function exit code */
5619  __Pyx_RefNannyFinishContext();
5620  return __pyx_r;
5621 }
5622 
5623 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5624  PyObject *__pyx_r = NULL;
5625  __Pyx_RefNannyDeclarations
5626  PyObject *__pyx_t_1 = NULL;
5627  int __pyx_lineno = 0;
5628  const char *__pyx_filename = NULL;
5629  int __pyx_clineno = 0;
5630  __Pyx_RefNannySetupContext("__str__", 0);
5631 
5632  /* "PyClical.pyx":404
5633  * '{1,2}'
5634  * """
5635  * return index_set_to_str( self.unwrap() ).decode() # <<<<<<<<<<<<<<
5636  *
5637  * def index_set_hidden_doctests():
5638  */
5639  __Pyx_XDECREF(__pyx_r);
5640  __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)
5641  __Pyx_GOTREF(__pyx_t_1);
5642  __pyx_r = __pyx_t_1;
5643  __pyx_t_1 = 0;
5644  goto __pyx_L0;
5645 
5646  /* "PyClical.pyx":395
5647  * return index_set_to_repr( self.unwrap() ).decode()
5648  *
5649  * def __str__(self): # <<<<<<<<<<<<<<
5650  * """
5651  * The informal string representation of self.
5652  */
5653 
5654  /* function exit code */
5655  __pyx_L1_error:;
5656  __Pyx_XDECREF(__pyx_t_1);
5657  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5658  __pyx_r = NULL;
5659  __pyx_L0:;
5660  __Pyx_XGIVEREF(__pyx_r);
5661  __Pyx_RefNannyFinishContext();
5662  return __pyx_r;
5663 }
5664 
5665 /* "(tree fragment)":1
5666  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5667  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5668  * def __setstate_cython__(self, __pyx_state):
5669  */
5670 
5671 /* Python wrapper */
5672 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5673 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5674  PyObject *__pyx_r = 0;
5675  __Pyx_RefNannyDeclarations
5676  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5677  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5678 
5679  /* function exit code */
5680  __Pyx_RefNannyFinishContext();
5681  return __pyx_r;
5682 }
5683 
5684 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5685  PyObject *__pyx_r = NULL;
5686  __Pyx_RefNannyDeclarations
5687  PyObject *__pyx_t_1 = NULL;
5688  int __pyx_lineno = 0;
5689  const char *__pyx_filename = NULL;
5690  int __pyx_clineno = 0;
5691  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5692 
5693  /* "(tree fragment)":2
5694  * def __reduce_cython__(self):
5695  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5696  * def __setstate_cython__(self, __pyx_state):
5697  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5698  */
5699  __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)
5700  __Pyx_GOTREF(__pyx_t_1);
5701  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5702  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5703  __PYX_ERR(1, 2, __pyx_L1_error)
5704 
5705  /* "(tree fragment)":1
5706  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5707  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5708  * def __setstate_cython__(self, __pyx_state):
5709  */
5710 
5711  /* function exit code */
5712  __pyx_L1_error:;
5713  __Pyx_XDECREF(__pyx_t_1);
5714  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5715  __pyx_r = NULL;
5716  __Pyx_XGIVEREF(__pyx_r);
5717  __Pyx_RefNannyFinishContext();
5718  return __pyx_r;
5719 }
5720 
5721 /* "(tree fragment)":3
5722  * def __reduce_cython__(self):
5723  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5724  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5725  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5726  */
5727 
5728 /* Python wrapper */
5729 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5730 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5731  PyObject *__pyx_r = 0;
5732  __Pyx_RefNannyDeclarations
5733  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5734  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5735 
5736  /* function exit code */
5737  __Pyx_RefNannyFinishContext();
5738  return __pyx_r;
5739 }
5740 
5741 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) {
5742  PyObject *__pyx_r = NULL;
5743  __Pyx_RefNannyDeclarations
5744  PyObject *__pyx_t_1 = NULL;
5745  int __pyx_lineno = 0;
5746  const char *__pyx_filename = NULL;
5747  int __pyx_clineno = 0;
5748  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5749 
5750  /* "(tree fragment)":4
5751  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5752  * def __setstate_cython__(self, __pyx_state):
5753  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5754  */
5755  __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)
5756  __Pyx_GOTREF(__pyx_t_1);
5757  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5758  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5759  __PYX_ERR(1, 4, __pyx_L1_error)
5760 
5761  /* "(tree fragment)":3
5762  * def __reduce_cython__(self):
5763  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5764  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5765  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5766  */
5767 
5768  /* function exit code */
5769  __pyx_L1_error:;
5770  __Pyx_XDECREF(__pyx_t_1);
5771  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5772  __pyx_r = NULL;
5773  __Pyx_XGIVEREF(__pyx_r);
5774  __Pyx_RefNannyFinishContext();
5775  return __pyx_r;
5776 }
5777 
5778 /* "PyClical.pyx":406
5779  * return index_set_to_str( self.unwrap() ).decode()
5780  *
5781  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5782  * """
5783  * Tests for functions that Doctest cannot see.
5784  */
5785 
5786 /* Python wrapper */
5787 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5788 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 ";
5789  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};
5790  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5791  PyObject *__pyx_r = 0;
5792  __Pyx_RefNannyDeclarations
5793  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5794  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5795 
5796  /* function exit code */
5797  __Pyx_RefNannyFinishContext();
5798  return __pyx_r;
5799  }
5800 
5801  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5802  PyObject *__pyx_r = NULL;
5803  __Pyx_RefNannyDeclarations
5804  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5805 
5806  /* "PyClical.pyx":490
5807  * False
5808  * """
5809  * return # <<<<<<<<<<<<<<
5810  *
5811  * cpdef inline compare(lhs,rhs):
5812  */
5813  __Pyx_XDECREF(__pyx_r);
5814  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5815  goto __pyx_L0;
5816 
5817  /* "PyClical.pyx":406
5818  * return index_set_to_str( self.unwrap() ).decode()
5819  *
5820  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5821  * """
5822  * Tests for functions that Doctest cannot see.
5823  */
5824 
5825  /* function exit code */
5826  __pyx_L0:;
5827  __Pyx_XGIVEREF(__pyx_r);
5828  __Pyx_RefNannyFinishContext();
5829  return __pyx_r;
5830  }
5831 
5832  /* "PyClical.pyx":492
5833  * return
5834  *
5835  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5836  * """
5837  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5838  */
5839 
5840  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5841  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5842  PyObject *__pyx_r = NULL;
5843  __Pyx_RefNannyDeclarations
5844  PyObject *__pyx_t_1 = NULL;
5845  int __pyx_lineno = 0;
5846  const char *__pyx_filename = NULL;
5847  int __pyx_clineno = 0;
5848  __Pyx_RefNannySetupContext("compare", 0);
5849 
5850  /* "PyClical.pyx":502
5851  * 1
5852  * """
5853  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5854  *
5855  * cpdef inline min_neg(obj):
5856  */
5857  __Pyx_XDECREF(__pyx_r);
5858  __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)
5859  __Pyx_GOTREF(__pyx_t_1);
5860  __pyx_r = __pyx_t_1;
5861  __pyx_t_1 = 0;
5862  goto __pyx_L0;
5863 
5864  /* "PyClical.pyx":492
5865  * return
5866  *
5867  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5868  * """
5869  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5870  */
5871 
5872  /* function exit code */
5873  __pyx_L1_error:;
5874  __Pyx_XDECREF(__pyx_t_1);
5875  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5876  __pyx_r = 0;
5877  __pyx_L0:;
5878  __Pyx_XGIVEREF(__pyx_r);
5879  __Pyx_RefNannyFinishContext();
5880  return __pyx_r;
5881  }
5882 
5883  /* Python wrapper */
5884  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5885  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 ";
5886  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5887  PyObject *__pyx_v_lhs = 0;
5888  PyObject *__pyx_v_rhs = 0;
5889  int __pyx_lineno = 0;
5890  const char *__pyx_filename = NULL;
5891  int __pyx_clineno = 0;
5892  PyObject *__pyx_r = 0;
5893  __Pyx_RefNannyDeclarations
5894  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5895  {
5896  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5897  PyObject* values[2] = {0,0};
5898  if (unlikely(__pyx_kwds)) {
5899  Py_ssize_t kw_args;
5900  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5901  switch (pos_args) {
5902  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5903  CYTHON_FALLTHROUGH;
5904  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5905  CYTHON_FALLTHROUGH;
5906  case 0: break;
5907  default: goto __pyx_L5_argtuple_error;
5908  }
5909  kw_args = PyDict_Size(__pyx_kwds);
5910  switch (pos_args) {
5911  case 0:
5912  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5913  else goto __pyx_L5_argtuple_error;
5914  CYTHON_FALLTHROUGH;
5915  case 1:
5916  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5917  else {
5918  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 492, __pyx_L3_error)
5919  }
5920  }
5921  if (unlikely(kw_args > 0)) {
5922  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 492, __pyx_L3_error)
5923  }
5924  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5925  goto __pyx_L5_argtuple_error;
5926  } else {
5927  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5928  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5929  }
5930  __pyx_v_lhs = values[0];
5931  __pyx_v_rhs = values[1];
5932  }
5933  goto __pyx_L4_argument_unpacking_done;
5934  __pyx_L5_argtuple_error:;
5935  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 492, __pyx_L3_error)
5936  __pyx_L3_error:;
5937  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5938  __Pyx_RefNannyFinishContext();
5939  return NULL;
5940  __pyx_L4_argument_unpacking_done:;
5941  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5942 
5943  /* function exit code */
5944  __Pyx_RefNannyFinishContext();
5945  return __pyx_r;
5946  }
5947 
5948  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5949  PyObject *__pyx_r = NULL;
5950  __Pyx_RefNannyDeclarations
5951  PyObject *__pyx_t_1 = NULL;
5952  int __pyx_lineno = 0;
5953  const char *__pyx_filename = NULL;
5954  int __pyx_clineno = 0;
5955  __Pyx_RefNannySetupContext("compare", 0);
5956  __Pyx_XDECREF(__pyx_r);
5957  __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)
5958  __Pyx_GOTREF(__pyx_t_1);
5959  __pyx_r = __pyx_t_1;
5960  __pyx_t_1 = 0;
5961  goto __pyx_L0;
5962 
5963  /* function exit code */
5964  __pyx_L1_error:;
5965  __Pyx_XDECREF(__pyx_t_1);
5966  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5967  __pyx_r = NULL;
5968  __pyx_L0:;
5969  __Pyx_XGIVEREF(__pyx_r);
5970  __Pyx_RefNannyFinishContext();
5971  return __pyx_r;
5972  }
5973 
5974  /* "PyClical.pyx":504
5975  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5976  *
5977  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5978  * """
5979  * Minimum negative index, or 0 if none.
5980  */
5981 
5982  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5983  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5984  PyObject *__pyx_r = NULL;
5985  __Pyx_RefNannyDeclarations
5986  PyObject *__pyx_t_1 = NULL;
5987  int __pyx_lineno = 0;
5988  const char *__pyx_filename = NULL;
5989  int __pyx_clineno = 0;
5990  __Pyx_RefNannySetupContext("min_neg", 0);
5991 
5992  /* "PyClical.pyx":511
5993  * 0
5994  * """
5995  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5996  *
5997  * cpdef inline max_pos(obj):
5998  */
5999  __Pyx_XDECREF(__pyx_r);
6000  __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)
6001  __Pyx_GOTREF(__pyx_t_1);
6002  __pyx_r = __pyx_t_1;
6003  __pyx_t_1 = 0;
6004  goto __pyx_L0;
6005 
6006  /* "PyClical.pyx":504
6007  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
6008  *
6009  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
6010  * """
6011  * Minimum negative index, or 0 if none.
6012  */
6013 
6014  /* function exit code */
6015  __pyx_L1_error:;
6016  __Pyx_XDECREF(__pyx_t_1);
6017  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
6018  __pyx_r = 0;
6019  __pyx_L0:;
6020  __Pyx_XGIVEREF(__pyx_r);
6021  __Pyx_RefNannyFinishContext();
6022  return __pyx_r;
6023  }
6024 
6025  /* Python wrapper */
6026  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6027  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 ";
6028  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6029  PyObject *__pyx_r = 0;
6030  __Pyx_RefNannyDeclarations
6031  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
6032  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
6033 
6034  /* function exit code */
6035  __Pyx_RefNannyFinishContext();
6036  return __pyx_r;
6037  }
6038 
6039  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6040  PyObject *__pyx_r = NULL;
6041  __Pyx_RefNannyDeclarations
6042  PyObject *__pyx_t_1 = NULL;
6043  int __pyx_lineno = 0;
6044  const char *__pyx_filename = NULL;
6045  int __pyx_clineno = 0;
6046  __Pyx_RefNannySetupContext("min_neg", 0);
6047  __Pyx_XDECREF(__pyx_r);
6048  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
6049  __Pyx_GOTREF(__pyx_t_1);
6050  __pyx_r = __pyx_t_1;
6051  __pyx_t_1 = 0;
6052  goto __pyx_L0;
6053 
6054  /* function exit code */
6055  __pyx_L1_error:;
6056  __Pyx_XDECREF(__pyx_t_1);
6057  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
6058  __pyx_r = NULL;
6059  __pyx_L0:;
6060  __Pyx_XGIVEREF(__pyx_r);
6061  __Pyx_RefNannyFinishContext();
6062  return __pyx_r;
6063  }
6064 
6065  /* "PyClical.pyx":513
6066  * return glucat.min_neg( toIndexSet(obj) )
6067  *
6068  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
6069  * """
6070  * Maximum positive index, or 0 if none.
6071  */
6072 
6073  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6074  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
6075  PyObject *__pyx_r = NULL;
6076  __Pyx_RefNannyDeclarations
6077  PyObject *__pyx_t_1 = NULL;
6078  int __pyx_lineno = 0;
6079  const char *__pyx_filename = NULL;
6080  int __pyx_clineno = 0;
6081  __Pyx_RefNannySetupContext("max_pos", 0);
6082 
6083  /* "PyClical.pyx":520
6084  * 2
6085  * """
6086  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
6087  *
6088  * cdef inline vector[scalar_t] list_to_vector(lst):
6089  */
6090  __Pyx_XDECREF(__pyx_r);
6091  __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)
6092  __Pyx_GOTREF(__pyx_t_1);
6093  __pyx_r = __pyx_t_1;
6094  __pyx_t_1 = 0;
6095  goto __pyx_L0;
6096 
6097  /* "PyClical.pyx":513
6098  * return glucat.min_neg( toIndexSet(obj) )
6099  *
6100  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
6101  * """
6102  * Maximum positive index, or 0 if none.
6103  */
6104 
6105  /* function exit code */
6106  __pyx_L1_error:;
6107  __Pyx_XDECREF(__pyx_t_1);
6108  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
6109  __pyx_r = 0;
6110  __pyx_L0:;
6111  __Pyx_XGIVEREF(__pyx_r);
6112  __Pyx_RefNannyFinishContext();
6113  return __pyx_r;
6114  }
6115 
6116  /* Python wrapper */
6117  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6118  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 ";
6119  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6120  PyObject *__pyx_r = 0;
6121  __Pyx_RefNannyDeclarations
6122  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
6123  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
6124 
6125  /* function exit code */
6126  __Pyx_RefNannyFinishContext();
6127  return __pyx_r;
6128  }
6129 
6130  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6131  PyObject *__pyx_r = NULL;
6132  __Pyx_RefNannyDeclarations
6133  PyObject *__pyx_t_1 = NULL;
6134  int __pyx_lineno = 0;
6135  const char *__pyx_filename = NULL;
6136  int __pyx_clineno = 0;
6137  __Pyx_RefNannySetupContext("max_pos", 0);
6138  __Pyx_XDECREF(__pyx_r);
6139  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
6140  __Pyx_GOTREF(__pyx_t_1);
6141  __pyx_r = __pyx_t_1;
6142  __pyx_t_1 = 0;
6143  goto __pyx_L0;
6144 
6145  /* function exit code */
6146  __pyx_L1_error:;
6147  __Pyx_XDECREF(__pyx_t_1);
6148  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
6149  __pyx_r = NULL;
6150  __pyx_L0:;
6151  __Pyx_XGIVEREF(__pyx_r);
6152  __Pyx_RefNannyFinishContext();
6153  return __pyx_r;
6154  }
6155 
6156  /* "PyClical.pyx":522
6157  * return glucat.max_pos( toIndexSet(obj) )
6158  *
6159  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6160  * """
6161  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6162  */
6163 
6164  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
6165  std::vector<scalar_t> __pyx_v_v;
6166  PyObject *__pyx_v_s = NULL;
6167  std::vector<scalar_t> __pyx_r;
6168  __Pyx_RefNannyDeclarations
6169  PyObject *__pyx_t_1 = NULL;
6170  Py_ssize_t __pyx_t_2;
6171  PyObject *(*__pyx_t_3)(PyObject *);
6172  PyObject *__pyx_t_4 = NULL;
6173  scalar_t __pyx_t_5;
6174  int __pyx_lineno = 0;
6175  const char *__pyx_filename = NULL;
6176  int __pyx_clineno = 0;
6177  __Pyx_RefNannySetupContext("list_to_vector", 0);
6178 
6179  /* "PyClical.pyx":527
6180  * """
6181  * cdef vector[scalar_t] v
6182  * for s in lst: # <<<<<<<<<<<<<<
6183  * v.push_back(<scalar_t>s)
6184  * return v
6185  */
6186  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
6187  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
6188  __pyx_t_3 = NULL;
6189  } else {
6190  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
6191  __Pyx_GOTREF(__pyx_t_1);
6192  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
6193  }
6194  for (;;) {
6195  if (likely(!__pyx_t_3)) {
6196  if (likely(PyList_CheckExact(__pyx_t_1))) {
6197  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
6198  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6199  __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)
6200  #else
6201  __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)
6202  __Pyx_GOTREF(__pyx_t_4);
6203  #endif
6204  } else {
6205  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
6206  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6207  __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)
6208  #else
6209  __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)
6210  __Pyx_GOTREF(__pyx_t_4);
6211  #endif
6212  }
6213  } else {
6214  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6215  if (unlikely(!__pyx_t_4)) {
6216  PyObject* exc_type = PyErr_Occurred();
6217  if (exc_type) {
6218  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6219  else __PYX_ERR(0, 527, __pyx_L1_error)
6220  }
6221  break;
6222  }
6223  __Pyx_GOTREF(__pyx_t_4);
6224  }
6225  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6226  __pyx_t_4 = 0;
6227 
6228  /* "PyClical.pyx":528
6229  * cdef vector[scalar_t] v
6230  * for s in lst:
6231  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6232  * return v
6233  *
6234  */
6235  __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)
6236  try {
6237  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6238  } catch(...) {
6239  __Pyx_CppExn2PyErr();
6240  __PYX_ERR(0, 528, __pyx_L1_error)
6241  }
6242 
6243  /* "PyClical.pyx":527
6244  * """
6245  * cdef vector[scalar_t] v
6246  * for s in lst: # <<<<<<<<<<<<<<
6247  * v.push_back(<scalar_t>s)
6248  * return v
6249  */
6250  }
6251  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6252 
6253  /* "PyClical.pyx":529
6254  * for s in lst:
6255  * v.push_back(<scalar_t>s)
6256  * return v # <<<<<<<<<<<<<<
6257  *
6258  * # Forward reference.
6259  */
6260  __pyx_r = __pyx_v_v;
6261  goto __pyx_L0;
6262 
6263  /* "PyClical.pyx":522
6264  * return glucat.max_pos( toIndexSet(obj) )
6265  *
6266  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6267  * """
6268  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6269  */
6270 
6271  /* function exit code */
6272  __pyx_L1_error:;
6273  __Pyx_XDECREF(__pyx_t_1);
6274  __Pyx_XDECREF(__pyx_t_4);
6275  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6276  __Pyx_pretend_to_initialize(&__pyx_r);
6277  __pyx_L0:;
6278  __Pyx_XDECREF(__pyx_v_s);
6279  __Pyx_RefNannyFinishContext();
6280  return __pyx_r;
6281  }
6282 
6283  /* "PyClical.pyx":534
6284  * cdef class clifford
6285  *
6286  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6287  * return clifford(obj).instance[0]
6288  *
6289  */
6290 
6291  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6292  Clifford __pyx_r;
6293  __Pyx_RefNannyDeclarations
6294  PyObject *__pyx_t_1 = NULL;
6295  int __pyx_lineno = 0;
6296  const char *__pyx_filename = NULL;
6297  int __pyx_clineno = 0;
6298  __Pyx_RefNannySetupContext("toClifford", 0);
6299 
6300  /* "PyClical.pyx":535
6301  *
6302  * cdef inline Clifford toClifford(obj):
6303  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6304  *
6305  * cdef class clifford:
6306  */
6307  __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)
6308  __Pyx_GOTREF(__pyx_t_1);
6309  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6310  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6311  goto __pyx_L0;
6312 
6313  /* "PyClical.pyx":534
6314  * cdef class clifford
6315  *
6316  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6317  * return clifford(obj).instance[0]
6318  *
6319  */
6320 
6321  /* function exit code */
6322  __pyx_L1_error:;
6323  __Pyx_XDECREF(__pyx_t_1);
6324  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6325  __Pyx_pretend_to_initialize(&__pyx_r);
6326  __pyx_L0:;
6327  __Pyx_RefNannyFinishContext();
6328  return __pyx_r;
6329  }
6330 
6331  /* "PyClical.pyx":543
6332  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6333  *
6334  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6335  * """
6336  * Wrap an instance of the C++ class Clifford.
6337  */
6338 
6339  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6340  PyObject *__pyx_r = NULL;
6341  __Pyx_RefNannyDeclarations
6342  __Pyx_RefNannySetupContext("wrap", 0);
6343 
6344  /* "PyClical.pyx":547
6345  * Wrap an instance of the C++ class Clifford.
6346  * """
6347  * self.instance[0] = other # <<<<<<<<<<<<<<
6348  * return self
6349  *
6350  */
6351  (__pyx_v_self->instance[0]) = __pyx_v_other;
6352 
6353  /* "PyClical.pyx":548
6354  * """
6355  * self.instance[0] = other
6356  * return self # <<<<<<<<<<<<<<
6357  *
6358  * cdef inline Clifford unwrap(clifford self):
6359  */
6360  __Pyx_XDECREF(__pyx_r);
6361  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6362  __pyx_r = ((PyObject *)__pyx_v_self);
6363  goto __pyx_L0;
6364 
6365  /* "PyClical.pyx":543
6366  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6367  *
6368  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6369  * """
6370  * Wrap an instance of the C++ class Clifford.
6371  */
6372 
6373  /* function exit code */
6374  __pyx_L0:;
6375  __Pyx_XGIVEREF(__pyx_r);
6376  __Pyx_RefNannyFinishContext();
6377  return __pyx_r;
6378  }
6379 
6380  /* "PyClical.pyx":550
6381  * return self
6382  *
6383  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6384  * """
6385  * Return the wrapped C++ Clifford instance.
6386  */
6387 
6388  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6389  Clifford __pyx_r;
6390  __Pyx_RefNannyDeclarations
6391  __Pyx_RefNannySetupContext("unwrap", 0);
6392 
6393  /* "PyClical.pyx":554
6394  * Return the wrapped C++ Clifford instance.
6395  * """
6396  * return self.instance[0] # <<<<<<<<<<<<<<
6397  *
6398  * cpdef copy(clifford self):
6399  */
6400  __pyx_r = (__pyx_v_self->instance[0]);
6401  goto __pyx_L0;
6402 
6403  /* "PyClical.pyx":550
6404  * return self
6405  *
6406  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6407  * """
6408  * Return the wrapped C++ Clifford instance.
6409  */
6410 
6411  /* function exit code */
6412  __pyx_L0:;
6413  __Pyx_RefNannyFinishContext();
6414  return __pyx_r;
6415  }
6416 
6417  /* "PyClical.pyx":556
6418  * return self.instance[0]
6419  *
6420  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6421  * """
6422  * Copy this clifford object.
6423  */
6424 
6425  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6426  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6427  PyObject *__pyx_r = NULL;
6428  __Pyx_RefNannyDeclarations
6429  PyObject *__pyx_t_1 = NULL;
6430  PyObject *__pyx_t_2 = NULL;
6431  PyObject *__pyx_t_3 = NULL;
6432  PyObject *__pyx_t_4 = NULL;
6433  int __pyx_lineno = 0;
6434  const char *__pyx_filename = NULL;
6435  int __pyx_clineno = 0;
6436  __Pyx_RefNannySetupContext("copy", 0);
6437  /* Check if called by wrapper */
6438  if (unlikely(__pyx_skip_dispatch)) ;
6439  /* Check if overridden in Python */
6440  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)))) {
6441  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6442  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6443  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6444  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6445  #endif
6446  __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)
6447  __Pyx_GOTREF(__pyx_t_1);
6448  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6449  __Pyx_XDECREF(__pyx_r);
6450  __Pyx_INCREF(__pyx_t_1);
6451  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6452  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6453  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6454  if (likely(__pyx_t_4)) {
6455  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6456  __Pyx_INCREF(__pyx_t_4);
6457  __Pyx_INCREF(function);
6458  __Pyx_DECREF_SET(__pyx_t_3, function);
6459  }
6460  }
6461  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6462  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6463  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
6464  __Pyx_GOTREF(__pyx_t_2);
6465  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6466  __pyx_r = __pyx_t_2;
6467  __pyx_t_2 = 0;
6468  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6469  goto __pyx_L0;
6470  }
6471  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6472  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6473  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6474  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6475  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6476  }
6477  #endif
6478  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6479  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6480  }
6481  #endif
6482  }
6483 
6484  /* "PyClical.pyx":563
6485  * {2}
6486  * """
6487  * return clifford(self) # <<<<<<<<<<<<<<
6488  *
6489  * def __cinit__(self, other = 0, ixt = None):
6490  */
6491  __Pyx_XDECREF(__pyx_r);
6492  __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)
6493  __Pyx_GOTREF(__pyx_t_1);
6494  __pyx_r = __pyx_t_1;
6495  __pyx_t_1 = 0;
6496  goto __pyx_L0;
6497 
6498  /* "PyClical.pyx":556
6499  * return self.instance[0]
6500  *
6501  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6502  * """
6503  * Copy this clifford object.
6504  */
6505 
6506  /* function exit code */
6507  __pyx_L1_error:;
6508  __Pyx_XDECREF(__pyx_t_1);
6509  __Pyx_XDECREF(__pyx_t_2);
6510  __Pyx_XDECREF(__pyx_t_3);
6511  __Pyx_XDECREF(__pyx_t_4);
6512  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6513  __pyx_r = 0;
6514  __pyx_L0:;
6515  __Pyx_XGIVEREF(__pyx_r);
6516  __Pyx_RefNannyFinishContext();
6517  return __pyx_r;
6518  }
6519 
6520  /* Python wrapper */
6521  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6522  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 ";
6523  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6524  PyObject *__pyx_r = 0;
6525  __Pyx_RefNannyDeclarations
6526  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6527  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6528 
6529  /* function exit code */
6530  __Pyx_RefNannyFinishContext();
6531  return __pyx_r;
6532  }
6533 
6534  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6535  PyObject *__pyx_r = NULL;
6536  __Pyx_RefNannyDeclarations
6537  PyObject *__pyx_t_1 = NULL;
6538  int __pyx_lineno = 0;
6539  const char *__pyx_filename = NULL;
6540  int __pyx_clineno = 0;
6541  __Pyx_RefNannySetupContext("copy", 0);
6542  __Pyx_XDECREF(__pyx_r);
6543  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
6544  __Pyx_GOTREF(__pyx_t_1);
6545  __pyx_r = __pyx_t_1;
6546  __pyx_t_1 = 0;
6547  goto __pyx_L0;
6548 
6549  /* function exit code */
6550  __pyx_L1_error:;
6551  __Pyx_XDECREF(__pyx_t_1);
6552  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6553  __pyx_r = NULL;
6554  __pyx_L0:;
6555  __Pyx_XGIVEREF(__pyx_r);
6556  __Pyx_RefNannyFinishContext();
6557  return __pyx_r;
6558  }
6559 
6560  /* "PyClical.pyx":565
6561  * return clifford(self)
6562  *
6563  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6564  * """
6565  * Construct an object of type clifford.
6566  */
6567 
6568  /* Python wrapper */
6569  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6570  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6571  PyObject *__pyx_v_other = 0;
6572  PyObject *__pyx_v_ixt = 0;
6573  int __pyx_lineno = 0;
6574  const char *__pyx_filename = NULL;
6575  int __pyx_clineno = 0;
6576  int __pyx_r;
6577  __Pyx_RefNannyDeclarations
6578  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6579  {
6580  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6581  PyObject* values[2] = {0,0};
6582  values[0] = ((PyObject *)__pyx_int_0);
6583  values[1] = ((PyObject *)Py_None);
6584  if (unlikely(__pyx_kwds)) {
6585  Py_ssize_t kw_args;
6586  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6587  switch (pos_args) {
6588  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6589  CYTHON_FALLTHROUGH;
6590  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6591  CYTHON_FALLTHROUGH;
6592  case 0: break;
6593  default: goto __pyx_L5_argtuple_error;
6594  }
6595  kw_args = PyDict_Size(__pyx_kwds);
6596  switch (pos_args) {
6597  case 0:
6598  if (kw_args > 0) {
6599  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6600  if (value) { values[0] = value; kw_args--; }
6601  }
6602  CYTHON_FALLTHROUGH;
6603  case 1:
6604  if (kw_args > 0) {
6605  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6606  if (value) { values[1] = value; kw_args--; }
6607  }
6608  }
6609  if (unlikely(kw_args > 0)) {
6610  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 565, __pyx_L3_error)
6611  }
6612  } else {
6613  switch (PyTuple_GET_SIZE(__pyx_args)) {
6614  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6615  CYTHON_FALLTHROUGH;
6616  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6617  CYTHON_FALLTHROUGH;
6618  case 0: break;
6619  default: goto __pyx_L5_argtuple_error;
6620  }
6621  }
6622  __pyx_v_other = values[0];
6623  __pyx_v_ixt = values[1];
6624  }
6625  goto __pyx_L4_argument_unpacking_done;
6626  __pyx_L5_argtuple_error:;
6627  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 565, __pyx_L3_error)
6628  __pyx_L3_error:;
6629  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6630  __Pyx_RefNannyFinishContext();
6631  return -1;
6632  __pyx_L4_argument_unpacking_done:;
6633  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6634 
6635  /* function exit code */
6636  __Pyx_RefNannyFinishContext();
6637  return __pyx_r;
6638  }
6639 
6640  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6641  PyObject *__pyx_v_error_msg_prefix = NULL;
6642  PyObject *__pyx_v_bother = NULL;
6643  PyObject *__pyx_v_err = NULL;
6644  int __pyx_r;
6645  __Pyx_RefNannyDeclarations
6646  int __pyx_t_1;
6647  int __pyx_t_2;
6648  PyObject *__pyx_t_3 = NULL;
6649  PyObject *__pyx_t_4 = NULL;
6650  PyObject *__pyx_t_5 = NULL;
6651  Clifford *__pyx_t_6;
6652  PyObject *__pyx_t_7 = NULL;
6653  PyObject *__pyx_t_8 = NULL;
6654  scalar_t __pyx_t_9;
6655  PyObject *__pyx_t_10 = NULL;
6656  PyObject *__pyx_t_11 = NULL;
6657  PyObject *__pyx_t_12 = NULL;
6658  PyObject *__pyx_t_13 = NULL;
6659  char *__pyx_t_14;
6660  int __pyx_t_15;
6661  PyObject *__pyx_t_16 = NULL;
6662  PyObject *__pyx_t_17 = NULL;
6663  PyObject *__pyx_t_18 = NULL;
6664  int __pyx_t_19;
6665  char const *__pyx_t_20;
6666  PyObject *__pyx_t_21 = NULL;
6667  PyObject *__pyx_t_22 = NULL;
6668  PyObject *__pyx_t_23 = NULL;
6669  int __pyx_lineno = 0;
6670  const char *__pyx_filename = NULL;
6671  int __pyx_clineno = 0;
6672  __Pyx_RefNannySetupContext("__cinit__", 0);
6673 
6674  /* "PyClical.pyx":588
6675  * 2{1}+3{2}
6676  * """
6677  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6678  * if ixt is None:
6679  * try:
6680  */
6681  __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_clifford_objec);
6682  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_clifford_objec;
6683 
6684  /* "PyClical.pyx":589
6685  * """
6686  * error_msg_prefix = "Cannot initialize clifford object from"
6687  * if ixt is None: # <<<<<<<<<<<<<<
6688  * try:
6689  * if isinstance(other, clifford):
6690  */
6691  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6692  __pyx_t_2 = (__pyx_t_1 != 0);
6693  if (__pyx_t_2) {
6694 
6695  /* "PyClical.pyx":590
6696  * error_msg_prefix = "Cannot initialize clifford object from"
6697  * if ixt is None:
6698  * try: # <<<<<<<<<<<<<<
6699  * if isinstance(other, clifford):
6700  * self.instance = new Clifford((<clifford>other).unwrap())
6701  */
6702  {
6703  __Pyx_PyThreadState_declare
6704  __Pyx_PyThreadState_assign
6705  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6706  __Pyx_XGOTREF(__pyx_t_3);
6707  __Pyx_XGOTREF(__pyx_t_4);
6708  __Pyx_XGOTREF(__pyx_t_5);
6709  /*try:*/ {
6710 
6711  /* "PyClical.pyx":591
6712  * if ixt is None:
6713  * try:
6714  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6715  * self.instance = new Clifford((<clifford>other).unwrap())
6716  * elif isinstance(other, index_set):
6717  */
6718  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6719  __pyx_t_1 = (__pyx_t_2 != 0);
6720  if (__pyx_t_1) {
6721 
6722  /* "PyClical.pyx":592
6723  * try:
6724  * if isinstance(other, clifford):
6725  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6726  * elif isinstance(other, index_set):
6727  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6728  */
6729  try {
6730  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6731  } catch(...) {
6732  __Pyx_CppExn2PyErr();
6733  __PYX_ERR(0, 592, __pyx_L4_error)
6734  }
6735  __pyx_v_self->instance = __pyx_t_6;
6736 
6737  /* "PyClical.pyx":591
6738  * if ixt is None:
6739  * try:
6740  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6741  * self.instance = new Clifford((<clifford>other).unwrap())
6742  * elif isinstance(other, index_set):
6743  */
6744  goto __pyx_L10;
6745  }
6746 
6747  /* "PyClical.pyx":593
6748  * if isinstance(other, clifford):
6749  * self.instance = new Clifford((<clifford>other).unwrap())
6750  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6751  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6752  * elif isinstance(other, numbers.Real):
6753  */
6754  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6755  __pyx_t_2 = (__pyx_t_1 != 0);
6756  if (__pyx_t_2) {
6757 
6758  /* "PyClical.pyx":594
6759  * self.instance = new Clifford((<clifford>other).unwrap())
6760  * elif isinstance(other, index_set):
6761  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6762  * elif isinstance(other, numbers.Real):
6763  * self.instance = new Clifford(<scalar_t>other)
6764  */
6765  try {
6766  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6767  } catch(...) {
6768  __Pyx_CppExn2PyErr();
6769  __PYX_ERR(0, 594, __pyx_L4_error)
6770  }
6771  __pyx_v_self->instance = __pyx_t_6;
6772 
6773  /* "PyClical.pyx":593
6774  * if isinstance(other, clifford):
6775  * self.instance = new Clifford((<clifford>other).unwrap())
6776  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6777  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6778  * elif isinstance(other, numbers.Real):
6779  */
6780  goto __pyx_L10;
6781  }
6782 
6783  /* "PyClical.pyx":595
6784  * elif isinstance(other, index_set):
6785  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6786  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6787  * self.instance = new Clifford(<scalar_t>other)
6788  * elif isinstance(other, str):
6789  */
6790  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6791  __Pyx_GOTREF(__pyx_t_7);
6792  __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)
6793  __Pyx_GOTREF(__pyx_t_8);
6794  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6795  __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)
6796  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6797  __pyx_t_1 = (__pyx_t_2 != 0);
6798  if (__pyx_t_1) {
6799 
6800  /* "PyClical.pyx":596
6801  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6802  * elif isinstance(other, numbers.Real):
6803  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6804  * elif isinstance(other, str):
6805  * try:
6806  */
6807  __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)
6808  try {
6809  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6810  } catch(...) {
6811  __Pyx_CppExn2PyErr();
6812  __PYX_ERR(0, 596, __pyx_L4_error)
6813  }
6814  __pyx_v_self->instance = __pyx_t_6;
6815 
6816  /* "PyClical.pyx":595
6817  * elif isinstance(other, index_set):
6818  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6819  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6820  * self.instance = new Clifford(<scalar_t>other)
6821  * elif isinstance(other, str):
6822  */
6823  goto __pyx_L10;
6824  }
6825 
6826  /* "PyClical.pyx":597
6827  * elif isinstance(other, numbers.Real):
6828  * self.instance = new Clifford(<scalar_t>other)
6829  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6830  * try:
6831  * bother = other.encode("UTF-8")
6832  */
6833  __pyx_t_1 = PyUnicode_Check(__pyx_v_other);
6834  __pyx_t_2 = (__pyx_t_1 != 0);
6835  if (likely(__pyx_t_2)) {
6836 
6837  /* "PyClical.pyx":598
6838  * self.instance = new Clifford(<scalar_t>other)
6839  * elif isinstance(other, str):
6840  * try: # <<<<<<<<<<<<<<
6841  * bother = other.encode("UTF-8")
6842  * self.instance = new Clifford(<char *>bother)
6843  */
6844  {
6845  __Pyx_PyThreadState_declare
6846  __Pyx_PyThreadState_assign
6847  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6848  __Pyx_XGOTREF(__pyx_t_10);
6849  __Pyx_XGOTREF(__pyx_t_11);
6850  __Pyx_XGOTREF(__pyx_t_12);
6851  /*try:*/ {
6852 
6853  /* "PyClical.pyx":599
6854  * elif isinstance(other, str):
6855  * try:
6856  * bother = other.encode("UTF-8") # <<<<<<<<<<<<<<
6857  * self.instance = new Clifford(<char *>bother)
6858  * except RuntimeError:
6859  */
6860  __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)
6861  __Pyx_GOTREF(__pyx_t_7);
6862  __pyx_t_13 = NULL;
6863  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
6864  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
6865  if (likely(__pyx_t_13)) {
6866  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
6867  __Pyx_INCREF(__pyx_t_13);
6868  __Pyx_INCREF(function);
6869  __Pyx_DECREF_SET(__pyx_t_7, function);
6870  }
6871  }
6872  __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);
6873  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6874  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L11_error)
6875  __Pyx_GOTREF(__pyx_t_8);
6876  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6877  __pyx_v_bother = __pyx_t_8;
6878  __pyx_t_8 = 0;
6879 
6880  /* "PyClical.pyx":600
6881  * try:
6882  * bother = other.encode("UTF-8")
6883  * self.instance = new Clifford(<char *>bother) # <<<<<<<<<<<<<<
6884  * except RuntimeError:
6885  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6886  */
6887  __pyx_t_14 = __Pyx_PyObject_AsWritableString(__pyx_v_bother); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 600, __pyx_L11_error)
6888  try {
6889  __pyx_t_6 = new Clifford(((char *)__pyx_t_14));
6890  } catch(...) {
6891  __Pyx_CppExn2PyErr();
6892  __PYX_ERR(0, 600, __pyx_L11_error)
6893  }
6894  __pyx_v_self->instance = __pyx_t_6;
6895 
6896  /* "PyClical.pyx":598
6897  * self.instance = new Clifford(<scalar_t>other)
6898  * elif isinstance(other, str):
6899  * try: # <<<<<<<<<<<<<<
6900  * bother = other.encode("UTF-8")
6901  * self.instance = new Clifford(<char *>bother)
6902  */
6903  }
6904  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6905  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6906  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6907  goto __pyx_L16_try_end;
6908  __pyx_L11_error:;
6909  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6910  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6911  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6912 
6913  /* "PyClical.pyx":601
6914  * bother = other.encode("UTF-8")
6915  * self.instance = new Clifford(<char *>bother)
6916  * except RuntimeError: # <<<<<<<<<<<<<<
6917  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6918  * else:
6919  */
6920  __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6921  if (__pyx_t_15) {
6922  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6923  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 601, __pyx_L13_except_error)
6924  __Pyx_GOTREF(__pyx_t_8);
6925  __Pyx_GOTREF(__pyx_t_7);
6926  __Pyx_GOTREF(__pyx_t_13);
6927 
6928  /* "PyClical.pyx":602
6929  * self.instance = new Clifford(<char *>bother)
6930  * except RuntimeError:
6931  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6932  * else:
6933  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6934  */
6935  __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)
6936  __Pyx_GOTREF(__pyx_t_16);
6937  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 602, __pyx_L13_except_error)
6938  __Pyx_GOTREF(__pyx_t_17);
6939  __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)
6940  __Pyx_GOTREF(__pyx_t_18);
6941  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6942  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6943  __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)
6944  __Pyx_GOTREF(__pyx_t_17);
6945  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6946  __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)
6947  __Pyx_GOTREF(__pyx_t_18);
6948  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6949  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6950  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6951  __PYX_ERR(0, 602, __pyx_L13_except_error)
6952  }
6953  goto __pyx_L13_except_error;
6954  __pyx_L13_except_error:;
6955 
6956  /* "PyClical.pyx":598
6957  * self.instance = new Clifford(<scalar_t>other)
6958  * elif isinstance(other, str):
6959  * try: # <<<<<<<<<<<<<<
6960  * bother = other.encode("UTF-8")
6961  * self.instance = new Clifford(<char *>bother)
6962  */
6963  __Pyx_XGIVEREF(__pyx_t_10);
6964  __Pyx_XGIVEREF(__pyx_t_11);
6965  __Pyx_XGIVEREF(__pyx_t_12);
6966  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6967  goto __pyx_L4_error;
6968  __pyx_L16_try_end:;
6969  }
6970 
6971  /* "PyClical.pyx":597
6972  * elif isinstance(other, numbers.Real):
6973  * self.instance = new Clifford(<scalar_t>other)
6974  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6975  * try:
6976  * bother = other.encode("UTF-8")
6977  */
6978  goto __pyx_L10;
6979  }
6980 
6981  /* "PyClical.pyx":604
6982  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6983  * else:
6984  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6985  * except RuntimeError as err:
6986  * raise ValueError(error_msg_prefix + " " + str(type(other))
6987  */
6988  /*else*/ {
6989  __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)
6990  __Pyx_GOTREF(__pyx_t_13);
6991  __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)
6992  __Pyx_GOTREF(__pyx_t_7);
6993  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
6994  __Pyx_GOTREF(__pyx_t_8);
6995  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6996  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6997  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L4_error)
6998  __Pyx_GOTREF(__pyx_t_7);
6999  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7000  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
7001  __Pyx_GOTREF(__pyx_t_8);
7002  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7003  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
7004  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7005  __PYX_ERR(0, 604, __pyx_L4_error)
7006  }
7007  __pyx_L10:;
7008 
7009  /* "PyClical.pyx":590
7010  * error_msg_prefix = "Cannot initialize clifford object from"
7011  * if ixt is None:
7012  * try: # <<<<<<<<<<<<<<
7013  * if isinstance(other, clifford):
7014  * self.instance = new Clifford((<clifford>other).unwrap())
7015  */
7016  }
7017  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7018  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7019  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7020  goto __pyx_L9_try_end;
7021  __pyx_L4_error:;
7022  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7023  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
7024  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
7025  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
7026  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7027  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
7028 
7029  /* "PyClical.pyx":605
7030  * else:
7031  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7032  * except RuntimeError as err: # <<<<<<<<<<<<<<
7033  * raise ValueError(error_msg_prefix + " " + str(type(other))
7034  * + " value " + repr(other) + ":"
7035  */
7036  __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7037  if (__pyx_t_15) {
7038  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7039  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 605, __pyx_L6_except_error)
7040  __Pyx_GOTREF(__pyx_t_8);
7041  __Pyx_GOTREF(__pyx_t_7);
7042  __Pyx_GOTREF(__pyx_t_13);
7043  __Pyx_INCREF(__pyx_t_7);
7044  __pyx_v_err = __pyx_t_7;
7045  /*try:*/ {
7046 
7047  /* "PyClical.pyx":606
7048  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7049  * except RuntimeError as err:
7050  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
7051  * + " value " + repr(other) + ":"
7052  * + "\n\t" + str(err))
7053  */
7054  __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)
7055  __Pyx_GOTREF(__pyx_t_18);
7056  __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)
7057  __Pyx_GOTREF(__pyx_t_17);
7058  __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L24_error)
7059  __Pyx_GOTREF(__pyx_t_16);
7060  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7061  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7062 
7063  /* "PyClical.pyx":607
7064  * except RuntimeError as err:
7065  * raise ValueError(error_msg_prefix + " " + str(type(other))
7066  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
7067  * + "\n\t" + str(err))
7068  * elif isinstance(ixt, index_set):
7069  */
7070  __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)
7071  __Pyx_GOTREF(__pyx_t_17);
7072  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7073  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L24_error)
7074  __Pyx_GOTREF(__pyx_t_16);
7075  __pyx_t_18 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L24_error)
7076  __Pyx_GOTREF(__pyx_t_18);
7077  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7078  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7079  __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)
7080  __Pyx_GOTREF(__pyx_t_16);
7081  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7082 
7083  /* "PyClical.pyx":608
7084  * raise ValueError(error_msg_prefix + " " + str(type(other))
7085  * + " value " + repr(other) + ":"
7086  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7087  * elif isinstance(ixt, index_set):
7088  * if isinstance(other, numbers.Real):
7089  */
7090  __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)
7091  __Pyx_GOTREF(__pyx_t_18);
7092  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7093  __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 608, __pyx_L24_error)
7094  __Pyx_GOTREF(__pyx_t_16);
7095  __pyx_t_17 = __Pyx_PyUnicode_Concat(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 608, __pyx_L24_error)
7096  __Pyx_GOTREF(__pyx_t_17);
7097  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7098  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7099 
7100  /* "PyClical.pyx":606
7101  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7102  * except RuntimeError as err:
7103  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
7104  * + " value " + repr(other) + ":"
7105  * + "\n\t" + str(err))
7106  */
7107  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L24_error)
7108  __Pyx_GOTREF(__pyx_t_16);
7109  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7110  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
7111  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7112  __PYX_ERR(0, 606, __pyx_L24_error)
7113  }
7114 
7115  /* "PyClical.pyx":605
7116  * else:
7117  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7118  * except RuntimeError as err: # <<<<<<<<<<<<<<
7119  * raise ValueError(error_msg_prefix + " " + str(type(other))
7120  * + " value " + repr(other) + ":"
7121  */
7122  /*finally:*/ {
7123  __pyx_L24_error:;
7124  /*exception exit:*/{
7125  __Pyx_PyThreadState_declare
7126  __Pyx_PyThreadState_assign
7127  __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
7128  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
7129  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
7130  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
7131  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
7132  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);
7133  __Pyx_XGOTREF(__pyx_t_12);
7134  __Pyx_XGOTREF(__pyx_t_11);
7135  __Pyx_XGOTREF(__pyx_t_10);
7136  __Pyx_XGOTREF(__pyx_t_21);
7137  __Pyx_XGOTREF(__pyx_t_22);
7138  __Pyx_XGOTREF(__pyx_t_23);
7139  __pyx_t_15 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
7140  {
7141  __Pyx_DECREF(__pyx_v_err);
7142  __pyx_v_err = NULL;
7143  }
7144  if (PY_MAJOR_VERSION >= 3) {
7145  __Pyx_XGIVEREF(__pyx_t_21);
7146  __Pyx_XGIVEREF(__pyx_t_22);
7147  __Pyx_XGIVEREF(__pyx_t_23);
7148  __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
7149  }
7150  __Pyx_XGIVEREF(__pyx_t_12);
7151  __Pyx_XGIVEREF(__pyx_t_11);
7152  __Pyx_XGIVEREF(__pyx_t_10);
7153  __Pyx_ErrRestore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
7154  __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
7155  __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20;
7156  goto __pyx_L6_except_error;
7157  }
7158  }
7159  }
7160  goto __pyx_L6_except_error;
7161  __pyx_L6_except_error:;
7162 
7163  /* "PyClical.pyx":590
7164  * error_msg_prefix = "Cannot initialize clifford object from"
7165  * if ixt is None:
7166  * try: # <<<<<<<<<<<<<<
7167  * if isinstance(other, clifford):
7168  * self.instance = new Clifford((<clifford>other).unwrap())
7169  */
7170  __Pyx_XGIVEREF(__pyx_t_3);
7171  __Pyx_XGIVEREF(__pyx_t_4);
7172  __Pyx_XGIVEREF(__pyx_t_5);
7173  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7174  goto __pyx_L1_error;
7175  __pyx_L9_try_end:;
7176  }
7177 
7178  /* "PyClical.pyx":589
7179  * """
7180  * error_msg_prefix = "Cannot initialize clifford object from"
7181  * if ixt is None: # <<<<<<<<<<<<<<
7182  * try:
7183  * if isinstance(other, clifford):
7184  */
7185  goto __pyx_L3;
7186  }
7187 
7188  /* "PyClical.pyx":609
7189  * + " value " + repr(other) + ":"
7190  * + "\n\t" + str(err))
7191  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7192  * if isinstance(other, numbers.Real):
7193  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7194  */
7195  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7196  __pyx_t_1 = (__pyx_t_2 != 0);
7197  if (likely(__pyx_t_1)) {
7198 
7199  /* "PyClical.pyx":610
7200  * + "\n\t" + str(err))
7201  * elif isinstance(ixt, index_set):
7202  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
7203  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7204  * elif isinstance(other, collections.abc.Sequence):
7205  */
7206  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_numbers); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 610, __pyx_L1_error)
7207  __Pyx_GOTREF(__pyx_t_13);
7208  __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)
7209  __Pyx_GOTREF(__pyx_t_7);
7210  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7211  __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)
7212  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7213  __pyx_t_2 = (__pyx_t_1 != 0);
7214  if (__pyx_t_2) {
7215 
7216  /* "PyClical.pyx":611
7217  * elif isinstance(ixt, index_set):
7218  * if isinstance(other, numbers.Real):
7219  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
7220  * elif isinstance(other, collections.abc.Sequence):
7221  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7222  */
7223  __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)
7224  try {
7225  __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));
7226  } catch(...) {
7227  __Pyx_CppExn2PyErr();
7228  __PYX_ERR(0, 611, __pyx_L1_error)
7229  }
7230  __pyx_v_self->instance = __pyx_t_6;
7231 
7232  /* "PyClical.pyx":610
7233  * + "\n\t" + str(err))
7234  * elif isinstance(ixt, index_set):
7235  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
7236  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7237  * elif isinstance(other, collections.abc.Sequence):
7238  */
7239  goto __pyx_L30;
7240  }
7241 
7242  /* "PyClical.pyx":612
7243  * if isinstance(other, numbers.Real):
7244  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7245  * elif isinstance(other, collections.abc.Sequence): # <<<<<<<<<<<<<<
7246  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7247  * else:
7248  */
7249  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
7250  __Pyx_GOTREF(__pyx_t_7);
7251  __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)
7252  __Pyx_GOTREF(__pyx_t_13);
7253  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7254  __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)
7255  __Pyx_GOTREF(__pyx_t_7);
7256  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7257  __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)
7258  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7259  __pyx_t_1 = (__pyx_t_2 != 0);
7260  if (likely(__pyx_t_1)) {
7261 
7262  /* "PyClical.pyx":613
7263  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7264  * elif isinstance(other, collections.abc.Sequence):
7265  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7266  * else:
7267  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7268  */
7269  try {
7270  __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)));
7271  } catch(...) {
7272  __Pyx_CppExn2PyErr();
7273  __PYX_ERR(0, 613, __pyx_L1_error)
7274  }
7275  __pyx_v_self->instance = __pyx_t_6;
7276 
7277  /* "PyClical.pyx":612
7278  * if isinstance(other, numbers.Real):
7279  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7280  * elif isinstance(other, collections.abc.Sequence): # <<<<<<<<<<<<<<
7281  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7282  * else:
7283  */
7284  goto __pyx_L30;
7285  }
7286 
7287  /* "PyClical.pyx":615
7288  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7289  * else:
7290  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7291  * + ", " + repr(ixt) + ").")
7292  * else:
7293  */
7294  /*else*/ {
7295  __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)
7296  __Pyx_GOTREF(__pyx_t_7);
7297  __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)
7298  __Pyx_GOTREF(__pyx_t_13);
7299  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7300  __Pyx_GOTREF(__pyx_t_8);
7301  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7302  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7303 
7304  /* "PyClical.pyx":616
7305  * else:
7306  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7307  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
7308  * else:
7309  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7310  */
7311  __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)
7312  __Pyx_GOTREF(__pyx_t_13);
7313  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7314  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 616, __pyx_L1_error)
7315  __Pyx_GOTREF(__pyx_t_8);
7316  __pyx_t_7 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_13, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 616, __pyx_L1_error)
7317  __Pyx_GOTREF(__pyx_t_7);
7318  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7319  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7320  __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)
7321  __Pyx_GOTREF(__pyx_t_8);
7322  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7323 
7324  /* "PyClical.pyx":615
7325  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7326  * else:
7327  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7328  * + ", " + repr(ixt) + ").")
7329  * else:
7330  */
7331  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7332  __Pyx_GOTREF(__pyx_t_7);
7333  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7334  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7335  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7336  __PYX_ERR(0, 615, __pyx_L1_error)
7337  }
7338  __pyx_L30:;
7339 
7340  /* "PyClical.pyx":609
7341  * + " value " + repr(other) + ":"
7342  * + "\n\t" + str(err))
7343  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7344  * if isinstance(other, numbers.Real):
7345  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7346  */
7347  goto __pyx_L3;
7348  }
7349 
7350  /* "PyClical.pyx":618
7351  * + ", " + repr(ixt) + ").")
7352  * else:
7353  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7354  * + ", " + str(type(ixt)) + ").")
7355  *
7356  */
7357  /*else*/ {
7358  __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)
7359  __Pyx_GOTREF(__pyx_t_7);
7360  __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)
7361  __Pyx_GOTREF(__pyx_t_8);
7362  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 618, __pyx_L1_error)
7363  __Pyx_GOTREF(__pyx_t_13);
7364  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7365  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7366 
7367  /* "PyClical.pyx":619
7368  * else:
7369  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7370  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7371  *
7372  * def __dealloc__(self):
7373  */
7374  __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)
7375  __Pyx_GOTREF(__pyx_t_8);
7376  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7377  __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)
7378  __Pyx_GOTREF(__pyx_t_13);
7379  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error)
7380  __Pyx_GOTREF(__pyx_t_7);
7381  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7382  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7383  __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)
7384  __Pyx_GOTREF(__pyx_t_13);
7385  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7386 
7387  /* "PyClical.pyx":618
7388  * + ", " + repr(ixt) + ").")
7389  * else:
7390  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7391  * + ", " + str(type(ixt)) + ").")
7392  *
7393  */
7394  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7395  __Pyx_GOTREF(__pyx_t_7);
7396  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7397  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7398  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7399  __PYX_ERR(0, 618, __pyx_L1_error)
7400  }
7401  __pyx_L3:;
7402 
7403  /* "PyClical.pyx":565
7404  * return clifford(self)
7405  *
7406  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7407  * """
7408  * Construct an object of type clifford.
7409  */
7410 
7411  /* function exit code */
7412  __pyx_r = 0;
7413  goto __pyx_L0;
7414  __pyx_L1_error:;
7415  __Pyx_XDECREF(__pyx_t_7);
7416  __Pyx_XDECREF(__pyx_t_8);
7417  __Pyx_XDECREF(__pyx_t_13);
7418  __Pyx_XDECREF(__pyx_t_16);
7419  __Pyx_XDECREF(__pyx_t_17);
7420  __Pyx_XDECREF(__pyx_t_18);
7421  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7422  __pyx_r = -1;
7423  __pyx_L0:;
7424  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7425  __Pyx_XDECREF(__pyx_v_bother);
7426  __Pyx_XDECREF(__pyx_v_err);
7427  __Pyx_RefNannyFinishContext();
7428  return __pyx_r;
7429  }
7430 
7431  /* "PyClical.pyx":621
7432  * + ", " + str(type(ixt)) + ").")
7433  *
7434  * def __dealloc__(self): # <<<<<<<<<<<<<<
7435  * """
7436  * Clean up by deallocating the instance of C++ class Clifford.
7437  */
7438 
7439  /* Python wrapper */
7440  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7441  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7442  __Pyx_RefNannyDeclarations
7443  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7444  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7445 
7446  /* function exit code */
7447  __Pyx_RefNannyFinishContext();
7448  }
7449 
7450  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7451  __Pyx_RefNannyDeclarations
7452  __Pyx_RefNannySetupContext("__dealloc__", 0);
7453 
7454  /* "PyClical.pyx":625
7455  * Clean up by deallocating the instance of C++ class Clifford.
7456  * """
7457  * del self.instance # <<<<<<<<<<<<<<
7458  *
7459  * def __contains__(self, x):
7460  */
7461  delete __pyx_v_self->instance;
7462 
7463  /* "PyClical.pyx":621
7464  * + ", " + str(type(ixt)) + ").")
7465  *
7466  * def __dealloc__(self): # <<<<<<<<<<<<<<
7467  * """
7468  * Clean up by deallocating the instance of C++ class Clifford.
7469  */
7470 
7471  /* function exit code */
7472  __Pyx_RefNannyFinishContext();
7473  }
7474 
7475  /* "PyClical.pyx":627
7476  * del self.instance
7477  *
7478  * def __contains__(self, x): # <<<<<<<<<<<<<<
7479  * """
7480  * Not applicable.
7481  */
7482 
7483  /* Python wrapper */
7484  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7485  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 ";
7486  #if CYTHON_COMPILING_IN_CPYTHON
7487  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7488  #endif
7489  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7490  int __pyx_r;
7491  __Pyx_RefNannyDeclarations
7492  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7493  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7494 
7495  /* function exit code */
7496  __Pyx_RefNannyFinishContext();
7497  return __pyx_r;
7498  }
7499 
7500  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7501  int __pyx_r;
7502  __Pyx_RefNannyDeclarations
7503  PyObject *__pyx_t_1 = NULL;
7504  int __pyx_lineno = 0;
7505  const char *__pyx_filename = NULL;
7506  int __pyx_clineno = 0;
7507  __Pyx_RefNannySetupContext("__contains__", 0);
7508 
7509  /* "PyClical.pyx":636
7510  * TypeError: Not applicable.
7511  * """
7512  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7513  *
7514  * def __iter__(self):
7515  */
7516  __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)
7517  __Pyx_GOTREF(__pyx_t_1);
7518  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7519  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7520  __PYX_ERR(0, 636, __pyx_L1_error)
7521 
7522  /* "PyClical.pyx":627
7523  * del self.instance
7524  *
7525  * def __contains__(self, x): # <<<<<<<<<<<<<<
7526  * """
7527  * Not applicable.
7528  */
7529 
7530  /* function exit code */
7531  __pyx_L1_error:;
7532  __Pyx_XDECREF(__pyx_t_1);
7533  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7534  __pyx_r = -1;
7535  __Pyx_RefNannyFinishContext();
7536  return __pyx_r;
7537  }
7538 
7539  /* "PyClical.pyx":638
7540  * raise TypeError("Not applicable.")
7541  *
7542  * def __iter__(self): # <<<<<<<<<<<<<<
7543  * """
7544  * Not applicable.
7545  */
7546 
7547  /* Python wrapper */
7548  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7549  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 ";
7550  #if CYTHON_COMPILING_IN_CPYTHON
7551  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7552  #endif
7553  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7554  PyObject *__pyx_r = 0;
7555  __Pyx_RefNannyDeclarations
7556  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7557  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7558 
7559  /* function exit code */
7560  __Pyx_RefNannyFinishContext();
7561  return __pyx_r;
7562  }
7563 
7564  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7565  PyObject *__pyx_r = NULL;
7566  __Pyx_RefNannyDeclarations
7567  PyObject *__pyx_t_1 = NULL;
7568  int __pyx_lineno = 0;
7569  const char *__pyx_filename = NULL;
7570  int __pyx_clineno = 0;
7571  __Pyx_RefNannySetupContext("__iter__", 0);
7572 
7573  /* "PyClical.pyx":647
7574  * TypeError: Not applicable.
7575  * """
7576  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7577  *
7578  * def reframe(self, ixt):
7579  */
7580  __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)
7581  __Pyx_GOTREF(__pyx_t_1);
7582  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7583  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7584  __PYX_ERR(0, 647, __pyx_L1_error)
7585 
7586  /* "PyClical.pyx":638
7587  * raise TypeError("Not applicable.")
7588  *
7589  * def __iter__(self): # <<<<<<<<<<<<<<
7590  * """
7591  * Not applicable.
7592  */
7593 
7594  /* function exit code */
7595  __pyx_L1_error:;
7596  __Pyx_XDECREF(__pyx_t_1);
7597  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7598  __pyx_r = NULL;
7599  __Pyx_XGIVEREF(__pyx_r);
7600  __Pyx_RefNannyFinishContext();
7601  return __pyx_r;
7602  }
7603 
7604  /* "PyClical.pyx":649
7605  * raise TypeError("Not applicable.")
7606  *
7607  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7608  * """
7609  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7610  */
7611 
7612  /* Python wrapper */
7613  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7614  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 ";
7615  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7616  PyObject *__pyx_r = 0;
7617  __Pyx_RefNannyDeclarations
7618  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7619  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7620 
7621  /* function exit code */
7622  __Pyx_RefNannyFinishContext();
7623  return __pyx_r;
7624  }
7625 
7626  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7627  PyObject *__pyx_v_error_msg_prefix = NULL;
7628  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7629  PyObject *__pyx_v_err = NULL;
7630  PyObject *__pyx_r = NULL;
7631  __Pyx_RefNannyDeclarations
7632  int __pyx_t_1;
7633  int __pyx_t_2;
7634  PyObject *__pyx_t_3 = NULL;
7635  PyObject *__pyx_t_4 = NULL;
7636  PyObject *__pyx_t_5 = NULL;
7637  PyObject *__pyx_t_6 = NULL;
7638  Clifford *__pyx_t_7;
7639  int __pyx_t_8;
7640  PyObject *__pyx_t_9 = NULL;
7641  PyObject *__pyx_t_10 = NULL;
7642  PyObject *__pyx_t_11 = NULL;
7643  PyObject *__pyx_t_12 = NULL;
7644  PyObject *__pyx_t_13 = NULL;
7645  int __pyx_t_14;
7646  char const *__pyx_t_15;
7647  PyObject *__pyx_t_16 = NULL;
7648  PyObject *__pyx_t_17 = NULL;
7649  PyObject *__pyx_t_18 = NULL;
7650  PyObject *__pyx_t_19 = NULL;
7651  PyObject *__pyx_t_20 = NULL;
7652  PyObject *__pyx_t_21 = NULL;
7653  int __pyx_lineno = 0;
7654  const char *__pyx_filename = NULL;
7655  int __pyx_clineno = 0;
7656  __Pyx_RefNannySetupContext("reframe", 0);
7657 
7658  /* "PyClical.pyx":659
7659  * True
7660  * """
7661  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7662  * if isinstance(ixt, index_set):
7663  * try:
7664  */
7665  __Pyx_INCREF(__pyx_kp_u_Cannot_reframe);
7666  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_reframe;
7667 
7668  /* "PyClical.pyx":660
7669  * """
7670  * error_msg_prefix = "Cannot reframe"
7671  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7672  * try:
7673  * result = clifford()
7674  */
7675  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7676  __pyx_t_2 = (__pyx_t_1 != 0);
7677  if (likely(__pyx_t_2)) {
7678 
7679  /* "PyClical.pyx":661
7680  * error_msg_prefix = "Cannot reframe"
7681  * if isinstance(ixt, index_set):
7682  * try: # <<<<<<<<<<<<<<
7683  * result = clifford()
7684  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7685  */
7686  {
7687  __Pyx_PyThreadState_declare
7688  __Pyx_PyThreadState_assign
7689  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7690  __Pyx_XGOTREF(__pyx_t_3);
7691  __Pyx_XGOTREF(__pyx_t_4);
7692  __Pyx_XGOTREF(__pyx_t_5);
7693  /*try:*/ {
7694 
7695  /* "PyClical.pyx":662
7696  * if isinstance(ixt, index_set):
7697  * try:
7698  * result = clifford() # <<<<<<<<<<<<<<
7699  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7700  * except RuntimeError as err:
7701  */
7702  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L4_error)
7703  __Pyx_GOTREF(__pyx_t_6);
7704  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7705  __pyx_t_6 = 0;
7706 
7707  /* "PyClical.pyx":663
7708  * try:
7709  * result = clifford()
7710  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7711  * except RuntimeError as err:
7712  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7713  */
7714  try {
7715  __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)));
7716  } catch(...) {
7717  __Pyx_CppExn2PyErr();
7718  __PYX_ERR(0, 663, __pyx_L4_error)
7719  }
7720  __pyx_v_result->instance = __pyx_t_7;
7721 
7722  /* "PyClical.pyx":661
7723  * error_msg_prefix = "Cannot reframe"
7724  * if isinstance(ixt, index_set):
7725  * try: # <<<<<<<<<<<<<<
7726  * result = clifford()
7727  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7728  */
7729  }
7730  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7731  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7732  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7733  goto __pyx_L9_try_end;
7734  __pyx_L4_error:;
7735  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7736 
7737  /* "PyClical.pyx":664
7738  * result = clifford()
7739  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7740  * except RuntimeError as err: # <<<<<<<<<<<<<<
7741  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7742  * + str(ixt) + ":"
7743  */
7744  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7745  if (__pyx_t_8) {
7746  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7747  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 664, __pyx_L6_except_error)
7748  __Pyx_GOTREF(__pyx_t_6);
7749  __Pyx_GOTREF(__pyx_t_9);
7750  __Pyx_GOTREF(__pyx_t_10);
7751  __Pyx_INCREF(__pyx_t_9);
7752  __pyx_v_err = __pyx_t_9;
7753  /*try:*/ {
7754 
7755  /* "PyClical.pyx":665
7756  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7757  * except RuntimeError as err:
7758  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7759  * + str(ixt) + ":"
7760  * + "\n\t" + str(err))
7761  */
7762  __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)
7763  __Pyx_GOTREF(__pyx_t_11);
7764  __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)
7765  __Pyx_GOTREF(__pyx_t_12);
7766  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
7767  __Pyx_GOTREF(__pyx_t_13);
7768  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7769  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7770  __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)
7771  __Pyx_GOTREF(__pyx_t_12);
7772  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7773 
7774  /* "PyClical.pyx":666
7775  * except RuntimeError as err:
7776  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7777  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7778  * + "\n\t" + str(err))
7779  * else:
7780  */
7781  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_ixt); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L15_error)
7782  __Pyx_GOTREF(__pyx_t_13);
7783  __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L15_error)
7784  __Pyx_GOTREF(__pyx_t_11);
7785  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7786  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7787  __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)
7788  __Pyx_GOTREF(__pyx_t_13);
7789  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7790 
7791  /* "PyClical.pyx":667
7792  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7793  * + str(ixt) + ":"
7794  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7795  * else:
7796  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7797  */
7798  __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)
7799  __Pyx_GOTREF(__pyx_t_11);
7800  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7801  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 667, __pyx_L15_error)
7802  __Pyx_GOTREF(__pyx_t_13);
7803  __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 667, __pyx_L15_error)
7804  __Pyx_GOTREF(__pyx_t_12);
7805  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7806  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7807 
7808  /* "PyClical.pyx":665
7809  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7810  * except RuntimeError as err:
7811  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7812  * + str(ixt) + ":"
7813  * + "\n\t" + str(err))
7814  */
7815  __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
7816  __Pyx_GOTREF(__pyx_t_13);
7817  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7818  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7819  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7820  __PYX_ERR(0, 665, __pyx_L15_error)
7821  }
7822 
7823  /* "PyClical.pyx":664
7824  * result = clifford()
7825  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7826  * except RuntimeError as err: # <<<<<<<<<<<<<<
7827  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7828  * + str(ixt) + ":"
7829  */
7830  /*finally:*/ {
7831  __pyx_L15_error:;
7832  /*exception exit:*/{
7833  __Pyx_PyThreadState_declare
7834  __Pyx_PyThreadState_assign
7835  __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
7836  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7837  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
7838  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7839  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
7840  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);
7841  __Pyx_XGOTREF(__pyx_t_16);
7842  __Pyx_XGOTREF(__pyx_t_17);
7843  __Pyx_XGOTREF(__pyx_t_18);
7844  __Pyx_XGOTREF(__pyx_t_19);
7845  __Pyx_XGOTREF(__pyx_t_20);
7846  __Pyx_XGOTREF(__pyx_t_21);
7847  __pyx_t_8 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
7848  {
7849  __Pyx_DECREF(__pyx_v_err);
7850  __pyx_v_err = NULL;
7851  }
7852  if (PY_MAJOR_VERSION >= 3) {
7853  __Pyx_XGIVEREF(__pyx_t_19);
7854  __Pyx_XGIVEREF(__pyx_t_20);
7855  __Pyx_XGIVEREF(__pyx_t_21);
7856  __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
7857  }
7858  __Pyx_XGIVEREF(__pyx_t_16);
7859  __Pyx_XGIVEREF(__pyx_t_17);
7860  __Pyx_XGIVEREF(__pyx_t_18);
7861  __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
7862  __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
7863  __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
7864  goto __pyx_L6_except_error;
7865  }
7866  }
7867  }
7868  goto __pyx_L6_except_error;
7869  __pyx_L6_except_error:;
7870 
7871  /* "PyClical.pyx":661
7872  * error_msg_prefix = "Cannot reframe"
7873  * if isinstance(ixt, index_set):
7874  * try: # <<<<<<<<<<<<<<
7875  * result = clifford()
7876  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7877  */
7878  __Pyx_XGIVEREF(__pyx_t_3);
7879  __Pyx_XGIVEREF(__pyx_t_4);
7880  __Pyx_XGIVEREF(__pyx_t_5);
7881  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7882  goto __pyx_L1_error;
7883  __pyx_L9_try_end:;
7884  }
7885 
7886  /* "PyClical.pyx":660
7887  * """
7888  * error_msg_prefix = "Cannot reframe"
7889  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7890  * try:
7891  * result = clifford()
7892  */
7893  goto __pyx_L3;
7894  }
7895 
7896  /* "PyClical.pyx":669
7897  * + "\n\t" + str(err))
7898  * else:
7899  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7900  * return result
7901  *
7902  */
7903  /*else*/ {
7904  __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)
7905  __Pyx_GOTREF(__pyx_t_10);
7906  __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)
7907  __Pyx_GOTREF(__pyx_t_9);
7908  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
7909  __Pyx_GOTREF(__pyx_t_6);
7910  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7911  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7912  __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)
7913  __Pyx_GOTREF(__pyx_t_9);
7914  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7915  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
7916  __Pyx_GOTREF(__pyx_t_6);
7917  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7918  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7919  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7920  __PYX_ERR(0, 669, __pyx_L1_error)
7921  }
7922  __pyx_L3:;
7923 
7924  /* "PyClical.pyx":670
7925  * else:
7926  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7927  * return result # <<<<<<<<<<<<<<
7928  *
7929  * def __richcmp__(lhs, rhs, int op):
7930  */
7931  __Pyx_XDECREF(__pyx_r);
7932  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7933  __pyx_r = ((PyObject *)__pyx_v_result);
7934  goto __pyx_L0;
7935 
7936  /* "PyClical.pyx":649
7937  * raise TypeError("Not applicable.")
7938  *
7939  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7940  * """
7941  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7942  */
7943 
7944  /* function exit code */
7945  __pyx_L1_error:;
7946  __Pyx_XDECREF(__pyx_t_6);
7947  __Pyx_XDECREF(__pyx_t_9);
7948  __Pyx_XDECREF(__pyx_t_10);
7949  __Pyx_XDECREF(__pyx_t_11);
7950  __Pyx_XDECREF(__pyx_t_12);
7951  __Pyx_XDECREF(__pyx_t_13);
7952  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7953  __pyx_r = NULL;
7954  __pyx_L0:;
7955  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7956  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7957  __Pyx_XDECREF(__pyx_v_err);
7958  __Pyx_XGIVEREF(__pyx_r);
7959  __Pyx_RefNannyFinishContext();
7960  return __pyx_r;
7961  }
7962 
7963  /* "PyClical.pyx":672
7964  * return result
7965  *
7966  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7967  * """
7968  * Compare objects of type clifford.
7969  */
7970 
7971  /* Python wrapper */
7972  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7973  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7974  PyObject *__pyx_r = 0;
7975  __Pyx_RefNannyDeclarations
7976  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7977  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7978 
7979  /* function exit code */
7980  __Pyx_RefNannyFinishContext();
7981  return __pyx_r;
7982  }
7983 
7984  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7985  PyObject *__pyx_r = NULL;
7986  __Pyx_RefNannyDeclarations
7987  int __pyx_t_1;
7988  int __pyx_t_2;
7989  int __pyx_t_3;
7990  PyObject *__pyx_t_4 = NULL;
7991  PyObject *__pyx_t_5 = NULL;
7992  PyObject *__pyx_t_6 = NULL;
7993  int __pyx_lineno = 0;
7994  const char *__pyx_filename = NULL;
7995  int __pyx_clineno = 0;
7996  __Pyx_RefNannySetupContext("__richcmp__", 0);
7997 
7998  /* "PyClical.pyx":691
7999  * True
8000  * """
8001  * if op == 2: # == # <<<<<<<<<<<<<<
8002  * if (lhs is None) or (rhs is None):
8003  * return bool(lhs is rhs)
8004  */
8005  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
8006  if (__pyx_t_1) {
8007 
8008  /* "PyClical.pyx":692
8009  * """
8010  * if op == 2: # ==
8011  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8012  * return bool(lhs is rhs)
8013  * else:
8014  */
8015  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
8016  __pyx_t_3 = (__pyx_t_2 != 0);
8017  if (!__pyx_t_3) {
8018  } else {
8019  __pyx_t_1 = __pyx_t_3;
8020  goto __pyx_L5_bool_binop_done;
8021  }
8022  __pyx_t_3 = (__pyx_v_rhs == Py_None);
8023  __pyx_t_2 = (__pyx_t_3 != 0);
8024  __pyx_t_1 = __pyx_t_2;
8025  __pyx_L5_bool_binop_done:;
8026  if (__pyx_t_1) {
8027 
8028  /* "PyClical.pyx":693
8029  * if op == 2: # ==
8030  * if (lhs is None) or (rhs is None):
8031  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
8032  * else:
8033  * return bool( toClifford(lhs) == toClifford(rhs) )
8034  */
8035  __Pyx_XDECREF(__pyx_r);
8036  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
8037  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error)
8038  __Pyx_GOTREF(__pyx_t_4);
8039  __pyx_r = __pyx_t_4;
8040  __pyx_t_4 = 0;
8041  goto __pyx_L0;
8042 
8043  /* "PyClical.pyx":692
8044  * """
8045  * if op == 2: # ==
8046  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8047  * return bool(lhs is rhs)
8048  * else:
8049  */
8050  }
8051 
8052  /* "PyClical.pyx":695
8053  * return bool(lhs is rhs)
8054  * else:
8055  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
8056  * elif op == 3: # !=
8057  * if (lhs is None) or (rhs is None):
8058  */
8059  /*else*/ {
8060  __Pyx_XDECREF(__pyx_r);
8061  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
8062  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error)
8063  __Pyx_GOTREF(__pyx_t_4);
8064  __pyx_r = __pyx_t_4;
8065  __pyx_t_4 = 0;
8066  goto __pyx_L0;
8067  }
8068 
8069  /* "PyClical.pyx":691
8070  * True
8071  * """
8072  * if op == 2: # == # <<<<<<<<<<<<<<
8073  * if (lhs is None) or (rhs is None):
8074  * return bool(lhs is rhs)
8075  */
8076  }
8077 
8078  /* "PyClical.pyx":696
8079  * else:
8080  * return bool( toClifford(lhs) == toClifford(rhs) )
8081  * elif op == 3: # != # <<<<<<<<<<<<<<
8082  * if (lhs is None) or (rhs is None):
8083  * return not bool(lhs is rhs)
8084  */
8085  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
8086  if (__pyx_t_1) {
8087 
8088  /* "PyClical.pyx":697
8089  * return bool( toClifford(lhs) == toClifford(rhs) )
8090  * elif op == 3: # !=
8091  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8092  * return not bool(lhs is rhs)
8093  * else:
8094  */
8095  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
8096  __pyx_t_3 = (__pyx_t_2 != 0);
8097  if (!__pyx_t_3) {
8098  } else {
8099  __pyx_t_1 = __pyx_t_3;
8100  goto __pyx_L8_bool_binop_done;
8101  }
8102  __pyx_t_3 = (__pyx_v_rhs == Py_None);
8103  __pyx_t_2 = (__pyx_t_3 != 0);
8104  __pyx_t_1 = __pyx_t_2;
8105  __pyx_L8_bool_binop_done:;
8106  if (__pyx_t_1) {
8107 
8108  /* "PyClical.pyx":698
8109  * elif op == 3: # !=
8110  * if (lhs is None) or (rhs is None):
8111  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
8112  * else:
8113  * return bool( toClifford(lhs) != toClifford(rhs) )
8114  */
8115  __Pyx_XDECREF(__pyx_r);
8116  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
8117  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
8118  __Pyx_GOTREF(__pyx_t_4);
8119  __pyx_r = __pyx_t_4;
8120  __pyx_t_4 = 0;
8121  goto __pyx_L0;
8122 
8123  /* "PyClical.pyx":697
8124  * return bool( toClifford(lhs) == toClifford(rhs) )
8125  * elif op == 3: # !=
8126  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8127  * return not bool(lhs is rhs)
8128  * else:
8129  */
8130  }
8131 
8132  /* "PyClical.pyx":700
8133  * return not bool(lhs is rhs)
8134  * else:
8135  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
8136  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8137  * raise TypeError("This comparison operator is not implemented for "
8138  */
8139  /*else*/ {
8140  __Pyx_XDECREF(__pyx_r);
8141  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
8142  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error)
8143  __Pyx_GOTREF(__pyx_t_4);
8144  __pyx_r = __pyx_t_4;
8145  __pyx_t_4 = 0;
8146  goto __pyx_L0;
8147  }
8148 
8149  /* "PyClical.pyx":696
8150  * else:
8151  * return bool( toClifford(lhs) == toClifford(rhs) )
8152  * elif op == 3: # != # <<<<<<<<<<<<<<
8153  * if (lhs is None) or (rhs is None):
8154  * return not bool(lhs is rhs)
8155  */
8156  }
8157 
8158  /* "PyClical.pyx":701
8159  * else:
8160  * return bool( toClifford(lhs) != toClifford(rhs) )
8161  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
8162  * raise TypeError("This comparison operator is not implemented for "
8163  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8164  */
8165  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
8166  __pyx_t_3 = (__pyx_t_2 != 0);
8167  if (!__pyx_t_3) {
8168  } else {
8169  __pyx_t_1 = __pyx_t_3;
8170  goto __pyx_L10_bool_binop_done;
8171  }
8172  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
8173  __pyx_t_2 = (__pyx_t_3 != 0);
8174  __pyx_t_1 = __pyx_t_2;
8175  __pyx_L10_bool_binop_done:;
8176  if (unlikely(__pyx_t_1)) {
8177 
8178  /* "PyClical.pyx":703
8179  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8180  * raise TypeError("This comparison operator is not implemented for "
8181  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
8182  * else:
8183  * return NotImplemented
8184  */
8185  __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)
8186  __Pyx_GOTREF(__pyx_t_4);
8187  __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)
8188  __Pyx_GOTREF(__pyx_t_5);
8189  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8190  __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)
8191  __Pyx_GOTREF(__pyx_t_4);
8192  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8193  __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)
8194  __Pyx_GOTREF(__pyx_t_5);
8195  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error)
8196  __Pyx_GOTREF(__pyx_t_6);
8197  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8198  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8199  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
8200  __Pyx_GOTREF(__pyx_t_5);
8201  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8202 
8203  /* "PyClical.pyx":702
8204  * return bool( toClifford(lhs) != toClifford(rhs) )
8205  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8206  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
8207  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8208  * else:
8209  */
8210  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
8211  __Pyx_GOTREF(__pyx_t_6);
8212  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8213  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
8214  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8215  __PYX_ERR(0, 702, __pyx_L1_error)
8216 
8217  /* "PyClical.pyx":701
8218  * else:
8219  * return bool( toClifford(lhs) != toClifford(rhs) )
8220  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
8221  * raise TypeError("This comparison operator is not implemented for "
8222  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8223  */
8224  }
8225 
8226  /* "PyClical.pyx":705
8227  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8228  * else:
8229  * return NotImplemented # <<<<<<<<<<<<<<
8230  *
8231  * def __getitem__(self, ixt):
8232  */
8233  /*else*/ {
8234  __Pyx_XDECREF(__pyx_r);
8235  __Pyx_INCREF(__pyx_builtin_NotImplemented);
8236  __pyx_r = __pyx_builtin_NotImplemented;
8237  goto __pyx_L0;
8238  }
8239 
8240  /* "PyClical.pyx":672
8241  * return result
8242  *
8243  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
8244  * """
8245  * Compare objects of type clifford.
8246  */
8247 
8248  /* function exit code */
8249  __pyx_L1_error:;
8250  __Pyx_XDECREF(__pyx_t_4);
8251  __Pyx_XDECREF(__pyx_t_5);
8252  __Pyx_XDECREF(__pyx_t_6);
8253  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8254  __pyx_r = NULL;
8255  __pyx_L0:;
8256  __Pyx_XGIVEREF(__pyx_r);
8257  __Pyx_RefNannyFinishContext();
8258  return __pyx_r;
8259  }
8260 
8261  /* "PyClical.pyx":707
8262  * return NotImplemented
8263  *
8264  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
8265  * """
8266  * Subscripting: map from index set to scalar coordinate.
8267  */
8268 
8269  /* Python wrapper */
8270  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
8271  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 ";
8272  #if CYTHON_COMPILING_IN_CPYTHON
8273  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
8274  #endif
8275  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
8276  PyObject *__pyx_r = 0;
8277  __Pyx_RefNannyDeclarations
8278  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
8279  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
8280 
8281  /* function exit code */
8282  __Pyx_RefNannyFinishContext();
8283  return __pyx_r;
8284  }
8285 
8286  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
8287  PyObject *__pyx_r = NULL;
8288  __Pyx_RefNannyDeclarations
8289  PyObject *__pyx_t_1 = NULL;
8290  int __pyx_lineno = 0;
8291  const char *__pyx_filename = NULL;
8292  int __pyx_clineno = 0;
8293  __Pyx_RefNannySetupContext("__getitem__", 0);
8294 
8295  /* "PyClical.pyx":720
8296  * 2.0
8297  * """
8298  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
8299  *
8300  * def __neg__(self):
8301  */
8302  __Pyx_XDECREF(__pyx_r);
8303  __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)
8304  __Pyx_GOTREF(__pyx_t_1);
8305  __pyx_r = __pyx_t_1;
8306  __pyx_t_1 = 0;
8307  goto __pyx_L0;
8308 
8309  /* "PyClical.pyx":707
8310  * return NotImplemented
8311  *
8312  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
8313  * """
8314  * Subscripting: map from index set to scalar coordinate.
8315  */
8316 
8317  /* function exit code */
8318  __pyx_L1_error:;
8319  __Pyx_XDECREF(__pyx_t_1);
8320  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8321  __pyx_r = NULL;
8322  __pyx_L0:;
8323  __Pyx_XGIVEREF(__pyx_r);
8324  __Pyx_RefNannyFinishContext();
8325  return __pyx_r;
8326  }
8327 
8328  /* "PyClical.pyx":722
8329  * return self.instance.getitem(toIndexSet(ixt))
8330  *
8331  * def __neg__(self): # <<<<<<<<<<<<<<
8332  * """
8333  * Unary -.
8334  */
8335 
8336  /* Python wrapper */
8337  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
8338  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ";
8339  #if CYTHON_COMPILING_IN_CPYTHON
8340  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
8341  #endif
8342  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
8343  PyObject *__pyx_r = 0;
8344  __Pyx_RefNannyDeclarations
8345  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
8346  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8347 
8348  /* function exit code */
8349  __Pyx_RefNannyFinishContext();
8350  return __pyx_r;
8351  }
8352 
8353  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8354  PyObject *__pyx_r = NULL;
8355  __Pyx_RefNannyDeclarations
8356  PyObject *__pyx_t_1 = NULL;
8357  PyObject *__pyx_t_2 = NULL;
8358  int __pyx_lineno = 0;
8359  const char *__pyx_filename = NULL;
8360  int __pyx_clineno = 0;
8361  __Pyx_RefNannySetupContext("__neg__", 0);
8362 
8363  /* "PyClical.pyx":729
8364  * -{1}
8365  * """
8366  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
8367  *
8368  * def __pos__(self):
8369  */
8370  __Pyx_XDECREF(__pyx_r);
8371  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
8372  __Pyx_GOTREF(__pyx_t_1);
8373  __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)
8374  __Pyx_GOTREF(__pyx_t_2);
8375  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8376  __pyx_r = __pyx_t_2;
8377  __pyx_t_2 = 0;
8378  goto __pyx_L0;
8379 
8380  /* "PyClical.pyx":722
8381  * return self.instance.getitem(toIndexSet(ixt))
8382  *
8383  * def __neg__(self): # <<<<<<<<<<<<<<
8384  * """
8385  * Unary -.
8386  */
8387 
8388  /* function exit code */
8389  __pyx_L1_error:;
8390  __Pyx_XDECREF(__pyx_t_1);
8391  __Pyx_XDECREF(__pyx_t_2);
8392  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8393  __pyx_r = NULL;
8394  __pyx_L0:;
8395  __Pyx_XGIVEREF(__pyx_r);
8396  __Pyx_RefNannyFinishContext();
8397  return __pyx_r;
8398  }
8399 
8400  /* "PyClical.pyx":731
8401  * return clifford().wrap( self.instance.neg() )
8402  *
8403  * def __pos__(self): # <<<<<<<<<<<<<<
8404  * """
8405  * Unary +.
8406  */
8407 
8408  /* Python wrapper */
8409  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8410  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ";
8411  #if CYTHON_COMPILING_IN_CPYTHON
8412  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8413  #endif
8414  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8415  PyObject *__pyx_r = 0;
8416  __Pyx_RefNannyDeclarations
8417  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8418  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8419 
8420  /* function exit code */
8421  __Pyx_RefNannyFinishContext();
8422  return __pyx_r;
8423  }
8424 
8425  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8426  PyObject *__pyx_r = NULL;
8427  __Pyx_RefNannyDeclarations
8428  PyObject *__pyx_t_1 = NULL;
8429  int __pyx_lineno = 0;
8430  const char *__pyx_filename = NULL;
8431  int __pyx_clineno = 0;
8432  __Pyx_RefNannySetupContext("__pos__", 0);
8433 
8434  /* "PyClical.pyx":738
8435  * {1}
8436  * """
8437  * return clifford(self) # <<<<<<<<<<<<<<
8438  *
8439  * def __add__(lhs, rhs):
8440  */
8441  __Pyx_XDECREF(__pyx_r);
8442  __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)
8443  __Pyx_GOTREF(__pyx_t_1);
8444  __pyx_r = __pyx_t_1;
8445  __pyx_t_1 = 0;
8446  goto __pyx_L0;
8447 
8448  /* "PyClical.pyx":731
8449  * return clifford().wrap( self.instance.neg() )
8450  *
8451  * def __pos__(self): # <<<<<<<<<<<<<<
8452  * """
8453  * Unary +.
8454  */
8455 
8456  /* function exit code */
8457  __pyx_L1_error:;
8458  __Pyx_XDECREF(__pyx_t_1);
8459  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8460  __pyx_r = NULL;
8461  __pyx_L0:;
8462  __Pyx_XGIVEREF(__pyx_r);
8463  __Pyx_RefNannyFinishContext();
8464  return __pyx_r;
8465  }
8466 
8467  /* "PyClical.pyx":740
8468  * return clifford(self)
8469  *
8470  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8471  * """
8472  * Geometric sum.
8473  */
8474 
8475  /* Python wrapper */
8476  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8477  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 ";
8478  #if CYTHON_COMPILING_IN_CPYTHON
8479  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8480  #endif
8481  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8482  PyObject *__pyx_r = 0;
8483  __Pyx_RefNannyDeclarations
8484  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8485  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8486 
8487  /* function exit code */
8488  __Pyx_RefNannyFinishContext();
8489  return __pyx_r;
8490  }
8491 
8492  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8493  PyObject *__pyx_r = NULL;
8494  __Pyx_RefNannyDeclarations
8495  PyObject *__pyx_t_1 = NULL;
8496  PyObject *__pyx_t_2 = NULL;
8497  int __pyx_lineno = 0;
8498  const char *__pyx_filename = NULL;
8499  int __pyx_clineno = 0;
8500  __Pyx_RefNannySetupContext("__add__", 0);
8501 
8502  /* "PyClical.pyx":749
8503  * {1}+{2}
8504  * """
8505  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8506  *
8507  * def __iadd__(self, rhs):
8508  */
8509  __Pyx_XDECREF(__pyx_r);
8510  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
8511  __Pyx_GOTREF(__pyx_t_1);
8512  __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)
8513  __Pyx_GOTREF(__pyx_t_2);
8514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8515  __pyx_r = __pyx_t_2;
8516  __pyx_t_2 = 0;
8517  goto __pyx_L0;
8518 
8519  /* "PyClical.pyx":740
8520  * return clifford(self)
8521  *
8522  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8523  * """
8524  * Geometric sum.
8525  */
8526 
8527  /* function exit code */
8528  __pyx_L1_error:;
8529  __Pyx_XDECREF(__pyx_t_1);
8530  __Pyx_XDECREF(__pyx_t_2);
8531  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8532  __pyx_r = NULL;
8533  __pyx_L0:;
8534  __Pyx_XGIVEREF(__pyx_r);
8535  __Pyx_RefNannyFinishContext();
8536  return __pyx_r;
8537  }
8538 
8539  /* "PyClical.pyx":751
8540  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8541  *
8542  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8543  * """
8544  * Geometric sum.
8545  */
8546 
8547  /* Python wrapper */
8548  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8549  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 ";
8550  #if CYTHON_COMPILING_IN_CPYTHON
8551  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8552  #endif
8553  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8554  PyObject *__pyx_r = 0;
8555  __Pyx_RefNannyDeclarations
8556  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8557  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8558 
8559  /* function exit code */
8560  __Pyx_RefNannyFinishContext();
8561  return __pyx_r;
8562  }
8563 
8564  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8565  PyObject *__pyx_r = NULL;
8566  __Pyx_RefNannyDeclarations
8567  PyObject *__pyx_t_1 = NULL;
8568  int __pyx_lineno = 0;
8569  const char *__pyx_filename = NULL;
8570  int __pyx_clineno = 0;
8571  __Pyx_RefNannySetupContext("__iadd__", 0);
8572 
8573  /* "PyClical.pyx":758
8574  * 1+{2}
8575  * """
8576  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8577  *
8578  * def __sub__(lhs, rhs):
8579  */
8580  __Pyx_XDECREF(__pyx_r);
8581  __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)
8582  __Pyx_GOTREF(__pyx_t_1);
8583  __pyx_r = __pyx_t_1;
8584  __pyx_t_1 = 0;
8585  goto __pyx_L0;
8586 
8587  /* "PyClical.pyx":751
8588  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8589  *
8590  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8591  * """
8592  * Geometric sum.
8593  */
8594 
8595  /* function exit code */
8596  __pyx_L1_error:;
8597  __Pyx_XDECREF(__pyx_t_1);
8598  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8599  __pyx_r = NULL;
8600  __pyx_L0:;
8601  __Pyx_XGIVEREF(__pyx_r);
8602  __Pyx_RefNannyFinishContext();
8603  return __pyx_r;
8604  }
8605 
8606  /* "PyClical.pyx":760
8607  * return self.wrap( self.unwrap() + toClifford(rhs) )
8608  *
8609  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8610  * """
8611  * Geometric difference.
8612  */
8613 
8614  /* Python wrapper */
8615  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8616  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 ";
8617  #if CYTHON_COMPILING_IN_CPYTHON
8618  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8619  #endif
8620  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8621  PyObject *__pyx_r = 0;
8622  __Pyx_RefNannyDeclarations
8623  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8624  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8625 
8626  /* function exit code */
8627  __Pyx_RefNannyFinishContext();
8628  return __pyx_r;
8629  }
8630 
8631  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8632  PyObject *__pyx_r = NULL;
8633  __Pyx_RefNannyDeclarations
8634  PyObject *__pyx_t_1 = NULL;
8635  PyObject *__pyx_t_2 = NULL;
8636  int __pyx_lineno = 0;
8637  const char *__pyx_filename = NULL;
8638  int __pyx_clineno = 0;
8639  __Pyx_RefNannySetupContext("__sub__", 0);
8640 
8641  /* "PyClical.pyx":769
8642  * {1}-{2}
8643  * """
8644  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8645  *
8646  * def __isub__(self, rhs):
8647  */
8648  __Pyx_XDECREF(__pyx_r);
8649  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)
8650  __Pyx_GOTREF(__pyx_t_1);
8651  __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)
8652  __Pyx_GOTREF(__pyx_t_2);
8653  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8654  __pyx_r = __pyx_t_2;
8655  __pyx_t_2 = 0;
8656  goto __pyx_L0;
8657 
8658  /* "PyClical.pyx":760
8659  * return self.wrap( self.unwrap() + toClifford(rhs) )
8660  *
8661  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8662  * """
8663  * Geometric difference.
8664  */
8665 
8666  /* function exit code */
8667  __pyx_L1_error:;
8668  __Pyx_XDECREF(__pyx_t_1);
8669  __Pyx_XDECREF(__pyx_t_2);
8670  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8671  __pyx_r = NULL;
8672  __pyx_L0:;
8673  __Pyx_XGIVEREF(__pyx_r);
8674  __Pyx_RefNannyFinishContext();
8675  return __pyx_r;
8676  }
8677 
8678  /* "PyClical.pyx":771
8679  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8680  *
8681  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8682  * """
8683  * Geometric difference.
8684  */
8685 
8686  /* Python wrapper */
8687  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8688  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 ";
8689  #if CYTHON_COMPILING_IN_CPYTHON
8690  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8691  #endif
8692  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8693  PyObject *__pyx_r = 0;
8694  __Pyx_RefNannyDeclarations
8695  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8696  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8697 
8698  /* function exit code */
8699  __Pyx_RefNannyFinishContext();
8700  return __pyx_r;
8701  }
8702 
8703  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8704  PyObject *__pyx_r = NULL;
8705  __Pyx_RefNannyDeclarations
8706  PyObject *__pyx_t_1 = NULL;
8707  int __pyx_lineno = 0;
8708  const char *__pyx_filename = NULL;
8709  int __pyx_clineno = 0;
8710  __Pyx_RefNannySetupContext("__isub__", 0);
8711 
8712  /* "PyClical.pyx":778
8713  * 1-{2}
8714  * """
8715  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8716  *
8717  * def __mul__(lhs, rhs):
8718  */
8719  __Pyx_XDECREF(__pyx_r);
8720  __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)
8721  __Pyx_GOTREF(__pyx_t_1);
8722  __pyx_r = __pyx_t_1;
8723  __pyx_t_1 = 0;
8724  goto __pyx_L0;
8725 
8726  /* "PyClical.pyx":771
8727  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8728  *
8729  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8730  * """
8731  * Geometric difference.
8732  */
8733 
8734  /* function exit code */
8735  __pyx_L1_error:;
8736  __Pyx_XDECREF(__pyx_t_1);
8737  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8738  __pyx_r = NULL;
8739  __pyx_L0:;
8740  __Pyx_XGIVEREF(__pyx_r);
8741  __Pyx_RefNannyFinishContext();
8742  return __pyx_r;
8743  }
8744 
8745  /* "PyClical.pyx":780
8746  * return self.wrap( self.unwrap() - toClifford(rhs) )
8747  *
8748  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8749  * """
8750  * Geometric product.
8751  */
8752 
8753  /* Python wrapper */
8754  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8755  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 ";
8756  #if CYTHON_COMPILING_IN_CPYTHON
8757  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8758  #endif
8759  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8760  PyObject *__pyx_r = 0;
8761  __Pyx_RefNannyDeclarations
8762  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8763  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8764 
8765  /* function exit code */
8766  __Pyx_RefNannyFinishContext();
8767  return __pyx_r;
8768  }
8769 
8770  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8771  PyObject *__pyx_r = NULL;
8772  __Pyx_RefNannyDeclarations
8773  PyObject *__pyx_t_1 = NULL;
8774  PyObject *__pyx_t_2 = NULL;
8775  int __pyx_lineno = 0;
8776  const char *__pyx_filename = NULL;
8777  int __pyx_clineno = 0;
8778  __Pyx_RefNannySetupContext("__mul__", 0);
8779 
8780  /* "PyClical.pyx":791
8781  * {2}
8782  * """
8783  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8784  *
8785  * def __imul__(self, rhs):
8786  */
8787  __Pyx_XDECREF(__pyx_r);
8788  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
8789  __Pyx_GOTREF(__pyx_t_1);
8790  __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)
8791  __Pyx_GOTREF(__pyx_t_2);
8792  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8793  __pyx_r = __pyx_t_2;
8794  __pyx_t_2 = 0;
8795  goto __pyx_L0;
8796 
8797  /* "PyClical.pyx":780
8798  * return self.wrap( self.unwrap() - toClifford(rhs) )
8799  *
8800  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8801  * """
8802  * Geometric product.
8803  */
8804 
8805  /* function exit code */
8806  __pyx_L1_error:;
8807  __Pyx_XDECREF(__pyx_t_1);
8808  __Pyx_XDECREF(__pyx_t_2);
8809  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8810  __pyx_r = NULL;
8811  __pyx_L0:;
8812  __Pyx_XGIVEREF(__pyx_r);
8813  __Pyx_RefNannyFinishContext();
8814  return __pyx_r;
8815  }
8816 
8817  /* "PyClical.pyx":793
8818  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8819  *
8820  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8821  * """
8822  * Geometric product.
8823  */
8824 
8825  /* Python wrapper */
8826  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8827  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 ";
8828  #if CYTHON_COMPILING_IN_CPYTHON
8829  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8830  #endif
8831  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8832  PyObject *__pyx_r = 0;
8833  __Pyx_RefNannyDeclarations
8834  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8835  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8836 
8837  /* function exit code */
8838  __Pyx_RefNannyFinishContext();
8839  return __pyx_r;
8840  }
8841 
8842  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8843  PyObject *__pyx_r = NULL;
8844  __Pyx_RefNannyDeclarations
8845  PyObject *__pyx_t_1 = NULL;
8846  int __pyx_lineno = 0;
8847  const char *__pyx_filename = NULL;
8848  int __pyx_clineno = 0;
8849  __Pyx_RefNannySetupContext("__imul__", 0);
8850 
8851  /* "PyClical.pyx":804
8852  * {2}
8853  * """
8854  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8855  *
8856  * def __mod__(lhs, rhs):
8857  */
8858  __Pyx_XDECREF(__pyx_r);
8859  __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)
8860  __Pyx_GOTREF(__pyx_t_1);
8861  __pyx_r = __pyx_t_1;
8862  __pyx_t_1 = 0;
8863  goto __pyx_L0;
8864 
8865  /* "PyClical.pyx":793
8866  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8867  *
8868  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8869  * """
8870  * Geometric product.
8871  */
8872 
8873  /* function exit code */
8874  __pyx_L1_error:;
8875  __Pyx_XDECREF(__pyx_t_1);
8876  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8877  __pyx_r = NULL;
8878  __pyx_L0:;
8879  __Pyx_XGIVEREF(__pyx_r);
8880  __Pyx_RefNannyFinishContext();
8881  return __pyx_r;
8882  }
8883 
8884  /* "PyClical.pyx":806
8885  * return self.wrap( self.unwrap() * toClifford(rhs) )
8886  *
8887  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8888  * """
8889  * Contraction.
8890  */
8891 
8892  /* Python wrapper */
8893  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8894  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 ";
8895  #if CYTHON_COMPILING_IN_CPYTHON
8896  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8897  #endif
8898  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8899  PyObject *__pyx_r = 0;
8900  __Pyx_RefNannyDeclarations
8901  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8902  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8903 
8904  /* function exit code */
8905  __Pyx_RefNannyFinishContext();
8906  return __pyx_r;
8907  }
8908 
8909  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8910  PyObject *__pyx_r = NULL;
8911  __Pyx_RefNannyDeclarations
8912  PyObject *__pyx_t_1 = NULL;
8913  PyObject *__pyx_t_2 = NULL;
8914  int __pyx_lineno = 0;
8915  const char *__pyx_filename = NULL;
8916  int __pyx_clineno = 0;
8917  __Pyx_RefNannySetupContext("__mod__", 0);
8918 
8919  /* "PyClical.pyx":819
8920  * {2}
8921  * """
8922  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8923  *
8924  * def __imod__(self, rhs):
8925  */
8926  __Pyx_XDECREF(__pyx_r);
8927  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
8928  __Pyx_GOTREF(__pyx_t_1);
8929  __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)
8930  __Pyx_GOTREF(__pyx_t_2);
8931  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8932  __pyx_r = __pyx_t_2;
8933  __pyx_t_2 = 0;
8934  goto __pyx_L0;
8935 
8936  /* "PyClical.pyx":806
8937  * return self.wrap( self.unwrap() * toClifford(rhs) )
8938  *
8939  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8940  * """
8941  * Contraction.
8942  */
8943 
8944  /* function exit code */
8945  __pyx_L1_error:;
8946  __Pyx_XDECREF(__pyx_t_1);
8947  __Pyx_XDECREF(__pyx_t_2);
8948  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8949  __pyx_r = NULL;
8950  __pyx_L0:;
8951  __Pyx_XGIVEREF(__pyx_r);
8952  __Pyx_RefNannyFinishContext();
8953  return __pyx_r;
8954  }
8955 
8956  /* "PyClical.pyx":821
8957  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8958  *
8959  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8960  * """
8961  * Contraction.
8962  */
8963 
8964  /* Python wrapper */
8965  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8966  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 ";
8967  #if CYTHON_COMPILING_IN_CPYTHON
8968  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8969  #endif
8970  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8971  PyObject *__pyx_r = 0;
8972  __Pyx_RefNannyDeclarations
8973  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8974  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8975 
8976  /* function exit code */
8977  __Pyx_RefNannyFinishContext();
8978  return __pyx_r;
8979  }
8980 
8981  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8982  PyObject *__pyx_r = NULL;
8983  __Pyx_RefNannyDeclarations
8984  PyObject *__pyx_t_1 = NULL;
8985  int __pyx_lineno = 0;
8986  const char *__pyx_filename = NULL;
8987  int __pyx_clineno = 0;
8988  __Pyx_RefNannySetupContext("__imod__", 0);
8989 
8990  /* "PyClical.pyx":834
8991  * {2}
8992  * """
8993  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8994  *
8995  * def __and__(lhs, rhs):
8996  */
8997  __Pyx_XDECREF(__pyx_r);
8998  __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)
8999  __Pyx_GOTREF(__pyx_t_1);
9000  __pyx_r = __pyx_t_1;
9001  __pyx_t_1 = 0;
9002  goto __pyx_L0;
9003 
9004  /* "PyClical.pyx":821
9005  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
9006  *
9007  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
9008  * """
9009  * Contraction.
9010  */
9011 
9012  /* function exit code */
9013  __pyx_L1_error:;
9014  __Pyx_XDECREF(__pyx_t_1);
9015  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9016  __pyx_r = NULL;
9017  __pyx_L0:;
9018  __Pyx_XGIVEREF(__pyx_r);
9019  __Pyx_RefNannyFinishContext();
9020  return __pyx_r;
9021  }
9022 
9023  /* "PyClical.pyx":836
9024  * return self.wrap( self.unwrap() % toClifford(rhs) )
9025  *
9026  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
9027  * """
9028  * Inner product.
9029  */
9030 
9031  /* Python wrapper */
9032  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9033  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 ";
9034  #if CYTHON_COMPILING_IN_CPYTHON
9035  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
9036  #endif
9037  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9038  PyObject *__pyx_r = 0;
9039  __Pyx_RefNannyDeclarations
9040  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
9041  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9042 
9043  /* function exit code */
9044  __Pyx_RefNannyFinishContext();
9045  return __pyx_r;
9046  }
9047 
9048  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9049  PyObject *__pyx_r = NULL;
9050  __Pyx_RefNannyDeclarations
9051  PyObject *__pyx_t_1 = NULL;
9052  PyObject *__pyx_t_2 = NULL;
9053  int __pyx_lineno = 0;
9054  const char *__pyx_filename = NULL;
9055  int __pyx_clineno = 0;
9056  __Pyx_RefNannySetupContext("__and__", 0);
9057 
9058  /* "PyClical.pyx":849
9059  * {2}
9060  * """
9061  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
9062  *
9063  * def __iand__(self, rhs):
9064  */
9065  __Pyx_XDECREF(__pyx_r);
9066  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
9067  __Pyx_GOTREF(__pyx_t_1);
9068  __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)
9069  __Pyx_GOTREF(__pyx_t_2);
9070  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9071  __pyx_r = __pyx_t_2;
9072  __pyx_t_2 = 0;
9073  goto __pyx_L0;
9074 
9075  /* "PyClical.pyx":836
9076  * return self.wrap( self.unwrap() % toClifford(rhs) )
9077  *
9078  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
9079  * """
9080  * Inner product.
9081  */
9082 
9083  /* function exit code */
9084  __pyx_L1_error:;
9085  __Pyx_XDECREF(__pyx_t_1);
9086  __Pyx_XDECREF(__pyx_t_2);
9087  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9088  __pyx_r = NULL;
9089  __pyx_L0:;
9090  __Pyx_XGIVEREF(__pyx_r);
9091  __Pyx_RefNannyFinishContext();
9092  return __pyx_r;
9093  }
9094 
9095  /* "PyClical.pyx":851
9096  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
9097  *
9098  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
9099  * """
9100  * Inner product.
9101  */
9102 
9103  /* Python wrapper */
9104  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9105  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 ";
9106  #if CYTHON_COMPILING_IN_CPYTHON
9107  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
9108  #endif
9109  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9110  PyObject *__pyx_r = 0;
9111  __Pyx_RefNannyDeclarations
9112  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
9113  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9114 
9115  /* function exit code */
9116  __Pyx_RefNannyFinishContext();
9117  return __pyx_r;
9118  }
9119 
9120  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9121  PyObject *__pyx_r = NULL;
9122  __Pyx_RefNannyDeclarations
9123  PyObject *__pyx_t_1 = NULL;
9124  int __pyx_lineno = 0;
9125  const char *__pyx_filename = NULL;
9126  int __pyx_clineno = 0;
9127  __Pyx_RefNannySetupContext("__iand__", 0);
9128 
9129  /* "PyClical.pyx":864
9130  * {2}
9131  * """
9132  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
9133  *
9134  * def __xor__(lhs, rhs):
9135  */
9136  __Pyx_XDECREF(__pyx_r);
9137  __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)
9138  __Pyx_GOTREF(__pyx_t_1);
9139  __pyx_r = __pyx_t_1;
9140  __pyx_t_1 = 0;
9141  goto __pyx_L0;
9142 
9143  /* "PyClical.pyx":851
9144  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
9145  *
9146  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
9147  * """
9148  * Inner product.
9149  */
9150 
9151  /* function exit code */
9152  __pyx_L1_error:;
9153  __Pyx_XDECREF(__pyx_t_1);
9154  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9155  __pyx_r = NULL;
9156  __pyx_L0:;
9157  __Pyx_XGIVEREF(__pyx_r);
9158  __Pyx_RefNannyFinishContext();
9159  return __pyx_r;
9160  }
9161 
9162  /* "PyClical.pyx":866
9163  * return self.wrap( self.unwrap() & toClifford(rhs) )
9164  *
9165  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
9166  * """
9167  * Outer product.
9168  */
9169 
9170  /* Python wrapper */
9171  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9172  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 ";
9173  #if CYTHON_COMPILING_IN_CPYTHON
9174  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
9175  #endif
9176  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9177  PyObject *__pyx_r = 0;
9178  __Pyx_RefNannyDeclarations
9179  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
9180  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9181 
9182  /* function exit code */
9183  __Pyx_RefNannyFinishContext();
9184  return __pyx_r;
9185  }
9186 
9187  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9188  PyObject *__pyx_r = NULL;
9189  __Pyx_RefNannyDeclarations
9190  PyObject *__pyx_t_1 = NULL;
9191  PyObject *__pyx_t_2 = NULL;
9192  int __pyx_lineno = 0;
9193  const char *__pyx_filename = NULL;
9194  int __pyx_clineno = 0;
9195  __Pyx_RefNannySetupContext("__xor__", 0);
9196 
9197  /* "PyClical.pyx":879
9198  * 0
9199  * """
9200  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
9201  *
9202  * def __ixor__(self, rhs):
9203  */
9204  __Pyx_XDECREF(__pyx_r);
9205  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
9206  __Pyx_GOTREF(__pyx_t_1);
9207  __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)
9208  __Pyx_GOTREF(__pyx_t_2);
9209  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9210  __pyx_r = __pyx_t_2;
9211  __pyx_t_2 = 0;
9212  goto __pyx_L0;
9213 
9214  /* "PyClical.pyx":866
9215  * return self.wrap( self.unwrap() & toClifford(rhs) )
9216  *
9217  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
9218  * """
9219  * Outer product.
9220  */
9221 
9222  /* function exit code */
9223  __pyx_L1_error:;
9224  __Pyx_XDECREF(__pyx_t_1);
9225  __Pyx_XDECREF(__pyx_t_2);
9226  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9227  __pyx_r = NULL;
9228  __pyx_L0:;
9229  __Pyx_XGIVEREF(__pyx_r);
9230  __Pyx_RefNannyFinishContext();
9231  return __pyx_r;
9232  }
9233 
9234  /* "PyClical.pyx":881
9235  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
9236  *
9237  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
9238  * """
9239  * Outer product.
9240  */
9241 
9242  /* Python wrapper */
9243  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9244  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 ";
9245  #if CYTHON_COMPILING_IN_CPYTHON
9246  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
9247  #endif
9248  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9249  PyObject *__pyx_r = 0;
9250  __Pyx_RefNannyDeclarations
9251  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
9252  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9253 
9254  /* function exit code */
9255  __Pyx_RefNannyFinishContext();
9256  return __pyx_r;
9257  }
9258 
9259  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9260  PyObject *__pyx_r = NULL;
9261  __Pyx_RefNannyDeclarations
9262  PyObject *__pyx_t_1 = NULL;
9263  int __pyx_lineno = 0;
9264  const char *__pyx_filename = NULL;
9265  int __pyx_clineno = 0;
9266  __Pyx_RefNannySetupContext("__ixor__", 0);
9267 
9268  /* "PyClical.pyx":894
9269  * 0
9270  * """
9271  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
9272  *
9273  * def __truediv__(lhs, rhs):
9274  */
9275  __Pyx_XDECREF(__pyx_r);
9276  __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)
9277  __Pyx_GOTREF(__pyx_t_1);
9278  __pyx_r = __pyx_t_1;
9279  __pyx_t_1 = 0;
9280  goto __pyx_L0;
9281 
9282  /* "PyClical.pyx":881
9283  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
9284  *
9285  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
9286  * """
9287  * Outer product.
9288  */
9289 
9290  /* function exit code */
9291  __pyx_L1_error:;
9292  __Pyx_XDECREF(__pyx_t_1);
9293  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9294  __pyx_r = NULL;
9295  __pyx_L0:;
9296  __Pyx_XGIVEREF(__pyx_r);
9297  __Pyx_RefNannyFinishContext();
9298  return __pyx_r;
9299  }
9300 
9301  /* "PyClical.pyx":896
9302  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
9303  *
9304  * def __truediv__(lhs, rhs): # <<<<<<<<<<<<<<
9305  * """
9306  * Geometric quotient.
9307  */
9308 
9309  /* Python wrapper */
9310  static PyObject *__pyx_pw_8PyClical_8clifford_45__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9311  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 ";
9312  #if CYTHON_COMPILING_IN_CPYTHON
9313  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__truediv__;
9314  #endif
9315  static PyObject *__pyx_pw_8PyClical_8clifford_45__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9316  PyObject *__pyx_r = 0;
9317  __Pyx_RefNannyDeclarations
9318  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
9319  __pyx_r = __pyx_pf_8PyClical_8clifford_44__truediv__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9320 
9321  /* function exit code */
9322  __Pyx_RefNannyFinishContext();
9323  return __pyx_r;
9324  }
9325 
9326  static PyObject *__pyx_pf_8PyClical_8clifford_44__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9327  PyObject *__pyx_r = NULL;
9328  __Pyx_RefNannyDeclarations
9329  PyObject *__pyx_t_1 = NULL;
9330  PyObject *__pyx_t_2 = NULL;
9331  int __pyx_lineno = 0;
9332  const char *__pyx_filename = NULL;
9333  int __pyx_clineno = 0;
9334  __Pyx_RefNannySetupContext("__truediv__", 0);
9335 
9336  /* "PyClical.pyx":909
9337  * -{2}
9338  * """
9339  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
9340  *
9341  * def __idiv__(self, rhs):
9342  */
9343  __Pyx_XDECREF(__pyx_r);
9344  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
9345  __Pyx_GOTREF(__pyx_t_1);
9346  __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)
9347  __Pyx_GOTREF(__pyx_t_2);
9348  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9349  __pyx_r = __pyx_t_2;
9350  __pyx_t_2 = 0;
9351  goto __pyx_L0;
9352 
9353  /* "PyClical.pyx":896
9354  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
9355  *
9356  * def __truediv__(lhs, rhs): # <<<<<<<<<<<<<<
9357  * """
9358  * Geometric quotient.
9359  */
9360 
9361  /* function exit code */
9362  __pyx_L1_error:;
9363  __Pyx_XDECREF(__pyx_t_1);
9364  __Pyx_XDECREF(__pyx_t_2);
9365  __Pyx_AddTraceback("PyClical.clifford.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9366  __pyx_r = NULL;
9367  __pyx_L0:;
9368  __Pyx_XGIVEREF(__pyx_r);
9369  __Pyx_RefNannyFinishContext();
9370  return __pyx_r;
9371  }
9372 
9373  /* "PyClical.pyx":911
9374  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9375  *
9376  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9377  * """
9378  * Geometric quotient.
9379  */
9380 
9381  /* Python wrapper */
9382  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9383  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9384  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 ";
9385  #if CYTHON_COMPILING_IN_CPYTHON
9386  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
9387  #endif
9388  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9389  PyObject *__pyx_r = 0;
9390  __Pyx_RefNannyDeclarations
9391  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
9392  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9393 
9394  /* function exit code */
9395  __Pyx_RefNannyFinishContext();
9396  return __pyx_r;
9397  }
9398  #endif
9400  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9401  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9402  PyObject *__pyx_r = NULL;
9403  __Pyx_RefNannyDeclarations
9404  PyObject *__pyx_t_1 = NULL;
9405  int __pyx_lineno = 0;
9406  const char *__pyx_filename = NULL;
9407  int __pyx_clineno = 0;
9408  __Pyx_RefNannySetupContext("__idiv__", 0);
9409 
9410  /* "PyClical.pyx":924
9411  * -{2}
9412  * """
9413  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
9414  *
9415  * def inv(self):
9416  */
9417  __Pyx_XDECREF(__pyx_r);
9418  __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)
9419  __Pyx_GOTREF(__pyx_t_1);
9420  __pyx_r = __pyx_t_1;
9421  __pyx_t_1 = 0;
9422  goto __pyx_L0;
9423 
9424  /* "PyClical.pyx":911
9425  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9426  *
9427  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9428  * """
9429  * Geometric quotient.
9430  */
9431 
9432  /* function exit code */
9433  __pyx_L1_error:;
9434  __Pyx_XDECREF(__pyx_t_1);
9435  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9436  __pyx_r = NULL;
9437  __pyx_L0:;
9438  __Pyx_XGIVEREF(__pyx_r);
9439  __Pyx_RefNannyFinishContext();
9440  return __pyx_r;
9441  }
9442  #endif
9444  /* "PyClical.pyx":926
9445  * return self.wrap( self.unwrap() / toClifford(rhs) )
9446  *
9447  * def inv(self): # <<<<<<<<<<<<<<
9448  * """
9449  * Geometric multiplicative inverse.
9450  */
9451 
9452  /* Python wrapper */
9453  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9454  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 ";
9455  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9456  PyObject *__pyx_r = 0;
9457  __Pyx_RefNannyDeclarations
9458  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9459  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9460 
9461  /* function exit code */
9462  __Pyx_RefNannyFinishContext();
9463  return __pyx_r;
9464  }
9465 
9466  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9467  PyObject *__pyx_r = NULL;
9468  __Pyx_RefNannyDeclarations
9469  PyObject *__pyx_t_1 = NULL;
9470  PyObject *__pyx_t_2 = NULL;
9471  int __pyx_lineno = 0;
9472  const char *__pyx_filename = NULL;
9473  int __pyx_clineno = 0;
9474  __Pyx_RefNannySetupContext("inv", 0);
9475 
9476  /* "PyClical.pyx":937
9477  * -{1,2}
9478  * """
9479  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9480  *
9481  * def __or__(lhs, rhs):
9482  */
9483  __Pyx_XDECREF(__pyx_r);
9484  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error)
9485  __Pyx_GOTREF(__pyx_t_1);
9486  __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)
9487  __Pyx_GOTREF(__pyx_t_2);
9488  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9489  __pyx_r = __pyx_t_2;
9490  __pyx_t_2 = 0;
9491  goto __pyx_L0;
9492 
9493  /* "PyClical.pyx":926
9494  * return self.wrap( self.unwrap() / toClifford(rhs) )
9495  *
9496  * def inv(self): # <<<<<<<<<<<<<<
9497  * """
9498  * Geometric multiplicative inverse.
9499  */
9500 
9501  /* function exit code */
9502  __pyx_L1_error:;
9503  __Pyx_XDECREF(__pyx_t_1);
9504  __Pyx_XDECREF(__pyx_t_2);
9505  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9506  __pyx_r = NULL;
9507  __pyx_L0:;
9508  __Pyx_XGIVEREF(__pyx_r);
9509  __Pyx_RefNannyFinishContext();
9510  return __pyx_r;
9511  }
9512 
9513  /* "PyClical.pyx":939
9514  * return clifford().wrap( self.instance.inv() )
9515  *
9516  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9517  * """
9518  * Transform left hand side, using right hand side as a transformation.
9519  */
9520 
9521  /* Python wrapper */
9522  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9523  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 ";
9524  #if CYTHON_COMPILING_IN_CPYTHON
9525  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9526  #endif
9527  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9528  PyObject *__pyx_r = 0;
9529  __Pyx_RefNannyDeclarations
9530  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9531  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9532 
9533  /* function exit code */
9534  __Pyx_RefNannyFinishContext();
9535  return __pyx_r;
9536  }
9537 
9538  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9539  PyObject *__pyx_r = NULL;
9540  __Pyx_RefNannyDeclarations
9541  PyObject *__pyx_t_1 = NULL;
9542  PyObject *__pyx_t_2 = NULL;
9543  int __pyx_lineno = 0;
9544  const char *__pyx_filename = NULL;
9545  int __pyx_clineno = 0;
9546  __Pyx_RefNannySetupContext("__or__", 0);
9547 
9548  /* "PyClical.pyx":948
9549  * -{1}
9550  * """
9551  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9552  *
9553  * def __ior__(self, rhs):
9554  */
9555  __Pyx_XDECREF(__pyx_r);
9556  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
9557  __Pyx_GOTREF(__pyx_t_1);
9558  __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)
9559  __Pyx_GOTREF(__pyx_t_2);
9560  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9561  __pyx_r = __pyx_t_2;
9562  __pyx_t_2 = 0;
9563  goto __pyx_L0;
9564 
9565  /* "PyClical.pyx":939
9566  * return clifford().wrap( self.instance.inv() )
9567  *
9568  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9569  * """
9570  * Transform left hand side, using right hand side as a transformation.
9571  */
9572 
9573  /* function exit code */
9574  __pyx_L1_error:;
9575  __Pyx_XDECREF(__pyx_t_1);
9576  __Pyx_XDECREF(__pyx_t_2);
9577  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9578  __pyx_r = NULL;
9579  __pyx_L0:;
9580  __Pyx_XGIVEREF(__pyx_r);
9581  __Pyx_RefNannyFinishContext();
9582  return __pyx_r;
9583  }
9584 
9585  /* "PyClical.pyx":950
9586  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9587  *
9588  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9589  * """
9590  * Transform left hand side, using right hand side as a transformation.
9591  */
9592 
9593  /* Python wrapper */
9594  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9595  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 ";
9596  #if CYTHON_COMPILING_IN_CPYTHON
9597  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9598  #endif
9599  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9600  PyObject *__pyx_r = 0;
9601  __Pyx_RefNannyDeclarations
9602  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9603  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9604 
9605  /* function exit code */
9606  __Pyx_RefNannyFinishContext();
9607  return __pyx_r;
9608  }
9609 
9610  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9611  PyObject *__pyx_r = NULL;
9612  __Pyx_RefNannyDeclarations
9613  PyObject *__pyx_t_1 = NULL;
9614  int __pyx_lineno = 0;
9615  const char *__pyx_filename = NULL;
9616  int __pyx_clineno = 0;
9617  __Pyx_RefNannySetupContext("__ior__", 0);
9618 
9619  /* "PyClical.pyx":959
9620  * -{1}
9621  * """
9622  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9623  *
9624  * def __pow__(self, m, dummy):
9625  */
9626  __Pyx_XDECREF(__pyx_r);
9627  __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)
9628  __Pyx_GOTREF(__pyx_t_1);
9629  __pyx_r = __pyx_t_1;
9630  __pyx_t_1 = 0;
9631  goto __pyx_L0;
9632 
9633  /* "PyClical.pyx":950
9634  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9635  *
9636  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9637  * """
9638  * Transform left hand side, using right hand side as a transformation.
9639  */
9640 
9641  /* function exit code */
9642  __pyx_L1_error:;
9643  __Pyx_XDECREF(__pyx_t_1);
9644  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9645  __pyx_r = NULL;
9646  __pyx_L0:;
9647  __Pyx_XGIVEREF(__pyx_r);
9648  __Pyx_RefNannyFinishContext();
9649  return __pyx_r;
9650  }
9651 
9652  /* "PyClical.pyx":961
9653  * return self.wrap( self.unwrap() | toClifford(rhs) )
9654  *
9655  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9656  * """
9657  * Power: self to the m.
9658  */
9659 
9660  /* Python wrapper */
9661  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9662  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 ";
9663  #if CYTHON_COMPILING_IN_CPYTHON
9664  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9665  #endif
9666  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9667  PyObject *__pyx_r = 0;
9668  __Pyx_RefNannyDeclarations
9669  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9670  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9671 
9672  /* function exit code */
9673  __Pyx_RefNannyFinishContext();
9674  return __pyx_r;
9675  }
9676 
9677  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9678  PyObject *__pyx_r = NULL;
9679  __Pyx_RefNannyDeclarations
9680  PyObject *__pyx_t_1 = NULL;
9681  int __pyx_lineno = 0;
9682  const char *__pyx_filename = NULL;
9683  int __pyx_clineno = 0;
9684  __Pyx_RefNannySetupContext("__pow__", 0);
9685 
9686  /* "PyClical.pyx":978
9687  * 1
9688  * """
9689  * return pow(self, m) # <<<<<<<<<<<<<<
9690  *
9691  * def pow(self, m):
9692  */
9693  __Pyx_XDECREF(__pyx_r);
9694  __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)
9695  __Pyx_GOTREF(__pyx_t_1);
9696  __pyx_r = __pyx_t_1;
9697  __pyx_t_1 = 0;
9698  goto __pyx_L0;
9699 
9700  /* "PyClical.pyx":961
9701  * return self.wrap( self.unwrap() | toClifford(rhs) )
9702  *
9703  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9704  * """
9705  * Power: self to the m.
9706  */
9707 
9708  /* function exit code */
9709  __pyx_L1_error:;
9710  __Pyx_XDECREF(__pyx_t_1);
9711  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9712  __pyx_r = NULL;
9713  __pyx_L0:;
9714  __Pyx_XGIVEREF(__pyx_r);
9715  __Pyx_RefNannyFinishContext();
9716  return __pyx_r;
9717  }
9718 
9719  /* "PyClical.pyx":980
9720  * return pow(self, m)
9721  *
9722  * def pow(self, m): # <<<<<<<<<<<<<<
9723  * """
9724  * Power: self to the m.
9725  */
9726 
9727  /* Python wrapper */
9728  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9729  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 ";
9730  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9731  PyObject *__pyx_r = 0;
9732  __Pyx_RefNannyDeclarations
9733  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9734  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9735 
9736  /* function exit code */
9737  __Pyx_RefNannyFinishContext();
9738  return __pyx_r;
9739  }
9740 
9741  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9742  PyObject *__pyx_r = NULL;
9743  __Pyx_RefNannyDeclarations
9744  PyObject *__pyx_t_1 = NULL;
9745  PyObject *__pyx_t_2 = NULL;
9746  int __pyx_t_3;
9747  int __pyx_t_4;
9748  int __pyx_t_5;
9749  int __pyx_lineno = 0;
9750  const char *__pyx_filename = NULL;
9751  int __pyx_clineno = 0;
9752  __Pyx_RefNannySetupContext("pow", 0);
9753 
9754  /* "PyClical.pyx":999
9755  * 1
9756  * """
9757  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9758  * return clifford().wrap( self.instance.pow(m) )
9759  * else:
9760  */
9761  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
9762  __Pyx_GOTREF(__pyx_t_1);
9763  __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)
9764  __Pyx_GOTREF(__pyx_t_2);
9765  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9766  __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)
9767  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9768  __pyx_t_4 = (__pyx_t_3 != 0);
9769  if (__pyx_t_4) {
9770 
9771  /* "PyClical.pyx":1000
9772  * """
9773  * if isinstance(m, numbers.Integral):
9774  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9775  * else:
9776  * return exp(m * log(self))
9777  */
9778  __Pyx_XDECREF(__pyx_r);
9779  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
9780  __Pyx_GOTREF(__pyx_t_2);
9781  __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)
9782  __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)
9783  __Pyx_GOTREF(__pyx_t_1);
9784  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9785  __pyx_r = __pyx_t_1;
9786  __pyx_t_1 = 0;
9787  goto __pyx_L0;
9788 
9789  /* "PyClical.pyx":999
9790  * 1
9791  * """
9792  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9793  * return clifford().wrap( self.instance.pow(m) )
9794  * else:
9795  */
9796  }
9797 
9798  /* "PyClical.pyx":1002
9799  * return clifford().wrap( self.instance.pow(m) )
9800  * else:
9801  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9802  *
9803  * def outer_pow(self, m):
9804  */
9805  /*else*/ {
9806  __Pyx_XDECREF(__pyx_r);
9807  __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)
9808  __Pyx_GOTREF(__pyx_t_1);
9809  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
9810  __Pyx_GOTREF(__pyx_t_2);
9811  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9812  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
9813  __Pyx_GOTREF(__pyx_t_1);
9814  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9815  __pyx_r = __pyx_t_1;
9816  __pyx_t_1 = 0;
9817  goto __pyx_L0;
9818  }
9819 
9820  /* "PyClical.pyx":980
9821  * return pow(self, m)
9822  *
9823  * def pow(self, m): # <<<<<<<<<<<<<<
9824  * """
9825  * Power: self to the m.
9826  */
9827 
9828  /* function exit code */
9829  __pyx_L1_error:;
9830  __Pyx_XDECREF(__pyx_t_1);
9831  __Pyx_XDECREF(__pyx_t_2);
9832  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9833  __pyx_r = NULL;
9834  __pyx_L0:;
9835  __Pyx_XGIVEREF(__pyx_r);
9836  __Pyx_RefNannyFinishContext();
9837  return __pyx_r;
9838  }
9839 
9840  /* "PyClical.pyx":1004
9841  * return exp(m * log(self))
9842  *
9843  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9844  * """
9845  * Outer product power.
9846  */
9847 
9848  /* Python wrapper */
9849  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9850  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 ";
9851  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9852  PyObject *__pyx_r = 0;
9853  __Pyx_RefNannyDeclarations
9854  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9855  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9856 
9857  /* function exit code */
9858  __Pyx_RefNannyFinishContext();
9859  return __pyx_r;
9860  }
9861 
9862  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9863  PyObject *__pyx_r = NULL;
9864  __Pyx_RefNannyDeclarations
9865  PyObject *__pyx_t_1 = NULL;
9866  int __pyx_t_2;
9867  PyObject *__pyx_t_3 = NULL;
9868  int __pyx_lineno = 0;
9869  const char *__pyx_filename = NULL;
9870  int __pyx_clineno = 0;
9871  __Pyx_RefNannySetupContext("outer_pow", 0);
9872 
9873  /* "PyClical.pyx":1018
9874  *
9875  * """
9876  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9877  *
9878  * def __call__(self, grade):
9879  */
9880  __Pyx_XDECREF(__pyx_r);
9881  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
9882  __Pyx_GOTREF(__pyx_t_1);
9883  __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)
9884  __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)
9885  __Pyx_GOTREF(__pyx_t_3);
9886  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9887  __pyx_r = __pyx_t_3;
9888  __pyx_t_3 = 0;
9889  goto __pyx_L0;
9890 
9891  /* "PyClical.pyx":1004
9892  * return exp(m * log(self))
9893  *
9894  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9895  * """
9896  * Outer product power.
9897  */
9898 
9899  /* function exit code */
9900  __pyx_L1_error:;
9901  __Pyx_XDECREF(__pyx_t_1);
9902  __Pyx_XDECREF(__pyx_t_3);
9903  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9904  __pyx_r = NULL;
9905  __pyx_L0:;
9906  __Pyx_XGIVEREF(__pyx_r);
9907  __Pyx_RefNannyFinishContext();
9908  return __pyx_r;
9909  }
9910 
9911  /* "PyClical.pyx":1020
9912  * return clifford().wrap( self.instance.outer_pow(m) )
9913  *
9914  * def __call__(self, grade): # <<<<<<<<<<<<<<
9915  * """
9916  * Pure grade-vector part.
9917  */
9918 
9919  /* Python wrapper */
9920  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9921  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 ";
9922  #if CYTHON_COMPILING_IN_CPYTHON
9923  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9924  #endif
9925  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9926  PyObject *__pyx_v_grade = 0;
9927  int __pyx_lineno = 0;
9928  const char *__pyx_filename = NULL;
9929  int __pyx_clineno = 0;
9930  PyObject *__pyx_r = 0;
9931  __Pyx_RefNannyDeclarations
9932  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9933  {
9934  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9935  PyObject* values[1] = {0};
9936  if (unlikely(__pyx_kwds)) {
9937  Py_ssize_t kw_args;
9938  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9939  switch (pos_args) {
9940  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9941  CYTHON_FALLTHROUGH;
9942  case 0: break;
9943  default: goto __pyx_L5_argtuple_error;
9944  }
9945  kw_args = PyDict_Size(__pyx_kwds);
9946  switch (pos_args) {
9947  case 0:
9948  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9949  else goto __pyx_L5_argtuple_error;
9950  }
9951  if (unlikely(kw_args > 0)) {
9952  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1020, __pyx_L3_error)
9953  }
9954  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9955  goto __pyx_L5_argtuple_error;
9956  } else {
9957  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9958  }
9959  __pyx_v_grade = values[0];
9960  }
9961  goto __pyx_L4_argument_unpacking_done;
9962  __pyx_L5_argtuple_error:;
9963  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1020, __pyx_L3_error)
9964  __pyx_L3_error:;
9965  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9966  __Pyx_RefNannyFinishContext();
9967  return NULL;
9968  __pyx_L4_argument_unpacking_done:;
9969  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9970 
9971  /* function exit code */
9972  __Pyx_RefNannyFinishContext();
9973  return __pyx_r;
9974  }
9975 
9976  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9977  PyObject *__pyx_r = NULL;
9978  __Pyx_RefNannyDeclarations
9979  PyObject *__pyx_t_1 = NULL;
9980  int __pyx_t_2;
9981  PyObject *__pyx_t_3 = NULL;
9982  int __pyx_lineno = 0;
9983  const char *__pyx_filename = NULL;
9984  int __pyx_clineno = 0;
9985  __Pyx_RefNannySetupContext("__call__", 0);
9986 
9987  /* "PyClical.pyx":1037
9988  * 0
9989  * """
9990  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9991  *
9992  * def scalar(self):
9993  */
9994  __Pyx_XDECREF(__pyx_r);
9995  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
9996  __Pyx_GOTREF(__pyx_t_1);
9997  __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)
9998  __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)
9999  __Pyx_GOTREF(__pyx_t_3);
10000  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10001  __pyx_r = __pyx_t_3;
10002  __pyx_t_3 = 0;
10003  goto __pyx_L0;
10004 
10005  /* "PyClical.pyx":1020
10006  * return clifford().wrap( self.instance.outer_pow(m) )
10007  *
10008  * def __call__(self, grade): # <<<<<<<<<<<<<<
10009  * """
10010  * Pure grade-vector part.
10011  */
10012 
10013  /* function exit code */
10014  __pyx_L1_error:;
10015  __Pyx_XDECREF(__pyx_t_1);
10016  __Pyx_XDECREF(__pyx_t_3);
10017  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10018  __pyx_r = NULL;
10019  __pyx_L0:;
10020  __Pyx_XGIVEREF(__pyx_r);
10021  __Pyx_RefNannyFinishContext();
10022  return __pyx_r;
10023  }
10024 
10025  /* "PyClical.pyx":1039
10026  * return clifford().wrap( self.instance.call(grade) )
10027  *
10028  * def scalar(self): # <<<<<<<<<<<<<<
10029  * """
10030  * Scalar part.
10031  */
10032 
10033  /* Python wrapper */
10034  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10035  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 ";
10036  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10037  PyObject *__pyx_r = 0;
10038  __Pyx_RefNannyDeclarations
10039  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
10040  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10041 
10042  /* function exit code */
10043  __Pyx_RefNannyFinishContext();
10044  return __pyx_r;
10045  }
10046 
10047  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10048  PyObject *__pyx_r = NULL;
10049  __Pyx_RefNannyDeclarations
10050  PyObject *__pyx_t_1 = NULL;
10051  int __pyx_lineno = 0;
10052  const char *__pyx_filename = NULL;
10053  int __pyx_clineno = 0;
10054  __Pyx_RefNannySetupContext("scalar", 0);
10055 
10056  /* "PyClical.pyx":1048
10057  * 0.0
10058  * """
10059  * return self.instance.scalar() # <<<<<<<<<<<<<<
10060  *
10061  * def pure(self):
10062  */
10063  __Pyx_XDECREF(__pyx_r);
10064  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
10065  __Pyx_GOTREF(__pyx_t_1);
10066  __pyx_r = __pyx_t_1;
10067  __pyx_t_1 = 0;
10068  goto __pyx_L0;
10069 
10070  /* "PyClical.pyx":1039
10071  * return clifford().wrap( self.instance.call(grade) )
10072  *
10073  * def scalar(self): # <<<<<<<<<<<<<<
10074  * """
10075  * Scalar part.
10076  */
10077 
10078  /* function exit code */
10079  __pyx_L1_error:;
10080  __Pyx_XDECREF(__pyx_t_1);
10081  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10082  __pyx_r = NULL;
10083  __pyx_L0:;
10084  __Pyx_XGIVEREF(__pyx_r);
10085  __Pyx_RefNannyFinishContext();
10086  return __pyx_r;
10087  }
10088 
10089  /* "PyClical.pyx":1050
10090  * return self.instance.scalar()
10091  *
10092  * def pure(self): # <<<<<<<<<<<<<<
10093  * """
10094  * Pure part.
10095  */
10096 
10097  /* Python wrapper */
10098  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10099  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 ";
10100  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10101  PyObject *__pyx_r = 0;
10102  __Pyx_RefNannyDeclarations
10103  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
10104  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10105 
10106  /* function exit code */
10107  __Pyx_RefNannyFinishContext();
10108  return __pyx_r;
10109  }
10110 
10111  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10112  PyObject *__pyx_r = NULL;
10113  __Pyx_RefNannyDeclarations
10114  PyObject *__pyx_t_1 = NULL;
10115  PyObject *__pyx_t_2 = NULL;
10116  int __pyx_lineno = 0;
10117  const char *__pyx_filename = NULL;
10118  int __pyx_clineno = 0;
10119  __Pyx_RefNannySetupContext("pure", 0);
10120 
10121  /* "PyClical.pyx":1059
10122  * {1,2}
10123  * """
10124  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
10125  *
10126  * def even(self):
10127  */
10128  __Pyx_XDECREF(__pyx_r);
10129  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L1_error)
10130  __Pyx_GOTREF(__pyx_t_1);
10131  __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)
10132  __Pyx_GOTREF(__pyx_t_2);
10133  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10134  __pyx_r = __pyx_t_2;
10135  __pyx_t_2 = 0;
10136  goto __pyx_L0;
10137 
10138  /* "PyClical.pyx":1050
10139  * return self.instance.scalar()
10140  *
10141  * def pure(self): # <<<<<<<<<<<<<<
10142  * """
10143  * Pure part.
10144  */
10145 
10146  /* function exit code */
10147  __pyx_L1_error:;
10148  __Pyx_XDECREF(__pyx_t_1);
10149  __Pyx_XDECREF(__pyx_t_2);
10150  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10151  __pyx_r = NULL;
10152  __pyx_L0:;
10153  __Pyx_XGIVEREF(__pyx_r);
10154  __Pyx_RefNannyFinishContext();
10155  return __pyx_r;
10156  }
10157 
10158  /* "PyClical.pyx":1061
10159  * return clifford().wrap( self.instance.pure() )
10160  *
10161  * def even(self): # <<<<<<<<<<<<<<
10162  * """
10163  * Even part of multivector, sum of even grade terms.
10164  */
10165 
10166  /* Python wrapper */
10167  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10168  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 ";
10169  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10170  PyObject *__pyx_r = 0;
10171  __Pyx_RefNannyDeclarations
10172  __Pyx_RefNannySetupContext("even (wrapper)", 0);
10173  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10174 
10175  /* function exit code */
10176  __Pyx_RefNannyFinishContext();
10177  return __pyx_r;
10178  }
10179 
10180  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10181  PyObject *__pyx_r = NULL;
10182  __Pyx_RefNannyDeclarations
10183  PyObject *__pyx_t_1 = NULL;
10184  PyObject *__pyx_t_2 = NULL;
10185  int __pyx_lineno = 0;
10186  const char *__pyx_filename = NULL;
10187  int __pyx_clineno = 0;
10188  __Pyx_RefNannySetupContext("even", 0);
10189 
10190  /* "PyClical.pyx":1068
10191  * 1+{1,2}
10192  * """
10193  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
10194  *
10195  * def odd(self):
10196  */
10197  __Pyx_XDECREF(__pyx_r);
10198  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
10199  __Pyx_GOTREF(__pyx_t_1);
10200  __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)
10201  __Pyx_GOTREF(__pyx_t_2);
10202  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10203  __pyx_r = __pyx_t_2;
10204  __pyx_t_2 = 0;
10205  goto __pyx_L0;
10206 
10207  /* "PyClical.pyx":1061
10208  * return clifford().wrap( self.instance.pure() )
10209  *
10210  * def even(self): # <<<<<<<<<<<<<<
10211  * """
10212  * Even part of multivector, sum of even grade terms.
10213  */
10214 
10215  /* function exit code */
10216  __pyx_L1_error:;
10217  __Pyx_XDECREF(__pyx_t_1);
10218  __Pyx_XDECREF(__pyx_t_2);
10219  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10220  __pyx_r = NULL;
10221  __pyx_L0:;
10222  __Pyx_XGIVEREF(__pyx_r);
10223  __Pyx_RefNannyFinishContext();
10224  return __pyx_r;
10225  }
10226 
10227  /* "PyClical.pyx":1070
10228  * return clifford().wrap( self.instance.even() )
10229  *
10230  * def odd(self): # <<<<<<<<<<<<<<
10231  * """
10232  * Odd part of multivector, sum of odd grade terms.
10233  */
10234 
10235  /* Python wrapper */
10236  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10237  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 ";
10238  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10239  PyObject *__pyx_r = 0;
10240  __Pyx_RefNannyDeclarations
10241  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
10242  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10243 
10244  /* function exit code */
10245  __Pyx_RefNannyFinishContext();
10246  return __pyx_r;
10247  }
10248 
10249  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10250  PyObject *__pyx_r = NULL;
10251  __Pyx_RefNannyDeclarations
10252  PyObject *__pyx_t_1 = NULL;
10253  PyObject *__pyx_t_2 = NULL;
10254  int __pyx_lineno = 0;
10255  const char *__pyx_filename = NULL;
10256  int __pyx_clineno = 0;
10257  __Pyx_RefNannySetupContext("odd", 0);
10258 
10259  /* "PyClical.pyx":1077
10260  * {1}
10261  * """
10262  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
10263  *
10264  * def vector_part(self, frm = None):
10265  */
10266  __Pyx_XDECREF(__pyx_r);
10267  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
10268  __Pyx_GOTREF(__pyx_t_1);
10269  __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)
10270  __Pyx_GOTREF(__pyx_t_2);
10271  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10272  __pyx_r = __pyx_t_2;
10273  __pyx_t_2 = 0;
10274  goto __pyx_L0;
10275 
10276  /* "PyClical.pyx":1070
10277  * return clifford().wrap( self.instance.even() )
10278  *
10279  * def odd(self): # <<<<<<<<<<<<<<
10280  * """
10281  * Odd part of multivector, sum of odd grade terms.
10282  */
10283 
10284  /* function exit code */
10285  __pyx_L1_error:;
10286  __Pyx_XDECREF(__pyx_t_1);
10287  __Pyx_XDECREF(__pyx_t_2);
10288  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
10289  __pyx_r = NULL;
10290  __pyx_L0:;
10291  __Pyx_XGIVEREF(__pyx_r);
10292  __Pyx_RefNannyFinishContext();
10293  return __pyx_r;
10294  }
10295 
10296  /* "PyClical.pyx":1079
10297  * return clifford().wrap( self.instance.odd() )
10298  *
10299  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10300  * """
10301  * Vector part of multivector, as a Python list, with respect to frm.
10302  */
10303 
10304  /* Python wrapper */
10305  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10306  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 ";
10307  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10308  PyObject *__pyx_v_frm = 0;
10309  int __pyx_lineno = 0;
10310  const char *__pyx_filename = NULL;
10311  int __pyx_clineno = 0;
10312  PyObject *__pyx_r = 0;
10313  __Pyx_RefNannyDeclarations
10314  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
10315  {
10316  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
10317  PyObject* values[1] = {0};
10318  values[0] = ((PyObject *)Py_None);
10319  if (unlikely(__pyx_kwds)) {
10320  Py_ssize_t kw_args;
10321  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10322  switch (pos_args) {
10323  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10324  CYTHON_FALLTHROUGH;
10325  case 0: break;
10326  default: goto __pyx_L5_argtuple_error;
10327  }
10328  kw_args = PyDict_Size(__pyx_kwds);
10329  switch (pos_args) {
10330  case 0:
10331  if (kw_args > 0) {
10332  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
10333  if (value) { values[0] = value; kw_args--; }
10334  }
10335  }
10336  if (unlikely(kw_args > 0)) {
10337  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1079, __pyx_L3_error)
10338  }
10339  } else {
10340  switch (PyTuple_GET_SIZE(__pyx_args)) {
10341  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10342  CYTHON_FALLTHROUGH;
10343  case 0: break;
10344  default: goto __pyx_L5_argtuple_error;
10345  }
10346  }
10347  __pyx_v_frm = values[0];
10348  }
10349  goto __pyx_L4_argument_unpacking_done;
10350  __pyx_L5_argtuple_error:;
10351  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1079, __pyx_L3_error)
10352  __pyx_L3_error:;
10353  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10354  __Pyx_RefNannyFinishContext();
10355  return NULL;
10356  __pyx_L4_argument_unpacking_done:;
10357  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
10358 
10359  /* function exit code */
10360  __Pyx_RefNannyFinishContext();
10361  return __pyx_r;
10362  }
10363 
10364  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
10365  PyObject *__pyx_v_error_msg_prefix = NULL;
10366  std::vector<scalar_t> __pyx_v_vec;
10367  int __pyx_v_n;
10368  int __pyx_v_i;
10369  PyObject *__pyx_v_lst = NULL;
10370  PyObject *__pyx_v_err = NULL;
10371  PyObject *__pyx_r = NULL;
10372  __Pyx_RefNannyDeclarations
10373  PyObject *__pyx_t_1 = NULL;
10374  PyObject *__pyx_t_2 = NULL;
10375  PyObject *__pyx_t_3 = NULL;
10376  int __pyx_t_4;
10377  int __pyx_t_5;
10378  std::vector<scalar_t> __pyx_t_6;
10379  PyObject *__pyx_t_7 = NULL;
10380  int __pyx_t_8;
10381  int __pyx_t_9;
10382  int __pyx_t_10;
10383  PyObject *__pyx_t_11 = NULL;
10384  PyObject *__pyx_t_12 = NULL;
10385  PyObject *__pyx_t_13 = NULL;
10386  PyObject *__pyx_t_14 = NULL;
10387  PyObject *__pyx_t_15 = NULL;
10388  char const *__pyx_t_16;
10389  PyObject *__pyx_t_17 = NULL;
10390  PyObject *__pyx_t_18 = NULL;
10391  PyObject *__pyx_t_19 = NULL;
10392  PyObject *__pyx_t_20 = NULL;
10393  PyObject *__pyx_t_21 = NULL;
10394  PyObject *__pyx_t_22 = NULL;
10395  int __pyx_lineno = 0;
10396  const char *__pyx_filename = NULL;
10397  int __pyx_clineno = 0;
10398  __Pyx_RefNannySetupContext("vector_part", 0);
10399 
10400  /* "PyClical.pyx":1088
10401  * [0.0, 2.0, 3.0]
10402  * """
10403  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
10404  * cdef vector[scalar_t] vec
10405  * cdef int n
10406  */
10407  __Pyx_INCREF(__pyx_kp_u_Cannot_take_vector_part_of);
10408  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_take_vector_part_of;
10409 
10410  /* "PyClical.pyx":1092
10411  * cdef int n
10412  * cdef int i
10413  * try: # <<<<<<<<<<<<<<
10414  * if frm is None:
10415  * vec = self.instance.vector_part()
10416  */
10417  {
10418  __Pyx_PyThreadState_declare
10419  __Pyx_PyThreadState_assign
10420  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10421  __Pyx_XGOTREF(__pyx_t_1);
10422  __Pyx_XGOTREF(__pyx_t_2);
10423  __Pyx_XGOTREF(__pyx_t_3);
10424  /*try:*/ {
10425 
10426  /* "PyClical.pyx":1093
10427  * cdef int i
10428  * try:
10429  * if frm is None: # <<<<<<<<<<<<<<
10430  * vec = self.instance.vector_part()
10431  * else:
10432  */
10433  __pyx_t_4 = (__pyx_v_frm == Py_None);
10434  __pyx_t_5 = (__pyx_t_4 != 0);
10435  if (__pyx_t_5) {
10436 
10437  /* "PyClical.pyx":1094
10438  * try:
10439  * if frm is None:
10440  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
10441  * else:
10442  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10443  */
10444  __pyx_t_6 = __pyx_v_self->instance->vector_part();
10445  __pyx_v_vec = __pyx_t_6;
10446 
10447  /* "PyClical.pyx":1093
10448  * cdef int i
10449  * try:
10450  * if frm is None: # <<<<<<<<<<<<<<
10451  * vec = self.instance.vector_part()
10452  * else:
10453  */
10454  goto __pyx_L9;
10455  }
10456 
10457  /* "PyClical.pyx":1096
10458  * vec = self.instance.vector_part()
10459  * else:
10460  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
10461  * n = vec.size()
10462  * lst = [0.0]*n
10463  */
10464  /*else*/ {
10465  try {
10466  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
10467  } catch(...) {
10468  __Pyx_CppExn2PyErr();
10469  __PYX_ERR(0, 1096, __pyx_L3_error)
10470  }
10471  __pyx_v_vec = __pyx_t_6;
10472  }
10473  __pyx_L9:;
10474 
10475  /* "PyClical.pyx":1097
10476  * else:
10477  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10478  * n = vec.size() # <<<<<<<<<<<<<<
10479  * lst = [0.0]*n
10480  * for i in xrange(n):
10481  */
10482  __pyx_v_n = __pyx_v_vec.size();
10483 
10484  /* "PyClical.pyx":1098
10485  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10486  * n = vec.size()
10487  * lst = [0.0]*n # <<<<<<<<<<<<<<
10488  * for i in xrange(n):
10489  * lst[i] = vec[i]
10490  */
10491  __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)
10492  __Pyx_GOTREF(__pyx_t_7);
10493  { Py_ssize_t __pyx_temp;
10494  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10495  __Pyx_INCREF(__pyx_float_0_0);
10496  __Pyx_GIVEREF(__pyx_float_0_0);
10497  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10498  }
10499  }
10500  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10501  __pyx_t_7 = 0;
10502 
10503  /* "PyClical.pyx":1099
10504  * n = vec.size()
10505  * lst = [0.0]*n
10506  * for i in xrange(n): # <<<<<<<<<<<<<<
10507  * lst[i] = vec[i]
10508  * return lst
10509  */
10510  __pyx_t_8 = __pyx_v_n;
10511  __pyx_t_9 = __pyx_t_8;
10512  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10513  __pyx_v_i = __pyx_t_10;
10514 
10515  /* "PyClical.pyx":1100
10516  * lst = [0.0]*n
10517  * for i in xrange(n):
10518  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10519  * return lst
10520  * except RuntimeError as err:
10521  */
10522  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L3_error)
10523  __Pyx_GOTREF(__pyx_t_7);
10524  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)
10525  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10526  }
10527 
10528  /* "PyClical.pyx":1101
10529  * for i in xrange(n):
10530  * lst[i] = vec[i]
10531  * return lst # <<<<<<<<<<<<<<
10532  * except RuntimeError as err:
10533  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10534  */
10535  __Pyx_XDECREF(__pyx_r);
10536  __Pyx_INCREF(__pyx_v_lst);
10537  __pyx_r = __pyx_v_lst;
10538  goto __pyx_L7_try_return;
10539 
10540  /* "PyClical.pyx":1092
10541  * cdef int n
10542  * cdef int i
10543  * try: # <<<<<<<<<<<<<<
10544  * if frm is None:
10545  * vec = self.instance.vector_part()
10546  */
10547  }
10548  __pyx_L3_error:;
10549  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10550 
10551  /* "PyClical.pyx":1102
10552  * lst[i] = vec[i]
10553  * return lst
10554  * except RuntimeError as err: # <<<<<<<<<<<<<<
10555  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10556  * + repr(frm) + " as frame:\n\t"
10557  */
10558  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10559  if (__pyx_t_8) {
10560  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10561  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10562  __Pyx_GOTREF(__pyx_t_7);
10563  __Pyx_GOTREF(__pyx_t_11);
10564  __Pyx_GOTREF(__pyx_t_12);
10565  __Pyx_INCREF(__pyx_t_11);
10566  __pyx_v_err = __pyx_t_11;
10567  /*try:*/ {
10568 
10569  /* "PyClical.pyx":1103
10570  * return lst
10571  * except RuntimeError as err:
10572  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10573  * + repr(frm) + " as frame:\n\t"
10574  * + str(err))
10575  */
10576  __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)
10577  __Pyx_GOTREF(__pyx_t_13);
10578  __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)
10579  __Pyx_GOTREF(__pyx_t_14);
10580  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10581  __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)
10582  __Pyx_GOTREF(__pyx_t_13);
10583  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10584 
10585  /* "PyClical.pyx":1104
10586  * except RuntimeError as err:
10587  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10588  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10589  * + str(err))
10590  *
10591  */
10592  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L17_error)
10593  __Pyx_GOTREF(__pyx_t_14);
10594  __pyx_t_15 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1104, __pyx_L17_error)
10595  __Pyx_GOTREF(__pyx_t_15);
10596  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10597  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10598  __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)
10599  __Pyx_GOTREF(__pyx_t_14);
10600  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10601 
10602  /* "PyClical.pyx":1105
10603  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10604  * + repr(frm) + " as frame:\n\t"
10605  * + str(err)) # <<<<<<<<<<<<<<
10606  *
10607  * def involute(self):
10608  */
10609  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1105, __pyx_L17_error)
10610  __Pyx_GOTREF(__pyx_t_15);
10611  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1105, __pyx_L17_error)
10612  __Pyx_GOTREF(__pyx_t_13);
10613  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10614  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10615 
10616  /* "PyClical.pyx":1103
10617  * return lst
10618  * except RuntimeError as err:
10619  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10620  * + repr(frm) + " as frame:\n\t"
10621  * + str(err))
10622  */
10623  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L17_error)
10624  __Pyx_GOTREF(__pyx_t_15);
10625  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10626  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10627  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10628  __PYX_ERR(0, 1103, __pyx_L17_error)
10629  }
10630 
10631  /* "PyClical.pyx":1102
10632  * lst[i] = vec[i]
10633  * return lst
10634  * except RuntimeError as err: # <<<<<<<<<<<<<<
10635  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10636  * + repr(frm) + " as frame:\n\t"
10637  */
10638  /*finally:*/ {
10639  __pyx_L17_error:;
10640  /*exception exit:*/{
10641  __Pyx_PyThreadState_declare
10642  __Pyx_PyThreadState_assign
10643  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
10644  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
10645  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
10646  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
10647  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
10648  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);
10649  __Pyx_XGOTREF(__pyx_t_17);
10650  __Pyx_XGOTREF(__pyx_t_18);
10651  __Pyx_XGOTREF(__pyx_t_19);
10652  __Pyx_XGOTREF(__pyx_t_20);
10653  __Pyx_XGOTREF(__pyx_t_21);
10654  __Pyx_XGOTREF(__pyx_t_22);
10655  __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
10656  {
10657  __Pyx_DECREF(__pyx_v_err);
10658  __pyx_v_err = NULL;
10659  }
10660  if (PY_MAJOR_VERSION >= 3) {
10661  __Pyx_XGIVEREF(__pyx_t_20);
10662  __Pyx_XGIVEREF(__pyx_t_21);
10663  __Pyx_XGIVEREF(__pyx_t_22);
10664  __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
10665  }
10666  __Pyx_XGIVEREF(__pyx_t_17);
10667  __Pyx_XGIVEREF(__pyx_t_18);
10668  __Pyx_XGIVEREF(__pyx_t_19);
10669  __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
10670  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
10671  __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_16;
10672  goto __pyx_L5_except_error;
10673  }
10674  }
10675  }
10676  goto __pyx_L5_except_error;
10677  __pyx_L5_except_error:;
10678 
10679  /* "PyClical.pyx":1092
10680  * cdef int n
10681  * cdef int i
10682  * try: # <<<<<<<<<<<<<<
10683  * if frm is None:
10684  * vec = self.instance.vector_part()
10685  */
10686  __Pyx_XGIVEREF(__pyx_t_1);
10687  __Pyx_XGIVEREF(__pyx_t_2);
10688  __Pyx_XGIVEREF(__pyx_t_3);
10689  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10690  goto __pyx_L1_error;
10691  __pyx_L7_try_return:;
10692  __Pyx_XGIVEREF(__pyx_t_1);
10693  __Pyx_XGIVEREF(__pyx_t_2);
10694  __Pyx_XGIVEREF(__pyx_t_3);
10695  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10696  goto __pyx_L0;
10697  }
10698 
10699  /* "PyClical.pyx":1079
10700  * return clifford().wrap( self.instance.odd() )
10701  *
10702  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10703  * """
10704  * Vector part of multivector, as a Python list, with respect to frm.
10705  */
10706 
10707  /* function exit code */
10708  __pyx_L1_error:;
10709  __Pyx_XDECREF(__pyx_t_7);
10710  __Pyx_XDECREF(__pyx_t_11);
10711  __Pyx_XDECREF(__pyx_t_12);
10712  __Pyx_XDECREF(__pyx_t_13);
10713  __Pyx_XDECREF(__pyx_t_14);
10714  __Pyx_XDECREF(__pyx_t_15);
10715  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10716  __pyx_r = NULL;
10717  __pyx_L0:;
10718  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10719  __Pyx_XDECREF(__pyx_v_lst);
10720  __Pyx_XDECREF(__pyx_v_err);
10721  __Pyx_XGIVEREF(__pyx_r);
10722  __Pyx_RefNannyFinishContext();
10723  return __pyx_r;
10724  }
10725 
10726  /* "PyClical.pyx":1107
10727  * + str(err))
10728  *
10729  * def involute(self): # <<<<<<<<<<<<<<
10730  * """
10731  * Main involution, each {i} is replaced by -{i} in each term,
10732  */
10733 
10734  /* Python wrapper */
10735  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10736  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 ";
10737  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10738  PyObject *__pyx_r = 0;
10739  __Pyx_RefNannyDeclarations
10740  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10741  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10742 
10743  /* function exit code */
10744  __Pyx_RefNannyFinishContext();
10745  return __pyx_r;
10746  }
10747 
10748  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10749  PyObject *__pyx_r = NULL;
10750  __Pyx_RefNannyDeclarations
10751  PyObject *__pyx_t_1 = NULL;
10752  PyObject *__pyx_t_2 = NULL;
10753  int __pyx_lineno = 0;
10754  const char *__pyx_filename = NULL;
10755  int __pyx_clineno = 0;
10756  __Pyx_RefNannySetupContext("involute", 0);
10757 
10758  /* "PyClical.pyx":1121
10759  * 1-{1}+{1,2}
10760  * """
10761  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10762  *
10763  * def reverse(self):
10764  */
10765  __Pyx_XDECREF(__pyx_r);
10766  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
10767  __Pyx_GOTREF(__pyx_t_1);
10768  __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)
10769  __Pyx_GOTREF(__pyx_t_2);
10770  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10771  __pyx_r = __pyx_t_2;
10772  __pyx_t_2 = 0;
10773  goto __pyx_L0;
10774 
10775  /* "PyClical.pyx":1107
10776  * + str(err))
10777  *
10778  * def involute(self): # <<<<<<<<<<<<<<
10779  * """
10780  * Main involution, each {i} is replaced by -{i} in each term,
10781  */
10782 
10783  /* function exit code */
10784  __pyx_L1_error:;
10785  __Pyx_XDECREF(__pyx_t_1);
10786  __Pyx_XDECREF(__pyx_t_2);
10787  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10788  __pyx_r = NULL;
10789  __pyx_L0:;
10790  __Pyx_XGIVEREF(__pyx_r);
10791  __Pyx_RefNannyFinishContext();
10792  return __pyx_r;
10793  }
10794 
10795  /* "PyClical.pyx":1123
10796  * return clifford().wrap( self.instance.involute() )
10797  *
10798  * def reverse(self): # <<<<<<<<<<<<<<
10799  * """
10800  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10801  */
10802 
10803  /* Python wrapper */
10804  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10805  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 ";
10806  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10807  PyObject *__pyx_r = 0;
10808  __Pyx_RefNannyDeclarations
10809  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10810  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10811 
10812  /* function exit code */
10813  __Pyx_RefNannyFinishContext();
10814  return __pyx_r;
10815  }
10816 
10817  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10818  PyObject *__pyx_r = NULL;
10819  __Pyx_RefNannyDeclarations
10820  PyObject *__pyx_t_1 = NULL;
10821  PyObject *__pyx_t_2 = NULL;
10822  int __pyx_lineno = 0;
10823  const char *__pyx_filename = NULL;
10824  int __pyx_clineno = 0;
10825  __Pyx_RefNannySetupContext("reverse", 0);
10826 
10827  /* "PyClical.pyx":1136
10828  * 1+{1}-{1,2}
10829  * """
10830  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10831  *
10832  * def conj(self):
10833  */
10834  __Pyx_XDECREF(__pyx_r);
10835  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
10836  __Pyx_GOTREF(__pyx_t_1);
10837  __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)
10838  __Pyx_GOTREF(__pyx_t_2);
10839  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10840  __pyx_r = __pyx_t_2;
10841  __pyx_t_2 = 0;
10842  goto __pyx_L0;
10843 
10844  /* "PyClical.pyx":1123
10845  * return clifford().wrap( self.instance.involute() )
10846  *
10847  * def reverse(self): # <<<<<<<<<<<<<<
10848  * """
10849  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10850  */
10851 
10852  /* function exit code */
10853  __pyx_L1_error:;
10854  __Pyx_XDECREF(__pyx_t_1);
10855  __Pyx_XDECREF(__pyx_t_2);
10856  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10857  __pyx_r = NULL;
10858  __pyx_L0:;
10859  __Pyx_XGIVEREF(__pyx_r);
10860  __Pyx_RefNannyFinishContext();
10861  return __pyx_r;
10862  }
10863 
10864  /* "PyClical.pyx":1138
10865  * return clifford().wrap( self.instance.reverse() )
10866  *
10867  * def conj(self): # <<<<<<<<<<<<<<
10868  * """
10869  * Conjugation, reverse o involute == involute o reverse.
10870  */
10871 
10872  /* Python wrapper */
10873  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10874  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 ";
10875  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10876  PyObject *__pyx_r = 0;
10877  __Pyx_RefNannyDeclarations
10878  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10879  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10880 
10881  /* function exit code */
10882  __Pyx_RefNannyFinishContext();
10883  return __pyx_r;
10884  }
10885 
10886  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10887  PyObject *__pyx_r = NULL;
10888  __Pyx_RefNannyDeclarations
10889  PyObject *__pyx_t_1 = NULL;
10890  PyObject *__pyx_t_2 = NULL;
10891  int __pyx_lineno = 0;
10892  const char *__pyx_filename = NULL;
10893  int __pyx_clineno = 0;
10894  __Pyx_RefNannySetupContext("conj", 0);
10895 
10896  /* "PyClical.pyx":1151
10897  * 1-{1}-{1,2}
10898  * """
10899  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10900  *
10901  * def quad(self):
10902  */
10903  __Pyx_XDECREF(__pyx_r);
10904  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error)
10905  __Pyx_GOTREF(__pyx_t_1);
10906  __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)
10907  __Pyx_GOTREF(__pyx_t_2);
10908  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10909  __pyx_r = __pyx_t_2;
10910  __pyx_t_2 = 0;
10911  goto __pyx_L0;
10912 
10913  /* "PyClical.pyx":1138
10914  * return clifford().wrap( self.instance.reverse() )
10915  *
10916  * def conj(self): # <<<<<<<<<<<<<<
10917  * """
10918  * Conjugation, reverse o involute == involute o reverse.
10919  */
10920 
10921  /* function exit code */
10922  __pyx_L1_error:;
10923  __Pyx_XDECREF(__pyx_t_1);
10924  __Pyx_XDECREF(__pyx_t_2);
10925  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10926  __pyx_r = NULL;
10927  __pyx_L0:;
10928  __Pyx_XGIVEREF(__pyx_r);
10929  __Pyx_RefNannyFinishContext();
10930  return __pyx_r;
10931  }
10932 
10933  /* "PyClical.pyx":1153
10934  * return clifford().wrap( self.instance.conj() )
10935  *
10936  * def quad(self): # <<<<<<<<<<<<<<
10937  * """
10938  * Quadratic form == (rev(x)*x)(0).
10939  */
10940 
10941  /* Python wrapper */
10942  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10943  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 ";
10944  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10945  PyObject *__pyx_r = 0;
10946  __Pyx_RefNannyDeclarations
10947  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10948  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10949 
10950  /* function exit code */
10951  __Pyx_RefNannyFinishContext();
10952  return __pyx_r;
10953  }
10954 
10955  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10956  PyObject *__pyx_r = NULL;
10957  __Pyx_RefNannyDeclarations
10958  PyObject *__pyx_t_1 = NULL;
10959  int __pyx_lineno = 0;
10960  const char *__pyx_filename = NULL;
10961  int __pyx_clineno = 0;
10962  __Pyx_RefNannySetupContext("quad", 0);
10963 
10964  /* "PyClical.pyx":1162
10965  * 2.0
10966  * """
10967  * return self.instance.quad() # <<<<<<<<<<<<<<
10968  *
10969  * def norm(self):
10970  */
10971  __Pyx_XDECREF(__pyx_r);
10972  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error)
10973  __Pyx_GOTREF(__pyx_t_1);
10974  __pyx_r = __pyx_t_1;
10975  __pyx_t_1 = 0;
10976  goto __pyx_L0;
10977 
10978  /* "PyClical.pyx":1153
10979  * return clifford().wrap( self.instance.conj() )
10980  *
10981  * def quad(self): # <<<<<<<<<<<<<<
10982  * """
10983  * Quadratic form == (rev(x)*x)(0).
10984  */
10985 
10986  /* function exit code */
10987  __pyx_L1_error:;
10988  __Pyx_XDECREF(__pyx_t_1);
10989  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10990  __pyx_r = NULL;
10991  __pyx_L0:;
10992  __Pyx_XGIVEREF(__pyx_r);
10993  __Pyx_RefNannyFinishContext();
10994  return __pyx_r;
10995  }
10996 
10997  /* "PyClical.pyx":1164
10998  * return self.instance.quad()
10999  *
11000  * def norm(self): # <<<<<<<<<<<<<<
11001  * """
11002  * Norm == sum of squares of coordinates.
11003  */
11004 
11005  /* Python wrapper */
11006  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11007  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 ";
11008  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11009  PyObject *__pyx_r = 0;
11010  __Pyx_RefNannyDeclarations
11011  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
11012  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11013 
11014  /* function exit code */
11015  __Pyx_RefNannyFinishContext();
11016  return __pyx_r;
11017  }
11018 
11019  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11020  PyObject *__pyx_r = NULL;
11021  __Pyx_RefNannyDeclarations
11022  PyObject *__pyx_t_1 = NULL;
11023  int __pyx_lineno = 0;
11024  const char *__pyx_filename = NULL;
11025  int __pyx_clineno = 0;
11026  __Pyx_RefNannySetupContext("norm", 0);
11027 
11028  /* "PyClical.pyx":1173
11029  * 4.0
11030  * """
11031  * return self.instance.norm() # <<<<<<<<<<<<<<
11032  *
11033  * def abs(self):
11034  */
11035  __Pyx_XDECREF(__pyx_r);
11036  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
11037  __Pyx_GOTREF(__pyx_t_1);
11038  __pyx_r = __pyx_t_1;
11039  __pyx_t_1 = 0;
11040  goto __pyx_L0;
11041 
11042  /* "PyClical.pyx":1164
11043  * return self.instance.quad()
11044  *
11045  * def norm(self): # <<<<<<<<<<<<<<
11046  * """
11047  * Norm == sum of squares of coordinates.
11048  */
11049 
11050  /* function exit code */
11051  __pyx_L1_error:;
11052  __Pyx_XDECREF(__pyx_t_1);
11053  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
11054  __pyx_r = NULL;
11055  __pyx_L0:;
11056  __Pyx_XGIVEREF(__pyx_r);
11057  __Pyx_RefNannyFinishContext();
11058  return __pyx_r;
11059  }
11060 
11061  /* "PyClical.pyx":1175
11062  * return self.instance.norm()
11063  *
11064  * def abs(self): # <<<<<<<<<<<<<<
11065  * """
11066  * Absolute value: square root of norm.
11067  */
11068 
11069  /* Python wrapper */
11070  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11071  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 ";
11072  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11073  PyObject *__pyx_r = 0;
11074  __Pyx_RefNannyDeclarations
11075  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
11076  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11077 
11078  /* function exit code */
11079  __Pyx_RefNannyFinishContext();
11080  return __pyx_r;
11081  }
11082 
11083  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11084  PyObject *__pyx_r = NULL;
11085  __Pyx_RefNannyDeclarations
11086  PyObject *__pyx_t_1 = NULL;
11087  int __pyx_lineno = 0;
11088  const char *__pyx_filename = NULL;
11089  int __pyx_clineno = 0;
11090  __Pyx_RefNannySetupContext("abs", 0);
11091 
11092  /* "PyClical.pyx":1182
11093  * 2.0
11094  * """
11095  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
11096  *
11097  * def max_abs(self):
11098  */
11099  __Pyx_XDECREF(__pyx_r);
11100  __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)
11101  __Pyx_GOTREF(__pyx_t_1);
11102  __pyx_r = __pyx_t_1;
11103  __pyx_t_1 = 0;
11104  goto __pyx_L0;
11105 
11106  /* "PyClical.pyx":1175
11107  * return self.instance.norm()
11108  *
11109  * def abs(self): # <<<<<<<<<<<<<<
11110  * """
11111  * Absolute value: square root of norm.
11112  */
11113 
11114  /* function exit code */
11115  __pyx_L1_error:;
11116  __Pyx_XDECREF(__pyx_t_1);
11117  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11118  __pyx_r = NULL;
11119  __pyx_L0:;
11120  __Pyx_XGIVEREF(__pyx_r);
11121  __Pyx_RefNannyFinishContext();
11122  return __pyx_r;
11123  }
11124 
11125  /* "PyClical.pyx":1184
11126  * return glucat.abs( self.unwrap() )
11127  *
11128  * def max_abs(self): # <<<<<<<<<<<<<<
11129  * """
11130  * Maximum of absolute values of components of multivector: multivector infinity norm.
11131  */
11132 
11133  /* Python wrapper */
11134  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11135  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 ";
11136  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11137  PyObject *__pyx_r = 0;
11138  __Pyx_RefNannyDeclarations
11139  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
11140  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11141 
11142  /* function exit code */
11143  __Pyx_RefNannyFinishContext();
11144  return __pyx_r;
11145  }
11146 
11147  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11148  PyObject *__pyx_r = NULL;
11149  __Pyx_RefNannyDeclarations
11150  PyObject *__pyx_t_1 = NULL;
11151  int __pyx_lineno = 0;
11152  const char *__pyx_filename = NULL;
11153  int __pyx_clineno = 0;
11154  __Pyx_RefNannySetupContext("max_abs", 0);
11155 
11156  /* "PyClical.pyx":1193
11157  * 3.0
11158  * """
11159  * return self.instance.max_abs() # <<<<<<<<<<<<<<
11160  *
11161  * def truncated(self, limit):
11162  */
11163  __Pyx_XDECREF(__pyx_r);
11164  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
11165  __Pyx_GOTREF(__pyx_t_1);
11166  __pyx_r = __pyx_t_1;
11167  __pyx_t_1 = 0;
11168  goto __pyx_L0;
11169 
11170  /* "PyClical.pyx":1184
11171  * return glucat.abs( self.unwrap() )
11172  *
11173  * def max_abs(self): # <<<<<<<<<<<<<<
11174  * """
11175  * Maximum of absolute values of components of multivector: multivector infinity norm.
11176  */
11177 
11178  /* function exit code */
11179  __pyx_L1_error:;
11180  __Pyx_XDECREF(__pyx_t_1);
11181  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11182  __pyx_r = NULL;
11183  __pyx_L0:;
11184  __Pyx_XGIVEREF(__pyx_r);
11185  __Pyx_RefNannyFinishContext();
11186  return __pyx_r;
11187  }
11188 
11189  /* "PyClical.pyx":1195
11190  * return self.instance.max_abs()
11191  *
11192  * def truncated(self, limit): # <<<<<<<<<<<<<<
11193  * """
11194  * Remove all terms of self with relative size smaller than limit.
11195  */
11196 
11197  /* Python wrapper */
11198  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
11199  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 ";
11200  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
11201  PyObject *__pyx_r = 0;
11202  __Pyx_RefNannyDeclarations
11203  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
11204  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
11205 
11206  /* function exit code */
11207  __Pyx_RefNannyFinishContext();
11208  return __pyx_r;
11209  }
11210 
11211  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
11212  PyObject *__pyx_r = NULL;
11213  __Pyx_RefNannyDeclarations
11214  PyObject *__pyx_t_1 = NULL;
11215  scalar_t __pyx_t_2;
11216  PyObject *__pyx_t_3 = NULL;
11217  int __pyx_lineno = 0;
11218  const char *__pyx_filename = NULL;
11219  int __pyx_clineno = 0;
11220  __Pyx_RefNannySetupContext("truncated", 0);
11221 
11222  /* "PyClical.pyx":1204
11223  * clifford("10000+{1}")
11224  * """
11225  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
11226  *
11227  * def isnan(self):
11228  */
11229  __Pyx_XDECREF(__pyx_r);
11230  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
11231  __Pyx_GOTREF(__pyx_t_1);
11232  __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)
11233  __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)
11234  __Pyx_GOTREF(__pyx_t_3);
11235  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11236  __pyx_r = __pyx_t_3;
11237  __pyx_t_3 = 0;
11238  goto __pyx_L0;
11239 
11240  /* "PyClical.pyx":1195
11241  * return self.instance.max_abs()
11242  *
11243  * def truncated(self, limit): # <<<<<<<<<<<<<<
11244  * """
11245  * Remove all terms of self with relative size smaller than limit.
11246  */
11247 
11248  /* function exit code */
11249  __pyx_L1_error:;
11250  __Pyx_XDECREF(__pyx_t_1);
11251  __Pyx_XDECREF(__pyx_t_3);
11252  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
11253  __pyx_r = NULL;
11254  __pyx_L0:;
11255  __Pyx_XGIVEREF(__pyx_r);
11256  __Pyx_RefNannyFinishContext();
11257  return __pyx_r;
11258  }
11259 
11260  /* "PyClical.pyx":1206
11261  * return clifford().wrap( self.instance.truncated(limit) )
11262  *
11263  * def isnan(self): # <<<<<<<<<<<<<<
11264  * """
11265  * Check if a multivector contains any IEEE NaN values.
11266  */
11267 
11268  /* Python wrapper */
11269  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11270  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
11271  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11272  PyObject *__pyx_r = 0;
11273  __Pyx_RefNannyDeclarations
11274  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
11275  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11276 
11277  /* function exit code */
11278  __Pyx_RefNannyFinishContext();
11279  return __pyx_r;
11280  }
11281 
11282  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11283  PyObject *__pyx_r = NULL;
11284  __Pyx_RefNannyDeclarations
11285  PyObject *__pyx_t_1 = NULL;
11286  int __pyx_lineno = 0;
11287  const char *__pyx_filename = NULL;
11288  int __pyx_clineno = 0;
11289  __Pyx_RefNannySetupContext("isnan", 0);
11290 
11291  /* "PyClical.pyx":1213
11292  * False
11293  * """
11294  * return self.instance.isnan() # <<<<<<<<<<<<<<
11295  *
11296  * def frame(self):
11297  */
11298  __Pyx_XDECREF(__pyx_r);
11299  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __pyx_L1_error)
11300  __Pyx_GOTREF(__pyx_t_1);
11301  __pyx_r = __pyx_t_1;
11302  __pyx_t_1 = 0;
11303  goto __pyx_L0;
11304 
11305  /* "PyClical.pyx":1206
11306  * return clifford().wrap( self.instance.truncated(limit) )
11307  *
11308  * def isnan(self): # <<<<<<<<<<<<<<
11309  * """
11310  * Check if a multivector contains any IEEE NaN values.
11311  */
11312 
11313  /* function exit code */
11314  __pyx_L1_error:;
11315  __Pyx_XDECREF(__pyx_t_1);
11316  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
11317  __pyx_r = NULL;
11318  __pyx_L0:;
11319  __Pyx_XGIVEREF(__pyx_r);
11320  __Pyx_RefNannyFinishContext();
11321  return __pyx_r;
11322  }
11323 
11324  /* "PyClical.pyx":1215
11325  * return self.instance.isnan()
11326  *
11327  * def frame(self): # <<<<<<<<<<<<<<
11328  * """
11329  * Subalgebra generated by all generators of terms of given multivector.
11330  */
11331 
11332  /* Python wrapper */
11333  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11334  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 ";
11335  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11336  PyObject *__pyx_r = 0;
11337  __Pyx_RefNannyDeclarations
11338  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
11339  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11340 
11341  /* function exit code */
11342  __Pyx_RefNannyFinishContext();
11343  return __pyx_r;
11344  }
11345 
11346  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11347  PyObject *__pyx_r = NULL;
11348  __Pyx_RefNannyDeclarations
11349  PyObject *__pyx_t_1 = NULL;
11350  PyObject *__pyx_t_2 = NULL;
11351  int __pyx_lineno = 0;
11352  const char *__pyx_filename = NULL;
11353  int __pyx_clineno = 0;
11354  __Pyx_RefNannySetupContext("frame", 0);
11355 
11356  /* "PyClical.pyx":1224
11357  * <class 'PyClical.index_set'>
11358  * """
11359  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
11360  *
11361  * def __repr__(self):
11362  */
11363  __Pyx_XDECREF(__pyx_r);
11364  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
11365  __Pyx_GOTREF(__pyx_t_1);
11366  __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)
11367  __Pyx_GOTREF(__pyx_t_2);
11368  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11369  __pyx_r = __pyx_t_2;
11370  __pyx_t_2 = 0;
11371  goto __pyx_L0;
11372 
11373  /* "PyClical.pyx":1215
11374  * return self.instance.isnan()
11375  *
11376  * def frame(self): # <<<<<<<<<<<<<<
11377  * """
11378  * Subalgebra generated by all generators of terms of given multivector.
11379  */
11380 
11381  /* function exit code */
11382  __pyx_L1_error:;
11383  __Pyx_XDECREF(__pyx_t_1);
11384  __Pyx_XDECREF(__pyx_t_2);
11385  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
11386  __pyx_r = NULL;
11387  __pyx_L0:;
11388  __Pyx_XGIVEREF(__pyx_r);
11389  __Pyx_RefNannyFinishContext();
11390  return __pyx_r;
11391  }
11392 
11393  /* "PyClical.pyx":1226
11394  * return index_set().wrap( self.instance.frame() )
11395  *
11396  * def __repr__(self): # <<<<<<<<<<<<<<
11397  * """
11398  * The official string representation of self.
11399  */
11400 
11401  /* Python wrapper */
11402  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
11403  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 ";
11404  #if CYTHON_COMPILING_IN_CPYTHON
11405  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
11406  #endif
11407  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
11408  PyObject *__pyx_r = 0;
11409  __Pyx_RefNannyDeclarations
11410  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
11411  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11412 
11413  /* function exit code */
11414  __Pyx_RefNannyFinishContext();
11415  return __pyx_r;
11416  }
11417 
11418  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11419  PyObject *__pyx_r = NULL;
11420  __Pyx_RefNannyDeclarations
11421  PyObject *__pyx_t_1 = NULL;
11422  int __pyx_lineno = 0;
11423  const char *__pyx_filename = NULL;
11424  int __pyx_clineno = 0;
11425  __Pyx_RefNannySetupContext("__repr__", 0);
11426 
11427  /* "PyClical.pyx":1233
11428  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
11429  * """
11430  * return clifford_to_repr( self.unwrap() ).decode() # <<<<<<<<<<<<<<
11431  *
11432  * def __str__(self):
11433  */
11434  __Pyx_XDECREF(__pyx_r);
11435  __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)
11436  __Pyx_GOTREF(__pyx_t_1);
11437  __pyx_r = __pyx_t_1;
11438  __pyx_t_1 = 0;
11439  goto __pyx_L0;
11440 
11441  /* "PyClical.pyx":1226
11442  * return index_set().wrap( self.instance.frame() )
11443  *
11444  * def __repr__(self): # <<<<<<<<<<<<<<
11445  * """
11446  * The official string representation of self.
11447  */
11448 
11449  /* function exit code */
11450  __pyx_L1_error:;
11451  __Pyx_XDECREF(__pyx_t_1);
11452  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11453  __pyx_r = NULL;
11454  __pyx_L0:;
11455  __Pyx_XGIVEREF(__pyx_r);
11456  __Pyx_RefNannyFinishContext();
11457  return __pyx_r;
11458  }
11459 
11460  /* "PyClical.pyx":1235
11461  * return clifford_to_repr( self.unwrap() ).decode()
11462  *
11463  * def __str__(self): # <<<<<<<<<<<<<<
11464  * """
11465  * The informal string representation of self.
11466  */
11467 
11468  /* Python wrapper */
11469  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
11470  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 ";
11471  #if CYTHON_COMPILING_IN_CPYTHON
11472  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
11473  #endif
11474  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
11475  PyObject *__pyx_r = 0;
11476  __Pyx_RefNannyDeclarations
11477  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
11478  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11479 
11480  /* function exit code */
11481  __Pyx_RefNannyFinishContext();
11482  return __pyx_r;
11483  }
11484 
11485  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11486  PyObject *__pyx_r = NULL;
11487  __Pyx_RefNannyDeclarations
11488  PyObject *__pyx_t_1 = NULL;
11489  int __pyx_lineno = 0;
11490  const char *__pyx_filename = NULL;
11491  int __pyx_clineno = 0;
11492  __Pyx_RefNannySetupContext("__str__", 0);
11493 
11494  /* "PyClical.pyx":1242
11495  * '1+3{-1}+2{1,2}+4{-2,7}'
11496  * """
11497  * return clifford_to_str( self.unwrap() ).decode() # <<<<<<<<<<<<<<
11498  *
11499  * def clifford_hidden_doctests():
11500  */
11501  __Pyx_XDECREF(__pyx_r);
11502  __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)
11503  __Pyx_GOTREF(__pyx_t_1);
11504  __pyx_r = __pyx_t_1;
11505  __pyx_t_1 = 0;
11506  goto __pyx_L0;
11507 
11508  /* "PyClical.pyx":1235
11509  * return clifford_to_repr( self.unwrap() ).decode()
11510  *
11511  * def __str__(self): # <<<<<<<<<<<<<<
11512  * """
11513  * The informal string representation of self.
11514  */
11515 
11516  /* function exit code */
11517  __pyx_L1_error:;
11518  __Pyx_XDECREF(__pyx_t_1);
11519  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11520  __pyx_r = NULL;
11521  __pyx_L0:;
11522  __Pyx_XGIVEREF(__pyx_r);
11523  __Pyx_RefNannyFinishContext();
11524  return __pyx_r;
11525  }
11526 
11527  /* "(tree fragment)":1
11528  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11529  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11530  * def __setstate_cython__(self, __pyx_state):
11531  */
11532 
11533  /* Python wrapper */
11534  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11535  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11536  PyObject *__pyx_r = 0;
11537  __Pyx_RefNannyDeclarations
11538  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
11539  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11540 
11541  /* function exit code */
11542  __Pyx_RefNannyFinishContext();
11543  return __pyx_r;
11544  }
11545 
11546  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11547  PyObject *__pyx_r = NULL;
11548  __Pyx_RefNannyDeclarations
11549  PyObject *__pyx_t_1 = NULL;
11550  int __pyx_lineno = 0;
11551  const char *__pyx_filename = NULL;
11552  int __pyx_clineno = 0;
11553  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11554 
11555  /* "(tree fragment)":2
11556  * def __reduce_cython__(self):
11557  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11558  * def __setstate_cython__(self, __pyx_state):
11559  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11560  */
11561  __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)
11562  __Pyx_GOTREF(__pyx_t_1);
11563  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11564  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11565  __PYX_ERR(1, 2, __pyx_L1_error)
11566 
11567  /* "(tree fragment)":1
11568  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11569  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11570  * def __setstate_cython__(self, __pyx_state):
11571  */
11572 
11573  /* function exit code */
11574  __pyx_L1_error:;
11575  __Pyx_XDECREF(__pyx_t_1);
11576  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11577  __pyx_r = NULL;
11578  __Pyx_XGIVEREF(__pyx_r);
11579  __Pyx_RefNannyFinishContext();
11580  return __pyx_r;
11581  }
11582 
11583  /* "(tree fragment)":3
11584  * def __reduce_cython__(self):
11585  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11586  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11587  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11588  */
11589 
11590  /* Python wrapper */
11591  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11592  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11593  PyObject *__pyx_r = 0;
11594  __Pyx_RefNannyDeclarations
11595  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11596  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11597 
11598  /* function exit code */
11599  __Pyx_RefNannyFinishContext();
11600  return __pyx_r;
11601  }
11602 
11603  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) {
11604  PyObject *__pyx_r = NULL;
11605  __Pyx_RefNannyDeclarations
11606  PyObject *__pyx_t_1 = NULL;
11607  int __pyx_lineno = 0;
11608  const char *__pyx_filename = NULL;
11609  int __pyx_clineno = 0;
11610  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11611 
11612  /* "(tree fragment)":4
11613  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11614  * def __setstate_cython__(self, __pyx_state):
11615  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11616  */
11617  __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)
11618  __Pyx_GOTREF(__pyx_t_1);
11619  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11620  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11621  __PYX_ERR(1, 4, __pyx_L1_error)
11622 
11623  /* "(tree fragment)":3
11624  * def __reduce_cython__(self):
11625  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11626  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11627  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11628  */
11629 
11630  /* function exit code */
11631  __pyx_L1_error:;
11632  __Pyx_XDECREF(__pyx_t_1);
11633  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11634  __pyx_r = NULL;
11635  __Pyx_XGIVEREF(__pyx_r);
11636  __Pyx_RefNannyFinishContext();
11637  return __pyx_r;
11638  }
11639 
11640  /* "PyClical.pyx":1244
11641  * return clifford_to_str( self.unwrap() ).decode()
11642  *
11643  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11644  * """
11645  * Tests for functions that Doctest cannot see.
11646  */
11647 
11648  /* Python wrapper */
11649  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11650  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 ";
11651  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};
11652  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11653  PyObject *__pyx_r = 0;
11654  __Pyx_RefNannyDeclarations
11655  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11656  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11657 
11658  /* function exit code */
11659  __Pyx_RefNannyFinishContext();
11660  return __pyx_r;
11661  }
11662 
11663  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11664  PyObject *__pyx_r = NULL;
11665  __Pyx_RefNannyDeclarations
11666  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11667 
11668  /* "PyClical.pyx":1326
11669  * True
11670  * """
11671  * return # <<<<<<<<<<<<<<
11672  *
11673  * cpdef inline inv(obj):
11674  */
11675  __Pyx_XDECREF(__pyx_r);
11676  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11677  goto __pyx_L0;
11678 
11679  /* "PyClical.pyx":1244
11680  * return clifford_to_str( self.unwrap() ).decode()
11681  *
11682  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11683  * """
11684  * Tests for functions that Doctest cannot see.
11685  */
11686 
11687  /* function exit code */
11688  __pyx_L0:;
11689  __Pyx_XGIVEREF(__pyx_r);
11690  __Pyx_RefNannyFinishContext();
11691  return __pyx_r;
11692  }
11693 
11694  /* "PyClical.pyx":1328
11695  * return
11696  *
11697  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11698  * """
11699  * Geometric multiplicative inverse.
11700  */
11701 
11702  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11703  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11704  PyObject *__pyx_r = NULL;
11705  __Pyx_RefNannyDeclarations
11706  PyObject *__pyx_t_1 = NULL;
11707  PyObject *__pyx_t_2 = NULL;
11708  PyObject *__pyx_t_3 = NULL;
11709  int __pyx_lineno = 0;
11710  const char *__pyx_filename = NULL;
11711  int __pyx_clineno = 0;
11712  __Pyx_RefNannySetupContext("inv", 0);
11713 
11714  /* "PyClical.pyx":1341
11715  * nan
11716  * """
11717  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11718  *
11719  * cpdef inline scalar(obj):
11720  */
11721  __Pyx_XDECREF(__pyx_r);
11722  __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)
11723  __Pyx_GOTREF(__pyx_t_2);
11724  __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)
11725  __Pyx_GOTREF(__pyx_t_3);
11726  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11727  __pyx_t_2 = NULL;
11728  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11729  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11730  if (likely(__pyx_t_2)) {
11731  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11732  __Pyx_INCREF(__pyx_t_2);
11733  __Pyx_INCREF(function);
11734  __Pyx_DECREF_SET(__pyx_t_3, function);
11735  }
11736  }
11737  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11738  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11739  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
11740  __Pyx_GOTREF(__pyx_t_1);
11741  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11742  __pyx_r = __pyx_t_1;
11743  __pyx_t_1 = 0;
11744  goto __pyx_L0;
11745 
11746  /* "PyClical.pyx":1328
11747  * return
11748  *
11749  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11750  * """
11751  * Geometric multiplicative inverse.
11752  */
11753 
11754  /* function exit code */
11755  __pyx_L1_error:;
11756  __Pyx_XDECREF(__pyx_t_1);
11757  __Pyx_XDECREF(__pyx_t_2);
11758  __Pyx_XDECREF(__pyx_t_3);
11759  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11760  __pyx_r = 0;
11761  __pyx_L0:;
11762  __Pyx_XGIVEREF(__pyx_r);
11763  __Pyx_RefNannyFinishContext();
11764  return __pyx_r;
11765  }
11766 
11767  /* Python wrapper */
11768  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11769  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 ";
11770  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11771  PyObject *__pyx_r = 0;
11772  __Pyx_RefNannyDeclarations
11773  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11774  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11775 
11776  /* function exit code */
11777  __Pyx_RefNannyFinishContext();
11778  return __pyx_r;
11779  }
11780 
11781  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11782  PyObject *__pyx_r = NULL;
11783  __Pyx_RefNannyDeclarations
11784  PyObject *__pyx_t_1 = NULL;
11785  int __pyx_lineno = 0;
11786  const char *__pyx_filename = NULL;
11787  int __pyx_clineno = 0;
11788  __Pyx_RefNannySetupContext("inv", 0);
11789  __Pyx_XDECREF(__pyx_r);
11790  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
11791  __Pyx_GOTREF(__pyx_t_1);
11792  __pyx_r = __pyx_t_1;
11793  __pyx_t_1 = 0;
11794  goto __pyx_L0;
11795 
11796  /* function exit code */
11797  __pyx_L1_error:;
11798  __Pyx_XDECREF(__pyx_t_1);
11799  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11800  __pyx_r = NULL;
11801  __pyx_L0:;
11802  __Pyx_XGIVEREF(__pyx_r);
11803  __Pyx_RefNannyFinishContext();
11804  return __pyx_r;
11805  }
11806 
11807  /* "PyClical.pyx":1343
11808  * return clifford(obj).inv()
11809  *
11810  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11811  * """
11812  * Scalar part.
11813  */
11814 
11815  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11816  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11817  PyObject *__pyx_r = NULL;
11818  __Pyx_RefNannyDeclarations
11819  PyObject *__pyx_t_1 = NULL;
11820  PyObject *__pyx_t_2 = NULL;
11821  PyObject *__pyx_t_3 = NULL;
11822  int __pyx_lineno = 0;
11823  const char *__pyx_filename = NULL;
11824  int __pyx_clineno = 0;
11825  __Pyx_RefNannySetupContext("scalar", 0);
11826 
11827  /* "PyClical.pyx":1352
11828  * 0.0
11829  * """
11830  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11831  *
11832  * cpdef inline real(obj):
11833  */
11834  __Pyx_XDECREF(__pyx_r);
11835  __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)
11836  __Pyx_GOTREF(__pyx_t_2);
11837  __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)
11838  __Pyx_GOTREF(__pyx_t_3);
11839  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11840  __pyx_t_2 = NULL;
11841  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11842  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11843  if (likely(__pyx_t_2)) {
11844  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11845  __Pyx_INCREF(__pyx_t_2);
11846  __Pyx_INCREF(function);
11847  __Pyx_DECREF_SET(__pyx_t_3, function);
11848  }
11849  }
11850  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11851  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11852  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error)
11853  __Pyx_GOTREF(__pyx_t_1);
11854  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11855  __pyx_r = __pyx_t_1;
11856  __pyx_t_1 = 0;
11857  goto __pyx_L0;
11858 
11859  /* "PyClical.pyx":1343
11860  * return clifford(obj).inv()
11861  *
11862  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11863  * """
11864  * Scalar part.
11865  */
11866 
11867  /* function exit code */
11868  __pyx_L1_error:;
11869  __Pyx_XDECREF(__pyx_t_1);
11870  __Pyx_XDECREF(__pyx_t_2);
11871  __Pyx_XDECREF(__pyx_t_3);
11872  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11873  __pyx_r = 0;
11874  __pyx_L0:;
11875  __Pyx_XGIVEREF(__pyx_r);
11876  __Pyx_RefNannyFinishContext();
11877  return __pyx_r;
11878  }
11879 
11880  /* Python wrapper */
11881  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11882  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 ";
11883  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11884  PyObject *__pyx_r = 0;
11885  __Pyx_RefNannyDeclarations
11886  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11887  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11888 
11889  /* function exit code */
11890  __Pyx_RefNannyFinishContext();
11891  return __pyx_r;
11892  }
11893 
11894  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11895  PyObject *__pyx_r = NULL;
11896  __Pyx_RefNannyDeclarations
11897  PyObject *__pyx_t_1 = NULL;
11898  int __pyx_lineno = 0;
11899  const char *__pyx_filename = NULL;
11900  int __pyx_clineno = 0;
11901  __Pyx_RefNannySetupContext("scalar", 0);
11902  __Pyx_XDECREF(__pyx_r);
11903  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
11904  __Pyx_GOTREF(__pyx_t_1);
11905  __pyx_r = __pyx_t_1;
11906  __pyx_t_1 = 0;
11907  goto __pyx_L0;
11908 
11909  /* function exit code */
11910  __pyx_L1_error:;
11911  __Pyx_XDECREF(__pyx_t_1);
11912  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11913  __pyx_r = NULL;
11914  __pyx_L0:;
11915  __Pyx_XGIVEREF(__pyx_r);
11916  __Pyx_RefNannyFinishContext();
11917  return __pyx_r;
11918  }
11919 
11920  /* "PyClical.pyx":1354
11921  * return clifford(obj).scalar()
11922  *
11923  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11924  * """
11925  * Real part: synonym for scalar part.
11926  */
11927 
11928  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11929  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11930  PyObject *__pyx_r = NULL;
11931  __Pyx_RefNannyDeclarations
11932  PyObject *__pyx_t_1 = NULL;
11933  PyObject *__pyx_t_2 = NULL;
11934  PyObject *__pyx_t_3 = NULL;
11935  int __pyx_lineno = 0;
11936  const char *__pyx_filename = NULL;
11937  int __pyx_clineno = 0;
11938  __Pyx_RefNannySetupContext("real", 0);
11939 
11940  /* "PyClical.pyx":1363
11941  * 0.0
11942  * """
11943  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11944  *
11945  * cpdef inline imag(obj):
11946  */
11947  __Pyx_XDECREF(__pyx_r);
11948  __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)
11949  __Pyx_GOTREF(__pyx_t_2);
11950  __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)
11951  __Pyx_GOTREF(__pyx_t_3);
11952  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11953  __pyx_t_2 = NULL;
11954  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11955  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11956  if (likely(__pyx_t_2)) {
11957  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11958  __Pyx_INCREF(__pyx_t_2);
11959  __Pyx_INCREF(function);
11960  __Pyx_DECREF_SET(__pyx_t_3, function);
11961  }
11962  }
11963  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11964  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11965  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error)
11966  __Pyx_GOTREF(__pyx_t_1);
11967  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11968  __pyx_r = __pyx_t_1;
11969  __pyx_t_1 = 0;
11970  goto __pyx_L0;
11971 
11972  /* "PyClical.pyx":1354
11973  * return clifford(obj).scalar()
11974  *
11975  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11976  * """
11977  * Real part: synonym for scalar part.
11978  */
11979 
11980  /* function exit code */
11981  __pyx_L1_error:;
11982  __Pyx_XDECREF(__pyx_t_1);
11983  __Pyx_XDECREF(__pyx_t_2);
11984  __Pyx_XDECREF(__pyx_t_3);
11985  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11986  __pyx_r = 0;
11987  __pyx_L0:;
11988  __Pyx_XGIVEREF(__pyx_r);
11989  __Pyx_RefNannyFinishContext();
11990  return __pyx_r;
11991  }
11992 
11993  /* Python wrapper */
11994  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11995  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 ";
11996  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11997  PyObject *__pyx_r = 0;
11998  __Pyx_RefNannyDeclarations
11999  __Pyx_RefNannySetupContext("real (wrapper)", 0);
12000  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
12001 
12002  /* function exit code */
12003  __Pyx_RefNannyFinishContext();
12004  return __pyx_r;
12005  }
12006 
12007  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12008  PyObject *__pyx_r = NULL;
12009  __Pyx_RefNannyDeclarations
12010  PyObject *__pyx_t_1 = NULL;
12011  int __pyx_lineno = 0;
12012  const char *__pyx_filename = NULL;
12013  int __pyx_clineno = 0;
12014  __Pyx_RefNannySetupContext("real", 0);
12015  __Pyx_XDECREF(__pyx_r);
12016  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
12017  __Pyx_GOTREF(__pyx_t_1);
12018  __pyx_r = __pyx_t_1;
12019  __pyx_t_1 = 0;
12020  goto __pyx_L0;
12021 
12022  /* function exit code */
12023  __pyx_L1_error:;
12024  __Pyx_XDECREF(__pyx_t_1);
12025  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
12026  __pyx_r = NULL;
12027  __pyx_L0:;
12028  __Pyx_XGIVEREF(__pyx_r);
12029  __Pyx_RefNannyFinishContext();
12030  return __pyx_r;
12031  }
12032 
12033  /* "PyClical.pyx":1365
12034  * return clifford(obj).scalar()
12035  *
12036  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
12037  * """
12038  * Imaginary part: deprecated (always 0).
12039  */
12040 
12041  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12042  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12043  PyObject *__pyx_r = NULL;
12044  __Pyx_RefNannyDeclarations
12045  __Pyx_RefNannySetupContext("imag", 0);
12046 
12047  /* "PyClical.pyx":1374
12048  * 0.0
12049  * """
12050  * return 0.0 # <<<<<<<<<<<<<<
12051  *
12052  * cpdef inline pure(obj):
12053  */
12054  __Pyx_XDECREF(__pyx_r);
12055  __Pyx_INCREF(__pyx_float_0_0);
12056  __pyx_r = __pyx_float_0_0;
12057  goto __pyx_L0;
12058 
12059  /* "PyClical.pyx":1365
12060  * return clifford(obj).scalar()
12061  *
12062  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
12063  * """
12064  * Imaginary part: deprecated (always 0).
12065  */
12066 
12067  /* function exit code */
12068  __pyx_L0:;
12069  __Pyx_XGIVEREF(__pyx_r);
12070  __Pyx_RefNannyFinishContext();
12071  return __pyx_r;
12072  }
12073 
12074  /* Python wrapper */
12075  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12076  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 ";
12077  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12078  PyObject *__pyx_r = 0;
12079  __Pyx_RefNannyDeclarations
12080  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
12081  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
12082 
12083  /* function exit code */
12084  __Pyx_RefNannyFinishContext();
12085  return __pyx_r;
12086  }
12087 
12088  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12089  PyObject *__pyx_r = NULL;
12090  __Pyx_RefNannyDeclarations
12091  PyObject *__pyx_t_1 = NULL;
12092  int __pyx_lineno = 0;
12093  const char *__pyx_filename = NULL;
12094  int __pyx_clineno = 0;
12095  __Pyx_RefNannySetupContext("imag", 0);
12096  __Pyx_XDECREF(__pyx_r);
12097  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error)
12098  __Pyx_GOTREF(__pyx_t_1);
12099  __pyx_r = __pyx_t_1;
12100  __pyx_t_1 = 0;
12101  goto __pyx_L0;
12102 
12103  /* function exit code */
12104  __pyx_L1_error:;
12105  __Pyx_XDECREF(__pyx_t_1);
12106  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
12107  __pyx_r = NULL;
12108  __pyx_L0:;
12109  __Pyx_XGIVEREF(__pyx_r);
12110  __Pyx_RefNannyFinishContext();
12111  return __pyx_r;
12112  }
12113 
12114  /* "PyClical.pyx":1376
12115  * return 0.0
12116  *
12117  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
12118  * """
12119  * Pure part
12120  */
12121 
12122  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12123  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12124  PyObject *__pyx_r = NULL;
12125  __Pyx_RefNannyDeclarations
12126  PyObject *__pyx_t_1 = NULL;
12127  PyObject *__pyx_t_2 = NULL;
12128  PyObject *__pyx_t_3 = NULL;
12129  int __pyx_lineno = 0;
12130  const char *__pyx_filename = NULL;
12131  int __pyx_clineno = 0;
12132  __Pyx_RefNannySetupContext("pure", 0);
12133 
12134  /* "PyClical.pyx":1385
12135  * {1,2}
12136  * """
12137  * return clifford(obj).pure() # <<<<<<<<<<<<<<
12138  *
12139  * cpdef inline even(obj):
12140  */
12141  __Pyx_XDECREF(__pyx_r);
12142  __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)
12143  __Pyx_GOTREF(__pyx_t_2);
12144  __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)
12145  __Pyx_GOTREF(__pyx_t_3);
12146  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12147  __pyx_t_2 = NULL;
12148  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12149  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12150  if (likely(__pyx_t_2)) {
12151  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12152  __Pyx_INCREF(__pyx_t_2);
12153  __Pyx_INCREF(function);
12154  __Pyx_DECREF_SET(__pyx_t_3, function);
12155  }
12156  }
12157  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12158  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12159  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
12160  __Pyx_GOTREF(__pyx_t_1);
12161  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12162  __pyx_r = __pyx_t_1;
12163  __pyx_t_1 = 0;
12164  goto __pyx_L0;
12165 
12166  /* "PyClical.pyx":1376
12167  * return 0.0
12168  *
12169  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
12170  * """
12171  * Pure part
12172  */
12173 
12174  /* function exit code */
12175  __pyx_L1_error:;
12176  __Pyx_XDECREF(__pyx_t_1);
12177  __Pyx_XDECREF(__pyx_t_2);
12178  __Pyx_XDECREF(__pyx_t_3);
12179  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
12180  __pyx_r = 0;
12181  __pyx_L0:;
12182  __Pyx_XGIVEREF(__pyx_r);
12183  __Pyx_RefNannyFinishContext();
12184  return __pyx_r;
12185  }
12186 
12187  /* Python wrapper */
12188  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12189  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 ";
12190  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12191  PyObject *__pyx_r = 0;
12192  __Pyx_RefNannyDeclarations
12193  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
12194  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
12195 
12196  /* function exit code */
12197  __Pyx_RefNannyFinishContext();
12198  return __pyx_r;
12199  }
12200 
12201  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12202  PyObject *__pyx_r = NULL;
12203  __Pyx_RefNannyDeclarations
12204  PyObject *__pyx_t_1 = NULL;
12205  int __pyx_lineno = 0;
12206  const char *__pyx_filename = NULL;
12207  int __pyx_clineno = 0;
12208  __Pyx_RefNannySetupContext("pure", 0);
12209  __Pyx_XDECREF(__pyx_r);
12210  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L1_error)
12211  __Pyx_GOTREF(__pyx_t_1);
12212  __pyx_r = __pyx_t_1;
12213  __pyx_t_1 = 0;
12214  goto __pyx_L0;
12215 
12216  /* function exit code */
12217  __pyx_L1_error:;
12218  __Pyx_XDECREF(__pyx_t_1);
12219  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
12220  __pyx_r = NULL;
12221  __pyx_L0:;
12222  __Pyx_XGIVEREF(__pyx_r);
12223  __Pyx_RefNannyFinishContext();
12224  return __pyx_r;
12225  }
12226 
12227  /* "PyClical.pyx":1387
12228  * return clifford(obj).pure()
12229  *
12230  * cpdef inline even(obj): # <<<<<<<<<<<<<<
12231  * """
12232  * Even part of multivector, sum of even grade terms.
12233  */
12234 
12235  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12236  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12237  PyObject *__pyx_r = NULL;
12238  __Pyx_RefNannyDeclarations
12239  PyObject *__pyx_t_1 = NULL;
12240  PyObject *__pyx_t_2 = NULL;
12241  PyObject *__pyx_t_3 = NULL;
12242  int __pyx_lineno = 0;
12243  const char *__pyx_filename = NULL;
12244  int __pyx_clineno = 0;
12245  __Pyx_RefNannySetupContext("even", 0);
12246 
12247  /* "PyClical.pyx":1394
12248  * 1+{1,2}
12249  * """
12250  * return clifford(obj).even() # <<<<<<<<<<<<<<
12251  *
12252  * cpdef inline odd(obj):
12253  */
12254  __Pyx_XDECREF(__pyx_r);
12255  __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)
12256  __Pyx_GOTREF(__pyx_t_2);
12257  __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)
12258  __Pyx_GOTREF(__pyx_t_3);
12259  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12260  __pyx_t_2 = NULL;
12261  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12262  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12263  if (likely(__pyx_t_2)) {
12264  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12265  __Pyx_INCREF(__pyx_t_2);
12266  __Pyx_INCREF(function);
12267  __Pyx_DECREF_SET(__pyx_t_3, function);
12268  }
12269  }
12270  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12271  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12272  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error)
12273  __Pyx_GOTREF(__pyx_t_1);
12274  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12275  __pyx_r = __pyx_t_1;
12276  __pyx_t_1 = 0;
12277  goto __pyx_L0;
12278 
12279  /* "PyClical.pyx":1387
12280  * return clifford(obj).pure()
12281  *
12282  * cpdef inline even(obj): # <<<<<<<<<<<<<<
12283  * """
12284  * Even part of multivector, sum of even grade terms.
12285  */
12286 
12287  /* function exit code */
12288  __pyx_L1_error:;
12289  __Pyx_XDECREF(__pyx_t_1);
12290  __Pyx_XDECREF(__pyx_t_2);
12291  __Pyx_XDECREF(__pyx_t_3);
12292  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
12293  __pyx_r = 0;
12294  __pyx_L0:;
12295  __Pyx_XGIVEREF(__pyx_r);
12296  __Pyx_RefNannyFinishContext();
12297  return __pyx_r;
12298  }
12299 
12300  /* Python wrapper */
12301  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12302  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 ";
12303  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12304  PyObject *__pyx_r = 0;
12305  __Pyx_RefNannyDeclarations
12306  __Pyx_RefNannySetupContext("even (wrapper)", 0);
12307  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
12308 
12309  /* function exit code */
12310  __Pyx_RefNannyFinishContext();
12311  return __pyx_r;
12312  }
12313 
12314  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12315  PyObject *__pyx_r = NULL;
12316  __Pyx_RefNannyDeclarations
12317  PyObject *__pyx_t_1 = NULL;
12318  int __pyx_lineno = 0;
12319  const char *__pyx_filename = NULL;
12320  int __pyx_clineno = 0;
12321  __Pyx_RefNannySetupContext("even", 0);
12322  __Pyx_XDECREF(__pyx_r);
12323  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
12324  __Pyx_GOTREF(__pyx_t_1);
12325  __pyx_r = __pyx_t_1;
12326  __pyx_t_1 = 0;
12327  goto __pyx_L0;
12328 
12329  /* function exit code */
12330  __pyx_L1_error:;
12331  __Pyx_XDECREF(__pyx_t_1);
12332  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
12333  __pyx_r = NULL;
12334  __pyx_L0:;
12335  __Pyx_XGIVEREF(__pyx_r);
12336  __Pyx_RefNannyFinishContext();
12337  return __pyx_r;
12338  }
12339 
12340  /* "PyClical.pyx":1396
12341  * return clifford(obj).even()
12342  *
12343  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
12344  * """
12345  * Odd part of multivector, sum of odd grade terms.
12346  */
12347 
12348  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12349  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12350  PyObject *__pyx_r = NULL;
12351  __Pyx_RefNannyDeclarations
12352  PyObject *__pyx_t_1 = NULL;
12353  PyObject *__pyx_t_2 = NULL;
12354  PyObject *__pyx_t_3 = NULL;
12355  int __pyx_lineno = 0;
12356  const char *__pyx_filename = NULL;
12357  int __pyx_clineno = 0;
12358  __Pyx_RefNannySetupContext("odd", 0);
12359 
12360  /* "PyClical.pyx":1403
12361  * {1}
12362  * """
12363  * return clifford(obj).odd() # <<<<<<<<<<<<<<
12364  *
12365  * cpdef inline involute(obj):
12366  */
12367  __Pyx_XDECREF(__pyx_r);
12368  __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)
12369  __Pyx_GOTREF(__pyx_t_2);
12370  __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)
12371  __Pyx_GOTREF(__pyx_t_3);
12372  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12373  __pyx_t_2 = NULL;
12374  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12375  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12376  if (likely(__pyx_t_2)) {
12377  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12378  __Pyx_INCREF(__pyx_t_2);
12379  __Pyx_INCREF(function);
12380  __Pyx_DECREF_SET(__pyx_t_3, function);
12381  }
12382  }
12383  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12384  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12385  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
12386  __Pyx_GOTREF(__pyx_t_1);
12387  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12388  __pyx_r = __pyx_t_1;
12389  __pyx_t_1 = 0;
12390  goto __pyx_L0;
12391 
12392  /* "PyClical.pyx":1396
12393  * return clifford(obj).even()
12394  *
12395  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
12396  * """
12397  * Odd part of multivector, sum of odd grade terms.
12398  */
12399 
12400  /* function exit code */
12401  __pyx_L1_error:;
12402  __Pyx_XDECREF(__pyx_t_1);
12403  __Pyx_XDECREF(__pyx_t_2);
12404  __Pyx_XDECREF(__pyx_t_3);
12405  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
12406  __pyx_r = 0;
12407  __pyx_L0:;
12408  __Pyx_XGIVEREF(__pyx_r);
12409  __Pyx_RefNannyFinishContext();
12410  return __pyx_r;
12411  }
12412 
12413  /* Python wrapper */
12414  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12415  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 ";
12416  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12417  PyObject *__pyx_r = 0;
12418  __Pyx_RefNannyDeclarations
12419  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
12420  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
12421 
12422  /* function exit code */
12423  __Pyx_RefNannyFinishContext();
12424  return __pyx_r;
12425  }
12426 
12427  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12428  PyObject *__pyx_r = NULL;
12429  __Pyx_RefNannyDeclarations
12430  PyObject *__pyx_t_1 = NULL;
12431  int __pyx_lineno = 0;
12432  const char *__pyx_filename = NULL;
12433  int __pyx_clineno = 0;
12434  __Pyx_RefNannySetupContext("odd", 0);
12435  __Pyx_XDECREF(__pyx_r);
12436  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error)
12437  __Pyx_GOTREF(__pyx_t_1);
12438  __pyx_r = __pyx_t_1;
12439  __pyx_t_1 = 0;
12440  goto __pyx_L0;
12441 
12442  /* function exit code */
12443  __pyx_L1_error:;
12444  __Pyx_XDECREF(__pyx_t_1);
12445  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
12446  __pyx_r = NULL;
12447  __pyx_L0:;
12448  __Pyx_XGIVEREF(__pyx_r);
12449  __Pyx_RefNannyFinishContext();
12450  return __pyx_r;
12451  }
12452 
12453  /* "PyClical.pyx":1405
12454  * return clifford(obj).odd()
12455  *
12456  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
12457  * """
12458  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
12459  */
12460 
12461  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12462  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12463  PyObject *__pyx_r = NULL;
12464  __Pyx_RefNannyDeclarations
12465  PyObject *__pyx_t_1 = NULL;
12466  PyObject *__pyx_t_2 = NULL;
12467  PyObject *__pyx_t_3 = NULL;
12468  int __pyx_lineno = 0;
12469  const char *__pyx_filename = NULL;
12470  int __pyx_clineno = 0;
12471  __Pyx_RefNannySetupContext("involute", 0);
12472 
12473  /* "PyClical.pyx":1418
12474  * 1-{1}+{1,2}
12475  * """
12476  * return clifford(obj).involute() # <<<<<<<<<<<<<<
12477  *
12478  * cpdef inline reverse(obj):
12479  */
12480  __Pyx_XDECREF(__pyx_r);
12481  __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)
12482  __Pyx_GOTREF(__pyx_t_2);
12483  __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)
12484  __Pyx_GOTREF(__pyx_t_3);
12485  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12486  __pyx_t_2 = NULL;
12487  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12488  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12489  if (likely(__pyx_t_2)) {
12490  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12491  __Pyx_INCREF(__pyx_t_2);
12492  __Pyx_INCREF(function);
12493  __Pyx_DECREF_SET(__pyx_t_3, function);
12494  }
12495  }
12496  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12497  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12498  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
12499  __Pyx_GOTREF(__pyx_t_1);
12500  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12501  __pyx_r = __pyx_t_1;
12502  __pyx_t_1 = 0;
12503  goto __pyx_L0;
12504 
12505  /* "PyClical.pyx":1405
12506  * return clifford(obj).odd()
12507  *
12508  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
12509  * """
12510  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
12511  */
12512 
12513  /* function exit code */
12514  __pyx_L1_error:;
12515  __Pyx_XDECREF(__pyx_t_1);
12516  __Pyx_XDECREF(__pyx_t_2);
12517  __Pyx_XDECREF(__pyx_t_3);
12518  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12519  __pyx_r = 0;
12520  __pyx_L0:;
12521  __Pyx_XGIVEREF(__pyx_r);
12522  __Pyx_RefNannyFinishContext();
12523  return __pyx_r;
12524  }
12525 
12526  /* Python wrapper */
12527  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12528  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 ";
12529  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12530  PyObject *__pyx_r = 0;
12531  __Pyx_RefNannyDeclarations
12532  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
12533  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
12534 
12535  /* function exit code */
12536  __Pyx_RefNannyFinishContext();
12537  return __pyx_r;
12538  }
12539 
12540  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12541  PyObject *__pyx_r = NULL;
12542  __Pyx_RefNannyDeclarations
12543  PyObject *__pyx_t_1 = NULL;
12544  int __pyx_lineno = 0;
12545  const char *__pyx_filename = NULL;
12546  int __pyx_clineno = 0;
12547  __Pyx_RefNannySetupContext("involute", 0);
12548  __Pyx_XDECREF(__pyx_r);
12549  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
12550  __Pyx_GOTREF(__pyx_t_1);
12551  __pyx_r = __pyx_t_1;
12552  __pyx_t_1 = 0;
12553  goto __pyx_L0;
12554 
12555  /* function exit code */
12556  __pyx_L1_error:;
12557  __Pyx_XDECREF(__pyx_t_1);
12558  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12559  __pyx_r = NULL;
12560  __pyx_L0:;
12561  __Pyx_XGIVEREF(__pyx_r);
12562  __Pyx_RefNannyFinishContext();
12563  return __pyx_r;
12564  }
12565 
12566  /* "PyClical.pyx":1420
12567  * return clifford(obj).involute()
12568  *
12569  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12570  * """
12571  * Reversion, eg. {1}*{2} -> {2}*{1}
12572  */
12573 
12574  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12575  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12576  PyObject *__pyx_r = NULL;
12577  __Pyx_RefNannyDeclarations
12578  PyObject *__pyx_t_1 = NULL;
12579  PyObject *__pyx_t_2 = NULL;
12580  PyObject *__pyx_t_3 = NULL;
12581  int __pyx_lineno = 0;
12582  const char *__pyx_filename = NULL;
12583  int __pyx_clineno = 0;
12584  __Pyx_RefNannySetupContext("reverse", 0);
12585 
12586  /* "PyClical.pyx":1433
12587  * 1+{1}-{1,2}
12588  * """
12589  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
12590  *
12591  * cpdef inline conj(obj):
12592  */
12593  __Pyx_XDECREF(__pyx_r);
12594  __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)
12595  __Pyx_GOTREF(__pyx_t_2);
12596  __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)
12597  __Pyx_GOTREF(__pyx_t_3);
12598  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12599  __pyx_t_2 = NULL;
12600  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12601  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12602  if (likely(__pyx_t_2)) {
12603  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12604  __Pyx_INCREF(__pyx_t_2);
12605  __Pyx_INCREF(function);
12606  __Pyx_DECREF_SET(__pyx_t_3, function);
12607  }
12608  }
12609  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12610  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12611  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __pyx_L1_error)
12612  __Pyx_GOTREF(__pyx_t_1);
12613  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12614  __pyx_r = __pyx_t_1;
12615  __pyx_t_1 = 0;
12616  goto __pyx_L0;
12617 
12618  /* "PyClical.pyx":1420
12619  * return clifford(obj).involute()
12620  *
12621  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12622  * """
12623  * Reversion, eg. {1}*{2} -> {2}*{1}
12624  */
12625 
12626  /* function exit code */
12627  __pyx_L1_error:;
12628  __Pyx_XDECREF(__pyx_t_1);
12629  __Pyx_XDECREF(__pyx_t_2);
12630  __Pyx_XDECREF(__pyx_t_3);
12631  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12632  __pyx_r = 0;
12633  __pyx_L0:;
12634  __Pyx_XGIVEREF(__pyx_r);
12635  __Pyx_RefNannyFinishContext();
12636  return __pyx_r;
12637  }
12638 
12639  /* Python wrapper */
12640  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12641  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 ";
12642  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12643  PyObject *__pyx_r = 0;
12644  __Pyx_RefNannyDeclarations
12645  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12646  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12647 
12648  /* function exit code */
12649  __Pyx_RefNannyFinishContext();
12650  return __pyx_r;
12651  }
12652 
12653  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12654  PyObject *__pyx_r = NULL;
12655  __Pyx_RefNannyDeclarations
12656  PyObject *__pyx_t_1 = NULL;
12657  int __pyx_lineno = 0;
12658  const char *__pyx_filename = NULL;
12659  int __pyx_clineno = 0;
12660  __Pyx_RefNannySetupContext("reverse", 0);
12661  __Pyx_XDECREF(__pyx_r);
12662  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
12663  __Pyx_GOTREF(__pyx_t_1);
12664  __pyx_r = __pyx_t_1;
12665  __pyx_t_1 = 0;
12666  goto __pyx_L0;
12667 
12668  /* function exit code */
12669  __pyx_L1_error:;
12670  __Pyx_XDECREF(__pyx_t_1);
12671  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12672  __pyx_r = NULL;
12673  __pyx_L0:;
12674  __Pyx_XGIVEREF(__pyx_r);
12675  __Pyx_RefNannyFinishContext();
12676  return __pyx_r;
12677  }
12678 
12679  /* "PyClical.pyx":1435
12680  * return clifford(obj).reverse()
12681  *
12682  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12683  * """
12684  * Conjugation, reverse o involute == involute o reverse.
12685  */
12686 
12687  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12688  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12689  PyObject *__pyx_r = NULL;
12690  __Pyx_RefNannyDeclarations
12691  PyObject *__pyx_t_1 = NULL;
12692  PyObject *__pyx_t_2 = NULL;
12693  PyObject *__pyx_t_3 = NULL;
12694  int __pyx_lineno = 0;
12695  const char *__pyx_filename = NULL;
12696  int __pyx_clineno = 0;
12697  __Pyx_RefNannySetupContext("conj", 0);
12698 
12699  /* "PyClical.pyx":1448
12700  * 1-{1}-{1,2}
12701  * """
12702  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12703  *
12704  * cpdef inline quad(obj):
12705  */
12706  __Pyx_XDECREF(__pyx_r);
12707  __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)
12708  __Pyx_GOTREF(__pyx_t_2);
12709  __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)
12710  __Pyx_GOTREF(__pyx_t_3);
12711  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12712  __pyx_t_2 = NULL;
12713  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12714  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12715  if (likely(__pyx_t_2)) {
12716  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12717  __Pyx_INCREF(__pyx_t_2);
12718  __Pyx_INCREF(function);
12719  __Pyx_DECREF_SET(__pyx_t_3, function);
12720  }
12721  }
12722  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12723  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12724  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1448, __pyx_L1_error)
12725  __Pyx_GOTREF(__pyx_t_1);
12726  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12727  __pyx_r = __pyx_t_1;
12728  __pyx_t_1 = 0;
12729  goto __pyx_L0;
12730 
12731  /* "PyClical.pyx":1435
12732  * return clifford(obj).reverse()
12733  *
12734  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12735  * """
12736  * Conjugation, reverse o involute == involute o reverse.
12737  */
12738 
12739  /* function exit code */
12740  __pyx_L1_error:;
12741  __Pyx_XDECREF(__pyx_t_1);
12742  __Pyx_XDECREF(__pyx_t_2);
12743  __Pyx_XDECREF(__pyx_t_3);
12744  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12745  __pyx_r = 0;
12746  __pyx_L0:;
12747  __Pyx_XGIVEREF(__pyx_r);
12748  __Pyx_RefNannyFinishContext();
12749  return __pyx_r;
12750  }
12751 
12752  /* Python wrapper */
12753  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12754  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 ";
12755  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12756  PyObject *__pyx_r = 0;
12757  __Pyx_RefNannyDeclarations
12758  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12759  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12760 
12761  /* function exit code */
12762  __Pyx_RefNannyFinishContext();
12763  return __pyx_r;
12764  }
12765 
12766  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12767  PyObject *__pyx_r = NULL;
12768  __Pyx_RefNannyDeclarations
12769  PyObject *__pyx_t_1 = NULL;
12770  int __pyx_lineno = 0;
12771  const char *__pyx_filename = NULL;
12772  int __pyx_clineno = 0;
12773  __Pyx_RefNannySetupContext("conj", 0);
12774  __Pyx_XDECREF(__pyx_r);
12775  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error)
12776  __Pyx_GOTREF(__pyx_t_1);
12777  __pyx_r = __pyx_t_1;
12778  __pyx_t_1 = 0;
12779  goto __pyx_L0;
12780 
12781  /* function exit code */
12782  __pyx_L1_error:;
12783  __Pyx_XDECREF(__pyx_t_1);
12784  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12785  __pyx_r = NULL;
12786  __pyx_L0:;
12787  __Pyx_XGIVEREF(__pyx_r);
12788  __Pyx_RefNannyFinishContext();
12789  return __pyx_r;
12790  }
12791 
12792  /* "PyClical.pyx":1450
12793  * return clifford(obj).conj()
12794  *
12795  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12796  * """
12797  * Quadratic form == (rev(x)*x)(0).
12798  */
12799 
12800  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12801  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12802  PyObject *__pyx_r = NULL;
12803  __Pyx_RefNannyDeclarations
12804  PyObject *__pyx_t_1 = NULL;
12805  PyObject *__pyx_t_2 = NULL;
12806  PyObject *__pyx_t_3 = NULL;
12807  int __pyx_lineno = 0;
12808  const char *__pyx_filename = NULL;
12809  int __pyx_clineno = 0;
12810  __Pyx_RefNannySetupContext("quad", 0);
12811 
12812  /* "PyClical.pyx":1459
12813  * 2.0
12814  * """
12815  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12816  *
12817  * cpdef inline norm(obj):
12818  */
12819  __Pyx_XDECREF(__pyx_r);
12820  __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)
12821  __Pyx_GOTREF(__pyx_t_2);
12822  __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)
12823  __Pyx_GOTREF(__pyx_t_3);
12824  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12825  __pyx_t_2 = NULL;
12826  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12827  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12828  if (likely(__pyx_t_2)) {
12829  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12830  __Pyx_INCREF(__pyx_t_2);
12831  __Pyx_INCREF(function);
12832  __Pyx_DECREF_SET(__pyx_t_3, function);
12833  }
12834  }
12835  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12836  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12837  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error)
12838  __Pyx_GOTREF(__pyx_t_1);
12839  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12840  __pyx_r = __pyx_t_1;
12841  __pyx_t_1 = 0;
12842  goto __pyx_L0;
12843 
12844  /* "PyClical.pyx":1450
12845  * return clifford(obj).conj()
12846  *
12847  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12848  * """
12849  * Quadratic form == (rev(x)*x)(0).
12850  */
12851 
12852  /* function exit code */
12853  __pyx_L1_error:;
12854  __Pyx_XDECREF(__pyx_t_1);
12855  __Pyx_XDECREF(__pyx_t_2);
12856  __Pyx_XDECREF(__pyx_t_3);
12857  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12858  __pyx_r = 0;
12859  __pyx_L0:;
12860  __Pyx_XGIVEREF(__pyx_r);
12861  __Pyx_RefNannyFinishContext();
12862  return __pyx_r;
12863  }
12864 
12865  /* Python wrapper */
12866  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12867  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 ";
12868  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12869  PyObject *__pyx_r = 0;
12870  __Pyx_RefNannyDeclarations
12871  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12872  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12873 
12874  /* function exit code */
12875  __Pyx_RefNannyFinishContext();
12876  return __pyx_r;
12877  }
12878 
12879  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12880  PyObject *__pyx_r = NULL;
12881  __Pyx_RefNannyDeclarations
12882  PyObject *__pyx_t_1 = NULL;
12883  int __pyx_lineno = 0;
12884  const char *__pyx_filename = NULL;
12885  int __pyx_clineno = 0;
12886  __Pyx_RefNannySetupContext("quad", 0);
12887  __Pyx_XDECREF(__pyx_r);
12888  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error)
12889  __Pyx_GOTREF(__pyx_t_1);
12890  __pyx_r = __pyx_t_1;
12891  __pyx_t_1 = 0;
12892  goto __pyx_L0;
12893 
12894  /* function exit code */
12895  __pyx_L1_error:;
12896  __Pyx_XDECREF(__pyx_t_1);
12897  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12898  __pyx_r = NULL;
12899  __pyx_L0:;
12900  __Pyx_XGIVEREF(__pyx_r);
12901  __Pyx_RefNannyFinishContext();
12902  return __pyx_r;
12903  }
12904 
12905  /* "PyClical.pyx":1461
12906  * return clifford(obj).quad()
12907  *
12908  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12909  * """
12910  * norm == sum of squares of coordinates.
12911  */
12912 
12913  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12914  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12915  PyObject *__pyx_r = NULL;
12916  __Pyx_RefNannyDeclarations
12917  PyObject *__pyx_t_1 = NULL;
12918  PyObject *__pyx_t_2 = NULL;
12919  PyObject *__pyx_t_3 = NULL;
12920  int __pyx_lineno = 0;
12921  const char *__pyx_filename = NULL;
12922  int __pyx_clineno = 0;
12923  __Pyx_RefNannySetupContext("norm", 0);
12924 
12925  /* "PyClical.pyx":1470
12926  * 4.0
12927  * """
12928  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12929  *
12930  * cpdef inline abs(obj):
12931  */
12932  __Pyx_XDECREF(__pyx_r);
12933  __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)
12934  __Pyx_GOTREF(__pyx_t_2);
12935  __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)
12936  __Pyx_GOTREF(__pyx_t_3);
12937  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12938  __pyx_t_2 = NULL;
12939  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12940  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12941  if (likely(__pyx_t_2)) {
12942  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12943  __Pyx_INCREF(__pyx_t_2);
12944  __Pyx_INCREF(function);
12945  __Pyx_DECREF_SET(__pyx_t_3, function);
12946  }
12947  }
12948  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12949  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12950  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error)
12951  __Pyx_GOTREF(__pyx_t_1);
12952  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12953  __pyx_r = __pyx_t_1;
12954  __pyx_t_1 = 0;
12955  goto __pyx_L0;
12956 
12957  /* "PyClical.pyx":1461
12958  * return clifford(obj).quad()
12959  *
12960  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12961  * """
12962  * norm == sum of squares of coordinates.
12963  */
12964 
12965  /* function exit code */
12966  __pyx_L1_error:;
12967  __Pyx_XDECREF(__pyx_t_1);
12968  __Pyx_XDECREF(__pyx_t_2);
12969  __Pyx_XDECREF(__pyx_t_3);
12970  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12971  __pyx_r = 0;
12972  __pyx_L0:;
12973  __Pyx_XGIVEREF(__pyx_r);
12974  __Pyx_RefNannyFinishContext();
12975  return __pyx_r;
12976  }
12977 
12978  /* Python wrapper */
12979  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12980  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 ";
12981  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12982  PyObject *__pyx_r = 0;
12983  __Pyx_RefNannyDeclarations
12984  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12985  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12986 
12987  /* function exit code */
12988  __Pyx_RefNannyFinishContext();
12989  return __pyx_r;
12990  }
12991 
12992  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12993  PyObject *__pyx_r = NULL;
12994  __Pyx_RefNannyDeclarations
12995  PyObject *__pyx_t_1 = NULL;
12996  int __pyx_lineno = 0;
12997  const char *__pyx_filename = NULL;
12998  int __pyx_clineno = 0;
12999  __Pyx_RefNannySetupContext("norm", 0);
13000  __Pyx_XDECREF(__pyx_r);
13001  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
13002  __Pyx_GOTREF(__pyx_t_1);
13003  __pyx_r = __pyx_t_1;
13004  __pyx_t_1 = 0;
13005  goto __pyx_L0;
13006 
13007  /* function exit code */
13008  __pyx_L1_error:;
13009  __Pyx_XDECREF(__pyx_t_1);
13010  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
13011  __pyx_r = NULL;
13012  __pyx_L0:;
13013  __Pyx_XGIVEREF(__pyx_r);
13014  __Pyx_RefNannyFinishContext();
13015  return __pyx_r;
13016  }
13017 
13018  /* "PyClical.pyx":1472
13019  * return clifford(obj).norm()
13020  *
13021  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
13022  * """
13023  * Absolute value of multivector: multivector 2-norm.
13024  */
13025 
13026  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13027  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13028  PyObject *__pyx_r = NULL;
13029  __Pyx_RefNannyDeclarations
13030  PyObject *__pyx_t_1 = NULL;
13031  int __pyx_lineno = 0;
13032  const char *__pyx_filename = NULL;
13033  int __pyx_clineno = 0;
13034  __Pyx_RefNannySetupContext("abs", 0);
13035 
13036  /* "PyClical.pyx":1479
13037  * 2.0
13038  * """
13039  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
13040  *
13041  * cpdef inline max_abs(obj):
13042  */
13043  __Pyx_XDECREF(__pyx_r);
13044  __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)
13045  __Pyx_GOTREF(__pyx_t_1);
13046  __pyx_r = __pyx_t_1;
13047  __pyx_t_1 = 0;
13048  goto __pyx_L0;
13049 
13050  /* "PyClical.pyx":1472
13051  * return clifford(obj).norm()
13052  *
13053  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
13054  * """
13055  * Absolute value of multivector: multivector 2-norm.
13056  */
13057 
13058  /* function exit code */
13059  __pyx_L1_error:;
13060  __Pyx_XDECREF(__pyx_t_1);
13061  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13062  __pyx_r = 0;
13063  __pyx_L0:;
13064  __Pyx_XGIVEREF(__pyx_r);
13065  __Pyx_RefNannyFinishContext();
13066  return __pyx_r;
13067  }
13068 
13069  /* Python wrapper */
13070  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13071  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 ";
13072  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13073  PyObject *__pyx_r = 0;
13074  __Pyx_RefNannyDeclarations
13075  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
13076  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
13077 
13078  /* function exit code */
13079  __Pyx_RefNannyFinishContext();
13080  return __pyx_r;
13081  }
13082 
13083  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13084  PyObject *__pyx_r = NULL;
13085  __Pyx_RefNannyDeclarations
13086  PyObject *__pyx_t_1 = NULL;
13087  int __pyx_lineno = 0;
13088  const char *__pyx_filename = NULL;
13089  int __pyx_clineno = 0;
13090  __Pyx_RefNannySetupContext("abs", 0);
13091  __Pyx_XDECREF(__pyx_r);
13092  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error)
13093  __Pyx_GOTREF(__pyx_t_1);
13094  __pyx_r = __pyx_t_1;
13095  __pyx_t_1 = 0;
13096  goto __pyx_L0;
13097 
13098  /* function exit code */
13099  __pyx_L1_error:;
13100  __Pyx_XDECREF(__pyx_t_1);
13101  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13102  __pyx_r = NULL;
13103  __pyx_L0:;
13104  __Pyx_XGIVEREF(__pyx_r);
13105  __Pyx_RefNannyFinishContext();
13106  return __pyx_r;
13107  }
13108 
13109  /* "PyClical.pyx":1481
13110  * return glucat.abs(toClifford(obj))
13111  *
13112  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
13113  * """
13114  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
13115  */
13116 
13117  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13118  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13119  PyObject *__pyx_r = NULL;
13120  __Pyx_RefNannyDeclarations
13121  PyObject *__pyx_t_1 = NULL;
13122  int __pyx_lineno = 0;
13123  const char *__pyx_filename = NULL;
13124  int __pyx_clineno = 0;
13125  __Pyx_RefNannySetupContext("max_abs", 0);
13126 
13127  /* "PyClical.pyx":1491
13128  *
13129  * """
13130  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
13131  *
13132  * cpdef inline pow(obj, m):
13133  */
13134  __Pyx_XDECREF(__pyx_r);
13135  __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)
13136  __Pyx_GOTREF(__pyx_t_1);
13137  __pyx_r = __pyx_t_1;
13138  __pyx_t_1 = 0;
13139  goto __pyx_L0;
13140 
13141  /* "PyClical.pyx":1481
13142  * return glucat.abs(toClifford(obj))
13143  *
13144  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
13145  * """
13146  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
13147  */
13148 
13149  /* function exit code */
13150  __pyx_L1_error:;
13151  __Pyx_XDECREF(__pyx_t_1);
13152  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13153  __pyx_r = 0;
13154  __pyx_L0:;
13155  __Pyx_XGIVEREF(__pyx_r);
13156  __Pyx_RefNannyFinishContext();
13157  return __pyx_r;
13158  }
13159 
13160  /* Python wrapper */
13161  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13162  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 ";
13163  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13164  PyObject *__pyx_r = 0;
13165  __Pyx_RefNannyDeclarations
13166  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
13167  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
13168 
13169  /* function exit code */
13170  __Pyx_RefNannyFinishContext();
13171  return __pyx_r;
13172  }
13173 
13174  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13175  PyObject *__pyx_r = NULL;
13176  __Pyx_RefNannyDeclarations
13177  PyObject *__pyx_t_1 = NULL;
13178  int __pyx_lineno = 0;
13179  const char *__pyx_filename = NULL;
13180  int __pyx_clineno = 0;
13181  __Pyx_RefNannySetupContext("max_abs", 0);
13182  __Pyx_XDECREF(__pyx_r);
13183  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
13184  __Pyx_GOTREF(__pyx_t_1);
13185  __pyx_r = __pyx_t_1;
13186  __pyx_t_1 = 0;
13187  goto __pyx_L0;
13188 
13189  /* function exit code */
13190  __pyx_L1_error:;
13191  __Pyx_XDECREF(__pyx_t_1);
13192  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13193  __pyx_r = NULL;
13194  __pyx_L0:;
13195  __Pyx_XGIVEREF(__pyx_r);
13196  __Pyx_RefNannyFinishContext();
13197  return __pyx_r;
13198  }
13199 
13200  /* "PyClical.pyx":1493
13201  * return glucat.max_abs(toClifford(obj))
13202  *
13203  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
13204  * """
13205  * Integer power of multivector: obj to the m.
13206  */
13207 
13208  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13209  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
13210  PyObject *__pyx_r = NULL;
13211  __Pyx_RefNannyDeclarations
13212  PyObject *__pyx_t_1 = NULL;
13213  PyObject *__pyx_t_2 = NULL;
13214  PyObject *__pyx_t_3 = NULL;
13215  PyObject *__pyx_t_4 = NULL;
13216  PyObject *__pyx_t_5 = NULL;
13217  PyObject *__pyx_t_6 = NULL;
13218  int __pyx_t_7;
13219  PyObject *__pyx_t_8 = NULL;
13220  PyObject *__pyx_t_9 = NULL;
13221  PyObject *__pyx_t_10 = NULL;
13222  int __pyx_lineno = 0;
13223  const char *__pyx_filename = NULL;
13224  int __pyx_clineno = 0;
13225  __Pyx_RefNannySetupContext("pow", 0);
13226 
13227  /* "PyClical.pyx":1512
13228  * 1
13229  * """
13230  * try: # <<<<<<<<<<<<<<
13231  * math.pow(obj, m)
13232  * except:
13233  */
13234  {
13235  __Pyx_PyThreadState_declare
13236  __Pyx_PyThreadState_assign
13237  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13238  __Pyx_XGOTREF(__pyx_t_1);
13239  __Pyx_XGOTREF(__pyx_t_2);
13240  __Pyx_XGOTREF(__pyx_t_3);
13241  /*try:*/ {
13242 
13243  /* "PyClical.pyx":1513
13244  * """
13245  * try:
13246  * math.pow(obj, m) # <<<<<<<<<<<<<<
13247  * except:
13248  * return clifford(obj).pow(m)
13249  */
13250  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1513, __pyx_L3_error)
13251  __Pyx_GOTREF(__pyx_t_5);
13252  __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)
13253  __Pyx_GOTREF(__pyx_t_6);
13254  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13255  __pyx_t_5 = NULL;
13256  __pyx_t_7 = 0;
13257  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13258  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13259  if (likely(__pyx_t_5)) {
13260  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13261  __Pyx_INCREF(__pyx_t_5);
13262  __Pyx_INCREF(function);
13263  __Pyx_DECREF_SET(__pyx_t_6, function);
13264  __pyx_t_7 = 1;
13265  }
13266  }
13267  #if CYTHON_FAST_PYCALL
13268  if (PyFunction_Check(__pyx_t_6)) {
13269  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
13270  __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)
13271  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13272  __Pyx_GOTREF(__pyx_t_4);
13273  } else
13274  #endif
13275  #if CYTHON_FAST_PYCCALL
13276  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13277  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
13278  __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)
13279  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13280  __Pyx_GOTREF(__pyx_t_4);
13281  } else
13282  #endif
13283  {
13284  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1513, __pyx_L3_error)
13285  __Pyx_GOTREF(__pyx_t_8);
13286  if (__pyx_t_5) {
13287  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
13288  }
13289  __Pyx_INCREF(__pyx_v_obj);
13290  __Pyx_GIVEREF(__pyx_v_obj);
13291  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
13292  __Pyx_INCREF(__pyx_v_m);
13293  __Pyx_GIVEREF(__pyx_v_m);
13294  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
13295  __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)
13296  __Pyx_GOTREF(__pyx_t_4);
13297  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13298  }
13299  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13300  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13301 
13302  /* "PyClical.pyx":1512
13303  * 1
13304  * """
13305  * try: # <<<<<<<<<<<<<<
13306  * math.pow(obj, m)
13307  * except:
13308  */
13309  }
13310  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13311  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13312  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13313  goto __pyx_L8_try_end;
13314  __pyx_L3_error:;
13315  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13316  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13317  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13318  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13319 
13320  /* "PyClical.pyx":1514
13321  * try:
13322  * math.pow(obj, m)
13323  * except: # <<<<<<<<<<<<<<
13324  * return clifford(obj).pow(m)
13325  *
13326  */
13327  /*except:*/ {
13328  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13329  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1514, __pyx_L5_except_error)
13330  __Pyx_GOTREF(__pyx_t_4);
13331  __Pyx_GOTREF(__pyx_t_6);
13332  __Pyx_GOTREF(__pyx_t_8);
13333 
13334  /* "PyClical.pyx":1515
13335  * math.pow(obj, m)
13336  * except:
13337  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
13338  *
13339  * cpdef inline outer_pow(obj, m):
13340  */
13341  __Pyx_XDECREF(__pyx_r);
13342  __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)
13343  __Pyx_GOTREF(__pyx_t_9);
13344  __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)
13345  __Pyx_GOTREF(__pyx_t_10);
13346  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13347  __pyx_t_9 = NULL;
13348  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
13349  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
13350  if (likely(__pyx_t_9)) {
13351  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
13352  __Pyx_INCREF(__pyx_t_9);
13353  __Pyx_INCREF(function);
13354  __Pyx_DECREF_SET(__pyx_t_10, function);
13355  }
13356  }
13357  __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);
13358  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13359  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L5_except_error)
13360  __Pyx_GOTREF(__pyx_t_5);
13361  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13362  __pyx_r = __pyx_t_5;
13363  __pyx_t_5 = 0;
13364  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13365  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13366  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13367  goto __pyx_L6_except_return;
13368  }
13369  __pyx_L5_except_error:;
13370 
13371  /* "PyClical.pyx":1512
13372  * 1
13373  * """
13374  * try: # <<<<<<<<<<<<<<
13375  * math.pow(obj, m)
13376  * except:
13377  */
13378  __Pyx_XGIVEREF(__pyx_t_1);
13379  __Pyx_XGIVEREF(__pyx_t_2);
13380  __Pyx_XGIVEREF(__pyx_t_3);
13381  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13382  goto __pyx_L1_error;
13383  __pyx_L6_except_return:;
13384  __Pyx_XGIVEREF(__pyx_t_1);
13385  __Pyx_XGIVEREF(__pyx_t_2);
13386  __Pyx_XGIVEREF(__pyx_t_3);
13387  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13388  goto __pyx_L0;
13389  __pyx_L8_try_end:;
13390  }
13391 
13392  /* "PyClical.pyx":1493
13393  * return glucat.max_abs(toClifford(obj))
13394  *
13395  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
13396  * """
13397  * Integer power of multivector: obj to the m.
13398  */
13399 
13400  /* function exit code */
13401  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13402  goto __pyx_L0;
13403  __pyx_L1_error:;
13404  __Pyx_XDECREF(__pyx_t_4);
13405  __Pyx_XDECREF(__pyx_t_5);
13406  __Pyx_XDECREF(__pyx_t_6);
13407  __Pyx_XDECREF(__pyx_t_8);
13408  __Pyx_XDECREF(__pyx_t_9);
13409  __Pyx_XDECREF(__pyx_t_10);
13410  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13411  __pyx_r = 0;
13412  __pyx_L0:;
13413  __Pyx_XGIVEREF(__pyx_r);
13414  __Pyx_RefNannyFinishContext();
13415  return __pyx_r;
13416  }
13417 
13418  /* Python wrapper */
13419  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13420  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 ";
13421  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13422  PyObject *__pyx_v_obj = 0;
13423  PyObject *__pyx_v_m = 0;
13424  int __pyx_lineno = 0;
13425  const char *__pyx_filename = NULL;
13426  int __pyx_clineno = 0;
13427  PyObject *__pyx_r = 0;
13428  __Pyx_RefNannyDeclarations
13429  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
13430  {
13431  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
13432  PyObject* values[2] = {0,0};
13433  if (unlikely(__pyx_kwds)) {
13434  Py_ssize_t kw_args;
13435  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13436  switch (pos_args) {
13437  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13438  CYTHON_FALLTHROUGH;
13439  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13440  CYTHON_FALLTHROUGH;
13441  case 0: break;
13442  default: goto __pyx_L5_argtuple_error;
13443  }
13444  kw_args = PyDict_Size(__pyx_kwds);
13445  switch (pos_args) {
13446  case 0:
13447  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13448  else goto __pyx_L5_argtuple_error;
13449  CYTHON_FALLTHROUGH;
13450  case 1:
13451  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13452  else {
13453  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1493, __pyx_L3_error)
13454  }
13455  }
13456  if (unlikely(kw_args > 0)) {
13457  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1493, __pyx_L3_error)
13458  }
13459  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13460  goto __pyx_L5_argtuple_error;
13461  } else {
13462  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13463  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13464  }
13465  __pyx_v_obj = values[0];
13466  __pyx_v_m = values[1];
13467  }
13468  goto __pyx_L4_argument_unpacking_done;
13469  __pyx_L5_argtuple_error:;
13470  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1493, __pyx_L3_error)
13471  __pyx_L3_error:;
13472  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13473  __Pyx_RefNannyFinishContext();
13474  return NULL;
13475  __pyx_L4_argument_unpacking_done:;
13476  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13477 
13478  /* function exit code */
13479  __Pyx_RefNannyFinishContext();
13480  return __pyx_r;
13481  }
13482 
13483  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13484  PyObject *__pyx_r = NULL;
13485  __Pyx_RefNannyDeclarations
13486  PyObject *__pyx_t_1 = NULL;
13487  int __pyx_lineno = 0;
13488  const char *__pyx_filename = NULL;
13489  int __pyx_clineno = 0;
13490  __Pyx_RefNannySetupContext("pow", 0);
13491  __Pyx_XDECREF(__pyx_r);
13492  __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)
13493  __Pyx_GOTREF(__pyx_t_1);
13494  __pyx_r = __pyx_t_1;
13495  __pyx_t_1 = 0;
13496  goto __pyx_L0;
13497 
13498  /* function exit code */
13499  __pyx_L1_error:;
13500  __Pyx_XDECREF(__pyx_t_1);
13501  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13502  __pyx_r = NULL;
13503  __pyx_L0:;
13504  __Pyx_XGIVEREF(__pyx_r);
13505  __Pyx_RefNannyFinishContext();
13506  return __pyx_r;
13507  }
13508 
13509  /* "PyClical.pyx":1517
13510  * return clifford(obj).pow(m)
13511  *
13512  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13513  * """
13514  * Outer product power of multivector.
13515  */
13516 
13517  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13518  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
13519  PyObject *__pyx_r = NULL;
13520  __Pyx_RefNannyDeclarations
13521  PyObject *__pyx_t_1 = NULL;
13522  PyObject *__pyx_t_2 = NULL;
13523  PyObject *__pyx_t_3 = NULL;
13524  int __pyx_lineno = 0;
13525  const char *__pyx_filename = NULL;
13526  int __pyx_clineno = 0;
13527  __Pyx_RefNannySetupContext("outer_pow", 0);
13528 
13529  /* "PyClical.pyx":1524
13530  * 1+3{1}+3{1,2}
13531  * """
13532  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
13533  *
13534  * cpdef inline complexifier(obj):
13535  */
13536  __Pyx_XDECREF(__pyx_r);
13537  __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)
13538  __Pyx_GOTREF(__pyx_t_2);
13539  __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)
13540  __Pyx_GOTREF(__pyx_t_3);
13541  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13542  __pyx_t_2 = NULL;
13543  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13544  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13545  if (likely(__pyx_t_2)) {
13546  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13547  __Pyx_INCREF(__pyx_t_2);
13548  __Pyx_INCREF(function);
13549  __Pyx_DECREF_SET(__pyx_t_3, function);
13550  }
13551  }
13552  __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);
13553  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13554  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error)
13555  __Pyx_GOTREF(__pyx_t_1);
13556  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13557  __pyx_r = __pyx_t_1;
13558  __pyx_t_1 = 0;
13559  goto __pyx_L0;
13560 
13561  /* "PyClical.pyx":1517
13562  * return clifford(obj).pow(m)
13563  *
13564  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13565  * """
13566  * Outer product power of multivector.
13567  */
13568 
13569  /* function exit code */
13570  __pyx_L1_error:;
13571  __Pyx_XDECREF(__pyx_t_1);
13572  __Pyx_XDECREF(__pyx_t_2);
13573  __Pyx_XDECREF(__pyx_t_3);
13574  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13575  __pyx_r = 0;
13576  __pyx_L0:;
13577  __Pyx_XGIVEREF(__pyx_r);
13578  __Pyx_RefNannyFinishContext();
13579  return __pyx_r;
13580  }
13581 
13582  /* Python wrapper */
13583  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13584  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 ";
13585  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13586  PyObject *__pyx_v_obj = 0;
13587  PyObject *__pyx_v_m = 0;
13588  int __pyx_lineno = 0;
13589  const char *__pyx_filename = NULL;
13590  int __pyx_clineno = 0;
13591  PyObject *__pyx_r = 0;
13592  __Pyx_RefNannyDeclarations
13593  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
13594  {
13595  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
13596  PyObject* values[2] = {0,0};
13597  if (unlikely(__pyx_kwds)) {
13598  Py_ssize_t kw_args;
13599  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13600  switch (pos_args) {
13601  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13602  CYTHON_FALLTHROUGH;
13603  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13604  CYTHON_FALLTHROUGH;
13605  case 0: break;
13606  default: goto __pyx_L5_argtuple_error;
13607  }
13608  kw_args = PyDict_Size(__pyx_kwds);
13609  switch (pos_args) {
13610  case 0:
13611  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13612  else goto __pyx_L5_argtuple_error;
13613  CYTHON_FALLTHROUGH;
13614  case 1:
13615  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13616  else {
13617  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1517, __pyx_L3_error)
13618  }
13619  }
13620  if (unlikely(kw_args > 0)) {
13621  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1517, __pyx_L3_error)
13622  }
13623  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13624  goto __pyx_L5_argtuple_error;
13625  } else {
13626  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13627  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13628  }
13629  __pyx_v_obj = values[0];
13630  __pyx_v_m = values[1];
13631  }
13632  goto __pyx_L4_argument_unpacking_done;
13633  __pyx_L5_argtuple_error:;
13634  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1517, __pyx_L3_error)
13635  __pyx_L3_error:;
13636  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13637  __Pyx_RefNannyFinishContext();
13638  return NULL;
13639  __pyx_L4_argument_unpacking_done:;
13640  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13641 
13642  /* function exit code */
13643  __Pyx_RefNannyFinishContext();
13644  return __pyx_r;
13645  }
13646 
13647  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13648  PyObject *__pyx_r = NULL;
13649  __Pyx_RefNannyDeclarations
13650  PyObject *__pyx_t_1 = NULL;
13651  int __pyx_lineno = 0;
13652  const char *__pyx_filename = NULL;
13653  int __pyx_clineno = 0;
13654  __Pyx_RefNannySetupContext("outer_pow", 0);
13655  __Pyx_XDECREF(__pyx_r);
13656  __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)
13657  __Pyx_GOTREF(__pyx_t_1);
13658  __pyx_r = __pyx_t_1;
13659  __pyx_t_1 = 0;
13660  goto __pyx_L0;
13661 
13662  /* function exit code */
13663  __pyx_L1_error:;
13664  __Pyx_XDECREF(__pyx_t_1);
13665  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13666  __pyx_r = NULL;
13667  __pyx_L0:;
13668  __Pyx_XGIVEREF(__pyx_r);
13669  __Pyx_RefNannyFinishContext();
13670  return __pyx_r;
13671  }
13672 
13673  /* "PyClical.pyx":1526
13674  * return clifford(obj).outer_pow(m)
13675  *
13676  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13677  * """
13678  * Square root of -1 which commutes with all members of the frame of the given multivector.
13679  */
13680 
13681  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13682  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13683  PyObject *__pyx_r = NULL;
13684  __Pyx_RefNannyDeclarations
13685  PyObject *__pyx_t_1 = NULL;
13686  PyObject *__pyx_t_2 = NULL;
13687  int __pyx_lineno = 0;
13688  const char *__pyx_filename = NULL;
13689  int __pyx_clineno = 0;
13690  __Pyx_RefNannySetupContext("complexifier", 0);
13691 
13692  /* "PyClical.pyx":1539
13693  * {-1}
13694  * """
13695  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13696  *
13697  * cpdef inline sqrt(obj, i = None):
13698  */
13699  __Pyx_XDECREF(__pyx_r);
13700  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L1_error)
13701  __Pyx_GOTREF(__pyx_t_1);
13702  __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)
13703  __Pyx_GOTREF(__pyx_t_2);
13704  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13705  __pyx_r = __pyx_t_2;
13706  __pyx_t_2 = 0;
13707  goto __pyx_L0;
13708 
13709  /* "PyClical.pyx":1526
13710  * return clifford(obj).outer_pow(m)
13711  *
13712  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13713  * """
13714  * Square root of -1 which commutes with all members of the frame of the given multivector.
13715  */
13716 
13717  /* function exit code */
13718  __pyx_L1_error:;
13719  __Pyx_XDECREF(__pyx_t_1);
13720  __Pyx_XDECREF(__pyx_t_2);
13721  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13722  __pyx_r = 0;
13723  __pyx_L0:;
13724  __Pyx_XGIVEREF(__pyx_r);
13725  __Pyx_RefNannyFinishContext();
13726  return __pyx_r;
13727  }
13728 
13729  /* Python wrapper */
13730  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13731  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 ";
13732  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13733  PyObject *__pyx_r = 0;
13734  __Pyx_RefNannyDeclarations
13735  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13736  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13737 
13738  /* function exit code */
13739  __Pyx_RefNannyFinishContext();
13740  return __pyx_r;
13741  }
13742 
13743  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13744  PyObject *__pyx_r = NULL;
13745  __Pyx_RefNannyDeclarations
13746  PyObject *__pyx_t_1 = NULL;
13747  int __pyx_lineno = 0;
13748  const char *__pyx_filename = NULL;
13749  int __pyx_clineno = 0;
13750  __Pyx_RefNannySetupContext("complexifier", 0);
13751  __Pyx_XDECREF(__pyx_r);
13752  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error)
13753  __Pyx_GOTREF(__pyx_t_1);
13754  __pyx_r = __pyx_t_1;
13755  __pyx_t_1 = 0;
13756  goto __pyx_L0;
13757 
13758  /* function exit code */
13759  __pyx_L1_error:;
13760  __Pyx_XDECREF(__pyx_t_1);
13761  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13762  __pyx_r = NULL;
13763  __pyx_L0:;
13764  __Pyx_XGIVEREF(__pyx_r);
13765  __Pyx_RefNannyFinishContext();
13766  return __pyx_r;
13767  }
13768 
13769  /* "PyClical.pyx":1541
13770  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13771  *
13772  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13773  * """
13774  * Square root of multivector with optional complexifier.
13775  */
13776 
13777  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13778  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) {
13779  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13780  PyObject *__pyx_r = NULL;
13781  __Pyx_RefNannyDeclarations
13782  int __pyx_t_1;
13783  int __pyx_t_2;
13784  PyObject *__pyx_t_3 = NULL;
13785  Clifford __pyx_t_4;
13786  PyObject *__pyx_t_5 = NULL;
13787  PyObject *__pyx_t_6 = NULL;
13788  PyObject *__pyx_t_7 = NULL;
13789  PyObject *__pyx_t_8 = NULL;
13790  PyObject *__pyx_t_9 = NULL;
13791  PyObject *__pyx_t_10 = NULL;
13792  PyObject *__pyx_t_11 = NULL;
13793  int __pyx_lineno = 0;
13794  const char *__pyx_filename = NULL;
13795  int __pyx_clineno = 0;
13796  __Pyx_RefNannySetupContext("sqrt", 0);
13797  if (__pyx_optional_args) {
13798  if (__pyx_optional_args->__pyx_n > 0) {
13799  __pyx_v_i = __pyx_optional_args->i;
13800  }
13801  }
13802 
13803  /* "PyClical.pyx":1556
13804  * -1
13805  * """
13806  * if not (i is None): # <<<<<<<<<<<<<<
13807  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13808  * else:
13809  */
13810  __pyx_t_1 = (__pyx_v_i != Py_None);
13811  __pyx_t_2 = (__pyx_t_1 != 0);
13812  if (__pyx_t_2) {
13813 
13814  /* "PyClical.pyx":1557
13815  * """
13816  * if not (i is None):
13817  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13818  * else:
13819  * try:
13820  */
13821  __Pyx_XDECREF(__pyx_r);
13822  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error)
13823  __Pyx_GOTREF(__pyx_t_3);
13824  try {
13825  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13826  } catch(...) {
13827  __Pyx_CppExn2PyErr();
13828  __PYX_ERR(0, 1557, __pyx_L1_error)
13829  }
13830  __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)
13831  __Pyx_GOTREF(__pyx_t_5);
13832  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13833  __pyx_r = __pyx_t_5;
13834  __pyx_t_5 = 0;
13835  goto __pyx_L0;
13836 
13837  /* "PyClical.pyx":1556
13838  * -1
13839  * """
13840  * if not (i is None): # <<<<<<<<<<<<<<
13841  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13842  * else:
13843  */
13844  }
13845 
13846  /* "PyClical.pyx":1559
13847  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13848  * else:
13849  * try: # <<<<<<<<<<<<<<
13850  * return math.sqrt(obj)
13851  * except:
13852  */
13853  /*else*/ {
13854  {
13855  __Pyx_PyThreadState_declare
13856  __Pyx_PyThreadState_assign
13857  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13858  __Pyx_XGOTREF(__pyx_t_6);
13859  __Pyx_XGOTREF(__pyx_t_7);
13860  __Pyx_XGOTREF(__pyx_t_8);
13861  /*try:*/ {
13862 
13863  /* "PyClical.pyx":1560
13864  * else:
13865  * try:
13866  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13867  * except:
13868  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13869  */
13870  __Pyx_XDECREF(__pyx_r);
13871  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L4_error)
13872  __Pyx_GOTREF(__pyx_t_3);
13873  __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)
13874  __Pyx_GOTREF(__pyx_t_9);
13875  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13876  __pyx_t_3 = NULL;
13877  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13878  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13879  if (likely(__pyx_t_3)) {
13880  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13881  __Pyx_INCREF(__pyx_t_3);
13882  __Pyx_INCREF(function);
13883  __Pyx_DECREF_SET(__pyx_t_9, function);
13884  }
13885  }
13886  __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);
13887  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13888  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1560, __pyx_L4_error)
13889  __Pyx_GOTREF(__pyx_t_5);
13890  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13891  __pyx_r = __pyx_t_5;
13892  __pyx_t_5 = 0;
13893  goto __pyx_L8_try_return;
13894 
13895  /* "PyClical.pyx":1559
13896  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13897  * else:
13898  * try: # <<<<<<<<<<<<<<
13899  * return math.sqrt(obj)
13900  * except:
13901  */
13902  }
13903  __pyx_L4_error:;
13904  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13905  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13906  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13907 
13908  /* "PyClical.pyx":1561
13909  * try:
13910  * return math.sqrt(obj)
13911  * except: # <<<<<<<<<<<<<<
13912  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13913  *
13914  */
13915  /*except:*/ {
13916  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13917  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1561, __pyx_L6_except_error)
13918  __Pyx_GOTREF(__pyx_t_5);
13919  __Pyx_GOTREF(__pyx_t_9);
13920  __Pyx_GOTREF(__pyx_t_3);
13921 
13922  /* "PyClical.pyx":1562
13923  * return math.sqrt(obj)
13924  * except:
13925  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13926  *
13927  * cpdef inline exp(obj):
13928  */
13929  __Pyx_XDECREF(__pyx_r);
13930  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13931  __Pyx_GOTREF(__pyx_t_10);
13932  __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)
13933  __Pyx_GOTREF(__pyx_t_11);
13934  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13935  __pyx_r = __pyx_t_11;
13936  __pyx_t_11 = 0;
13937  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13938  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13939  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13940  goto __pyx_L7_except_return;
13941  }
13942  __pyx_L6_except_error:;
13943 
13944  /* "PyClical.pyx":1559
13945  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13946  * else:
13947  * try: # <<<<<<<<<<<<<<
13948  * return math.sqrt(obj)
13949  * except:
13950  */
13951  __Pyx_XGIVEREF(__pyx_t_6);
13952  __Pyx_XGIVEREF(__pyx_t_7);
13953  __Pyx_XGIVEREF(__pyx_t_8);
13954  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13955  goto __pyx_L1_error;
13956  __pyx_L8_try_return:;
13957  __Pyx_XGIVEREF(__pyx_t_6);
13958  __Pyx_XGIVEREF(__pyx_t_7);
13959  __Pyx_XGIVEREF(__pyx_t_8);
13960  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13961  goto __pyx_L0;
13962  __pyx_L7_except_return:;
13963  __Pyx_XGIVEREF(__pyx_t_6);
13964  __Pyx_XGIVEREF(__pyx_t_7);
13965  __Pyx_XGIVEREF(__pyx_t_8);
13966  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13967  goto __pyx_L0;
13968  }
13969  }
13970 
13971  /* "PyClical.pyx":1541
13972  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13973  *
13974  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13975  * """
13976  * Square root of multivector with optional complexifier.
13977  */
13978 
13979  /* function exit code */
13980  __pyx_L1_error:;
13981  __Pyx_XDECREF(__pyx_t_3);
13982  __Pyx_XDECREF(__pyx_t_5);
13983  __Pyx_XDECREF(__pyx_t_9);
13984  __Pyx_XDECREF(__pyx_t_10);
13985  __Pyx_XDECREF(__pyx_t_11);
13986  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13987  __pyx_r = 0;
13988  __pyx_L0:;
13989  __Pyx_XGIVEREF(__pyx_r);
13990  __Pyx_RefNannyFinishContext();
13991  return __pyx_r;
13992  }
13993 
13994  /* Python wrapper */
13995  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13996  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 ";
13997  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13998  PyObject *__pyx_v_obj = 0;
13999  PyObject *__pyx_v_i = 0;
14000  int __pyx_lineno = 0;
14001  const char *__pyx_filename = NULL;
14002  int __pyx_clineno = 0;
14003  PyObject *__pyx_r = 0;
14004  __Pyx_RefNannyDeclarations
14005  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
14006  {
14007  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14008  PyObject* values[2] = {0,0};
14009  values[1] = ((PyObject *)Py_None);
14010  if (unlikely(__pyx_kwds)) {
14011  Py_ssize_t kw_args;
14012  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14013  switch (pos_args) {
14014  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14015  CYTHON_FALLTHROUGH;
14016  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14017  CYTHON_FALLTHROUGH;
14018  case 0: break;
14019  default: goto __pyx_L5_argtuple_error;
14020  }
14021  kw_args = PyDict_Size(__pyx_kwds);
14022  switch (pos_args) {
14023  case 0:
14024  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14025  else goto __pyx_L5_argtuple_error;
14026  CYTHON_FALLTHROUGH;
14027  case 1:
14028  if (kw_args > 0) {
14029  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14030  if (value) { values[1] = value; kw_args--; }
14031  }
14032  }
14033  if (unlikely(kw_args > 0)) {
14034  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1541, __pyx_L3_error)
14035  }
14036  } else {
14037  switch (PyTuple_GET_SIZE(__pyx_args)) {
14038  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14039  CYTHON_FALLTHROUGH;
14040  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14041  break;
14042  default: goto __pyx_L5_argtuple_error;
14043  }
14044  }
14045  __pyx_v_obj = values[0];
14046  __pyx_v_i = values[1];
14047  }
14048  goto __pyx_L4_argument_unpacking_done;
14049  __pyx_L5_argtuple_error:;
14050  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1541, __pyx_L3_error)
14051  __pyx_L3_error:;
14052  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14053  __Pyx_RefNannyFinishContext();
14054  return NULL;
14055  __pyx_L4_argument_unpacking_done:;
14056  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
14057 
14058  /* function exit code */
14059  __Pyx_RefNannyFinishContext();
14060  return __pyx_r;
14061  }
14062 
14063  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14064  PyObject *__pyx_r = NULL;
14065  __Pyx_RefNannyDeclarations
14066  PyObject *__pyx_t_1 = NULL;
14067  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
14068  int __pyx_lineno = 0;
14069  const char *__pyx_filename = NULL;
14070  int __pyx_clineno = 0;
14071  __Pyx_RefNannySetupContext("sqrt", 0);
14072  __Pyx_XDECREF(__pyx_r);
14073  __pyx_t_2.__pyx_n = 1;
14074  __pyx_t_2.i = __pyx_v_i;
14075  __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)
14076  __Pyx_GOTREF(__pyx_t_1);
14077  __pyx_r = __pyx_t_1;
14078  __pyx_t_1 = 0;
14079  goto __pyx_L0;
14080 
14081  /* function exit code */
14082  __pyx_L1_error:;
14083  __Pyx_XDECREF(__pyx_t_1);
14084  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14085  __pyx_r = NULL;
14086  __pyx_L0:;
14087  __Pyx_XGIVEREF(__pyx_r);
14088  __Pyx_RefNannyFinishContext();
14089  return __pyx_r;
14090  }
14091 
14092  /* "PyClical.pyx":1564
14093  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
14094  *
14095  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
14096  * """
14097  * Exponential of multivector.
14098  */
14099 
14100  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14101  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14102  PyObject *__pyx_r = NULL;
14103  __Pyx_RefNannyDeclarations
14104  PyObject *__pyx_t_1 = NULL;
14105  PyObject *__pyx_t_2 = NULL;
14106  PyObject *__pyx_t_3 = NULL;
14107  PyObject *__pyx_t_4 = NULL;
14108  PyObject *__pyx_t_5 = NULL;
14109  PyObject *__pyx_t_6 = NULL;
14110  PyObject *__pyx_t_7 = NULL;
14111  PyObject *__pyx_t_8 = NULL;
14112  int __pyx_lineno = 0;
14113  const char *__pyx_filename = NULL;
14114  int __pyx_clineno = 0;
14115  __Pyx_RefNannySetupContext("exp", 0);
14116 
14117  /* "PyClical.pyx":1573
14118  * {1,2}
14119  * """
14120  * try: # <<<<<<<<<<<<<<
14121  * return math.exp(obj)
14122  * except:
14123  */
14124  {
14125  __Pyx_PyThreadState_declare
14126  __Pyx_PyThreadState_assign
14127  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14128  __Pyx_XGOTREF(__pyx_t_1);
14129  __Pyx_XGOTREF(__pyx_t_2);
14130  __Pyx_XGOTREF(__pyx_t_3);
14131  /*try:*/ {
14132 
14133  /* "PyClical.pyx":1574
14134  * """
14135  * try:
14136  * return math.exp(obj) # <<<<<<<<<<<<<<
14137  * except:
14138  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14139  */
14140  __Pyx_XDECREF(__pyx_r);
14141  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1574, __pyx_L3_error)
14142  __Pyx_GOTREF(__pyx_t_5);
14143  __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)
14144  __Pyx_GOTREF(__pyx_t_6);
14145  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14146  __pyx_t_5 = NULL;
14147  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14148  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14149  if (likely(__pyx_t_5)) {
14150  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14151  __Pyx_INCREF(__pyx_t_5);
14152  __Pyx_INCREF(function);
14153  __Pyx_DECREF_SET(__pyx_t_6, function);
14154  }
14155  }
14156  __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);
14157  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14158  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1574, __pyx_L3_error)
14159  __Pyx_GOTREF(__pyx_t_4);
14160  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14161  __pyx_r = __pyx_t_4;
14162  __pyx_t_4 = 0;
14163  goto __pyx_L7_try_return;
14164 
14165  /* "PyClical.pyx":1573
14166  * {1,2}
14167  * """
14168  * try: # <<<<<<<<<<<<<<
14169  * return math.exp(obj)
14170  * except:
14171  */
14172  }
14173  __pyx_L3_error:;
14174  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14175  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14176  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14177 
14178  /* "PyClical.pyx":1575
14179  * try:
14180  * return math.exp(obj)
14181  * except: # <<<<<<<<<<<<<<
14182  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14183  *
14184  */
14185  /*except:*/ {
14186  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
14187  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1575, __pyx_L5_except_error)
14188  __Pyx_GOTREF(__pyx_t_4);
14189  __Pyx_GOTREF(__pyx_t_6);
14190  __Pyx_GOTREF(__pyx_t_5);
14191 
14192  /* "PyClical.pyx":1576
14193  * return math.exp(obj)
14194  * except:
14195  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
14196  *
14197  * cpdef inline log(obj,i = None):
14198  */
14199  __Pyx_XDECREF(__pyx_r);
14200  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1576, __pyx_L5_except_error)
14201  __Pyx_GOTREF(__pyx_t_7);
14202  __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)
14203  __Pyx_GOTREF(__pyx_t_8);
14204  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14205  __pyx_r = __pyx_t_8;
14206  __pyx_t_8 = 0;
14207  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14208  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14209  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14210  goto __pyx_L6_except_return;
14211  }
14212  __pyx_L5_except_error:;
14213 
14214  /* "PyClical.pyx":1573
14215  * {1,2}
14216  * """
14217  * try: # <<<<<<<<<<<<<<
14218  * return math.exp(obj)
14219  * except:
14220  */
14221  __Pyx_XGIVEREF(__pyx_t_1);
14222  __Pyx_XGIVEREF(__pyx_t_2);
14223  __Pyx_XGIVEREF(__pyx_t_3);
14224  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14225  goto __pyx_L1_error;
14226  __pyx_L7_try_return:;
14227  __Pyx_XGIVEREF(__pyx_t_1);
14228  __Pyx_XGIVEREF(__pyx_t_2);
14229  __Pyx_XGIVEREF(__pyx_t_3);
14230  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14231  goto __pyx_L0;
14232  __pyx_L6_except_return:;
14233  __Pyx_XGIVEREF(__pyx_t_1);
14234  __Pyx_XGIVEREF(__pyx_t_2);
14235  __Pyx_XGIVEREF(__pyx_t_3);
14236  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14237  goto __pyx_L0;
14238  }
14239 
14240  /* "PyClical.pyx":1564
14241  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
14242  *
14243  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
14244  * """
14245  * Exponential of multivector.
14246  */
14247 
14248  /* function exit code */
14249  __pyx_L1_error:;
14250  __Pyx_XDECREF(__pyx_t_4);
14251  __Pyx_XDECREF(__pyx_t_5);
14252  __Pyx_XDECREF(__pyx_t_6);
14253  __Pyx_XDECREF(__pyx_t_7);
14254  __Pyx_XDECREF(__pyx_t_8);
14255  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
14256  __pyx_r = 0;
14257  __pyx_L0:;
14258  __Pyx_XGIVEREF(__pyx_r);
14259  __Pyx_RefNannyFinishContext();
14260  return __pyx_r;
14261  }
14262 
14263  /* Python wrapper */
14264  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14265  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 ";
14266  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14267  PyObject *__pyx_r = 0;
14268  __Pyx_RefNannyDeclarations
14269  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
14270  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
14271 
14272  /* function exit code */
14273  __Pyx_RefNannyFinishContext();
14274  return __pyx_r;
14275  }
14276 
14277  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14278  PyObject *__pyx_r = NULL;
14279  __Pyx_RefNannyDeclarations
14280  PyObject *__pyx_t_1 = NULL;
14281  int __pyx_lineno = 0;
14282  const char *__pyx_filename = NULL;
14283  int __pyx_clineno = 0;
14284  __Pyx_RefNannySetupContext("exp", 0);
14285  __Pyx_XDECREF(__pyx_r);
14286  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error)
14287  __Pyx_GOTREF(__pyx_t_1);
14288  __pyx_r = __pyx_t_1;
14289  __pyx_t_1 = 0;
14290  goto __pyx_L0;
14291 
14292  /* function exit code */
14293  __pyx_L1_error:;
14294  __Pyx_XDECREF(__pyx_t_1);
14295  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
14296  __pyx_r = NULL;
14297  __pyx_L0:;
14298  __Pyx_XGIVEREF(__pyx_r);
14299  __Pyx_RefNannyFinishContext();
14300  return __pyx_r;
14301  }
14302 
14303  /* "PyClical.pyx":1578
14304  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14305  *
14306  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
14307  * """
14308  * Natural logarithm of multivector with optional complexifier.
14309  */
14310 
14311  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14312  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) {
14313  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14314  PyObject *__pyx_r = NULL;
14315  __Pyx_RefNannyDeclarations
14316  int __pyx_t_1;
14317  int __pyx_t_2;
14318  PyObject *__pyx_t_3 = NULL;
14319  Clifford __pyx_t_4;
14320  PyObject *__pyx_t_5 = NULL;
14321  PyObject *__pyx_t_6 = NULL;
14322  PyObject *__pyx_t_7 = NULL;
14323  PyObject *__pyx_t_8 = NULL;
14324  PyObject *__pyx_t_9 = NULL;
14325  PyObject *__pyx_t_10 = NULL;
14326  PyObject *__pyx_t_11 = NULL;
14327  int __pyx_lineno = 0;
14328  const char *__pyx_filename = NULL;
14329  int __pyx_clineno = 0;
14330  __Pyx_RefNannySetupContext("log", 0);
14331  if (__pyx_optional_args) {
14332  if (__pyx_optional_args->__pyx_n > 0) {
14333  __pyx_v_i = __pyx_optional_args->i;
14334  }
14335  }
14336 
14337  /* "PyClical.pyx":1593
14338  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
14339  * """
14340  * if not (i is None): # <<<<<<<<<<<<<<
14341  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14342  * else:
14343  */
14344  __pyx_t_1 = (__pyx_v_i != Py_None);
14345  __pyx_t_2 = (__pyx_t_1 != 0);
14346  if (__pyx_t_2) {
14347 
14348  /* "PyClical.pyx":1594
14349  * """
14350  * if not (i is None):
14351  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14352  * else:
14353  * try:
14354  */
14355  __Pyx_XDECREF(__pyx_r);
14356  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error)
14357  __Pyx_GOTREF(__pyx_t_3);
14358  try {
14359  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14360  } catch(...) {
14361  __Pyx_CppExn2PyErr();
14362  __PYX_ERR(0, 1594, __pyx_L1_error)
14363  }
14364  __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)
14365  __Pyx_GOTREF(__pyx_t_5);
14366  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14367  __pyx_r = __pyx_t_5;
14368  __pyx_t_5 = 0;
14369  goto __pyx_L0;
14370 
14371  /* "PyClical.pyx":1593
14372  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
14373  * """
14374  * if not (i is None): # <<<<<<<<<<<<<<
14375  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14376  * else:
14377  */
14378  }
14379 
14380  /* "PyClical.pyx":1596
14381  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14382  * else:
14383  * try: # <<<<<<<<<<<<<<
14384  * return math.log(obj)
14385  * except:
14386  */
14387  /*else*/ {
14388  {
14389  __Pyx_PyThreadState_declare
14390  __Pyx_PyThreadState_assign
14391  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14392  __Pyx_XGOTREF(__pyx_t_6);
14393  __Pyx_XGOTREF(__pyx_t_7);
14394  __Pyx_XGOTREF(__pyx_t_8);
14395  /*try:*/ {
14396 
14397  /* "PyClical.pyx":1597
14398  * else:
14399  * try:
14400  * return math.log(obj) # <<<<<<<<<<<<<<
14401  * except:
14402  * return clifford().wrap( glucat.log(toClifford(obj)) )
14403  */
14404  __Pyx_XDECREF(__pyx_r);
14405  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L4_error)
14406  __Pyx_GOTREF(__pyx_t_3);
14407  __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)
14408  __Pyx_GOTREF(__pyx_t_9);
14409  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14410  __pyx_t_3 = NULL;
14411  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14412  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14413  if (likely(__pyx_t_3)) {
14414  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14415  __Pyx_INCREF(__pyx_t_3);
14416  __Pyx_INCREF(function);
14417  __Pyx_DECREF_SET(__pyx_t_9, function);
14418  }
14419  }
14420  __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);
14421  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14422  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1597, __pyx_L4_error)
14423  __Pyx_GOTREF(__pyx_t_5);
14424  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14425  __pyx_r = __pyx_t_5;
14426  __pyx_t_5 = 0;
14427  goto __pyx_L8_try_return;
14428 
14429  /* "PyClical.pyx":1596
14430  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14431  * else:
14432  * try: # <<<<<<<<<<<<<<
14433  * return math.log(obj)
14434  * except:
14435  */
14436  }
14437  __pyx_L4_error:;
14438  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14439  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14440  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14441 
14442  /* "PyClical.pyx":1598
14443  * try:
14444  * return math.log(obj)
14445  * except: # <<<<<<<<<<<<<<
14446  * return clifford().wrap( glucat.log(toClifford(obj)) )
14447  *
14448  */
14449  /*except:*/ {
14450  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14451  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1598, __pyx_L6_except_error)
14452  __Pyx_GOTREF(__pyx_t_5);
14453  __Pyx_GOTREF(__pyx_t_9);
14454  __Pyx_GOTREF(__pyx_t_3);
14455 
14456  /* "PyClical.pyx":1599
14457  * return math.log(obj)
14458  * except:
14459  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
14460  *
14461  * cpdef inline cos(obj,i = None):
14462  */
14463  __Pyx_XDECREF(__pyx_r);
14464  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1599, __pyx_L6_except_error)
14465  __Pyx_GOTREF(__pyx_t_10);
14466  __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)
14467  __Pyx_GOTREF(__pyx_t_11);
14468  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14469  __pyx_r = __pyx_t_11;
14470  __pyx_t_11 = 0;
14471  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14472  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14473  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14474  goto __pyx_L7_except_return;
14475  }
14476  __pyx_L6_except_error:;
14477 
14478  /* "PyClical.pyx":1596
14479  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14480  * else:
14481  * try: # <<<<<<<<<<<<<<
14482  * return math.log(obj)
14483  * except:
14484  */
14485  __Pyx_XGIVEREF(__pyx_t_6);
14486  __Pyx_XGIVEREF(__pyx_t_7);
14487  __Pyx_XGIVEREF(__pyx_t_8);
14488  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14489  goto __pyx_L1_error;
14490  __pyx_L8_try_return:;
14491  __Pyx_XGIVEREF(__pyx_t_6);
14492  __Pyx_XGIVEREF(__pyx_t_7);
14493  __Pyx_XGIVEREF(__pyx_t_8);
14494  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14495  goto __pyx_L0;
14496  __pyx_L7_except_return:;
14497  __Pyx_XGIVEREF(__pyx_t_6);
14498  __Pyx_XGIVEREF(__pyx_t_7);
14499  __Pyx_XGIVEREF(__pyx_t_8);
14500  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14501  goto __pyx_L0;
14502  }
14503  }
14504 
14505  /* "PyClical.pyx":1578
14506  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14507  *
14508  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
14509  * """
14510  * Natural logarithm of multivector with optional complexifier.
14511  */
14512 
14513  /* function exit code */
14514  __pyx_L1_error:;
14515  __Pyx_XDECREF(__pyx_t_3);
14516  __Pyx_XDECREF(__pyx_t_5);
14517  __Pyx_XDECREF(__pyx_t_9);
14518  __Pyx_XDECREF(__pyx_t_10);
14519  __Pyx_XDECREF(__pyx_t_11);
14520  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14521  __pyx_r = 0;
14522  __pyx_L0:;
14523  __Pyx_XGIVEREF(__pyx_r);
14524  __Pyx_RefNannyFinishContext();
14525  return __pyx_r;
14526  }
14527 
14528  /* Python wrapper */
14529  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14530  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 ";
14531  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14532  PyObject *__pyx_v_obj = 0;
14533  PyObject *__pyx_v_i = 0;
14534  int __pyx_lineno = 0;
14535  const char *__pyx_filename = NULL;
14536  int __pyx_clineno = 0;
14537  PyObject *__pyx_r = 0;
14538  __Pyx_RefNannyDeclarations
14539  __Pyx_RefNannySetupContext("log (wrapper)", 0);
14540  {
14541  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14542  PyObject* values[2] = {0,0};
14543  values[1] = ((PyObject *)Py_None);
14544  if (unlikely(__pyx_kwds)) {
14545  Py_ssize_t kw_args;
14546  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14547  switch (pos_args) {
14548  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14549  CYTHON_FALLTHROUGH;
14550  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14551  CYTHON_FALLTHROUGH;
14552  case 0: break;
14553  default: goto __pyx_L5_argtuple_error;
14554  }
14555  kw_args = PyDict_Size(__pyx_kwds);
14556  switch (pos_args) {
14557  case 0:
14558  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14559  else goto __pyx_L5_argtuple_error;
14560  CYTHON_FALLTHROUGH;
14561  case 1:
14562  if (kw_args > 0) {
14563  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14564  if (value) { values[1] = value; kw_args--; }
14565  }
14566  }
14567  if (unlikely(kw_args > 0)) {
14568  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1578, __pyx_L3_error)
14569  }
14570  } else {
14571  switch (PyTuple_GET_SIZE(__pyx_args)) {
14572  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14573  CYTHON_FALLTHROUGH;
14574  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14575  break;
14576  default: goto __pyx_L5_argtuple_error;
14577  }
14578  }
14579  __pyx_v_obj = values[0];
14580  __pyx_v_i = values[1];
14581  }
14582  goto __pyx_L4_argument_unpacking_done;
14583  __pyx_L5_argtuple_error:;
14584  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1578, __pyx_L3_error)
14585  __pyx_L3_error:;
14586  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14587  __Pyx_RefNannyFinishContext();
14588  return NULL;
14589  __pyx_L4_argument_unpacking_done:;
14590  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
14591 
14592  /* function exit code */
14593  __Pyx_RefNannyFinishContext();
14594  return __pyx_r;
14595  }
14596 
14597  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14598  PyObject *__pyx_r = NULL;
14599  __Pyx_RefNannyDeclarations
14600  PyObject *__pyx_t_1 = NULL;
14601  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
14602  int __pyx_lineno = 0;
14603  const char *__pyx_filename = NULL;
14604  int __pyx_clineno = 0;
14605  __Pyx_RefNannySetupContext("log", 0);
14606  __Pyx_XDECREF(__pyx_r);
14607  __pyx_t_2.__pyx_n = 1;
14608  __pyx_t_2.i = __pyx_v_i;
14609  __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)
14610  __Pyx_GOTREF(__pyx_t_1);
14611  __pyx_r = __pyx_t_1;
14612  __pyx_t_1 = 0;
14613  goto __pyx_L0;
14614 
14615  /* function exit code */
14616  __pyx_L1_error:;
14617  __Pyx_XDECREF(__pyx_t_1);
14618  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14619  __pyx_r = NULL;
14620  __pyx_L0:;
14621  __Pyx_XGIVEREF(__pyx_r);
14622  __Pyx_RefNannyFinishContext();
14623  return __pyx_r;
14624  }
14625 
14626  /* "PyClical.pyx":1601
14627  * return clifford().wrap( glucat.log(toClifford(obj)) )
14628  *
14629  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14630  * """
14631  * Cosine of multivector with optional complexifier.
14632  */
14633 
14634  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14635  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) {
14636  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14637  PyObject *__pyx_r = NULL;
14638  __Pyx_RefNannyDeclarations
14639  int __pyx_t_1;
14640  int __pyx_t_2;
14641  PyObject *__pyx_t_3 = NULL;
14642  Clifford __pyx_t_4;
14643  PyObject *__pyx_t_5 = NULL;
14644  PyObject *__pyx_t_6 = NULL;
14645  PyObject *__pyx_t_7 = NULL;
14646  PyObject *__pyx_t_8 = NULL;
14647  PyObject *__pyx_t_9 = NULL;
14648  PyObject *__pyx_t_10 = NULL;
14649  PyObject *__pyx_t_11 = NULL;
14650  int __pyx_lineno = 0;
14651  const char *__pyx_filename = NULL;
14652  int __pyx_clineno = 0;
14653  __Pyx_RefNannySetupContext("cos", 0);
14654  if (__pyx_optional_args) {
14655  if (__pyx_optional_args->__pyx_n > 0) {
14656  __pyx_v_i = __pyx_optional_args->i;
14657  }
14658  }
14659 
14660  /* "PyClical.pyx":1610
14661  * {1,2}
14662  * """
14663  * if not (i is None): # <<<<<<<<<<<<<<
14664  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14665  * else:
14666  */
14667  __pyx_t_1 = (__pyx_v_i != Py_None);
14668  __pyx_t_2 = (__pyx_t_1 != 0);
14669  if (__pyx_t_2) {
14670 
14671  /* "PyClical.pyx":1611
14672  * """
14673  * if not (i is None):
14674  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14675  * else:
14676  * try:
14677  */
14678  __Pyx_XDECREF(__pyx_r);
14679  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1611, __pyx_L1_error)
14680  __Pyx_GOTREF(__pyx_t_3);
14681  try {
14682  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14683  } catch(...) {
14684  __Pyx_CppExn2PyErr();
14685  __PYX_ERR(0, 1611, __pyx_L1_error)
14686  }
14687  __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)
14688  __Pyx_GOTREF(__pyx_t_5);
14689  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14690  __pyx_r = __pyx_t_5;
14691  __pyx_t_5 = 0;
14692  goto __pyx_L0;
14693 
14694  /* "PyClical.pyx":1610
14695  * {1,2}
14696  * """
14697  * if not (i is None): # <<<<<<<<<<<<<<
14698  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14699  * else:
14700  */
14701  }
14702 
14703  /* "PyClical.pyx":1613
14704  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14705  * else:
14706  * try: # <<<<<<<<<<<<<<
14707  * return math.cos(obj)
14708  * except:
14709  */
14710  /*else*/ {
14711  {
14712  __Pyx_PyThreadState_declare
14713  __Pyx_PyThreadState_assign
14714  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14715  __Pyx_XGOTREF(__pyx_t_6);
14716  __Pyx_XGOTREF(__pyx_t_7);
14717  __Pyx_XGOTREF(__pyx_t_8);
14718  /*try:*/ {
14719 
14720  /* "PyClical.pyx":1614
14721  * else:
14722  * try:
14723  * return math.cos(obj) # <<<<<<<<<<<<<<
14724  * except:
14725  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14726  */
14727  __Pyx_XDECREF(__pyx_r);
14728  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1614, __pyx_L4_error)
14729  __Pyx_GOTREF(__pyx_t_3);
14730  __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)
14731  __Pyx_GOTREF(__pyx_t_9);
14732  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14733  __pyx_t_3 = NULL;
14734  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14735  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14736  if (likely(__pyx_t_3)) {
14737  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14738  __Pyx_INCREF(__pyx_t_3);
14739  __Pyx_INCREF(function);
14740  __Pyx_DECREF_SET(__pyx_t_9, function);
14741  }
14742  }
14743  __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);
14744  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14745  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1614, __pyx_L4_error)
14746  __Pyx_GOTREF(__pyx_t_5);
14747  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14748  __pyx_r = __pyx_t_5;
14749  __pyx_t_5 = 0;
14750  goto __pyx_L8_try_return;
14751 
14752  /* "PyClical.pyx":1613
14753  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14754  * else:
14755  * try: # <<<<<<<<<<<<<<
14756  * return math.cos(obj)
14757  * except:
14758  */
14759  }
14760  __pyx_L4_error:;
14761  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14762  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14763  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14764 
14765  /* "PyClical.pyx":1615
14766  * try:
14767  * return math.cos(obj)
14768  * except: # <<<<<<<<<<<<<<
14769  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14770  *
14771  */
14772  /*except:*/ {
14773  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14774  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1615, __pyx_L6_except_error)
14775  __Pyx_GOTREF(__pyx_t_5);
14776  __Pyx_GOTREF(__pyx_t_9);
14777  __Pyx_GOTREF(__pyx_t_3);
14778 
14779  /* "PyClical.pyx":1616
14780  * return math.cos(obj)
14781  * except:
14782  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14783  *
14784  * cpdef inline acos(obj,i = None):
14785  */
14786  __Pyx_XDECREF(__pyx_r);
14787  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14788  __Pyx_GOTREF(__pyx_t_10);
14789  __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)
14790  __Pyx_GOTREF(__pyx_t_11);
14791  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14792  __pyx_r = __pyx_t_11;
14793  __pyx_t_11 = 0;
14794  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14795  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14796  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14797  goto __pyx_L7_except_return;
14798  }
14799  __pyx_L6_except_error:;
14800 
14801  /* "PyClical.pyx":1613
14802  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14803  * else:
14804  * try: # <<<<<<<<<<<<<<
14805  * return math.cos(obj)
14806  * except:
14807  */
14808  __Pyx_XGIVEREF(__pyx_t_6);
14809  __Pyx_XGIVEREF(__pyx_t_7);
14810  __Pyx_XGIVEREF(__pyx_t_8);
14811  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14812  goto __pyx_L1_error;
14813  __pyx_L8_try_return:;
14814  __Pyx_XGIVEREF(__pyx_t_6);
14815  __Pyx_XGIVEREF(__pyx_t_7);
14816  __Pyx_XGIVEREF(__pyx_t_8);
14817  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14818  goto __pyx_L0;
14819  __pyx_L7_except_return:;
14820  __Pyx_XGIVEREF(__pyx_t_6);
14821  __Pyx_XGIVEREF(__pyx_t_7);
14822  __Pyx_XGIVEREF(__pyx_t_8);
14823  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14824  goto __pyx_L0;
14825  }
14826  }
14827 
14828  /* "PyClical.pyx":1601
14829  * return clifford().wrap( glucat.log(toClifford(obj)) )
14830  *
14831  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14832  * """
14833  * Cosine of multivector with optional complexifier.
14834  */
14835 
14836  /* function exit code */
14837  __pyx_L1_error:;
14838  __Pyx_XDECREF(__pyx_t_3);
14839  __Pyx_XDECREF(__pyx_t_5);
14840  __Pyx_XDECREF(__pyx_t_9);
14841  __Pyx_XDECREF(__pyx_t_10);
14842  __Pyx_XDECREF(__pyx_t_11);
14843  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14844  __pyx_r = 0;
14845  __pyx_L0:;
14846  __Pyx_XGIVEREF(__pyx_r);
14847  __Pyx_RefNannyFinishContext();
14848  return __pyx_r;
14849  }
14850 
14851  /* Python wrapper */
14852  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14853  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 ";
14854  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14855  PyObject *__pyx_v_obj = 0;
14856  PyObject *__pyx_v_i = 0;
14857  int __pyx_lineno = 0;
14858  const char *__pyx_filename = NULL;
14859  int __pyx_clineno = 0;
14860  PyObject *__pyx_r = 0;
14861  __Pyx_RefNannyDeclarations
14862  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14863  {
14864  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14865  PyObject* values[2] = {0,0};
14866  values[1] = ((PyObject *)Py_None);
14867  if (unlikely(__pyx_kwds)) {
14868  Py_ssize_t kw_args;
14869  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14870  switch (pos_args) {
14871  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14872  CYTHON_FALLTHROUGH;
14873  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14874  CYTHON_FALLTHROUGH;
14875  case 0: break;
14876  default: goto __pyx_L5_argtuple_error;
14877  }
14878  kw_args = PyDict_Size(__pyx_kwds);
14879  switch (pos_args) {
14880  case 0:
14881  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14882  else goto __pyx_L5_argtuple_error;
14883  CYTHON_FALLTHROUGH;
14884  case 1:
14885  if (kw_args > 0) {
14886  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14887  if (value) { values[1] = value; kw_args--; }
14888  }
14889  }
14890  if (unlikely(kw_args > 0)) {
14891  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1601, __pyx_L3_error)
14892  }
14893  } else {
14894  switch (PyTuple_GET_SIZE(__pyx_args)) {
14895  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14896  CYTHON_FALLTHROUGH;
14897  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14898  break;
14899  default: goto __pyx_L5_argtuple_error;
14900  }
14901  }
14902  __pyx_v_obj = values[0];
14903  __pyx_v_i = values[1];
14904  }
14905  goto __pyx_L4_argument_unpacking_done;
14906  __pyx_L5_argtuple_error:;
14907  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1601, __pyx_L3_error)
14908  __pyx_L3_error:;
14909  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14910  __Pyx_RefNannyFinishContext();
14911  return NULL;
14912  __pyx_L4_argument_unpacking_done:;
14913  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14914 
14915  /* function exit code */
14916  __Pyx_RefNannyFinishContext();
14917  return __pyx_r;
14918  }
14919 
14920  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14921  PyObject *__pyx_r = NULL;
14922  __Pyx_RefNannyDeclarations
14923  PyObject *__pyx_t_1 = NULL;
14924  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14925  int __pyx_lineno = 0;
14926  const char *__pyx_filename = NULL;
14927  int __pyx_clineno = 0;
14928  __Pyx_RefNannySetupContext("cos", 0);
14929  __Pyx_XDECREF(__pyx_r);
14930  __pyx_t_2.__pyx_n = 1;
14931  __pyx_t_2.i = __pyx_v_i;
14932  __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)
14933  __Pyx_GOTREF(__pyx_t_1);
14934  __pyx_r = __pyx_t_1;
14935  __pyx_t_1 = 0;
14936  goto __pyx_L0;
14937 
14938  /* function exit code */
14939  __pyx_L1_error:;
14940  __Pyx_XDECREF(__pyx_t_1);
14941  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14942  __pyx_r = NULL;
14943  __pyx_L0:;
14944  __Pyx_XGIVEREF(__pyx_r);
14945  __Pyx_RefNannyFinishContext();
14946  return __pyx_r;
14947  }
14948 
14949  /* "PyClical.pyx":1618
14950  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14951  *
14952  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14953  * """
14954  * Inverse cosine of multivector with optional complexifier.
14955  */
14956 
14957  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14958  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) {
14959  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14960  PyObject *__pyx_r = NULL;
14961  __Pyx_RefNannyDeclarations
14962  int __pyx_t_1;
14963  int __pyx_t_2;
14964  PyObject *__pyx_t_3 = NULL;
14965  Clifford __pyx_t_4;
14966  PyObject *__pyx_t_5 = NULL;
14967  PyObject *__pyx_t_6 = NULL;
14968  PyObject *__pyx_t_7 = NULL;
14969  PyObject *__pyx_t_8 = NULL;
14970  PyObject *__pyx_t_9 = NULL;
14971  PyObject *__pyx_t_10 = NULL;
14972  PyObject *__pyx_t_11 = NULL;
14973  int __pyx_lineno = 0;
14974  const char *__pyx_filename = NULL;
14975  int __pyx_clineno = 0;
14976  __Pyx_RefNannySetupContext("acos", 0);
14977  if (__pyx_optional_args) {
14978  if (__pyx_optional_args->__pyx_n > 0) {
14979  __pyx_v_i = __pyx_optional_args->i;
14980  }
14981  }
14982 
14983  /* "PyClical.pyx":1631
14984  * {1,2}
14985  * """
14986  * if not (i is None): # <<<<<<<<<<<<<<
14987  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14988  * else:
14989  */
14990  __pyx_t_1 = (__pyx_v_i != Py_None);
14991  __pyx_t_2 = (__pyx_t_1 != 0);
14992  if (__pyx_t_2) {
14993 
14994  /* "PyClical.pyx":1632
14995  * """
14996  * if not (i is None):
14997  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14998  * else:
14999  * try:
15000  */
15001  __Pyx_XDECREF(__pyx_r);
15002  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error)
15003  __Pyx_GOTREF(__pyx_t_3);
15004  try {
15005  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15006  } catch(...) {
15007  __Pyx_CppExn2PyErr();
15008  __PYX_ERR(0, 1632, __pyx_L1_error)
15009  }
15010  __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)
15011  __Pyx_GOTREF(__pyx_t_5);
15012  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15013  __pyx_r = __pyx_t_5;
15014  __pyx_t_5 = 0;
15015  goto __pyx_L0;
15016 
15017  /* "PyClical.pyx":1631
15018  * {1,2}
15019  * """
15020  * if not (i is None): # <<<<<<<<<<<<<<
15021  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15022  * else:
15023  */
15024  }
15025 
15026  /* "PyClical.pyx":1634
15027  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15028  * else:
15029  * try: # <<<<<<<<<<<<<<
15030  * return math.acos(obj)
15031  * except:
15032  */
15033  /*else*/ {
15034  {
15035  __Pyx_PyThreadState_declare
15036  __Pyx_PyThreadState_assign
15037  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15038  __Pyx_XGOTREF(__pyx_t_6);
15039  __Pyx_XGOTREF(__pyx_t_7);
15040  __Pyx_XGOTREF(__pyx_t_8);
15041  /*try:*/ {
15042 
15043  /* "PyClical.pyx":1635
15044  * else:
15045  * try:
15046  * return math.acos(obj) # <<<<<<<<<<<<<<
15047  * except:
15048  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15049  */
15050  __Pyx_XDECREF(__pyx_r);
15051  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L4_error)
15052  __Pyx_GOTREF(__pyx_t_3);
15053  __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)
15054  __Pyx_GOTREF(__pyx_t_9);
15055  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15056  __pyx_t_3 = NULL;
15057  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15058  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15059  if (likely(__pyx_t_3)) {
15060  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15061  __Pyx_INCREF(__pyx_t_3);
15062  __Pyx_INCREF(function);
15063  __Pyx_DECREF_SET(__pyx_t_9, function);
15064  }
15065  }
15066  __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);
15067  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15068  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1635, __pyx_L4_error)
15069  __Pyx_GOTREF(__pyx_t_5);
15070  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15071  __pyx_r = __pyx_t_5;
15072  __pyx_t_5 = 0;
15073  goto __pyx_L8_try_return;
15074 
15075  /* "PyClical.pyx":1634
15076  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15077  * else:
15078  * try: # <<<<<<<<<<<<<<
15079  * return math.acos(obj)
15080  * except:
15081  */
15082  }
15083  __pyx_L4_error:;
15084  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15085  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15086  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15087 
15088  /* "PyClical.pyx":1636
15089  * try:
15090  * return math.acos(obj)
15091  * except: # <<<<<<<<<<<<<<
15092  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15093  *
15094  */
15095  /*except:*/ {
15096  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15097  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1636, __pyx_L6_except_error)
15098  __Pyx_GOTREF(__pyx_t_5);
15099  __Pyx_GOTREF(__pyx_t_9);
15100  __Pyx_GOTREF(__pyx_t_3);
15101 
15102  /* "PyClical.pyx":1637
15103  * return math.acos(obj)
15104  * except:
15105  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
15106  *
15107  * cpdef inline cosh(obj):
15108  */
15109  __Pyx_XDECREF(__pyx_r);
15110  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1637, __pyx_L6_except_error)
15111  __Pyx_GOTREF(__pyx_t_10);
15112  __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)
15113  __Pyx_GOTREF(__pyx_t_11);
15114  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15115  __pyx_r = __pyx_t_11;
15116  __pyx_t_11 = 0;
15117  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15118  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15119  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15120  goto __pyx_L7_except_return;
15121  }
15122  __pyx_L6_except_error:;
15123 
15124  /* "PyClical.pyx":1634
15125  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15126  * else:
15127  * try: # <<<<<<<<<<<<<<
15128  * return math.acos(obj)
15129  * except:
15130  */
15131  __Pyx_XGIVEREF(__pyx_t_6);
15132  __Pyx_XGIVEREF(__pyx_t_7);
15133  __Pyx_XGIVEREF(__pyx_t_8);
15134  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15135  goto __pyx_L1_error;
15136  __pyx_L8_try_return:;
15137  __Pyx_XGIVEREF(__pyx_t_6);
15138  __Pyx_XGIVEREF(__pyx_t_7);
15139  __Pyx_XGIVEREF(__pyx_t_8);
15140  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15141  goto __pyx_L0;
15142  __pyx_L7_except_return:;
15143  __Pyx_XGIVEREF(__pyx_t_6);
15144  __Pyx_XGIVEREF(__pyx_t_7);
15145  __Pyx_XGIVEREF(__pyx_t_8);
15146  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15147  goto __pyx_L0;
15148  }
15149  }
15150 
15151  /* "PyClical.pyx":1618
15152  * return clifford().wrap( glucat.cos(toClifford(obj)) )
15153  *
15154  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
15155  * """
15156  * Inverse cosine of multivector with optional complexifier.
15157  */
15158 
15159  /* function exit code */
15160  __pyx_L1_error:;
15161  __Pyx_XDECREF(__pyx_t_3);
15162  __Pyx_XDECREF(__pyx_t_5);
15163  __Pyx_XDECREF(__pyx_t_9);
15164  __Pyx_XDECREF(__pyx_t_10);
15165  __Pyx_XDECREF(__pyx_t_11);
15166  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15167  __pyx_r = 0;
15168  __pyx_L0:;
15169  __Pyx_XGIVEREF(__pyx_r);
15170  __Pyx_RefNannyFinishContext();
15171  return __pyx_r;
15172  }
15173 
15174  /* Python wrapper */
15175  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15176  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 ";
15177  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15178  PyObject *__pyx_v_obj = 0;
15179  PyObject *__pyx_v_i = 0;
15180  int __pyx_lineno = 0;
15181  const char *__pyx_filename = NULL;
15182  int __pyx_clineno = 0;
15183  PyObject *__pyx_r = 0;
15184  __Pyx_RefNannyDeclarations
15185  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
15186  {
15187  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15188  PyObject* values[2] = {0,0};
15189  values[1] = ((PyObject *)Py_None);
15190  if (unlikely(__pyx_kwds)) {
15191  Py_ssize_t kw_args;
15192  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15193  switch (pos_args) {
15194  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15195  CYTHON_FALLTHROUGH;
15196  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15197  CYTHON_FALLTHROUGH;
15198  case 0: break;
15199  default: goto __pyx_L5_argtuple_error;
15200  }
15201  kw_args = PyDict_Size(__pyx_kwds);
15202  switch (pos_args) {
15203  case 0:
15204  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15205  else goto __pyx_L5_argtuple_error;
15206  CYTHON_FALLTHROUGH;
15207  case 1:
15208  if (kw_args > 0) {
15209  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15210  if (value) { values[1] = value; kw_args--; }
15211  }
15212  }
15213  if (unlikely(kw_args > 0)) {
15214  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1618, __pyx_L3_error)
15215  }
15216  } else {
15217  switch (PyTuple_GET_SIZE(__pyx_args)) {
15218  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15219  CYTHON_FALLTHROUGH;
15220  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15221  break;
15222  default: goto __pyx_L5_argtuple_error;
15223  }
15224  }
15225  __pyx_v_obj = values[0];
15226  __pyx_v_i = values[1];
15227  }
15228  goto __pyx_L4_argument_unpacking_done;
15229  __pyx_L5_argtuple_error:;
15230  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1618, __pyx_L3_error)
15231  __pyx_L3_error:;
15232  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15233  __Pyx_RefNannyFinishContext();
15234  return NULL;
15235  __pyx_L4_argument_unpacking_done:;
15236  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
15237 
15238  /* function exit code */
15239  __Pyx_RefNannyFinishContext();
15240  return __pyx_r;
15241  }
15242 
15243  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15244  PyObject *__pyx_r = NULL;
15245  __Pyx_RefNannyDeclarations
15246  PyObject *__pyx_t_1 = NULL;
15247  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
15248  int __pyx_lineno = 0;
15249  const char *__pyx_filename = NULL;
15250  int __pyx_clineno = 0;
15251  __Pyx_RefNannySetupContext("acos", 0);
15252  __Pyx_XDECREF(__pyx_r);
15253  __pyx_t_2.__pyx_n = 1;
15254  __pyx_t_2.i = __pyx_v_i;
15255  __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)
15256  __Pyx_GOTREF(__pyx_t_1);
15257  __pyx_r = __pyx_t_1;
15258  __pyx_t_1 = 0;
15259  goto __pyx_L0;
15260 
15261  /* function exit code */
15262  __pyx_L1_error:;
15263  __Pyx_XDECREF(__pyx_t_1);
15264  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15265  __pyx_r = NULL;
15266  __pyx_L0:;
15267  __Pyx_XGIVEREF(__pyx_r);
15268  __Pyx_RefNannyFinishContext();
15269  return __pyx_r;
15270  }
15271 
15272  /* "PyClical.pyx":1639
15273  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15274  *
15275  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
15276  * """
15277  * Hyperbolic cosine of multivector.
15278  */
15279 
15280  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15281  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15282  PyObject *__pyx_r = NULL;
15283  __Pyx_RefNannyDeclarations
15284  PyObject *__pyx_t_1 = NULL;
15285  PyObject *__pyx_t_2 = NULL;
15286  PyObject *__pyx_t_3 = NULL;
15287  PyObject *__pyx_t_4 = NULL;
15288  PyObject *__pyx_t_5 = NULL;
15289  PyObject *__pyx_t_6 = NULL;
15290  PyObject *__pyx_t_7 = NULL;
15291  PyObject *__pyx_t_8 = NULL;
15292  int __pyx_lineno = 0;
15293  const char *__pyx_filename = NULL;
15294  int __pyx_clineno = 0;
15295  __Pyx_RefNannySetupContext("cosh", 0);
15296 
15297  /* "PyClical.pyx":1650
15298  * {1,2}
15299  * """
15300  * try: # <<<<<<<<<<<<<<
15301  * return math.cosh(obj)
15302  * except:
15303  */
15304  {
15305  __Pyx_PyThreadState_declare
15306  __Pyx_PyThreadState_assign
15307  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15308  __Pyx_XGOTREF(__pyx_t_1);
15309  __Pyx_XGOTREF(__pyx_t_2);
15310  __Pyx_XGOTREF(__pyx_t_3);
15311  /*try:*/ {
15312 
15313  /* "PyClical.pyx":1651
15314  * """
15315  * try:
15316  * return math.cosh(obj) # <<<<<<<<<<<<<<
15317  * except:
15318  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15319  */
15320  __Pyx_XDECREF(__pyx_r);
15321  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1651, __pyx_L3_error)
15322  __Pyx_GOTREF(__pyx_t_5);
15323  __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)
15324  __Pyx_GOTREF(__pyx_t_6);
15325  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15326  __pyx_t_5 = NULL;
15327  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15328  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15329  if (likely(__pyx_t_5)) {
15330  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15331  __Pyx_INCREF(__pyx_t_5);
15332  __Pyx_INCREF(function);
15333  __Pyx_DECREF_SET(__pyx_t_6, function);
15334  }
15335  }
15336  __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);
15337  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15338  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L3_error)
15339  __Pyx_GOTREF(__pyx_t_4);
15340  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15341  __pyx_r = __pyx_t_4;
15342  __pyx_t_4 = 0;
15343  goto __pyx_L7_try_return;
15344 
15345  /* "PyClical.pyx":1650
15346  * {1,2}
15347  * """
15348  * try: # <<<<<<<<<<<<<<
15349  * return math.cosh(obj)
15350  * except:
15351  */
15352  }
15353  __pyx_L3_error:;
15354  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15355  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15356  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15357 
15358  /* "PyClical.pyx":1652
15359  * try:
15360  * return math.cosh(obj)
15361  * except: # <<<<<<<<<<<<<<
15362  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15363  *
15364  */
15365  /*except:*/ {
15366  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15367  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1652, __pyx_L5_except_error)
15368  __Pyx_GOTREF(__pyx_t_4);
15369  __Pyx_GOTREF(__pyx_t_6);
15370  __Pyx_GOTREF(__pyx_t_5);
15371 
15372  /* "PyClical.pyx":1653
15373  * return math.cosh(obj)
15374  * except:
15375  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15376  *
15377  * cpdef inline acosh(obj,i = None):
15378  */
15379  __Pyx_XDECREF(__pyx_r);
15380  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1653, __pyx_L5_except_error)
15381  __Pyx_GOTREF(__pyx_t_7);
15382  __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)
15383  __Pyx_GOTREF(__pyx_t_8);
15384  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15385  __pyx_r = __pyx_t_8;
15386  __pyx_t_8 = 0;
15387  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15388  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15389  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15390  goto __pyx_L6_except_return;
15391  }
15392  __pyx_L5_except_error:;
15393 
15394  /* "PyClical.pyx":1650
15395  * {1,2}
15396  * """
15397  * try: # <<<<<<<<<<<<<<
15398  * return math.cosh(obj)
15399  * except:
15400  */
15401  __Pyx_XGIVEREF(__pyx_t_1);
15402  __Pyx_XGIVEREF(__pyx_t_2);
15403  __Pyx_XGIVEREF(__pyx_t_3);
15404  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15405  goto __pyx_L1_error;
15406  __pyx_L7_try_return:;
15407  __Pyx_XGIVEREF(__pyx_t_1);
15408  __Pyx_XGIVEREF(__pyx_t_2);
15409  __Pyx_XGIVEREF(__pyx_t_3);
15410  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15411  goto __pyx_L0;
15412  __pyx_L6_except_return:;
15413  __Pyx_XGIVEREF(__pyx_t_1);
15414  __Pyx_XGIVEREF(__pyx_t_2);
15415  __Pyx_XGIVEREF(__pyx_t_3);
15416  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15417  goto __pyx_L0;
15418  }
15419 
15420  /* "PyClical.pyx":1639
15421  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15422  *
15423  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
15424  * """
15425  * Hyperbolic cosine of multivector.
15426  */
15427 
15428  /* function exit code */
15429  __pyx_L1_error:;
15430  __Pyx_XDECREF(__pyx_t_4);
15431  __Pyx_XDECREF(__pyx_t_5);
15432  __Pyx_XDECREF(__pyx_t_6);
15433  __Pyx_XDECREF(__pyx_t_7);
15434  __Pyx_XDECREF(__pyx_t_8);
15435  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15436  __pyx_r = 0;
15437  __pyx_L0:;
15438  __Pyx_XGIVEREF(__pyx_r);
15439  __Pyx_RefNannyFinishContext();
15440  return __pyx_r;
15441  }
15442 
15443  /* Python wrapper */
15444  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15445  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 ";
15446  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15447  PyObject *__pyx_r = 0;
15448  __Pyx_RefNannyDeclarations
15449  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
15450  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
15451 
15452  /* function exit code */
15453  __Pyx_RefNannyFinishContext();
15454  return __pyx_r;
15455  }
15456 
15457  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15458  PyObject *__pyx_r = NULL;
15459  __Pyx_RefNannyDeclarations
15460  PyObject *__pyx_t_1 = NULL;
15461  int __pyx_lineno = 0;
15462  const char *__pyx_filename = NULL;
15463  int __pyx_clineno = 0;
15464  __Pyx_RefNannySetupContext("cosh", 0);
15465  __Pyx_XDECREF(__pyx_r);
15466  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error)
15467  __Pyx_GOTREF(__pyx_t_1);
15468  __pyx_r = __pyx_t_1;
15469  __pyx_t_1 = 0;
15470  goto __pyx_L0;
15471 
15472  /* function exit code */
15473  __pyx_L1_error:;
15474  __Pyx_XDECREF(__pyx_t_1);
15475  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15476  __pyx_r = NULL;
15477  __pyx_L0:;
15478  __Pyx_XGIVEREF(__pyx_r);
15479  __Pyx_RefNannyFinishContext();
15480  return __pyx_r;
15481  }
15482 
15483  /* "PyClical.pyx":1655
15484  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15485  *
15486  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15487  * """
15488  * Inverse hyperbolic cosine of multivector with optional complexifier.
15489  */
15490 
15491  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15492  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) {
15493  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15494  PyObject *__pyx_r = NULL;
15495  __Pyx_RefNannyDeclarations
15496  int __pyx_t_1;
15497  int __pyx_t_2;
15498  PyObject *__pyx_t_3 = NULL;
15499  Clifford __pyx_t_4;
15500  PyObject *__pyx_t_5 = NULL;
15501  PyObject *__pyx_t_6 = NULL;
15502  PyObject *__pyx_t_7 = NULL;
15503  PyObject *__pyx_t_8 = NULL;
15504  PyObject *__pyx_t_9 = NULL;
15505  PyObject *__pyx_t_10 = NULL;
15506  PyObject *__pyx_t_11 = NULL;
15507  int __pyx_lineno = 0;
15508  const char *__pyx_filename = NULL;
15509  int __pyx_clineno = 0;
15510  __Pyx_RefNannySetupContext("acosh", 0);
15511  if (__pyx_optional_args) {
15512  if (__pyx_optional_args->__pyx_n > 0) {
15513  __pyx_v_i = __pyx_optional_args->i;
15514  }
15515  }
15516 
15517  /* "PyClical.pyx":1670
15518  * {1,2}
15519  * """
15520  * if not (i is None): # <<<<<<<<<<<<<<
15521  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15522  * else:
15523  */
15524  __pyx_t_1 = (__pyx_v_i != Py_None);
15525  __pyx_t_2 = (__pyx_t_1 != 0);
15526  if (__pyx_t_2) {
15527 
15528  /* "PyClical.pyx":1671
15529  * """
15530  * if not (i is None):
15531  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15532  * else:
15533  * try:
15534  */
15535  __Pyx_XDECREF(__pyx_r);
15536  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1671, __pyx_L1_error)
15537  __Pyx_GOTREF(__pyx_t_3);
15538  try {
15539  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15540  } catch(...) {
15541  __Pyx_CppExn2PyErr();
15542  __PYX_ERR(0, 1671, __pyx_L1_error)
15543  }
15544  __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)
15545  __Pyx_GOTREF(__pyx_t_5);
15546  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15547  __pyx_r = __pyx_t_5;
15548  __pyx_t_5 = 0;
15549  goto __pyx_L0;
15550 
15551  /* "PyClical.pyx":1670
15552  * {1,2}
15553  * """
15554  * if not (i is None): # <<<<<<<<<<<<<<
15555  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15556  * else:
15557  */
15558  }
15559 
15560  /* "PyClical.pyx":1673
15561  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15562  * else:
15563  * try: # <<<<<<<<<<<<<<
15564  * return math.acosh(obj)
15565  * except:
15566  */
15567  /*else*/ {
15568  {
15569  __Pyx_PyThreadState_declare
15570  __Pyx_PyThreadState_assign
15571  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15572  __Pyx_XGOTREF(__pyx_t_6);
15573  __Pyx_XGOTREF(__pyx_t_7);
15574  __Pyx_XGOTREF(__pyx_t_8);
15575  /*try:*/ {
15576 
15577  /* "PyClical.pyx":1674
15578  * else:
15579  * try:
15580  * return math.acosh(obj) # <<<<<<<<<<<<<<
15581  * except:
15582  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15583  */
15584  __Pyx_XDECREF(__pyx_r);
15585  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L4_error)
15586  __Pyx_GOTREF(__pyx_t_3);
15587  __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)
15588  __Pyx_GOTREF(__pyx_t_9);
15589  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15590  __pyx_t_3 = NULL;
15591  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15592  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15593  if (likely(__pyx_t_3)) {
15594  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15595  __Pyx_INCREF(__pyx_t_3);
15596  __Pyx_INCREF(function);
15597  __Pyx_DECREF_SET(__pyx_t_9, function);
15598  }
15599  }
15600  __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);
15601  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15602  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L4_error)
15603  __Pyx_GOTREF(__pyx_t_5);
15604  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15605  __pyx_r = __pyx_t_5;
15606  __pyx_t_5 = 0;
15607  goto __pyx_L8_try_return;
15608 
15609  /* "PyClical.pyx":1673
15610  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15611  * else:
15612  * try: # <<<<<<<<<<<<<<
15613  * return math.acosh(obj)
15614  * except:
15615  */
15616  }
15617  __pyx_L4_error:;
15618  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15619  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15620  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15621 
15622  /* "PyClical.pyx":1675
15623  * try:
15624  * return math.acosh(obj)
15625  * except: # <<<<<<<<<<<<<<
15626  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15627  *
15628  */
15629  /*except:*/ {
15630  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15631  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1675, __pyx_L6_except_error)
15632  __Pyx_GOTREF(__pyx_t_5);
15633  __Pyx_GOTREF(__pyx_t_9);
15634  __Pyx_GOTREF(__pyx_t_3);
15635 
15636  /* "PyClical.pyx":1676
15637  * return math.acosh(obj)
15638  * except:
15639  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15640  *
15641  * cpdef inline sin(obj,i = None):
15642  */
15643  __Pyx_XDECREF(__pyx_r);
15644  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1676, __pyx_L6_except_error)
15645  __Pyx_GOTREF(__pyx_t_10);
15646  __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)
15647  __Pyx_GOTREF(__pyx_t_11);
15648  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15649  __pyx_r = __pyx_t_11;
15650  __pyx_t_11 = 0;
15651  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15652  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15653  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15654  goto __pyx_L7_except_return;
15655  }
15656  __pyx_L6_except_error:;
15657 
15658  /* "PyClical.pyx":1673
15659  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15660  * else:
15661  * try: # <<<<<<<<<<<<<<
15662  * return math.acosh(obj)
15663  * except:
15664  */
15665  __Pyx_XGIVEREF(__pyx_t_6);
15666  __Pyx_XGIVEREF(__pyx_t_7);
15667  __Pyx_XGIVEREF(__pyx_t_8);
15668  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15669  goto __pyx_L1_error;
15670  __pyx_L8_try_return:;
15671  __Pyx_XGIVEREF(__pyx_t_6);
15672  __Pyx_XGIVEREF(__pyx_t_7);
15673  __Pyx_XGIVEREF(__pyx_t_8);
15674  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15675  goto __pyx_L0;
15676  __pyx_L7_except_return:;
15677  __Pyx_XGIVEREF(__pyx_t_6);
15678  __Pyx_XGIVEREF(__pyx_t_7);
15679  __Pyx_XGIVEREF(__pyx_t_8);
15680  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15681  goto __pyx_L0;
15682  }
15683  }
15684 
15685  /* "PyClical.pyx":1655
15686  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15687  *
15688  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15689  * """
15690  * Inverse hyperbolic cosine of multivector with optional complexifier.
15691  */
15692 
15693  /* function exit code */
15694  __pyx_L1_error:;
15695  __Pyx_XDECREF(__pyx_t_3);
15696  __Pyx_XDECREF(__pyx_t_5);
15697  __Pyx_XDECREF(__pyx_t_9);
15698  __Pyx_XDECREF(__pyx_t_10);
15699  __Pyx_XDECREF(__pyx_t_11);
15700  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15701  __pyx_r = 0;
15702  __pyx_L0:;
15703  __Pyx_XGIVEREF(__pyx_r);
15704  __Pyx_RefNannyFinishContext();
15705  return __pyx_r;
15706  }
15707 
15708  /* Python wrapper */
15709  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15710  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 ";
15711  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15712  PyObject *__pyx_v_obj = 0;
15713  PyObject *__pyx_v_i = 0;
15714  int __pyx_lineno = 0;
15715  const char *__pyx_filename = NULL;
15716  int __pyx_clineno = 0;
15717  PyObject *__pyx_r = 0;
15718  __Pyx_RefNannyDeclarations
15719  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15720  {
15721  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15722  PyObject* values[2] = {0,0};
15723  values[1] = ((PyObject *)Py_None);
15724  if (unlikely(__pyx_kwds)) {
15725  Py_ssize_t kw_args;
15726  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15727  switch (pos_args) {
15728  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15729  CYTHON_FALLTHROUGH;
15730  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15731  CYTHON_FALLTHROUGH;
15732  case 0: break;
15733  default: goto __pyx_L5_argtuple_error;
15734  }
15735  kw_args = PyDict_Size(__pyx_kwds);
15736  switch (pos_args) {
15737  case 0:
15738  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15739  else goto __pyx_L5_argtuple_error;
15740  CYTHON_FALLTHROUGH;
15741  case 1:
15742  if (kw_args > 0) {
15743  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15744  if (value) { values[1] = value; kw_args--; }
15745  }
15746  }
15747  if (unlikely(kw_args > 0)) {
15748  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1655, __pyx_L3_error)
15749  }
15750  } else {
15751  switch (PyTuple_GET_SIZE(__pyx_args)) {
15752  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15753  CYTHON_FALLTHROUGH;
15754  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15755  break;
15756  default: goto __pyx_L5_argtuple_error;
15757  }
15758  }
15759  __pyx_v_obj = values[0];
15760  __pyx_v_i = values[1];
15761  }
15762  goto __pyx_L4_argument_unpacking_done;
15763  __pyx_L5_argtuple_error:;
15764  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1655, __pyx_L3_error)
15765  __pyx_L3_error:;
15766  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15767  __Pyx_RefNannyFinishContext();
15768  return NULL;
15769  __pyx_L4_argument_unpacking_done:;
15770  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15771 
15772  /* function exit code */
15773  __Pyx_RefNannyFinishContext();
15774  return __pyx_r;
15775  }
15776 
15777  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15778  PyObject *__pyx_r = NULL;
15779  __Pyx_RefNannyDeclarations
15780  PyObject *__pyx_t_1 = NULL;
15781  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15782  int __pyx_lineno = 0;
15783  const char *__pyx_filename = NULL;
15784  int __pyx_clineno = 0;
15785  __Pyx_RefNannySetupContext("acosh", 0);
15786  __Pyx_XDECREF(__pyx_r);
15787  __pyx_t_2.__pyx_n = 1;
15788  __pyx_t_2.i = __pyx_v_i;
15789  __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)
15790  __Pyx_GOTREF(__pyx_t_1);
15791  __pyx_r = __pyx_t_1;
15792  __pyx_t_1 = 0;
15793  goto __pyx_L0;
15794 
15795  /* function exit code */
15796  __pyx_L1_error:;
15797  __Pyx_XDECREF(__pyx_t_1);
15798  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15799  __pyx_r = NULL;
15800  __pyx_L0:;
15801  __Pyx_XGIVEREF(__pyx_r);
15802  __Pyx_RefNannyFinishContext();
15803  return __pyx_r;
15804  }
15805 
15806  /* "PyClical.pyx":1678
15807  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15808  *
15809  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15810  * """
15811  * Sine of multivector with optional complexifier.
15812  */
15813 
15814  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15815  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) {
15816  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15817  PyObject *__pyx_r = NULL;
15818  __Pyx_RefNannyDeclarations
15819  int __pyx_t_1;
15820  int __pyx_t_2;
15821  PyObject *__pyx_t_3 = NULL;
15822  Clifford __pyx_t_4;
15823  PyObject *__pyx_t_5 = NULL;
15824  PyObject *__pyx_t_6 = NULL;
15825  PyObject *__pyx_t_7 = NULL;
15826  PyObject *__pyx_t_8 = NULL;
15827  PyObject *__pyx_t_9 = NULL;
15828  PyObject *__pyx_t_10 = NULL;
15829  PyObject *__pyx_t_11 = NULL;
15830  int __pyx_lineno = 0;
15831  const char *__pyx_filename = NULL;
15832  int __pyx_clineno = 0;
15833  __Pyx_RefNannySetupContext("sin", 0);
15834  if (__pyx_optional_args) {
15835  if (__pyx_optional_args->__pyx_n > 0) {
15836  __pyx_v_i = __pyx_optional_args->i;
15837  }
15838  }
15839 
15840  /* "PyClical.pyx":1689
15841  * {1,2,3}
15842  * """
15843  * if not (i is None): # <<<<<<<<<<<<<<
15844  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15845  * else:
15846  */
15847  __pyx_t_1 = (__pyx_v_i != Py_None);
15848  __pyx_t_2 = (__pyx_t_1 != 0);
15849  if (__pyx_t_2) {
15850 
15851  /* "PyClical.pyx":1690
15852  * """
15853  * if not (i is None):
15854  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15855  * else:
15856  * try:
15857  */
15858  __Pyx_XDECREF(__pyx_r);
15859  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
15860  __Pyx_GOTREF(__pyx_t_3);
15861  try {
15862  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15863  } catch(...) {
15864  __Pyx_CppExn2PyErr();
15865  __PYX_ERR(0, 1690, __pyx_L1_error)
15866  }
15867  __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)
15868  __Pyx_GOTREF(__pyx_t_5);
15869  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15870  __pyx_r = __pyx_t_5;
15871  __pyx_t_5 = 0;
15872  goto __pyx_L0;
15873 
15874  /* "PyClical.pyx":1689
15875  * {1,2,3}
15876  * """
15877  * if not (i is None): # <<<<<<<<<<<<<<
15878  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15879  * else:
15880  */
15881  }
15882 
15883  /* "PyClical.pyx":1692
15884  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15885  * else:
15886  * try: # <<<<<<<<<<<<<<
15887  * return math.sin(obj)
15888  * except:
15889  */
15890  /*else*/ {
15891  {
15892  __Pyx_PyThreadState_declare
15893  __Pyx_PyThreadState_assign
15894  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15895  __Pyx_XGOTREF(__pyx_t_6);
15896  __Pyx_XGOTREF(__pyx_t_7);
15897  __Pyx_XGOTREF(__pyx_t_8);
15898  /*try:*/ {
15899 
15900  /* "PyClical.pyx":1693
15901  * else:
15902  * try:
15903  * return math.sin(obj) # <<<<<<<<<<<<<<
15904  * except:
15905  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15906  */
15907  __Pyx_XDECREF(__pyx_r);
15908  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1693, __pyx_L4_error)
15909  __Pyx_GOTREF(__pyx_t_3);
15910  __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)
15911  __Pyx_GOTREF(__pyx_t_9);
15912  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15913  __pyx_t_3 = NULL;
15914  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15915  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15916  if (likely(__pyx_t_3)) {
15917  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15918  __Pyx_INCREF(__pyx_t_3);
15919  __Pyx_INCREF(function);
15920  __Pyx_DECREF_SET(__pyx_t_9, function);
15921  }
15922  }
15923  __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);
15924  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15925  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1693, __pyx_L4_error)
15926  __Pyx_GOTREF(__pyx_t_5);
15927  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15928  __pyx_r = __pyx_t_5;
15929  __pyx_t_5 = 0;
15930  goto __pyx_L8_try_return;
15931 
15932  /* "PyClical.pyx":1692
15933  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15934  * else:
15935  * try: # <<<<<<<<<<<<<<
15936  * return math.sin(obj)
15937  * except:
15938  */
15939  }
15940  __pyx_L4_error:;
15941  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15942  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15943  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15944 
15945  /* "PyClical.pyx":1694
15946  * try:
15947  * return math.sin(obj)
15948  * except: # <<<<<<<<<<<<<<
15949  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15950  *
15951  */
15952  /*except:*/ {
15953  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15954  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1694, __pyx_L6_except_error)
15955  __Pyx_GOTREF(__pyx_t_5);
15956  __Pyx_GOTREF(__pyx_t_9);
15957  __Pyx_GOTREF(__pyx_t_3);
15958 
15959  /* "PyClical.pyx":1695
15960  * return math.sin(obj)
15961  * except:
15962  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15963  *
15964  * cpdef inline asin(obj,i = None):
15965  */
15966  __Pyx_XDECREF(__pyx_r);
15967  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15968  __Pyx_GOTREF(__pyx_t_10);
15969  __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)
15970  __Pyx_GOTREF(__pyx_t_11);
15971  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15972  __pyx_r = __pyx_t_11;
15973  __pyx_t_11 = 0;
15974  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15975  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15976  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15977  goto __pyx_L7_except_return;
15978  }
15979  __pyx_L6_except_error:;
15980 
15981  /* "PyClical.pyx":1692
15982  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15983  * else:
15984  * try: # <<<<<<<<<<<<<<
15985  * return math.sin(obj)
15986  * except:
15987  */
15988  __Pyx_XGIVEREF(__pyx_t_6);
15989  __Pyx_XGIVEREF(__pyx_t_7);
15990  __Pyx_XGIVEREF(__pyx_t_8);
15991  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15992  goto __pyx_L1_error;
15993  __pyx_L8_try_return:;
15994  __Pyx_XGIVEREF(__pyx_t_6);
15995  __Pyx_XGIVEREF(__pyx_t_7);
15996  __Pyx_XGIVEREF(__pyx_t_8);
15997  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15998  goto __pyx_L0;
15999  __pyx_L7_except_return:;
16000  __Pyx_XGIVEREF(__pyx_t_6);
16001  __Pyx_XGIVEREF(__pyx_t_7);
16002  __Pyx_XGIVEREF(__pyx_t_8);
16003  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16004  goto __pyx_L0;
16005  }
16006  }
16007 
16008  /* "PyClical.pyx":1678
16009  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
16010  *
16011  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
16012  * """
16013  * Sine of multivector with optional complexifier.
16014  */
16015 
16016  /* function exit code */
16017  __pyx_L1_error:;
16018  __Pyx_XDECREF(__pyx_t_3);
16019  __Pyx_XDECREF(__pyx_t_5);
16020  __Pyx_XDECREF(__pyx_t_9);
16021  __Pyx_XDECREF(__pyx_t_10);
16022  __Pyx_XDECREF(__pyx_t_11);
16023  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16024  __pyx_r = 0;
16025  __pyx_L0:;
16026  __Pyx_XGIVEREF(__pyx_r);
16027  __Pyx_RefNannyFinishContext();
16028  return __pyx_r;
16029  }
16030 
16031  /* Python wrapper */
16032  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16033  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 ";
16034  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16035  PyObject *__pyx_v_obj = 0;
16036  PyObject *__pyx_v_i = 0;
16037  int __pyx_lineno = 0;
16038  const char *__pyx_filename = NULL;
16039  int __pyx_clineno = 0;
16040  PyObject *__pyx_r = 0;
16041  __Pyx_RefNannyDeclarations
16042  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
16043  {
16044  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16045  PyObject* values[2] = {0,0};
16046  values[1] = ((PyObject *)Py_None);
16047  if (unlikely(__pyx_kwds)) {
16048  Py_ssize_t kw_args;
16049  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16050  switch (pos_args) {
16051  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16052  CYTHON_FALLTHROUGH;
16053  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16054  CYTHON_FALLTHROUGH;
16055  case 0: break;
16056  default: goto __pyx_L5_argtuple_error;
16057  }
16058  kw_args = PyDict_Size(__pyx_kwds);
16059  switch (pos_args) {
16060  case 0:
16061  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16062  else goto __pyx_L5_argtuple_error;
16063  CYTHON_FALLTHROUGH;
16064  case 1:
16065  if (kw_args > 0) {
16066  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16067  if (value) { values[1] = value; kw_args--; }
16068  }
16069  }
16070  if (unlikely(kw_args > 0)) {
16071  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1678, __pyx_L3_error)
16072  }
16073  } else {
16074  switch (PyTuple_GET_SIZE(__pyx_args)) {
16075  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16076  CYTHON_FALLTHROUGH;
16077  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16078  break;
16079  default: goto __pyx_L5_argtuple_error;
16080  }
16081  }
16082  __pyx_v_obj = values[0];
16083  __pyx_v_i = values[1];
16084  }
16085  goto __pyx_L4_argument_unpacking_done;
16086  __pyx_L5_argtuple_error:;
16087  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1678, __pyx_L3_error)
16088  __pyx_L3_error:;
16089  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16090  __Pyx_RefNannyFinishContext();
16091  return NULL;
16092  __pyx_L4_argument_unpacking_done:;
16093  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
16094 
16095  /* function exit code */
16096  __Pyx_RefNannyFinishContext();
16097  return __pyx_r;
16098  }
16099 
16100  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16101  PyObject *__pyx_r = NULL;
16102  __Pyx_RefNannyDeclarations
16103  PyObject *__pyx_t_1 = NULL;
16104  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
16105  int __pyx_lineno = 0;
16106  const char *__pyx_filename = NULL;
16107  int __pyx_clineno = 0;
16108  __Pyx_RefNannySetupContext("sin", 0);
16109  __Pyx_XDECREF(__pyx_r);
16110  __pyx_t_2.__pyx_n = 1;
16111  __pyx_t_2.i = __pyx_v_i;
16112  __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)
16113  __Pyx_GOTREF(__pyx_t_1);
16114  __pyx_r = __pyx_t_1;
16115  __pyx_t_1 = 0;
16116  goto __pyx_L0;
16117 
16118  /* function exit code */
16119  __pyx_L1_error:;
16120  __Pyx_XDECREF(__pyx_t_1);
16121  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16122  __pyx_r = NULL;
16123  __pyx_L0:;
16124  __Pyx_XGIVEREF(__pyx_r);
16125  __Pyx_RefNannyFinishContext();
16126  return __pyx_r;
16127  }
16128 
16129  /* "PyClical.pyx":1697
16130  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16131  *
16132  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
16133  * """
16134  * Inverse sine of multivector with optional complexifier.
16135  */
16136 
16137  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16138  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) {
16139  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16140  PyObject *__pyx_r = NULL;
16141  __Pyx_RefNannyDeclarations
16142  int __pyx_t_1;
16143  int __pyx_t_2;
16144  PyObject *__pyx_t_3 = NULL;
16145  Clifford __pyx_t_4;
16146  PyObject *__pyx_t_5 = NULL;
16147  PyObject *__pyx_t_6 = NULL;
16148  PyObject *__pyx_t_7 = NULL;
16149  PyObject *__pyx_t_8 = NULL;
16150  PyObject *__pyx_t_9 = NULL;
16151  PyObject *__pyx_t_10 = NULL;
16152  PyObject *__pyx_t_11 = NULL;
16153  int __pyx_lineno = 0;
16154  const char *__pyx_filename = NULL;
16155  int __pyx_clineno = 0;
16156  __Pyx_RefNannySetupContext("asin", 0);
16157  if (__pyx_optional_args) {
16158  if (__pyx_optional_args->__pyx_n > 0) {
16159  __pyx_v_i = __pyx_optional_args->i;
16160  }
16161  }
16162 
16163  /* "PyClical.pyx":1710
16164  * {1,2,3}
16165  * """
16166  * if not (i is None): # <<<<<<<<<<<<<<
16167  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16168  * else:
16169  */
16170  __pyx_t_1 = (__pyx_v_i != Py_None);
16171  __pyx_t_2 = (__pyx_t_1 != 0);
16172  if (__pyx_t_2) {
16173 
16174  /* "PyClical.pyx":1711
16175  * """
16176  * if not (i is None):
16177  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16178  * else:
16179  * try:
16180  */
16181  __Pyx_XDECREF(__pyx_r);
16182  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L1_error)
16183  __Pyx_GOTREF(__pyx_t_3);
16184  try {
16185  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16186  } catch(...) {
16187  __Pyx_CppExn2PyErr();
16188  __PYX_ERR(0, 1711, __pyx_L1_error)
16189  }
16190  __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)
16191  __Pyx_GOTREF(__pyx_t_5);
16192  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16193  __pyx_r = __pyx_t_5;
16194  __pyx_t_5 = 0;
16195  goto __pyx_L0;
16196 
16197  /* "PyClical.pyx":1710
16198  * {1,2,3}
16199  * """
16200  * if not (i is None): # <<<<<<<<<<<<<<
16201  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16202  * else:
16203  */
16204  }
16205 
16206  /* "PyClical.pyx":1713
16207  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16208  * else:
16209  * try: # <<<<<<<<<<<<<<
16210  * return math.asin(obj)
16211  * except:
16212  */
16213  /*else*/ {
16214  {
16215  __Pyx_PyThreadState_declare
16216  __Pyx_PyThreadState_assign
16217  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16218  __Pyx_XGOTREF(__pyx_t_6);
16219  __Pyx_XGOTREF(__pyx_t_7);
16220  __Pyx_XGOTREF(__pyx_t_8);
16221  /*try:*/ {
16222 
16223  /* "PyClical.pyx":1714
16224  * else:
16225  * try:
16226  * return math.asin(obj) # <<<<<<<<<<<<<<
16227  * except:
16228  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16229  */
16230  __Pyx_XDECREF(__pyx_r);
16231  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L4_error)
16232  __Pyx_GOTREF(__pyx_t_3);
16233  __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)
16234  __Pyx_GOTREF(__pyx_t_9);
16235  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16236  __pyx_t_3 = NULL;
16237  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16238  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16239  if (likely(__pyx_t_3)) {
16240  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16241  __Pyx_INCREF(__pyx_t_3);
16242  __Pyx_INCREF(function);
16243  __Pyx_DECREF_SET(__pyx_t_9, function);
16244  }
16245  }
16246  __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);
16247  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16248  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L4_error)
16249  __Pyx_GOTREF(__pyx_t_5);
16250  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16251  __pyx_r = __pyx_t_5;
16252  __pyx_t_5 = 0;
16253  goto __pyx_L8_try_return;
16254 
16255  /* "PyClical.pyx":1713
16256  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16257  * else:
16258  * try: # <<<<<<<<<<<<<<
16259  * return math.asin(obj)
16260  * except:
16261  */
16262  }
16263  __pyx_L4_error:;
16264  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16265  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16266  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16267 
16268  /* "PyClical.pyx":1715
16269  * try:
16270  * return math.asin(obj)
16271  * except: # <<<<<<<<<<<<<<
16272  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16273  *
16274  */
16275  /*except:*/ {
16276  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16277  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1715, __pyx_L6_except_error)
16278  __Pyx_GOTREF(__pyx_t_5);
16279  __Pyx_GOTREF(__pyx_t_9);
16280  __Pyx_GOTREF(__pyx_t_3);
16281 
16282  /* "PyClical.pyx":1716
16283  * return math.asin(obj)
16284  * except:
16285  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
16286  *
16287  * cpdef inline sinh(obj):
16288  */
16289  __Pyx_XDECREF(__pyx_r);
16290  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1716, __pyx_L6_except_error)
16291  __Pyx_GOTREF(__pyx_t_10);
16292  __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)
16293  __Pyx_GOTREF(__pyx_t_11);
16294  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16295  __pyx_r = __pyx_t_11;
16296  __pyx_t_11 = 0;
16297  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16298  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16299  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16300  goto __pyx_L7_except_return;
16301  }
16302  __pyx_L6_except_error:;
16303 
16304  /* "PyClical.pyx":1713
16305  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16306  * else:
16307  * try: # <<<<<<<<<<<<<<
16308  * return math.asin(obj)
16309  * except:
16310  */
16311  __Pyx_XGIVEREF(__pyx_t_6);
16312  __Pyx_XGIVEREF(__pyx_t_7);
16313  __Pyx_XGIVEREF(__pyx_t_8);
16314  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16315  goto __pyx_L1_error;
16316  __pyx_L8_try_return:;
16317  __Pyx_XGIVEREF(__pyx_t_6);
16318  __Pyx_XGIVEREF(__pyx_t_7);
16319  __Pyx_XGIVEREF(__pyx_t_8);
16320  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16321  goto __pyx_L0;
16322  __pyx_L7_except_return:;
16323  __Pyx_XGIVEREF(__pyx_t_6);
16324  __Pyx_XGIVEREF(__pyx_t_7);
16325  __Pyx_XGIVEREF(__pyx_t_8);
16326  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16327  goto __pyx_L0;
16328  }
16329  }
16330 
16331  /* "PyClical.pyx":1697
16332  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16333  *
16334  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
16335  * """
16336  * Inverse sine of multivector with optional complexifier.
16337  */
16338 
16339  /* function exit code */
16340  __pyx_L1_error:;
16341  __Pyx_XDECREF(__pyx_t_3);
16342  __Pyx_XDECREF(__pyx_t_5);
16343  __Pyx_XDECREF(__pyx_t_9);
16344  __Pyx_XDECREF(__pyx_t_10);
16345  __Pyx_XDECREF(__pyx_t_11);
16346  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16347  __pyx_r = 0;
16348  __pyx_L0:;
16349  __Pyx_XGIVEREF(__pyx_r);
16350  __Pyx_RefNannyFinishContext();
16351  return __pyx_r;
16352  }
16353 
16354  /* Python wrapper */
16355  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16356  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 ";
16357  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16358  PyObject *__pyx_v_obj = 0;
16359  PyObject *__pyx_v_i = 0;
16360  int __pyx_lineno = 0;
16361  const char *__pyx_filename = NULL;
16362  int __pyx_clineno = 0;
16363  PyObject *__pyx_r = 0;
16364  __Pyx_RefNannyDeclarations
16365  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
16366  {
16367  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16368  PyObject* values[2] = {0,0};
16369  values[1] = ((PyObject *)Py_None);
16370  if (unlikely(__pyx_kwds)) {
16371  Py_ssize_t kw_args;
16372  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16373  switch (pos_args) {
16374  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16375  CYTHON_FALLTHROUGH;
16376  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16377  CYTHON_FALLTHROUGH;
16378  case 0: break;
16379  default: goto __pyx_L5_argtuple_error;
16380  }
16381  kw_args = PyDict_Size(__pyx_kwds);
16382  switch (pos_args) {
16383  case 0:
16384  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16385  else goto __pyx_L5_argtuple_error;
16386  CYTHON_FALLTHROUGH;
16387  case 1:
16388  if (kw_args > 0) {
16389  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16390  if (value) { values[1] = value; kw_args--; }
16391  }
16392  }
16393  if (unlikely(kw_args > 0)) {
16394  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1697, __pyx_L3_error)
16395  }
16396  } else {
16397  switch (PyTuple_GET_SIZE(__pyx_args)) {
16398  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16399  CYTHON_FALLTHROUGH;
16400  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16401  break;
16402  default: goto __pyx_L5_argtuple_error;
16403  }
16404  }
16405  __pyx_v_obj = values[0];
16406  __pyx_v_i = values[1];
16407  }
16408  goto __pyx_L4_argument_unpacking_done;
16409  __pyx_L5_argtuple_error:;
16410  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1697, __pyx_L3_error)
16411  __pyx_L3_error:;
16412  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16413  __Pyx_RefNannyFinishContext();
16414  return NULL;
16415  __pyx_L4_argument_unpacking_done:;
16416  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
16417 
16418  /* function exit code */
16419  __Pyx_RefNannyFinishContext();
16420  return __pyx_r;
16421  }
16422 
16423  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16424  PyObject *__pyx_r = NULL;
16425  __Pyx_RefNannyDeclarations
16426  PyObject *__pyx_t_1 = NULL;
16427  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
16428  int __pyx_lineno = 0;
16429  const char *__pyx_filename = NULL;
16430  int __pyx_clineno = 0;
16431  __Pyx_RefNannySetupContext("asin", 0);
16432  __Pyx_XDECREF(__pyx_r);
16433  __pyx_t_2.__pyx_n = 1;
16434  __pyx_t_2.i = __pyx_v_i;
16435  __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)
16436  __Pyx_GOTREF(__pyx_t_1);
16437  __pyx_r = __pyx_t_1;
16438  __pyx_t_1 = 0;
16439  goto __pyx_L0;
16440 
16441  /* function exit code */
16442  __pyx_L1_error:;
16443  __Pyx_XDECREF(__pyx_t_1);
16444  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16445  __pyx_r = NULL;
16446  __pyx_L0:;
16447  __Pyx_XGIVEREF(__pyx_r);
16448  __Pyx_RefNannyFinishContext();
16449  return __pyx_r;
16450  }
16451 
16452  /* "PyClical.pyx":1718
16453  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16454  *
16455  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16456  * """
16457  * Hyperbolic sine of multivector.
16458  */
16459 
16460  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16461  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16462  PyObject *__pyx_r = NULL;
16463  __Pyx_RefNannyDeclarations
16464  PyObject *__pyx_t_1 = NULL;
16465  PyObject *__pyx_t_2 = NULL;
16466  PyObject *__pyx_t_3 = NULL;
16467  PyObject *__pyx_t_4 = NULL;
16468  PyObject *__pyx_t_5 = NULL;
16469  PyObject *__pyx_t_6 = NULL;
16470  PyObject *__pyx_t_7 = NULL;
16471  PyObject *__pyx_t_8 = NULL;
16472  int __pyx_lineno = 0;
16473  const char *__pyx_filename = NULL;
16474  int __pyx_clineno = 0;
16475  __Pyx_RefNannySetupContext("sinh", 0);
16476 
16477  /* "PyClical.pyx":1727
16478  * 0.5{1,2}
16479  * """
16480  * try: # <<<<<<<<<<<<<<
16481  * return math.sinh(obj)
16482  * except:
16483  */
16484  {
16485  __Pyx_PyThreadState_declare
16486  __Pyx_PyThreadState_assign
16487  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16488  __Pyx_XGOTREF(__pyx_t_1);
16489  __Pyx_XGOTREF(__pyx_t_2);
16490  __Pyx_XGOTREF(__pyx_t_3);
16491  /*try:*/ {
16492 
16493  /* "PyClical.pyx":1728
16494  * """
16495  * try:
16496  * return math.sinh(obj) # <<<<<<<<<<<<<<
16497  * except:
16498  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16499  */
16500  __Pyx_XDECREF(__pyx_r);
16501  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1728, __pyx_L3_error)
16502  __Pyx_GOTREF(__pyx_t_5);
16503  __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)
16504  __Pyx_GOTREF(__pyx_t_6);
16505  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16506  __pyx_t_5 = NULL;
16507  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16508  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16509  if (likely(__pyx_t_5)) {
16510  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16511  __Pyx_INCREF(__pyx_t_5);
16512  __Pyx_INCREF(function);
16513  __Pyx_DECREF_SET(__pyx_t_6, function);
16514  }
16515  }
16516  __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);
16517  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16518  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1728, __pyx_L3_error)
16519  __Pyx_GOTREF(__pyx_t_4);
16520  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16521  __pyx_r = __pyx_t_4;
16522  __pyx_t_4 = 0;
16523  goto __pyx_L7_try_return;
16524 
16525  /* "PyClical.pyx":1727
16526  * 0.5{1,2}
16527  * """
16528  * try: # <<<<<<<<<<<<<<
16529  * return math.sinh(obj)
16530  * except:
16531  */
16532  }
16533  __pyx_L3_error:;
16534  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16535  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16536  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16537 
16538  /* "PyClical.pyx":1729
16539  * try:
16540  * return math.sinh(obj)
16541  * except: # <<<<<<<<<<<<<<
16542  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16543  *
16544  */
16545  /*except:*/ {
16546  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16547  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1729, __pyx_L5_except_error)
16548  __Pyx_GOTREF(__pyx_t_4);
16549  __Pyx_GOTREF(__pyx_t_6);
16550  __Pyx_GOTREF(__pyx_t_5);
16551 
16552  /* "PyClical.pyx":1730
16553  * return math.sinh(obj)
16554  * except:
16555  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16556  *
16557  * cpdef inline asinh(obj,i = None):
16558  */
16559  __Pyx_XDECREF(__pyx_r);
16560  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1730, __pyx_L5_except_error)
16561  __Pyx_GOTREF(__pyx_t_7);
16562  __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)
16563  __Pyx_GOTREF(__pyx_t_8);
16564  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16565  __pyx_r = __pyx_t_8;
16566  __pyx_t_8 = 0;
16567  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16568  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16569  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16570  goto __pyx_L6_except_return;
16571  }
16572  __pyx_L5_except_error:;
16573 
16574  /* "PyClical.pyx":1727
16575  * 0.5{1,2}
16576  * """
16577  * try: # <<<<<<<<<<<<<<
16578  * return math.sinh(obj)
16579  * except:
16580  */
16581  __Pyx_XGIVEREF(__pyx_t_1);
16582  __Pyx_XGIVEREF(__pyx_t_2);
16583  __Pyx_XGIVEREF(__pyx_t_3);
16584  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16585  goto __pyx_L1_error;
16586  __pyx_L7_try_return:;
16587  __Pyx_XGIVEREF(__pyx_t_1);
16588  __Pyx_XGIVEREF(__pyx_t_2);
16589  __Pyx_XGIVEREF(__pyx_t_3);
16590  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16591  goto __pyx_L0;
16592  __pyx_L6_except_return:;
16593  __Pyx_XGIVEREF(__pyx_t_1);
16594  __Pyx_XGIVEREF(__pyx_t_2);
16595  __Pyx_XGIVEREF(__pyx_t_3);
16596  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16597  goto __pyx_L0;
16598  }
16599 
16600  /* "PyClical.pyx":1718
16601  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16602  *
16603  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16604  * """
16605  * Hyperbolic sine of multivector.
16606  */
16607 
16608  /* function exit code */
16609  __pyx_L1_error:;
16610  __Pyx_XDECREF(__pyx_t_4);
16611  __Pyx_XDECREF(__pyx_t_5);
16612  __Pyx_XDECREF(__pyx_t_6);
16613  __Pyx_XDECREF(__pyx_t_7);
16614  __Pyx_XDECREF(__pyx_t_8);
16615  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16616  __pyx_r = 0;
16617  __pyx_L0:;
16618  __Pyx_XGIVEREF(__pyx_r);
16619  __Pyx_RefNannyFinishContext();
16620  return __pyx_r;
16621  }
16622 
16623  /* Python wrapper */
16624  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16625  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 ";
16626  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16627  PyObject *__pyx_r = 0;
16628  __Pyx_RefNannyDeclarations
16629  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
16630  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
16631 
16632  /* function exit code */
16633  __Pyx_RefNannyFinishContext();
16634  return __pyx_r;
16635  }
16636 
16637  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16638  PyObject *__pyx_r = NULL;
16639  __Pyx_RefNannyDeclarations
16640  PyObject *__pyx_t_1 = NULL;
16641  int __pyx_lineno = 0;
16642  const char *__pyx_filename = NULL;
16643  int __pyx_clineno = 0;
16644  __Pyx_RefNannySetupContext("sinh", 0);
16645  __Pyx_XDECREF(__pyx_r);
16646  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
16647  __Pyx_GOTREF(__pyx_t_1);
16648  __pyx_r = __pyx_t_1;
16649  __pyx_t_1 = 0;
16650  goto __pyx_L0;
16651 
16652  /* function exit code */
16653  __pyx_L1_error:;
16654  __Pyx_XDECREF(__pyx_t_1);
16655  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16656  __pyx_r = NULL;
16657  __pyx_L0:;
16658  __Pyx_XGIVEREF(__pyx_r);
16659  __Pyx_RefNannyFinishContext();
16660  return __pyx_r;
16661  }
16662 
16663  /* "PyClical.pyx":1732
16664  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16665  *
16666  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16667  * """
16668  * Inverse hyperbolic sine of multivector with optional complexifier.
16669  */
16670 
16671  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16672  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) {
16673  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16674  PyObject *__pyx_r = NULL;
16675  __Pyx_RefNannyDeclarations
16676  int __pyx_t_1;
16677  int __pyx_t_2;
16678  PyObject *__pyx_t_3 = NULL;
16679  Clifford __pyx_t_4;
16680  PyObject *__pyx_t_5 = NULL;
16681  PyObject *__pyx_t_6 = NULL;
16682  PyObject *__pyx_t_7 = NULL;
16683  PyObject *__pyx_t_8 = NULL;
16684  PyObject *__pyx_t_9 = NULL;
16685  PyObject *__pyx_t_10 = NULL;
16686  PyObject *__pyx_t_11 = NULL;
16687  int __pyx_lineno = 0;
16688  const char *__pyx_filename = NULL;
16689  int __pyx_clineno = 0;
16690  __Pyx_RefNannySetupContext("asinh", 0);
16691  if (__pyx_optional_args) {
16692  if (__pyx_optional_args->__pyx_n > 0) {
16693  __pyx_v_i = __pyx_optional_args->i;
16694  }
16695  }
16696 
16697  /* "PyClical.pyx":1743
16698  * {1,2}
16699  * """
16700  * if not (i is None): # <<<<<<<<<<<<<<
16701  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16702  * else:
16703  */
16704  __pyx_t_1 = (__pyx_v_i != Py_None);
16705  __pyx_t_2 = (__pyx_t_1 != 0);
16706  if (__pyx_t_2) {
16707 
16708  /* "PyClical.pyx":1744
16709  * """
16710  * if not (i is None):
16711  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16712  * else:
16713  * try:
16714  */
16715  __Pyx_XDECREF(__pyx_r);
16716  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1744, __pyx_L1_error)
16717  __Pyx_GOTREF(__pyx_t_3);
16718  try {
16719  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16720  } catch(...) {
16721  __Pyx_CppExn2PyErr();
16722  __PYX_ERR(0, 1744, __pyx_L1_error)
16723  }
16724  __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)
16725  __Pyx_GOTREF(__pyx_t_5);
16726  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16727  __pyx_r = __pyx_t_5;
16728  __pyx_t_5 = 0;
16729  goto __pyx_L0;
16730 
16731  /* "PyClical.pyx":1743
16732  * {1,2}
16733  * """
16734  * if not (i is None): # <<<<<<<<<<<<<<
16735  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16736  * else:
16737  */
16738  }
16739 
16740  /* "PyClical.pyx":1746
16741  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16742  * else:
16743  * try: # <<<<<<<<<<<<<<
16744  * return math.asinh(obj)
16745  * except:
16746  */
16747  /*else*/ {
16748  {
16749  __Pyx_PyThreadState_declare
16750  __Pyx_PyThreadState_assign
16751  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16752  __Pyx_XGOTREF(__pyx_t_6);
16753  __Pyx_XGOTREF(__pyx_t_7);
16754  __Pyx_XGOTREF(__pyx_t_8);
16755  /*try:*/ {
16756 
16757  /* "PyClical.pyx":1747
16758  * else:
16759  * try:
16760  * return math.asinh(obj) # <<<<<<<<<<<<<<
16761  * except:
16762  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16763  */
16764  __Pyx_XDECREF(__pyx_r);
16765  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1747, __pyx_L4_error)
16766  __Pyx_GOTREF(__pyx_t_3);
16767  __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)
16768  __Pyx_GOTREF(__pyx_t_9);
16769  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16770  __pyx_t_3 = NULL;
16771  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16772  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16773  if (likely(__pyx_t_3)) {
16774  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16775  __Pyx_INCREF(__pyx_t_3);
16776  __Pyx_INCREF(function);
16777  __Pyx_DECREF_SET(__pyx_t_9, function);
16778  }
16779  }
16780  __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);
16781  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16782  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1747, __pyx_L4_error)
16783  __Pyx_GOTREF(__pyx_t_5);
16784  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16785  __pyx_r = __pyx_t_5;
16786  __pyx_t_5 = 0;
16787  goto __pyx_L8_try_return;
16788 
16789  /* "PyClical.pyx":1746
16790  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16791  * else:
16792  * try: # <<<<<<<<<<<<<<
16793  * return math.asinh(obj)
16794  * except:
16795  */
16796  }
16797  __pyx_L4_error:;
16798  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16799  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16800  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16801 
16802  /* "PyClical.pyx":1748
16803  * try:
16804  * return math.asinh(obj)
16805  * except: # <<<<<<<<<<<<<<
16806  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16807  *
16808  */
16809  /*except:*/ {
16810  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16811  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1748, __pyx_L6_except_error)
16812  __Pyx_GOTREF(__pyx_t_5);
16813  __Pyx_GOTREF(__pyx_t_9);
16814  __Pyx_GOTREF(__pyx_t_3);
16815 
16816  /* "PyClical.pyx":1749
16817  * return math.asinh(obj)
16818  * except:
16819  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16820  *
16821  * cpdef inline tan(obj,i = None):
16822  */
16823  __Pyx_XDECREF(__pyx_r);
16824  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16825  __Pyx_GOTREF(__pyx_t_10);
16826  __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)
16827  __Pyx_GOTREF(__pyx_t_11);
16828  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16829  __pyx_r = __pyx_t_11;
16830  __pyx_t_11 = 0;
16831  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16832  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16833  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16834  goto __pyx_L7_except_return;
16835  }
16836  __pyx_L6_except_error:;
16837 
16838  /* "PyClical.pyx":1746
16839  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16840  * else:
16841  * try: # <<<<<<<<<<<<<<
16842  * return math.asinh(obj)
16843  * except:
16844  */
16845  __Pyx_XGIVEREF(__pyx_t_6);
16846  __Pyx_XGIVEREF(__pyx_t_7);
16847  __Pyx_XGIVEREF(__pyx_t_8);
16848  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16849  goto __pyx_L1_error;
16850  __pyx_L8_try_return:;
16851  __Pyx_XGIVEREF(__pyx_t_6);
16852  __Pyx_XGIVEREF(__pyx_t_7);
16853  __Pyx_XGIVEREF(__pyx_t_8);
16854  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16855  goto __pyx_L0;
16856  __pyx_L7_except_return:;
16857  __Pyx_XGIVEREF(__pyx_t_6);
16858  __Pyx_XGIVEREF(__pyx_t_7);
16859  __Pyx_XGIVEREF(__pyx_t_8);
16860  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16861  goto __pyx_L0;
16862  }
16863  }
16864 
16865  /* "PyClical.pyx":1732
16866  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16867  *
16868  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16869  * """
16870  * Inverse hyperbolic sine of multivector with optional complexifier.
16871  */
16872 
16873  /* function exit code */
16874  __pyx_L1_error:;
16875  __Pyx_XDECREF(__pyx_t_3);
16876  __Pyx_XDECREF(__pyx_t_5);
16877  __Pyx_XDECREF(__pyx_t_9);
16878  __Pyx_XDECREF(__pyx_t_10);
16879  __Pyx_XDECREF(__pyx_t_11);
16880  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16881  __pyx_r = 0;
16882  __pyx_L0:;
16883  __Pyx_XGIVEREF(__pyx_r);
16884  __Pyx_RefNannyFinishContext();
16885  return __pyx_r;
16886  }
16887 
16888  /* Python wrapper */
16889  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16890  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 ";
16891  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16892  PyObject *__pyx_v_obj = 0;
16893  PyObject *__pyx_v_i = 0;
16894  int __pyx_lineno = 0;
16895  const char *__pyx_filename = NULL;
16896  int __pyx_clineno = 0;
16897  PyObject *__pyx_r = 0;
16898  __Pyx_RefNannyDeclarations
16899  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16900  {
16901  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16902  PyObject* values[2] = {0,0};
16903  values[1] = ((PyObject *)Py_None);
16904  if (unlikely(__pyx_kwds)) {
16905  Py_ssize_t kw_args;
16906  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16907  switch (pos_args) {
16908  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16909  CYTHON_FALLTHROUGH;
16910  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16911  CYTHON_FALLTHROUGH;
16912  case 0: break;
16913  default: goto __pyx_L5_argtuple_error;
16914  }
16915  kw_args = PyDict_Size(__pyx_kwds);
16916  switch (pos_args) {
16917  case 0:
16918  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16919  else goto __pyx_L5_argtuple_error;
16920  CYTHON_FALLTHROUGH;
16921  case 1:
16922  if (kw_args > 0) {
16923  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16924  if (value) { values[1] = value; kw_args--; }
16925  }
16926  }
16927  if (unlikely(kw_args > 0)) {
16928  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1732, __pyx_L3_error)
16929  }
16930  } else {
16931  switch (PyTuple_GET_SIZE(__pyx_args)) {
16932  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16933  CYTHON_FALLTHROUGH;
16934  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16935  break;
16936  default: goto __pyx_L5_argtuple_error;
16937  }
16938  }
16939  __pyx_v_obj = values[0];
16940  __pyx_v_i = values[1];
16941  }
16942  goto __pyx_L4_argument_unpacking_done;
16943  __pyx_L5_argtuple_error:;
16944  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1732, __pyx_L3_error)
16945  __pyx_L3_error:;
16946  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16947  __Pyx_RefNannyFinishContext();
16948  return NULL;
16949  __pyx_L4_argument_unpacking_done:;
16950  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16951 
16952  /* function exit code */
16953  __Pyx_RefNannyFinishContext();
16954  return __pyx_r;
16955  }
16956 
16957  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16958  PyObject *__pyx_r = NULL;
16959  __Pyx_RefNannyDeclarations
16960  PyObject *__pyx_t_1 = NULL;
16961  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16962  int __pyx_lineno = 0;
16963  const char *__pyx_filename = NULL;
16964  int __pyx_clineno = 0;
16965  __Pyx_RefNannySetupContext("asinh", 0);
16966  __Pyx_XDECREF(__pyx_r);
16967  __pyx_t_2.__pyx_n = 1;
16968  __pyx_t_2.i = __pyx_v_i;
16969  __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)
16970  __Pyx_GOTREF(__pyx_t_1);
16971  __pyx_r = __pyx_t_1;
16972  __pyx_t_1 = 0;
16973  goto __pyx_L0;
16974 
16975  /* function exit code */
16976  __pyx_L1_error:;
16977  __Pyx_XDECREF(__pyx_t_1);
16978  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16979  __pyx_r = NULL;
16980  __pyx_L0:;
16981  __Pyx_XGIVEREF(__pyx_r);
16982  __Pyx_RefNannyFinishContext();
16983  return __pyx_r;
16984  }
16985 
16986  /* "PyClical.pyx":1751
16987  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16988  *
16989  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16990  * """
16991  * Tangent of multivector with optional complexifier.
16992  */
16993 
16994  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16995  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) {
16996  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16997  PyObject *__pyx_r = NULL;
16998  __Pyx_RefNannyDeclarations
16999  int __pyx_t_1;
17000  int __pyx_t_2;
17001  PyObject *__pyx_t_3 = NULL;
17002  Clifford __pyx_t_4;
17003  PyObject *__pyx_t_5 = NULL;
17004  PyObject *__pyx_t_6 = NULL;
17005  PyObject *__pyx_t_7 = NULL;
17006  PyObject *__pyx_t_8 = NULL;
17007  PyObject *__pyx_t_9 = NULL;
17008  PyObject *__pyx_t_10 = NULL;
17009  PyObject *__pyx_t_11 = NULL;
17010  int __pyx_lineno = 0;
17011  const char *__pyx_filename = NULL;
17012  int __pyx_clineno = 0;
17013  __Pyx_RefNannySetupContext("tan", 0);
17014  if (__pyx_optional_args) {
17015  if (__pyx_optional_args->__pyx_n > 0) {
17016  __pyx_v_i = __pyx_optional_args->i;
17017  }
17018  }
17019 
17020  /* "PyClical.pyx":1760
17021  * 0.7616{1,2}
17022  * """
17023  * if not (i is None): # <<<<<<<<<<<<<<
17024  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17025  * else:
17026  */
17027  __pyx_t_1 = (__pyx_v_i != Py_None);
17028  __pyx_t_2 = (__pyx_t_1 != 0);
17029  if (__pyx_t_2) {
17030 
17031  /* "PyClical.pyx":1761
17032  * """
17033  * if not (i is None):
17034  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17035  * else:
17036  * try:
17037  */
17038  __Pyx_XDECREF(__pyx_r);
17039  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1761, __pyx_L1_error)
17040  __Pyx_GOTREF(__pyx_t_3);
17041  try {
17042  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17043  } catch(...) {
17044  __Pyx_CppExn2PyErr();
17045  __PYX_ERR(0, 1761, __pyx_L1_error)
17046  }
17047  __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)
17048  __Pyx_GOTREF(__pyx_t_5);
17049  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17050  __pyx_r = __pyx_t_5;
17051  __pyx_t_5 = 0;
17052  goto __pyx_L0;
17053 
17054  /* "PyClical.pyx":1760
17055  * 0.7616{1,2}
17056  * """
17057  * if not (i is None): # <<<<<<<<<<<<<<
17058  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17059  * else:
17060  */
17061  }
17062 
17063  /* "PyClical.pyx":1763
17064  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17065  * else:
17066  * try: # <<<<<<<<<<<<<<
17067  * return math.tan(obj)
17068  * except:
17069  */
17070  /*else*/ {
17071  {
17072  __Pyx_PyThreadState_declare
17073  __Pyx_PyThreadState_assign
17074  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17075  __Pyx_XGOTREF(__pyx_t_6);
17076  __Pyx_XGOTREF(__pyx_t_7);
17077  __Pyx_XGOTREF(__pyx_t_8);
17078  /*try:*/ {
17079 
17080  /* "PyClical.pyx":1764
17081  * else:
17082  * try:
17083  * return math.tan(obj) # <<<<<<<<<<<<<<
17084  * except:
17085  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17086  */
17087  __Pyx_XDECREF(__pyx_r);
17088  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1764, __pyx_L4_error)
17089  __Pyx_GOTREF(__pyx_t_3);
17090  __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)
17091  __Pyx_GOTREF(__pyx_t_9);
17092  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17093  __pyx_t_3 = NULL;
17094  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17095  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17096  if (likely(__pyx_t_3)) {
17097  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17098  __Pyx_INCREF(__pyx_t_3);
17099  __Pyx_INCREF(function);
17100  __Pyx_DECREF_SET(__pyx_t_9, function);
17101  }
17102  }
17103  __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);
17104  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17105  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1764, __pyx_L4_error)
17106  __Pyx_GOTREF(__pyx_t_5);
17107  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17108  __pyx_r = __pyx_t_5;
17109  __pyx_t_5 = 0;
17110  goto __pyx_L8_try_return;
17111 
17112  /* "PyClical.pyx":1763
17113  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17114  * else:
17115  * try: # <<<<<<<<<<<<<<
17116  * return math.tan(obj)
17117  * except:
17118  */
17119  }
17120  __pyx_L4_error:;
17121  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17122  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17123  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17124 
17125  /* "PyClical.pyx":1765
17126  * try:
17127  * return math.tan(obj)
17128  * except: # <<<<<<<<<<<<<<
17129  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17130  *
17131  */
17132  /*except:*/ {
17133  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17134  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1765, __pyx_L6_except_error)
17135  __Pyx_GOTREF(__pyx_t_5);
17136  __Pyx_GOTREF(__pyx_t_9);
17137  __Pyx_GOTREF(__pyx_t_3);
17138 
17139  /* "PyClical.pyx":1766
17140  * return math.tan(obj)
17141  * except:
17142  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17143  *
17144  * cpdef inline atan(obj,i = None):
17145  */
17146  __Pyx_XDECREF(__pyx_r);
17147  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1766, __pyx_L6_except_error)
17148  __Pyx_GOTREF(__pyx_t_10);
17149  __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)
17150  __Pyx_GOTREF(__pyx_t_11);
17151  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17152  __pyx_r = __pyx_t_11;
17153  __pyx_t_11 = 0;
17154  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17155  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17156  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17157  goto __pyx_L7_except_return;
17158  }
17159  __pyx_L6_except_error:;
17160 
17161  /* "PyClical.pyx":1763
17162  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17163  * else:
17164  * try: # <<<<<<<<<<<<<<
17165  * return math.tan(obj)
17166  * except:
17167  */
17168  __Pyx_XGIVEREF(__pyx_t_6);
17169  __Pyx_XGIVEREF(__pyx_t_7);
17170  __Pyx_XGIVEREF(__pyx_t_8);
17171  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17172  goto __pyx_L1_error;
17173  __pyx_L8_try_return:;
17174  __Pyx_XGIVEREF(__pyx_t_6);
17175  __Pyx_XGIVEREF(__pyx_t_7);
17176  __Pyx_XGIVEREF(__pyx_t_8);
17177  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17178  goto __pyx_L0;
17179  __pyx_L7_except_return:;
17180  __Pyx_XGIVEREF(__pyx_t_6);
17181  __Pyx_XGIVEREF(__pyx_t_7);
17182  __Pyx_XGIVEREF(__pyx_t_8);
17183  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17184  goto __pyx_L0;
17185  }
17186  }
17187 
17188  /* "PyClical.pyx":1751
17189  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
17190  *
17191  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
17192  * """
17193  * Tangent of multivector with optional complexifier.
17194  */
17195 
17196  /* function exit code */
17197  __pyx_L1_error:;
17198  __Pyx_XDECREF(__pyx_t_3);
17199  __Pyx_XDECREF(__pyx_t_5);
17200  __Pyx_XDECREF(__pyx_t_9);
17201  __Pyx_XDECREF(__pyx_t_10);
17202  __Pyx_XDECREF(__pyx_t_11);
17203  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17204  __pyx_r = 0;
17205  __pyx_L0:;
17206  __Pyx_XGIVEREF(__pyx_r);
17207  __Pyx_RefNannyFinishContext();
17208  return __pyx_r;
17209  }
17210 
17211  /* Python wrapper */
17212  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17213  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 ";
17214  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17215  PyObject *__pyx_v_obj = 0;
17216  PyObject *__pyx_v_i = 0;
17217  int __pyx_lineno = 0;
17218  const char *__pyx_filename = NULL;
17219  int __pyx_clineno = 0;
17220  PyObject *__pyx_r = 0;
17221  __Pyx_RefNannyDeclarations
17222  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
17223  {
17224  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17225  PyObject* values[2] = {0,0};
17226  values[1] = ((PyObject *)Py_None);
17227  if (unlikely(__pyx_kwds)) {
17228  Py_ssize_t kw_args;
17229  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17230  switch (pos_args) {
17231  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17232  CYTHON_FALLTHROUGH;
17233  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17234  CYTHON_FALLTHROUGH;
17235  case 0: break;
17236  default: goto __pyx_L5_argtuple_error;
17237  }
17238  kw_args = PyDict_Size(__pyx_kwds);
17239  switch (pos_args) {
17240  case 0:
17241  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17242  else goto __pyx_L5_argtuple_error;
17243  CYTHON_FALLTHROUGH;
17244  case 1:
17245  if (kw_args > 0) {
17246  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17247  if (value) { values[1] = value; kw_args--; }
17248  }
17249  }
17250  if (unlikely(kw_args > 0)) {
17251  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1751, __pyx_L3_error)
17252  }
17253  } else {
17254  switch (PyTuple_GET_SIZE(__pyx_args)) {
17255  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17256  CYTHON_FALLTHROUGH;
17257  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17258  break;
17259  default: goto __pyx_L5_argtuple_error;
17260  }
17261  }
17262  __pyx_v_obj = values[0];
17263  __pyx_v_i = values[1];
17264  }
17265  goto __pyx_L4_argument_unpacking_done;
17266  __pyx_L5_argtuple_error:;
17267  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1751, __pyx_L3_error)
17268  __pyx_L3_error:;
17269  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17270  __Pyx_RefNannyFinishContext();
17271  return NULL;
17272  __pyx_L4_argument_unpacking_done:;
17273  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17274 
17275  /* function exit code */
17276  __Pyx_RefNannyFinishContext();
17277  return __pyx_r;
17278  }
17279 
17280  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17281  PyObject *__pyx_r = NULL;
17282  __Pyx_RefNannyDeclarations
17283  PyObject *__pyx_t_1 = NULL;
17284  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
17285  int __pyx_lineno = 0;
17286  const char *__pyx_filename = NULL;
17287  int __pyx_clineno = 0;
17288  __Pyx_RefNannySetupContext("tan", 0);
17289  __Pyx_XDECREF(__pyx_r);
17290  __pyx_t_2.__pyx_n = 1;
17291  __pyx_t_2.i = __pyx_v_i;
17292  __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)
17293  __Pyx_GOTREF(__pyx_t_1);
17294  __pyx_r = __pyx_t_1;
17295  __pyx_t_1 = 0;
17296  goto __pyx_L0;
17297 
17298  /* function exit code */
17299  __pyx_L1_error:;
17300  __Pyx_XDECREF(__pyx_t_1);
17301  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17302  __pyx_r = NULL;
17303  __pyx_L0:;
17304  __Pyx_XGIVEREF(__pyx_r);
17305  __Pyx_RefNannyFinishContext();
17306  return __pyx_r;
17307  }
17308 
17309  /* "PyClical.pyx":1768
17310  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17311  *
17312  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17313  * """
17314  * Inverse tangent of multivector with optional complexifier.
17315  */
17316 
17317  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17318  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) {
17319  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17320  PyObject *__pyx_r = NULL;
17321  __Pyx_RefNannyDeclarations
17322  int __pyx_t_1;
17323  int __pyx_t_2;
17324  PyObject *__pyx_t_3 = NULL;
17325  Clifford __pyx_t_4;
17326  PyObject *__pyx_t_5 = NULL;
17327  PyObject *__pyx_t_6 = NULL;
17328  PyObject *__pyx_t_7 = NULL;
17329  PyObject *__pyx_t_8 = NULL;
17330  PyObject *__pyx_t_9 = NULL;
17331  PyObject *__pyx_t_10 = NULL;
17332  PyObject *__pyx_t_11 = NULL;
17333  int __pyx_lineno = 0;
17334  const char *__pyx_filename = NULL;
17335  int __pyx_clineno = 0;
17336  __Pyx_RefNannySetupContext("atan", 0);
17337  if (__pyx_optional_args) {
17338  if (__pyx_optional_args->__pyx_n > 0) {
17339  __pyx_v_i = __pyx_optional_args->i;
17340  }
17341  }
17342 
17343  /* "PyClical.pyx":1777
17344  * {1}
17345  * """
17346  * if not (i is None): # <<<<<<<<<<<<<<
17347  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17348  * else:
17349  */
17350  __pyx_t_1 = (__pyx_v_i != Py_None);
17351  __pyx_t_2 = (__pyx_t_1 != 0);
17352  if (__pyx_t_2) {
17353 
17354  /* "PyClical.pyx":1778
17355  * """
17356  * if not (i is None):
17357  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17358  * else:
17359  * try:
17360  */
17361  __Pyx_XDECREF(__pyx_r);
17362  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1778, __pyx_L1_error)
17363  __Pyx_GOTREF(__pyx_t_3);
17364  try {
17365  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17366  } catch(...) {
17367  __Pyx_CppExn2PyErr();
17368  __PYX_ERR(0, 1778, __pyx_L1_error)
17369  }
17370  __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)
17371  __Pyx_GOTREF(__pyx_t_5);
17372  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17373  __pyx_r = __pyx_t_5;
17374  __pyx_t_5 = 0;
17375  goto __pyx_L0;
17376 
17377  /* "PyClical.pyx":1777
17378  * {1}
17379  * """
17380  * if not (i is None): # <<<<<<<<<<<<<<
17381  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17382  * else:
17383  */
17384  }
17385 
17386  /* "PyClical.pyx":1780
17387  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17388  * else:
17389  * try: # <<<<<<<<<<<<<<
17390  * return math.atan(obj)
17391  * except:
17392  */
17393  /*else*/ {
17394  {
17395  __Pyx_PyThreadState_declare
17396  __Pyx_PyThreadState_assign
17397  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17398  __Pyx_XGOTREF(__pyx_t_6);
17399  __Pyx_XGOTREF(__pyx_t_7);
17400  __Pyx_XGOTREF(__pyx_t_8);
17401  /*try:*/ {
17402 
17403  /* "PyClical.pyx":1781
17404  * else:
17405  * try:
17406  * return math.atan(obj) # <<<<<<<<<<<<<<
17407  * except:
17408  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17409  */
17410  __Pyx_XDECREF(__pyx_r);
17411  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L4_error)
17412  __Pyx_GOTREF(__pyx_t_3);
17413  __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)
17414  __Pyx_GOTREF(__pyx_t_9);
17415  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17416  __pyx_t_3 = NULL;
17417  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17418  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17419  if (likely(__pyx_t_3)) {
17420  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17421  __Pyx_INCREF(__pyx_t_3);
17422  __Pyx_INCREF(function);
17423  __Pyx_DECREF_SET(__pyx_t_9, function);
17424  }
17425  }
17426  __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);
17427  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17428  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1781, __pyx_L4_error)
17429  __Pyx_GOTREF(__pyx_t_5);
17430  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17431  __pyx_r = __pyx_t_5;
17432  __pyx_t_5 = 0;
17433  goto __pyx_L8_try_return;
17434 
17435  /* "PyClical.pyx":1780
17436  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17437  * else:
17438  * try: # <<<<<<<<<<<<<<
17439  * return math.atan(obj)
17440  * except:
17441  */
17442  }
17443  __pyx_L4_error:;
17444  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17445  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17446  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17447 
17448  /* "PyClical.pyx":1782
17449  * try:
17450  * return math.atan(obj)
17451  * except: # <<<<<<<<<<<<<<
17452  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17453  *
17454  */
17455  /*except:*/ {
17456  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17457  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1782, __pyx_L6_except_error)
17458  __Pyx_GOTREF(__pyx_t_5);
17459  __Pyx_GOTREF(__pyx_t_9);
17460  __Pyx_GOTREF(__pyx_t_3);
17461 
17462  /* "PyClical.pyx":1783
17463  * return math.atan(obj)
17464  * except:
17465  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17466  *
17467  * cpdef inline tanh(obj):
17468  */
17469  __Pyx_XDECREF(__pyx_r);
17470  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1783, __pyx_L6_except_error)
17471  __Pyx_GOTREF(__pyx_t_10);
17472  __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)
17473  __Pyx_GOTREF(__pyx_t_11);
17474  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17475  __pyx_r = __pyx_t_11;
17476  __pyx_t_11 = 0;
17477  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17478  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17479  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17480  goto __pyx_L7_except_return;
17481  }
17482  __pyx_L6_except_error:;
17483 
17484  /* "PyClical.pyx":1780
17485  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17486  * else:
17487  * try: # <<<<<<<<<<<<<<
17488  * return math.atan(obj)
17489  * except:
17490  */
17491  __Pyx_XGIVEREF(__pyx_t_6);
17492  __Pyx_XGIVEREF(__pyx_t_7);
17493  __Pyx_XGIVEREF(__pyx_t_8);
17494  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17495  goto __pyx_L1_error;
17496  __pyx_L8_try_return:;
17497  __Pyx_XGIVEREF(__pyx_t_6);
17498  __Pyx_XGIVEREF(__pyx_t_7);
17499  __Pyx_XGIVEREF(__pyx_t_8);
17500  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17501  goto __pyx_L0;
17502  __pyx_L7_except_return:;
17503  __Pyx_XGIVEREF(__pyx_t_6);
17504  __Pyx_XGIVEREF(__pyx_t_7);
17505  __Pyx_XGIVEREF(__pyx_t_8);
17506  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17507  goto __pyx_L0;
17508  }
17509  }
17510 
17511  /* "PyClical.pyx":1768
17512  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17513  *
17514  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17515  * """
17516  * Inverse tangent of multivector with optional complexifier.
17517  */
17518 
17519  /* function exit code */
17520  __pyx_L1_error:;
17521  __Pyx_XDECREF(__pyx_t_3);
17522  __Pyx_XDECREF(__pyx_t_5);
17523  __Pyx_XDECREF(__pyx_t_9);
17524  __Pyx_XDECREF(__pyx_t_10);
17525  __Pyx_XDECREF(__pyx_t_11);
17526  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17527  __pyx_r = 0;
17528  __pyx_L0:;
17529  __Pyx_XGIVEREF(__pyx_r);
17530  __Pyx_RefNannyFinishContext();
17531  return __pyx_r;
17532  }
17533 
17534  /* Python wrapper */
17535  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17536  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 ";
17537  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17538  PyObject *__pyx_v_obj = 0;
17539  PyObject *__pyx_v_i = 0;
17540  int __pyx_lineno = 0;
17541  const char *__pyx_filename = NULL;
17542  int __pyx_clineno = 0;
17543  PyObject *__pyx_r = 0;
17544  __Pyx_RefNannyDeclarations
17545  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
17546  {
17547  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17548  PyObject* values[2] = {0,0};
17549  values[1] = ((PyObject *)Py_None);
17550  if (unlikely(__pyx_kwds)) {
17551  Py_ssize_t kw_args;
17552  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17553  switch (pos_args) {
17554  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17555  CYTHON_FALLTHROUGH;
17556  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17557  CYTHON_FALLTHROUGH;
17558  case 0: break;
17559  default: goto __pyx_L5_argtuple_error;
17560  }
17561  kw_args = PyDict_Size(__pyx_kwds);
17562  switch (pos_args) {
17563  case 0:
17564  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17565  else goto __pyx_L5_argtuple_error;
17566  CYTHON_FALLTHROUGH;
17567  case 1:
17568  if (kw_args > 0) {
17569  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17570  if (value) { values[1] = value; kw_args--; }
17571  }
17572  }
17573  if (unlikely(kw_args > 0)) {
17574  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1768, __pyx_L3_error)
17575  }
17576  } else {
17577  switch (PyTuple_GET_SIZE(__pyx_args)) {
17578  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17579  CYTHON_FALLTHROUGH;
17580  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17581  break;
17582  default: goto __pyx_L5_argtuple_error;
17583  }
17584  }
17585  __pyx_v_obj = values[0];
17586  __pyx_v_i = values[1];
17587  }
17588  goto __pyx_L4_argument_unpacking_done;
17589  __pyx_L5_argtuple_error:;
17590  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1768, __pyx_L3_error)
17591  __pyx_L3_error:;
17592  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17593  __Pyx_RefNannyFinishContext();
17594  return NULL;
17595  __pyx_L4_argument_unpacking_done:;
17596  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17597 
17598  /* function exit code */
17599  __Pyx_RefNannyFinishContext();
17600  return __pyx_r;
17601  }
17602 
17603  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17604  PyObject *__pyx_r = NULL;
17605  __Pyx_RefNannyDeclarations
17606  PyObject *__pyx_t_1 = NULL;
17607  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
17608  int __pyx_lineno = 0;
17609  const char *__pyx_filename = NULL;
17610  int __pyx_clineno = 0;
17611  __Pyx_RefNannySetupContext("atan", 0);
17612  __Pyx_XDECREF(__pyx_r);
17613  __pyx_t_2.__pyx_n = 1;
17614  __pyx_t_2.i = __pyx_v_i;
17615  __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)
17616  __Pyx_GOTREF(__pyx_t_1);
17617  __pyx_r = __pyx_t_1;
17618  __pyx_t_1 = 0;
17619  goto __pyx_L0;
17620 
17621  /* function exit code */
17622  __pyx_L1_error:;
17623  __Pyx_XDECREF(__pyx_t_1);
17624  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17625  __pyx_r = NULL;
17626  __pyx_L0:;
17627  __Pyx_XGIVEREF(__pyx_r);
17628  __Pyx_RefNannyFinishContext();
17629  return __pyx_r;
17630  }
17631 
17632  /* "PyClical.pyx":1785
17633  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17634  *
17635  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17636  * """
17637  * Hyperbolic tangent of multivector.
17638  */
17639 
17640  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17641  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17642  PyObject *__pyx_r = NULL;
17643  __Pyx_RefNannyDeclarations
17644  PyObject *__pyx_t_1 = NULL;
17645  PyObject *__pyx_t_2 = NULL;
17646  PyObject *__pyx_t_3 = NULL;
17647  PyObject *__pyx_t_4 = NULL;
17648  PyObject *__pyx_t_5 = NULL;
17649  PyObject *__pyx_t_6 = NULL;
17650  PyObject *__pyx_t_7 = NULL;
17651  PyObject *__pyx_t_8 = NULL;
17652  int __pyx_lineno = 0;
17653  const char *__pyx_filename = NULL;
17654  int __pyx_clineno = 0;
17655  __Pyx_RefNannySetupContext("tanh", 0);
17656 
17657  /* "PyClical.pyx":1792
17658  * {1,2}
17659  * """
17660  * try: # <<<<<<<<<<<<<<
17661  * return math.tanh(obj)
17662  * except:
17663  */
17664  {
17665  __Pyx_PyThreadState_declare
17666  __Pyx_PyThreadState_assign
17667  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
17668  __Pyx_XGOTREF(__pyx_t_1);
17669  __Pyx_XGOTREF(__pyx_t_2);
17670  __Pyx_XGOTREF(__pyx_t_3);
17671  /*try:*/ {
17672 
17673  /* "PyClical.pyx":1793
17674  * """
17675  * try:
17676  * return math.tanh(obj) # <<<<<<<<<<<<<<
17677  * except:
17678  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17679  */
17680  __Pyx_XDECREF(__pyx_r);
17681  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1793, __pyx_L3_error)
17682  __Pyx_GOTREF(__pyx_t_5);
17683  __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)
17684  __Pyx_GOTREF(__pyx_t_6);
17685  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17686  __pyx_t_5 = NULL;
17687  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17688  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
17689  if (likely(__pyx_t_5)) {
17690  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17691  __Pyx_INCREF(__pyx_t_5);
17692  __Pyx_INCREF(function);
17693  __Pyx_DECREF_SET(__pyx_t_6, function);
17694  }
17695  }
17696  __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);
17697  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17698  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1793, __pyx_L3_error)
17699  __Pyx_GOTREF(__pyx_t_4);
17700  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17701  __pyx_r = __pyx_t_4;
17702  __pyx_t_4 = 0;
17703  goto __pyx_L7_try_return;
17704 
17705  /* "PyClical.pyx":1792
17706  * {1,2}
17707  * """
17708  * try: # <<<<<<<<<<<<<<
17709  * return math.tanh(obj)
17710  * except:
17711  */
17712  }
17713  __pyx_L3_error:;
17714  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17715  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17716  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17717 
17718  /* "PyClical.pyx":1794
17719  * try:
17720  * return math.tanh(obj)
17721  * except: # <<<<<<<<<<<<<<
17722  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17723  *
17724  */
17725  /*except:*/ {
17726  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17727  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1794, __pyx_L5_except_error)
17728  __Pyx_GOTREF(__pyx_t_4);
17729  __Pyx_GOTREF(__pyx_t_6);
17730  __Pyx_GOTREF(__pyx_t_5);
17731 
17732  /* "PyClical.pyx":1795
17733  * return math.tanh(obj)
17734  * except:
17735  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17736  *
17737  * cpdef inline atanh(obj,i = None):
17738  */
17739  __Pyx_XDECREF(__pyx_r);
17740  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1795, __pyx_L5_except_error)
17741  __Pyx_GOTREF(__pyx_t_7);
17742  __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)
17743  __Pyx_GOTREF(__pyx_t_8);
17744  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17745  __pyx_r = __pyx_t_8;
17746  __pyx_t_8 = 0;
17747  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17748  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17749  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17750  goto __pyx_L6_except_return;
17751  }
17752  __pyx_L5_except_error:;
17753 
17754  /* "PyClical.pyx":1792
17755  * {1,2}
17756  * """
17757  * try: # <<<<<<<<<<<<<<
17758  * return math.tanh(obj)
17759  * except:
17760  */
17761  __Pyx_XGIVEREF(__pyx_t_1);
17762  __Pyx_XGIVEREF(__pyx_t_2);
17763  __Pyx_XGIVEREF(__pyx_t_3);
17764  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17765  goto __pyx_L1_error;
17766  __pyx_L7_try_return:;
17767  __Pyx_XGIVEREF(__pyx_t_1);
17768  __Pyx_XGIVEREF(__pyx_t_2);
17769  __Pyx_XGIVEREF(__pyx_t_3);
17770  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17771  goto __pyx_L0;
17772  __pyx_L6_except_return:;
17773  __Pyx_XGIVEREF(__pyx_t_1);
17774  __Pyx_XGIVEREF(__pyx_t_2);
17775  __Pyx_XGIVEREF(__pyx_t_3);
17776  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17777  goto __pyx_L0;
17778  }
17779 
17780  /* "PyClical.pyx":1785
17781  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17782  *
17783  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17784  * """
17785  * Hyperbolic tangent of multivector.
17786  */
17787 
17788  /* function exit code */
17789  __pyx_L1_error:;
17790  __Pyx_XDECREF(__pyx_t_4);
17791  __Pyx_XDECREF(__pyx_t_5);
17792  __Pyx_XDECREF(__pyx_t_6);
17793  __Pyx_XDECREF(__pyx_t_7);
17794  __Pyx_XDECREF(__pyx_t_8);
17795  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17796  __pyx_r = 0;
17797  __pyx_L0:;
17798  __Pyx_XGIVEREF(__pyx_r);
17799  __Pyx_RefNannyFinishContext();
17800  return __pyx_r;
17801  }
17802 
17803  /* Python wrapper */
17804  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17805  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 ";
17806  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17807  PyObject *__pyx_r = 0;
17808  __Pyx_RefNannyDeclarations
17809  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17810  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17811 
17812  /* function exit code */
17813  __Pyx_RefNannyFinishContext();
17814  return __pyx_r;
17815  }
17816 
17817  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17818  PyObject *__pyx_r = NULL;
17819  __Pyx_RefNannyDeclarations
17820  PyObject *__pyx_t_1 = NULL;
17821  int __pyx_lineno = 0;
17822  const char *__pyx_filename = NULL;
17823  int __pyx_clineno = 0;
17824  __Pyx_RefNannySetupContext("tanh", 0);
17825  __Pyx_XDECREF(__pyx_r);
17826  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error)
17827  __Pyx_GOTREF(__pyx_t_1);
17828  __pyx_r = __pyx_t_1;
17829  __pyx_t_1 = 0;
17830  goto __pyx_L0;
17831 
17832  /* function exit code */
17833  __pyx_L1_error:;
17834  __Pyx_XDECREF(__pyx_t_1);
17835  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17836  __pyx_r = NULL;
17837  __pyx_L0:;
17838  __Pyx_XGIVEREF(__pyx_r);
17839  __Pyx_RefNannyFinishContext();
17840  return __pyx_r;
17841  }
17842 
17843  /* "PyClical.pyx":1797
17844  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17845  *
17846  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17847  * """
17848  * Inverse hyperbolic tangent of multivector with optional complexifier.
17849  */
17850 
17851  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17852  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) {
17853  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17854  PyObject *__pyx_r = NULL;
17855  __Pyx_RefNannyDeclarations
17856  int __pyx_t_1;
17857  int __pyx_t_2;
17858  PyObject *__pyx_t_3 = NULL;
17859  Clifford __pyx_t_4;
17860  PyObject *__pyx_t_5 = NULL;
17861  PyObject *__pyx_t_6 = NULL;
17862  PyObject *__pyx_t_7 = NULL;
17863  PyObject *__pyx_t_8 = NULL;
17864  PyObject *__pyx_t_9 = NULL;
17865  PyObject *__pyx_t_10 = NULL;
17866  PyObject *__pyx_t_11 = NULL;
17867  int __pyx_lineno = 0;
17868  const char *__pyx_filename = NULL;
17869  int __pyx_clineno = 0;
17870  __Pyx_RefNannySetupContext("atanh", 0);
17871  if (__pyx_optional_args) {
17872  if (__pyx_optional_args->__pyx_n > 0) {
17873  __pyx_v_i = __pyx_optional_args->i;
17874  }
17875  }
17876 
17877  /* "PyClical.pyx":1806
17878  * {1,2}
17879  * """
17880  * if not (i is None): # <<<<<<<<<<<<<<
17881  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17882  * else:
17883  */
17884  __pyx_t_1 = (__pyx_v_i != Py_None);
17885  __pyx_t_2 = (__pyx_t_1 != 0);
17886  if (__pyx_t_2) {
17887 
17888  /* "PyClical.pyx":1807
17889  * """
17890  * if not (i is None):
17891  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17892  * else:
17893  * try:
17894  */
17895  __Pyx_XDECREF(__pyx_r);
17896  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1807, __pyx_L1_error)
17897  __Pyx_GOTREF(__pyx_t_3);
17898  try {
17899  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17900  } catch(...) {
17901  __Pyx_CppExn2PyErr();
17902  __PYX_ERR(0, 1807, __pyx_L1_error)
17903  }
17904  __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)
17905  __Pyx_GOTREF(__pyx_t_5);
17906  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17907  __pyx_r = __pyx_t_5;
17908  __pyx_t_5 = 0;
17909  goto __pyx_L0;
17910 
17911  /* "PyClical.pyx":1806
17912  * {1,2}
17913  * """
17914  * if not (i is None): # <<<<<<<<<<<<<<
17915  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17916  * else:
17917  */
17918  }
17919 
17920  /* "PyClical.pyx":1809
17921  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17922  * else:
17923  * try: # <<<<<<<<<<<<<<
17924  * return math.atanh(obj)
17925  * except:
17926  */
17927  /*else*/ {
17928  {
17929  __Pyx_PyThreadState_declare
17930  __Pyx_PyThreadState_assign
17931  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17932  __Pyx_XGOTREF(__pyx_t_6);
17933  __Pyx_XGOTREF(__pyx_t_7);
17934  __Pyx_XGOTREF(__pyx_t_8);
17935  /*try:*/ {
17936 
17937  /* "PyClical.pyx":1810
17938  * else:
17939  * try:
17940  * return math.atanh(obj) # <<<<<<<<<<<<<<
17941  * except:
17942  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17943  */
17944  __Pyx_XDECREF(__pyx_r);
17945  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1810, __pyx_L4_error)
17946  __Pyx_GOTREF(__pyx_t_3);
17947  __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)
17948  __Pyx_GOTREF(__pyx_t_9);
17949  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17950  __pyx_t_3 = NULL;
17951  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17952  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17953  if (likely(__pyx_t_3)) {
17954  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17955  __Pyx_INCREF(__pyx_t_3);
17956  __Pyx_INCREF(function);
17957  __Pyx_DECREF_SET(__pyx_t_9, function);
17958  }
17959  }
17960  __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);
17961  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17962  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1810, __pyx_L4_error)
17963  __Pyx_GOTREF(__pyx_t_5);
17964  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17965  __pyx_r = __pyx_t_5;
17966  __pyx_t_5 = 0;
17967  goto __pyx_L8_try_return;
17968 
17969  /* "PyClical.pyx":1809
17970  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17971  * else:
17972  * try: # <<<<<<<<<<<<<<
17973  * return math.atanh(obj)
17974  * except:
17975  */
17976  }
17977  __pyx_L4_error:;
17978  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17979  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17980  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17981 
17982  /* "PyClical.pyx":1811
17983  * try:
17984  * return math.atanh(obj)
17985  * except: # <<<<<<<<<<<<<<
17986  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17987  *
17988  */
17989  /*except:*/ {
17990  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17991  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1811, __pyx_L6_except_error)
17992  __Pyx_GOTREF(__pyx_t_5);
17993  __Pyx_GOTREF(__pyx_t_9);
17994  __Pyx_GOTREF(__pyx_t_3);
17995 
17996  /* "PyClical.pyx":1812
17997  * return math.atanh(obj)
17998  * except:
17999  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
18000  *
18001  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
18002  */
18003  __Pyx_XDECREF(__pyx_r);
18004  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1812, __pyx_L6_except_error)
18005  __Pyx_GOTREF(__pyx_t_10);
18006  __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)
18007  __Pyx_GOTREF(__pyx_t_11);
18008  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18009  __pyx_r = __pyx_t_11;
18010  __pyx_t_11 = 0;
18011  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18012  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18013  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18014  goto __pyx_L7_except_return;
18015  }
18016  __pyx_L6_except_error:;
18017 
18018  /* "PyClical.pyx":1809
18019  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
18020  * else:
18021  * try: # <<<<<<<<<<<<<<
18022  * return math.atanh(obj)
18023  * except:
18024  */
18025  __Pyx_XGIVEREF(__pyx_t_6);
18026  __Pyx_XGIVEREF(__pyx_t_7);
18027  __Pyx_XGIVEREF(__pyx_t_8);
18028  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18029  goto __pyx_L1_error;
18030  __pyx_L8_try_return:;
18031  __Pyx_XGIVEREF(__pyx_t_6);
18032  __Pyx_XGIVEREF(__pyx_t_7);
18033  __Pyx_XGIVEREF(__pyx_t_8);
18034  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18035  goto __pyx_L0;
18036  __pyx_L7_except_return:;
18037  __Pyx_XGIVEREF(__pyx_t_6);
18038  __Pyx_XGIVEREF(__pyx_t_7);
18039  __Pyx_XGIVEREF(__pyx_t_8);
18040  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18041  goto __pyx_L0;
18042  }
18043  }
18044 
18045  /* "PyClical.pyx":1797
18046  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
18047  *
18048  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
18049  * """
18050  * Inverse hyperbolic tangent of multivector with optional complexifier.
18051  */
18052 
18053  /* function exit code */
18054  __pyx_L1_error:;
18055  __Pyx_XDECREF(__pyx_t_3);
18056  __Pyx_XDECREF(__pyx_t_5);
18057  __Pyx_XDECREF(__pyx_t_9);
18058  __Pyx_XDECREF(__pyx_t_10);
18059  __Pyx_XDECREF(__pyx_t_11);
18060  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18061  __pyx_r = 0;
18062  __pyx_L0:;
18063  __Pyx_XGIVEREF(__pyx_r);
18064  __Pyx_RefNannyFinishContext();
18065  return __pyx_r;
18066  }
18067 
18068  /* Python wrapper */
18069  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18070  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 ";
18071  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18072  PyObject *__pyx_v_obj = 0;
18073  PyObject *__pyx_v_i = 0;
18074  int __pyx_lineno = 0;
18075  const char *__pyx_filename = NULL;
18076  int __pyx_clineno = 0;
18077  PyObject *__pyx_r = 0;
18078  __Pyx_RefNannyDeclarations
18079  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
18080  {
18081  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
18082  PyObject* values[2] = {0,0};
18083  values[1] = ((PyObject *)Py_None);
18084  if (unlikely(__pyx_kwds)) {
18085  Py_ssize_t kw_args;
18086  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18087  switch (pos_args) {
18088  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18089  CYTHON_FALLTHROUGH;
18090  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18091  CYTHON_FALLTHROUGH;
18092  case 0: break;
18093  default: goto __pyx_L5_argtuple_error;
18094  }
18095  kw_args = PyDict_Size(__pyx_kwds);
18096  switch (pos_args) {
18097  case 0:
18098  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
18099  else goto __pyx_L5_argtuple_error;
18100  CYTHON_FALLTHROUGH;
18101  case 1:
18102  if (kw_args > 0) {
18103  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
18104  if (value) { values[1] = value; kw_args--; }
18105  }
18106  }
18107  if (unlikely(kw_args > 0)) {
18108  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1797, __pyx_L3_error)
18109  }
18110  } else {
18111  switch (PyTuple_GET_SIZE(__pyx_args)) {
18112  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18113  CYTHON_FALLTHROUGH;
18114  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18115  break;
18116  default: goto __pyx_L5_argtuple_error;
18117  }
18118  }
18119  __pyx_v_obj = values[0];
18120  __pyx_v_i = values[1];
18121  }
18122  goto __pyx_L4_argument_unpacking_done;
18123  __pyx_L5_argtuple_error:;
18124  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1797, __pyx_L3_error)
18125  __pyx_L3_error:;
18126  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18127  __Pyx_RefNannyFinishContext();
18128  return NULL;
18129  __pyx_L4_argument_unpacking_done:;
18130  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
18131 
18132  /* function exit code */
18133  __Pyx_RefNannyFinishContext();
18134  return __pyx_r;
18135  }
18136 
18137  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
18138  PyObject *__pyx_r = NULL;
18139  __Pyx_RefNannyDeclarations
18140  PyObject *__pyx_t_1 = NULL;
18141  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
18142  int __pyx_lineno = 0;
18143  const char *__pyx_filename = NULL;
18144  int __pyx_clineno = 0;
18145  __Pyx_RefNannySetupContext("atanh", 0);
18146  __Pyx_XDECREF(__pyx_r);
18147  __pyx_t_2.__pyx_n = 1;
18148  __pyx_t_2.i = __pyx_v_i;
18149  __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)
18150  __Pyx_GOTREF(__pyx_t_1);
18151  __pyx_r = __pyx_t_1;
18152  __pyx_t_1 = 0;
18153  goto __pyx_L0;
18154 
18155  /* function exit code */
18156  __pyx_L1_error:;
18157  __Pyx_XDECREF(__pyx_t_1);
18158  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18159  __pyx_r = NULL;
18160  __pyx_L0:;
18161  __Pyx_XGIVEREF(__pyx_r);
18162  __Pyx_RefNannyFinishContext();
18163  return __pyx_r;
18164  }
18165 
18166  /* "PyClical.pyx":1814
18167  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18168  *
18169  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18170  * """
18171  * Random multivector within a frame.
18172  */
18173 
18174  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18175  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) {
18176  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
18177  PyObject *__pyx_r = NULL;
18178  __Pyx_RefNannyDeclarations
18179  PyObject *__pyx_t_1 = NULL;
18180  PyObject *__pyx_t_2 = NULL;
18181  scalar_t __pyx_t_3;
18182  PyObject *__pyx_t_4 = NULL;
18183  int __pyx_lineno = 0;
18184  const char *__pyx_filename = NULL;
18185  int __pyx_clineno = 0;
18186  __Pyx_RefNannySetupContext("random_clifford", 0);
18187  if (__pyx_optional_args) {
18188  if (__pyx_optional_args->__pyx_n > 0) {
18189  __pyx_v_fill = __pyx_optional_args->fill;
18190  }
18191  }
18192 
18193  /* "PyClical.pyx":1821
18194  * {-3,-1,2}
18195  * """
18196  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
18197  *
18198  * cpdef inline cga3(obj):
18199  */
18200  __Pyx_XDECREF(__pyx_r);
18201  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
18202  __Pyx_GOTREF(__pyx_t_1);
18203  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error)
18204  __Pyx_GOTREF(__pyx_t_2);
18205  __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)
18206  __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)
18207  __Pyx_GOTREF(__pyx_t_4);
18208  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18209  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18210  __pyx_r = __pyx_t_4;
18211  __pyx_t_4 = 0;
18212  goto __pyx_L0;
18213 
18214  /* "PyClical.pyx":1814
18215  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18216  *
18217  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18218  * """
18219  * Random multivector within a frame.
18220  */
18221 
18222  /* function exit code */
18223  __pyx_L1_error:;
18224  __Pyx_XDECREF(__pyx_t_1);
18225  __Pyx_XDECREF(__pyx_t_2);
18226  __Pyx_XDECREF(__pyx_t_4);
18227  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18228  __pyx_r = 0;
18229  __pyx_L0:;
18230  __Pyx_XGIVEREF(__pyx_r);
18231  __Pyx_RefNannyFinishContext();
18232  return __pyx_r;
18233  }
18234 
18235  /* Python wrapper */
18236  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18237  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 ";
18238  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18239  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
18240  PyObject *__pyx_v_fill = 0;
18241  int __pyx_lineno = 0;
18242  const char *__pyx_filename = NULL;
18243  int __pyx_clineno = 0;
18244  PyObject *__pyx_r = 0;
18245  __Pyx_RefNannyDeclarations
18246  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
18247  {
18248  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
18249  PyObject* values[2] = {0,0};
18250  values[1] = ((PyObject *)__pyx_float_1_0);
18251  if (unlikely(__pyx_kwds)) {
18252  Py_ssize_t kw_args;
18253  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18254  switch (pos_args) {
18255  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18256  CYTHON_FALLTHROUGH;
18257  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18258  CYTHON_FALLTHROUGH;
18259  case 0: break;
18260  default: goto __pyx_L5_argtuple_error;
18261  }
18262  kw_args = PyDict_Size(__pyx_kwds);
18263  switch (pos_args) {
18264  case 0:
18265  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
18266  else goto __pyx_L5_argtuple_error;
18267  CYTHON_FALLTHROUGH;
18268  case 1:
18269  if (kw_args > 0) {
18270  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
18271  if (value) { values[1] = value; kw_args--; }
18272  }
18273  }
18274  if (unlikely(kw_args > 0)) {
18275  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1814, __pyx_L3_error)
18276  }
18277  } else {
18278  switch (PyTuple_GET_SIZE(__pyx_args)) {
18279  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18280  CYTHON_FALLTHROUGH;
18281  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18282  break;
18283  default: goto __pyx_L5_argtuple_error;
18284  }
18285  }
18286  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
18287  __pyx_v_fill = values[1];
18288  }
18289  goto __pyx_L4_argument_unpacking_done;
18290  __pyx_L5_argtuple_error:;
18291  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1814, __pyx_L3_error)
18292  __pyx_L3_error:;
18293  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18294  __Pyx_RefNannyFinishContext();
18295  return NULL;
18296  __pyx_L4_argument_unpacking_done:;
18297  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1814, __pyx_L1_error)
18298  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
18299 
18300  /* function exit code */
18301  goto __pyx_L0;
18302  __pyx_L1_error:;
18303  __pyx_r = NULL;
18304  __pyx_L0:;
18305  __Pyx_RefNannyFinishContext();
18306  return __pyx_r;
18307  }
18308 
18309  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) {
18310  PyObject *__pyx_r = NULL;
18311  __Pyx_RefNannyDeclarations
18312  PyObject *__pyx_t_1 = NULL;
18313  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
18314  int __pyx_lineno = 0;
18315  const char *__pyx_filename = NULL;
18316  int __pyx_clineno = 0;
18317  __Pyx_RefNannySetupContext("random_clifford", 0);
18318  __Pyx_XDECREF(__pyx_r);
18319  __pyx_t_2.__pyx_n = 1;
18320  __pyx_t_2.fill = __pyx_v_fill;
18321  __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)
18322  __Pyx_GOTREF(__pyx_t_1);
18323  __pyx_r = __pyx_t_1;
18324  __pyx_t_1 = 0;
18325  goto __pyx_L0;
18326 
18327  /* function exit code */
18328  __pyx_L1_error:;
18329  __Pyx_XDECREF(__pyx_t_1);
18330  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18331  __pyx_r = NULL;
18332  __pyx_L0:;
18333  __Pyx_XGIVEREF(__pyx_r);
18334  __Pyx_RefNannyFinishContext();
18335  return __pyx_r;
18336  }
18337 
18338  /* "PyClical.pyx":1823
18339  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18340  *
18341  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18342  * """
18343  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18344  */
18345 
18346  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18347  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18348  PyObject *__pyx_r = NULL;
18349  __Pyx_RefNannyDeclarations
18350  PyObject *__pyx_t_1 = NULL;
18351  PyObject *__pyx_t_2 = NULL;
18352  int __pyx_lineno = 0;
18353  const char *__pyx_filename = NULL;
18354  int __pyx_clineno = 0;
18355  __Pyx_RefNannySetupContext("cga3", 0);
18356 
18357  /* "PyClical.pyx":1830
18358  * 87{-1}+4{1}+18{2}+2{3}+85{4}
18359  * """
18360  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18361  *
18362  * cpdef inline cga3std(obj):
18363  */
18364  __Pyx_XDECREF(__pyx_r);
18365  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
18366  __Pyx_GOTREF(__pyx_t_1);
18367  __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)
18368  __Pyx_GOTREF(__pyx_t_2);
18369  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18370  __pyx_r = __pyx_t_2;
18371  __pyx_t_2 = 0;
18372  goto __pyx_L0;
18373 
18374  /* "PyClical.pyx":1823
18375  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18376  *
18377  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18378  * """
18379  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18380  */
18381 
18382  /* function exit code */
18383  __pyx_L1_error:;
18384  __Pyx_XDECREF(__pyx_t_1);
18385  __Pyx_XDECREF(__pyx_t_2);
18386  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18387  __pyx_r = 0;
18388  __pyx_L0:;
18389  __Pyx_XGIVEREF(__pyx_r);
18390  __Pyx_RefNannyFinishContext();
18391  return __pyx_r;
18392  }
18393 
18394  /* Python wrapper */
18395  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18396  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 ";
18397  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18398  PyObject *__pyx_r = 0;
18399  __Pyx_RefNannyDeclarations
18400  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
18401  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
18402 
18403  /* function exit code */
18404  __Pyx_RefNannyFinishContext();
18405  return __pyx_r;
18406  }
18407 
18408  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18409  PyObject *__pyx_r = NULL;
18410  __Pyx_RefNannyDeclarations
18411  PyObject *__pyx_t_1 = NULL;
18412  int __pyx_lineno = 0;
18413  const char *__pyx_filename = NULL;
18414  int __pyx_clineno = 0;
18415  __Pyx_RefNannySetupContext("cga3", 0);
18416  __Pyx_XDECREF(__pyx_r);
18417  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1823, __pyx_L1_error)
18418  __Pyx_GOTREF(__pyx_t_1);
18419  __pyx_r = __pyx_t_1;
18420  __pyx_t_1 = 0;
18421  goto __pyx_L0;
18422 
18423  /* function exit code */
18424  __pyx_L1_error:;
18425  __Pyx_XDECREF(__pyx_t_1);
18426  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18427  __pyx_r = NULL;
18428  __pyx_L0:;
18429  __Pyx_XGIVEREF(__pyx_r);
18430  __Pyx_RefNannyFinishContext();
18431  return __pyx_r;
18432  }
18433 
18434  /* "PyClical.pyx":1832
18435  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18436  *
18437  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18438  * """
18439  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18440  */
18441 
18442  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18443  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18444  PyObject *__pyx_r = NULL;
18445  __Pyx_RefNannyDeclarations
18446  PyObject *__pyx_t_1 = NULL;
18447  PyObject *__pyx_t_2 = NULL;
18448  int __pyx_lineno = 0;
18449  const char *__pyx_filename = NULL;
18450  int __pyx_clineno = 0;
18451  __Pyx_RefNannySetupContext("cga3std", 0);
18452 
18453  /* "PyClical.pyx":1841
18454  * 0
18455  * """
18456  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
18457  *
18458  * cpdef inline agc3(obj):
18459  */
18460  __Pyx_XDECREF(__pyx_r);
18461  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error)
18462  __Pyx_GOTREF(__pyx_t_1);
18463  __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)
18464  __Pyx_GOTREF(__pyx_t_2);
18465  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18466  __pyx_r = __pyx_t_2;
18467  __pyx_t_2 = 0;
18468  goto __pyx_L0;
18469 
18470  /* "PyClical.pyx":1832
18471  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18472  *
18473  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18474  * """
18475  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18476  */
18477 
18478  /* function exit code */
18479  __pyx_L1_error:;
18480  __Pyx_XDECREF(__pyx_t_1);
18481  __Pyx_XDECREF(__pyx_t_2);
18482  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18483  __pyx_r = 0;
18484  __pyx_L0:;
18485  __Pyx_XGIVEREF(__pyx_r);
18486  __Pyx_RefNannyFinishContext();
18487  return __pyx_r;
18488  }
18489 
18490  /* Python wrapper */
18491  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18492  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 ";
18493  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18494  PyObject *__pyx_r = 0;
18495  __Pyx_RefNannyDeclarations
18496  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
18497  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
18498 
18499  /* function exit code */
18500  __Pyx_RefNannyFinishContext();
18501  return __pyx_r;
18502  }
18503 
18504  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18505  PyObject *__pyx_r = NULL;
18506  __Pyx_RefNannyDeclarations
18507  PyObject *__pyx_t_1 = NULL;
18508  int __pyx_lineno = 0;
18509  const char *__pyx_filename = NULL;
18510  int __pyx_clineno = 0;
18511  __Pyx_RefNannySetupContext("cga3std", 0);
18512  __Pyx_XDECREF(__pyx_r);
18513  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L1_error)
18514  __Pyx_GOTREF(__pyx_t_1);
18515  __pyx_r = __pyx_t_1;
18516  __pyx_t_1 = 0;
18517  goto __pyx_L0;
18518 
18519  /* function exit code */
18520  __pyx_L1_error:;
18521  __Pyx_XDECREF(__pyx_t_1);
18522  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18523  __pyx_r = NULL;
18524  __pyx_L0:;
18525  __Pyx_XGIVEREF(__pyx_r);
18526  __Pyx_RefNannyFinishContext();
18527  return __pyx_r;
18528  }
18529 
18530  /* "PyClical.pyx":1843
18531  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18532  *
18533  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18534  * """
18535  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18536  */
18537 
18538  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18539  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18540  PyObject *__pyx_r = NULL;
18541  __Pyx_RefNannyDeclarations
18542  PyObject *__pyx_t_1 = NULL;
18543  PyObject *__pyx_t_2 = NULL;
18544  int __pyx_lineno = 0;
18545  const char *__pyx_filename = NULL;
18546  int __pyx_clineno = 0;
18547  __Pyx_RefNannySetupContext("agc3", 0);
18548 
18549  /* "PyClical.pyx":1852
18550  * 0
18551  * """
18552  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18553  *
18554  * # Some abbreviations.
18555  */
18556  __Pyx_XDECREF(__pyx_r);
18557  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error)
18558  __Pyx_GOTREF(__pyx_t_1);
18559  __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)
18560  __Pyx_GOTREF(__pyx_t_2);
18561  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18562  __pyx_r = __pyx_t_2;
18563  __pyx_t_2 = 0;
18564  goto __pyx_L0;
18565 
18566  /* "PyClical.pyx":1843
18567  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18568  *
18569  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18570  * """
18571  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18572  */
18573 
18574  /* function exit code */
18575  __pyx_L1_error:;
18576  __Pyx_XDECREF(__pyx_t_1);
18577  __Pyx_XDECREF(__pyx_t_2);
18578  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18579  __pyx_r = 0;
18580  __pyx_L0:;
18581  __Pyx_XGIVEREF(__pyx_r);
18582  __Pyx_RefNannyFinishContext();
18583  return __pyx_r;
18584  }
18585 
18586  /* Python wrapper */
18587  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18588  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 ";
18589  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18590  PyObject *__pyx_r = 0;
18591  __Pyx_RefNannyDeclarations
18592  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
18593  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
18594 
18595  /* function exit code */
18596  __Pyx_RefNannyFinishContext();
18597  return __pyx_r;
18598  }
18599 
18600  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18601  PyObject *__pyx_r = NULL;
18602  __Pyx_RefNannyDeclarations
18603  PyObject *__pyx_t_1 = NULL;
18604  int __pyx_lineno = 0;
18605  const char *__pyx_filename = NULL;
18606  int __pyx_clineno = 0;
18607  __Pyx_RefNannySetupContext("agc3", 0);
18608  __Pyx_XDECREF(__pyx_r);
18609  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
18610  __Pyx_GOTREF(__pyx_t_1);
18611  __pyx_r = __pyx_t_1;
18612  __pyx_t_1 = 0;
18613  goto __pyx_L0;
18614 
18615  /* function exit code */
18616  __pyx_L1_error:;
18617  __Pyx_XDECREF(__pyx_t_1);
18618  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18619  __pyx_r = NULL;
18620  __pyx_L0:;
18621  __Pyx_XGIVEREF(__pyx_r);
18622  __Pyx_RefNannyFinishContext();
18623  return __pyx_r;
18624  }
18625 
18626  /* "PyClical.pyx":1886
18627  * """
18628  *
18629  * def e(obj): # <<<<<<<<<<<<<<
18630  * """
18631  * Abbreviation for clifford(index_set(obj)).
18632  */
18633 
18634  /* Python wrapper */
18635  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18636  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 ";
18637  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
18638  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18639  PyObject *__pyx_r = 0;
18640  __Pyx_RefNannyDeclarations
18641  __Pyx_RefNannySetupContext("e (wrapper)", 0);
18642  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
18643 
18644  /* function exit code */
18645  __Pyx_RefNannyFinishContext();
18646  return __pyx_r;
18647  }
18648 
18649  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18650  PyObject *__pyx_r = NULL;
18651  __Pyx_RefNannyDeclarations
18652  PyObject *__pyx_t_1 = NULL;
18653  PyObject *__pyx_t_2 = NULL;
18654  int __pyx_lineno = 0;
18655  const char *__pyx_filename = NULL;
18656  int __pyx_clineno = 0;
18657  __Pyx_RefNannySetupContext("e", 0);
18658 
18659  /* "PyClical.pyx":1897
18660  * 1
18661  * """
18662  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
18663  *
18664  * def istpq(p, q):
18665  */
18666  __Pyx_XDECREF(__pyx_r);
18667  __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)
18668  __Pyx_GOTREF(__pyx_t_1);
18669  __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)
18670  __Pyx_GOTREF(__pyx_t_2);
18671  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18672  __pyx_r = __pyx_t_2;
18673  __pyx_t_2 = 0;
18674  goto __pyx_L0;
18675 
18676  /* "PyClical.pyx":1886
18677  * """
18678  *
18679  * def e(obj): # <<<<<<<<<<<<<<
18680  * """
18681  * Abbreviation for clifford(index_set(obj)).
18682  */
18683 
18684  /* function exit code */
18685  __pyx_L1_error:;
18686  __Pyx_XDECREF(__pyx_t_1);
18687  __Pyx_XDECREF(__pyx_t_2);
18688  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
18689  __pyx_r = NULL;
18690  __pyx_L0:;
18691  __Pyx_XGIVEREF(__pyx_r);
18692  __Pyx_RefNannyFinishContext();
18693  return __pyx_r;
18694  }
18695 
18696  /* "PyClical.pyx":1899
18697  * return clifford(index_set(obj))
18698  *
18699  * def istpq(p, q): # <<<<<<<<<<<<<<
18700  * """
18701  * Abbreviation for index_set({-q,...p}).
18702  */
18703 
18704  /* Python wrapper */
18705  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18706  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 ";
18707  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
18708  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18709  PyObject *__pyx_v_p = 0;
18710  PyObject *__pyx_v_q = 0;
18711  int __pyx_lineno = 0;
18712  const char *__pyx_filename = NULL;
18713  int __pyx_clineno = 0;
18714  PyObject *__pyx_r = 0;
18715  __Pyx_RefNannyDeclarations
18716  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
18717  {
18718  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
18719  PyObject* values[2] = {0,0};
18720  if (unlikely(__pyx_kwds)) {
18721  Py_ssize_t kw_args;
18722  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18723  switch (pos_args) {
18724  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18725  CYTHON_FALLTHROUGH;
18726  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18727  CYTHON_FALLTHROUGH;
18728  case 0: break;
18729  default: goto __pyx_L5_argtuple_error;
18730  }
18731  kw_args = PyDict_Size(__pyx_kwds);
18732  switch (pos_args) {
18733  case 0:
18734  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
18735  else goto __pyx_L5_argtuple_error;
18736  CYTHON_FALLTHROUGH;
18737  case 1:
18738  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
18739  else {
18740  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1899, __pyx_L3_error)
18741  }
18742  }
18743  if (unlikely(kw_args > 0)) {
18744  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1899, __pyx_L3_error)
18745  }
18746  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18747  goto __pyx_L5_argtuple_error;
18748  } else {
18749  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18750  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18751  }
18752  __pyx_v_p = values[0];
18753  __pyx_v_q = values[1];
18754  }
18755  goto __pyx_L4_argument_unpacking_done;
18756  __pyx_L5_argtuple_error:;
18757  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1899, __pyx_L3_error)
18758  __pyx_L3_error:;
18759  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18760  __Pyx_RefNannyFinishContext();
18761  return NULL;
18762  __pyx_L4_argument_unpacking_done:;
18763  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18764 
18765  /* function exit code */
18766  __Pyx_RefNannyFinishContext();
18767  return __pyx_r;
18768  }
18769 
18770  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18771  PyObject *__pyx_r = NULL;
18772  __Pyx_RefNannyDeclarations
18773  PyObject *__pyx_t_1 = NULL;
18774  PyObject *__pyx_t_2 = NULL;
18775  PyObject *__pyx_t_3 = NULL;
18776  int __pyx_lineno = 0;
18777  const char *__pyx_filename = NULL;
18778  int __pyx_clineno = 0;
18779  __Pyx_RefNannySetupContext("istpq", 0);
18780 
18781  /* "PyClical.pyx":1906
18782  * {-3,-2,-1,1,2}
18783  * """
18784  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
18785  *
18786  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18787  */
18788  __Pyx_XDECREF(__pyx_r);
18789  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error)
18790  __Pyx_GOTREF(__pyx_t_1);
18791  __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)
18792  __Pyx_GOTREF(__pyx_t_2);
18793  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error)
18794  __Pyx_GOTREF(__pyx_t_3);
18795  __Pyx_GIVEREF(__pyx_t_1);
18796  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18797  __Pyx_GIVEREF(__pyx_t_2);
18798  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18799  __pyx_t_1 = 0;
18800  __pyx_t_2 = 0;
18801  __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)
18802  __Pyx_GOTREF(__pyx_t_2);
18803  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18804  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error)
18805  __Pyx_GOTREF(__pyx_t_3);
18806  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18807  __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)
18808  __Pyx_GOTREF(__pyx_t_2);
18809  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18810  __pyx_r = __pyx_t_2;
18811  __pyx_t_2 = 0;
18812  goto __pyx_L0;
18813 
18814  /* "PyClical.pyx":1899
18815  * return clifford(index_set(obj))
18816  *
18817  * def istpq(p, q): # <<<<<<<<<<<<<<
18818  * """
18819  * Abbreviation for index_set({-q,...p}).
18820  */
18821 
18822  /* function exit code */
18823  __pyx_L1_error:;
18824  __Pyx_XDECREF(__pyx_t_1);
18825  __Pyx_XDECREF(__pyx_t_2);
18826  __Pyx_XDECREF(__pyx_t_3);
18827  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18828  __pyx_r = NULL;
18829  __pyx_L0:;
18830  __Pyx_XGIVEREF(__pyx_r);
18831  __Pyx_RefNannyFinishContext();
18832  return __pyx_r;
18833  }
18834 
18835  /* "PyClical.pyx":1912
18836  *
18837  * # Doctest interface.
18838  * def _test(): # <<<<<<<<<<<<<<
18839  * import PyClical, doctest
18840  * return doctest.testmod(PyClical)
18841  */
18842 
18843  /* Python wrapper */
18844  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18845  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18846  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18847  PyObject *__pyx_r = 0;
18848  __Pyx_RefNannyDeclarations
18849  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18850  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18851 
18852  /* function exit code */
18853  __Pyx_RefNannyFinishContext();
18854  return __pyx_r;
18855  }
18856 
18857  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18858  PyObject *__pyx_v_PyClical = NULL;
18859  PyObject *__pyx_v_doctest = NULL;
18860  PyObject *__pyx_r = NULL;
18861  __Pyx_RefNannyDeclarations
18862  PyObject *__pyx_t_1 = NULL;
18863  PyObject *__pyx_t_2 = NULL;
18864  PyObject *__pyx_t_3 = NULL;
18865  int __pyx_lineno = 0;
18866  const char *__pyx_filename = NULL;
18867  int __pyx_clineno = 0;
18868  __Pyx_RefNannySetupContext("_test", 0);
18869 
18870  /* "PyClical.pyx":1913
18871  * # Doctest interface.
18872  * def _test():
18873  * import PyClical, doctest # <<<<<<<<<<<<<<
18874  * return doctest.testmod(PyClical)
18875  *
18876  */
18877  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
18878  __Pyx_GOTREF(__pyx_t_1);
18879  __pyx_v_PyClical = __pyx_t_1;
18880  __pyx_t_1 = 0;
18881  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
18882  __Pyx_GOTREF(__pyx_t_1);
18883  __pyx_v_doctest = __pyx_t_1;
18884  __pyx_t_1 = 0;
18885 
18886  /* "PyClical.pyx":1914
18887  * def _test():
18888  * import PyClical, doctest
18889  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18890  *
18891  * if __name__ == "__main__":
18892  */
18893  __Pyx_XDECREF(__pyx_r);
18894  __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)
18895  __Pyx_GOTREF(__pyx_t_2);
18896  __pyx_t_3 = NULL;
18897  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18898  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18899  if (likely(__pyx_t_3)) {
18900  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18901  __Pyx_INCREF(__pyx_t_3);
18902  __Pyx_INCREF(function);
18903  __Pyx_DECREF_SET(__pyx_t_2, function);
18904  }
18905  }
18906  __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);
18907  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18908  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18909  __Pyx_GOTREF(__pyx_t_1);
18910  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18911  __pyx_r = __pyx_t_1;
18912  __pyx_t_1 = 0;
18913  goto __pyx_L0;
18914 
18915  /* "PyClical.pyx":1912
18916  *
18917  * # Doctest interface.
18918  * def _test(): # <<<<<<<<<<<<<<
18919  * import PyClical, doctest
18920  * return doctest.testmod(PyClical)
18921  */
18922 
18923  /* function exit code */
18924  __pyx_L1_error:;
18925  __Pyx_XDECREF(__pyx_t_1);
18926  __Pyx_XDECREF(__pyx_t_2);
18927  __Pyx_XDECREF(__pyx_t_3);
18928  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18929  __pyx_r = NULL;
18930  __pyx_L0:;
18931  __Pyx_XDECREF(__pyx_v_PyClical);
18932  __Pyx_XDECREF(__pyx_v_doctest);
18933  __Pyx_XGIVEREF(__pyx_r);
18934  __Pyx_RefNannyFinishContext();
18935  return __pyx_r;
18936  }
18937 
18938  /* "string.to_py":31
18939  *
18940  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
18941  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18942  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
18943  * cdef extern from *:
18944  */
18945 
18946  static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) {
18947  PyObject *__pyx_r = NULL;
18948  __Pyx_RefNannyDeclarations
18949  PyObject *__pyx_t_1 = NULL;
18950  int __pyx_lineno = 0;
18951  const char *__pyx_filename = NULL;
18952  int __pyx_clineno = 0;
18953  __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0);
18954 
18955  /* "string.to_py":32
18956  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
18957  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):
18958  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
18959  * cdef extern from *:
18960  * cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
18961  */
18962  __Pyx_XDECREF(__pyx_r);
18963  __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)
18964  __Pyx_GOTREF(__pyx_t_1);
18965  __pyx_r = __pyx_t_1;
18966  __pyx_t_1 = 0;
18967  goto __pyx_L0;
18968 
18969  /* "string.to_py":31
18970  *
18971  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
18972  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18973  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
18974  * cdef extern from *:
18975  */
18976 
18977  /* function exit code */
18978  __pyx_L1_error:;
18979  __Pyx_XDECREF(__pyx_t_1);
18980  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
18981  __pyx_r = 0;
18982  __pyx_L0:;
18983  __Pyx_XGIVEREF(__pyx_r);
18984  __Pyx_RefNannyFinishContext();
18985  return __pyx_r;
18986  }
18987 
18988  /* "string.to_py":37
18989  *
18990  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
18991  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
18992  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
18993  * cdef extern from *:
18994  */
18995 
18996  static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) {
18997  PyObject *__pyx_r = NULL;
18998  __Pyx_RefNannyDeclarations
18999  PyObject *__pyx_t_1 = NULL;
19000  int __pyx_lineno = 0;
19001  const char *__pyx_filename = NULL;
19002  int __pyx_clineno = 0;
19003  __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0);
19004 
19005  /* "string.to_py":38
19006  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
19007  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):
19008  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19009  * cdef extern from *:
19010  * cdef object __Pyx_PyStr_FromStringAndSize(const char*, size_t)
19011  */
19012  __Pyx_XDECREF(__pyx_r);
19013  __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)
19014  __Pyx_GOTREF(__pyx_t_1);
19015  __pyx_r = __pyx_t_1;
19016  __pyx_t_1 = 0;
19017  goto __pyx_L0;
19018 
19019  /* "string.to_py":37
19020  *
19021  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
19022  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19023  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
19024  * cdef extern from *:
19025  */
19026 
19027  /* function exit code */
19028  __pyx_L1_error:;
19029  __Pyx_XDECREF(__pyx_t_1);
19030  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19031  __pyx_r = 0;
19032  __pyx_L0:;
19033  __Pyx_XGIVEREF(__pyx_r);
19034  __Pyx_RefNannyFinishContext();
19035  return __pyx_r;
19036  }
19037 
19038  /* "string.to_py":43
19039  *
19040  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
19041  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19042  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
19043  * cdef extern from *:
19044  */
19045 
19046  static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19047  PyObject *__pyx_r = NULL;
19048  __Pyx_RefNannyDeclarations
19049  PyObject *__pyx_t_1 = NULL;
19050  int __pyx_lineno = 0;
19051  const char *__pyx_filename = NULL;
19052  int __pyx_clineno = 0;
19053  __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0);
19054 
19055  /* "string.to_py":44
19056  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
19057  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):
19058  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19059  * cdef extern from *:
19060  * cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
19061  */
19062  __Pyx_XDECREF(__pyx_r);
19063  __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)
19064  __Pyx_GOTREF(__pyx_t_1);
19065  __pyx_r = __pyx_t_1;
19066  __pyx_t_1 = 0;
19067  goto __pyx_L0;
19068 
19069  /* "string.to_py":43
19070  *
19071  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
19072  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19073  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
19074  * cdef extern from *:
19075  */
19076 
19077  /* function exit code */
19078  __pyx_L1_error:;
19079  __Pyx_XDECREF(__pyx_t_1);
19080  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19081  __pyx_r = 0;
19082  __pyx_L0:;
19083  __Pyx_XGIVEREF(__pyx_r);
19084  __Pyx_RefNannyFinishContext();
19085  return __pyx_r;
19086  }
19087 
19088  /* "string.to_py":49
19089  *
19090  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
19091  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19092  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
19093  * cdef extern from *:
19094  */
19095 
19096  static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19097  PyObject *__pyx_r = NULL;
19098  __Pyx_RefNannyDeclarations
19099  PyObject *__pyx_t_1 = NULL;
19100  int __pyx_lineno = 0;
19101  const char *__pyx_filename = NULL;
19102  int __pyx_clineno = 0;
19103  __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0);
19104 
19105  /* "string.to_py":50
19106  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
19107  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):
19108  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19109  * cdef extern from *:
19110  * cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
19111  */
19112  __Pyx_XDECREF(__pyx_r);
19113  __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)
19114  __Pyx_GOTREF(__pyx_t_1);
19115  __pyx_r = __pyx_t_1;
19116  __pyx_t_1 = 0;
19117  goto __pyx_L0;
19118 
19119  /* "string.to_py":49
19120  *
19121  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
19122  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19123  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
19124  * cdef extern from *:
19125  */
19126 
19127  /* function exit code */
19128  __pyx_L1_error:;
19129  __Pyx_XDECREF(__pyx_t_1);
19130  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19131  __pyx_r = 0;
19132  __pyx_L0:;
19133  __Pyx_XGIVEREF(__pyx_r);
19134  __Pyx_RefNannyFinishContext();
19135  return __pyx_r;
19136  }
19137 
19138  /* "string.to_py":55
19139  *
19140  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
19141  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19142  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
19143  *
19144  */
19145 
19146  static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19147  PyObject *__pyx_r = NULL;
19148  __Pyx_RefNannyDeclarations
19149  PyObject *__pyx_t_1 = NULL;
19150  int __pyx_lineno = 0;
19151  const char *__pyx_filename = NULL;
19152  int __pyx_clineno = 0;
19153  __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0);
19154 
19155  /* "string.to_py":56
19156  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
19157  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):
19158  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19159  *
19160  */
19161  __Pyx_XDECREF(__pyx_r);
19162  __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)
19163  __Pyx_GOTREF(__pyx_t_1);
19164  __pyx_r = __pyx_t_1;
19165  __pyx_t_1 = 0;
19166  goto __pyx_L0;
19167 
19168  /* "string.to_py":55
19169  *
19170  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
19171  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19172  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
19173  *
19174  */
19175 
19176  /* function exit code */
19177  __pyx_L1_error:;
19178  __Pyx_XDECREF(__pyx_t_1);
19179  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19180  __pyx_r = 0;
19181  __pyx_L0:;
19182  __Pyx_XGIVEREF(__pyx_r);
19183  __Pyx_RefNannyFinishContext();
19184  return __pyx_r;
19185  }
19186  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
19187 
19188  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
19189  struct __pyx_obj_8PyClical_index_set *p;
19190  PyObject *o;
19191  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19192  o = (*t->tp_alloc)(t, 0);
19193  } else {
19194  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19195  }
19196  if (unlikely(!o)) return 0;
19197  p = ((struct __pyx_obj_8PyClical_index_set *)o);
19198  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
19199  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
19200  return o;
19201  bad:
19202  Py_DECREF(o); o = 0;
19203  return NULL;
19204  }
19205 
19206  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
19207  #if CYTHON_USE_TP_FINALIZE
19208  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))) {
19209  if (PyObject_CallFinalizerFromDealloc(o)) return;
19210  }
19211  #endif
19212  {
19213  PyObject *etype, *eval, *etb;
19214  PyErr_Fetch(&etype, &eval, &etb);
19215  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
19216  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
19217  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
19218  PyErr_Restore(etype, eval, etb);
19219  }
19220  (*Py_TYPE(o)->tp_free)(o);
19221  }
19222  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
19223  PyObject *r;
19224  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19225  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19226  Py_DECREF(x);
19227  return r;
19228  }
19229 
19230  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
19231  if (v) {
19232  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
19233  }
19234  else {
19235  PyErr_Format(PyExc_NotImplementedError,
19236  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
19237  return -1;
19238  }
19239  }
19240 
19241  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
19242  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
19243  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
19244  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
19245  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
19246  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
19247  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
19248  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
19249  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
19250  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
19251  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
19252  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
19253  {0, 0, 0, 0}
19254  };
19255 
19256  static PyNumberMethods __pyx_tp_as_number_index_set = {
19257  0, /*nb_add*/
19258  0, /*nb_subtract*/
19259  0, /*nb_multiply*/
19260  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19261  0, /*nb_divide*/
19262  #endif
19263  0, /*nb_remainder*/
19264  0, /*nb_divmod*/
19265  0, /*nb_power*/
19266  0, /*nb_negative*/
19267  0, /*nb_positive*/
19268  0, /*nb_absolute*/
19269  0, /*nb_nonzero*/
19270  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
19271  0, /*nb_lshift*/
19272  0, /*nb_rshift*/
19273  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
19274  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
19275  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
19276  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19277  0, /*nb_coerce*/
19278  #endif
19279  0, /*nb_int*/
19280  #if PY_MAJOR_VERSION < 3
19281  0, /*nb_long*/
19282  #else
19283  0, /*reserved*/
19284  #endif
19285  0, /*nb_float*/
19286  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19287  0, /*nb_oct*/
19288  #endif
19289  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19290  0, /*nb_hex*/
19291  #endif
19292  0, /*nb_inplace_add*/
19293  0, /*nb_inplace_subtract*/
19294  0, /*nb_inplace_multiply*/
19295  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19296  0, /*nb_inplace_divide*/
19297  #endif
19298  0, /*nb_inplace_remainder*/
19299  0, /*nb_inplace_power*/
19300  0, /*nb_inplace_lshift*/
19301  0, /*nb_inplace_rshift*/
19302  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
19303  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
19304  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
19305  0, /*nb_floor_divide*/
19306  0, /*nb_true_divide*/
19307  0, /*nb_inplace_floor_divide*/
19308  0, /*nb_inplace_true_divide*/
19309  0, /*nb_index*/
19310  #if PY_VERSION_HEX >= 0x03050000
19311  0, /*nb_matrix_multiply*/
19312  #endif
19313  #if PY_VERSION_HEX >= 0x03050000
19314  0, /*nb_inplace_matrix_multiply*/
19315  #endif
19316  };
19317 
19318  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
19319  0, /*sq_length*/
19320  0, /*sq_concat*/
19321  0, /*sq_repeat*/
19322  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
19323  0, /*sq_slice*/
19324  0, /*sq_ass_item*/
19325  0, /*sq_ass_slice*/
19326  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
19327  0, /*sq_inplace_concat*/
19328  0, /*sq_inplace_repeat*/
19329  };
19330 
19331  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
19332  0, /*mp_length*/
19333  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
19334  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
19335  };
19336 
19337  static PyTypeObject __pyx_type_8PyClical_index_set = {
19338  PyVarObject_HEAD_INIT(0, 0)
19339  "PyClical.index_set", /*tp_name*/
19340  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
19341  0, /*tp_itemsize*/
19342  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
19343  #if PY_VERSION_HEX < 0x030800b4
19344  0, /*tp_print*/
19345  #endif
19346  #if PY_VERSION_HEX >= 0x030800b4
19347  0, /*tp_vectorcall_offset*/
19348  #endif
19349  0, /*tp_getattr*/
19350  0, /*tp_setattr*/
19351  #if PY_MAJOR_VERSION < 3
19352  0, /*tp_compare*/
19353  #endif
19354  #if PY_MAJOR_VERSION >= 3
19355  0, /*tp_as_async*/
19356  #endif
19357  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
19358  &__pyx_tp_as_number_index_set, /*tp_as_number*/
19359  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
19360  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
19361  0, /*tp_hash*/
19362  0, /*tp_call*/
19363  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
19364  0, /*tp_getattro*/
19365  0, /*tp_setattro*/
19366  0, /*tp_as_buffer*/
19367  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19368  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
19369  0, /*tp_traverse*/
19370  0, /*tp_clear*/
19371  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
19372  0, /*tp_weaklistoffset*/
19373  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
19374  0, /*tp_iternext*/
19375  __pyx_methods_8PyClical_index_set, /*tp_methods*/
19376  0, /*tp_members*/
19377  0, /*tp_getset*/
19378  0, /*tp_base*/
19379  0, /*tp_dict*/
19380  0, /*tp_descr_get*/
19381  0, /*tp_descr_set*/
19382  0, /*tp_dictoffset*/
19383  0, /*tp_init*/
19384  0, /*tp_alloc*/
19385  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
19386  0, /*tp_free*/
19387  0, /*tp_is_gc*/
19388  0, /*tp_bases*/
19389  0, /*tp_mro*/
19390  0, /*tp_cache*/
19391  0, /*tp_subclasses*/
19392  0, /*tp_weaklist*/
19393  0, /*tp_del*/
19394  0, /*tp_version_tag*/
19395  #if PY_VERSION_HEX >= 0x030400a1
19396  0, /*tp_finalize*/
19397  #endif
19398  #if PY_VERSION_HEX >= 0x030800b1
19399  0, /*tp_vectorcall*/
19400  #endif
19401  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19402  0, /*tp_print*/
19403  #endif
19404  };
19405  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
19406 
19407  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
19408  struct __pyx_obj_8PyClical_clifford *p;
19409  PyObject *o;
19410  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19411  o = (*t->tp_alloc)(t, 0);
19412  } else {
19413  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19414  }
19415  if (unlikely(!o)) return 0;
19416  p = ((struct __pyx_obj_8PyClical_clifford *)o);
19417  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
19418  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
19419  return o;
19420  bad:
19421  Py_DECREF(o); o = 0;
19422  return NULL;
19423  }
19424 
19425  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
19426  #if CYTHON_USE_TP_FINALIZE
19427  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))) {
19428  if (PyObject_CallFinalizerFromDealloc(o)) return;
19429  }
19430  #endif
19431  {
19432  PyObject *etype, *eval, *etb;
19433  PyErr_Fetch(&etype, &eval, &etb);
19434  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
19435  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
19436  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
19437  PyErr_Restore(etype, eval, etb);
19438  }
19439  (*Py_TYPE(o)->tp_free)(o);
19440  }
19441  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
19442  PyObject *r;
19443  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19444  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19445  Py_DECREF(x);
19446  return r;
19447  }
19448 
19449  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
19450  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
19451  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
19452  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
19453  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
19454  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
19455  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
19456  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
19457  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
19458  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
19459  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
19460  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
19461  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
19462  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
19463  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
19464  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
19465  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
19466  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
19467  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
19468  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
19469  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
19470  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
19471  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
19472  {0, 0, 0, 0}
19473  };
19474 
19475  static PyNumberMethods __pyx_tp_as_number_clifford = {
19476  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
19477  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
19478  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
19479  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19480  0, /*nb_divide*/
19481  #endif
19482  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
19483  0, /*nb_divmod*/
19484  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
19485  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
19486  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
19487  0, /*nb_absolute*/
19488  0, /*nb_nonzero*/
19489  0, /*nb_invert*/
19490  0, /*nb_lshift*/
19491  0, /*nb_rshift*/
19492  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
19493  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
19494  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
19495  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19496  0, /*nb_coerce*/
19497  #endif
19498  0, /*nb_int*/
19499  #if PY_MAJOR_VERSION < 3
19500  0, /*nb_long*/
19501  #else
19502  0, /*reserved*/
19503  #endif
19504  0, /*nb_float*/
19505  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19506  0, /*nb_oct*/
19507  #endif
19508  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19509  0, /*nb_hex*/
19510  #endif
19511  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
19512  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
19513  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
19514  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19515  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
19516  #endif
19517  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
19518  0, /*nb_inplace_power*/
19519  0, /*nb_inplace_lshift*/
19520  0, /*nb_inplace_rshift*/
19521  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
19522  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
19523  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
19524  0, /*nb_floor_divide*/
19525  __pyx_pw_8PyClical_8clifford_45__truediv__, /*nb_true_divide*/
19526  0, /*nb_inplace_floor_divide*/
19527  0, /*nb_inplace_true_divide*/
19528  0, /*nb_index*/
19529  #if PY_VERSION_HEX >= 0x03050000
19530  0, /*nb_matrix_multiply*/
19531  #endif
19532  #if PY_VERSION_HEX >= 0x03050000
19533  0, /*nb_inplace_matrix_multiply*/
19534  #endif
19535  };
19536 
19537  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
19538  0, /*sq_length*/
19539  0, /*sq_concat*/
19540  0, /*sq_repeat*/
19541  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
19542  0, /*sq_slice*/
19543  0, /*sq_ass_item*/
19544  0, /*sq_ass_slice*/
19545  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
19546  0, /*sq_inplace_concat*/
19547  0, /*sq_inplace_repeat*/
19548  };
19549 
19550  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
19551  0, /*mp_length*/
19552  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
19553  0, /*mp_ass_subscript*/
19554  };
19555 
19556  static PyTypeObject __pyx_type_8PyClical_clifford = {
19557  PyVarObject_HEAD_INIT(0, 0)
19558  "PyClical.clifford", /*tp_name*/
19559  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
19560  0, /*tp_itemsize*/
19561  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
19562  #if PY_VERSION_HEX < 0x030800b4
19563  0, /*tp_print*/
19564  #endif
19565  #if PY_VERSION_HEX >= 0x030800b4
19566  0, /*tp_vectorcall_offset*/
19567  #endif
19568  0, /*tp_getattr*/
19569  0, /*tp_setattr*/
19570  #if PY_MAJOR_VERSION < 3
19571  0, /*tp_compare*/
19572  #endif
19573  #if PY_MAJOR_VERSION >= 3
19574  0, /*tp_as_async*/
19575  #endif
19576  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
19577  &__pyx_tp_as_number_clifford, /*tp_as_number*/
19578  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
19579  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
19580  0, /*tp_hash*/
19581  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
19582  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
19583  0, /*tp_getattro*/
19584  0, /*tp_setattro*/
19585  0, /*tp_as_buffer*/
19586  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19587  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
19588  0, /*tp_traverse*/
19589  0, /*tp_clear*/
19590  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
19591  0, /*tp_weaklistoffset*/
19592  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
19593  0, /*tp_iternext*/
19594  __pyx_methods_8PyClical_clifford, /*tp_methods*/
19595  0, /*tp_members*/
19596  0, /*tp_getset*/
19597  0, /*tp_base*/
19598  0, /*tp_dict*/
19599  0, /*tp_descr_get*/
19600  0, /*tp_descr_set*/
19601  0, /*tp_dictoffset*/
19602  0, /*tp_init*/
19603  0, /*tp_alloc*/
19604  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
19605  0, /*tp_free*/
19606  0, /*tp_is_gc*/
19607  0, /*tp_bases*/
19608  0, /*tp_mro*/
19609  0, /*tp_cache*/
19610  0, /*tp_subclasses*/
19611  0, /*tp_weaklist*/
19612  0, /*tp_del*/
19613  0, /*tp_version_tag*/
19614  #if PY_VERSION_HEX >= 0x030400a1
19615  0, /*tp_finalize*/
19616  #endif
19617  #if PY_VERSION_HEX >= 0x030800b1
19618  0, /*tp_vectorcall*/
19619  #endif
19620  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19621  0, /*tp_print*/
19622  #endif
19623  };
19624 
19625  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
19626  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
19627 
19628  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
19629  PyObject *o;
19630  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__)))) {
19631  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
19632  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
19633  (void) PyObject_INIT(o, t);
19634  PyObject_GC_Track(o);
19635  } else {
19636  o = (*t->tp_alloc)(t, 0);
19637  if (unlikely(!o)) return 0;
19638  }
19639  return o;
19640  }
19641 
19642  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
19643  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19644  PyObject_GC_UnTrack(o);
19645  Py_CLEAR(p->__pyx_v_idx);
19646  Py_CLEAR(p->__pyx_v_self);
19647  Py_CLEAR(p->__pyx_t_0);
19648  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__)))) {
19649  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
19650  } else {
19651  (*Py_TYPE(o)->tp_free)(o);
19652  }
19653  }
19654 
19655  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
19656  int e;
19657  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19658  if (p->__pyx_v_idx) {
19659  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
19660  }
19661  if (p->__pyx_v_self) {
19662  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
19663  }
19664  if (p->__pyx_t_0) {
19665  e = (*v)(p->__pyx_t_0, a); if (e) return e;
19666  }
19667  return 0;
19668  }
19669 
19670  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
19671  PyVarObject_HEAD_INIT(0, 0)
19672  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
19673  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
19674  0, /*tp_itemsize*/
19675  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
19676  #if PY_VERSION_HEX < 0x030800b4
19677  0, /*tp_print*/
19678  #endif
19679  #if PY_VERSION_HEX >= 0x030800b4
19680  0, /*tp_vectorcall_offset*/
19681  #endif
19682  0, /*tp_getattr*/
19683  0, /*tp_setattr*/
19684  #if PY_MAJOR_VERSION < 3
19685  0, /*tp_compare*/
19686  #endif
19687  #if PY_MAJOR_VERSION >= 3
19688  0, /*tp_as_async*/
19689  #endif
19690  0, /*tp_repr*/
19691  0, /*tp_as_number*/
19692  0, /*tp_as_sequence*/
19693  0, /*tp_as_mapping*/
19694  0, /*tp_hash*/
19695  0, /*tp_call*/
19696  0, /*tp_str*/
19697  0, /*tp_getattro*/
19698  0, /*tp_setattro*/
19699  0, /*tp_as_buffer*/
19700  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19701  0, /*tp_doc*/
19702  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
19703  0, /*tp_clear*/
19704  0, /*tp_richcompare*/
19705  0, /*tp_weaklistoffset*/
19706  0, /*tp_iter*/
19707  0, /*tp_iternext*/
19708  0, /*tp_methods*/
19709  0, /*tp_members*/
19710  0, /*tp_getset*/
19711  0, /*tp_base*/
19712  0, /*tp_dict*/
19713  0, /*tp_descr_get*/
19714  0, /*tp_descr_set*/
19715  0, /*tp_dictoffset*/
19716  0, /*tp_init*/
19717  0, /*tp_alloc*/
19718  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
19719  0, /*tp_free*/
19720  0, /*tp_is_gc*/
19721  0, /*tp_bases*/
19722  0, /*tp_mro*/
19723  0, /*tp_cache*/
19724  0, /*tp_subclasses*/
19725  0, /*tp_weaklist*/
19726  0, /*tp_del*/
19727  0, /*tp_version_tag*/
19728  #if PY_VERSION_HEX >= 0x030400a1
19729  0, /*tp_finalize*/
19730  #endif
19731  #if PY_VERSION_HEX >= 0x030800b1
19732  0, /*tp_vectorcall*/
19733  #endif
19734  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
19735  0, /*tp_print*/
19736  #endif
19737  };
19738 
19739  static PyMethodDef __pyx_methods[] = {
19740  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
19741  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
19742  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
19743  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
19744  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
19745  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
19746  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
19747  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
19748  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
19749  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
19750  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
19751  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
19752  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
19753  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
19754  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
19755  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
19756  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
19757  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
19758  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
19759  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
19760  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
19761  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
19762  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
19763  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
19764  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
19765  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
19766  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
19767  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
19768  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
19769  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
19770  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
19771  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
19772  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
19773  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
19774  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
19775  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
19776  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
19777  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
19778  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
19779  {0, 0, 0, 0}
19780  };
19781 
19782  #if PY_MAJOR_VERSION >= 3
19783  #if CYTHON_PEP489_MULTI_PHASE_INIT
19784  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
19785  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
19786  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19787  {Py_mod_create, (void*)__pyx_pymod_create},
19788  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
19789  {0, NULL}
19790  };
19791  #endif
19792 
19793  static struct PyModuleDef __pyx_moduledef = {
19794  PyModuleDef_HEAD_INIT,
19795  "PyClical",
19796  0, /* m_doc */
19797  #if CYTHON_PEP489_MULTI_PHASE_INIT
19798  0, /* m_size */
19799  #else
19800  -1, /* m_size */
19801  #endif
19802  __pyx_methods /* m_methods */,
19803  #if CYTHON_PEP489_MULTI_PHASE_INIT
19804  __pyx_moduledef_slots, /* m_slots */
19805  #else
19806  NULL, /* m_reload */
19807  #endif
19808  NULL, /* m_traverse */
19809  NULL, /* m_clear */
19810  NULL /* m_free */
19811  };
19812  #endif
19813  #ifndef CYTHON_SMALL_CODE
19814 #if defined(__clang__)
19815  #define CYTHON_SMALL_CODE
19816 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
19817  #define CYTHON_SMALL_CODE __attribute__((cold))
19818 #else
19819  #define CYTHON_SMALL_CODE
19820 #endif
19821 #endif
19822 
19823 static __Pyx_StringTabEntry __pyx_string_tab[] = {
19824  {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
19825  {&__pyx_kp_u_0_8_4, __pyx_k_0_8_4, sizeof(__pyx_k_0_8_4), 0, 1, 0, 0},
19826  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
19827  {&__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},
19828  {&__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},
19829  {&__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},
19830  {&__pyx_kp_u_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 1, 0, 0},
19831  {&__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},
19832  {&__pyx_kp_u_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 1, 0, 0},
19833  {&__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},
19834  {&__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},
19835  {&__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},
19836  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
19837  {&__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},
19838  {&__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},
19839  {&__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},
19840  {&__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},
19841  {&__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},
19842  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
19843  {&__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},
19844  {&__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},
19845  {&__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},
19846  {&__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},
19847  {&__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},
19848  {&__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},
19849  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
19850  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
19851  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
19852  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
19853  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
19854  {&__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},
19855  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
19856  {&__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},
19857  {&__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},
19858  {&__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},
19859  {&__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},
19860  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
19861  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
19862  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
19863  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
19864  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
19865  {&__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},
19866  {&__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},
19867  {&__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},
19868  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
19869  {&__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},
19870  {&__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},
19871  {&__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},
19872  {&__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},
19873  {&__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},
19874  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
19875  {&__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},
19876  {&__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},
19877  {&__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},
19878  {&__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},
19879  {&__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},
19880  {&__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},
19881  {&__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},
19882  {&__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},
19883  {&__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},
19884  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
19885  {&__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},
19886  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
19887  {&__pyx_kp_u_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 1, 0, 0},
19888  {&__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},
19889  {&__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},
19890  {&__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},
19891  {&__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},
19892  {&__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},
19893  {&__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},
19894  {&__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},
19895  {&__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},
19896  {&__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},
19897  {&__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},
19898  {&__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},
19899  {&__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},
19900  {&__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},
19901  {&__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},
19902  {&__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},
19903  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
19904  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
19905  {&__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},
19906  {&__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},
19907  {&__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},
19908  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
19909  {&__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},
19910  {&__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},
19911  {&__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},
19912  {&__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},
19913  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
19914  {&__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},
19915  {&__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},
19916  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
19917  {&__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},
19918  {&__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},
19919  {&__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},
19920  {&__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},
19921  {&__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},
19922  {&__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},
19923  {&__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},
19924  {&__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},
19925  {&__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},
19926  {&__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},
19927  {&__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},
19928  {&__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},
19929  {&__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},
19930  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
19931  {&__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},
19932  {&__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},
19933  {&__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},
19934  {&__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},
19935  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
19936  {&__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},
19937  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
19938  {&__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},
19939  {&__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},
19940  {&__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},
19941  {&__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},
19942  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
19943  {&__pyx_kp_u_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 1, 0, 0},
19944  {&__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},
19945  {&__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},
19946  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
19947  {&__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},
19948  {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
19949  {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
19950  {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
19951  {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
19952  {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0},
19953  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
19954  {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
19955  {&__pyx_kp_u_abs_line_1472, __pyx_k_abs_line_1472, sizeof(__pyx_k_abs_line_1472), 0, 1, 0, 0},
19956  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
19957  {&__pyx_kp_u_acos_line_1618, __pyx_k_acos_line_1618, sizeof(__pyx_k_acos_line_1618), 0, 1, 0, 0},
19958  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
19959  {&__pyx_kp_u_acosh_line_1655, __pyx_k_acosh_line_1655, sizeof(__pyx_k_acosh_line_1655), 0, 1, 0, 0},
19960  {&__pyx_kp_u_agc3_line_1843, __pyx_k_agc3_line_1843, sizeof(__pyx_k_agc3_line_1843), 0, 1, 0, 0},
19961  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
19962  {&__pyx_kp_u_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 1, 0, 0},
19963  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
19964  {&__pyx_kp_u_asin_line_1697, __pyx_k_asin_line_1697, sizeof(__pyx_k_asin_line_1697), 0, 1, 0, 0},
19965  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
19966  {&__pyx_kp_u_asinh_line_1732, __pyx_k_asinh_line_1732, sizeof(__pyx_k_asinh_line_1732), 0, 1, 0, 0},
19967  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
19968  {&__pyx_kp_u_atan_line_1768, __pyx_k_atan_line_1768, sizeof(__pyx_k_atan_line_1768), 0, 1, 0, 0},
19969  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
19970  {&__pyx_kp_u_atanh_line_1797, __pyx_k_atanh_line_1797, sizeof(__pyx_k_atanh_line_1797), 0, 1, 0, 0},
19971  {&__pyx_kp_u_cga3_line_1823, __pyx_k_cga3_line_1823, sizeof(__pyx_k_cga3_line_1823), 0, 1, 0, 0},
19972  {&__pyx_kp_u_cga3std_line_1832, __pyx_k_cga3std_line_1832, sizeof(__pyx_k_cga3std_line_1832), 0, 1, 0, 0},
19973  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
19974  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
19975  {&__pyx_kp_u_clifford___add___line_740, __pyx_k_clifford___add___line_740, sizeof(__pyx_k_clifford___add___line_740), 0, 1, 0, 0},
19976  {&__pyx_kp_u_clifford___and___line_836, __pyx_k_clifford___and___line_836, sizeof(__pyx_k_clifford___and___line_836), 0, 1, 0, 0},
19977  {&__pyx_kp_u_clifford___call___line_1020, __pyx_k_clifford___call___line_1020, sizeof(__pyx_k_clifford___call___line_1020), 0, 1, 0, 0},
19978  {&__pyx_kp_u_clifford___getitem___line_707, __pyx_k_clifford___getitem___line_707, sizeof(__pyx_k_clifford___getitem___line_707), 0, 1, 0, 0},
19979  {&__pyx_kp_u_clifford___iadd___line_751, __pyx_k_clifford___iadd___line_751, sizeof(__pyx_k_clifford___iadd___line_751), 0, 1, 0, 0},
19980  {&__pyx_kp_u_clifford___iand___line_851, __pyx_k_clifford___iand___line_851, sizeof(__pyx_k_clifford___iand___line_851), 0, 1, 0, 0},
19981  {&__pyx_kp_u_clifford___idiv___line_911, __pyx_k_clifford___idiv___line_911, sizeof(__pyx_k_clifford___idiv___line_911), 0, 1, 0, 0},
19982  {&__pyx_kp_u_clifford___imod___line_821, __pyx_k_clifford___imod___line_821, sizeof(__pyx_k_clifford___imod___line_821), 0, 1, 0, 0},
19983  {&__pyx_kp_u_clifford___imul___line_793, __pyx_k_clifford___imul___line_793, sizeof(__pyx_k_clifford___imul___line_793), 0, 1, 0, 0},
19984  {&__pyx_kp_u_clifford___ior___line_950, __pyx_k_clifford___ior___line_950, sizeof(__pyx_k_clifford___ior___line_950), 0, 1, 0, 0},
19985  {&__pyx_kp_u_clifford___isub___line_771, __pyx_k_clifford___isub___line_771, sizeof(__pyx_k_clifford___isub___line_771), 0, 1, 0, 0},
19986  {&__pyx_kp_u_clifford___iter___line_638, __pyx_k_clifford___iter___line_638, sizeof(__pyx_k_clifford___iter___line_638), 0, 1, 0, 0},
19987  {&__pyx_kp_u_clifford___ixor___line_881, __pyx_k_clifford___ixor___line_881, sizeof(__pyx_k_clifford___ixor___line_881), 0, 1, 0, 0},
19988  {&__pyx_kp_u_clifford___mod___line_806, __pyx_k_clifford___mod___line_806, sizeof(__pyx_k_clifford___mod___line_806), 0, 1, 0, 0},
19989  {&__pyx_kp_u_clifford___mul___line_780, __pyx_k_clifford___mul___line_780, sizeof(__pyx_k_clifford___mul___line_780), 0, 1, 0, 0},
19990  {&__pyx_kp_u_clifford___neg___line_722, __pyx_k_clifford___neg___line_722, sizeof(__pyx_k_clifford___neg___line_722), 0, 1, 0, 0},
19991  {&__pyx_kp_u_clifford___or___line_939, __pyx_k_clifford___or___line_939, sizeof(__pyx_k_clifford___or___line_939), 0, 1, 0, 0},
19992  {&__pyx_kp_u_clifford___pos___line_731, __pyx_k_clifford___pos___line_731, sizeof(__pyx_k_clifford___pos___line_731), 0, 1, 0, 0},
19993  {&__pyx_kp_u_clifford___pow___line_961, __pyx_k_clifford___pow___line_961, sizeof(__pyx_k_clifford___pow___line_961), 0, 1, 0, 0},
19994  {&__pyx_kp_u_clifford___repr___line_1226, __pyx_k_clifford___repr___line_1226, sizeof(__pyx_k_clifford___repr___line_1226), 0, 1, 0, 0},
19995  {&__pyx_kp_u_clifford___str___line_1235, __pyx_k_clifford___str___line_1235, sizeof(__pyx_k_clifford___str___line_1235), 0, 1, 0, 0},
19996  {&__pyx_kp_u_clifford___sub___line_760, __pyx_k_clifford___sub___line_760, sizeof(__pyx_k_clifford___sub___line_760), 0, 1, 0, 0},
19997  {&__pyx_kp_u_clifford___truediv___line_896, __pyx_k_clifford___truediv___line_896, sizeof(__pyx_k_clifford___truediv___line_896), 0, 1, 0, 0},
19998  {&__pyx_kp_u_clifford___xor___line_866, __pyx_k_clifford___xor___line_866, sizeof(__pyx_k_clifford___xor___line_866), 0, 1, 0, 0},
19999  {&__pyx_kp_u_clifford_abs_line_1175, __pyx_k_clifford_abs_line_1175, sizeof(__pyx_k_clifford_abs_line_1175), 0, 1, 0, 0},
20000  {&__pyx_kp_u_clifford_conj_line_1138, __pyx_k_clifford_conj_line_1138, sizeof(__pyx_k_clifford_conj_line_1138), 0, 1, 0, 0},
20001  {&__pyx_kp_u_clifford_copy_line_556, __pyx_k_clifford_copy_line_556, sizeof(__pyx_k_clifford_copy_line_556), 0, 1, 0, 0},
20002  {&__pyx_kp_u_clifford_even_line_1061, __pyx_k_clifford_even_line_1061, sizeof(__pyx_k_clifford_even_line_1061), 0, 1, 0, 0},
20003  {&__pyx_kp_u_clifford_frame_line_1215, __pyx_k_clifford_frame_line_1215, sizeof(__pyx_k_clifford_frame_line_1215), 0, 1, 0, 0},
20004  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
20005  {&__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},
20006  {&__pyx_kp_u_clifford_inv_line_926, __pyx_k_clifford_inv_line_926, sizeof(__pyx_k_clifford_inv_line_926), 0, 1, 0, 0},
20007  {&__pyx_kp_u_clifford_involute_line_1107, __pyx_k_clifford_involute_line_1107, sizeof(__pyx_k_clifford_involute_line_1107), 0, 1, 0, 0},
20008  {&__pyx_kp_u_clifford_isnan_line_1206, __pyx_k_clifford_isnan_line_1206, sizeof(__pyx_k_clifford_isnan_line_1206), 0, 1, 0, 0},
20009  {&__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},
20010  {&__pyx_kp_u_clifford_norm_line_1164, __pyx_k_clifford_norm_line_1164, sizeof(__pyx_k_clifford_norm_line_1164), 0, 1, 0, 0},
20011  {&__pyx_kp_u_clifford_odd_line_1070, __pyx_k_clifford_odd_line_1070, sizeof(__pyx_k_clifford_odd_line_1070), 0, 1, 0, 0},
20012  {&__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},
20013  {&__pyx_kp_u_clifford_pow_line_980, __pyx_k_clifford_pow_line_980, sizeof(__pyx_k_clifford_pow_line_980), 0, 1, 0, 0},
20014  {&__pyx_kp_u_clifford_pure_line_1050, __pyx_k_clifford_pure_line_1050, sizeof(__pyx_k_clifford_pure_line_1050), 0, 1, 0, 0},
20015  {&__pyx_kp_u_clifford_quad_line_1153, __pyx_k_clifford_quad_line_1153, sizeof(__pyx_k_clifford_quad_line_1153), 0, 1, 0, 0},
20016  {&__pyx_kp_u_clifford_reframe_line_649, __pyx_k_clifford_reframe_line_649, sizeof(__pyx_k_clifford_reframe_line_649), 0, 1, 0, 0},
20017  {&__pyx_kp_u_clifford_reverse_line_1123, __pyx_k_clifford_reverse_line_1123, sizeof(__pyx_k_clifford_reverse_line_1123), 0, 1, 0, 0},
20018  {&__pyx_kp_u_clifford_scalar_line_1039, __pyx_k_clifford_scalar_line_1039, sizeof(__pyx_k_clifford_scalar_line_1039), 0, 1, 0, 0},
20019  {&__pyx_kp_u_clifford_truncated_line_1195, __pyx_k_clifford_truncated_line_1195, sizeof(__pyx_k_clifford_truncated_line_1195), 0, 1, 0, 0},
20020  {&__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},
20021  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
20022  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
20023  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
20024  {&__pyx_kp_u_compare_line_492, __pyx_k_compare_line_492, sizeof(__pyx_k_compare_line_492), 0, 1, 0, 0},
20025  {&__pyx_kp_u_complexifier_line_1526, __pyx_k_complexifier_line_1526, sizeof(__pyx_k_complexifier_line_1526), 0, 1, 0, 0},
20026  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
20027  {&__pyx_kp_u_conj_line_1435, __pyx_k_conj_line_1435, sizeof(__pyx_k_conj_line_1435), 0, 1, 0, 0},
20028  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
20029  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
20030  {&__pyx_kp_u_cos_line_1601, __pyx_k_cos_line_1601, sizeof(__pyx_k_cos_line_1601), 0, 1, 0, 0},
20031  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
20032  {&__pyx_kp_u_cosh_line_1639, __pyx_k_cosh_line_1639, sizeof(__pyx_k_cosh_line_1639), 0, 1, 0, 0},
20033  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
20034  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
20035  {&__pyx_kp_u_e_line_1886, __pyx_k_e_line_1886, sizeof(__pyx_k_e_line_1886), 0, 1, 0, 0},
20036  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
20037  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
20038  {&__pyx_kp_u_even_line_1387, __pyx_k_even_line_1387, sizeof(__pyx_k_even_line_1387), 0, 1, 0, 0},
20039  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
20040  {&__pyx_kp_u_exp_line_1564, __pyx_k_exp_line_1564, sizeof(__pyx_k_exp_line_1564), 0, 1, 0, 0},
20041  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
20042  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
20043  {&__pyx_kp_u_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 1, 0, 0},
20044  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
20045  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
20046  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
20047  {&__pyx_kp_u_imag_line_1365, __pyx_k_imag_line_1365, sizeof(__pyx_k_imag_line_1365), 0, 1, 0, 0},
20048  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
20049  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
20050  {&__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},
20051  {&__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},
20052  {&__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},
20053  {&__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},
20054  {&__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},
20055  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
20056  {&__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},
20057  {&__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},
20058  {&__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},
20059  {&__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},
20060  {&__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},
20061  {&__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},
20062  {&__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},
20063  {&__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},
20064  {&__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},
20065  {&__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},
20066  {&__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},
20067  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
20068  {&__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},
20069  {&__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},
20070  {&__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},
20071  {&__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},
20072  {&__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},
20073  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
20074  {&__pyx_kp_u_inv_line_1328, __pyx_k_inv_line_1328, sizeof(__pyx_k_inv_line_1328), 0, 1, 0, 0},
20075  {&__pyx_kp_u_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 1, 0, 0},
20076  {&__pyx_kp_u_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 1, 0, 0},
20077  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
20078  {&__pyx_kp_u_involute_line_1405, __pyx_k_involute_line_1405, sizeof(__pyx_k_involute_line_1405), 0, 1, 0, 0},
20079  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
20080  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
20081  {&__pyx_kp_u_istpq_line_1899, __pyx_k_istpq_line_1899, sizeof(__pyx_k_istpq_line_1899), 0, 1, 0, 0},
20082  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
20083  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
20084  {&__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},
20085  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
20086  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
20087  {&__pyx_kp_u_log_line_1578, __pyx_k_log_line_1578, sizeof(__pyx_k_log_line_1578), 0, 1, 0, 0},
20088  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
20089  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
20090  {&__pyx_n_u_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 1, 0, 1},
20091  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
20092  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
20093  {&__pyx_kp_u_max_abs_line_1481, __pyx_k_max_abs_line_1481, sizeof(__pyx_k_max_abs_line_1481), 0, 1, 0, 0},
20094  {&__pyx_kp_u_max_pos_line_513, __pyx_k_max_pos_line_513, sizeof(__pyx_k_max_pos_line_513), 0, 1, 0, 0},
20095  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
20096  {&__pyx_kp_u_min_neg_line_504, __pyx_k_min_neg_line_504, sizeof(__pyx_k_min_neg_line_504), 0, 1, 0, 0},
20097  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
20098  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
20099  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
20100  {&__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},
20101  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
20102  {&__pyx_kp_u_norm_line_1461, __pyx_k_norm_line_1461, sizeof(__pyx_k_norm_line_1461), 0, 1, 0, 0},
20103  {&__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},
20104  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
20105  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
20106  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
20107  {&__pyx_kp_u_odd_line_1396, __pyx_k_odd_line_1396, sizeof(__pyx_k_odd_line_1396), 0, 1, 0, 0},
20108  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
20109  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
20110  {&__pyx_kp_u_outer_pow_line_1517, __pyx_k_outer_pow_line_1517, sizeof(__pyx_k_outer_pow_line_1517), 0, 1, 0, 0},
20111  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
20112  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
20113  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
20114  {&__pyx_kp_u_pow_line_1493, __pyx_k_pow_line_1493, sizeof(__pyx_k_pow_line_1493), 0, 1, 0, 0},
20115  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
20116  {&__pyx_kp_u_pure_line_1376, __pyx_k_pure_line_1376, sizeof(__pyx_k_pure_line_1376), 0, 1, 0, 0},
20117  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
20118  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
20119  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
20120  {&__pyx_kp_u_quad_line_1450, __pyx_k_quad_line_1450, sizeof(__pyx_k_quad_line_1450), 0, 1, 0, 0},
20121  {&__pyx_kp_u_random_clifford_line_1814, __pyx_k_random_clifford_line_1814, sizeof(__pyx_k_random_clifford_line_1814), 0, 1, 0, 0},
20122  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
20123  {&__pyx_kp_u_real_line_1354, __pyx_k_real_line_1354, sizeof(__pyx_k_real_line_1354), 0, 1, 0, 0},
20124  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
20125  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
20126  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
20127  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
20128  {&__pyx_kp_u_reverse_line_1420, __pyx_k_reverse_line_1420, sizeof(__pyx_k_reverse_line_1420), 0, 1, 0, 0},
20129  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
20130  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
20131  {&__pyx_n_s_scalar_epsilon, __pyx_k_scalar_epsilon, sizeof(__pyx_k_scalar_epsilon), 0, 0, 1, 1},
20132  {&__pyx_kp_u_scalar_line_1343, __pyx_k_scalar_line_1343, sizeof(__pyx_k_scalar_line_1343), 0, 1, 0, 0},
20133  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
20134  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
20135  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
20136  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
20137  {&__pyx_kp_u_sin_line_1678, __pyx_k_sin_line_1678, sizeof(__pyx_k_sin_line_1678), 0, 1, 0, 0},
20138  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
20139  {&__pyx_kp_u_sinh_line_1718, __pyx_k_sinh_line_1718, sizeof(__pyx_k_sinh_line_1718), 0, 1, 0, 0},
20140  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
20141  {&__pyx_kp_u_sqrt_line_1541, __pyx_k_sqrt_line_1541, sizeof(__pyx_k_sqrt_line_1541), 0, 1, 0, 0},
20142  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
20143  {&__pyx_kp_u_tan_line_1751, __pyx_k_tan_line_1751, sizeof(__pyx_k_tan_line_1751), 0, 1, 0, 0},
20144  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
20145  {&__pyx_kp_u_tanh_line_1785, __pyx_k_tanh_line_1785, sizeof(__pyx_k_tanh_line_1785), 0, 1, 0, 0},
20146  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
20147  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
20148  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
20149  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
20150  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
20151  {&__pyx_kp_u_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 1, 0, 0},
20152  {&__pyx_kp_u_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 1, 0, 0},
20153  {&__pyx_kp_u_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 1, 0, 0},
20154  {&__pyx_kp_u_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 1, 0, 0},
20155  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
20156  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
20157  {0, 0, 0, 0, 0, 0, 0}
20158 };
20159 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
20160  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 103, __pyx_L1_error)
20161  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 105, __pyx_L1_error)
20162  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 105, __pyx_L1_error)
20163  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 106, __pyx_L1_error)
20164  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 159, __pyx_L1_error)
20165  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 236, __pyx_L1_error)
20166  #if PY_MAJOR_VERSION >= 3
20167  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1099, __pyx_L1_error)
20168  #else
20169  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1099, __pyx_L1_error)
20170  #endif
20171  return 0;
20172  __pyx_L1_error:;
20173  return -1;
20174 }
20175 
20176 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
20177  __Pyx_RefNannyDeclarations
20178  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
20179 
20180  /* "(tree fragment)":2
20181  * def __reduce_cython__(self):
20182  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20183  * def __setstate_cython__(self, __pyx_state):
20184  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20185  */
20186  __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)
20187  __Pyx_GOTREF(__pyx_tuple__3);
20188  __Pyx_GIVEREF(__pyx_tuple__3);
20189 
20190  /* "(tree fragment)":4
20191  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20192  * def __setstate_cython__(self, __pyx_state):
20193  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20194  */
20195  __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)
20196  __Pyx_GOTREF(__pyx_tuple__4);
20197  __Pyx_GIVEREF(__pyx_tuple__4);
20198 
20199  /* "PyClical.pyx":636
20200  * TypeError: Not applicable.
20201  * """
20202  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
20203  *
20204  * def __iter__(self):
20205  */
20206  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 636, __pyx_L1_error)
20207  __Pyx_GOTREF(__pyx_tuple__10);
20208  __Pyx_GIVEREF(__pyx_tuple__10);
20209 
20210  /* "(tree fragment)":2
20211  * def __reduce_cython__(self):
20212  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20213  * def __setstate_cython__(self, __pyx_state):
20214  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20215  */
20216  __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)
20217  __Pyx_GOTREF(__pyx_tuple__11);
20218  __Pyx_GIVEREF(__pyx_tuple__11);
20219 
20220  /* "(tree fragment)":4
20221  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20222  * def __setstate_cython__(self, __pyx_state):
20223  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20224  */
20225  __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)
20226  __Pyx_GOTREF(__pyx_tuple__12);
20227  __Pyx_GIVEREF(__pyx_tuple__12);
20228 
20229  /* "PyClical.pyx":406
20230  * return index_set_to_str( self.unwrap() ).decode()
20231  *
20232  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
20233  * """
20234  * Tests for functions that Doctest cannot see.
20235  */
20236  __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)
20237 
20238  /* "PyClical.pyx":1244
20239  * return clifford_to_str( self.unwrap() ).decode()
20240  *
20241  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20242  * """
20243  * Tests for functions that Doctest cannot see.
20244  */
20245  __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)
20246 
20247  /* "PyClical.pyx":1857
20248  * scalar_epsilon = epsilon
20249  *
20250  * pi = atan(clifford(1.0)) * 4.0 # <<<<<<<<<<<<<<
20251  * tau = atan(clifford(1.0)) * 8.0
20252  *
20253  */
20254  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1857, __pyx_L1_error)
20255  __Pyx_GOTREF(__pyx_tuple__15);
20256  __Pyx_GIVEREF(__pyx_tuple__15);
20257 
20258  /* "PyClical.pyx":1886
20259  * """
20260  *
20261  * def e(obj): # <<<<<<<<<<<<<<
20262  * """
20263  * Abbreviation for clifford(index_set(obj)).
20264  */
20265  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1886, __pyx_L1_error)
20266  __Pyx_GOTREF(__pyx_tuple__16);
20267  __Pyx_GIVEREF(__pyx_tuple__16);
20268  __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)
20269 
20270  /* "PyClical.pyx":1899
20271  * return clifford(index_set(obj))
20272  *
20273  * def istpq(p, q): # <<<<<<<<<<<<<<
20274  * """
20275  * Abbreviation for index_set({-q,...p}).
20276  */
20277  __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)
20278  __Pyx_GOTREF(__pyx_tuple__18);
20279  __Pyx_GIVEREF(__pyx_tuple__18);
20280  __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)
20281 
20282  /* "PyClical.pyx":1908
20283  * return index_set(set(range(-q,p+1)))
20284  *
20285  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20286  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20287  *
20288  */
20289  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1908, __pyx_L1_error)
20290  __Pyx_GOTREF(__pyx_tuple__20);
20291  __Pyx_GIVEREF(__pyx_tuple__20);
20292  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1908, __pyx_L1_error)
20293  __Pyx_GOTREF(__pyx_tuple__21);
20294  __Pyx_GIVEREF(__pyx_tuple__21);
20295 
20296  /* "PyClical.pyx":1912
20297  *
20298  * # Doctest interface.
20299  * def _test(): # <<<<<<<<<<<<<<
20300  * import PyClical, doctest
20301  * return doctest.testmod(PyClical)
20302  */
20303  __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)
20304  __Pyx_GOTREF(__pyx_tuple__22);
20305  __Pyx_GIVEREF(__pyx_tuple__22);
20306  __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)
20307  __Pyx_RefNannyFinishContext();
20308  return 0;
20309  __pyx_L1_error:;
20310  __Pyx_RefNannyFinishContext();
20311  return -1;
20312 }
20313 
20314 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
20315  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20316  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20317  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20318  __pyx_float_4_0 = PyFloat_FromDouble(4.0); if (unlikely(!__pyx_float_4_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20319  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20320  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20321  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20322  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
20323  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20324  return 0;
20325  __pyx_L1_error:;
20326  return -1;
20327 }
20328 
20329 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
20330 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
20331 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
20332 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
20333 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
20334 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
20335 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
20336 
20337 static int __Pyx_modinit_global_init_code(void) {
20338  __Pyx_RefNannyDeclarations
20339  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
20340  /*--- Global init code ---*/
20341  __Pyx_RefNannyFinishContext();
20342  return 0;
20343 }
20344 
20345 static int __Pyx_modinit_variable_export_code(void) {
20346  __Pyx_RefNannyDeclarations
20347  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
20348  /*--- Variable export code ---*/
20349  __Pyx_RefNannyFinishContext();
20350  return 0;
20351 }
20352 
20353 static int __Pyx_modinit_function_export_code(void) {
20354  __Pyx_RefNannyDeclarations
20355  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
20356  /*--- Function export code ---*/
20357  __Pyx_RefNannyFinishContext();
20358  return 0;
20359 }
20360 
20361 static int __Pyx_modinit_type_init_code(void) {
20362  __Pyx_RefNannyDeclarations
20363  int __pyx_lineno = 0;
20364  const char *__pyx_filename = NULL;
20365  int __pyx_clineno = 0;
20366  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
20367  /*--- Type init code ---*/
20368  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
20369  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
20370  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
20371  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
20372  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
20373  #if PY_VERSION_HEX < 0x030800B1
20374  __pyx_type_8PyClical_index_set.tp_print = 0;
20375  #endif
20376  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)) {
20377  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
20378  }
20379  #if CYTHON_COMPILING_IN_CPYTHON
20380  {
20381  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20382  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20383  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20384  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
20385  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
20386  }
20387  }
20388  #endif
20389  #if CYTHON_COMPILING_IN_CPYTHON
20390  {
20391  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20392  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20393  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20394  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
20395  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
20396  }
20397  }
20398  #endif
20399  #if CYTHON_COMPILING_IN_CPYTHON
20400  {
20401  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20402  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20403  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20404  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
20405  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
20406  }
20407  }
20408  #endif
20409  #if CYTHON_COMPILING_IN_CPYTHON
20410  {
20411  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20412  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20413  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20414  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
20415  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
20416  }
20417  }
20418  #endif
20419  #if CYTHON_COMPILING_IN_CPYTHON
20420  {
20421  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20422  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20423  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20424  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
20425  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
20426  }
20427  }
20428  #endif
20429  #if CYTHON_COMPILING_IN_CPYTHON
20430  {
20431  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20432  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20433  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20434  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
20435  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
20436  }
20437  }
20438  #endif
20439  #if CYTHON_COMPILING_IN_CPYTHON
20440  {
20441  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20442  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20443  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20444  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
20445  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
20446  }
20447  }
20448  #endif
20449  #if CYTHON_COMPILING_IN_CPYTHON
20450  {
20451  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20452  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20453  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20454  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
20455  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
20456  }
20457  }
20458  #endif
20459  #if CYTHON_COMPILING_IN_CPYTHON
20460  {
20461  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20462  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20463  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20464  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
20465  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
20466  }
20467  }
20468  #endif
20469  #if CYTHON_COMPILING_IN_CPYTHON
20470  {
20471  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20472  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20473  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20474  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
20475  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
20476  }
20477  }
20478  #endif
20479  #if CYTHON_COMPILING_IN_CPYTHON
20480  {
20481  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20482  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20483  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20484  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
20485  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
20486  }
20487  }
20488  #endif
20489  #if CYTHON_COMPILING_IN_CPYTHON
20490  {
20491  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20492  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20493  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20494  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
20495  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
20496  }
20497  }
20498  #endif
20499  #if CYTHON_COMPILING_IN_CPYTHON
20500  {
20501  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
20502  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20503  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20504  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
20505  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
20506  }
20507  }
20508  #endif
20509  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
20510  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
20511  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
20512  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
20513  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
20514  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
20515  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
20516  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
20517  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20518  #if PY_VERSION_HEX < 0x030800B1
20519  __pyx_type_8PyClical_clifford.tp_print = 0;
20520  #endif
20521  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
20522  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
20523  }
20524  #if CYTHON_COMPILING_IN_CPYTHON
20525  {
20526  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20527  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20528  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20529  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
20530  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
20531  }
20532  }
20533  #endif
20534  #if CYTHON_COMPILING_IN_CPYTHON
20535  {
20536  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20537  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20538  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20539  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
20540  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
20541  }
20542  }
20543  #endif
20544  #if CYTHON_COMPILING_IN_CPYTHON
20545  {
20546  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20547  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20548  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20549  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
20550  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
20551  }
20552  }
20553  #endif
20554  #if CYTHON_COMPILING_IN_CPYTHON
20555  {
20556  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20557  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20558  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20559  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
20560  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
20561  }
20562  }
20563  #endif
20564  #if CYTHON_COMPILING_IN_CPYTHON
20565  {
20566  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20567  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20568  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20569  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
20570  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
20571  }
20572  }
20573  #endif
20574  #if CYTHON_COMPILING_IN_CPYTHON
20575  {
20576  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20577  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20578  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20579  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
20580  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
20581  }
20582  }
20583  #endif
20584  #if CYTHON_COMPILING_IN_CPYTHON
20585  {
20586  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20587  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20588  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20589  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
20590  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
20591  }
20592  }
20593  #endif
20594  #if CYTHON_COMPILING_IN_CPYTHON
20595  {
20596  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20597  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20598  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20599  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
20600  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
20601  }
20602  }
20603  #endif
20604  #if CYTHON_COMPILING_IN_CPYTHON
20605  {
20606  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20607  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20608  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20609  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
20610  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
20611  }
20612  }
20613  #endif
20614  #if CYTHON_COMPILING_IN_CPYTHON
20615  {
20616  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20617  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20618  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20619  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
20620  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
20621  }
20622  }
20623  #endif
20624  #if CYTHON_COMPILING_IN_CPYTHON
20625  {
20626  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20627  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20628  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20629  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
20630  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
20631  }
20632  }
20633  #endif
20634  #if CYTHON_COMPILING_IN_CPYTHON
20635  {
20636  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20637  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20638  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20639  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
20640  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
20641  }
20642  }
20643  #endif
20644  #if CYTHON_COMPILING_IN_CPYTHON
20645  {
20646  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20647  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20648  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20649  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
20650  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
20651  }
20652  }
20653  #endif
20654  #if CYTHON_COMPILING_IN_CPYTHON
20655  {
20656  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20657  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20658  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20659  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
20660  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
20661  }
20662  }
20663  #endif
20664  #if CYTHON_COMPILING_IN_CPYTHON
20665  {
20666  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20667  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20668  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20669  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
20670  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
20671  }
20672  }
20673  #endif
20674  #if CYTHON_COMPILING_IN_CPYTHON
20675  {
20676  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20677  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20678  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20679  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
20680  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
20681  }
20682  }
20683  #endif
20684  #if CYTHON_COMPILING_IN_CPYTHON
20685  {
20686  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20687  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20688  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20689  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
20690  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
20691  }
20692  }
20693  #endif
20694  #if CYTHON_COMPILING_IN_CPYTHON
20695  {
20696  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__truediv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20697  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20698  __pyx_wrapperbase_8PyClical_8clifford_44__truediv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20699  __pyx_wrapperbase_8PyClical_8clifford_44__truediv__.doc = __pyx_doc_8PyClical_8clifford_44__truediv__;
20700  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__truediv__;
20701  }
20702  }
20703  #endif
20704  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20705  #if CYTHON_COMPILING_IN_CPYTHON
20706  {
20707  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20708  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20709  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20710  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
20711  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
20712  }
20713  }
20714  #endif
20715  #endif
20716  #if CYTHON_COMPILING_IN_CPYTHON
20717  {
20718  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20719  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20720  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20721  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
20722  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
20723  }
20724  }
20725  #endif
20726  #if CYTHON_COMPILING_IN_CPYTHON
20727  {
20728  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20729  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20730  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20731  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
20732  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
20733  }
20734  }
20735  #endif
20736  #if CYTHON_COMPILING_IN_CPYTHON
20737  {
20738  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20739  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20740  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20741  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
20742  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
20743  }
20744  }
20745  #endif
20746  #if CYTHON_COMPILING_IN_CPYTHON
20747  {
20748  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20749  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20750  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20751  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
20752  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
20753  }
20754  }
20755  #endif
20756  #if CYTHON_COMPILING_IN_CPYTHON
20757  {
20758  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20759  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20760  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20761  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
20762  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
20763  }
20764  }
20765  #endif
20766  #if CYTHON_COMPILING_IN_CPYTHON
20767  {
20768  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
20769  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20770  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20771  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
20772  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
20773  }
20774  }
20775  #endif
20776  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20777  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20778  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
20779  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
20780  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
20781  #if PY_VERSION_HEX < 0x030800B1
20782  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
20783  #endif
20784  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)) {
20785  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
20786  }
20787  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
20788  __Pyx_RefNannyFinishContext();
20789  return 0;
20790  __pyx_L1_error:;
20791  __Pyx_RefNannyFinishContext();
20792  return -1;
20793 }
20794 
20795 static int __Pyx_modinit_type_import_code(void) {
20796  __Pyx_RefNannyDeclarations
20797  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
20798  /*--- Type import code ---*/
20799  __Pyx_RefNannyFinishContext();
20800  return 0;
20801 }
20802 
20803 static int __Pyx_modinit_variable_import_code(void) {
20804  __Pyx_RefNannyDeclarations
20805  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
20806  /*--- Variable import code ---*/
20807  __Pyx_RefNannyFinishContext();
20808  return 0;
20809 }
20810 
20811 static int __Pyx_modinit_function_import_code(void) {
20812  __Pyx_RefNannyDeclarations
20813  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
20814  /*--- Function import code ---*/
20815  __Pyx_RefNannyFinishContext();
20816  return 0;
20817 }
20818 
20819 
20820 #ifndef CYTHON_NO_PYINIT_EXPORT
20821 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
20822 #elif PY_MAJOR_VERSION < 3
20823 #ifdef __cplusplus
20824 #define __Pyx_PyMODINIT_FUNC extern "C" void
20825 #else
20826 #define __Pyx_PyMODINIT_FUNC void
20827 #endif
20828 #else
20829 #ifdef __cplusplus
20830 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
20831 #else
20832 #define __Pyx_PyMODINIT_FUNC PyObject *
20833 #endif
20834 #endif
20835 
20836 
20837 #if PY_MAJOR_VERSION < 3
20838 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
20839 __Pyx_PyMODINIT_FUNC initPyClical(void)
20840 #else
20841 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
20842 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
20843 #if CYTHON_PEP489_MULTI_PHASE_INIT
20844 {
20845  return PyModuleDef_Init(&__pyx_moduledef);
20846 }
20847 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
20848  #if PY_VERSION_HEX >= 0x030700A1
20849  static PY_INT64_T main_interpreter_id = -1;
20850  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
20851  if (main_interpreter_id == -1) {
20852  main_interpreter_id = current_id;
20853  return (unlikely(current_id == -1)) ? -1 : 0;
20854  } else if (unlikely(main_interpreter_id != current_id))
20855  #else
20856  static PyInterpreterState *main_interpreter = NULL;
20857  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
20858  if (!main_interpreter) {
20859  main_interpreter = current_interpreter;
20860  } else if (unlikely(main_interpreter != current_interpreter))
20861  #endif
20862  {
20863  PyErr_SetString(
20864  PyExc_ImportError,
20865  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
20866  return -1;
20867  }
20868  return 0;
20869 }
20870 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) {
20871  PyObject *value = PyObject_GetAttrString(spec, from_name);
20872  int result = 0;
20873  if (likely(value)) {
20874  if (allow_none || value != Py_None) {
20875  result = PyDict_SetItemString(moddict, to_name, value);
20876  }
20877  Py_DECREF(value);
20878  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
20879  PyErr_Clear();
20880  } else {
20881  result = -1;
20882  }
20883  return result;
20884 }
20885 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
20886  PyObject *module = NULL, *moddict, *modname;
20887  if (__Pyx_check_single_interpreter())
20888  return NULL;
20889  if (__pyx_m)
20890  return __Pyx_NewRef(__pyx_m);
20891  modname = PyObject_GetAttrString(spec, "name");
20892  if (unlikely(!modname)) goto bad;
20893  module = PyModule_NewObject(modname);
20894  Py_DECREF(modname);
20895  if (unlikely(!module)) goto bad;
20896  moddict = PyModule_GetDict(module);
20897  if (unlikely(!moddict)) goto bad;
20898  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
20899  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
20900  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
20901  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
20902  return module;
20903 bad:
20904  Py_XDECREF(module);
20905  return NULL;
20906 }
20907 
20908 
20909 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
20910 #endif
20911 #endif
20912 {
20913  PyObject *__pyx_t_1 = NULL;
20914  PyObject *__pyx_t_2 = NULL;
20915  PyObject *__pyx_t_3 = NULL;
20916  int __pyx_t_4;
20917  int __pyx_lineno = 0;
20918  const char *__pyx_filename = NULL;
20919  int __pyx_clineno = 0;
20920  __Pyx_RefNannyDeclarations
20921  #if CYTHON_PEP489_MULTI_PHASE_INIT
20922  if (__pyx_m) {
20923  if (__pyx_m == __pyx_pyinit_module) return 0;
20924  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
20925  return -1;
20926  }
20927  #elif PY_MAJOR_VERSION >= 3
20928  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
20929  #endif
20930  #if CYTHON_REFNANNY
20931 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
20932 if (!__Pyx_RefNanny) {
20933  PyErr_Clear();
20934  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
20935  if (!__Pyx_RefNanny)
20936  Py_FatalError("failed to import 'refnanny' module");
20937 }
20938 #endif
20939  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
20940  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20941  #ifdef __Pxy_PyFrame_Initialize_Offsets
20942  __Pxy_PyFrame_Initialize_Offsets();
20943  #endif
20944  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
20945  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
20946  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
20947  #ifdef __Pyx_CyFunction_USED
20948  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20949  #endif
20950  #ifdef __Pyx_FusedFunction_USED
20951  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20952  #endif
20953  #ifdef __Pyx_Coroutine_USED
20954  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20955  #endif
20956  #ifdef __Pyx_Generator_USED
20957  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20958  #endif
20959  #ifdef __Pyx_AsyncGen_USED
20960  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20961  #endif
20962  #ifdef __Pyx_StopAsyncIteration_USED
20963  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20964  #endif
20965  /*--- Library function declarations ---*/
20966  /*--- Threads initialization code ---*/
20967  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
20968  #ifdef WITH_THREAD /* Python build with threading support? */
20969  PyEval_InitThreads();
20970  #endif
20971  #endif
20972  /*--- Module creation code ---*/
20973  #if CYTHON_PEP489_MULTI_PHASE_INIT
20974  __pyx_m = __pyx_pyinit_module;
20975  Py_INCREF(__pyx_m);
20976  #else
20977  #if PY_MAJOR_VERSION < 3
20978  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
20979  #else
20980  __pyx_m = PyModule_Create(&__pyx_moduledef);
20981  #endif
20982  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
20983  #endif
20984  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
20985  Py_INCREF(__pyx_d);
20986  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
20987  Py_INCREF(__pyx_b);
20988  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
20989  Py_INCREF(__pyx_cython_runtime);
20990  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20991  /*--- Initialize various global constants etc. ---*/
20992  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20993  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
20994  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20995  #endif
20996  if (__pyx_module_is_main_PyClical) {
20997  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20998  }
20999  #if PY_MAJOR_VERSION >= 3
21000  {
21001  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
21002  if (!PyDict_GetItemString(modules, "PyClical")) {
21003  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
21004  }
21005  }
21006  #endif
21007  /*--- Builtin init code ---*/
21008  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21009  /*--- Constants init code ---*/
21010  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21011  /*--- Global type/function init code ---*/
21012  (void)__Pyx_modinit_global_init_code();
21013  (void)__Pyx_modinit_variable_export_code();
21014  (void)__Pyx_modinit_function_export_code();
21015  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
21016  (void)__Pyx_modinit_type_import_code();
21017  (void)__Pyx_modinit_variable_import_code();
21018  (void)__Pyx_modinit_function_import_code();
21019  /*--- Execution code ---*/
21020  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
21021  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21022  #endif
21023 
21024  /* "PyClical.pyx":29
21025  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
21026  *
21027  * import math # <<<<<<<<<<<<<<
21028  * import numbers
21029  * import collections
21030  */
21031  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
21032  __Pyx_GOTREF(__pyx_t_1);
21033  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
21034  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21035 
21036  /* "PyClical.pyx":30
21037  *
21038  * import math
21039  * import numbers # <<<<<<<<<<<<<<
21040  * import collections
21041  *
21042  */
21043  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
21044  __Pyx_GOTREF(__pyx_t_1);
21045  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
21046  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21047 
21048  /* "PyClical.pyx":31
21049  * import math
21050  * import numbers
21051  * import collections # <<<<<<<<<<<<<<
21052  *
21053  * __version__ = "0.8.4"
21054  */
21055  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
21056  __Pyx_GOTREF(__pyx_t_1);
21057  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
21058  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21059 
21060  /* "PyClical.pyx":33
21061  * import collections
21062  *
21063  * __version__ = "0.8.4" # <<<<<<<<<<<<<<
21064  *
21065  * from PyClical cimport *
21066  */
21067  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_0_8_4) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
21068 
21069  /* "PyClical.pyx":406
21070  * return index_set_to_str( self.unwrap() ).decode()
21071  *
21072  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
21073  * """
21074  * Tests for functions that Doctest cannot see.
21075  */
21076  __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)
21077  __Pyx_GOTREF(__pyx_t_1);
21078  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 406, __pyx_L1_error)
21079  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21080 
21081  /* "PyClical.pyx":1244
21082  * return clifford_to_str( self.unwrap() ).decode()
21083  *
21084  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
21085  * """
21086  * Tests for functions that Doctest cannot see.
21087  */
21088  __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)
21089  __Pyx_GOTREF(__pyx_t_1);
21090  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1244, __pyx_L1_error)
21091  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21092 
21093  /* "PyClical.pyx":1855
21094  *
21095  * # Some abbreviations.
21096  * scalar_epsilon = epsilon # <<<<<<<<<<<<<<
21097  *
21098  * pi = atan(clifford(1.0)) * 4.0
21099  */
21100  __pyx_t_1 = PyFloat_FromDouble(epsilon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
21101  __Pyx_GOTREF(__pyx_t_1);
21102  if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalar_epsilon, __pyx_t_1) < 0) __PYX_ERR(0, 1855, __pyx_L1_error)
21103  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21104 
21105  /* "PyClical.pyx":1857
21106  * scalar_epsilon = epsilon
21107  *
21108  * pi = atan(clifford(1.0)) * 4.0 # <<<<<<<<<<<<<<
21109  * tau = atan(clifford(1.0)) * 8.0
21110  *
21111  */
21112  __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)
21113  __Pyx_GOTREF(__pyx_t_1);
21114  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
21115  __Pyx_GOTREF(__pyx_t_2);
21116  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21117  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_4_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
21118  __Pyx_GOTREF(__pyx_t_1);
21119  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21120  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_1) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
21121  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21122 
21123  /* "PyClical.pyx":1858
21124  *
21125  * pi = atan(clifford(1.0)) * 4.0
21126  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
21127  *
21128  * cl = clifford
21129  */
21130  __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)
21131  __Pyx_GOTREF(__pyx_t_1);
21132  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1858, __pyx_L1_error)
21133  __Pyx_GOTREF(__pyx_t_2);
21134  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21135  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __pyx_L1_error)
21136  __Pyx_GOTREF(__pyx_t_1);
21137  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21138  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1858, __pyx_L1_error)
21139  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21140 
21141  /* "PyClical.pyx":1860
21142  * tau = atan(clifford(1.0)) * 8.0
21143  *
21144  * cl = clifford # <<<<<<<<<<<<<<
21145  * """
21146  * Abbreviation for clifford.
21147  */
21148  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1860, __pyx_L1_error)
21149 
21150  /* "PyClical.pyx":1878
21151  * """
21152  *
21153  * ist = index_set # <<<<<<<<<<<<<<
21154  * """
21155  * Abbreviation for index_set.
21156  */
21157  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1878, __pyx_L1_error)
21158 
21159  /* "PyClical.pyx":1886
21160  * """
21161  *
21162  * def e(obj): # <<<<<<<<<<<<<<
21163  * """
21164  * Abbreviation for clifford(index_set(obj)).
21165  */
21166  __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)
21167  __Pyx_GOTREF(__pyx_t_1);
21168  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_1) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
21169  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21170 
21171  /* "PyClical.pyx":1899
21172  * return clifford(index_set(obj))
21173  *
21174  * def istpq(p, q): # <<<<<<<<<<<<<<
21175  * """
21176  * Abbreviation for index_set({-q,...p}).
21177  */
21178  __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)
21179  __Pyx_GOTREF(__pyx_t_1);
21180  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_1) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
21181  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21182 
21183  /* "PyClical.pyx":1908
21184  * return index_set(set(range(-q,p+1)))
21185  *
21186  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
21187  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
21188  *
21189  */
21190  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
21191  __Pyx_GOTREF(__pyx_t_1);
21192  __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)
21193  __Pyx_GOTREF(__pyx_t_2);
21194  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21195  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
21196  __Pyx_GOTREF(__pyx_t_1);
21197  __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)
21198  __Pyx_GOTREF(__pyx_t_3);
21199  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21200  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
21201  __Pyx_GOTREF(__pyx_t_1);
21202  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21203  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21204  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_1) < 0) __PYX_ERR(0, 1908, __pyx_L1_error)
21205  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21206 
21207  /* "PyClical.pyx":1909
21208  *
21209  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
21210  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
21211  *
21212  * # Doctest interface.
21213  */
21214  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
21215  __Pyx_GOTREF(__pyx_t_1);
21216  __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)
21217  __Pyx_GOTREF(__pyx_t_3);
21218  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21219  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
21220  __Pyx_GOTREF(__pyx_t_1);
21221  __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)
21222  __Pyx_GOTREF(__pyx_t_2);
21223  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21224  __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
21225  __Pyx_GOTREF(__pyx_t_1);
21226  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21227  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21228  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_1) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
21229  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21230 
21231  /* "PyClical.pyx":1912
21232  *
21233  * # Doctest interface.
21234  * def _test(): # <<<<<<<<<<<<<<
21235  * import PyClical, doctest
21236  * return doctest.testmod(PyClical)
21237  */
21238  __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)
21239  __Pyx_GOTREF(__pyx_t_1);
21240  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1912, __pyx_L1_error)
21241  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21242 
21243  /* "PyClical.pyx":1916
21244  * return doctest.testmod(PyClical)
21245  *
21246  * if __name__ == "__main__": # <<<<<<<<<<<<<<
21247  * _test()
21248  */
21249  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
21250  __Pyx_GOTREF(__pyx_t_1);
21251  __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)
21252  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21253  if (__pyx_t_4) {
21254 
21255  /* "PyClical.pyx":1917
21256  *
21257  * if __name__ == "__main__":
21258  * _test() # <<<<<<<<<<<<<<
21259  */
21260  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __pyx_L1_error)
21261  __Pyx_GOTREF(__pyx_t_1);
21262  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
21263  __Pyx_GOTREF(__pyx_t_2);
21264  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21265  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21266 
21267  /* "PyClical.pyx":1916
21268  * return doctest.testmod(PyClical)
21269  *
21270  * if __name__ == "__main__": # <<<<<<<<<<<<<<
21271  * _test()
21272  */
21273  }
21274 
21275  /* "PyClical.pyx":1
21276  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
21277  * # cython: language_level=3
21278  * # distutils: language = c++
21279  */
21280  __pyx_t_2 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
21281  __Pyx_GOTREF(__pyx_t_2);
21282  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)
21283  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)
21284  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)
21285  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)
21286  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)
21287  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)
21288  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)
21289  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)
21290  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)
21291  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)
21292  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)
21293  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)
21294  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)
21295  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)
21296  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)
21297  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)
21298  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)
21299  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)
21300  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)
21301  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)
21302  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)
21303  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)
21304  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)
21305  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)
21306  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)
21307  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)
21308  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)
21309  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)
21310  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)
21311  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)
21312  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)
21313  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)
21314  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)
21315  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)
21316  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)
21317  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)
21318  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)
21319  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)
21320  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)
21321  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)
21322  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)
21323  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)
21324  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)
21325  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)
21326  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)
21327  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)
21328  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)
21329  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)
21330  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)
21331  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)
21332  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)
21333  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)
21334  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)
21335  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)
21336  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)
21337  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)
21338  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)
21339  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)
21340  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)
21341  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)
21342  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)
21343  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)
21344  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)
21345  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)
21346  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)
21347  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)
21348  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)
21349  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)
21350  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)
21351  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)
21352  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)
21353  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)
21354  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)
21355  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)
21356  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)
21357  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)
21358  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)
21359  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)
21360  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)
21361  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)
21362  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)
21363  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)
21364  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)
21365  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)
21366  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)
21367  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)
21368  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)
21369  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)
21370  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)
21371  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)
21372  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)
21373  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)
21374  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)
21375  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)
21376  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)
21377  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)
21378  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)
21379  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)
21380  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)
21381  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)
21382  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)
21383  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)
21384  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)
21385  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)
21386  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)
21387  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)
21388  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)
21389  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21390  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21391 
21392  /* "string.to_py":55
21393  *
21394  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
21395  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
21396  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
21397  *
21398  */
21399 
21400  /*--- Wrapped vars code ---*/
21401 
21402  goto __pyx_L0;
21403  __pyx_L1_error:;
21404  __Pyx_XDECREF(__pyx_t_1);
21405  __Pyx_XDECREF(__pyx_t_2);
21406  __Pyx_XDECREF(__pyx_t_3);
21407  if (__pyx_m) {
21408  if (__pyx_d) {
21409  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
21410  }
21411  Py_CLEAR(__pyx_m);
21412  } else if (!PyErr_Occurred()) {
21413  PyErr_SetString(PyExc_ImportError, "init PyClical");
21414  }
21415  __pyx_L0:;
21416  __Pyx_RefNannyFinishContext();
21417  #if CYTHON_PEP489_MULTI_PHASE_INIT
21418  return (__pyx_m != NULL) ? 0 : -1;
21419  #elif PY_MAJOR_VERSION >= 3
21420  return __pyx_m;
21421  #else
21422  return;
21423  #endif
21424 }
21425 
21426 /* --- Runtime support code --- */
21427 /* Refnanny */
21428 #if CYTHON_REFNANNY
21429 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
21430  PyObject *m = NULL, *p = NULL;
21431  void *r = NULL;
21432  m = PyImport_ImportModule(modname);
21433  if (!m) goto end;
21434  p = PyObject_GetAttrString(m, "RefNannyAPI");
21435  if (!p) goto end;
21436  r = PyLong_AsVoidPtr(p);
21437 end:
21438  Py_XDECREF(p);
21439  Py_XDECREF(m);
21440  return (__Pyx_RefNannyAPIStruct *)r;
21441 }
21442 #endif
21443 
21444 /* PyObjectGetAttrStr */
21445 #if CYTHON_USE_TYPE_SLOTS
21446 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
21447  PyTypeObject* tp = Py_TYPE(obj);
21448  if (likely(tp->tp_getattro))
21449  return tp->tp_getattro(obj, attr_name);
21450 #if PY_MAJOR_VERSION < 3
21451  if (likely(tp->tp_getattr))
21452  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
21453 #endif
21454  return PyObject_GetAttr(obj, attr_name);
21455 }
21456 #endif
21457 
21458 /* GetBuiltinName */
21459 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
21460  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
21461  if (unlikely(!result)) {
21462  PyErr_Format(PyExc_NameError,
21463 #if PY_MAJOR_VERSION >= 3
21464  "name '%U' is not defined", name);
21465 #else
21466  "name '%.200s' is not defined", PyString_AS_STRING(name));
21467 #endif
21468  }
21469  return result;
21470 }
21471 
21472 /* PyCFunctionFastCall */
21473 #if CYTHON_FAST_PYCCALL
21474 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
21475  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
21476  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
21477  PyObject *self = PyCFunction_GET_SELF(func);
21478  int flags = PyCFunction_GET_FLAGS(func);
21479  assert(PyCFunction_Check(func));
21480  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
21481  assert(nargs >= 0);
21482  assert(nargs == 0 || args != NULL);
21483  /* _PyCFunction_FastCallDict() must not be called with an exception set,
21484  because it may clear it (directly or indirectly) and so the
21485  caller loses its exception */
21486  assert(!PyErr_Occurred());
21487  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
21488  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
21489  } else {
21490  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
21491  }
21492 }
21493 #endif
21494 
21495 /* PyFunctionFastCall */
21496 #if CYTHON_FAST_PYCALL
21497 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
21498  PyObject *globals) {
21499  PyFrameObject *f;
21500  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21501  PyObject **fastlocals;
21502  Py_ssize_t i;
21503  PyObject *result;
21504  assert(globals != NULL);
21505  /* XXX Perhaps we should create a specialized
21506  PyFrame_New() that doesn't take locals, but does
21507  take builtins without sanity checking them.
21508  */
21509  assert(tstate != NULL);
21510  f = PyFrame_New(tstate, co, globals, NULL);
21511  if (f == NULL) {
21512  return NULL;
21513  }
21514  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
21515  for (i = 0; i < na; i++) {
21516  Py_INCREF(*args);
21517  fastlocals[i] = *args++;
21518  }
21519  result = PyEval_EvalFrameEx(f,0);
21520  ++tstate->recursion_depth;
21521  Py_DECREF(f);
21522  --tstate->recursion_depth;
21523  return result;
21524 }
21525 #if 1 || PY_VERSION_HEX < 0x030600B1
21526 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
21527  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
21528  PyObject *globals = PyFunction_GET_GLOBALS(func);
21529  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
21530  PyObject *closure;
21531 #if PY_MAJOR_VERSION >= 3
21532  PyObject *kwdefs;
21533 #endif
21534  PyObject *kwtuple, **k;
21535  PyObject **d;
21536  Py_ssize_t nd;
21537  Py_ssize_t nk;
21538  PyObject *result;
21539  assert(kwargs == NULL || PyDict_Check(kwargs));
21540  nk = kwargs ? PyDict_Size(kwargs) : 0;
21541  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
21542  return NULL;
21543  }
21544  if (
21545 #if PY_MAJOR_VERSION >= 3
21546  co->co_kwonlyargcount == 0 &&
21547 #endif
21548  likely(kwargs == NULL || nk == 0) &&
21549  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
21550  if (argdefs == NULL && co->co_argcount == nargs) {
21551  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
21552  goto done;
21553  }
21554  else if (nargs == 0 && argdefs != NULL
21555  && co->co_argcount == Py_SIZE(argdefs)) {
21556  /* function called with no arguments, but all parameters have
21557  a default value: use default values as arguments .*/
21558  args = &PyTuple_GET_ITEM(argdefs, 0);
21559  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
21560  goto done;
21561  }
21562  }
21563  if (kwargs != NULL) {
21564  Py_ssize_t pos, i;
21565  kwtuple = PyTuple_New(2 * nk);
21566  if (kwtuple == NULL) {
21567  result = NULL;
21568  goto done;
21569  }
21570  k = &PyTuple_GET_ITEM(kwtuple, 0);
21571  pos = i = 0;
21572  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
21573  Py_INCREF(k[i]);
21574  Py_INCREF(k[i+1]);
21575  i += 2;
21576  }
21577  nk = i / 2;
21578  }
21579  else {
21580  kwtuple = NULL;
21581  k = NULL;
21582  }
21583  closure = PyFunction_GET_CLOSURE(func);
21584 #if PY_MAJOR_VERSION >= 3
21585  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
21586 #endif
21587  if (argdefs != NULL) {
21588  d = &PyTuple_GET_ITEM(argdefs, 0);
21589  nd = Py_SIZE(argdefs);
21590  }
21591  else {
21592  d = NULL;
21593  nd = 0;
21594  }
21595 #if PY_MAJOR_VERSION >= 3
21596  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
21597  args, (int)nargs,
21598  k, (int)nk,
21599  d, (int)nd, kwdefs, closure);
21600 #else
21601  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
21602  args, (int)nargs,
21603  k, (int)nk,
21604  d, (int)nd, closure);
21605 #endif
21606  Py_XDECREF(kwtuple);
21607 done:
21608  Py_LeaveRecursiveCall();
21609  return result;
21610 }
21611 #endif
21612 #endif
21613 
21614 /* PyObjectCall */
21615 #if CYTHON_COMPILING_IN_CPYTHON
21616 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
21617  PyObject *result;
21618  ternaryfunc call = func->ob_type->tp_call;
21619  if (unlikely(!call))
21620  return PyObject_Call(func, arg, kw);
21621  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21622  return NULL;
21623  result = (*call)(func, arg, kw);
21624  Py_LeaveRecursiveCall();
21625  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21626  PyErr_SetString(
21627  PyExc_SystemError,
21628  "NULL result without error in PyObject_Call");
21629  }
21630  return result;
21631 }
21632 #endif
21633 
21634 /* PyObjectCallMethO */
21635 #if CYTHON_COMPILING_IN_CPYTHON
21636 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
21637  PyObject *self, *result;
21638  PyCFunction cfunc;
21639  cfunc = PyCFunction_GET_FUNCTION(func);
21640  self = PyCFunction_GET_SELF(func);
21641  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21642  return NULL;
21643  result = cfunc(self, arg);
21644  Py_LeaveRecursiveCall();
21645  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21646  PyErr_SetString(
21647  PyExc_SystemError,
21648  "NULL result without error in PyObject_Call");
21649  }
21650  return result;
21651 }
21652 #endif
21653 
21654 /* PyObjectCallOneArg */
21655 #if CYTHON_COMPILING_IN_CPYTHON
21656 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21657  PyObject *result;
21658  PyObject *args = PyTuple_New(1);
21659  if (unlikely(!args)) return NULL;
21660  Py_INCREF(arg);
21661  PyTuple_SET_ITEM(args, 0, arg);
21662  result = __Pyx_PyObject_Call(func, args, NULL);
21663  Py_DECREF(args);
21664  return result;
21665 }
21666 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21667 #if CYTHON_FAST_PYCALL
21668  if (PyFunction_Check(func)) {
21669  return __Pyx_PyFunction_FastCall(func, &arg, 1);
21670  }
21671 #endif
21672  if (likely(PyCFunction_Check(func))) {
21673  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
21674  return __Pyx_PyObject_CallMethO(func, arg);
21675 #if CYTHON_FAST_PYCCALL
21676  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
21677  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
21678 #endif
21679  }
21680  }
21681  return __Pyx__PyObject_CallOneArg(func, arg);
21682 }
21683 #else
21684 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21685  PyObject *result;
21686  PyObject *args = PyTuple_Pack(1, arg);
21687  if (unlikely(!args)) return NULL;
21688  result = __Pyx_PyObject_Call(func, args, NULL);
21689  Py_DECREF(args);
21690  return result;
21691 }
21692 #endif
21693 
21694 /* PyErrFetchRestore */
21695 #if CYTHON_FAST_THREAD_STATE
21696 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21697  PyObject *tmp_type, *tmp_value, *tmp_tb;
21698  tmp_type = tstate->curexc_type;
21699  tmp_value = tstate->curexc_value;
21700  tmp_tb = tstate->curexc_traceback;
21701  tstate->curexc_type = type;
21702  tstate->curexc_value = value;
21703  tstate->curexc_traceback = tb;
21704  Py_XDECREF(tmp_type);
21705  Py_XDECREF(tmp_value);
21706  Py_XDECREF(tmp_tb);
21707 }
21708 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21709  *type = tstate->curexc_type;
21710  *value = tstate->curexc_value;
21711  *tb = tstate->curexc_traceback;
21712  tstate->curexc_type = 0;
21713  tstate->curexc_value = 0;
21714  tstate->curexc_traceback = 0;
21715 }
21716 #endif
21717 
21718 /* WriteUnraisableException */
21719 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
21720  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
21721  int full_traceback, CYTHON_UNUSED int nogil) {
21722  PyObject *old_exc, *old_val, *old_tb;
21723  PyObject *ctx;
21724  __Pyx_PyThreadState_declare
21725 #ifdef WITH_THREAD
21726  PyGILState_STATE state;
21727  if (nogil)
21728  state = PyGILState_Ensure();
21729 #ifdef _MSC_VER
21730  else state = (PyGILState_STATE)-1;
21731 #endif
21732 #endif
21733  __Pyx_PyThreadState_assign
21734  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
21735  if (full_traceback) {
21736  Py_XINCREF(old_exc);
21737  Py_XINCREF(old_val);
21738  Py_XINCREF(old_tb);
21739  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21740  PyErr_PrintEx(1);
21741  }
21742  #if PY_MAJOR_VERSION < 3
21743  ctx = PyString_FromString(name);
21744  #else
21745  ctx = PyUnicode_FromString(name);
21746  #endif
21747  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21748  if (!ctx) {
21749  PyErr_WriteUnraisable(Py_None);
21750  } else {
21751  PyErr_WriteUnraisable(ctx);
21752  Py_DECREF(ctx);
21753  }
21754 #ifdef WITH_THREAD
21755  if (nogil)
21756  PyGILState_Release(state);
21757 #endif
21758 }
21759 
21760 /* PyDictVersioning */
21761 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
21762 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
21763  PyObject *dict = Py_TYPE(obj)->tp_dict;
21764  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
21765 }
21766 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
21767  PyObject **dictptr = NULL;
21768  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
21769  if (offset) {
21770 #if CYTHON_COMPILING_IN_CPYTHON
21771  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
21772 #else
21773  dictptr = _PyObject_GetDictPtr(obj);
21774 #endif
21775  }
21776  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
21777 }
21778 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
21779  PyObject *dict = Py_TYPE(obj)->tp_dict;
21780  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
21781  return 0;
21782  return obj_dict_version == __Pyx_get_object_dict_version(obj);
21783 }
21784 #endif
21785 
21786 /* PyObjectCallNoArg */
21787 #if CYTHON_COMPILING_IN_CPYTHON
21788 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
21789 #if CYTHON_FAST_PYCALL
21790  if (PyFunction_Check(func)) {
21791  return __Pyx_PyFunction_FastCall(func, NULL, 0);
21792  }
21793 #endif
21794 #ifdef __Pyx_CyFunction_USED
21795  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
21796 #else
21797  if (likely(PyCFunction_Check(func)))
21798 #endif
21799  {
21800  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
21801  return __Pyx_PyObject_CallMethO(func, NULL);
21802  }
21803  }
21804  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
21805 }
21806 #endif
21807 
21808 /* RaiseDoubleKeywords */
21809 static void __Pyx_RaiseDoubleKeywordsError(
21810  const char* func_name,
21811  PyObject* kw_name)
21812 {
21813  PyErr_Format(PyExc_TypeError,
21814  #if PY_MAJOR_VERSION >= 3
21815  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
21816  #else
21817  "%s() got multiple values for keyword argument '%s'", func_name,
21818  PyString_AsString(kw_name));
21819  #endif
21820 }
21821 
21822 /* ParseKeywords */
21823 static int __Pyx_ParseOptionalKeywords(
21824  PyObject *kwds,
21825  PyObject **argnames[],
21826  PyObject *kwds2,
21827  PyObject *values[],
21828  Py_ssize_t num_pos_args,
21829  const char* function_name)
21830 {
21831  PyObject *key = 0, *value = 0;
21832  Py_ssize_t pos = 0;
21833  PyObject*** name;
21834  PyObject*** first_kw_arg = argnames + num_pos_args;
21835  while (PyDict_Next(kwds, &pos, &key, &value)) {
21836  name = first_kw_arg;
21837  while (*name && (**name != key)) name++;
21838  if (*name) {
21839  values[name-argnames] = value;
21840  continue;
21841  }
21842  name = first_kw_arg;
21843  #if PY_MAJOR_VERSION < 3
21844  if (likely(PyString_Check(key))) {
21845  while (*name) {
21846  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
21847  && _PyString_Eq(**name, key)) {
21848  values[name-argnames] = value;
21849  break;
21850  }
21851  name++;
21852  }
21853  if (*name) continue;
21854  else {
21855  PyObject*** argname = argnames;
21856  while (argname != first_kw_arg) {
21857  if ((**argname == key) || (
21858  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
21859  && _PyString_Eq(**argname, key))) {
21860  goto arg_passed_twice;
21861  }
21862  argname++;
21863  }
21864  }
21865  } else
21866  #endif
21867  if (likely(PyUnicode_Check(key))) {
21868  while (*name) {
21869  int cmp = (**name == key) ? 0 :
21870  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21871  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
21872  #endif
21873  PyUnicode_Compare(**name, key);
21874  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21875  if (cmp == 0) {
21876  values[name-argnames] = value;
21877  break;
21878  }
21879  name++;
21880  }
21881  if (*name) continue;
21882  else {
21883  PyObject*** argname = argnames;
21884  while (argname != first_kw_arg) {
21885  int cmp = (**argname == key) ? 0 :
21886  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21887  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
21888  #endif
21889  PyUnicode_Compare(**argname, key);
21890  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21891  if (cmp == 0) goto arg_passed_twice;
21892  argname++;
21893  }
21894  }
21895  } else
21896  goto invalid_keyword_type;
21897  if (kwds2) {
21898  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
21899  } else {
21900  goto invalid_keyword;
21901  }
21902  }
21903  return 0;
21904 arg_passed_twice:
21905  __Pyx_RaiseDoubleKeywordsError(function_name, key);
21906  goto bad;
21907 invalid_keyword_type:
21908  PyErr_Format(PyExc_TypeError,
21909  "%.200s() keywords must be strings", function_name);
21910  goto bad;
21911 invalid_keyword:
21912  PyErr_Format(PyExc_TypeError,
21913  #if PY_MAJOR_VERSION < 3
21914  "%.200s() got an unexpected keyword argument '%.200s'",
21915  function_name, PyString_AsString(key));
21916  #else
21917  "%s() got an unexpected keyword argument '%U'",
21918  function_name, key);
21919  #endif
21920 bad:
21921  return -1;
21922 }
21923 
21924 /* RaiseArgTupleInvalid */
21925 static void __Pyx_RaiseArgtupleInvalid(
21926  const char* func_name,
21927  int exact,
21928  Py_ssize_t num_min,
21929  Py_ssize_t num_max,
21930  Py_ssize_t num_found)
21931 {
21932  Py_ssize_t num_expected;
21933  const char *more_or_less;
21934  if (num_found < num_min) {
21935  num_expected = num_min;
21936  more_or_less = "at least";
21937  } else {
21938  num_expected = num_max;
21939  more_or_less = "at most";
21940  }
21941  if (exact) {
21942  more_or_less = "exactly";
21943  }
21944  PyErr_Format(PyExc_TypeError,
21945  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
21946  func_name, more_or_less, num_expected,
21947  (num_expected == 1) ? "" : "s", num_found);
21948 }
21949 
21950 /* GetModuleGlobalName */
21951 #if CYTHON_USE_DICT_VERSIONS
21952 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
21953 #else
21954 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
21955 #endif
21956 {
21957  PyObject *result;
21958 #if !CYTHON_AVOID_BORROWED_REFS
21959 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
21960  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
21961  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21962  if (likely(result)) {
21963  return __Pyx_NewRef(result);
21964  } else if (unlikely(PyErr_Occurred())) {
21965  return NULL;
21966  }
21967 #else
21968  result = PyDict_GetItem(__pyx_d, name);
21969  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21970  if (likely(result)) {
21971  return __Pyx_NewRef(result);
21972  }
21973 #endif
21974 #else
21975  result = PyObject_GetItem(__pyx_d, name);
21976  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
21977  if (likely(result)) {
21978  return __Pyx_NewRef(result);
21979  }
21980  PyErr_Clear();
21981 #endif
21982  return __Pyx_GetBuiltinName(name);
21983 }
21984 
21985 /* GetTopmostException */
21986 #if CYTHON_USE_EXC_INFO_STACK
21987 static _PyErr_StackItem *
21988 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
21989 {
21990  _PyErr_StackItem *exc_info = tstate->exc_info;
21991  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
21992  exc_info->previous_item != NULL)
21993  {
21994  exc_info = exc_info->previous_item;
21995  }
21996  return exc_info;
21997 }
21998 #endif
21999 
22000 /* SaveResetException */
22001 #if CYTHON_FAST_THREAD_STATE
22002 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22003  #if CYTHON_USE_EXC_INFO_STACK
22004  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
22005  *type = exc_info->exc_type;
22006  *value = exc_info->exc_value;
22007  *tb = exc_info->exc_traceback;
22008  #else
22009  *type = tstate->exc_type;
22010  *value = tstate->exc_value;
22011  *tb = tstate->exc_traceback;
22012  #endif
22013  Py_XINCREF(*type);
22014  Py_XINCREF(*value);
22015  Py_XINCREF(*tb);
22016 }
22017 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
22018  PyObject *tmp_type, *tmp_value, *tmp_tb;
22019  #if CYTHON_USE_EXC_INFO_STACK
22020  _PyErr_StackItem *exc_info = tstate->exc_info;
22021  tmp_type = exc_info->exc_type;
22022  tmp_value = exc_info->exc_value;
22023  tmp_tb = exc_info->exc_traceback;
22024  exc_info->exc_type = type;
22025  exc_info->exc_value = value;
22026  exc_info->exc_traceback = tb;
22027  #else
22028  tmp_type = tstate->exc_type;
22029  tmp_value = tstate->exc_value;
22030  tmp_tb = tstate->exc_traceback;
22031  tstate->exc_type = type;
22032  tstate->exc_value = value;
22033  tstate->exc_traceback = tb;
22034  #endif
22035  Py_XDECREF(tmp_type);
22036  Py_XDECREF(tmp_value);
22037  Py_XDECREF(tmp_tb);
22038 }
22039 #endif
22040 
22041 /* PyErrExceptionMatches */
22042 #if CYTHON_FAST_THREAD_STATE
22043 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22044  Py_ssize_t i, n;
22045  n = PyTuple_GET_SIZE(tuple);
22046 #if PY_MAJOR_VERSION >= 3
22047  for (i=0; i<n; i++) {
22048  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22049  }
22050 #endif
22051  for (i=0; i<n; i++) {
22052  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
22053  }
22054  return 0;
22055 }
22056 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
22057  PyObject *exc_type = tstate->curexc_type;
22058  if (exc_type == err) return 1;
22059  if (unlikely(!exc_type)) return 0;
22060  if (unlikely(PyTuple_Check(err)))
22061  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
22062  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
22063 }
22064 #endif
22065 
22066 /* GetException */
22067 #if CYTHON_FAST_THREAD_STATE
22068 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
22069 #else
22070 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
22071 #endif
22072 {
22073  PyObject *local_type, *local_value, *local_tb;
22074 #if CYTHON_FAST_THREAD_STATE
22075  PyObject *tmp_type, *tmp_value, *tmp_tb;
22076  local_type = tstate->curexc_type;
22077  local_value = tstate->curexc_value;
22078  local_tb = tstate->curexc_traceback;
22079  tstate->curexc_type = 0;
22080  tstate->curexc_value = 0;
22081  tstate->curexc_traceback = 0;
22082 #else
22083  PyErr_Fetch(&local_type, &local_value, &local_tb);
22084 #endif
22085  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
22086 #if CYTHON_FAST_THREAD_STATE
22087  if (unlikely(tstate->curexc_type))
22088 #else
22089  if (unlikely(PyErr_Occurred()))
22090 #endif
22091  goto bad;
22092  #if PY_MAJOR_VERSION >= 3
22093  if (local_tb) {
22094  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
22095  goto bad;
22096  }
22097  #endif
22098  Py_XINCREF(local_tb);
22099  Py_XINCREF(local_type);
22100  Py_XINCREF(local_value);
22101  *type = local_type;
22102  *value = local_value;
22103  *tb = local_tb;
22104 #if CYTHON_FAST_THREAD_STATE
22105  #if CYTHON_USE_EXC_INFO_STACK
22106  {
22107  _PyErr_StackItem *exc_info = tstate->exc_info;
22108  tmp_type = exc_info->exc_type;
22109  tmp_value = exc_info->exc_value;
22110  tmp_tb = exc_info->exc_traceback;
22111  exc_info->exc_type = local_type;
22112  exc_info->exc_value = local_value;
22113  exc_info->exc_traceback = local_tb;
22114  }
22115  #else
22116  tmp_type = tstate->exc_type;
22117  tmp_value = tstate->exc_value;
22118  tmp_tb = tstate->exc_traceback;
22119  tstate->exc_type = local_type;
22120  tstate->exc_value = local_value;
22121  tstate->exc_traceback = local_tb;
22122  #endif
22123  Py_XDECREF(tmp_type);
22124  Py_XDECREF(tmp_value);
22125  Py_XDECREF(tmp_tb);
22126 #else
22127  PyErr_SetExcInfo(local_type, local_value, local_tb);
22128 #endif
22129  return 0;
22130 bad:
22131  *type = 0;
22132  *value = 0;
22133  *tb = 0;
22134  Py_XDECREF(local_type);
22135  Py_XDECREF(local_value);
22136  Py_XDECREF(local_tb);
22137  return -1;
22138 }
22139 
22140 /* RaiseException */
22141 #if PY_MAJOR_VERSION < 3
22142 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
22143  CYTHON_UNUSED PyObject *cause) {
22144  __Pyx_PyThreadState_declare
22145  Py_XINCREF(type);
22146  if (!value || value == Py_None)
22147  value = NULL;
22148  else
22149  Py_INCREF(value);
22150  if (!tb || tb == Py_None)
22151  tb = NULL;
22152  else {
22153  Py_INCREF(tb);
22154  if (!PyTraceBack_Check(tb)) {
22155  PyErr_SetString(PyExc_TypeError,
22156  "raise: arg 3 must be a traceback or None");
22157  goto raise_error;
22158  }
22159  }
22160  if (PyType_Check(type)) {
22161 #if CYTHON_COMPILING_IN_PYPY
22162  if (!value) {
22163  Py_INCREF(Py_None);
22164  value = Py_None;
22165  }
22166 #endif
22167  PyErr_NormalizeException(&type, &value, &tb);
22168  } else {
22169  if (value) {
22170  PyErr_SetString(PyExc_TypeError,
22171  "instance exception may not have a separate value");
22172  goto raise_error;
22173  }
22174  value = type;
22175  type = (PyObject*) Py_TYPE(type);
22176  Py_INCREF(type);
22177  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
22178  PyErr_SetString(PyExc_TypeError,
22179  "raise: exception class must be a subclass of BaseException");
22180  goto raise_error;
22181  }
22182  }
22183  __Pyx_PyThreadState_assign
22184  __Pyx_ErrRestore(type, value, tb);
22185  return;
22186 raise_error:
22187  Py_XDECREF(value);
22188  Py_XDECREF(type);
22189  Py_XDECREF(tb);
22190  return;
22191 }
22192 #else
22193 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
22194  PyObject* owned_instance = NULL;
22195  if (tb == Py_None) {
22196  tb = 0;
22197  } else if (tb && !PyTraceBack_Check(tb)) {
22198  PyErr_SetString(PyExc_TypeError,
22199  "raise: arg 3 must be a traceback or None");
22200  goto bad;
22201  }
22202  if (value == Py_None)
22203  value = 0;
22204  if (PyExceptionInstance_Check(type)) {
22205  if (value) {
22206  PyErr_SetString(PyExc_TypeError,
22207  "instance exception may not have a separate value");
22208  goto bad;
22209  }
22210  value = type;
22211  type = (PyObject*) Py_TYPE(value);
22212  } else if (PyExceptionClass_Check(type)) {
22213  PyObject *instance_class = NULL;
22214  if (value && PyExceptionInstance_Check(value)) {
22215  instance_class = (PyObject*) Py_TYPE(value);
22216  if (instance_class != type) {
22217  int is_subclass = PyObject_IsSubclass(instance_class, type);
22218  if (!is_subclass) {
22219  instance_class = NULL;
22220  } else if (unlikely(is_subclass == -1)) {
22221  goto bad;
22222  } else {
22223  type = instance_class;
22224  }
22225  }
22226  }
22227  if (!instance_class) {
22228  PyObject *args;
22229  if (!value)
22230  args = PyTuple_New(0);
22231  else if (PyTuple_Check(value)) {
22232  Py_INCREF(value);
22233  args = value;
22234  } else
22235  args = PyTuple_Pack(1, value);
22236  if (!args)
22237  goto bad;
22238  owned_instance = PyObject_Call(type, args, NULL);
22239  Py_DECREF(args);
22240  if (!owned_instance)
22241  goto bad;
22242  value = owned_instance;
22243  if (!PyExceptionInstance_Check(value)) {
22244  PyErr_Format(PyExc_TypeError,
22245  "calling %R should have returned an instance of "
22246  "BaseException, not %R",
22247  type, Py_TYPE(value));
22248  goto bad;
22249  }
22250  }
22251  } else {
22252  PyErr_SetString(PyExc_TypeError,
22253  "raise: exception class must be a subclass of BaseException");
22254  goto bad;
22255  }
22256  if (cause) {
22257  PyObject *fixed_cause;
22258  if (cause == Py_None) {
22259  fixed_cause = NULL;
22260  } else if (PyExceptionClass_Check(cause)) {
22261  fixed_cause = PyObject_CallObject(cause, NULL);
22262  if (fixed_cause == NULL)
22263  goto bad;
22264  } else if (PyExceptionInstance_Check(cause)) {
22265  fixed_cause = cause;
22266  Py_INCREF(fixed_cause);
22267  } else {
22268  PyErr_SetString(PyExc_TypeError,
22269  "exception causes must derive from "
22270  "BaseException");
22271  goto bad;
22272  }
22273  PyException_SetCause(value, fixed_cause);
22274  }
22275  PyErr_SetObject(type, value);
22276  if (tb) {
22277 #if CYTHON_COMPILING_IN_PYPY
22278  PyObject *tmp_type, *tmp_value, *tmp_tb;
22279  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
22280  Py_INCREF(tb);
22281  PyErr_Restore(tmp_type, tmp_value, tb);
22282  Py_XDECREF(tmp_tb);
22283 #else
22284  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22285  PyObject* tmp_tb = tstate->curexc_traceback;
22286  if (tb != tmp_tb) {
22287  Py_INCREF(tb);
22288  tstate->curexc_traceback = tb;
22289  Py_XDECREF(tmp_tb);
22290  }
22291 #endif
22292  }
22293 bad:
22294  Py_XDECREF(owned_instance);
22295  return;
22296 }
22297 #endif
22298 
22299 /* PyObjectCall2Args */
22300 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
22301  PyObject *args, *result = NULL;
22302  #if CYTHON_FAST_PYCALL
22303  if (PyFunction_Check(function)) {
22304  PyObject *args[2] = {arg1, arg2};
22305  return __Pyx_PyFunction_FastCall(function, args, 2);
22306  }
22307  #endif
22308  #if CYTHON_FAST_PYCCALL
22309  if (__Pyx_PyFastCFunction_Check(function)) {
22310  PyObject *args[2] = {arg1, arg2};
22311  return __Pyx_PyCFunction_FastCall(function, args, 2);
22312  }
22313  #endif
22314  args = PyTuple_New(2);
22315  if (unlikely(!args)) goto done;
22316  Py_INCREF(arg1);
22317  PyTuple_SET_ITEM(args, 0, arg1);
22318  Py_INCREF(arg2);
22319  PyTuple_SET_ITEM(args, 1, arg2);
22320  Py_INCREF(function);
22321  result = __Pyx_PyObject_Call(function, args, NULL);
22322  Py_DECREF(args);
22323  Py_DECREF(function);
22324 done:
22325  return result;
22326 }
22327 
22328 /* PyIntBinop */
22329 #if !CYTHON_COMPILING_IN_PYPY
22330 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
22331  (void)inplace;
22332  (void)zerodivision_check;
22333  #if PY_MAJOR_VERSION < 3
22334  if (likely(PyInt_CheckExact(op1))) {
22335  const long b = intval;
22336  long x;
22337  long a = PyInt_AS_LONG(op1);
22338  x = (long)((unsigned long)a + b);
22339  if (likely((x^a) >= 0 || (x^b) >= 0))
22340  return PyInt_FromLong(x);
22341  return PyLong_Type.tp_as_number->nb_add(op1, op2);
22342  }
22343  #endif
22344  #if CYTHON_USE_PYLONG_INTERNALS
22345  if (likely(PyLong_CheckExact(op1))) {
22346  const long b = intval;
22347  long a, x;
22348 #ifdef HAVE_LONG_LONG
22349  const PY_LONG_LONG llb = intval;
22350  PY_LONG_LONG lla, llx;
22351 #endif
22352  const digit* digits = ((PyLongObject*)op1)->ob_digit;
22353  const Py_ssize_t size = Py_SIZE(op1);
22354  if (likely(__Pyx_sst_abs(size) <= 1)) {
22355  a = likely(size) ? digits[0] : 0;
22356  if (size == -1) a = -a;
22357  } else {
22358  switch (size) {
22359  case -2:
22360  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22361  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22362  break;
22363 #ifdef HAVE_LONG_LONG
22364  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
22365  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22366  goto long_long;
22367 #endif
22368  }
22369  CYTHON_FALLTHROUGH;
22370  case 2:
22371  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22372  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22373  break;
22374 #ifdef HAVE_LONG_LONG
22375  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
22376  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
22377  goto long_long;
22378 #endif
22379  }
22380  CYTHON_FALLTHROUGH;
22381  case -3:
22382  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22383  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22384  break;
22385 #ifdef HAVE_LONG_LONG
22386  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
22387  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]));
22388  goto long_long;
22389 #endif
22390  }
22391  CYTHON_FALLTHROUGH;
22392  case 3:
22393  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22394  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22395  break;
22396 #ifdef HAVE_LONG_LONG
22397  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
22398  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]));
22399  goto long_long;
22400 #endif
22401  }
22402  CYTHON_FALLTHROUGH;
22403  case -4:
22404  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22405  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22406  break;
22407 #ifdef HAVE_LONG_LONG
22408  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
22409  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]));
22410  goto long_long;
22411 #endif
22412  }
22413  CYTHON_FALLTHROUGH;
22414  case 4:
22415  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22416  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22417  break;
22418 #ifdef HAVE_LONG_LONG
22419  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
22420  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]));
22421  goto long_long;
22422 #endif
22423  }
22424  CYTHON_FALLTHROUGH;
22425  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
22426  }
22427  }
22428  x = a + b;
22429  return PyLong_FromLong(x);
22430 #ifdef HAVE_LONG_LONG
22431  long_long:
22432  llx = lla + llb;
22433  return PyLong_FromLongLong(llx);
22434 #endif
22435 
22436 
22437  }
22438  #endif
22439  if (PyFloat_CheckExact(op1)) {
22440  const long b = intval;
22441  double a = PyFloat_AS_DOUBLE(op1);
22442  double result;
22443  PyFPE_START_PROTECT("add", return NULL)
22444  result = ((double)a) + (double)b;
22445  PyFPE_END_PROTECT(result)
22446  return PyFloat_FromDouble(result);
22447  }
22448  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
22449 }
22450 #endif
22451 
22452 /* decode_c_bytes */
22453 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
22454  const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
22455  const char* encoding, const char* errors,
22456  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
22457  if (unlikely((start < 0) | (stop < 0))) {
22458  if (start < 0) {
22459  start += length;
22460  if (start < 0)
22461  start = 0;
22462  }
22463  if (stop < 0)
22464  stop += length;
22465  }
22466  if (stop > length)
22467  stop = length;
22468  if (unlikely(stop <= start))
22469  return __Pyx_NewRef(__pyx_empty_unicode);
22470  length = stop - start;
22471  cstring += start;
22472  if (decode_func) {
22473  return decode_func(cstring, length, errors);
22474  } else {
22475  return PyUnicode_Decode(cstring, length, encoding, errors);
22476  }
22477 }
22478 
22479 /* SwapException */
22480 #if CYTHON_FAST_THREAD_STATE
22481 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22482  PyObject *tmp_type, *tmp_value, *tmp_tb;
22483  #if CYTHON_USE_EXC_INFO_STACK
22484  _PyErr_StackItem *exc_info = tstate->exc_info;
22485  tmp_type = exc_info->exc_type;
22486  tmp_value = exc_info->exc_value;
22487  tmp_tb = exc_info->exc_traceback;
22488  exc_info->exc_type = *type;
22489  exc_info->exc_value = *value;
22490  exc_info->exc_traceback = *tb;
22491  #else
22492  tmp_type = tstate->exc_type;
22493  tmp_value = tstate->exc_value;
22494  tmp_tb = tstate->exc_traceback;
22495  tstate->exc_type = *type;
22496  tstate->exc_value = *value;
22497  tstate->exc_traceback = *tb;
22498  #endif
22499  *type = tmp_type;
22500  *value = tmp_value;
22501  *tb = tmp_tb;
22502 }
22503 #else
22504 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22505  PyObject *tmp_type, *tmp_value, *tmp_tb;
22506  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22507  PyErr_SetExcInfo(*type, *value, *tb);
22508  *type = tmp_type;
22509  *value = tmp_value;
22510  *tb = tmp_tb;
22511 }
22512 #endif
22513 
22514 /* SetItemInt */
22515 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
22516  int r;
22517  if (!j) return -1;
22518  r = PyObject_SetItem(o, j, v);
22519  Py_DECREF(j);
22520  return r;
22521 }
22522 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
22523  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
22524 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
22525  if (is_list || PyList_CheckExact(o)) {
22526  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
22527  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
22528  PyObject* old = PyList_GET_ITEM(o, n);
22529  Py_INCREF(v);
22530  PyList_SET_ITEM(o, n, v);
22531  Py_DECREF(old);
22532  return 1;
22533  }
22534  } else {
22535  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
22536  if (likely(m && m->sq_ass_item)) {
22537  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
22538  Py_ssize_t l = m->sq_length(o);
22539  if (likely(l >= 0)) {
22540  i += l;
22541  } else {
22542  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
22543  return -1;
22544  PyErr_Clear();
22545  }
22546  }
22547  return m->sq_ass_item(o, i, v);
22548  }
22549  }
22550 #else
22551 #if CYTHON_COMPILING_IN_PYPY
22552  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
22553 #else
22554  if (is_list || PySequence_Check(o))
22555 #endif
22556  {
22557  return PySequence_SetItem(o, i, v);
22558  }
22559 #endif
22560  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
22561 }
22562 
22563 /* ArgTypeTest */
22564 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
22565 {
22566  if (unlikely(!type)) {
22567  PyErr_SetString(PyExc_SystemError, "Missing type object");
22568  return 0;
22569  }
22570  else if (exact) {
22571  #if PY_MAJOR_VERSION == 2
22572  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
22573  #endif
22574  }
22575  else {
22576  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
22577  }
22578  PyErr_Format(PyExc_TypeError,
22579  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
22580  name, type->tp_name, Py_TYPE(obj)->tp_name);
22581  return 0;
22582 }
22583 
22584 /* Import */
22585 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
22586  PyObject *empty_list = 0;
22587  PyObject *module = 0;
22588  PyObject *global_dict = 0;
22589  PyObject *empty_dict = 0;
22590  PyObject *list;
22591  #if PY_MAJOR_VERSION < 3
22592  PyObject *py_import;
22593  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
22594  if (!py_import)
22595  goto bad;
22596  #endif
22597  if (from_list)
22598  list = from_list;
22599  else {
22600  empty_list = PyList_New(0);
22601  if (!empty_list)
22602  goto bad;
22603  list = empty_list;
22604  }
22605  global_dict = PyModule_GetDict(__pyx_m);
22606  if (!global_dict)
22607  goto bad;
22608  empty_dict = PyDict_New();
22609  if (!empty_dict)
22610  goto bad;
22611  {
22612  #if PY_MAJOR_VERSION >= 3
22613  if (level == -1) {
22614  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
22615  module = PyImport_ImportModuleLevelObject(
22616  name, global_dict, empty_dict, list, 1);
22617  if (!module) {
22618  if (!PyErr_ExceptionMatches(PyExc_ImportError))
22619  goto bad;
22620  PyErr_Clear();
22621  }
22622  }
22623  level = 0;
22624  }
22625  #endif
22626  if (!module) {
22627  #if PY_MAJOR_VERSION < 3
22628  PyObject *py_level = PyInt_FromLong(level);
22629  if (!py_level)
22630  goto bad;
22631  module = PyObject_CallFunctionObjArgs(py_import,
22632  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
22633  Py_DECREF(py_level);
22634  #else
22635  module = PyImport_ImportModuleLevelObject(
22636  name, global_dict, empty_dict, list, level);
22637  #endif
22638  }
22639  }
22640 bad:
22641  #if PY_MAJOR_VERSION < 3
22642  Py_XDECREF(py_import);
22643  #endif
22644  Py_XDECREF(empty_list);
22645  Py_XDECREF(empty_dict);
22646  return module;
22647 }
22648 
22649 /* PyObject_GenericGetAttrNoDict */
22650 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
22651 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
22652  PyErr_Format(PyExc_AttributeError,
22653 #if PY_MAJOR_VERSION >= 3
22654  "'%.50s' object has no attribute '%U'",
22655  tp->tp_name, attr_name);
22656 #else
22657  "'%.50s' object has no attribute '%.400s'",
22658  tp->tp_name, PyString_AS_STRING(attr_name));
22659 #endif
22660  return NULL;
22661 }
22662 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
22663  PyObject *descr;
22664  PyTypeObject *tp = Py_TYPE(obj);
22665  if (unlikely(!PyString_Check(attr_name))) {
22666  return PyObject_GenericGetAttr(obj, attr_name);
22667  }
22668  assert(!tp->tp_dictoffset);
22669  descr = _PyType_Lookup(tp, attr_name);
22670  if (unlikely(!descr)) {
22671  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
22672  }
22673  Py_INCREF(descr);
22674  #if PY_MAJOR_VERSION < 3
22675  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
22676  #endif
22677  {
22678  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
22679  if (unlikely(f)) {
22680  PyObject *res = f(descr, obj, (PyObject *)tp);
22681  Py_DECREF(descr);
22682  return res;
22683  }
22684  }
22685  return descr;
22686 }
22687 #endif
22688 
22689 /* PyObject_GenericGetAttr */
22690 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
22691 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
22692  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
22693  return PyObject_GenericGetAttr(obj, attr_name);
22694  }
22695  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
22696 }
22697 #endif
22698 
22699 /* SetVTable */
22700 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
22701 #if PY_VERSION_HEX >= 0x02070000
22702  PyObject *ob = PyCapsule_New(vtable, 0, 0);
22703 #else
22704  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
22705 #endif
22706  if (!ob)
22707  goto bad;
22708  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
22709  goto bad;
22710  Py_DECREF(ob);
22711  return 0;
22712 bad:
22713  Py_XDECREF(ob);
22714  return -1;
22715 }
22716 
22717 /* PyObjectGetAttrStrNoError */
22718 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
22719  __Pyx_PyThreadState_declare
22720  __Pyx_PyThreadState_assign
22721  if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
22722  __Pyx_PyErr_Clear();
22723 }
22724 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
22725  PyObject *result;
22726 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
22727  PyTypeObject* tp = Py_TYPE(obj);
22728  if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
22729  return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
22730  }
22731 #endif
22732  result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
22733  if (unlikely(!result)) {
22734  __Pyx_PyObject_GetAttrStr_ClearAttributeError();
22735  }
22736  return result;
22737 }
22738 
22739 /* SetupReduce */
22740 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
22741  int ret;
22742  PyObject *name_attr;
22743  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
22744  if (likely(name_attr)) {
22745  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
22746  } else {
22747  ret = -1;
22748  }
22749  if (unlikely(ret < 0)) {
22750  PyErr_Clear();
22751  ret = 0;
22752  }
22753  Py_XDECREF(name_attr);
22754  return ret;
22755 }
22756 static int __Pyx_setup_reduce(PyObject* type_obj) {
22757  int ret = 0;
22758  PyObject *object_reduce = NULL;
22759  PyObject *object_reduce_ex = NULL;
22760  PyObject *reduce = NULL;
22761  PyObject *reduce_ex = NULL;
22762  PyObject *reduce_cython = NULL;
22763  PyObject *setstate = NULL;
22764  PyObject *setstate_cython = NULL;
22765 #if CYTHON_USE_PYTYPE_LOOKUP
22766  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
22767 #else
22768  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
22769 #endif
22770 #if CYTHON_USE_PYTYPE_LOOKUP
22771  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
22772 #else
22773  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
22774 #endif
22775  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
22776  if (reduce_ex == object_reduce_ex) {
22777 #if CYTHON_USE_PYTYPE_LOOKUP
22778  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
22779 #else
22780  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
22781 #endif
22782  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
22783  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
22784  reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
22785  if (likely(reduce_cython)) {
22786  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22787  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22788  } else if (reduce == object_reduce || PyErr_Occurred()) {
22789  goto __PYX_BAD;
22790  }
22791  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
22792  if (!setstate) PyErr_Clear();
22793  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
22794  setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
22795  if (likely(setstate_cython)) {
22796  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22797  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
22798  } else if (!setstate || PyErr_Occurred()) {
22799  goto __PYX_BAD;
22800  }
22801  }
22802  PyType_Modified((PyTypeObject*)type_obj);
22803  }
22804  }
22805  goto __PYX_GOOD;
22806 __PYX_BAD:
22807  if (!PyErr_Occurred())
22808  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
22809  ret = -1;
22810 __PYX_GOOD:
22811 #if !CYTHON_USE_PYTYPE_LOOKUP
22812  Py_XDECREF(object_reduce);
22813  Py_XDECREF(object_reduce_ex);
22814 #endif
22815  Py_XDECREF(reduce);
22816  Py_XDECREF(reduce_ex);
22817  Py_XDECREF(reduce_cython);
22818  Py_XDECREF(setstate);
22819  Py_XDECREF(setstate_cython);
22820  return ret;
22821 }
22822 
22823 /* BytesEquals */
22824 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
22825 #if CYTHON_COMPILING_IN_PYPY
22826  return PyObject_RichCompareBool(s1, s2, equals);
22827 #else
22828  if (s1 == s2) {
22829  return (equals == Py_EQ);
22830  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
22831  const char *ps1, *ps2;
22832  Py_ssize_t length = PyBytes_GET_SIZE(s1);
22833  if (length != PyBytes_GET_SIZE(s2))
22834  return (equals == Py_NE);
22835  ps1 = PyBytes_AS_STRING(s1);
22836  ps2 = PyBytes_AS_STRING(s2);
22837  if (ps1[0] != ps2[0]) {
22838  return (equals == Py_NE);
22839  } else if (length == 1) {
22840  return (equals == Py_EQ);
22841  } else {
22842  int result;
22843 #if CYTHON_USE_UNICODE_INTERNALS
22844  Py_hash_t hash1, hash2;
22845  hash1 = ((PyBytesObject*)s1)->ob_shash;
22846  hash2 = ((PyBytesObject*)s2)->ob_shash;
22847  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22848  return (equals == Py_NE);
22849  }
22850 #endif
22851  result = memcmp(ps1, ps2, (size_t)length);
22852  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22853  }
22854  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
22855  return (equals == Py_NE);
22856  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
22857  return (equals == Py_NE);
22858  } else {
22859  int result;
22860  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22861  if (!py_result)
22862  return -1;
22863  result = __Pyx_PyObject_IsTrue(py_result);
22864  Py_DECREF(py_result);
22865  return result;
22866  }
22867 #endif
22868 }
22869 
22870 /* UnicodeEquals */
22871 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
22872 #if CYTHON_COMPILING_IN_PYPY
22873  return PyObject_RichCompareBool(s1, s2, equals);
22874 #else
22875 #if PY_MAJOR_VERSION < 3
22876  PyObject* owned_ref = NULL;
22877 #endif
22878  int s1_is_unicode, s2_is_unicode;
22879  if (s1 == s2) {
22880  goto return_eq;
22881  }
22882  s1_is_unicode = PyUnicode_CheckExact(s1);
22883  s2_is_unicode = PyUnicode_CheckExact(s2);
22884 #if PY_MAJOR_VERSION < 3
22885  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
22886  owned_ref = PyUnicode_FromObject(s2);
22887  if (unlikely(!owned_ref))
22888  return -1;
22889  s2 = owned_ref;
22890  s2_is_unicode = 1;
22891  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
22892  owned_ref = PyUnicode_FromObject(s1);
22893  if (unlikely(!owned_ref))
22894  return -1;
22895  s1 = owned_ref;
22896  s1_is_unicode = 1;
22897  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
22898  return __Pyx_PyBytes_Equals(s1, s2, equals);
22899  }
22900 #endif
22901  if (s1_is_unicode & s2_is_unicode) {
22902  Py_ssize_t length;
22903  int kind;
22904  void *data1, *data2;
22905  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
22906  return -1;
22907  length = __Pyx_PyUnicode_GET_LENGTH(s1);
22908  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
22909  goto return_ne;
22910  }
22911 #if CYTHON_USE_UNICODE_INTERNALS
22912  {
22913  Py_hash_t hash1, hash2;
22914  #if CYTHON_PEP393_ENABLED
22915  hash1 = ((PyASCIIObject*)s1)->hash;
22916  hash2 = ((PyASCIIObject*)s2)->hash;
22917  #else
22918  hash1 = ((PyUnicodeObject*)s1)->hash;
22919  hash2 = ((PyUnicodeObject*)s2)->hash;
22920  #endif
22921  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22922  goto return_ne;
22923  }
22924  }
22925 #endif
22926  kind = __Pyx_PyUnicode_KIND(s1);
22927  if (kind != __Pyx_PyUnicode_KIND(s2)) {
22928  goto return_ne;
22929  }
22930  data1 = __Pyx_PyUnicode_DATA(s1);
22931  data2 = __Pyx_PyUnicode_DATA(s2);
22932  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
22933  goto return_ne;
22934  } else if (length == 1) {
22935  goto return_eq;
22936  } else {
22937  int result = memcmp(data1, data2, (size_t)(length * kind));
22938  #if PY_MAJOR_VERSION < 3
22939  Py_XDECREF(owned_ref);
22940  #endif
22941  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22942  }
22943  } else if ((s1 == Py_None) & s2_is_unicode) {
22944  goto return_ne;
22945  } else if ((s2 == Py_None) & s1_is_unicode) {
22946  goto return_ne;
22947  } else {
22948  int result;
22949  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22950  #if PY_MAJOR_VERSION < 3
22951  Py_XDECREF(owned_ref);
22952  #endif
22953  if (!py_result)
22954  return -1;
22955  result = __Pyx_PyObject_IsTrue(py_result);
22956  Py_DECREF(py_result);
22957  return result;
22958  }
22959 return_eq:
22960  #if PY_MAJOR_VERSION < 3
22961  Py_XDECREF(owned_ref);
22962  #endif
22963  return (equals == Py_EQ);
22964 return_ne:
22965  #if PY_MAJOR_VERSION < 3
22966  Py_XDECREF(owned_ref);
22967  #endif
22968  return (equals == Py_NE);
22969 #endif
22970 }
22971 
22972 /* CLineInTraceback */
22973 #ifndef CYTHON_CLINE_IN_TRACEBACK
22974 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
22975  PyObject *use_cline;
22976  PyObject *ptype, *pvalue, *ptraceback;
22977 #if CYTHON_COMPILING_IN_CPYTHON
22978  PyObject **cython_runtime_dict;
22979 #endif
22980  if (unlikely(!__pyx_cython_runtime)) {
22981  return c_line;
22982  }
22983  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
22984 #if CYTHON_COMPILING_IN_CPYTHON
22985  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
22986  if (likely(cython_runtime_dict)) {
22987  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
22988  use_cline, *cython_runtime_dict,
22989  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
22990  } else
22991 #endif
22992  {
22993  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
22994  if (use_cline_obj) {
22995  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
22996  Py_DECREF(use_cline_obj);
22997  } else {
22998  PyErr_Clear();
22999  use_cline = NULL;
23000  }
23001  }
23002  if (!use_cline) {
23003  c_line = 0;
23004  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
23005  }
23006  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
23007  c_line = 0;
23008  }
23009  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
23010  return c_line;
23011 }
23012 #endif
23013 
23014 /* CodeObjectCache */
23015 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
23016  int start = 0, mid = 0, end = count - 1;
23017  if (end >= 0 && code_line > entries[end].code_line) {
23018  return count;
23019  }
23020  while (start < end) {
23021  mid = start + (end - start) / 2;
23022  if (code_line < entries[mid].code_line) {
23023  end = mid;
23024  } else if (code_line > entries[mid].code_line) {
23025  start = mid + 1;
23026  } else {
23027  return mid;
23028  }
23029  }
23030  if (code_line <= entries[mid].code_line) {
23031  return mid;
23032  } else {
23033  return mid + 1;
23034  }
23035 }
23036 static PyCodeObject *__pyx_find_code_object(int code_line) {
23037  PyCodeObject* code_object;
23038  int pos;
23039  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
23040  return NULL;
23041  }
23042  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
23043  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
23044  return NULL;
23045  }
23046  code_object = __pyx_code_cache.entries[pos].code_object;
23047  Py_INCREF(code_object);
23048  return code_object;
23049 }
23050 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
23051  int pos, i;
23052  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
23053  if (unlikely(!code_line)) {
23054  return;
23055  }
23056  if (unlikely(!entries)) {
23057  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
23058  if (likely(entries)) {
23059  __pyx_code_cache.entries = entries;
23060  __pyx_code_cache.max_count = 64;
23061  __pyx_code_cache.count = 1;
23062  entries[0].code_line = code_line;
23063  entries[0].code_object = code_object;
23064  Py_INCREF(code_object);
23065  }
23066  return;
23067  }
23068  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
23069  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
23070  PyCodeObject* tmp = entries[pos].code_object;
23071  entries[pos].code_object = code_object;
23072  Py_DECREF(tmp);
23073  return;
23074  }
23075  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
23076  int new_max = __pyx_code_cache.max_count + 64;
23077  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
23078  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
23079  if (unlikely(!entries)) {
23080  return;
23081  }
23082  __pyx_code_cache.entries = entries;
23083  __pyx_code_cache.max_count = new_max;
23084  }
23085  for (i=__pyx_code_cache.count; i>pos; i--) {
23086  entries[i] = entries[i-1];
23087  }
23088  entries[pos].code_line = code_line;
23089  entries[pos].code_object = code_object;
23090  __pyx_code_cache.count++;
23091  Py_INCREF(code_object);
23092 }
23093 
23094 /* AddTraceback */
23095 #include "compile.h"
23096 #include "frameobject.h"
23097 #include "traceback.h"
23098 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
23099  const char *funcname, int c_line,
23100  int py_line, const char *filename) {
23101  PyCodeObject *py_code = 0;
23102  PyObject *py_srcfile = 0;
23103  PyObject *py_funcname = 0;
23104  #if PY_MAJOR_VERSION < 3
23105  py_srcfile = PyString_FromString(filename);
23106  #else
23107  py_srcfile = PyUnicode_FromString(filename);
23108  #endif
23109  if (!py_srcfile) goto bad;
23110  if (c_line) {
23111  #if PY_MAJOR_VERSION < 3
23112  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
23113  #else
23114  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
23115  #endif
23116  }
23117  else {
23118  #if PY_MAJOR_VERSION < 3
23119  py_funcname = PyString_FromString(funcname);
23120  #else
23121  py_funcname = PyUnicode_FromString(funcname);
23122  #endif
23123  }
23124  if (!py_funcname) goto bad;
23125  py_code = __Pyx_PyCode_New(
23126  0,
23127  0,
23128  0,
23129  0,
23130  0,
23131  __pyx_empty_bytes, /*PyObject *code,*/
23132  __pyx_empty_tuple, /*PyObject *consts,*/
23133  __pyx_empty_tuple, /*PyObject *names,*/
23134  __pyx_empty_tuple, /*PyObject *varnames,*/
23135  __pyx_empty_tuple, /*PyObject *freevars,*/
23136  __pyx_empty_tuple, /*PyObject *cellvars,*/
23137  py_srcfile, /*PyObject *filename,*/
23138  py_funcname, /*PyObject *name,*/
23139  py_line,
23140  __pyx_empty_bytes /*PyObject *lnotab*/
23141  );
23142  Py_DECREF(py_srcfile);
23143  Py_DECREF(py_funcname);
23144  return py_code;
23145 bad:
23146  Py_XDECREF(py_srcfile);
23147  Py_XDECREF(py_funcname);
23148  return NULL;
23149 }
23150 static void __Pyx_AddTraceback(const char *funcname, int c_line,
23151  int py_line, const char *filename) {
23152  PyCodeObject *py_code = 0;
23153  PyFrameObject *py_frame = 0;
23154  PyThreadState *tstate = __Pyx_PyThreadState_Current;
23155  if (c_line) {
23156  c_line = __Pyx_CLineForTraceback(tstate, c_line);
23157  }
23158  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
23159  if (!py_code) {
23160  py_code = __Pyx_CreateCodeObjectForTraceback(
23161  funcname, c_line, py_line, filename);
23162  if (!py_code) goto bad;
23163  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
23164  }
23165  py_frame = PyFrame_New(
23166  tstate, /*PyThreadState *tstate,*/
23167  py_code, /*PyCodeObject *code,*/
23168  __pyx_d, /*PyObject *globals,*/
23169  0 /*PyObject *locals*/
23170  );
23171  if (!py_frame) goto bad;
23172  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
23173  PyTraceBack_Here(py_frame);
23174 bad:
23175  Py_XDECREF(py_code);
23176  Py_XDECREF(py_frame);
23177 }
23178 
23179 /* CIntFromPyVerify */
23180 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
23181  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
23182 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
23183  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
23184 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
23185  {\
23186  func_type value = func_value;\
23187  if (sizeof(target_type) < sizeof(func_type)) {\
23188  if (unlikely(value != (func_type) (target_type) value)) {\
23189  func_type zero = 0;\
23190  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
23191  return (target_type) -1;\
23192  if (is_unsigned && unlikely(value < zero))\
23193  goto raise_neg_overflow;\
23194  else\
23195  goto raise_overflow;\
23196  }\
23197  }\
23198  return (target_type) value;\
23199  }
23200 
23201 /* CIntToPy */
23202 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
23203  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
23204  const int is_unsigned = neg_one > const_zero;
23205  if (is_unsigned) {
23206  if (sizeof(int) < sizeof(long)) {
23207  return PyInt_FromLong((long) value);
23208  } else if (sizeof(int) <= sizeof(unsigned long)) {
23209  return PyLong_FromUnsignedLong((unsigned long) value);
23210 #ifdef HAVE_LONG_LONG
23211  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
23212  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
23213 #endif
23214  }
23215  } else {
23216  if (sizeof(int) <= sizeof(long)) {
23217  return PyInt_FromLong((long) value);
23218 #ifdef HAVE_LONG_LONG
23219  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
23220  return PyLong_FromLongLong((PY_LONG_LONG) value);
23221 #endif
23222  }
23223  }
23224  {
23225  int one = 1; int little = (int)*(unsigned char *)&one;
23226  unsigned char *bytes = (unsigned char *)&value;
23227  return _PyLong_FromByteArray(bytes, sizeof(int),
23228  little, !is_unsigned);
23229  }
23230 }
23231 
23232 /* CIntFromPy */
23233 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
23234  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
23235  const int is_unsigned = neg_one > const_zero;
23236 #if PY_MAJOR_VERSION < 3
23237  if (likely(PyInt_Check(x))) {
23238  if (sizeof(int) < sizeof(long)) {
23239  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
23240  } else {
23241  long val = PyInt_AS_LONG(x);
23242  if (is_unsigned && unlikely(val < 0)) {
23243  goto raise_neg_overflow;
23244  }
23245  return (int) val;
23246  }
23247  } else
23248 #endif
23249  if (likely(PyLong_Check(x))) {
23250  if (is_unsigned) {
23251 #if CYTHON_USE_PYLONG_INTERNALS
23252  const digit* digits = ((PyLongObject*)x)->ob_digit;
23253  switch (Py_SIZE(x)) {
23254  case 0: return (int) 0;
23255  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
23256  case 2:
23257  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
23258  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23259  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23260  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
23261  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23262  }
23263  }
23264  break;
23265  case 3:
23266  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
23267  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23268  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23269  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
23270  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23271  }
23272  }
23273  break;
23274  case 4:
23275  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
23276  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23277  __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])))
23278  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
23279  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23280  }
23281  }
23282  break;
23283  }
23284 #endif
23285 #if CYTHON_COMPILING_IN_CPYTHON
23286  if (unlikely(Py_SIZE(x) < 0)) {
23287  goto raise_neg_overflow;
23288  }
23289 #else
23290  {
23291  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
23292  if (unlikely(result < 0))
23293  return (int) -1;
23294  if (unlikely(result == 1))
23295  goto raise_neg_overflow;
23296  }
23297 #endif
23298  if (sizeof(int) <= sizeof(unsigned long)) {
23299  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
23300 #ifdef HAVE_LONG_LONG
23301  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
23302  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
23303 #endif
23304  }
23305  } else {
23306 #if CYTHON_USE_PYLONG_INTERNALS
23307  const digit* digits = ((PyLongObject*)x)->ob_digit;
23308  switch (Py_SIZE(x)) {
23309  case 0: return (int) 0;
23310  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
23311  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
23312  case -2:
23313  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
23314  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23315  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23316  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23317  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23318  }
23319  }
23320  break;
23321  case 2:
23322  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
23323  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23324  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23325  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23326  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23327  }
23328  }
23329  break;
23330  case -3:
23331  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23332  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23333  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23334  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23335  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23336  }
23337  }
23338  break;
23339  case 3:
23340  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
23341  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23342  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23343  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23344  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23345  }
23346  }
23347  break;
23348  case -4:
23349  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23350  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23351  __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])))
23352  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
23353  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23354  }
23355  }
23356  break;
23357  case 4:
23358  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
23359  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23360  __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])))
23361  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
23362  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23363  }
23364  }
23365  break;
23366  }
23367 #endif
23368  if (sizeof(int) <= sizeof(long)) {
23369  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
23370 #ifdef HAVE_LONG_LONG
23371  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
23372  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
23373 #endif
23374  }
23375  }
23376  {
23377 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
23378  PyErr_SetString(PyExc_RuntimeError,
23379  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
23380 #else
23381  int val;
23382  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
23383  #if PY_MAJOR_VERSION < 3
23384  if (likely(v) && !PyLong_Check(v)) {
23385  PyObject *tmp = v;
23386  v = PyNumber_Long(tmp);
23387  Py_DECREF(tmp);
23388  }
23389  #endif
23390  if (likely(v)) {
23391  int one = 1; int is_little = (int)*(unsigned char *)&one;
23392  unsigned char *bytes = (unsigned char *)&val;
23393  int ret = _PyLong_AsByteArray((PyLongObject *)v,
23394  bytes, sizeof(val),
23395  is_little, !is_unsigned);
23396  Py_DECREF(v);
23397  if (likely(!ret))
23398  return val;
23399  }
23400 #endif
23401  return (int) -1;
23402  }
23403  } else {
23404  int val;
23405  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
23406  if (!tmp) return (int) -1;
23407  val = __Pyx_PyInt_As_int(tmp);
23408  Py_DECREF(tmp);
23409  return val;
23410  }
23411 raise_overflow:
23412  PyErr_SetString(PyExc_OverflowError,
23413  "value too large to convert to int");
23414  return (int) -1;
23415 raise_neg_overflow:
23416  PyErr_SetString(PyExc_OverflowError,
23417  "can't convert negative value to int");
23418  return (int) -1;
23419 }
23420 
23421 /* CIntToPy */
23422 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
23423  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
23424  const int is_unsigned = neg_one > const_zero;
23425  if (is_unsigned) {
23426  if (sizeof(long) < sizeof(long)) {
23427  return PyInt_FromLong((long) value);
23428  } else if (sizeof(long) <= sizeof(unsigned long)) {
23429  return PyLong_FromUnsignedLong((unsigned long) value);
23430 #ifdef HAVE_LONG_LONG
23431  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
23432  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
23433 #endif
23434  }
23435  } else {
23436  if (sizeof(long) <= sizeof(long)) {
23437  return PyInt_FromLong((long) value);
23438 #ifdef HAVE_LONG_LONG
23439  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
23440  return PyLong_FromLongLong((PY_LONG_LONG) value);
23441 #endif
23442  }
23443  }
23444  {
23445  int one = 1; int little = (int)*(unsigned char *)&one;
23446  unsigned char *bytes = (unsigned char *)&value;
23447  return _PyLong_FromByteArray(bytes, sizeof(long),
23448  little, !is_unsigned);
23449  }
23450 }
23451 
23452 /* CIntFromPy */
23453 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
23454  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
23455  const int is_unsigned = neg_one > const_zero;
23456 #if PY_MAJOR_VERSION < 3
23457  if (likely(PyInt_Check(x))) {
23458  if (sizeof(long) < sizeof(long)) {
23459  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
23460  } else {
23461  long val = PyInt_AS_LONG(x);
23462  if (is_unsigned && unlikely(val < 0)) {
23463  goto raise_neg_overflow;
23464  }
23465  return (long) val;
23466  }
23467  } else
23468 #endif
23469  if (likely(PyLong_Check(x))) {
23470  if (is_unsigned) {
23471 #if CYTHON_USE_PYLONG_INTERNALS
23472  const digit* digits = ((PyLongObject*)x)->ob_digit;
23473  switch (Py_SIZE(x)) {
23474  case 0: return (long) 0;
23475  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
23476  case 2:
23477  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
23478  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23479  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23480  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
23481  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
23482  }
23483  }
23484  break;
23485  case 3:
23486  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
23487  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23488  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23489  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
23490  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
23491  }
23492  }
23493  break;
23494  case 4:
23495  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
23496  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23497  __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])))
23498  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
23499  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
23500  }
23501  }
23502  break;
23503  }
23504 #endif
23505 #if CYTHON_COMPILING_IN_CPYTHON
23506  if (unlikely(Py_SIZE(x) < 0)) {
23507  goto raise_neg_overflow;
23508  }
23509 #else
23510  {
23511  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
23512  if (unlikely(result < 0))
23513  return (long) -1;
23514  if (unlikely(result == 1))
23515  goto raise_neg_overflow;
23516  }
23517 #endif
23518  if (sizeof(long) <= sizeof(unsigned long)) {
23519  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
23520 #ifdef HAVE_LONG_LONG
23521  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
23522  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
23523 #endif
23524  }
23525  } else {
23526 #if CYTHON_USE_PYLONG_INTERNALS
23527  const digit* digits = ((PyLongObject*)x)->ob_digit;
23528  switch (Py_SIZE(x)) {
23529  case 0: return (long) 0;
23530  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
23531  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
23532  case -2:
23533  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
23534  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23535  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23536  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
23537  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23538  }
23539  }
23540  break;
23541  case 2:
23542  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
23543  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23544  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23545  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
23546  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23547  }
23548  }
23549  break;
23550  case -3:
23551  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
23552  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23553  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23554  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
23555  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23556  }
23557  }
23558  break;
23559  case 3:
23560  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
23561  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23562  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23563  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
23564  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23565  }
23566  }
23567  break;
23568  case -4:
23569  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
23570  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23571  __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])))
23572  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
23573  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23574  }
23575  }
23576  break;
23577  case 4:
23578  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
23579  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23580  __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])))
23581  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
23582  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
23583  }
23584  }
23585  break;
23586  }
23587 #endif
23588  if (sizeof(long) <= sizeof(long)) {
23589  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
23590 #ifdef HAVE_LONG_LONG
23591  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
23592  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
23593 #endif
23594  }
23595  }
23596  {
23597 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
23598  PyErr_SetString(PyExc_RuntimeError,
23599  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
23600 #else
23601  long val;
23602  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
23603  #if PY_MAJOR_VERSION < 3
23604  if (likely(v) && !PyLong_Check(v)) {
23605  PyObject *tmp = v;
23606  v = PyNumber_Long(tmp);
23607  Py_DECREF(tmp);
23608  }
23609  #endif
23610  if (likely(v)) {
23611  int one = 1; int is_little = (int)*(unsigned char *)&one;
23612  unsigned char *bytes = (unsigned char *)&val;
23613  int ret = _PyLong_AsByteArray((PyLongObject *)v,
23614  bytes, sizeof(val),
23615  is_little, !is_unsigned);
23616  Py_DECREF(v);
23617  if (likely(!ret))
23618  return val;
23619  }
23620 #endif
23621  return (long) -1;
23622  }
23623  } else {
23624  long val;
23625  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
23626  if (!tmp) return (long) -1;
23627  val = __Pyx_PyInt_As_long(tmp);
23628  Py_DECREF(tmp);
23629  return val;
23630  }
23631 raise_overflow:
23632  PyErr_SetString(PyExc_OverflowError,
23633  "value too large to convert to long");
23634  return (long) -1;
23635 raise_neg_overflow:
23636  PyErr_SetString(PyExc_OverflowError,
23637  "can't convert negative value to long");
23638  return (long) -1;
23639 }
23640 
23641 /* FastTypeChecks */
23642 #if CYTHON_COMPILING_IN_CPYTHON
23643 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
23644  while (a) {
23645  a = a->tp_base;
23646  if (a == b)
23647  return 1;
23648  }
23649  return b == &PyBaseObject_Type;
23650 }
23651 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
23652  PyObject *mro;
23653  if (a == b) return 1;
23654  mro = a->tp_mro;
23655  if (likely(mro)) {
23656  Py_ssize_t i, n;
23657  n = PyTuple_GET_SIZE(mro);
23658  for (i = 0; i < n; i++) {
23659  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
23660  return 1;
23661  }
23662  return 0;
23663  }
23664  return __Pyx_InBases(a, b);
23665 }
23666 #if PY_MAJOR_VERSION == 2
23667 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
23668  PyObject *exception, *value, *tb;
23669  int res;
23670  __Pyx_PyThreadState_declare
23671  __Pyx_PyThreadState_assign
23672  __Pyx_ErrFetch(&exception, &value, &tb);
23673  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
23674  if (unlikely(res == -1)) {
23675  PyErr_WriteUnraisable(err);
23676  res = 0;
23677  }
23678  if (!res) {
23679  res = PyObject_IsSubclass(err, exc_type2);
23680  if (unlikely(res == -1)) {
23681  PyErr_WriteUnraisable(err);
23682  res = 0;
23683  }
23684  }
23685  __Pyx_ErrRestore(exception, value, tb);
23686  return res;
23687 }
23688 #else
23689 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
23690  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
23691  if (!res) {
23692  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
23693  }
23694  return res;
23695 }
23696 #endif
23697 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
23698  Py_ssize_t i, n;
23699  assert(PyExceptionClass_Check(exc_type));
23700  n = PyTuple_GET_SIZE(tuple);
23701 #if PY_MAJOR_VERSION >= 3
23702  for (i=0; i<n; i++) {
23703  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
23704  }
23705 #endif
23706  for (i=0; i<n; i++) {
23707  PyObject *t = PyTuple_GET_ITEM(tuple, i);
23708  #if PY_MAJOR_VERSION < 3
23709  if (likely(exc_type == t)) return 1;
23710  #endif
23711  if (likely(PyExceptionClass_Check(t))) {
23712  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
23713  } else {
23714  }
23715  }
23716  return 0;
23717 }
23718 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
23719  if (likely(err == exc_type)) return 1;
23720  if (likely(PyExceptionClass_Check(err))) {
23721  if (likely(PyExceptionClass_Check(exc_type))) {
23722  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
23723  } else if (likely(PyTuple_Check(exc_type))) {
23724  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
23725  } else {
23726  }
23727  }
23728  return PyErr_GivenExceptionMatches(err, exc_type);
23729 }
23730 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
23731  assert(PyExceptionClass_Check(exc_type1));
23732  assert(PyExceptionClass_Check(exc_type2));
23733  if (likely(err == exc_type1 || err == exc_type2)) return 1;
23734  if (likely(PyExceptionClass_Check(err))) {
23735  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
23736  }
23737  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
23738 }
23739 #endif
23740 
23741 /* FetchCommonType */
23742 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
23743  PyObject* fake_module;
23744  PyTypeObject* cached_type = NULL;
23745  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
23746  if (!fake_module) return NULL;
23747  Py_INCREF(fake_module);
23748  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
23749  if (cached_type) {
23750  if (!PyType_Check((PyObject*)cached_type)) {
23751  PyErr_Format(PyExc_TypeError,
23752  "Shared Cython type %.200s is not a type object",
23753  type->tp_name);
23754  goto bad;
23755  }
23756  if (cached_type->tp_basicsize != type->tp_basicsize) {
23757  PyErr_Format(PyExc_TypeError,
23758  "Shared Cython type %.200s has the wrong size, try recompiling",
23759  type->tp_name);
23760  goto bad;
23761  }
23762  } else {
23763  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
23764  PyErr_Clear();
23765  if (PyType_Ready(type) < 0) goto bad;
23766  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
23767  goto bad;
23768  Py_INCREF(type);
23769  cached_type = type;
23770  }
23771 done:
23772  Py_DECREF(fake_module);
23773  return cached_type;
23774 bad:
23775  Py_XDECREF(cached_type);
23776  cached_type = NULL;
23777  goto done;
23778 }
23779 
23780 /* PyObjectGetMethod */
23781 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
23782  PyObject *attr;
23783 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
23784  PyTypeObject *tp = Py_TYPE(obj);
23785  PyObject *descr;
23786  descrgetfunc f = NULL;
23787  PyObject **dictptr, *dict;
23788  int meth_found = 0;
23789  assert (*method == NULL);
23790  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
23791  attr = __Pyx_PyObject_GetAttrStr(obj, name);
23792  goto try_unpack;
23793  }
23794  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
23795  return 0;
23796  }
23797  descr = _PyType_Lookup(tp, name);
23798  if (likely(descr != NULL)) {
23799  Py_INCREF(descr);
23800 #if PY_MAJOR_VERSION >= 3
23801  #ifdef __Pyx_CyFunction_USED
23802  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
23803  #else
23804  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
23805  #endif
23806 #else
23807  #ifdef __Pyx_CyFunction_USED
23808  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
23809  #else
23810  if (likely(PyFunction_Check(descr)))
23811  #endif
23812 #endif
23813  {
23814  meth_found = 1;
23815  } else {
23816  f = Py_TYPE(descr)->tp_descr_get;
23817  if (f != NULL && PyDescr_IsData(descr)) {
23818  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
23819  Py_DECREF(descr);
23820  goto try_unpack;
23821  }
23822  }
23823  }
23824  dictptr = _PyObject_GetDictPtr(obj);
23825  if (dictptr != NULL && (dict = *dictptr) != NULL) {
23826  Py_INCREF(dict);
23827  attr = __Pyx_PyDict_GetItemStr(dict, name);
23828  if (attr != NULL) {
23829  Py_INCREF(attr);
23830  Py_DECREF(dict);
23831  Py_XDECREF(descr);
23832  goto try_unpack;
23833  }
23834  Py_DECREF(dict);
23835  }
23836  if (meth_found) {
23837  *method = descr;
23838  return 1;
23839  }
23840  if (f != NULL) {
23841  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
23842  Py_DECREF(descr);
23843  goto try_unpack;
23844  }
23845  if (descr != NULL) {
23846  *method = descr;
23847  return 0;
23848  }
23849  PyErr_Format(PyExc_AttributeError,
23850 #if PY_MAJOR_VERSION >= 3
23851  "'%.50s' object has no attribute '%U'",
23852  tp->tp_name, name);
23853 #else
23854  "'%.50s' object has no attribute '%.400s'",
23855  tp->tp_name, PyString_AS_STRING(name));
23856 #endif
23857  return 0;
23858 #else
23859  attr = __Pyx_PyObject_GetAttrStr(obj, name);
23860  goto try_unpack;
23861 #endif
23862 try_unpack:
23863 #if CYTHON_UNPACK_METHODS
23864  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
23865  PyObject *function = PyMethod_GET_FUNCTION(attr);
23866  Py_INCREF(function);
23867  Py_DECREF(attr);
23868  *method = function;
23869  return 1;
23870  }
23871 #endif
23872  *method = attr;
23873  return 0;
23874 }
23875 
23876 /* PyObjectCallMethod1 */
23877 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
23878  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
23879  Py_DECREF(method);
23880  return result;
23881 }
23882 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
23883  PyObject *method = NULL, *result;
23884  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
23885  if (likely(is_method)) {
23886  result = __Pyx_PyObject_Call2Args(method, obj, arg);
23887  Py_DECREF(method);
23888  return result;
23889  }
23890  if (unlikely(!method)) return NULL;
23891  return __Pyx__PyObject_CallMethod1(method, arg);
23892 }
23893 
23894 /* CoroutineBase */
23895 #include <structmember.h>
23896 #include <frameobject.h>
23897 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
23898 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
23899  PyObject *et, *ev, *tb;
23900  PyObject *value = NULL;
23901  __Pyx_ErrFetch(&et, &ev, &tb);
23902  if (!et) {
23903  Py_XDECREF(tb);
23904  Py_XDECREF(ev);
23905  Py_INCREF(Py_None);
23906  *pvalue = Py_None;
23907  return 0;
23908  }
23909  if (likely(et == PyExc_StopIteration)) {
23910  if (!ev) {
23911  Py_INCREF(Py_None);
23912  value = Py_None;
23913  }
23914 #if PY_VERSION_HEX >= 0x030300A0
23915  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
23916  value = ((PyStopIterationObject *)ev)->value;
23917  Py_INCREF(value);
23918  Py_DECREF(ev);
23919  }
23920 #endif
23921  else if (unlikely(PyTuple_Check(ev))) {
23922  if (PyTuple_GET_SIZE(ev) >= 1) {
23923 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23924  value = PyTuple_GET_ITEM(ev, 0);
23925  Py_INCREF(value);
23926 #else
23927  value = PySequence_ITEM(ev, 0);
23928 #endif
23929  } else {
23930  Py_INCREF(Py_None);
23931  value = Py_None;
23932  }
23933  Py_DECREF(ev);
23934  }
23935  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
23936  value = ev;
23937  }
23938  if (likely(value)) {
23939  Py_XDECREF(tb);
23940  Py_DECREF(et);
23941  *pvalue = value;
23942  return 0;
23943  }
23944  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
23945  __Pyx_ErrRestore(et, ev, tb);
23946  return -1;
23947  }
23948  PyErr_NormalizeException(&et, &ev, &tb);
23949  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
23950  __Pyx_ErrRestore(et, ev, tb);
23951  return -1;
23952  }
23953  Py_XDECREF(tb);
23954  Py_DECREF(et);
23955 #if PY_VERSION_HEX >= 0x030300A0
23956  value = ((PyStopIterationObject *)ev)->value;
23957  Py_INCREF(value);
23958  Py_DECREF(ev);
23959 #else
23960  {
23961  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
23962  Py_DECREF(ev);
23963  if (likely(args)) {
23964  value = PySequence_GetItem(args, 0);
23965  Py_DECREF(args);
23966  }
23967  if (unlikely(!value)) {
23968  __Pyx_ErrRestore(NULL, NULL, NULL);
23969  Py_INCREF(Py_None);
23970  value = Py_None;
23971  }
23972  }
23973 #endif
23974  *pvalue = value;
23975  return 0;
23976 }
23977 static CYTHON_INLINE
23978 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
23979  PyObject *t, *v, *tb;
23980  t = exc_state->exc_type;
23981  v = exc_state->exc_value;
23982  tb = exc_state->exc_traceback;
23983  exc_state->exc_type = NULL;
23984  exc_state->exc_value = NULL;
23985  exc_state->exc_traceback = NULL;
23986  Py_XDECREF(t);
23987  Py_XDECREF(v);
23988  Py_XDECREF(tb);
23989 }
23990 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
23991 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
23992  const char *msg;
23993  if ((0)) {
23994  #ifdef __Pyx_Coroutine_USED
23995  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
23996  msg = "coroutine already executing";
23997  #endif
23998  #ifdef __Pyx_AsyncGen_USED
23999  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
24000  msg = "async generator already executing";
24001  #endif
24002  } else {
24003  msg = "generator already executing";
24004  }
24005  PyErr_SetString(PyExc_ValueError, msg);
24006 }
24007 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
24008 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
24009  const char *msg;
24010  if ((0)) {
24011  #ifdef __Pyx_Coroutine_USED
24012  } else if (__Pyx_Coroutine_Check(gen)) {
24013  msg = "can't send non-None value to a just-started coroutine";
24014  #endif
24015  #ifdef __Pyx_AsyncGen_USED
24016  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
24017  msg = "can't send non-None value to a just-started async generator";
24018  #endif
24019  } else {
24020  msg = "can't send non-None value to a just-started generator";
24021  }
24022  PyErr_SetString(PyExc_TypeError, msg);
24023 }
24024 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
24025 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
24026  #ifdef __Pyx_Coroutine_USED
24027  if (!closing && __Pyx_Coroutine_Check(gen)) {
24028  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
24029  } else
24030  #endif
24031  if (value) {
24032  #ifdef __Pyx_AsyncGen_USED
24033  if (__Pyx_AsyncGen_CheckExact(gen))
24034  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
24035  else
24036  #endif
24037  PyErr_SetNone(PyExc_StopIteration);
24038  }
24039 }
24040 static
24041 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
24042  __Pyx_PyThreadState_declare
24043  PyThreadState *tstate;
24044  __Pyx_ExcInfoStruct *exc_state;
24045  PyObject *retval;
24046  assert(!self->is_running);
24047  if (unlikely(self->resume_label == 0)) {
24048  if (unlikely(value && value != Py_None)) {
24049  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
24050  }
24051  }
24052  if (unlikely(self->resume_label == -1)) {
24053  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
24054  }
24055 #if CYTHON_FAST_THREAD_STATE
24056  __Pyx_PyThreadState_assign
24057  tstate = __pyx_tstate;
24058 #else
24059  tstate = __Pyx_PyThreadState_Current;
24060 #endif
24061  exc_state = &self->gi_exc_state;
24062  if (exc_state->exc_type) {
24063  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
24064  #else
24065  if (exc_state->exc_traceback) {
24066  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
24067  PyFrameObject *f = tb->tb_frame;
24068  Py_XINCREF(tstate->frame);
24069  assert(f->f_back == NULL);
24070  f->f_back = tstate->frame;
24071  }
24072  #endif
24073  }
24074 #if CYTHON_USE_EXC_INFO_STACK
24075  exc_state->previous_item = tstate->exc_info;
24076  tstate->exc_info = exc_state;
24077 #else
24078  if (exc_state->exc_type) {
24079  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
24080  } else {
24081  __Pyx_Coroutine_ExceptionClear(exc_state);
24082  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
24083  }
24084 #endif
24085  self->is_running = 1;
24086  retval = self->body((PyObject *) self, tstate, value);
24087  self->is_running = 0;
24088 #if CYTHON_USE_EXC_INFO_STACK
24089  exc_state = &self->gi_exc_state;
24090  tstate->exc_info = exc_state->previous_item;
24091  exc_state->previous_item = NULL;
24092  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
24093 #endif
24094  return retval;
24095 }
24096 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
24097  PyObject *exc_tb = exc_state->exc_traceback;
24098  if (likely(exc_tb)) {
24099 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
24100 #else
24101  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
24102  PyFrameObject *f = tb->tb_frame;
24103  Py_CLEAR(f->f_back);
24104 #endif
24105  }
24106 }
24107 static CYTHON_INLINE
24108 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
24109  if (unlikely(!retval)) {
24110  __Pyx_PyThreadState_declare
24111  __Pyx_PyThreadState_assign
24112  if (!__Pyx_PyErr_Occurred()) {
24113  PyObject *exc = PyExc_StopIteration;
24114  #ifdef __Pyx_AsyncGen_USED
24115  if (__Pyx_AsyncGen_CheckExact(gen))
24116  exc = __Pyx_PyExc_StopAsyncIteration;
24117  #endif
24118  __Pyx_PyErr_SetNone(exc);
24119  }
24120  }
24121  return retval;
24122 }
24123 static CYTHON_INLINE
24124 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
24125  PyObject *ret;
24126  PyObject *val = NULL;
24127  __Pyx_Coroutine_Undelegate(gen);
24128  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
24129  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
24130  Py_XDECREF(val);
24131  return ret;
24132 }
24133 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
24134  PyObject *retval;
24135  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
24136  PyObject *yf = gen->yieldfrom;
24137  if (unlikely(gen->is_running))
24138  return __Pyx_Coroutine_AlreadyRunningError(gen);
24139  if (yf) {
24140  PyObject *ret;
24141  gen->is_running = 1;
24142  #ifdef __Pyx_Generator_USED
24143  if (__Pyx_Generator_CheckExact(yf)) {
24144  ret = __Pyx_Coroutine_Send(yf, value);
24145  } else
24146  #endif
24147  #ifdef __Pyx_Coroutine_USED
24148  if (__Pyx_Coroutine_Check(yf)) {
24149  ret = __Pyx_Coroutine_Send(yf, value);
24150  } else
24151  #endif
24152  #ifdef __Pyx_AsyncGen_USED
24153  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
24154  ret = __Pyx_async_gen_asend_send(yf, value);
24155  } else
24156  #endif
24157  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24158  if (PyGen_CheckExact(yf)) {
24159  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
24160  } else
24161  #endif
24162  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24163  if (PyCoro_CheckExact(yf)) {
24164  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
24165  } else
24166  #endif
24167  {
24168  if (value == Py_None)
24169  ret = Py_TYPE(yf)->tp_iternext(yf);
24170  else
24171  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
24172  }
24173  gen->is_running = 0;
24174  if (likely(ret)) {
24175  return ret;
24176  }
24177  retval = __Pyx_Coroutine_FinishDelegation(gen);
24178  } else {
24179  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
24180  }
24181  return __Pyx_Coroutine_MethodReturn(self, retval);
24182 }
24183 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
24184  PyObject *retval = NULL;
24185  int err = 0;
24186  #ifdef __Pyx_Generator_USED
24187  if (__Pyx_Generator_CheckExact(yf)) {
24188  retval = __Pyx_Coroutine_Close(yf);
24189  if (!retval)
24190  return -1;
24191  } else
24192  #endif
24193  #ifdef __Pyx_Coroutine_USED
24194  if (__Pyx_Coroutine_Check(yf)) {
24195  retval = __Pyx_Coroutine_Close(yf);
24196  if (!retval)
24197  return -1;
24198  } else
24199  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
24200  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
24201  if (!retval)
24202  return -1;
24203  } else
24204  #endif
24205  #ifdef __Pyx_AsyncGen_USED
24206  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
24207  retval = __Pyx_async_gen_asend_close(yf, NULL);
24208  } else
24209  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
24210  retval = __Pyx_async_gen_athrow_close(yf, NULL);
24211  } else
24212  #endif
24213  {
24214  PyObject *meth;
24215  gen->is_running = 1;
24216  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
24217  if (unlikely(!meth)) {
24218  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
24219  PyErr_WriteUnraisable(yf);
24220  }
24221  PyErr_Clear();
24222  } else {
24223  retval = PyObject_CallFunction(meth, NULL);
24224  Py_DECREF(meth);
24225  if (!retval)
24226  err = -1;
24227  }
24228  gen->is_running = 0;
24229  }
24230  Py_XDECREF(retval);
24231  return err;
24232 }
24233 static PyObject *__Pyx_Generator_Next(PyObject *self) {
24234  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
24235  PyObject *yf = gen->yieldfrom;
24236  if (unlikely(gen->is_running))
24237  return __Pyx_Coroutine_AlreadyRunningError(gen);
24238  if (yf) {
24239  PyObject *ret;
24240  gen->is_running = 1;
24241  #ifdef __Pyx_Generator_USED
24242  if (__Pyx_Generator_CheckExact(yf)) {
24243  ret = __Pyx_Generator_Next(yf);
24244  } else
24245  #endif
24246  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24247  if (PyGen_CheckExact(yf)) {
24248  ret = _PyGen_Send((PyGenObject*)yf, NULL);
24249  } else
24250  #endif
24251  #ifdef __Pyx_Coroutine_USED
24252  if (__Pyx_Coroutine_Check(yf)) {
24253  ret = __Pyx_Coroutine_Send(yf, Py_None);
24254  } else
24255  #endif
24256  ret = Py_TYPE(yf)->tp_iternext(yf);
24257  gen->is_running = 0;
24258  if (likely(ret)) {
24259  return ret;
24260  }
24261  return __Pyx_Coroutine_FinishDelegation(gen);
24262  }
24263  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
24264 }
24265 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
24266  return __Pyx_Coroutine_Close(self);
24267 }
24268 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
24269  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24270  PyObject *retval, *raised_exception;
24271  PyObject *yf = gen->yieldfrom;
24272  int err = 0;
24273  if (unlikely(gen->is_running))
24274  return __Pyx_Coroutine_AlreadyRunningError(gen);
24275  if (yf) {
24276  Py_INCREF(yf);
24277  err = __Pyx_Coroutine_CloseIter(gen, yf);
24278  __Pyx_Coroutine_Undelegate(gen);
24279  Py_DECREF(yf);
24280  }
24281  if (err == 0)
24282  PyErr_SetNone(PyExc_GeneratorExit);
24283  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
24284  if (unlikely(retval)) {
24285  const char *msg;
24286  Py_DECREF(retval);
24287  if ((0)) {
24288  #ifdef __Pyx_Coroutine_USED
24289  } else if (__Pyx_Coroutine_Check(self)) {
24290  msg = "coroutine ignored GeneratorExit";
24291  #endif
24292  #ifdef __Pyx_AsyncGen_USED
24293  } else if (__Pyx_AsyncGen_CheckExact(self)) {
24294 #if PY_VERSION_HEX < 0x03060000
24295  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
24296 #else
24297  msg = "async generator ignored GeneratorExit";
24298 #endif
24299  #endif
24300  } else {
24301  msg = "generator ignored GeneratorExit";
24302  }
24303  PyErr_SetString(PyExc_RuntimeError, msg);
24304  return NULL;
24305  }
24306  raised_exception = PyErr_Occurred();
24307  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
24308  if (raised_exception) PyErr_Clear();
24309  Py_INCREF(Py_None);
24310  return Py_None;
24311  }
24312  return NULL;
24313 }
24314 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
24315  PyObject *args, int close_on_genexit) {
24316  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24317  PyObject *yf = gen->yieldfrom;
24318  if (unlikely(gen->is_running))
24319  return __Pyx_Coroutine_AlreadyRunningError(gen);
24320  if (yf) {
24321  PyObject *ret;
24322  Py_INCREF(yf);
24323  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
24324  int err = __Pyx_Coroutine_CloseIter(gen, yf);
24325  Py_DECREF(yf);
24326  __Pyx_Coroutine_Undelegate(gen);
24327  if (err < 0)
24328  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
24329  goto throw_here;
24330  }
24331  gen->is_running = 1;
24332  if (0
24333  #ifdef __Pyx_Generator_USED
24334  || __Pyx_Generator_CheckExact(yf)
24335  #endif
24336  #ifdef __Pyx_Coroutine_USED
24337  || __Pyx_Coroutine_Check(yf)
24338  #endif
24339  ) {
24340  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
24341  #ifdef __Pyx_Coroutine_USED
24342  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
24343  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
24344  #endif
24345  } else {
24346  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
24347  if (unlikely(!meth)) {
24348  Py_DECREF(yf);
24349  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
24350  gen->is_running = 0;
24351  return NULL;
24352  }
24353  PyErr_Clear();
24354  __Pyx_Coroutine_Undelegate(gen);
24355  gen->is_running = 0;
24356  goto throw_here;
24357  }
24358  if (likely(args)) {
24359  ret = PyObject_CallObject(meth, args);
24360  } else {
24361  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
24362  }
24363  Py_DECREF(meth);
24364  }
24365  gen->is_running = 0;
24366  Py_DECREF(yf);
24367  if (!ret) {
24368  ret = __Pyx_Coroutine_FinishDelegation(gen);
24369  }
24370  return __Pyx_Coroutine_MethodReturn(self, ret);
24371  }
24372 throw_here:
24373  __Pyx_Raise(typ, val, tb, NULL);
24374  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
24375 }
24376 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
24377  PyObject *typ;
24378  PyObject *val = NULL;
24379  PyObject *tb = NULL;
24380  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
24381  return NULL;
24382  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
24383 }
24384 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
24385  Py_VISIT(exc_state->exc_type);
24386  Py_VISIT(exc_state->exc_value);
24387  Py_VISIT(exc_state->exc_traceback);
24388  return 0;
24389 }
24390 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
24391  Py_VISIT(gen->closure);
24392  Py_VISIT(gen->classobj);
24393  Py_VISIT(gen->yieldfrom);
24394  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
24395 }
24396 static int __Pyx_Coroutine_clear(PyObject *self) {
24397  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24398  Py_CLEAR(gen->closure);
24399  Py_CLEAR(gen->classobj);
24400  Py_CLEAR(gen->yieldfrom);
24401  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
24402 #ifdef __Pyx_AsyncGen_USED
24403  if (__Pyx_AsyncGen_CheckExact(self)) {
24404  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
24405  }
24406 #endif
24407  Py_CLEAR(gen->gi_code);
24408  Py_CLEAR(gen->gi_name);
24409  Py_CLEAR(gen->gi_qualname);
24410  Py_CLEAR(gen->gi_modulename);
24411  return 0;
24412 }
24413 static void __Pyx_Coroutine_dealloc(PyObject *self) {
24414  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24415  PyObject_GC_UnTrack(gen);
24416  if (gen->gi_weakreflist != NULL)
24417  PyObject_ClearWeakRefs(self);
24418  if (gen->resume_label >= 0) {
24419  PyObject_GC_Track(self);
24420 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
24421  if (PyObject_CallFinalizerFromDealloc(self))
24422 #else
24423  Py_TYPE(gen)->tp_del(self);
24424  if (self->ob_refcnt > 0)
24425 #endif
24426  {
24427  return;
24428  }
24429  PyObject_GC_UnTrack(self);
24430  }
24431 #ifdef __Pyx_AsyncGen_USED
24432  if (__Pyx_AsyncGen_CheckExact(self)) {
24433  /* We have to handle this case for asynchronous generators
24434  right here, because this code has to be between UNTRACK
24435  and GC_Del. */
24436  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
24437  }
24438 #endif
24439  __Pyx_Coroutine_clear(self);
24440  PyObject_GC_Del(gen);
24441 }
24442 static void __Pyx_Coroutine_del(PyObject *self) {
24443  PyObject *error_type, *error_value, *error_traceback;
24444  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24445  __Pyx_PyThreadState_declare
24446  if (gen->resume_label < 0) {
24447  return;
24448  }
24449 #if !CYTHON_USE_TP_FINALIZE
24450  assert(self->ob_refcnt == 0);
24451  self->ob_refcnt = 1;
24452 #endif
24453  __Pyx_PyThreadState_assign
24454  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
24455 #ifdef __Pyx_AsyncGen_USED
24456  if (__Pyx_AsyncGen_CheckExact(self)) {
24457  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
24458  PyObject *finalizer = agen->ag_finalizer;
24459  if (finalizer && !agen->ag_closed) {
24460  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
24461  if (unlikely(!res)) {
24462  PyErr_WriteUnraisable(self);
24463  } else {
24464  Py_DECREF(res);
24465  }
24466  __Pyx_ErrRestore(error_type, error_value, error_traceback);
24467  return;
24468  }
24469  }
24470 #endif
24471  if (unlikely(gen->resume_label == 0 && !error_value)) {
24472 #ifdef __Pyx_Coroutine_USED
24473 #ifdef __Pyx_Generator_USED
24474  if (!__Pyx_Generator_CheckExact(self))
24475 #endif
24476  {
24477  PyObject_GC_UnTrack(self);
24478 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
24479  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
24480  PyErr_WriteUnraisable(self);
24481 #else
24482  {PyObject *msg;
24483  char *cmsg;
24484  #if CYTHON_COMPILING_IN_PYPY
24485  msg = NULL;
24486  cmsg = (char*) "coroutine was never awaited";
24487  #else
24488  char *cname;
24489  PyObject *qualname;
24490  qualname = gen->gi_qualname;
24491  cname = PyString_AS_STRING(qualname);
24492  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
24493  if (unlikely(!msg)) {
24494  PyErr_Clear();
24495  cmsg = (char*) "coroutine was never awaited";
24496  } else {
24497  cmsg = PyString_AS_STRING(msg);
24498  }
24499  #endif
24500  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
24501  PyErr_WriteUnraisable(self);
24502  Py_XDECREF(msg);}
24503 #endif
24504  PyObject_GC_Track(self);
24505  }
24506 #endif
24507  } else {
24508  PyObject *res = __Pyx_Coroutine_Close(self);
24509  if (unlikely(!res)) {
24510  if (PyErr_Occurred())
24511  PyErr_WriteUnraisable(self);
24512  } else {
24513  Py_DECREF(res);
24514  }
24515  }
24516  __Pyx_ErrRestore(error_type, error_value, error_traceback);
24517 #if !CYTHON_USE_TP_FINALIZE
24518  assert(self->ob_refcnt > 0);
24519  if (--self->ob_refcnt == 0) {
24520  return;
24521  }
24522  {
24523  Py_ssize_t refcnt = self->ob_refcnt;
24524  _Py_NewReference(self);
24525  self->ob_refcnt = refcnt;
24526  }
24527 #if CYTHON_COMPILING_IN_CPYTHON
24528  assert(PyType_IS_GC(self->ob_type) &&
24529  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
24530  _Py_DEC_REFTOTAL;
24531 #endif
24532 #ifdef COUNT_ALLOCS
24533  --Py_TYPE(self)->tp_frees;
24534  --Py_TYPE(self)->tp_allocs;
24535 #endif
24536 #endif
24537 }
24538 static PyObject *
24539 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
24540 {
24541  PyObject *name = self->gi_name;
24542  if (unlikely(!name)) name = Py_None;
24543  Py_INCREF(name);
24544  return name;
24545 }
24546 static int
24547 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
24548 {
24549  PyObject *tmp;
24550 #if PY_MAJOR_VERSION >= 3
24551  if (unlikely(value == NULL || !PyUnicode_Check(value)))
24552 #else
24553  if (unlikely(value == NULL || !PyString_Check(value)))
24554 #endif
24555  {
24556  PyErr_SetString(PyExc_TypeError,
24557  "__name__ must be set to a string object");
24558  return -1;
24559  }
24560  tmp = self->gi_name;
24561  Py_INCREF(value);
24562  self->gi_name = value;
24563  Py_XDECREF(tmp);
24564  return 0;
24565 }
24566 static PyObject *
24567 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
24568 {
24569  PyObject *name = self->gi_qualname;
24570  if (unlikely(!name)) name = Py_None;
24571  Py_INCREF(name);
24572  return name;
24573 }
24574 static int
24575 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
24576 {
24577  PyObject *tmp;
24578 #if PY_MAJOR_VERSION >= 3
24579  if (unlikely(value == NULL || !PyUnicode_Check(value)))
24580 #else
24581  if (unlikely(value == NULL || !PyString_Check(value)))
24582 #endif
24583  {
24584  PyErr_SetString(PyExc_TypeError,
24585  "__qualname__ must be set to a string object");
24586  return -1;
24587  }
24588  tmp = self->gi_qualname;
24589  Py_INCREF(value);
24590  self->gi_qualname = value;
24591  Py_XDECREF(tmp);
24592  return 0;
24593 }
24594 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
24595  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
24596  PyObject *name, PyObject *qualname, PyObject *module_name) {
24597  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
24598  if (unlikely(!gen))
24599  return NULL;
24600  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
24601 }
24602 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
24603  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
24604  PyObject *name, PyObject *qualname, PyObject *module_name) {
24605  gen->body = body;
24606  gen->closure = closure;
24607  Py_XINCREF(closure);
24608  gen->is_running = 0;
24609  gen->resume_label = 0;
24610  gen->classobj = NULL;
24611  gen->yieldfrom = NULL;
24612  gen->gi_exc_state.exc_type = NULL;
24613  gen->gi_exc_state.exc_value = NULL;
24614  gen->gi_exc_state.exc_traceback = NULL;
24615 #if CYTHON_USE_EXC_INFO_STACK
24616  gen->gi_exc_state.previous_item = NULL;
24617 #endif
24618  gen->gi_weakreflist = NULL;
24619  Py_XINCREF(qualname);
24620  gen->gi_qualname = qualname;
24621  Py_XINCREF(name);
24622  gen->gi_name = name;
24623  Py_XINCREF(module_name);
24624  gen->gi_modulename = module_name;
24625  Py_XINCREF(code);
24626  gen->gi_code = code;
24627  PyObject_GC_Track(gen);
24628  return gen;
24629 }
24630 
24631 /* PatchModuleWithCoroutine */
24632 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
24633 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
24634  int result;
24635  PyObject *globals, *result_obj;
24636  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
24637  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
24638  #ifdef __Pyx_Coroutine_USED
24639  (PyObject*)__pyx_CoroutineType);
24640  #else
24641  Py_None);
24642  #endif
24643  if (unlikely(result < 0)) goto ignore;
24644  result = PyDict_SetItemString(globals, "_cython_generator_type",
24645  #ifdef __Pyx_Generator_USED
24646  (PyObject*)__pyx_GeneratorType);
24647  #else
24648  Py_None);
24649  #endif
24650  if (unlikely(result < 0)) goto ignore;
24651  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
24652  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
24653  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
24654  if (unlikely(!result_obj)) goto ignore;
24655  Py_DECREF(result_obj);
24656  Py_DECREF(globals);
24657  return module;
24658 ignore:
24659  Py_XDECREF(globals);
24660  PyErr_WriteUnraisable(module);
24661  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
24662  Py_DECREF(module);
24663  module = NULL;
24664  }
24665 #else
24666  py_code++;
24667 #endif
24668  return module;
24669 }
24670 
24671 /* PatchGeneratorABC */
24672 #ifndef CYTHON_REGISTER_ABCS
24673 #define CYTHON_REGISTER_ABCS 1
24674 #endif
24675 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
24676 static PyObject* __Pyx_patch_abc_module(PyObject *module);
24677 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
24678  module = __Pyx_Coroutine_patch_module(
24679  module, ""
24680 "if _cython_generator_type is not None:\n"
24681 " try: Generator = _module.Generator\n"
24682 " except AttributeError: pass\n"
24683 " else: Generator.register(_cython_generator_type)\n"
24684 "if _cython_coroutine_type is not None:\n"
24685 " try: Coroutine = _module.Coroutine\n"
24686 " except AttributeError: pass\n"
24687 " else: Coroutine.register(_cython_coroutine_type)\n"
24688  );
24689  return module;
24690 }
24691 #endif
24692 static int __Pyx_patch_abc(void) {
24693 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
24694  static int abc_patched = 0;
24695  if (CYTHON_REGISTER_ABCS && !abc_patched) {
24696  PyObject *module;
24697  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
24698  if (!module) {
24699  PyErr_WriteUnraisable(NULL);
24700  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
24701  ((PY_MAJOR_VERSION >= 3) ?
24702  "Cython module failed to register with collections.abc module" :
24703  "Cython module failed to register with collections module"), 1) < 0)) {
24704  return -1;
24705  }
24706  } else {
24707  module = __Pyx_patch_abc_module(module);
24708  abc_patched = 1;
24709  if (unlikely(!module))
24710  return -1;
24711  Py_DECREF(module);
24712  }
24713  module = PyImport_ImportModule("backports_abc");
24714  if (module) {
24715  module = __Pyx_patch_abc_module(module);
24716  Py_XDECREF(module);
24717  }
24718  if (!module) {
24719  PyErr_Clear();
24720  }
24721  }
24722 #else
24723  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
24724 #endif
24725  return 0;
24726 }
24727 
24728 /* Generator */
24729 static PyMethodDef __pyx_Generator_methods[] = {
24730  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
24731  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
24732  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
24733  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
24734  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
24735  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
24736  {0, 0, 0, 0}
24737 };
24738 static PyMemberDef __pyx_Generator_memberlist[] = {
24739  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
24740  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
24741  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
24742  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
24743  {0, 0, 0, 0, 0}
24744 };
24745 static PyGetSetDef __pyx_Generator_getsets[] = {
24746  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
24747  (char*) PyDoc_STR("name of the generator"), 0},
24748  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
24749  (char*) PyDoc_STR("qualified name of the generator"), 0},
24750  {0, 0, 0, 0, 0}
24751 };
24752 static PyTypeObject __pyx_GeneratorType_type = {
24753  PyVarObject_HEAD_INIT(0, 0)
24754  "generator",
24755  sizeof(__pyx_CoroutineObject),
24756  0,
24757  (destructor) __Pyx_Coroutine_dealloc,
24758  0,
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  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
24773  0,
24774  (traverseproc) __Pyx_Coroutine_traverse,
24775  0,
24776  0,
24777  offsetof(__pyx_CoroutineObject, gi_weakreflist),
24778  0,
24779  (iternextfunc) __Pyx_Generator_Next,
24780  __pyx_Generator_methods,
24781  __pyx_Generator_memberlist,
24782  __pyx_Generator_getsets,
24783  0,
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 #if CYTHON_USE_TP_FINALIZE
24799  0,
24800 #else
24801  __Pyx_Coroutine_del,
24802 #endif
24803  0,
24804 #if CYTHON_USE_TP_FINALIZE
24805  __Pyx_Coroutine_del,
24806 #elif PY_VERSION_HEX >= 0x030400a1
24807  0,
24808 #endif
24809 #if PY_VERSION_HEX >= 0x030800b1
24810  0,
24811 #endif
24812 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
24813  0,
24814 #endif
24815 };
24816 static int __pyx_Generator_init(void) {
24817  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
24818  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
24819  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
24820  if (unlikely(!__pyx_GeneratorType)) {
24821  return -1;
24822  }
24823  return 0;
24824 }
24825 
24826 /* CheckBinaryVersion */
24827 static int __Pyx_check_binary_version(void) {
24828  char ctversion[4], rtversion[4];
24829  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
24830  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
24831  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
24832  char message[200];
24833  PyOS_snprintf(message, sizeof(message),
24834  "compiletime version %s of module '%.100s' "
24835  "does not match runtime version %s",
24836  ctversion, __Pyx_MODULE_NAME, rtversion);
24837  return PyErr_WarnEx(NULL, message, 1);
24838  }
24839  return 0;
24840 }
24841 
24842 /* InitStrings */
24843 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
24844  while (t->p) {
24845  #if PY_MAJOR_VERSION < 3
24846  if (t->is_unicode) {
24847  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
24848  } else if (t->intern) {
24849  *t->p = PyString_InternFromString(t->s);
24850  } else {
24851  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
24852  }
24853  #else
24854  if (t->is_unicode | t->is_str) {
24855  if (t->intern) {
24856  *t->p = PyUnicode_InternFromString(t->s);
24857  } else if (t->encoding) {
24858  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
24859  } else {
24860  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
24861  }
24862  } else {
24863  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
24864  }
24865  #endif
24866  if (!*t->p)
24867  return -1;
24868  if (PyObject_Hash(*t->p) == -1)
24869  return -1;
24870  ++t;
24871  }
24872  return 0;
24873 }
24874 
24875 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
24876  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
24877 }
24878 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
24879  Py_ssize_t ignore;
24880  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
24881 }
24882 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24883 #if !CYTHON_PEP393_ENABLED
24884 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24885  char* defenc_c;
24886  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
24887  if (!defenc) return NULL;
24888  defenc_c = PyBytes_AS_STRING(defenc);
24889 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24890  {
24891  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
24892  char* c;
24893  for (c = defenc_c; c < end; c++) {
24894  if ((unsigned char) (*c) >= 128) {
24895  PyUnicode_AsASCIIString(o);
24896  return NULL;
24897  }
24898  }
24899  }
24900 #endif
24901  *length = PyBytes_GET_SIZE(defenc);
24902  return defenc_c;
24903 }
24904 #else
24905 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24906  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
24907 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24908  if (likely(PyUnicode_IS_ASCII(o))) {
24909  *length = PyUnicode_GET_LENGTH(o);
24910  return PyUnicode_AsUTF8(o);
24911  } else {
24912  PyUnicode_AsASCIIString(o);
24913  return NULL;
24914  }
24915 #else
24916  return PyUnicode_AsUTF8AndSize(o, length);
24917 #endif
24918 }
24919 #endif
24920 #endif
24921 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24922 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24923  if (
24924 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24925  __Pyx_sys_getdefaultencoding_not_ascii &&
24926 #endif
24927  PyUnicode_Check(o)) {
24928  return __Pyx_PyUnicode_AsStringAndSize(o, length);
24929  } else
24930 #endif
24931 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
24932  if (PyByteArray_Check(o)) {
24933  *length = PyByteArray_GET_SIZE(o);
24934  return PyByteArray_AS_STRING(o);
24935  } else
24936 #endif
24937  {
24938  char* result;
24939  int r = PyBytes_AsStringAndSize(o, &result, length);
24940  if (unlikely(r < 0)) {
24941  return NULL;
24942  } else {
24943  return result;
24944  }
24945  }
24946 }
24947 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
24948  int is_true = x == Py_True;
24949  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
24950  else return PyObject_IsTrue(x);
24951 }
24952 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
24953  int retval;
24954  if (unlikely(!x)) return -1;
24955  retval = __Pyx_PyObject_IsTrue(x);
24956  Py_DECREF(x);
24957  return retval;
24958 }
24959 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
24960 #if PY_MAJOR_VERSION >= 3
24961  if (PyLong_Check(result)) {
24962  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
24963  "__int__ returned non-int (type %.200s). "
24964  "The ability to return an instance of a strict subclass of int "
24965  "is deprecated, and may be removed in a future version of Python.",
24966  Py_TYPE(result)->tp_name)) {
24967  Py_DECREF(result);
24968  return NULL;
24969  }
24970  return result;
24971  }
24972 #endif
24973  PyErr_Format(PyExc_TypeError,
24974  "__%.4s__ returned non-%.4s (type %.200s)",
24975  type_name, type_name, Py_TYPE(result)->tp_name);
24976  Py_DECREF(result);
24977  return NULL;
24978 }
24979 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
24980 #if CYTHON_USE_TYPE_SLOTS
24981  PyNumberMethods *m;
24982 #endif
24983  const char *name = NULL;
24984  PyObject *res = NULL;
24985 #if PY_MAJOR_VERSION < 3
24986  if (likely(PyInt_Check(x) || PyLong_Check(x)))
24987 #else
24988  if (likely(PyLong_Check(x)))
24989 #endif
24990  return __Pyx_NewRef(x);
24991 #if CYTHON_USE_TYPE_SLOTS
24992  m = Py_TYPE(x)->tp_as_number;
24993  #if PY_MAJOR_VERSION < 3
24994  if (m && m->nb_int) {
24995  name = "int";
24996  res = m->nb_int(x);
24997  }
24998  else if (m && m->nb_long) {
24999  name = "long";
25000  res = m->nb_long(x);
25001  }
25002  #else
25003  if (likely(m && m->nb_int)) {
25004  name = "int";
25005  res = m->nb_int(x);
25006  }
25007  #endif
25008 #else
25009  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
25010  res = PyNumber_Int(x);
25011  }
25012 #endif
25013  if (likely(res)) {
25014 #if PY_MAJOR_VERSION < 3
25015  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
25016 #else
25017  if (unlikely(!PyLong_CheckExact(res))) {
25018 #endif
25019  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
25020  }
25021  }
25022  else if (!PyErr_Occurred()) {
25023  PyErr_SetString(PyExc_TypeError,
25024  "an integer is required");
25025  }
25026  return res;
25027 }
25028 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
25029  Py_ssize_t ival;
25030  PyObject *x;
25031 #if PY_MAJOR_VERSION < 3
25032  if (likely(PyInt_CheckExact(b))) {
25033  if (sizeof(Py_ssize_t) >= sizeof(long))
25034  return PyInt_AS_LONG(b);
25035  else
25036  return PyInt_AsSsize_t(b);
25037  }
25038 #endif
25039  if (likely(PyLong_CheckExact(b))) {
25040  #if CYTHON_USE_PYLONG_INTERNALS
25041  const digit* digits = ((PyLongObject*)b)->ob_digit;
25042  const Py_ssize_t size = Py_SIZE(b);
25043  if (likely(__Pyx_sst_abs(size) <= 1)) {
25044  ival = likely(size) ? digits[0] : 0;
25045  if (size == -1) ival = -ival;
25046  return ival;
25047  } else {
25048  switch (size) {
25049  case 2:
25050  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
25051  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25052  }
25053  break;
25054  case -2:
25055  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
25056  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25057  }
25058  break;
25059  case 3:
25060  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
25061  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25062  }
25063  break;
25064  case -3:
25065  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
25066  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25067  }
25068  break;
25069  case 4:
25070  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
25071  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]));
25072  }
25073  break;
25074  case -4:
25075  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
25076  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]));
25077  }
25078  break;
25079  }
25080  }
25081  #endif
25082  return PyLong_AsSsize_t(b);
25083  }
25084  x = PyNumber_Index(b);
25085  if (!x) return -1;
25086  ival = PyInt_AsSsize_t(x);
25087  Py_DECREF(x);
25088  return ival;
25089 }
25090 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
25091  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
25092 }
25093 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
25094  return PyInt_FromSize_t(ival);
25095 }
25096 
25097 
25098 #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:905
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:967
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:1005
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:506
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:974
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:977
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:798
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:78
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:845
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:499
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:720
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:738
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:826
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:573
glucat::abs
Scalar_T abs(const Multivector< Scalar_T, LO, HI > &val)
Absolute value == sqrt(norm)
Definition: clifford_algebra_imp.h:491
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:589
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:704
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:228
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:872
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:952
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:765
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:1947
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:933
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