glucat  0.8.2
PyClical.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.14 */
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  "-fmessage-length=0",
19  "-grecord-gcc-switches",
20  "-O2",
21  "-Wall",
22  "-D_FORTIFY_SOURCE=2",
23  "-fstack-protector-strong",
24  "-funwind-tables",
25  "-fasynchronous-unwind-tables",
26  "-fstack-clash-protection",
27  "-finline-limit=4000",
28  "--param",
29  "inline-unit-growth=200",
30  "-funroll-loops",
31  "-fvariable-expansion-in-unroller",
32  "-DNDEBUG",
33  "-DHAVE_BITS_WORDSIZE_H",
34  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
35  "-D_GLUCAT_USE_DENSE_MATRICES",
36  "-D_GLUCAT_CHECK_ISNAN",
37  "-Wno-unused-local-typedefs",
38  "-Wno-misleading-indentation",
39  "-fno-check-new",
40  "-fexceptions"
41  ],
42  "include_dirs": [
43  ".",
44  ".."
45  ],
46  "language": "c++",
47  "name": "PyClical",
48  "sources": [
49  "PyClical.pyx"
50  ]
51  },
52  "module_name": "PyClical"
53 }
54 END: Cython Metadata */
55 
56 #define PY_SSIZE_T_CLEAN
57 #include "Python.h"
58 #ifndef Py_PYTHON_H
59  #error Python headers needed to compile C extensions, please install development version of Python.
60 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
61  #error Cython requires Python 2.6+ or Python 3.3+.
62 #else
63 #define CYTHON_ABI "0_29_14"
64 #define CYTHON_HEX_VERSION 0x001D0EF0
65 #define CYTHON_FUTURE_DIVISION 0
66 #include <stddef.h>
67 #ifndef offsetof
68  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
69 #endif
70 #if !defined(WIN32) && !defined(MS_WINDOWS)
71  #ifndef __stdcall
72  #define __stdcall
73  #endif
74  #ifndef __cdecl
75  #define __cdecl
76  #endif
77  #ifndef __fastcall
78  #define __fastcall
79  #endif
80 #endif
81 #ifndef DL_IMPORT
82  #define DL_IMPORT(t) t
83 #endif
84 #ifndef DL_EXPORT
85  #define DL_EXPORT(t) t
86 #endif
87 #define __PYX_COMMA ,
88 #ifndef HAVE_LONG_LONG
89  #if PY_VERSION_HEX >= 0x02070000
90  #define HAVE_LONG_LONG
91  #endif
92 #endif
93 #ifndef PY_LONG_LONG
94  #define PY_LONG_LONG LONG_LONG
95 #endif
96 #ifndef Py_HUGE_VAL
97  #define Py_HUGE_VAL HUGE_VAL
98 #endif
99 #ifdef PYPY_VERSION
100  #define CYTHON_COMPILING_IN_PYPY 1
101  #define CYTHON_COMPILING_IN_PYSTON 0
102  #define CYTHON_COMPILING_IN_CPYTHON 0
103  #undef CYTHON_USE_TYPE_SLOTS
104  #define CYTHON_USE_TYPE_SLOTS 0
105  #undef CYTHON_USE_PYTYPE_LOOKUP
106  #define CYTHON_USE_PYTYPE_LOOKUP 0
107  #if PY_VERSION_HEX < 0x03050000
108  #undef CYTHON_USE_ASYNC_SLOTS
109  #define CYTHON_USE_ASYNC_SLOTS 0
110  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
111  #define CYTHON_USE_ASYNC_SLOTS 1
112  #endif
113  #undef CYTHON_USE_PYLIST_INTERNALS
114  #define CYTHON_USE_PYLIST_INTERNALS 0
115  #undef CYTHON_USE_UNICODE_INTERNALS
116  #define CYTHON_USE_UNICODE_INTERNALS 0
117  #undef CYTHON_USE_UNICODE_WRITER
118  #define CYTHON_USE_UNICODE_WRITER 0
119  #undef CYTHON_USE_PYLONG_INTERNALS
120  #define CYTHON_USE_PYLONG_INTERNALS 0
121  #undef CYTHON_AVOID_BORROWED_REFS
122  #define CYTHON_AVOID_BORROWED_REFS 1
123  #undef CYTHON_ASSUME_SAFE_MACROS
124  #define CYTHON_ASSUME_SAFE_MACROS 0
125  #undef CYTHON_UNPACK_METHODS
126  #define CYTHON_UNPACK_METHODS 0
127  #undef CYTHON_FAST_THREAD_STATE
128  #define CYTHON_FAST_THREAD_STATE 0
129  #undef CYTHON_FAST_PYCALL
130  #define CYTHON_FAST_PYCALL 0
131  #undef CYTHON_PEP489_MULTI_PHASE_INIT
132  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
133  #undef CYTHON_USE_TP_FINALIZE
134  #define CYTHON_USE_TP_FINALIZE 0
135  #undef CYTHON_USE_DICT_VERSIONS
136  #define CYTHON_USE_DICT_VERSIONS 0
137  #undef CYTHON_USE_EXC_INFO_STACK
138  #define CYTHON_USE_EXC_INFO_STACK 0
139 #elif defined(PYSTON_VERSION)
140  #define CYTHON_COMPILING_IN_PYPY 0
141  #define CYTHON_COMPILING_IN_PYSTON 1
142  #define CYTHON_COMPILING_IN_CPYTHON 0
143  #ifndef CYTHON_USE_TYPE_SLOTS
144  #define CYTHON_USE_TYPE_SLOTS 1
145  #endif
146  #undef CYTHON_USE_PYTYPE_LOOKUP
147  #define CYTHON_USE_PYTYPE_LOOKUP 0
148  #undef CYTHON_USE_ASYNC_SLOTS
149  #define CYTHON_USE_ASYNC_SLOTS 0
150  #undef CYTHON_USE_PYLIST_INTERNALS
151  #define CYTHON_USE_PYLIST_INTERNALS 0
152  #ifndef CYTHON_USE_UNICODE_INTERNALS
153  #define CYTHON_USE_UNICODE_INTERNALS 1
154  #endif
155  #undef CYTHON_USE_UNICODE_WRITER
156  #define CYTHON_USE_UNICODE_WRITER 0
157  #undef CYTHON_USE_PYLONG_INTERNALS
158  #define CYTHON_USE_PYLONG_INTERNALS 0
159  #ifndef CYTHON_AVOID_BORROWED_REFS
160  #define CYTHON_AVOID_BORROWED_REFS 0
161  #endif
162  #ifndef CYTHON_ASSUME_SAFE_MACROS
163  #define CYTHON_ASSUME_SAFE_MACROS 1
164  #endif
165  #ifndef CYTHON_UNPACK_METHODS
166  #define CYTHON_UNPACK_METHODS 1
167  #endif
168  #undef CYTHON_FAST_THREAD_STATE
169  #define CYTHON_FAST_THREAD_STATE 0
170  #undef CYTHON_FAST_PYCALL
171  #define CYTHON_FAST_PYCALL 0
172  #undef CYTHON_PEP489_MULTI_PHASE_INIT
173  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
174  #undef CYTHON_USE_TP_FINALIZE
175  #define CYTHON_USE_TP_FINALIZE 0
176  #undef CYTHON_USE_DICT_VERSIONS
177  #define CYTHON_USE_DICT_VERSIONS 0
178  #undef CYTHON_USE_EXC_INFO_STACK
179  #define CYTHON_USE_EXC_INFO_STACK 0
180 #else
181  #define CYTHON_COMPILING_IN_PYPY 0
182  #define CYTHON_COMPILING_IN_PYSTON 0
183  #define CYTHON_COMPILING_IN_CPYTHON 1
184  #ifndef CYTHON_USE_TYPE_SLOTS
185  #define CYTHON_USE_TYPE_SLOTS 1
186  #endif
187  #if PY_VERSION_HEX < 0x02070000
188  #undef CYTHON_USE_PYTYPE_LOOKUP
189  #define CYTHON_USE_PYTYPE_LOOKUP 0
190  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
191  #define CYTHON_USE_PYTYPE_LOOKUP 1
192  #endif
193  #if PY_MAJOR_VERSION < 3
194  #undef CYTHON_USE_ASYNC_SLOTS
195  #define CYTHON_USE_ASYNC_SLOTS 0
196  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
197  #define CYTHON_USE_ASYNC_SLOTS 1
198  #endif
199  #if PY_VERSION_HEX < 0x02070000
200  #undef CYTHON_USE_PYLONG_INTERNALS
201  #define CYTHON_USE_PYLONG_INTERNALS 0
202  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
203  #define CYTHON_USE_PYLONG_INTERNALS 1
204  #endif
205  #ifndef CYTHON_USE_PYLIST_INTERNALS
206  #define CYTHON_USE_PYLIST_INTERNALS 1
207  #endif
208  #ifndef CYTHON_USE_UNICODE_INTERNALS
209  #define CYTHON_USE_UNICODE_INTERNALS 1
210  #endif
211  #if PY_VERSION_HEX < 0x030300F0
212  #undef CYTHON_USE_UNICODE_WRITER
213  #define CYTHON_USE_UNICODE_WRITER 0
214  #elif !defined(CYTHON_USE_UNICODE_WRITER)
215  #define CYTHON_USE_UNICODE_WRITER 1
216  #endif
217  #ifndef CYTHON_AVOID_BORROWED_REFS
218  #define CYTHON_AVOID_BORROWED_REFS 0
219  #endif
220  #ifndef CYTHON_ASSUME_SAFE_MACROS
221  #define CYTHON_ASSUME_SAFE_MACROS 1
222  #endif
223  #ifndef CYTHON_UNPACK_METHODS
224  #define CYTHON_UNPACK_METHODS 1
225  #endif
226  #ifndef CYTHON_FAST_THREAD_STATE
227  #define CYTHON_FAST_THREAD_STATE 1
228  #endif
229  #ifndef CYTHON_FAST_PYCALL
230  #define CYTHON_FAST_PYCALL 1
231  #endif
232  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
233  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
234  #endif
235  #ifndef CYTHON_USE_TP_FINALIZE
236  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
237  #endif
238  #ifndef CYTHON_USE_DICT_VERSIONS
239  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
240  #endif
241  #ifndef CYTHON_USE_EXC_INFO_STACK
242  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
243  #endif
244 #endif
245 #if !defined(CYTHON_FAST_PYCCALL)
246 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
247 #endif
248 #if CYTHON_USE_PYLONG_INTERNALS
249  #include "longintrepr.h"
250  #undef SHIFT
251  #undef BASE
252  #undef MASK
253  #ifdef SIZEOF_VOID_P
254  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
255  #endif
256 #endif
257 #ifndef __has_attribute
258  #define __has_attribute(x) 0
259 #endif
260 #ifndef __has_cpp_attribute
261  #define __has_cpp_attribute(x) 0
262 #endif
263 #ifndef CYTHON_RESTRICT
264  #if defined(__GNUC__)
265  #define CYTHON_RESTRICT __restrict__
266  #elif defined(_MSC_VER) && _MSC_VER >= 1400
267  #define CYTHON_RESTRICT __restrict
268  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
269  #define CYTHON_RESTRICT restrict
270  #else
271  #define CYTHON_RESTRICT
272  #endif
273 #endif
274 #ifndef CYTHON_UNUSED
275 # if defined(__GNUC__)
276 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
277 # define CYTHON_UNUSED __attribute__ ((__unused__))
278 # else
279 # define CYTHON_UNUSED
280 # endif
281 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
282 # define CYTHON_UNUSED __attribute__ ((__unused__))
283 # else
284 # define CYTHON_UNUSED
285 # endif
286 #endif
287 #ifndef CYTHON_MAYBE_UNUSED_VAR
288 # if defined(__cplusplus)
289  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
290 # else
291 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
292 # endif
293 #endif
294 #ifndef CYTHON_NCP_UNUSED
295 # if CYTHON_COMPILING_IN_CPYTHON
296 # define CYTHON_NCP_UNUSED
297 # else
298 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
299 # endif
300 #endif
301 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
302 #ifdef _MSC_VER
303  #ifndef _MSC_STDINT_H_
304  #if _MSC_VER < 1300
305  typedef unsigned char uint8_t;
306  typedef unsigned int uint32_t;
307  #else
308  typedef unsigned __int8 uint8_t;
309  typedef unsigned __int32 uint32_t;
310  #endif
311  #endif
312 #else
313  #include <stdint.h>
314 #endif
315 #ifndef CYTHON_FALLTHROUGH
316  #if defined(__cplusplus) && __cplusplus >= 201103L
317  #if __has_cpp_attribute(fallthrough)
318  #define CYTHON_FALLTHROUGH [[fallthrough]]
319  #elif __has_cpp_attribute(clang::fallthrough)
320  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
321  #elif __has_cpp_attribute(gnu::fallthrough)
322  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
323  #endif
324  #endif
325  #ifndef CYTHON_FALLTHROUGH
326  #if __has_attribute(fallthrough)
327  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
328  #else
329  #define CYTHON_FALLTHROUGH
330  #endif
331  #endif
332  #if defined(__clang__ ) && defined(__apple_build_version__)
333  #if __apple_build_version__ < 7000000
334  #undef CYTHON_FALLTHROUGH
335  #define CYTHON_FALLTHROUGH
336  #endif
337  #endif
338 #endif
339 
340 #ifndef __cplusplus
341  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
342 #endif
343 #ifndef CYTHON_INLINE
344  #if defined(__clang__)
345  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
346  #else
347  #define CYTHON_INLINE inline
348  #endif
349 #endif
350 template<typename T>
351 void __Pyx_call_destructor(T& x) {
352  x.~T();
353 }
354 template<typename T>
355 class __Pyx_FakeReference {
356  public:
357  __Pyx_FakeReference() : ptr(NULL) { }
358  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
359  T *operator->() { return ptr; }
360  T *operator&() { return ptr; }
361  operator T&() { return *ptr; }
362  template<typename U> bool operator ==(U other) { return *ptr == other; }
363  template<typename U> bool operator !=(U other) { return *ptr != other; }
364  private:
365  T *ptr;
366 };
367 
368 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
369  #define Py_OptimizeFlag 0
370 #endif
371 #define __PYX_BUILD_PY_SSIZE_T "n"
372 #define CYTHON_FORMAT_SSIZE_T "z"
373 #if PY_MAJOR_VERSION < 3
374  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
375  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
376  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
377  #define __Pyx_DefaultClassType PyClass_Type
378 #else
379  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
380 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
381  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
382  PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
383 #else
384  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
385  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
386 #endif
387  #define __Pyx_DefaultClassType PyType_Type
388 #endif
389 #ifndef Py_TPFLAGS_CHECKTYPES
390  #define Py_TPFLAGS_CHECKTYPES 0
391 #endif
392 #ifndef Py_TPFLAGS_HAVE_INDEX
393  #define Py_TPFLAGS_HAVE_INDEX 0
394 #endif
395 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
396  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
397 #endif
398 #ifndef Py_TPFLAGS_HAVE_FINALIZE
399  #define Py_TPFLAGS_HAVE_FINALIZE 0
400 #endif
401 #ifndef METH_STACKLESS
402  #define METH_STACKLESS 0
403 #endif
404 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
405  #ifndef METH_FASTCALL
406  #define METH_FASTCALL 0x80
407  #endif
408  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
409  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
410  Py_ssize_t nargs, PyObject *kwnames);
411 #else
412  #define __Pyx_PyCFunctionFast _PyCFunctionFast
413  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
414 #endif
415 #if CYTHON_FAST_PYCCALL
416 #define __Pyx_PyFastCFunction_Check(func)\
417  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
418 #else
419 #define __Pyx_PyFastCFunction_Check(func) 0
420 #endif
421 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
422  #define PyObject_Malloc(s) PyMem_Malloc(s)
423  #define PyObject_Free(p) PyMem_Free(p)
424  #define PyObject_Realloc(p) PyMem_Realloc(p)
425 #endif
426 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
427  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
428  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
429  #define PyMem_RawFree(p) PyMem_Free(p)
430 #endif
431 #if CYTHON_COMPILING_IN_PYSTON
432  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
433  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
434 #else
435  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
436  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
437 #endif
438 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
439  #define __Pyx_PyThreadState_Current PyThreadState_GET()
440 #elif PY_VERSION_HEX >= 0x03060000
441  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
442 #elif PY_VERSION_HEX >= 0x03000000
443  #define __Pyx_PyThreadState_Current PyThreadState_GET()
444 #else
445  #define __Pyx_PyThreadState_Current _PyThreadState_Current
446 #endif
447 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
448 #include "pythread.h"
449 #define Py_tss_NEEDS_INIT 0
450 typedef int Py_tss_t;
451 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
452  *key = PyThread_create_key();
453  return 0;
454 }
455 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
456  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
457  *key = Py_tss_NEEDS_INIT;
458  return key;
459 }
460 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
461  PyObject_Free(key);
462 }
463 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
464  return *key != Py_tss_NEEDS_INIT;
465 }
466 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
467  PyThread_delete_key(*key);
468  *key = Py_tss_NEEDS_INIT;
469 }
470 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
471  return PyThread_set_key_value(*key, value);
472 }
473 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
474  return PyThread_get_key_value(*key);
475 }
476 #endif
477 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
478 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
479 #else
480 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
481 #endif
482 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
483  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
484  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
485 #else
486  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
487  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
488 #endif
489 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
490 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
491 #else
492 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
493 #endif
494 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
495  #define CYTHON_PEP393_ENABLED 1
496  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
497  0 : _PyUnicode_Ready((PyObject *)(op)))
498  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
499  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
500  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
501  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
502  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
503  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
504  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
505  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
506 #else
507  #define CYTHON_PEP393_ENABLED 0
508  #define PyUnicode_1BYTE_KIND 1
509  #define PyUnicode_2BYTE_KIND 2
510  #define PyUnicode_4BYTE_KIND 4
511  #define __Pyx_PyUnicode_READY(op) (0)
512  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
513  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
514  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
515  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
516  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
517  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
518  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
519  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
520 #endif
521 #if CYTHON_COMPILING_IN_PYPY
522  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
523  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
524 #else
525  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
526  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
527  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
528 #endif
529 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
530  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
531 #endif
532 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
533  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
534 #endif
535 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
536  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
537 #endif
538 #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))
539 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
540 #if PY_MAJOR_VERSION >= 3
541  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
542 #else
543  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
544 #endif
545 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
546  #define PyObject_ASCII(o) PyObject_Repr(o)
547 #endif
548 #if PY_MAJOR_VERSION >= 3
549  #define PyBaseString_Type PyUnicode_Type
550  #define PyStringObject PyUnicodeObject
551  #define PyString_Type PyUnicode_Type
552  #define PyString_Check PyUnicode_Check
553  #define PyString_CheckExact PyUnicode_CheckExact
554  #define PyObject_Unicode PyObject_Str
555 #endif
556 #if PY_MAJOR_VERSION >= 3
557  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
558  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
559 #else
560  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
561  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
562 #endif
563 #ifndef PySet_CheckExact
564  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
565 #endif
566 #if CYTHON_ASSUME_SAFE_MACROS
567  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
568 #else
569  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
570 #endif
571 #if PY_MAJOR_VERSION >= 3
572  #define PyIntObject PyLongObject
573  #define PyInt_Type PyLong_Type
574  #define PyInt_Check(op) PyLong_Check(op)
575  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
576  #define PyInt_FromString PyLong_FromString
577  #define PyInt_FromUnicode PyLong_FromUnicode
578  #define PyInt_FromLong PyLong_FromLong
579  #define PyInt_FromSize_t PyLong_FromSize_t
580  #define PyInt_FromSsize_t PyLong_FromSsize_t
581  #define PyInt_AsLong PyLong_AsLong
582  #define PyInt_AS_LONG PyLong_AS_LONG
583  #define PyInt_AsSsize_t PyLong_AsSsize_t
584  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
585  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
586  #define PyNumber_Int PyNumber_Long
587 #endif
588 #if PY_MAJOR_VERSION >= 3
589  #define PyBoolObject PyLongObject
590 #endif
591 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
592  #ifndef PyUnicode_InternFromString
593  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
594  #endif
595 #endif
596 #if PY_VERSION_HEX < 0x030200A4
597  typedef long Py_hash_t;
598  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
599  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
600 #else
601  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
602  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
603 #endif
604 #if PY_MAJOR_VERSION >= 3
605  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
606 #else
607  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
608 #endif
609 #if CYTHON_USE_ASYNC_SLOTS
610  #if PY_VERSION_HEX >= 0x030500B1
611  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
612  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
613  #else
614  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
615  #endif
616 #else
617  #define __Pyx_PyType_AsAsync(obj) NULL
618 #endif
619 #ifndef __Pyx_PyAsyncMethodsStruct
620  typedef struct {
621  unaryfunc am_await;
622  unaryfunc am_aiter;
623  unaryfunc am_anext;
624  } __Pyx_PyAsyncMethodsStruct;
625 #endif
626 
627 #if defined(WIN32) || defined(MS_WINDOWS)
628  #define _USE_MATH_DEFINES
629 #endif
630 #include <math.h>
631 #ifdef NAN
632 #define __PYX_NAN() ((float) NAN)
633 #else
634 static CYTHON_INLINE float __PYX_NAN() {
635  float value;
636  memset(&value, 0xFF, sizeof(value));
637  return value;
638 }
639 #endif
640 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
641 #define __Pyx_truncl trunc
642 #else
643 #define __Pyx_truncl truncl
644 #endif
645 
646 
647 #define __PYX_ERR(f_index, lineno, Ln_error) \
648 { \
649  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
650 }
651 
652 #ifndef __PYX_EXTERN_C
653  #ifdef __cplusplus
654  #define __PYX_EXTERN_C extern "C"
655  #else
656  #define __PYX_EXTERN_C extern
657  #endif
658 #endif
659 
660 #define __PYX_HAVE__PyClical
661 #define __PYX_HAVE_API__PyClical
662 /* Early includes */
663 #include "ios"
664 #include "new"
665 #include "stdexcept"
666 #include "typeinfo"
667 #include <vector>
668 #include "PyClical.h"
669 #ifdef _OPENMP
670 #include <omp.h>
671 #endif /* _OPENMP */
672 
673 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
674 #define CYTHON_WITHOUT_ASSERTIONS
675 #endif
676 
677 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
678  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
679 
680 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
681 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
682 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
683 #define __PYX_DEFAULT_STRING_ENCODING ""
684 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
685 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
686 #define __Pyx_uchar_cast(c) ((unsigned char)c)
687 #define __Pyx_long_cast(x) ((long)x)
688 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
689  (sizeof(type) < sizeof(Py_ssize_t)) ||\
690  (sizeof(type) > sizeof(Py_ssize_t) &&\
691  likely(v < (type)PY_SSIZE_T_MAX ||\
692  v == (type)PY_SSIZE_T_MAX) &&\
693  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
694  v == (type)PY_SSIZE_T_MIN))) ||\
695  (sizeof(type) == sizeof(Py_ssize_t) &&\
696  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
697  v == (type)PY_SSIZE_T_MAX))) )
698 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
699  return (size_t) i < (size_t) limit;
700 }
701 #if defined (__cplusplus) && __cplusplus >= 201103L
702  #include <cstdlib>
703  #define __Pyx_sst_abs(value) std::abs(value)
704 #elif SIZEOF_INT >= SIZEOF_SIZE_T
705  #define __Pyx_sst_abs(value) abs(value)
706 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
707  #define __Pyx_sst_abs(value) labs(value)
708 #elif defined (_MSC_VER)
709  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
710 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
711  #define __Pyx_sst_abs(value) llabs(value)
712 #elif defined (__GNUC__)
713  #define __Pyx_sst_abs(value) __builtin_llabs(value)
714 #else
715  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
716 #endif
717 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
718 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
719 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
720 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
721 #define __Pyx_PyBytes_FromString PyBytes_FromString
722 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
723 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
724 #if PY_MAJOR_VERSION < 3
725  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
726  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
727 #else
728  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
729  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
730 #endif
731 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
732 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
733 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
734 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
735 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
736 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
737 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
738 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
739 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
740 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
741 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
742 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
743 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
744 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
745 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
746 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
747 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
748  const Py_UNICODE *u_end = u;
749  while (*u_end++) ;
750  return (size_t)(u_end - u - 1);
751 }
752 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
753 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
754 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
755 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
756 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
757 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
758 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
759 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
760 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
761 #define __Pyx_PySequence_Tuple(obj)\
762  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
763 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
764 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
765 #if CYTHON_ASSUME_SAFE_MACROS
766 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
767 #else
768 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
769 #endif
770 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
771 #if PY_MAJOR_VERSION >= 3
772 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
773 #else
774 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
775 #endif
776 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
777 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
778 static int __Pyx_sys_getdefaultencoding_not_ascii;
779 static int __Pyx_init_sys_getdefaultencoding_params(void) {
780  PyObject* sys;
781  PyObject* default_encoding = NULL;
782  PyObject* ascii_chars_u = NULL;
783  PyObject* ascii_chars_b = NULL;
784  const char* default_encoding_c;
785  sys = PyImport_ImportModule("sys");
786  if (!sys) goto bad;
787  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
788  Py_DECREF(sys);
789  if (!default_encoding) goto bad;
790  default_encoding_c = PyBytes_AsString(default_encoding);
791  if (!default_encoding_c) goto bad;
792  if (strcmp(default_encoding_c, "ascii") == 0) {
793  __Pyx_sys_getdefaultencoding_not_ascii = 0;
794  } else {
795  char ascii_chars[128];
796  int c;
797  for (c = 0; c < 128; c++) {
798  ascii_chars[c] = c;
799  }
800  __Pyx_sys_getdefaultencoding_not_ascii = 1;
801  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
802  if (!ascii_chars_u) goto bad;
803  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
804  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
805  PyErr_Format(
806  PyExc_ValueError,
807  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
808  default_encoding_c);
809  goto bad;
810  }
811  Py_DECREF(ascii_chars_u);
812  Py_DECREF(ascii_chars_b);
813  }
814  Py_DECREF(default_encoding);
815  return 0;
816 bad:
817  Py_XDECREF(default_encoding);
818  Py_XDECREF(ascii_chars_u);
819  Py_XDECREF(ascii_chars_b);
820  return -1;
821 }
822 #endif
823 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
824 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
825 #else
826 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
827 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
828 static char* __PYX_DEFAULT_STRING_ENCODING;
829 static int __Pyx_init_sys_getdefaultencoding_params(void) {
830  PyObject* sys;
831  PyObject* default_encoding = NULL;
832  char* default_encoding_c;
833  sys = PyImport_ImportModule("sys");
834  if (!sys) goto bad;
835  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
836  Py_DECREF(sys);
837  if (!default_encoding) goto bad;
838  default_encoding_c = PyBytes_AsString(default_encoding);
839  if (!default_encoding_c) goto bad;
840  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
841  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
842  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
843  Py_DECREF(default_encoding);
844  return 0;
845 bad:
846  Py_XDECREF(default_encoding);
847  return -1;
848 }
849 #endif
850 #endif
851 
852 
853 /* Test for GCC > 2.95 */
854 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
855  #define likely(x) __builtin_expect(!!(x), 1)
856  #define unlikely(x) __builtin_expect(!!(x), 0)
857 #else /* !__GNUC__ or GCC < 2.95 */
858  #define likely(x) (x)
859  #define unlikely(x) (x)
860 #endif /* __GNUC__ */
861 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
862 
863 static PyObject *__pyx_m = NULL;
864 static PyObject *__pyx_d;
865 static PyObject *__pyx_b;
866 static PyObject *__pyx_cython_runtime = NULL;
867 static PyObject *__pyx_empty_tuple;
868 static PyObject *__pyx_empty_bytes;
869 static PyObject *__pyx_empty_unicode;
870 static int __pyx_lineno;
871 static int __pyx_clineno = 0;
872 static const char * __pyx_cfilenm= __FILE__;
873 static const char *__pyx_filename;
874 
875 
876 static const char *__pyx_f[] = {
877  "PyClical.pyx",
878  "stringsource",
879 };
880 
881 /*--- Type declarations ---*/
882 struct __pyx_obj_8PyClical_index_set;
883 struct __pyx_obj_8PyClical_clifford;
884 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
885 struct __pyx_opt_args_8PyClical_sqrt;
886 struct __pyx_opt_args_8PyClical_log;
887 struct __pyx_opt_args_8PyClical_cos;
888 struct __pyx_opt_args_8PyClical_acos;
889 struct __pyx_opt_args_8PyClical_acosh;
890 struct __pyx_opt_args_8PyClical_sin;
891 struct __pyx_opt_args_8PyClical_asin;
892 struct __pyx_opt_args_8PyClical_asinh;
893 struct __pyx_opt_args_8PyClical_tan;
894 struct __pyx_opt_args_8PyClical_atan;
895 struct __pyx_opt_args_8PyClical_atanh;
896 struct __pyx_opt_args_8PyClical_random_clifford;
897 
898 /* "PyClical.pyx":1542
899  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
900  *
901  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
902  * """
903  * Square root of multivector with optional complexifier.
904  */
905 struct __pyx_opt_args_8PyClical_sqrt {
906  int __pyx_n;
907  PyObject *i;
908 };
909 
910 /* "PyClical.pyx":1579
911  * return clifford().wrap( glucat.exp(toClifford(obj)) )
912  *
913  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
914  * """
915  * Natural logarithm of multivector with optional complexifier.
916  */
917 struct __pyx_opt_args_8PyClical_log {
918  int __pyx_n;
919  PyObject *i;
920 };
921 
922 /* "PyClical.pyx":1602
923  * return clifford().wrap( glucat.log(toClifford(obj)) )
924  *
925  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
926  * """
927  * Cosine of multivector with optional complexifier.
928  */
929 struct __pyx_opt_args_8PyClical_cos {
930  int __pyx_n;
931  PyObject *i;
932 };
933 
934 /* "PyClical.pyx":1619
935  * return clifford().wrap( glucat.cos(toClifford(obj)) )
936  *
937  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
938  * """
939  * Inverse cosine of multivector with optional complexifier.
940  */
941 struct __pyx_opt_args_8PyClical_acos {
942  int __pyx_n;
943  PyObject *i;
944 };
945 
946 /* "PyClical.pyx":1656
947  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
948  *
949  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
950  * """
951  * Inverse hyperbolic cosine of multivector with optional complexifier.
952  */
953 struct __pyx_opt_args_8PyClical_acosh {
954  int __pyx_n;
955  PyObject *i;
956 };
957 
958 /* "PyClical.pyx":1679
959  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
960  *
961  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
962  * """
963  * Sine of multivector with optional complexifier.
964  */
965 struct __pyx_opt_args_8PyClical_sin {
966  int __pyx_n;
967  PyObject *i;
968 };
969 
970 /* "PyClical.pyx":1698
971  * return clifford().wrap( glucat.sin(toClifford(obj)) )
972  *
973  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
974  * """
975  * Inverse sine of multivector with optional complexifier.
976  */
977 struct __pyx_opt_args_8PyClical_asin {
978  int __pyx_n;
979  PyObject *i;
980 };
981 
982 /* "PyClical.pyx":1733
983  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
984  *
985  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
986  * """
987  * Inverse hyperbolic sine of multivector with optional complexifier.
988  */
989 struct __pyx_opt_args_8PyClical_asinh {
990  int __pyx_n;
991  PyObject *i;
992 };
993 
994 /* "PyClical.pyx":1752
995  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
996  *
997  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
998  * """
999  * Tangent of multivector with optional complexifier.
1000  */
1001 struct __pyx_opt_args_8PyClical_tan {
1002  int __pyx_n;
1003  PyObject *i;
1004 };
1005 
1006 /* "PyClical.pyx":1769
1007  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1008  *
1009  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1010  * """
1011  * Inverse tangent of multivector with optional complexifier.
1012  */
1013 struct __pyx_opt_args_8PyClical_atan {
1014  int __pyx_n;
1015  PyObject *i;
1016 };
1017 
1018 /* "PyClical.pyx":1798
1019  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1020  *
1021  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1022  * """
1023  * Inverse hyperbolic tangent of multivector with optional complexifier.
1024  */
1025 struct __pyx_opt_args_8PyClical_atanh {
1026  int __pyx_n;
1027  PyObject *i;
1028 };
1029 
1030 /* "PyClical.pyx":1815
1031  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1032  *
1033  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1034  * """
1035  * Random multivector within a frame.
1036  */
1037 struct __pyx_opt_args_8PyClical_random_clifford {
1038  int __pyx_n;
1039  PyObject *fill;
1040 };
1041 
1042 /* "PyClical.pyx":37
1043  *
1044  * # Forward reference
1045  * cdef class index_set # <<<<<<<<<<<<<<
1046  *
1047  * cdef inline IndexSet toIndexSet(obj):
1048  */
1049 struct __pyx_obj_8PyClical_index_set {
1050  PyObject_HEAD
1051  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1052  IndexSet *instance;
1053 };
1054 
1055 
1056 /* "PyClical.pyx":530
1057  *
1058  * # Forward reference.
1059  * cdef class clifford # <<<<<<<<<<<<<<
1060  *
1061  * cdef inline Clifford toClifford(obj):
1062  */
1063 struct __pyx_obj_8PyClical_clifford {
1064  PyObject_HEAD
1065  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1066  Clifford *instance;
1067 };
1068 
1069 
1070 /* "PyClical.pyx":227
1071  * return self.instance.getitem(idx)
1072  *
1073  * def __iter__(self): # <<<<<<<<<<<<<<
1074  * """
1075  * Iterate over the indices of an index_set.
1076  */
1077 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1078  PyObject_HEAD
1079  PyObject *__pyx_v_idx;
1080  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1081  PyObject *__pyx_t_0;
1082  Py_ssize_t __pyx_t_1;
1083  PyObject *(*__pyx_t_2)(PyObject *);
1084 };
1085 
1086 
1087 
1088 /* "PyClical.pyx":45
1089  * return index_set(obj).instance[0]
1090  *
1091  * cdef class index_set: # <<<<<<<<<<<<<<
1092  * """
1093  * Python class index_set wraps C++ class IndexSet.
1094  */
1095 
1096 struct __pyx_vtabstruct_8PyClical_index_set {
1097  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1098  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1099  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1100 };
1101 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1102 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1103 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1104 
1105 
1106 /* "PyClical.pyx":535
1107  * return clifford(obj).instance[0]
1108  *
1109  * cdef class clifford: # <<<<<<<<<<<<<<
1110  * """
1111  * Python class clifford wraps C++ class Clifford.
1112  */
1113 
1114 struct __pyx_vtabstruct_8PyClical_clifford {
1115  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1116  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1117  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1118 };
1119 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1120 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1121 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1122 
1123 /* --- Runtime support code (head) --- */
1124 /* Refnanny.proto */
1125 #ifndef CYTHON_REFNANNY
1126  #define CYTHON_REFNANNY 0
1127 #endif
1128 #if CYTHON_REFNANNY
1129  typedef struct {
1130  void (*INCREF)(void*, PyObject*, int);
1131  void (*DECREF)(void*, PyObject*, int);
1132  void (*GOTREF)(void*, PyObject*, int);
1133  void (*GIVEREF)(void*, PyObject*, int);
1134  void* (*SetupContext)(const char*, int, const char*);
1135  void (*FinishContext)(void**);
1136  } __Pyx_RefNannyAPIStruct;
1137  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1138  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1139  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1140 #ifdef WITH_THREAD
1141  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1142  if (acquire_gil) {\
1143  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1144  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1145  PyGILState_Release(__pyx_gilstate_save);\
1146  } else {\
1147  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1148  }
1149 #else
1150  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1151  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1152 #endif
1153  #define __Pyx_RefNannyFinishContext()\
1154  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1155  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1156  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1157  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1158  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1159  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1160  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1161  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1162  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1163 #else
1164  #define __Pyx_RefNannyDeclarations
1165  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1166  #define __Pyx_RefNannyFinishContext()
1167  #define __Pyx_INCREF(r) Py_INCREF(r)
1168  #define __Pyx_DECREF(r) Py_DECREF(r)
1169  #define __Pyx_GOTREF(r)
1170  #define __Pyx_GIVEREF(r)
1171  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1172  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1173  #define __Pyx_XGOTREF(r)
1174  #define __Pyx_XGIVEREF(r)
1175 #endif
1176 #define __Pyx_XDECREF_SET(r, v) do {\
1177  PyObject *tmp = (PyObject *) r;\
1178  r = v; __Pyx_XDECREF(tmp);\
1179  } while (0)
1180 #define __Pyx_DECREF_SET(r, v) do {\
1181  PyObject *tmp = (PyObject *) r;\
1182  r = v; __Pyx_DECREF(tmp);\
1183  } while (0)
1184 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1185 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1186 
1187 /* PyObjectGetAttrStr.proto */
1188 #if CYTHON_USE_TYPE_SLOTS
1189 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1190 #else
1191 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1192 #endif
1193 
1194 /* GetBuiltinName.proto */
1195 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1196 
1197 /* PyCFunctionFastCall.proto */
1198 #if CYTHON_FAST_PYCCALL
1199 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1200 #else
1201 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1202 #endif
1203 
1204 /* PyFunctionFastCall.proto */
1205 #if CYTHON_FAST_PYCALL
1206 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1207  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1208 #if 1 || PY_VERSION_HEX < 0x030600B1
1209 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1210 #else
1211 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1212 #endif
1213 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1214  (sizeof(char [1 - 2*!(cond)]) - 1)
1215 #ifndef Py_MEMBER_SIZE
1216 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1217 #endif
1218  static size_t __pyx_pyframe_localsplus_offset = 0;
1219  #include "frameobject.h"
1220  #define __Pxy_PyFrame_Initialize_Offsets()\
1221  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1222  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1223  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1224  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1225 #endif
1226 
1227 /* PyObjectCall.proto */
1228 #if CYTHON_COMPILING_IN_CPYTHON
1229 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1230 #else
1231 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1232 #endif
1233 
1234 /* PyObjectCallMethO.proto */
1235 #if CYTHON_COMPILING_IN_CPYTHON
1236 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1237 #endif
1238 
1239 /* PyObjectCallOneArg.proto */
1240 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1241 
1242 /* PyThreadStateGet.proto */
1243 #if CYTHON_FAST_THREAD_STATE
1244 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1245 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1246 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1247 #else
1248 #define __Pyx_PyThreadState_declare
1249 #define __Pyx_PyThreadState_assign
1250 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1251 #endif
1252 
1253 /* PyErrFetchRestore.proto */
1254 #if CYTHON_FAST_THREAD_STATE
1255 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1256 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1257 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1258 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1259 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1260 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1261 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1262 #if CYTHON_COMPILING_IN_CPYTHON
1263 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1264 #else
1265 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1266 #endif
1267 #else
1268 #define __Pyx_PyErr_Clear() PyErr_Clear()
1269 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1270 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1271 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1272 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1273 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1274 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1275 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1276 #endif
1277 
1278 /* WriteUnraisableException.proto */
1279 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1280  int lineno, const char *filename,
1281  int full_traceback, int nogil);
1282 
1283 /* PyDictVersioning.proto */
1284 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1285 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1286 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1287 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1288  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1289  (cache_var) = (value);
1290 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1291  static PY_UINT64_T __pyx_dict_version = 0;\
1292  static PyObject *__pyx_dict_cached_value = NULL;\
1293  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1294  (VAR) = __pyx_dict_cached_value;\
1295  } else {\
1296  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1297  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1298  }\
1299 }
1300 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1301 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1302 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1303 #else
1304 #define __PYX_GET_DICT_VERSION(dict) (0)
1305 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1306 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1307 #endif
1308 
1309 /* PyObjectCallNoArg.proto */
1310 #if CYTHON_COMPILING_IN_CPYTHON
1311 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1312 #else
1313 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1314 #endif
1315 
1316 /* RaiseDoubleKeywords.proto */
1317 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1318 
1319 /* ParseKeywords.proto */
1320 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1321  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1322  const char* function_name);
1323 
1324 /* RaiseArgTupleInvalid.proto */
1325 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1326  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1327 
1328 /* GetModuleGlobalName.proto */
1329 #if CYTHON_USE_DICT_VERSIONS
1330 #define __Pyx_GetModuleGlobalName(var, name) {\
1331  static PY_UINT64_T __pyx_dict_version = 0;\
1332  static PyObject *__pyx_dict_cached_value = NULL;\
1333  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1334  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1335  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1336 }
1337 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1338  PY_UINT64_T __pyx_dict_version;\
1339  PyObject *__pyx_dict_cached_value;\
1340  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1341 }
1342 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1343 #else
1344 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1345 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1346 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1347 #endif
1348 
1349 /* GetTopmostException.proto */
1350 #if CYTHON_USE_EXC_INFO_STACK
1351 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1352 #endif
1353 
1354 /* SaveResetException.proto */
1355 #if CYTHON_FAST_THREAD_STATE
1356 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1357 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1358 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1359 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1360 #else
1361 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1362 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1363 #endif
1364 
1365 /* PyErrExceptionMatches.proto */
1366 #if CYTHON_FAST_THREAD_STATE
1367 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1368 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1369 #else
1370 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1371 #endif
1372 
1373 /* GetException.proto */
1374 #if CYTHON_FAST_THREAD_STATE
1375 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1376 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1377 #else
1378 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1379 #endif
1380 
1381 /* RaiseException.proto */
1382 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1383 
1384 /* PyIntBinop.proto */
1385 #if !CYTHON_COMPILING_IN_PYPY
1386 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1387 #else
1388 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1389  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1390 #endif
1391 
1392 /* PySequenceContains.proto */
1393 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1394  int result = PySequence_Contains(seq, item);
1395  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1396 }
1397 
1398 /* SetItemInt.proto */
1399 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1400  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1401  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1402  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1403  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1404 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1405 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1406  int is_list, int wraparound, int boundscheck);
1407 
1408 /* PyObjectCall2Args.proto */
1409 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1410 
1411 /* ArgTypeTest.proto */
1412 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1413  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1414  __Pyx__ArgTypeTest(obj, type, name, exact))
1415 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1416 
1417 /* Import.proto */
1418 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1419 
1420 /* IncludeStringH.proto */
1421 #include <string.h>
1422 
1423 /* PyObject_GenericGetAttrNoDict.proto */
1424 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1425 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1426 #else
1427 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1428 #endif
1429 
1430 /* PyObject_GenericGetAttr.proto */
1431 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1432 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1433 #else
1434 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1435 #endif
1436 
1437 /* SetVTable.proto */
1438 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1439 
1440 /* SetupReduce.proto */
1441 static int __Pyx_setup_reduce(PyObject* type_obj);
1442 
1443 /* PyFloatBinop.proto */
1444 #if !CYTHON_COMPILING_IN_PYPY
1445 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1446 #else
1447 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
1448  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1449  #endif
1450 
1451 /* BytesEquals.proto */
1452 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1453 
1454 /* UnicodeEquals.proto */
1455 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1456 
1457 /* StrEquals.proto */
1458 #if PY_MAJOR_VERSION >= 3
1459 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1460 #else
1461 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1462 #endif
1463 
1464 /* CLineInTraceback.proto */
1465 #ifdef CYTHON_CLINE_IN_TRACEBACK
1466 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1467 #else
1468 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1469 #endif
1470 
1471 /* CodeObjectCache.proto */
1472 typedef struct {
1473  PyCodeObject* code_object;
1474  int code_line;
1475 } __Pyx_CodeObjectCacheEntry;
1476 struct __Pyx_CodeObjectCache {
1477  int count;
1478  int max_count;
1479  __Pyx_CodeObjectCacheEntry* entries;
1480 };
1481 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1482 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1483 static PyCodeObject *__pyx_find_code_object(int code_line);
1484 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1485 
1486 /* AddTraceback.proto */
1487 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1488  int py_line, const char *filename);
1489 
1490 /* CppExceptionConversion.proto */
1491 #ifndef __Pyx_CppExn2PyErr
1492 #include <new>
1493 #include <typeinfo>
1494 #include <stdexcept>
1495 #include <ios>
1496 static void __Pyx_CppExn2PyErr() {
1497  try {
1498  if (PyErr_Occurred())
1499  ; // let the latest Python exn pass through and ignore the current one
1500  else
1501  throw;
1502  } catch (const std::bad_alloc& exn) {
1503  PyErr_SetString(PyExc_MemoryError, exn.what());
1504  } catch (const std::bad_cast& exn) {
1505  PyErr_SetString(PyExc_TypeError, exn.what());
1506  } catch (const std::bad_typeid& exn) {
1507  PyErr_SetString(PyExc_TypeError, exn.what());
1508  } catch (const std::domain_error& exn) {
1509  PyErr_SetString(PyExc_ValueError, exn.what());
1510  } catch (const std::invalid_argument& exn) {
1511  PyErr_SetString(PyExc_ValueError, exn.what());
1512  } catch (const std::ios_base::failure& exn) {
1513  PyErr_SetString(PyExc_IOError, exn.what());
1514  } catch (const std::out_of_range& exn) {
1515  PyErr_SetString(PyExc_IndexError, exn.what());
1516  } catch (const std::overflow_error& exn) {
1517  PyErr_SetString(PyExc_OverflowError, exn.what());
1518  } catch (const std::range_error& exn) {
1519  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1520  } catch (const std::underflow_error& exn) {
1521  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1522  } catch (const std::exception& exn) {
1523  PyErr_SetString(PyExc_RuntimeError, exn.what());
1524  }
1525  catch (...)
1526  {
1527  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1528  }
1529 }
1530 #endif
1531 
1532 /* CIntToPy.proto */
1533 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1534 
1535 /* CIntFromPy.proto */
1536 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1537 
1538 /* CIntToPy.proto */
1539 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1540 
1541 /* CIntFromPy.proto */
1542 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1543 
1544 /* FastTypeChecks.proto */
1545 #if CYTHON_COMPILING_IN_CPYTHON
1546 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1547 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1548 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1549 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1550 #else
1551 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1552 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1553 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1554 #endif
1555 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1556 
1557 /* FetchCommonType.proto */
1558 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1559 
1560 /* SwapException.proto */
1561 #if CYTHON_FAST_THREAD_STATE
1562 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1563 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1564 #else
1565 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1566 #endif
1567 
1568 /* PyObjectGetMethod.proto */
1569 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1570 
1571 /* PyObjectCallMethod1.proto */
1572 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1573 
1574 /* CoroutineBase.proto */
1575 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1576 #if CYTHON_USE_EXC_INFO_STACK
1577 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1578 #else
1579 typedef struct {
1580  PyObject *exc_type;
1581  PyObject *exc_value;
1582  PyObject *exc_traceback;
1583 } __Pyx_ExcInfoStruct;
1584 #endif
1585 typedef struct {
1586  PyObject_HEAD
1587  __pyx_coroutine_body_t body;
1588  PyObject *closure;
1589  __Pyx_ExcInfoStruct gi_exc_state;
1590  PyObject *gi_weakreflist;
1591  PyObject *classobj;
1592  PyObject *yieldfrom;
1593  PyObject *gi_name;
1594  PyObject *gi_qualname;
1595  PyObject *gi_modulename;
1596  PyObject *gi_code;
1597  int resume_label;
1598  char is_running;
1599 } __pyx_CoroutineObject;
1600 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1601  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1602  PyObject *name, PyObject *qualname, PyObject *module_name);
1603 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1604  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1605  PyObject *name, PyObject *qualname, PyObject *module_name);
1606 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1607 static int __Pyx_Coroutine_clear(PyObject *self);
1608 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1609 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1610 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1611 #if CYTHON_USE_EXC_INFO_STACK
1612 #define __Pyx_Coroutine_SwapException(self)
1613 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1614 #else
1615 #define __Pyx_Coroutine_SwapException(self) {\
1616  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1617  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1618  }
1619 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1620  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1621  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1622  }
1623 #endif
1624 #if CYTHON_FAST_THREAD_STATE
1625 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1626  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1627 #else
1628 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1629  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1630 #endif
1631 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1632 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1633 
1634 /* PatchModuleWithCoroutine.proto */
1635 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1636 
1637 /* PatchGeneratorABC.proto */
1638 static int __Pyx_patch_abc(void);
1639 
1640 /* Generator.proto */
1641 #define __Pyx_Generator_USED
1642 static PyTypeObject *__pyx_GeneratorType = 0;
1643 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1644 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1645  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1646 static PyObject *__Pyx_Generator_Next(PyObject *self);
1647 static int __pyx_Generator_init(void);
1648 
1649 /* CheckBinaryVersion.proto */
1650 static int __Pyx_check_binary_version(void);
1651 
1652 /* InitStrings.proto */
1653 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1654 
1655 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1656 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1657 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1658 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1659 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1660 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1661 
1662 /* Module declarations from 'libcpp.vector' */
1663 
1664 /* Module declarations from 'glucat' */
1665 
1666 /* Module declarations from 'PyClical' */
1667 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1668 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1669 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1670 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1671 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1672 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1673 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1674 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1675 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1676 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1677 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1678 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1679 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1680 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1681 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1682 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1683 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1684 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1685 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1686 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1687 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1688 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1689 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1690 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1691 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1692 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1693 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1694 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1695 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1696 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1697 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1698 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1699 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1700 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1701 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1702 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1703 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1704 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1705 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1706 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1707 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1708 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*/
1709 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1710 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1711 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1712 #define __Pyx_MODULE_NAME "PyClical"
1713 extern int __pyx_module_is_main_PyClical;
1714 int __pyx_module_is_main_PyClical = 0;
1715 
1716 /* Implementation of 'PyClical' */
1717 static PyObject *__pyx_builtin_IndexError;
1718 static PyObject *__pyx_builtin_RuntimeError;
1719 static PyObject *__pyx_builtin_TypeError;
1720 static PyObject *__pyx_builtin_ValueError;
1721 static PyObject *__pyx_builtin_NotImplemented;
1722 static PyObject *__pyx_builtin_range;
1723 static PyObject *__pyx_builtin_xrange;
1724 static const char __pyx_k_[] = ".";
1725 static const char __pyx_k_e[] = "e";
1726 static const char __pyx_k_i[] = "i";
1727 static const char __pyx_k_m[] = "m";
1728 static const char __pyx_k_p[] = "p";
1729 static const char __pyx_k_q[] = "q";
1730 static const char __pyx_k__2[] = " ";
1731 static const char __pyx_k__5[] = ":";
1732 static const char __pyx_k__6[] = "\n\t";
1733 static const char __pyx_k__7[] = " (";
1734 static const char __pyx_k__8[] = ", ";
1735 static const char __pyx_k__9[] = ").";
1736 static const char __pyx_k_cl[] = "cl";
1737 static const char __pyx_k_pi[] = "pi";
1738 static const char __pyx_k_cos[] = "cos";
1739 static const char __pyx_k_exp[] = "exp";
1740 static const char __pyx_k_frm[] = "frm";
1741 static const char __pyx_k_inv[] = "inv";
1742 static const char __pyx_k_ist[] = "ist";
1743 static const char __pyx_k_ixt[] = "ixt";
1744 static const char __pyx_k_lhs[] = "lhs";
1745 static const char __pyx_k_log[] = "log";
1746 static const char __pyx_k_max[] = "max";
1747 static const char __pyx_k_min[] = "min";
1748 static const char __pyx_k_obj[] = "obj";
1749 static const char __pyx_k_odd[] = "odd";
1750 static const char __pyx_k_pow[] = "pow";
1751 static const char __pyx_k_rhs[] = "rhs";
1752 static const char __pyx_k_sin[] = "sin";
1753 static const char __pyx_k_tan[] = "tan";
1754 static const char __pyx_k_tau[] = "tau";
1755 static const char __pyx_k_Real[] = "Real";
1756 static const char __pyx_k_acos[] = "acos";
1757 static const char __pyx_k_args[] = "args";
1758 static const char __pyx_k_asin[] = "asin";
1759 static const char __pyx_k_atan[] = "atan";
1760 static const char __pyx_k_conj[] = "conj";
1761 static const char __pyx_k_copy[] = "copy";
1762 static const char __pyx_k_cosh[] = "cosh";
1763 static const char __pyx_k_even[] = "even";
1764 static const char __pyx_k_fill[] = "fill";
1765 static const char __pyx_k_from[] = " from ";
1766 static const char __pyx_k_iter[] = "__iter__";
1767 static const char __pyx_k_main[] = "__main__";
1768 static const char __pyx_k_math[] = "math";
1769 static const char __pyx_k_name[] = "__name__";
1770 static const char __pyx_k_norm[] = "norm";
1771 static const char __pyx_k_pure[] = "pure";
1772 static const char __pyx_k_quad[] = "quad";
1773 static const char __pyx_k_send[] = "send";
1774 static const char __pyx_k_sinh[] = "sinh";
1775 static const char __pyx_k_sqrt[] = "sqrt";
1776 static const char __pyx_k_tanh[] = "tanh";
1777 static const char __pyx_k_test[] = "_test";
1778 static const char __pyx_k_0_8_2[] = "0.8.2";
1779 static const char __pyx_k_acosh[] = "acosh";
1780 static const char __pyx_k_asinh[] = "asinh";
1781 static const char __pyx_k_atanh[] = "atanh";
1782 static const char __pyx_k_close[] = "close";
1783 static const char __pyx_k_grade[] = "grade";
1784 static const char __pyx_k_istpq[] = "istpq";
1785 static const char __pyx_k_nbar3[] = "nbar3";
1786 static const char __pyx_k_ninf3[] = "ninf3";
1787 static const char __pyx_k_other[] = "other";
1788 static const char __pyx_k_range[] = "range";
1789 static const char __pyx_k_throw[] = "throw";
1790 static const char __pyx_k_using[] = " using (";
1791 static const char __pyx_k_value[] = " value ";
1792 static const char __pyx_k_import[] = "__import__";
1793 static const char __pyx_k_reduce[] = "__reduce__";
1794 static const char __pyx_k_scalar[] = "scalar";
1795 static const char __pyx_k_test_2[] = "__test__";
1796 static const char __pyx_k_xrange[] = "xrange";
1797 static const char __pyx_k_doctest[] = "doctest";
1798 static const char __pyx_k_invalid[] = " invalid ";
1799 static const char __pyx_k_numbers[] = "numbers";
1800 static const char __pyx_k_reverse[] = "reverse";
1801 static const char __pyx_k_testmod[] = "testmod";
1802 static const char __pyx_k_version[] = "__version__";
1803 static const char __pyx_k_Integral[] = "Integral";
1804 static const char __pyx_k_PyClical[] = "PyClical";
1805 static const char __pyx_k_Sequence[] = "Sequence";
1806 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1807 static const char __pyx_k_clifford[] = "clifford";
1808 static const char __pyx_k_getstate[] = "__getstate__";
1809 static const char __pyx_k_involute[] = "involute";
1810 static const char __pyx_k_setstate[] = "__setstate__";
1811 static const char __pyx_k_to_frame[] = " to frame ";
1812 static const char __pyx_k_TypeError[] = "TypeError";
1813 static const char __pyx_k_index_set[] = "index_set";
1814 static const char __pyx_k_outer_pow[] = "outer_pow";
1815 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1816 static const char __pyx_k_IndexError[] = "IndexError";
1817 static const char __pyx_k_ValueError[] = "ValueError";
1818 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1819 static const char __pyx_k_collections[] = "collections";
1820 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1821 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1822 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1823 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1824 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1825 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1826 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1827 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1828 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1829 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1830 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1831 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1832 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1833 static const char __pyx_k_using_invalid[] = " using invalid ";
1834 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1835 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1836 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1837 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1838 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1839 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1840 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1841 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1842 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1843 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1844 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1845 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1846 static const char __pyx_k_invalid_string[] = " invalid string ";
1847 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1848 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1849 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1850 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1851 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1852 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1853 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1854 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1855 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1856 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1857 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1858 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1859 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1860 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1861 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1862 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1863 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1864 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1865 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1866 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1867 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1868 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1869 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1870 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1871 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1872 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1873 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1874 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1875 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1876 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1877 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1878 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1879 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1880 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1881 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1882 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1883 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1884 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1885 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1886 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1887 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1888 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1889 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1890 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1891 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1892 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1893 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1894 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1895 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1896 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1897 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1898 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1899 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1900 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1901 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1902 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1903 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1904 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1905 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1906 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1907 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1908 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1909 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1910 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1911 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1912 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1913 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1914 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1915 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1916 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1917 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1918 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1919 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1920 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1921 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1922 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1923 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1924 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1925 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1926 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1927 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1928 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1929 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1930 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1931 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1932 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1933 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1934 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1935 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1936 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 ";
1937 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 ";
1938 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 ";
1939 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 ";
1940 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 ";
1941 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 ";
1942 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 ";
1943 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,\n -3 4 7\n ";
1944 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 ";
1945 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 ";
1946 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 ";
1947 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 ";
1948 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 ";
1949 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 ";
1950 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 ";
1951 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 ";
1952 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 ";
1953 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 ";
1954 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 ";
1955 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 ";
1956 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 ";
1957 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1958 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1959 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1960 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 ";
1961 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 ";
1962 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 ";
1963 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 ";
1964 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 ";
1965 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 ";
1966 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 ";
1967 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 ";
1968 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 ";
1969 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 ";
1970 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 ";
1971 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 ";
1972 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 ";
1973 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 ";
1974 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 ";
1975 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 ";
1976 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 ";
1977 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 ";
1978 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 ";
1979 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 ";
1980 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 ";
1981 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 ";
1982 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 ";
1983 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 ";
1984 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 ";
1985 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 ";
1986 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 ";
1987 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 ";
1988 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 ";
1989 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 ";
1990 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 ";
1991 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 ";
1992 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 ";
1993 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 ";
1994 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 ";
1995 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 ";
1996 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 ";
1997 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 ";
1998 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 ";
1999 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,\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
2000 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 ";
2001 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 ";
2002 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 ";
2003 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 ";
2004 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 ";
2005 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 ";
2006 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 ";
2007 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 ";
2008 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 ";
2009 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 ";
2010 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 ";
2011 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 ";
2012 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 ";
2013 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 ";
2014 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 ";
2015 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 ";
2016 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 ";
2017 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 ";
2018 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 ";
2019 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 ";
2020 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 ";
2021 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 ";
2022 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 ";
2023 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 <type 'PyClical.index_set'>\n ";
2024 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 ";
2025 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 ";
2026 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 ";
2027 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 set([1, 2, 100]).\n >>> print index_set([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <type 'list'>.\n\n For index_set.__richcmp__: Compare two objects of class index_set.\n\n >>> index_set(1) == index_set({1})\n True\n >>> index_set({1}) != index_set({1})\n False\n >>> index_set({1}) != index_set({2})\n True\n >>> index_set({1}) == index_set({2})\n False\n >>> index_set({1}) < index_set({2})\n True\n >>> index_set({1}) <= index_set({2})\n True\n >>> index_set({1}) > index_set({2})\n False\n >>> index_set({1}) >= index_set({2})\n False\n >>> None == index_set({1,2})\n False\n >>> None != index_set({1,2})\n True\n >>> None < index_set({1,2})\n False\n >>> None <= index_set({1,2})\n False\n >>> None > index_set({1,2})\n False\n >>> None >= index_set({1,2})\n False\n >>> index_se""t({1,2}) == None\n False\n >>> index_set({1,2}) != None\n True\n >>> index_set({1,2}) < None\n False\n >>> index_set({1,2}) <= None\n False\n >>> index_set({1,2}) > None\n False\n >>> index_set({1,2}) >= None\n False\n ";
2028  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 ";
2029  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 ";
2030  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2031  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 ";
2032  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
2033  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 ";
2034  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2035  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2036  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 ";
2037  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 ";
2038  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 ";
2039  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 ";
2040  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 ";
2041  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
2042  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
2043  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
2044  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2045  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 ";
2046  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 ";
2047  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 ";
2048  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 ";
2049  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(2L)\n 2\n >>> print clifford(2.0)\n 2\n >>> print clifford(1.0e-1)\n 0.1\n >>> print clifford(\"2\")\n 2\n >>> print clifford(\"2{1,2,3}\")\n 2{1,2,3}\n >>> print clifford(clifford(\"2{1,2,3}\"))\n 2{1,2,3}\n >>> print clifford(\"-{1}\")\n -{1}\n >>> print clifford(2,index_set({1,2}))\n 2{1,2}\n >>> print clifford([2,3],index_set({1,2}))\n 2{1}+3{2}\n >>> print clifford([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'list'>.\n >>> print clifford(None)\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'NoneType'>.\n >>> print clifford(None,[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'NoneType'>, <type 'list'>).\n >>> print clifford([1,2],[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'list'>, <type 'list'>).\n >>> print clifford(\"\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string ''.\n >>> print clifford(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{'.\n >>> print clifford(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1'.\n >>> print clifford(\"+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '+'.\n >>> print clifford(\"-\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford"" object from invalid string '-'.\n >>> print clifford(\"{1}+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1}+'.\n\n For clifford.__richcmp__: Compare objects of type clifford.\n\n >>> clifford(\"{1}\") == clifford(\"1{1}\")\n True\n >>> clifford(\"{1}\") != clifford(\"1.0{1}\")\n False\n >>> clifford(\"{1}\") != clifford(\"1.0\")\n True\n >>> clifford(\"{1,2}\") == None\n False\n >>> clifford(\"{1,2}\") != None\n True\n >>> None == clifford(\"{1,2}\")\n False\n >>> None != clifford(\"{1,2}\")\n True\n ";
2050  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 ";
2051  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 ";
2052  static PyObject *__pyx_kp_s_;
2053  static PyObject *__pyx_kp_s_0_8_2;
2054  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2055  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2056  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2057  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2058  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
2059  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
2060  static PyObject *__pyx_kp_s_Cannot_reframe;
2061  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
2062  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2063  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2064  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2065  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2066  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2067  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2068  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2069  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2070  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2071  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2072  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2073  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2074  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2075  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2076  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2077  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2078  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2079  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2080  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2081  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2082  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2083  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2084  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2085  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2086  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2087  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2088  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2089  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2090  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2091  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2092  static PyObject *__pyx_n_s_IndexError;
2093  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2094  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2095  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2096  static PyObject *__pyx_n_s_Integral;
2097  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2098  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2099  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2100  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2101  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2102  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2103  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2104  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2105  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2106  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2107  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2108  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2109  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2110  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2111  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2112  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2113  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2114  static PyObject *__pyx_n_s_NotImplemented;
2115  static PyObject *__pyx_kp_s_Not_applicable;
2116  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2117  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2118  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2119  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2120  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2121  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2122  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2123  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2124  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2125  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2126  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2127  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2128  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2129  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2130  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2131  static PyObject *__pyx_n_s_PyClical;
2132  static PyObject *__pyx_kp_s_PyClical_pyx;
2133  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2134  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2135  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2136  static PyObject *__pyx_n_s_Real;
2137  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2138  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2139  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2140  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2141  static PyObject *__pyx_n_s_RuntimeError;
2142  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2143  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2144  static PyObject *__pyx_n_s_Sequence;
2145  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2146  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2147  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2148  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2149  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2150  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2151  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2152  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2153  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2154  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2155  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2156  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2157  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2158  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2159  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2160  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2161  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2162  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2163  static PyObject *__pyx_kp_u_The_informal_string_representat;
2164  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2165  static PyObject *__pyx_kp_u_The_official_string_representat;
2166  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2167  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2168  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2169  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2170  static PyObject *__pyx_n_s_TypeError;
2171  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2172  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2173  static PyObject *__pyx_n_s_ValueError;
2174  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2175  static PyObject *__pyx_kp_s__2;
2176  static PyObject *__pyx_kp_s__5;
2177  static PyObject *__pyx_kp_s__6;
2178  static PyObject *__pyx_kp_s__7;
2179  static PyObject *__pyx_kp_s__8;
2180  static PyObject *__pyx_kp_s__9;
2181  static PyObject *__pyx_kp_u_abs_line_1473;
2182  static PyObject *__pyx_n_s_acos;
2183  static PyObject *__pyx_kp_u_acos_line_1619;
2184  static PyObject *__pyx_n_s_acosh;
2185  static PyObject *__pyx_kp_u_acosh_line_1656;
2186  static PyObject *__pyx_kp_u_agc3_line_1844;
2187  static PyObject *__pyx_n_s_args;
2188  static PyObject *__pyx_kp_s_as_frame;
2189  static PyObject *__pyx_n_s_asin;
2190  static PyObject *__pyx_kp_u_asin_line_1698;
2191  static PyObject *__pyx_n_s_asinh;
2192  static PyObject *__pyx_kp_u_asinh_line_1733;
2193  static PyObject *__pyx_n_s_atan;
2194  static PyObject *__pyx_kp_u_atan_line_1769;
2195  static PyObject *__pyx_n_s_atanh;
2196  static PyObject *__pyx_kp_u_atanh_line_1798;
2197  static PyObject *__pyx_kp_u_cga3_line_1824;
2198  static PyObject *__pyx_kp_u_cga3std_line_1833;
2199  static PyObject *__pyx_n_s_cl;
2200  static PyObject *__pyx_n_s_clifford;
2201  static PyObject *__pyx_kp_u_clifford___add___line_739;
2202  static PyObject *__pyx_kp_u_clifford___and___line_835;
2203  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2204  static PyObject *__pyx_kp_u_clifford___div___line_895;
2205  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2206  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2207  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2208  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2209  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2210  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2211  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2212  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2213  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2214  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2215  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2216  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2217  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2218  static PyObject *__pyx_kp_u_clifford___or___line_938;
2219  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2220  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2221  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2222  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2223  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2224  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2225  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2226  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2227  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2228  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2229  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2230  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2231  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2232  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2233  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2234  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2235  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2236  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2237  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2238  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2239  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2240  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2241  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2242  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2243  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2244  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2245  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2246  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2247  static PyObject *__pyx_n_s_cline_in_traceback;
2248  static PyObject *__pyx_n_s_close;
2249  static PyObject *__pyx_n_s_collections;
2250  static PyObject *__pyx_kp_u_compare_line_490;
2251  static PyObject *__pyx_kp_u_complexifier_line_1527;
2252  static PyObject *__pyx_n_s_conj;
2253  static PyObject *__pyx_kp_u_conj_line_1436;
2254  static PyObject *__pyx_n_s_copy;
2255  static PyObject *__pyx_n_s_cos;
2256  static PyObject *__pyx_kp_u_cos_line_1602;
2257  static PyObject *__pyx_n_s_cosh;
2258  static PyObject *__pyx_kp_u_cosh_line_1640;
2259  static PyObject *__pyx_n_s_doctest;
2260  static PyObject *__pyx_n_s_e;
2261  static PyObject *__pyx_kp_u_e_line_1887;
2262  static PyObject *__pyx_n_s_even;
2263  static PyObject *__pyx_kp_u_even_line_1388;
2264  static PyObject *__pyx_n_s_exp;
2265  static PyObject *__pyx_kp_u_exp_line_1565;
2266  static PyObject *__pyx_n_s_fill;
2267  static PyObject *__pyx_n_s_frm;
2268  static PyObject *__pyx_kp_s_from;
2269  static PyObject *__pyx_n_s_getstate;
2270  static PyObject *__pyx_n_s_grade;
2271  static PyObject *__pyx_n_s_i;
2272  static PyObject *__pyx_kp_u_imag_line_1366;
2273  static PyObject *__pyx_n_s_import;
2274  static PyObject *__pyx_n_s_index_set;
2275  static PyObject *__pyx_kp_u_index_set___and___line_269;
2276  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2277  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2278  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2279  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2280  static PyObject *__pyx_n_s_index_set___iter;
2281  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2282  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2283  static PyObject *__pyx_kp_u_index_set___or___line_291;
2284  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2285  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2286  static PyObject *__pyx_kp_u_index_set___str___line_393;
2287  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2288  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2289  static PyObject *__pyx_kp_u_index_set_count_line_313;
2290  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2291  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2292  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2293  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2294  static PyObject *__pyx_kp_u_index_set_max_line_349;
2295  static PyObject *__pyx_kp_u_index_set_min_line_340;
2296  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2297  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2298  static PyObject *__pyx_n_s_inv;
2299  static PyObject *__pyx_kp_u_inv_line_1329;
2300  static PyObject *__pyx_kp_s_invalid;
2301  static PyObject *__pyx_kp_s_invalid_string;
2302  static PyObject *__pyx_n_s_involute;
2303  static PyObject *__pyx_kp_u_involute_line_1406;
2304  static PyObject *__pyx_n_s_ist;
2305  static PyObject *__pyx_n_s_istpq;
2306  static PyObject *__pyx_kp_u_istpq_line_1900;
2307  static PyObject *__pyx_n_s_iter;
2308  static PyObject *__pyx_n_s_ixt;
2309  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2310  static PyObject *__pyx_n_s_lhs;
2311  static PyObject *__pyx_n_s_log;
2312  static PyObject *__pyx_kp_u_log_line_1579;
2313  static PyObject *__pyx_n_s_m;
2314  static PyObject *__pyx_n_s_main;
2315  static PyObject *__pyx_n_s_math;
2316  static PyObject *__pyx_n_s_max;
2317  static PyObject *__pyx_kp_u_max_abs_line_1482;
2318  static PyObject *__pyx_kp_u_max_pos_line_511;
2319  static PyObject *__pyx_n_s_min;
2320  static PyObject *__pyx_kp_u_min_neg_line_502;
2321  static PyObject *__pyx_n_s_name;
2322  static PyObject *__pyx_n_s_nbar3;
2323  static PyObject *__pyx_n_s_ninf3;
2324  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2325  static PyObject *__pyx_n_s_norm;
2326  static PyObject *__pyx_kp_u_norm_line_1462;
2327  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2328  static PyObject *__pyx_n_s_numbers;
2329  static PyObject *__pyx_n_s_obj;
2330  static PyObject *__pyx_n_s_odd;
2331  static PyObject *__pyx_kp_u_odd_line_1397;
2332  static PyObject *__pyx_n_s_other;
2333  static PyObject *__pyx_n_s_outer_pow;
2334  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2335  static PyObject *__pyx_n_s_p;
2336  static PyObject *__pyx_n_s_pi;
2337  static PyObject *__pyx_n_s_pow;
2338  static PyObject *__pyx_kp_u_pow_line_1494;
2339  static PyObject *__pyx_n_s_pure;
2340  static PyObject *__pyx_kp_u_pure_line_1377;
2341  static PyObject *__pyx_n_s_pyx_vtable;
2342  static PyObject *__pyx_n_s_q;
2343  static PyObject *__pyx_n_s_quad;
2344  static PyObject *__pyx_kp_u_quad_line_1451;
2345  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2346  static PyObject *__pyx_n_s_range;
2347  static PyObject *__pyx_kp_u_real_line_1355;
2348  static PyObject *__pyx_n_s_reduce;
2349  static PyObject *__pyx_n_s_reduce_cython;
2350  static PyObject *__pyx_n_s_reduce_ex;
2351  static PyObject *__pyx_n_s_reverse;
2352  static PyObject *__pyx_kp_u_reverse_line_1421;
2353  static PyObject *__pyx_n_s_rhs;
2354  static PyObject *__pyx_n_s_scalar;
2355  static PyObject *__pyx_kp_u_scalar_line_1344;
2356  static PyObject *__pyx_n_s_send;
2357  static PyObject *__pyx_n_s_setstate;
2358  static PyObject *__pyx_n_s_setstate_cython;
2359  static PyObject *__pyx_n_s_sin;
2360  static PyObject *__pyx_kp_u_sin_line_1679;
2361  static PyObject *__pyx_n_s_sinh;
2362  static PyObject *__pyx_kp_u_sinh_line_1719;
2363  static PyObject *__pyx_n_s_sqrt;
2364  static PyObject *__pyx_kp_u_sqrt_line_1542;
2365  static PyObject *__pyx_n_s_tan;
2366  static PyObject *__pyx_kp_u_tan_line_1752;
2367  static PyObject *__pyx_n_s_tanh;
2368  static PyObject *__pyx_kp_u_tanh_line_1786;
2369  static PyObject *__pyx_n_s_tau;
2370  static PyObject *__pyx_n_s_test;
2371  static PyObject *__pyx_n_s_test_2;
2372  static PyObject *__pyx_n_s_testmod;
2373  static PyObject *__pyx_n_s_throw;
2374  static PyObject *__pyx_kp_s_to_frame;
2375  static PyObject *__pyx_kp_s_using;
2376  static PyObject *__pyx_kp_s_using_invalid;
2377  static PyObject *__pyx_kp_s_value;
2378  static PyObject *__pyx_n_s_version;
2379  static PyObject *__pyx_n_s_xrange;
2380 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2381 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2382 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2383 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 */
2384 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 */
2385 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2386 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2387 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2388 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2389 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2390 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2391 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2392 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2393 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2394 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2395 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2396 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2397 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2398 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2399 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2400 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2401 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2402 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2403 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2404 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2405 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2406 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 */
2407 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2408 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2409 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2410 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2411 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2412 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 */
2413 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2414 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 */
2415 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2416 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2417 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 */
2418 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2419 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2420 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2421 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2422 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2423 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2424 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2425 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2426 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2427 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2428 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2429 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2430 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2431 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2432 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2433 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2434 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2435 #endif
2436 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2437 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2438 #endif
2439 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2440 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2441 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2442 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2443 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2444 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2445 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2446 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2447 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2448 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2449 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2450 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2451 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2452 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2453 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2454 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2455 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2456 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2457 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2458 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2459 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2460 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2461 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2462 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2463 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2464 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 */
2465 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2466 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2467 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2468 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2469 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2470 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2471 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2472 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2473 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2474 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2475 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2476 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2477 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2478 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2479 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2480 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2481 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2482 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2483 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2484 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2485 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2486 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2487 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2488 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2489 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2490 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2491 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2492 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2493 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2494 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2495 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2496 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2497 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2498 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 */
2499 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2500 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2501 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2502 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2503 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2504 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2505 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2506 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2507 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2508 static PyObject *__pyx_float_0_0;
2509 static PyObject *__pyx_float_1_0;
2510 static PyObject *__pyx_float_2_0;
2511 static PyObject *__pyx_float_8_0;
2512 static PyObject *__pyx_int_0;
2513 static PyObject *__pyx_int_1;
2514 static PyObject *__pyx_int_4;
2515 static PyObject *__pyx_int_neg_1;
2516 static PyObject *__pyx_tuple__3;
2517 static PyObject *__pyx_tuple__4;
2518 static PyObject *__pyx_tuple__10;
2519 static PyObject *__pyx_tuple__11;
2520 static PyObject *__pyx_tuple__12;
2521 static PyObject *__pyx_tuple__15;
2522 static PyObject *__pyx_tuple__16;
2523 static PyObject *__pyx_tuple__18;
2524 static PyObject *__pyx_tuple__20;
2525 static PyObject *__pyx_tuple__21;
2526 static PyObject *__pyx_tuple__22;
2527 static PyObject *__pyx_codeobj__13;
2528 static PyObject *__pyx_codeobj__14;
2529 static PyObject *__pyx_codeobj__17;
2530 static PyObject *__pyx_codeobj__19;
2531 static PyObject *__pyx_codeobj__23;
2532 /* Late includes */
2533 
2534 /* "PyClical.pyx":39
2535  * cdef class index_set
2536  *
2537  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2538  * """
2539  * Return the C++ IndexSet instance wrapped by index_set(obj).
2540  */
2541 
2542 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2543  IndexSet __pyx_r;
2544  __Pyx_RefNannyDeclarations
2545  PyObject *__pyx_t_1 = NULL;
2546  __Pyx_RefNannySetupContext("toIndexSet", 0);
2547 
2548  /* "PyClical.pyx":43
2549  * Return the C++ IndexSet instance wrapped by index_set(obj).
2550  * """
2551  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2552  *
2553  * cdef class index_set:
2554  */
2555  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
2556  __Pyx_GOTREF(__pyx_t_1);
2557  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2558  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2559  goto __pyx_L0;
2560 
2561  /* "PyClical.pyx":39
2562  * cdef class index_set
2563  *
2564  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2565  * """
2566  * Return the C++ IndexSet instance wrapped by index_set(obj).
2567  */
2568 
2569  /* function exit code */
2570  __pyx_L1_error:;
2571  __Pyx_XDECREF(__pyx_t_1);
2572  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2573  __Pyx_pretend_to_initialize(&__pyx_r);
2574  __pyx_L0:;
2575  __Pyx_RefNannyFinishContext();
2576  return __pyx_r;
2577 }
2578 
2579 /* "PyClical.pyx":51
2580  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2581  *
2582  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2583  * """
2584  * Wrap an instance of the C++ class IndexSet.
2585  */
2586 
2587 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2588  PyObject *__pyx_r = NULL;
2589  __Pyx_RefNannyDeclarations
2590  __Pyx_RefNannySetupContext("wrap", 0);
2591 
2592  /* "PyClical.pyx":55
2593  * Wrap an instance of the C++ class IndexSet.
2594  * """
2595  * self.instance[0] = other # <<<<<<<<<<<<<<
2596  * return self
2597  *
2598  */
2599  (__pyx_v_self->instance[0]) = __pyx_v_other;
2600 
2601  /* "PyClical.pyx":56
2602  * """
2603  * self.instance[0] = other
2604  * return self # <<<<<<<<<<<<<<
2605  *
2606  * cdef inline IndexSet unwrap(index_set self):
2607  */
2608  __Pyx_XDECREF(__pyx_r);
2609  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2610  __pyx_r = ((PyObject *)__pyx_v_self);
2611  goto __pyx_L0;
2612 
2613  /* "PyClical.pyx":51
2614  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2615  *
2616  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2617  * """
2618  * Wrap an instance of the C++ class IndexSet.
2619  */
2620 
2621  /* function exit code */
2622  __pyx_L0:;
2623  __Pyx_XGIVEREF(__pyx_r);
2624  __Pyx_RefNannyFinishContext();
2625  return __pyx_r;
2626 }
2627 
2628 /* "PyClical.pyx":58
2629  * return self
2630  *
2631  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2632  * """
2633  * Return the wrapped C++ IndexSet instance.
2634  */
2635 
2636 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2637  IndexSet __pyx_r;
2638  __Pyx_RefNannyDeclarations
2639  __Pyx_RefNannySetupContext("unwrap", 0);
2640 
2641  /* "PyClical.pyx":62
2642  * Return the wrapped C++ IndexSet instance.
2643  * """
2644  * return self.instance[0] # <<<<<<<<<<<<<<
2645  *
2646  * cpdef copy(index_set self):
2647  */
2648  __pyx_r = (__pyx_v_self->instance[0]);
2649  goto __pyx_L0;
2650 
2651  /* "PyClical.pyx":58
2652  * return self
2653  *
2654  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2655  * """
2656  * Return the wrapped C++ IndexSet instance.
2657  */
2658 
2659  /* function exit code */
2660  __pyx_L0:;
2661  __Pyx_RefNannyFinishContext();
2662  return __pyx_r;
2663 }
2664 
2665 /* "PyClical.pyx":64
2666  * return self.instance[0]
2667  *
2668  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2669  * """
2670  * Copy this index_set object.
2671  */
2672 
2673 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2674 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2675  PyObject *__pyx_r = NULL;
2676  __Pyx_RefNannyDeclarations
2677  PyObject *__pyx_t_1 = NULL;
2678  PyObject *__pyx_t_2 = NULL;
2679  PyObject *__pyx_t_3 = NULL;
2680  PyObject *__pyx_t_4 = NULL;
2681  __Pyx_RefNannySetupContext("copy", 0);
2682  /* Check if called by wrapper */
2683  if (unlikely(__pyx_skip_dispatch)) ;
2684  /* Check if overridden in Python */
2685  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)))) {
2686  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2687  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2688  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2689  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2690  #endif
2691  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
2692  __Pyx_GOTREF(__pyx_t_1);
2693  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2694  __Pyx_XDECREF(__pyx_r);
2695  __Pyx_INCREF(__pyx_t_1);
2696  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2697  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2698  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2699  if (likely(__pyx_t_4)) {
2700  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2701  __Pyx_INCREF(__pyx_t_4);
2702  __Pyx_INCREF(function);
2703  __Pyx_DECREF_SET(__pyx_t_3, function);
2704  }
2705  }
2706  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2707  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2708  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2709  __Pyx_GOTREF(__pyx_t_2);
2710  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2711  __pyx_r = __pyx_t_2;
2712  __pyx_t_2 = 0;
2713  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2714  goto __pyx_L0;
2715  }
2716  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2717  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2718  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2719  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2720  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2721  }
2722  #endif
2723  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2724  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2725  }
2726  #endif
2727  }
2728 
2729  /* "PyClical.pyx":71
2730  * {1}
2731  * """
2732  * return index_set(self) # <<<<<<<<<<<<<<
2733  *
2734  * def __cinit__(self, other = 0):
2735  */
2736  __Pyx_XDECREF(__pyx_r);
2737  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
2738  __Pyx_GOTREF(__pyx_t_1);
2739  __pyx_r = __pyx_t_1;
2740  __pyx_t_1 = 0;
2741  goto __pyx_L0;
2742 
2743  /* "PyClical.pyx":64
2744  * return self.instance[0]
2745  *
2746  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2747  * """
2748  * Copy this index_set object.
2749  */
2750 
2751  /* function exit code */
2752  __pyx_L1_error:;
2753  __Pyx_XDECREF(__pyx_t_1);
2754  __Pyx_XDECREF(__pyx_t_2);
2755  __Pyx_XDECREF(__pyx_t_3);
2756  __Pyx_XDECREF(__pyx_t_4);
2757  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2758  __pyx_r = 0;
2759  __pyx_L0:;
2760  __Pyx_XGIVEREF(__pyx_r);
2761  __Pyx_RefNannyFinishContext();
2762  return __pyx_r;
2763 }
2764 
2765 /* Python wrapper */
2766 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2767 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 ";
2768 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2769  PyObject *__pyx_r = 0;
2770  __Pyx_RefNannyDeclarations
2771  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2772  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2773 
2774  /* function exit code */
2775  __Pyx_RefNannyFinishContext();
2776  return __pyx_r;
2777 }
2778 
2779 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2780  PyObject *__pyx_r = NULL;
2781  __Pyx_RefNannyDeclarations
2782  PyObject *__pyx_t_1 = NULL;
2783  __Pyx_RefNannySetupContext("copy", 0);
2784  __Pyx_XDECREF(__pyx_r);
2785  __pyx_t_1 = __pyx_f_8PyClical_9index_set_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
2786  __Pyx_GOTREF(__pyx_t_1);
2787  __pyx_r = __pyx_t_1;
2788  __pyx_t_1 = 0;
2789  goto __pyx_L0;
2790 
2791  /* function exit code */
2792  __pyx_L1_error:;
2793  __Pyx_XDECREF(__pyx_t_1);
2794  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2795  __pyx_r = NULL;
2796  __pyx_L0:;
2797  __Pyx_XGIVEREF(__pyx_r);
2798  __Pyx_RefNannyFinishContext();
2799  return __pyx_r;
2800 }
2801 
2802 /* "PyClical.pyx":73
2803  * return index_set(self)
2804  *
2805  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2806  * """
2807  * Construct an object of type index_set.
2808  */
2809 
2810 /* Python wrapper */
2811 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2812 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2813  PyObject *__pyx_v_other = 0;
2814  int __pyx_r;
2815  __Pyx_RefNannyDeclarations
2816  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2817  {
2818  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2819  PyObject* values[1] = {0};
2820  values[0] = ((PyObject *)__pyx_int_0);
2821  if (unlikely(__pyx_kwds)) {
2822  Py_ssize_t kw_args;
2823  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2824  switch (pos_args) {
2825  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2826  CYTHON_FALLTHROUGH;
2827  case 0: break;
2828  default: goto __pyx_L5_argtuple_error;
2829  }
2830  kw_args = PyDict_Size(__pyx_kwds);
2831  switch (pos_args) {
2832  case 0:
2833  if (kw_args > 0) {
2834  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2835  if (value) { values[0] = value; kw_args--; }
2836  }
2837  }
2838  if (unlikely(kw_args > 0)) {
2839  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2840  }
2841  } else {
2842  switch (PyTuple_GET_SIZE(__pyx_args)) {
2843  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2844  CYTHON_FALLTHROUGH;
2845  case 0: break;
2846  default: goto __pyx_L5_argtuple_error;
2847  }
2848  }
2849  __pyx_v_other = values[0];
2850  }
2851  goto __pyx_L4_argument_unpacking_done;
2852  __pyx_L5_argtuple_error:;
2853  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2854  __pyx_L3_error:;
2855  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2856  __Pyx_RefNannyFinishContext();
2857  return -1;
2858  __pyx_L4_argument_unpacking_done:;
2859  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2860 
2861  /* function exit code */
2862  __Pyx_RefNannyFinishContext();
2863  return __pyx_r;
2864 }
2865 
2866 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2867  PyObject *__pyx_v_error_msg_prefix = NULL;
2868  PyObject *__pyx_v_idx = NULL;
2869  int __pyx_r;
2870  __Pyx_RefNannyDeclarations
2871  int __pyx_t_1;
2872  int __pyx_t_2;
2873  IndexSet *__pyx_t_3;
2874  PyObject *__pyx_t_4 = NULL;
2875  PyObject *__pyx_t_5 = NULL;
2876  int __pyx_t_6;
2877  int __pyx_t_7;
2878  PyObject *__pyx_t_8 = NULL;
2879  PyObject *__pyx_t_9 = NULL;
2880  PyObject *__pyx_t_10 = NULL;
2881  Py_ssize_t __pyx_t_11;
2882  PyObject *(*__pyx_t_12)(PyObject *);
2883  PyObject *__pyx_t_13 = NULL;
2884  PyObject *__pyx_t_14 = NULL;
2885  PyObject *__pyx_t_15 = NULL;
2886  PyObject *__pyx_t_16 = NULL;
2887  char *__pyx_t_17;
2888  __Pyx_RefNannySetupContext("__cinit__", 0);
2889 
2890  /* "PyClical.pyx":92
2891  * {}
2892  * """
2893  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2894  * if isinstance(other, index_set):
2895  * self.instance = new IndexSet((<index_set>other).unwrap())
2896  */
2897  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2898  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2899 
2900  /* "PyClical.pyx":93
2901  * """
2902  * error_msg_prefix = "Cannot initialize index_set object from"
2903  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2904  * self.instance = new IndexSet((<index_set>other).unwrap())
2905  * elif isinstance(other, numbers.Integral):
2906  */
2907  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2908  __pyx_t_2 = (__pyx_t_1 != 0);
2909  if (__pyx_t_2) {
2910 
2911  /* "PyClical.pyx":94
2912  * error_msg_prefix = "Cannot initialize index_set object from"
2913  * if isinstance(other, index_set):
2914  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2915  * elif isinstance(other, numbers.Integral):
2916  * self.instance = new IndexSet(<int>other)
2917  */
2918  try {
2919  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2920  } catch(...) {
2921  __Pyx_CppExn2PyErr();
2922  __PYX_ERR(0, 94, __pyx_L1_error)
2923  }
2924  __pyx_v_self->instance = __pyx_t_3;
2925 
2926  /* "PyClical.pyx":93
2927  * """
2928  * error_msg_prefix = "Cannot initialize index_set object from"
2929  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2930  * self.instance = new IndexSet((<index_set>other).unwrap())
2931  * elif isinstance(other, numbers.Integral):
2932  */
2933  goto __pyx_L3;
2934  }
2935 
2936  /* "PyClical.pyx":95
2937  * if isinstance(other, index_set):
2938  * self.instance = new IndexSet((<index_set>other).unwrap())
2939  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2940  * self.instance = new IndexSet(<int>other)
2941  * elif isinstance(other, (set, frozenset)):
2942  */
2943  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2944  __Pyx_GOTREF(__pyx_t_4);
2945  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Integral); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
2946  __Pyx_GOTREF(__pyx_t_5);
2947  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2948  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_5); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 95, __pyx_L1_error)
2949  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2950  __pyx_t_1 = (__pyx_t_2 != 0);
2951  if (__pyx_t_1) {
2952 
2953  /* "PyClical.pyx":96
2954  * self.instance = new IndexSet((<index_set>other).unwrap())
2955  * elif isinstance(other, numbers.Integral):
2956  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2957  * elif isinstance(other, (set, frozenset)):
2958  * try:
2959  */
2960  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_other); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 96, __pyx_L1_error)
2961  try {
2962  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2963  } catch(...) {
2964  __Pyx_CppExn2PyErr();
2965  __PYX_ERR(0, 96, __pyx_L1_error)
2966  }
2967  __pyx_v_self->instance = __pyx_t_3;
2968 
2969  /* "PyClical.pyx":95
2970  * if isinstance(other, index_set):
2971  * self.instance = new IndexSet((<index_set>other).unwrap())
2972  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2973  * self.instance = new IndexSet(<int>other)
2974  * elif isinstance(other, (set, frozenset)):
2975  */
2976  goto __pyx_L3;
2977  }
2978 
2979  /* "PyClical.pyx":97
2980  * elif isinstance(other, numbers.Integral):
2981  * self.instance = new IndexSet(<int>other)
2982  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2983  * try:
2984  * self.instance = new IndexSet()
2985  */
2986  __pyx_t_2 = PySet_Check(__pyx_v_other);
2987  __pyx_t_7 = (__pyx_t_2 != 0);
2988  if (!__pyx_t_7) {
2989  } else {
2990  __pyx_t_1 = __pyx_t_7;
2991  goto __pyx_L4_bool_binop_done;
2992  }
2993  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2994  __pyx_t_2 = (__pyx_t_7 != 0);
2995  __pyx_t_1 = __pyx_t_2;
2996  __pyx_L4_bool_binop_done:;
2997  __pyx_t_2 = (__pyx_t_1 != 0);
2998  if (__pyx_t_2) {
2999 
3000  /* "PyClical.pyx":98
3001  * self.instance = new IndexSet(<int>other)
3002  * elif isinstance(other, (set, frozenset)):
3003  * try: # <<<<<<<<<<<<<<
3004  * self.instance = new IndexSet()
3005  * for idx in other:
3006  */
3007  {
3008  __Pyx_PyThreadState_declare
3009  __Pyx_PyThreadState_assign
3010  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3011  __Pyx_XGOTREF(__pyx_t_8);
3012  __Pyx_XGOTREF(__pyx_t_9);
3013  __Pyx_XGOTREF(__pyx_t_10);
3014  /*try:*/ {
3015 
3016  /* "PyClical.pyx":99
3017  * elif isinstance(other, (set, frozenset)):
3018  * try:
3019  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3020  * for idx in other:
3021  * self[idx] = True
3022  */
3023  __pyx_t_3 = new IndexSet();
3024  __pyx_v_self->instance = __pyx_t_3;
3025 
3026  /* "PyClical.pyx":100
3027  * try:
3028  * self.instance = new IndexSet()
3029  * for idx in other: # <<<<<<<<<<<<<<
3030  * self[idx] = True
3031  * except IndexError:
3032  */
3033  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3034  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3035  __pyx_t_12 = NULL;
3036  } else {
3037  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
3038  __Pyx_GOTREF(__pyx_t_5);
3039  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
3040  }
3041  for (;;) {
3042  if (likely(!__pyx_t_12)) {
3043  if (likely(PyList_CheckExact(__pyx_t_5))) {
3044  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3045  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3046  __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, 100, __pyx_L6_error)
3047  #else
3048  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L6_error)
3049  __Pyx_GOTREF(__pyx_t_4);
3050  #endif
3051  } else {
3052  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3053  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3054  __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, 100, __pyx_L6_error)
3055  #else
3056  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L6_error)
3057  __Pyx_GOTREF(__pyx_t_4);
3058  #endif
3059  }
3060  } else {
3061  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3062  if (unlikely(!__pyx_t_4)) {
3063  PyObject* exc_type = PyErr_Occurred();
3064  if (exc_type) {
3065  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3066  else __PYX_ERR(0, 100, __pyx_L6_error)
3067  }
3068  break;
3069  }
3070  __Pyx_GOTREF(__pyx_t_4);
3071  }
3072  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3073  __pyx_t_4 = 0;
3074 
3075  /* "PyClical.pyx":101
3076  * self.instance = new IndexSet()
3077  * for idx in other:
3078  * self[idx] = True # <<<<<<<<<<<<<<
3079  * except IndexError:
3080  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3081  */
3082  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
3083 
3084  /* "PyClical.pyx":100
3085  * try:
3086  * self.instance = new IndexSet()
3087  * for idx in other: # <<<<<<<<<<<<<<
3088  * self[idx] = True
3089  * except IndexError:
3090  */
3091  }
3092  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3093 
3094  /* "PyClical.pyx":98
3095  * self.instance = new IndexSet(<int>other)
3096  * elif isinstance(other, (set, frozenset)):
3097  * try: # <<<<<<<<<<<<<<
3098  * self.instance = new IndexSet()
3099  * for idx in other:
3100  */
3101  }
3102  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3103  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3104  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3105  goto __pyx_L11_try_end;
3106  __pyx_L6_error:;
3107  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3108  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3109 
3110  /* "PyClical.pyx":102
3111  * for idx in other:
3112  * self[idx] = True
3113  * except IndexError: # <<<<<<<<<<<<<<
3114  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3115  * except (RuntimeError, TypeError):
3116  */
3117  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3118  if (__pyx_t_6) {
3119  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3120  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
3121  __Pyx_GOTREF(__pyx_t_5);
3122  __Pyx_GOTREF(__pyx_t_4);
3123  __Pyx_GOTREF(__pyx_t_13);
3124 
3125  /* "PyClical.pyx":103
3126  * self[idx] = True
3127  * except IndexError:
3128  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3129  * except (RuntimeError, TypeError):
3130  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3131  */
3132  __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3133  __Pyx_GOTREF(__pyx_t_14);
3134  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3135  __Pyx_GOTREF(__pyx_t_15);
3136  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3137  __Pyx_GOTREF(__pyx_t_16);
3138  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3139  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3140  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3141  __Pyx_GOTREF(__pyx_t_15);
3142  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3143  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3144  __Pyx_GOTREF(__pyx_t_16);
3145  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3146  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3147  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3148  __PYX_ERR(0, 103, __pyx_L8_except_error)
3149  }
3150 
3151  /* "PyClical.pyx":104
3152  * except IndexError:
3153  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3154  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3155  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3156  * elif isinstance(other, str):
3157  */
3158  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3159  if (__pyx_t_6) {
3160  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3161  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3162  __Pyx_GOTREF(__pyx_t_13);
3163  __Pyx_GOTREF(__pyx_t_4);
3164  __Pyx_GOTREF(__pyx_t_5);
3165 
3166  /* "PyClical.pyx":105
3167  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3168  * except (RuntimeError, TypeError):
3169  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3170  * elif isinstance(other, str):
3171  * try:
3172  */
3173  __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3174  __Pyx_GOTREF(__pyx_t_16);
3175  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3176  __Pyx_GOTREF(__pyx_t_15);
3177  __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3178  __Pyx_GOTREF(__pyx_t_14);
3179  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3180  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3181  __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3182  __Pyx_GOTREF(__pyx_t_15);
3183  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3184  __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3185  __Pyx_GOTREF(__pyx_t_14);
3186  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3187  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3188  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3189  __PYX_ERR(0, 105, __pyx_L8_except_error)
3190  }
3191  goto __pyx_L8_except_error;
3192  __pyx_L8_except_error:;
3193 
3194  /* "PyClical.pyx":98
3195  * self.instance = new IndexSet(<int>other)
3196  * elif isinstance(other, (set, frozenset)):
3197  * try: # <<<<<<<<<<<<<<
3198  * self.instance = new IndexSet()
3199  * for idx in other:
3200  */
3201  __Pyx_XGIVEREF(__pyx_t_8);
3202  __Pyx_XGIVEREF(__pyx_t_9);
3203  __Pyx_XGIVEREF(__pyx_t_10);
3204  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3205  goto __pyx_L1_error;
3206  __pyx_L11_try_end:;
3207  }
3208 
3209  /* "PyClical.pyx":97
3210  * elif isinstance(other, numbers.Integral):
3211  * self.instance = new IndexSet(<int>other)
3212  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3213  * try:
3214  * self.instance = new IndexSet()
3215  */
3216  goto __pyx_L3;
3217  }
3218 
3219  /* "PyClical.pyx":106
3220  * except (RuntimeError, TypeError):
3221  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3222  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3223  * try:
3224  * self.instance = new IndexSet(<char *>other)
3225  */
3226  __pyx_t_2 = PyString_Check(__pyx_v_other);
3227  __pyx_t_1 = (__pyx_t_2 != 0);
3228  if (likely(__pyx_t_1)) {
3229 
3230  /* "PyClical.pyx":107
3231  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3232  * elif isinstance(other, str):
3233  * try: # <<<<<<<<<<<<<<
3234  * self.instance = new IndexSet(<char *>other)
3235  * except RuntimeError:
3236  */
3237  {
3238  __Pyx_PyThreadState_declare
3239  __Pyx_PyThreadState_assign
3240  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3241  __Pyx_XGOTREF(__pyx_t_10);
3242  __Pyx_XGOTREF(__pyx_t_9);
3243  __Pyx_XGOTREF(__pyx_t_8);
3244  /*try:*/ {
3245 
3246  /* "PyClical.pyx":108
3247  * elif isinstance(other, str):
3248  * try:
3249  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3250  * except RuntimeError:
3251  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3252  */
3253  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3254  try {
3255  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3256  } catch(...) {
3257  __Pyx_CppExn2PyErr();
3258  __PYX_ERR(0, 108, __pyx_L18_error)
3259  }
3260  __pyx_v_self->instance = __pyx_t_3;
3261 
3262  /* "PyClical.pyx":107
3263  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3264  * elif isinstance(other, str):
3265  * try: # <<<<<<<<<<<<<<
3266  * self.instance = new IndexSet(<char *>other)
3267  * except RuntimeError:
3268  */
3269  }
3270  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3271  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3272  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3273  goto __pyx_L23_try_end;
3274  __pyx_L18_error:;
3275  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3276  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3277  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3278  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3279  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3280  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3281 
3282  /* "PyClical.pyx":109
3283  * try:
3284  * self.instance = new IndexSet(<char *>other)
3285  * except RuntimeError: # <<<<<<<<<<<<<<
3286  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3287  * else:
3288  */
3289  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3290  if (__pyx_t_6) {
3291  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3292  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3293  __Pyx_GOTREF(__pyx_t_5);
3294  __Pyx_GOTREF(__pyx_t_4);
3295  __Pyx_GOTREF(__pyx_t_13);
3296 
3297  /* "PyClical.pyx":110
3298  * self.instance = new IndexSet(<char *>other)
3299  * except RuntimeError:
3300  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3301  * else:
3302  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3303  */
3304  __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid_string); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3305  __Pyx_GOTREF(__pyx_t_14);
3306  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3307  __Pyx_GOTREF(__pyx_t_15);
3308  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3309  __Pyx_GOTREF(__pyx_t_16);
3310  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3311  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3312  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3313  __Pyx_GOTREF(__pyx_t_15);
3314  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3315  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3316  __Pyx_GOTREF(__pyx_t_16);
3317  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3318  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3319  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3320  __PYX_ERR(0, 110, __pyx_L20_except_error)
3321  }
3322  goto __pyx_L20_except_error;
3323  __pyx_L20_except_error:;
3324 
3325  /* "PyClical.pyx":107
3326  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3327  * elif isinstance(other, str):
3328  * try: # <<<<<<<<<<<<<<
3329  * self.instance = new IndexSet(<char *>other)
3330  * except RuntimeError:
3331  */
3332  __Pyx_XGIVEREF(__pyx_t_10);
3333  __Pyx_XGIVEREF(__pyx_t_9);
3334  __Pyx_XGIVEREF(__pyx_t_8);
3335  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3336  goto __pyx_L1_error;
3337  __pyx_L23_try_end:;
3338  }
3339 
3340  /* "PyClical.pyx":106
3341  * except (RuntimeError, TypeError):
3342  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3343  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3344  * try:
3345  * self.instance = new IndexSet(<char *>other)
3346  */
3347  goto __pyx_L3;
3348  }
3349 
3350  /* "PyClical.pyx":112
3351  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3352  * else:
3353  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3354  *
3355  * def __dealloc__(self):
3356  */
3357  /*else*/ {
3358  __pyx_t_13 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 112, __pyx_L1_error)
3359  __Pyx_GOTREF(__pyx_t_13);
3360  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3361  __Pyx_GOTREF(__pyx_t_4);
3362  __pyx_t_5 = PyNumber_Add(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3363  __Pyx_GOTREF(__pyx_t_5);
3364  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3365  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3366  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3367  __Pyx_GOTREF(__pyx_t_4);
3368  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3369  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3370  __Pyx_GOTREF(__pyx_t_5);
3371  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3372  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3373  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3374  __PYX_ERR(0, 112, __pyx_L1_error)
3375  }
3376  __pyx_L3:;
3377 
3378  /* "PyClical.pyx":73
3379  * return index_set(self)
3380  *
3381  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3382  * """
3383  * Construct an object of type index_set.
3384  */
3385 
3386  /* function exit code */
3387  __pyx_r = 0;
3388  goto __pyx_L0;
3389  __pyx_L1_error:;
3390  __Pyx_XDECREF(__pyx_t_4);
3391  __Pyx_XDECREF(__pyx_t_5);
3392  __Pyx_XDECREF(__pyx_t_13);
3393  __Pyx_XDECREF(__pyx_t_14);
3394  __Pyx_XDECREF(__pyx_t_15);
3395  __Pyx_XDECREF(__pyx_t_16);
3396  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3397  __pyx_r = -1;
3398  __pyx_L0:;
3399  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3400  __Pyx_XDECREF(__pyx_v_idx);
3401  __Pyx_RefNannyFinishContext();
3402  return __pyx_r;
3403 }
3404 
3405 /* "PyClical.pyx":114
3406  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3407  *
3408  * def __dealloc__(self): # <<<<<<<<<<<<<<
3409  * """
3410  * Clean up by deallocating the instance of C++ class IndexSet.
3411  */
3412 
3413 /* Python wrapper */
3414 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3415 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3416  __Pyx_RefNannyDeclarations
3417  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3418  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3419 
3420  /* function exit code */
3421  __Pyx_RefNannyFinishContext();
3422 }
3423 
3424 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3425  __Pyx_RefNannyDeclarations
3426  __Pyx_RefNannySetupContext("__dealloc__", 0);
3427 
3428  /* "PyClical.pyx":118
3429  * Clean up by deallocating the instance of C++ class IndexSet.
3430  * """
3431  * del self.instance # <<<<<<<<<<<<<<
3432  *
3433  * def __richcmp__(lhs, rhs, int op):
3434  */
3435  delete __pyx_v_self->instance;
3436 
3437  /* "PyClical.pyx":114
3438  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3439  *
3440  * def __dealloc__(self): # <<<<<<<<<<<<<<
3441  * """
3442  * Clean up by deallocating the instance of C++ class IndexSet.
3443  */
3444 
3445  /* function exit code */
3446  __Pyx_RefNannyFinishContext();
3447 }
3448 
3449 /* "PyClical.pyx":120
3450  * del self.instance
3451  *
3452  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3453  * """
3454  * Compare two objects of class index_set.
3455  */
3456 
3457 /* Python wrapper */
3458 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3459 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3460  PyObject *__pyx_r = 0;
3461  __Pyx_RefNannyDeclarations
3462  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3463  __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));
3464 
3465  /* function exit code */
3466  __Pyx_RefNannyFinishContext();
3467  return __pyx_r;
3468 }
3469 
3470 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) {
3471  PyObject *__pyx_v_eq = NULL;
3472  PyObject *__pyx_v_lt = NULL;
3473  PyObject *__pyx_r = NULL;
3474  __Pyx_RefNannyDeclarations
3475  int __pyx_t_1;
3476  int __pyx_t_2;
3477  int __pyx_t_3;
3478  PyObject *__pyx_t_4 = NULL;
3479  __Pyx_RefNannySetupContext("__richcmp__", 0);
3480 
3481  /* "PyClical.pyx":141
3482  * False
3483  * """
3484  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3485  * eq = bool(lhs is rhs)
3486  * if op == 2: # ==
3487  */
3488  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3489  __pyx_t_3 = (__pyx_t_2 != 0);
3490  if (!__pyx_t_3) {
3491  } else {
3492  __pyx_t_1 = __pyx_t_3;
3493  goto __pyx_L4_bool_binop_done;
3494  }
3495  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3496  __pyx_t_2 = (__pyx_t_3 != 0);
3497  __pyx_t_1 = __pyx_t_2;
3498  __pyx_L4_bool_binop_done:;
3499  if (__pyx_t_1) {
3500 
3501  /* "PyClical.pyx":142
3502  * """
3503  * if (lhs is None) or (rhs is None):
3504  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3505  * if op == 2: # ==
3506  * return eq
3507  */
3508  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3509  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3510  __Pyx_GOTREF(__pyx_t_4);
3511  __pyx_v_eq = __pyx_t_4;
3512  __pyx_t_4 = 0;
3513 
3514  /* "PyClical.pyx":143
3515  * if (lhs is None) or (rhs is None):
3516  * eq = bool(lhs is rhs)
3517  * if op == 2: # == # <<<<<<<<<<<<<<
3518  * return eq
3519  * elif op == 3: # !=
3520  */
3521  switch (__pyx_v_op) {
3522  case 2:
3523 
3524  /* "PyClical.pyx":144
3525  * eq = bool(lhs is rhs)
3526  * if op == 2: # ==
3527  * return eq # <<<<<<<<<<<<<<
3528  * elif op == 3: # !=
3529  * return not eq
3530  */
3531  __Pyx_XDECREF(__pyx_r);
3532  __Pyx_INCREF(__pyx_v_eq);
3533  __pyx_r = __pyx_v_eq;
3534  goto __pyx_L0;
3535 
3536  /* "PyClical.pyx":143
3537  * if (lhs is None) or (rhs is None):
3538  * eq = bool(lhs is rhs)
3539  * if op == 2: # == # <<<<<<<<<<<<<<
3540  * return eq
3541  * elif op == 3: # !=
3542  */
3543  break;
3544  case 3:
3545 
3546  /* "PyClical.pyx":146
3547  * return eq
3548  * elif op == 3: # !=
3549  * return not eq # <<<<<<<<<<<<<<
3550  * else:
3551  * if op == 0: # <
3552  */
3553  __Pyx_XDECREF(__pyx_r);
3554  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3555  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3556  __Pyx_GOTREF(__pyx_t_4);
3557  __pyx_r = __pyx_t_4;
3558  __pyx_t_4 = 0;
3559  goto __pyx_L0;
3560 
3561  /* "PyClical.pyx":145
3562  * if op == 2: # ==
3563  * return eq
3564  * elif op == 3: # != # <<<<<<<<<<<<<<
3565  * return not eq
3566  * else:
3567  */
3568  break;
3569  default:
3570 
3571  /* "PyClical.pyx":148
3572  * return not eq
3573  * else:
3574  * if op == 0: # < # <<<<<<<<<<<<<<
3575  * return False
3576  * elif op == 1: # <=
3577  */
3578  switch (__pyx_v_op) {
3579  case 0:
3580 
3581  /* "PyClical.pyx":149
3582  * else:
3583  * if op == 0: # <
3584  * return False # <<<<<<<<<<<<<<
3585  * elif op == 1: # <=
3586  * return eq
3587  */
3588  __Pyx_XDECREF(__pyx_r);
3589  __Pyx_INCREF(Py_False);
3590  __pyx_r = Py_False;
3591  goto __pyx_L0;
3592 
3593  /* "PyClical.pyx":148
3594  * return not eq
3595  * else:
3596  * if op == 0: # < # <<<<<<<<<<<<<<
3597  * return False
3598  * elif op == 1: # <=
3599  */
3600  break;
3601  case 1:
3602 
3603  /* "PyClical.pyx":151
3604  * return False
3605  * elif op == 1: # <=
3606  * return eq # <<<<<<<<<<<<<<
3607  * elif op == 4: # >
3608  * return False
3609  */
3610  __Pyx_XDECREF(__pyx_r);
3611  __Pyx_INCREF(__pyx_v_eq);
3612  __pyx_r = __pyx_v_eq;
3613  goto __pyx_L0;
3614 
3615  /* "PyClical.pyx":150
3616  * if op == 0: # <
3617  * return False
3618  * elif op == 1: # <= # <<<<<<<<<<<<<<
3619  * return eq
3620  * elif op == 4: # >
3621  */
3622  break;
3623  case 4:
3624 
3625  /* "PyClical.pyx":153
3626  * return eq
3627  * elif op == 4: # >
3628  * return False # <<<<<<<<<<<<<<
3629  * elif op == 5: # >=
3630  * return eq
3631  */
3632  __Pyx_XDECREF(__pyx_r);
3633  __Pyx_INCREF(Py_False);
3634  __pyx_r = Py_False;
3635  goto __pyx_L0;
3636 
3637  /* "PyClical.pyx":152
3638  * elif op == 1: # <=
3639  * return eq
3640  * elif op == 4: # > # <<<<<<<<<<<<<<
3641  * return False
3642  * elif op == 5: # >=
3643  */
3644  break;
3645  case 5:
3646 
3647  /* "PyClical.pyx":155
3648  * return False
3649  * elif op == 5: # >=
3650  * return eq # <<<<<<<<<<<<<<
3651  * else:
3652  * return NotImplemented
3653  */
3654  __Pyx_XDECREF(__pyx_r);
3655  __Pyx_INCREF(__pyx_v_eq);
3656  __pyx_r = __pyx_v_eq;
3657  goto __pyx_L0;
3658 
3659  /* "PyClical.pyx":154
3660  * elif op == 4: # >
3661  * return False
3662  * elif op == 5: # >= # <<<<<<<<<<<<<<
3663  * return eq
3664  * else:
3665  */
3666  break;
3667  default:
3668 
3669  /* "PyClical.pyx":157
3670  * return eq
3671  * else:
3672  * return NotImplemented # <<<<<<<<<<<<<<
3673  * else:
3674  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3675  */
3676  __Pyx_XDECREF(__pyx_r);
3677  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3678  __pyx_r = __pyx_builtin_NotImplemented;
3679  goto __pyx_L0;
3680  break;
3681  }
3682  break;
3683  }
3684 
3685  /* "PyClical.pyx":141
3686  * False
3687  * """
3688  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3689  * eq = bool(lhs is rhs)
3690  * if op == 2: # ==
3691  */
3692  }
3693 
3694  /* "PyClical.pyx":159
3695  * return NotImplemented
3696  * else:
3697  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3698  * if op == 2: # ==
3699  * return eq
3700  */
3701  /*else*/ {
3702  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3703  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3704  __Pyx_GOTREF(__pyx_t_4);
3705  __pyx_v_eq = __pyx_t_4;
3706  __pyx_t_4 = 0;
3707 
3708  /* "PyClical.pyx":160
3709  * else:
3710  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3711  * if op == 2: # == # <<<<<<<<<<<<<<
3712  * return eq
3713  * elif op == 3: # !=
3714  */
3715  switch (__pyx_v_op) {
3716  case 2:
3717 
3718  /* "PyClical.pyx":161
3719  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3720  * if op == 2: # ==
3721  * return eq # <<<<<<<<<<<<<<
3722  * elif op == 3: # !=
3723  * return not eq
3724  */
3725  __Pyx_XDECREF(__pyx_r);
3726  __Pyx_INCREF(__pyx_v_eq);
3727  __pyx_r = __pyx_v_eq;
3728  goto __pyx_L0;
3729 
3730  /* "PyClical.pyx":160
3731  * else:
3732  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3733  * if op == 2: # == # <<<<<<<<<<<<<<
3734  * return eq
3735  * elif op == 3: # !=
3736  */
3737  break;
3738  case 3:
3739 
3740  /* "PyClical.pyx":163
3741  * return eq
3742  * elif op == 3: # !=
3743  * return not eq # <<<<<<<<<<<<<<
3744  * else:
3745  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3746  */
3747  __Pyx_XDECREF(__pyx_r);
3748  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3749  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3750  __Pyx_GOTREF(__pyx_t_4);
3751  __pyx_r = __pyx_t_4;
3752  __pyx_t_4 = 0;
3753  goto __pyx_L0;
3754 
3755  /* "PyClical.pyx":162
3756  * if op == 2: # ==
3757  * return eq
3758  * elif op == 3: # != # <<<<<<<<<<<<<<
3759  * return not eq
3760  * else:
3761  */
3762  break;
3763  default:
3764 
3765  /* "PyClical.pyx":165
3766  * return not eq
3767  * else:
3768  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3769  * if op == 0: # <
3770  * return lt
3771  */
3772  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3773  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3774  __Pyx_GOTREF(__pyx_t_4);
3775  __pyx_v_lt = __pyx_t_4;
3776  __pyx_t_4 = 0;
3777 
3778  /* "PyClical.pyx":166
3779  * else:
3780  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3781  * if op == 0: # < # <<<<<<<<<<<<<<
3782  * return lt
3783  * elif op == 1: # <=
3784  */
3785  switch (__pyx_v_op) {
3786  case 0:
3787 
3788  /* "PyClical.pyx":167
3789  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3790  * if op == 0: # <
3791  * return lt # <<<<<<<<<<<<<<
3792  * elif op == 1: # <=
3793  * return lt or eq
3794  */
3795  __Pyx_XDECREF(__pyx_r);
3796  __Pyx_INCREF(__pyx_v_lt);
3797  __pyx_r = __pyx_v_lt;
3798  goto __pyx_L0;
3799 
3800  /* "PyClical.pyx":166
3801  * else:
3802  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3803  * if op == 0: # < # <<<<<<<<<<<<<<
3804  * return lt
3805  * elif op == 1: # <=
3806  */
3807  break;
3808  case 1:
3809 
3810  /* "PyClical.pyx":169
3811  * return lt
3812  * elif op == 1: # <=
3813  * return lt or eq # <<<<<<<<<<<<<<
3814  * elif op == 4: # >
3815  * return not (lt or eq)
3816  */
3817  __Pyx_XDECREF(__pyx_r);
3818  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3819  if (!__pyx_t_1) {
3820  } else {
3821  __Pyx_INCREF(__pyx_v_lt);
3822  __pyx_t_4 = __pyx_v_lt;
3823  goto __pyx_L6_bool_binop_done;
3824  }
3825  __Pyx_INCREF(__pyx_v_eq);
3826  __pyx_t_4 = __pyx_v_eq;
3827  __pyx_L6_bool_binop_done:;
3828  __pyx_r = __pyx_t_4;
3829  __pyx_t_4 = 0;
3830  goto __pyx_L0;
3831 
3832  /* "PyClical.pyx":168
3833  * if op == 0: # <
3834  * return lt
3835  * elif op == 1: # <= # <<<<<<<<<<<<<<
3836  * return lt or eq
3837  * elif op == 4: # >
3838  */
3839  break;
3840  case 4:
3841 
3842  /* "PyClical.pyx":171
3843  * return lt or eq
3844  * elif op == 4: # >
3845  * return not (lt or eq) # <<<<<<<<<<<<<<
3846  * elif op == 5: # >=
3847  * return not lt
3848  */
3849  __Pyx_XDECREF(__pyx_r);
3850  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3851  if (!__pyx_t_2) {
3852  } else {
3853  __pyx_t_1 = __pyx_t_2;
3854  goto __pyx_L8_bool_binop_done;
3855  }
3856  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3857  __pyx_t_1 = __pyx_t_2;
3858  __pyx_L8_bool_binop_done:;
3859  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3860  __Pyx_GOTREF(__pyx_t_4);
3861  __pyx_r = __pyx_t_4;
3862  __pyx_t_4 = 0;
3863  goto __pyx_L0;
3864 
3865  /* "PyClical.pyx":170
3866  * elif op == 1: # <=
3867  * return lt or eq
3868  * elif op == 4: # > # <<<<<<<<<<<<<<
3869  * return not (lt or eq)
3870  * elif op == 5: # >=
3871  */
3872  break;
3873  case 5:
3874 
3875  /* "PyClical.pyx":173
3876  * return not (lt or eq)
3877  * elif op == 5: # >=
3878  * return not lt # <<<<<<<<<<<<<<
3879  * else:
3880  * return NotImplemented
3881  */
3882  __Pyx_XDECREF(__pyx_r);
3883  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3884  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3885  __Pyx_GOTREF(__pyx_t_4);
3886  __pyx_r = __pyx_t_4;
3887  __pyx_t_4 = 0;
3888  goto __pyx_L0;
3889 
3890  /* "PyClical.pyx":172
3891  * elif op == 4: # >
3892  * return not (lt or eq)
3893  * elif op == 5: # >= # <<<<<<<<<<<<<<
3894  * return not lt
3895  * else:
3896  */
3897  break;
3898  default:
3899 
3900  /* "PyClical.pyx":175
3901  * return not lt
3902  * else:
3903  * return NotImplemented # <<<<<<<<<<<<<<
3904  *
3905  * def __setitem__(self, idx, val):
3906  */
3907  __Pyx_XDECREF(__pyx_r);
3908  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3909  __pyx_r = __pyx_builtin_NotImplemented;
3910  goto __pyx_L0;
3911  break;
3912  }
3913  break;
3914  }
3915  }
3916 
3917  /* "PyClical.pyx":120
3918  * del self.instance
3919  *
3920  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3921  * """
3922  * Compare two objects of class index_set.
3923  */
3924 
3925  /* function exit code */
3926  __pyx_L1_error:;
3927  __Pyx_XDECREF(__pyx_t_4);
3928  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3929  __pyx_r = NULL;
3930  __pyx_L0:;
3931  __Pyx_XDECREF(__pyx_v_eq);
3932  __Pyx_XDECREF(__pyx_v_lt);
3933  __Pyx_XGIVEREF(__pyx_r);
3934  __Pyx_RefNannyFinishContext();
3935  return __pyx_r;
3936 }
3937 
3938 /* "PyClical.pyx":177
3939  * return NotImplemented
3940  *
3941  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3942  * """
3943  * Set the value of an index_set object at index idx to value val.
3944  */
3945 
3946 /* Python wrapper */
3947 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3948 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 ";
3949 #if CYTHON_COMPILING_IN_CPYTHON
3950 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3951 #endif
3952 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3953  int __pyx_r;
3954  __Pyx_RefNannyDeclarations
3955  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3956  __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));
3957 
3958  /* function exit code */
3959  __Pyx_RefNannyFinishContext();
3960  return __pyx_r;
3961 }
3962 
3963 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) {
3964  int __pyx_r;
3965  __Pyx_RefNannyDeclarations
3966  int __pyx_t_1;
3967  int __pyx_t_2;
3968  __Pyx_RefNannySetupContext("__setitem__", 0);
3969 
3970  /* "PyClical.pyx":186
3971  * {2}
3972  * """
3973  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3974  * return
3975  *
3976  */
3977  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 186, __pyx_L1_error)
3978  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_val); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 186, __pyx_L1_error)
3979  try {
3980  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3981  } catch(...) {
3982  __Pyx_CppExn2PyErr();
3983  __PYX_ERR(0, 186, __pyx_L1_error)
3984  }
3985 
3986  /* "PyClical.pyx":187
3987  * """
3988  * self.instance.set(idx, val)
3989  * return # <<<<<<<<<<<<<<
3990  *
3991  * def __getitem__(self, idx):
3992  */
3993  __pyx_r = 0;
3994  goto __pyx_L0;
3995 
3996  /* "PyClical.pyx":177
3997  * return NotImplemented
3998  *
3999  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4000  * """
4001  * Set the value of an index_set object at index idx to value val.
4002  */
4003 
4004  /* function exit code */
4005  __pyx_L1_error:;
4006  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4007  __pyx_r = -1;
4008  __pyx_L0:;
4009  __Pyx_RefNannyFinishContext();
4010  return __pyx_r;
4011 }
4012 
4013 /* "PyClical.pyx":189
4014  * return
4015  *
4016  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4017  * """
4018  * Get the value of an index_set object at an index.
4019  */
4020 
4021 /* Python wrapper */
4022 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4023 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 ";
4024 #if CYTHON_COMPILING_IN_CPYTHON
4025 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4026 #endif
4027 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4028  PyObject *__pyx_r = 0;
4029  __Pyx_RefNannyDeclarations
4030  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4031  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4032 
4033  /* function exit code */
4034  __Pyx_RefNannyFinishContext();
4035  return __pyx_r;
4036 }
4037 
4038 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4039  PyObject *__pyx_r = NULL;
4040  __Pyx_RefNannyDeclarations
4041  int __pyx_t_1;
4042  PyObject *__pyx_t_2 = NULL;
4043  __Pyx_RefNannySetupContext("__getitem__", 0);
4044 
4045  /* "PyClical.pyx":206
4046  * False
4047  * """
4048  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4049  *
4050  * def __contains__(self, idx):
4051  */
4052  __Pyx_XDECREF(__pyx_r);
4053  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 206, __pyx_L1_error)
4054  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->operator[](__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
4055  __Pyx_GOTREF(__pyx_t_2);
4056  __pyx_r = __pyx_t_2;
4057  __pyx_t_2 = 0;
4058  goto __pyx_L0;
4059 
4060  /* "PyClical.pyx":189
4061  * return
4062  *
4063  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4064  * """
4065  * Get the value of an index_set object at an index.
4066  */
4067 
4068  /* function exit code */
4069  __pyx_L1_error:;
4070  __Pyx_XDECREF(__pyx_t_2);
4071  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4072  __pyx_r = NULL;
4073  __pyx_L0:;
4074  __Pyx_XGIVEREF(__pyx_r);
4075  __Pyx_RefNannyFinishContext();
4076  return __pyx_r;
4077 }
4078 
4079 /* "PyClical.pyx":208
4080  * return self.instance.getitem(idx)
4081  *
4082  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4083  * """
4084  * Check that an index_set object contains the index idx: idx in self.
4085  */
4086 
4087 /* Python wrapper */
4088 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4089 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 ";
4090 #if CYTHON_COMPILING_IN_CPYTHON
4091 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4092 #endif
4093 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4094  int __pyx_r;
4095  __Pyx_RefNannyDeclarations
4096  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4097  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4098 
4099  /* function exit code */
4100  __Pyx_RefNannyFinishContext();
4101  return __pyx_r;
4102 }
4103 
4104 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4105  int __pyx_r;
4106  __Pyx_RefNannyDeclarations
4107  int __pyx_t_1;
4108  __Pyx_RefNannySetupContext("__contains__", 0);
4109 
4110  /* "PyClical.pyx":225
4111  * False
4112  * """
4113  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4114  *
4115  * def __iter__(self):
4116  */
4117  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L1_error)
4118  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4119  goto __pyx_L0;
4120 
4121  /* "PyClical.pyx":208
4122  * return self.instance.getitem(idx)
4123  *
4124  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4125  * """
4126  * Check that an index_set object contains the index idx: idx in self.
4127  */
4128 
4129  /* function exit code */
4130  __pyx_L1_error:;
4131  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4132  __pyx_r = -1;
4133  __pyx_L0:;
4134  __Pyx_RefNannyFinishContext();
4135  return __pyx_r;
4136 }
4137 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4138 
4139 /* "PyClical.pyx":227
4140  * return self.instance.getitem(idx)
4141  *
4142  * def __iter__(self): # <<<<<<<<<<<<<<
4143  * """
4144  * Iterate over the indices of an index_set.
4145  */
4146 
4147 /* Python wrapper */
4148 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4149 static char __pyx_doc_8PyClical_9index_set_14__iter__[] = "\n Iterate over the indices of an index_set.\n\n >>> for i in index_set({-3,4,7}): print i,\n -3 4 7\n ";
4150 #if CYTHON_COMPILING_IN_CPYTHON
4151 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4152 #endif
4153 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4154  PyObject *__pyx_r = 0;
4155  __Pyx_RefNannyDeclarations
4156  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4157  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4158 
4159  /* function exit code */
4160  __Pyx_RefNannyFinishContext();
4161  return __pyx_r;
4162 }
4163 
4164 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4165  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4166  PyObject *__pyx_r = NULL;
4167  __Pyx_RefNannyDeclarations
4168  __Pyx_RefNannySetupContext("__iter__", 0);
4169  __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);
4170  if (unlikely(!__pyx_cur_scope)) {
4171  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4172  __Pyx_INCREF(Py_None);
4173  __PYX_ERR(0, 227, __pyx_L1_error)
4174  } else {
4175  __Pyx_GOTREF(__pyx_cur_scope);
4176  }
4177  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4178  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4179  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4180  {
4181  __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, 227, __pyx_L1_error)
4182  __Pyx_DECREF(__pyx_cur_scope);
4183  __Pyx_RefNannyFinishContext();
4184  return (PyObject *) gen;
4185  }
4186 
4187  /* function exit code */
4188  __pyx_L1_error:;
4189  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4190  __pyx_r = NULL;
4191  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4192  __Pyx_XGIVEREF(__pyx_r);
4193  __Pyx_RefNannyFinishContext();
4194  return __pyx_r;
4195 }
4196 
4197 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4198 {
4199  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4200  PyObject *__pyx_r = NULL;
4201  PyObject *__pyx_t_1 = NULL;
4202  PyObject *__pyx_t_2 = NULL;
4203  PyObject *__pyx_t_3 = NULL;
4204  PyObject *__pyx_t_4 = NULL;
4205  Py_ssize_t __pyx_t_5;
4206  PyObject *(*__pyx_t_6)(PyObject *);
4207  int __pyx_t_7;
4208  int __pyx_t_8;
4209  __Pyx_RefNannyDeclarations
4210  __Pyx_RefNannySetupContext("__iter__", 0);
4211  switch (__pyx_generator->resume_label) {
4212  case 0: goto __pyx_L3_first_run;
4213  case 1: goto __pyx_L7_resume_from_yield;
4214  default: /* CPython raises the right error here */
4215  __Pyx_RefNannyFinishContext();
4216  return NULL;
4217  }
4218  __pyx_L3_first_run:;
4219  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4220 
4221  /* "PyClical.pyx":234
4222  * -3 4 7
4223  * """
4224  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4225  * if idx in self:
4226  * yield idx
4227  */
4228  __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, 234, __pyx_L1_error)
4229  __Pyx_GOTREF(__pyx_t_2);
4230  __pyx_t_3 = NULL;
4231  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4232  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4233  if (likely(__pyx_t_3)) {
4234  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4235  __Pyx_INCREF(__pyx_t_3);
4236  __Pyx_INCREF(function);
4237  __Pyx_DECREF_SET(__pyx_t_2, function);
4238  }
4239  }
4240  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4241  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4242  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4243  __Pyx_GOTREF(__pyx_t_1);
4244  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4245  __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, 234, __pyx_L1_error)
4246  __Pyx_GOTREF(__pyx_t_3);
4247  __pyx_t_4 = NULL;
4248  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4249  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4250  if (likely(__pyx_t_4)) {
4251  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4252  __Pyx_INCREF(__pyx_t_4);
4253  __Pyx_INCREF(function);
4254  __Pyx_DECREF_SET(__pyx_t_3, function);
4255  }
4256  }
4257  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4258  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4259  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4260  __Pyx_GOTREF(__pyx_t_2);
4261  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4262  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4263  __Pyx_GOTREF(__pyx_t_3);
4264  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4265  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4266  __Pyx_GOTREF(__pyx_t_2);
4267  __Pyx_GIVEREF(__pyx_t_1);
4268  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4269  __Pyx_GIVEREF(__pyx_t_3);
4270  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4271  __pyx_t_1 = 0;
4272  __pyx_t_3 = 0;
4273  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4274  __Pyx_GOTREF(__pyx_t_3);
4275  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4276  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4277  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4278  __pyx_t_6 = NULL;
4279  } else {
4280  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4281  __Pyx_GOTREF(__pyx_t_2);
4282  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4283  }
4284  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4285  for (;;) {
4286  if (likely(!__pyx_t_6)) {
4287  if (likely(PyList_CheckExact(__pyx_t_2))) {
4288  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4289  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4290  __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, 234, __pyx_L1_error)
4291  #else
4292  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4293  __Pyx_GOTREF(__pyx_t_3);
4294  #endif
4295  } else {
4296  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4297  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4298  __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, 234, __pyx_L1_error)
4299  #else
4300  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4301  __Pyx_GOTREF(__pyx_t_3);
4302  #endif
4303  }
4304  } else {
4305  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4306  if (unlikely(!__pyx_t_3)) {
4307  PyObject* exc_type = PyErr_Occurred();
4308  if (exc_type) {
4309  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4310  else __PYX_ERR(0, 234, __pyx_L1_error)
4311  }
4312  break;
4313  }
4314  __Pyx_GOTREF(__pyx_t_3);
4315  }
4316  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4317  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4318  __Pyx_GIVEREF(__pyx_t_3);
4319  __pyx_t_3 = 0;
4320 
4321  /* "PyClical.pyx":235
4322  * """
4323  * for idx in range(self.min(), self.max()+1):
4324  * if idx in self: # <<<<<<<<<<<<<<
4325  * yield idx
4326  *
4327  */
4328  __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, 235, __pyx_L1_error)
4329  __pyx_t_8 = (__pyx_t_7 != 0);
4330  if (__pyx_t_8) {
4331 
4332  /* "PyClical.pyx":236
4333  * for idx in range(self.min(), self.max()+1):
4334  * if idx in self:
4335  * yield idx # <<<<<<<<<<<<<<
4336  *
4337  * def __invert__(self):
4338  */
4339  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4340  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4341  __Pyx_XGIVEREF(__pyx_t_2);
4342  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4343  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4344  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4345  __Pyx_XGIVEREF(__pyx_r);
4346  __Pyx_RefNannyFinishContext();
4347  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4348  /* return from generator, yielding value */
4349  __pyx_generator->resume_label = 1;
4350  return __pyx_r;
4351  __pyx_L7_resume_from_yield:;
4352  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4353  __pyx_cur_scope->__pyx_t_0 = 0;
4354  __Pyx_XGOTREF(__pyx_t_2);
4355  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4356  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4357  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4358 
4359  /* "PyClical.pyx":235
4360  * """
4361  * for idx in range(self.min(), self.max()+1):
4362  * if idx in self: # <<<<<<<<<<<<<<
4363  * yield idx
4364  *
4365  */
4366  }
4367 
4368  /* "PyClical.pyx":234
4369  * -3 4 7
4370  * """
4371  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4372  * if idx in self:
4373  * yield idx
4374  */
4375  }
4376  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4377  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4378 
4379  /* "PyClical.pyx":227
4380  * return self.instance.getitem(idx)
4381  *
4382  * def __iter__(self): # <<<<<<<<<<<<<<
4383  * """
4384  * Iterate over the indices of an index_set.
4385  */
4386 
4387  /* function exit code */
4388  PyErr_SetNone(PyExc_StopIteration);
4389  goto __pyx_L0;
4390  __pyx_L1_error:;
4391  __Pyx_XDECREF(__pyx_t_1);
4392  __Pyx_XDECREF(__pyx_t_2);
4393  __Pyx_XDECREF(__pyx_t_3);
4394  __Pyx_XDECREF(__pyx_t_4);
4395  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4396  __pyx_L0:;
4397  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4398  #if !CYTHON_USE_EXC_INFO_STACK
4399  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4400  #endif
4401  __pyx_generator->resume_label = -1;
4402  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4403  __Pyx_RefNannyFinishContext();
4404  return __pyx_r;
4405 }
4406 
4407 /* "PyClical.pyx":238
4408  * yield idx
4409  *
4410  * def __invert__(self): # <<<<<<<<<<<<<<
4411  * """
4412  * Set complement: not.
4413  */
4414 
4415 /* Python wrapper */
4416 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4417 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 ";
4418 #if CYTHON_COMPILING_IN_CPYTHON
4419 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4420 #endif
4421 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4422  PyObject *__pyx_r = 0;
4423  __Pyx_RefNannyDeclarations
4424  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4425  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4426 
4427  /* function exit code */
4428  __Pyx_RefNannyFinishContext();
4429  return __pyx_r;
4430 }
4431 
4432 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4433  PyObject *__pyx_r = NULL;
4434  __Pyx_RefNannyDeclarations
4435  PyObject *__pyx_t_1 = NULL;
4436  PyObject *__pyx_t_2 = NULL;
4437  __Pyx_RefNannySetupContext("__invert__", 0);
4438 
4439  /* "PyClical.pyx":245
4440  * {-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}
4441  * """
4442  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4443  *
4444  * def __xor__(lhs, rhs):
4445  */
4446  __Pyx_XDECREF(__pyx_r);
4447  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4448  __Pyx_GOTREF(__pyx_t_1);
4449  __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, 245, __pyx_L1_error)
4450  __Pyx_GOTREF(__pyx_t_2);
4451  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4452  __pyx_r = __pyx_t_2;
4453  __pyx_t_2 = 0;
4454  goto __pyx_L0;
4455 
4456  /* "PyClical.pyx":238
4457  * yield idx
4458  *
4459  * def __invert__(self): # <<<<<<<<<<<<<<
4460  * """
4461  * Set complement: not.
4462  */
4463 
4464  /* function exit code */
4465  __pyx_L1_error:;
4466  __Pyx_XDECREF(__pyx_t_1);
4467  __Pyx_XDECREF(__pyx_t_2);
4468  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4469  __pyx_r = NULL;
4470  __pyx_L0:;
4471  __Pyx_XGIVEREF(__pyx_r);
4472  __Pyx_RefNannyFinishContext();
4473  return __pyx_r;
4474 }
4475 
4476 /* "PyClical.pyx":247
4477  * return index_set().wrap( self.instance.invert() )
4478  *
4479  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4480  * """
4481  * Symmetric set difference: exclusive or.
4482  */
4483 
4484 /* Python wrapper */
4485 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4486 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 ";
4487 #if CYTHON_COMPILING_IN_CPYTHON
4488 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4489 #endif
4490 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4491  PyObject *__pyx_r = 0;
4492  __Pyx_RefNannyDeclarations
4493  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4494  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4495 
4496  /* function exit code */
4497  __Pyx_RefNannyFinishContext();
4498  return __pyx_r;
4499 }
4500 
4501 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4502  PyObject *__pyx_r = NULL;
4503  __Pyx_RefNannyDeclarations
4504  PyObject *__pyx_t_1 = NULL;
4505  PyObject *__pyx_t_2 = NULL;
4506  __Pyx_RefNannySetupContext("__xor__", 0);
4507 
4508  /* "PyClical.pyx":256
4509  * {1}
4510  * """
4511  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4512  *
4513  * def __ixor__(self, rhs):
4514  */
4515  __Pyx_XDECREF(__pyx_r);
4516  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
4517  __Pyx_GOTREF(__pyx_t_1);
4518  __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, 256, __pyx_L1_error)
4519  __Pyx_GOTREF(__pyx_t_2);
4520  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4521  __pyx_r = __pyx_t_2;
4522  __pyx_t_2 = 0;
4523  goto __pyx_L0;
4524 
4525  /* "PyClical.pyx":247
4526  * return index_set().wrap( self.instance.invert() )
4527  *
4528  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4529  * """
4530  * Symmetric set difference: exclusive or.
4531  */
4532 
4533  /* function exit code */
4534  __pyx_L1_error:;
4535  __Pyx_XDECREF(__pyx_t_1);
4536  __Pyx_XDECREF(__pyx_t_2);
4537  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4538  __pyx_r = NULL;
4539  __pyx_L0:;
4540  __Pyx_XGIVEREF(__pyx_r);
4541  __Pyx_RefNannyFinishContext();
4542  return __pyx_r;
4543 }
4544 
4545 /* "PyClical.pyx":258
4546  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4547  *
4548  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4549  * """
4550  * Symmetric set difference: exclusive or.
4551  */
4552 
4553 /* Python wrapper */
4554 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4555 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 ";
4556 #if CYTHON_COMPILING_IN_CPYTHON
4557 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4558 #endif
4559 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4560  PyObject *__pyx_r = 0;
4561  __Pyx_RefNannyDeclarations
4562  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4563  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4564 
4565  /* function exit code */
4566  __Pyx_RefNannyFinishContext();
4567  return __pyx_r;
4568 }
4569 
4570 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4571  PyObject *__pyx_r = NULL;
4572  __Pyx_RefNannyDeclarations
4573  PyObject *__pyx_t_1 = NULL;
4574  __Pyx_RefNannySetupContext("__ixor__", 0);
4575 
4576  /* "PyClical.pyx":267
4577  * {1}
4578  * """
4579  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4580  *
4581  * def __and__(lhs, rhs):
4582  */
4583  __Pyx_XDECREF(__pyx_r);
4584  __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, 267, __pyx_L1_error)
4585  __Pyx_GOTREF(__pyx_t_1);
4586  __pyx_r = __pyx_t_1;
4587  __pyx_t_1 = 0;
4588  goto __pyx_L0;
4589 
4590  /* "PyClical.pyx":258
4591  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4592  *
4593  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4594  * """
4595  * Symmetric set difference: exclusive or.
4596  */
4597 
4598  /* function exit code */
4599  __pyx_L1_error:;
4600  __Pyx_XDECREF(__pyx_t_1);
4601  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4602  __pyx_r = NULL;
4603  __pyx_L0:;
4604  __Pyx_XGIVEREF(__pyx_r);
4605  __Pyx_RefNannyFinishContext();
4606  return __pyx_r;
4607 }
4608 
4609 /* "PyClical.pyx":269
4610  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4611  *
4612  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4613  * """
4614  * Set intersection: and.
4615  */
4616 
4617 /* Python wrapper */
4618 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4619 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 ";
4620 #if CYTHON_COMPILING_IN_CPYTHON
4621 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4622 #endif
4623 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4624  PyObject *__pyx_r = 0;
4625  __Pyx_RefNannyDeclarations
4626  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4627  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4628 
4629  /* function exit code */
4630  __Pyx_RefNannyFinishContext();
4631  return __pyx_r;
4632 }
4633 
4634 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4635  PyObject *__pyx_r = NULL;
4636  __Pyx_RefNannyDeclarations
4637  PyObject *__pyx_t_1 = NULL;
4638  PyObject *__pyx_t_2 = NULL;
4639  __Pyx_RefNannySetupContext("__and__", 0);
4640 
4641  /* "PyClical.pyx":278
4642  * {2}
4643  * """
4644  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4645  *
4646  * def __iand__(self, rhs):
4647  */
4648  __Pyx_XDECREF(__pyx_r);
4649  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
4650  __Pyx_GOTREF(__pyx_t_1);
4651  __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, 278, __pyx_L1_error)
4652  __Pyx_GOTREF(__pyx_t_2);
4653  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4654  __pyx_r = __pyx_t_2;
4655  __pyx_t_2 = 0;
4656  goto __pyx_L0;
4657 
4658  /* "PyClical.pyx":269
4659  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4660  *
4661  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4662  * """
4663  * Set intersection: and.
4664  */
4665 
4666  /* function exit code */
4667  __pyx_L1_error:;
4668  __Pyx_XDECREF(__pyx_t_1);
4669  __Pyx_XDECREF(__pyx_t_2);
4670  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4671  __pyx_r = NULL;
4672  __pyx_L0:;
4673  __Pyx_XGIVEREF(__pyx_r);
4674  __Pyx_RefNannyFinishContext();
4675  return __pyx_r;
4676 }
4677 
4678 /* "PyClical.pyx":280
4679  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4680  *
4681  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4682  * """
4683  * Set intersection: and.
4684  */
4685 
4686 /* Python wrapper */
4687 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4688 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 ";
4689 #if CYTHON_COMPILING_IN_CPYTHON
4690 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4691 #endif
4692 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4693  PyObject *__pyx_r = 0;
4694  __Pyx_RefNannyDeclarations
4695  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4696  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4697 
4698  /* function exit code */
4699  __Pyx_RefNannyFinishContext();
4700  return __pyx_r;
4701 }
4702 
4703 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4704  PyObject *__pyx_r = NULL;
4705  __Pyx_RefNannyDeclarations
4706  PyObject *__pyx_t_1 = NULL;
4707  __Pyx_RefNannySetupContext("__iand__", 0);
4708 
4709  /* "PyClical.pyx":289
4710  * {2}
4711  * """
4712  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4713  *
4714  * def __or__(lhs, rhs):
4715  */
4716  __Pyx_XDECREF(__pyx_r);
4717  __pyx_t_1 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self) & __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
4718  __Pyx_GOTREF(__pyx_t_1);
4719  __pyx_r = __pyx_t_1;
4720  __pyx_t_1 = 0;
4721  goto __pyx_L0;
4722 
4723  /* "PyClical.pyx":280
4724  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4725  *
4726  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4727  * """
4728  * Set intersection: and.
4729  */
4730 
4731  /* function exit code */
4732  __pyx_L1_error:;
4733  __Pyx_XDECREF(__pyx_t_1);
4734  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4735  __pyx_r = NULL;
4736  __pyx_L0:;
4737  __Pyx_XGIVEREF(__pyx_r);
4738  __Pyx_RefNannyFinishContext();
4739  return __pyx_r;
4740 }
4741 
4742 /* "PyClical.pyx":291
4743  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4744  *
4745  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4746  * """
4747  * Set union: or.
4748  */
4749 
4750 /* Python wrapper */
4751 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4752 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 ";
4753 #if CYTHON_COMPILING_IN_CPYTHON
4754 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4755 #endif
4756 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4757  PyObject *__pyx_r = 0;
4758  __Pyx_RefNannyDeclarations
4759  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4760  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4761 
4762  /* function exit code */
4763  __Pyx_RefNannyFinishContext();
4764  return __pyx_r;
4765 }
4766 
4767 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4768  PyObject *__pyx_r = NULL;
4769  __Pyx_RefNannyDeclarations
4770  PyObject *__pyx_t_1 = NULL;
4771  PyObject *__pyx_t_2 = NULL;
4772  __Pyx_RefNannySetupContext("__or__", 0);
4773 
4774  /* "PyClical.pyx":300
4775  * {1,2}
4776  * """
4777  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4778  *
4779  * def __ior__(self, rhs):
4780  */
4781  __Pyx_XDECREF(__pyx_r);
4782  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
4783  __Pyx_GOTREF(__pyx_t_1);
4784  __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, 300, __pyx_L1_error)
4785  __Pyx_GOTREF(__pyx_t_2);
4786  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4787  __pyx_r = __pyx_t_2;
4788  __pyx_t_2 = 0;
4789  goto __pyx_L0;
4790 
4791  /* "PyClical.pyx":291
4792  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4793  *
4794  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4795  * """
4796  * Set union: or.
4797  */
4798 
4799  /* function exit code */
4800  __pyx_L1_error:;
4801  __Pyx_XDECREF(__pyx_t_1);
4802  __Pyx_XDECREF(__pyx_t_2);
4803  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4804  __pyx_r = NULL;
4805  __pyx_L0:;
4806  __Pyx_XGIVEREF(__pyx_r);
4807  __Pyx_RefNannyFinishContext();
4808  return __pyx_r;
4809 }
4810 
4811 /* "PyClical.pyx":302
4812  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4813  *
4814  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4815  * """
4816  * Set union: or.
4817  */
4818 
4819 /* Python wrapper */
4820 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4821 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 ";
4822 #if CYTHON_COMPILING_IN_CPYTHON
4823 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4824 #endif
4825 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4826  PyObject *__pyx_r = 0;
4827  __Pyx_RefNannyDeclarations
4828  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4829  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4830 
4831  /* function exit code */
4832  __Pyx_RefNannyFinishContext();
4833  return __pyx_r;
4834 }
4835 
4836 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4837  PyObject *__pyx_r = NULL;
4838  __Pyx_RefNannyDeclarations
4839  PyObject *__pyx_t_1 = NULL;
4840  __Pyx_RefNannySetupContext("__ior__", 0);
4841 
4842  /* "PyClical.pyx":311
4843  * {1,2}
4844  * """
4845  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4846  *
4847  * def count(self):
4848  */
4849  __Pyx_XDECREF(__pyx_r);
4850  __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, 311, __pyx_L1_error)
4851  __Pyx_GOTREF(__pyx_t_1);
4852  __pyx_r = __pyx_t_1;
4853  __pyx_t_1 = 0;
4854  goto __pyx_L0;
4855 
4856  /* "PyClical.pyx":302
4857  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4858  *
4859  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4860  * """
4861  * Set union: or.
4862  */
4863 
4864  /* function exit code */
4865  __pyx_L1_error:;
4866  __Pyx_XDECREF(__pyx_t_1);
4867  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4868  __pyx_r = NULL;
4869  __pyx_L0:;
4870  __Pyx_XGIVEREF(__pyx_r);
4871  __Pyx_RefNannyFinishContext();
4872  return __pyx_r;
4873 }
4874 
4875 /* "PyClical.pyx":313
4876  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4877  *
4878  * def count(self): # <<<<<<<<<<<<<<
4879  * """
4880  * Cardinality: Number of indices included in set.
4881  */
4882 
4883 /* Python wrapper */
4884 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4885 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 ";
4886 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4887  PyObject *__pyx_r = 0;
4888  __Pyx_RefNannyDeclarations
4889  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4890  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4891 
4892  /* function exit code */
4893  __Pyx_RefNannyFinishContext();
4894  return __pyx_r;
4895 }
4896 
4897 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4898  PyObject *__pyx_r = NULL;
4899  __Pyx_RefNannyDeclarations
4900  PyObject *__pyx_t_1 = NULL;
4901  __Pyx_RefNannySetupContext("count", 0);
4902 
4903  /* "PyClical.pyx":320
4904  * 3
4905  * """
4906  * return self.instance.count() # <<<<<<<<<<<<<<
4907  *
4908  * def count_neg(self):
4909  */
4910  __Pyx_XDECREF(__pyx_r);
4911  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4912  __Pyx_GOTREF(__pyx_t_1);
4913  __pyx_r = __pyx_t_1;
4914  __pyx_t_1 = 0;
4915  goto __pyx_L0;
4916 
4917  /* "PyClical.pyx":313
4918  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4919  *
4920  * def count(self): # <<<<<<<<<<<<<<
4921  * """
4922  * Cardinality: Number of indices included in set.
4923  */
4924 
4925  /* function exit code */
4926  __pyx_L1_error:;
4927  __Pyx_XDECREF(__pyx_t_1);
4928  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4929  __pyx_r = NULL;
4930  __pyx_L0:;
4931  __Pyx_XGIVEREF(__pyx_r);
4932  __Pyx_RefNannyFinishContext();
4933  return __pyx_r;
4934 }
4935 
4936 /* "PyClical.pyx":322
4937  * return self.instance.count()
4938  *
4939  * def count_neg(self): # <<<<<<<<<<<<<<
4940  * """
4941  * Number of negative indices included in set.
4942  */
4943 
4944 /* Python wrapper */
4945 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4946 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 ";
4947 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4948  PyObject *__pyx_r = 0;
4949  __Pyx_RefNannyDeclarations
4950  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4951  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4952 
4953  /* function exit code */
4954  __Pyx_RefNannyFinishContext();
4955  return __pyx_r;
4956 }
4957 
4958 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4959  PyObject *__pyx_r = NULL;
4960  __Pyx_RefNannyDeclarations
4961  PyObject *__pyx_t_1 = NULL;
4962  __Pyx_RefNannySetupContext("count_neg", 0);
4963 
4964  /* "PyClical.pyx":329
4965  * 1
4966  * """
4967  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4968  *
4969  * def count_pos(self):
4970  */
4971  __Pyx_XDECREF(__pyx_r);
4972  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_neg()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
4973  __Pyx_GOTREF(__pyx_t_1);
4974  __pyx_r = __pyx_t_1;
4975  __pyx_t_1 = 0;
4976  goto __pyx_L0;
4977 
4978  /* "PyClical.pyx":322
4979  * return self.instance.count()
4980  *
4981  * def count_neg(self): # <<<<<<<<<<<<<<
4982  * """
4983  * Number of negative indices included in set.
4984  */
4985 
4986  /* function exit code */
4987  __pyx_L1_error:;
4988  __Pyx_XDECREF(__pyx_t_1);
4989  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4990  __pyx_r = NULL;
4991  __pyx_L0:;
4992  __Pyx_XGIVEREF(__pyx_r);
4993  __Pyx_RefNannyFinishContext();
4994  return __pyx_r;
4995 }
4996 
4997 /* "PyClical.pyx":331
4998  * return self.instance.count_neg()
4999  *
5000  * def count_pos(self): # <<<<<<<<<<<<<<
5001  * """
5002  * Number of positive indices included in set.
5003  */
5004 
5005 /* Python wrapper */
5006 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5007 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 ";
5008 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5009  PyObject *__pyx_r = 0;
5010  __Pyx_RefNannyDeclarations
5011  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5012  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5013 
5014  /* function exit code */
5015  __Pyx_RefNannyFinishContext();
5016  return __pyx_r;
5017 }
5018 
5019 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5020  PyObject *__pyx_r = NULL;
5021  __Pyx_RefNannyDeclarations
5022  PyObject *__pyx_t_1 = NULL;
5023  __Pyx_RefNannySetupContext("count_pos", 0);
5024 
5025  /* "PyClical.pyx":338
5026  * 2
5027  * """
5028  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5029  *
5030  * def min(self):
5031  */
5032  __Pyx_XDECREF(__pyx_r);
5033  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_pos()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
5034  __Pyx_GOTREF(__pyx_t_1);
5035  __pyx_r = __pyx_t_1;
5036  __pyx_t_1 = 0;
5037  goto __pyx_L0;
5038 
5039  /* "PyClical.pyx":331
5040  * return self.instance.count_neg()
5041  *
5042  * def count_pos(self): # <<<<<<<<<<<<<<
5043  * """
5044  * Number of positive indices included in set.
5045  */
5046 
5047  /* function exit code */
5048  __pyx_L1_error:;
5049  __Pyx_XDECREF(__pyx_t_1);
5050  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5051  __pyx_r = NULL;
5052  __pyx_L0:;
5053  __Pyx_XGIVEREF(__pyx_r);
5054  __Pyx_RefNannyFinishContext();
5055  return __pyx_r;
5056 }
5057 
5058 /* "PyClical.pyx":340
5059  * return self.instance.count_pos()
5060  *
5061  * def min(self): # <<<<<<<<<<<<<<
5062  * """
5063  * Minimum member.
5064  */
5065 
5066 /* Python wrapper */
5067 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5068 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5069 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5070  PyObject *__pyx_r = 0;
5071  __Pyx_RefNannyDeclarations
5072  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5073  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5074 
5075  /* function exit code */
5076  __Pyx_RefNannyFinishContext();
5077  return __pyx_r;
5078 }
5079 
5080 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5081  PyObject *__pyx_r = NULL;
5082  __Pyx_RefNannyDeclarations
5083  PyObject *__pyx_t_1 = NULL;
5084  __Pyx_RefNannySetupContext("min", 0);
5085 
5086  /* "PyClical.pyx":347
5087  * -1
5088  * """
5089  * return self.instance.min() # <<<<<<<<<<<<<<
5090  *
5091  * def max(self):
5092  */
5093  __Pyx_XDECREF(__pyx_r);
5094  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5095  __Pyx_GOTREF(__pyx_t_1);
5096  __pyx_r = __pyx_t_1;
5097  __pyx_t_1 = 0;
5098  goto __pyx_L0;
5099 
5100  /* "PyClical.pyx":340
5101  * return self.instance.count_pos()
5102  *
5103  * def min(self): # <<<<<<<<<<<<<<
5104  * """
5105  * Minimum member.
5106  */
5107 
5108  /* function exit code */
5109  __pyx_L1_error:;
5110  __Pyx_XDECREF(__pyx_t_1);
5111  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5112  __pyx_r = NULL;
5113  __pyx_L0:;
5114  __Pyx_XGIVEREF(__pyx_r);
5115  __Pyx_RefNannyFinishContext();
5116  return __pyx_r;
5117 }
5118 
5119 /* "PyClical.pyx":349
5120  * return self.instance.min()
5121  *
5122  * def max(self): # <<<<<<<<<<<<<<
5123  * """
5124  * Maximum member.
5125  */
5126 
5127 /* Python wrapper */
5128 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5129 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5130 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5131  PyObject *__pyx_r = 0;
5132  __Pyx_RefNannyDeclarations
5133  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5134  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5135 
5136  /* function exit code */
5137  __Pyx_RefNannyFinishContext();
5138  return __pyx_r;
5139 }
5140 
5141 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5142  PyObject *__pyx_r = NULL;
5143  __Pyx_RefNannyDeclarations
5144  PyObject *__pyx_t_1 = NULL;
5145  __Pyx_RefNannySetupContext("max", 0);
5146 
5147  /* "PyClical.pyx":356
5148  * 2
5149  * """
5150  * return self.instance.max() # <<<<<<<<<<<<<<
5151  *
5152  * def hash_fn(self):
5153  */
5154  __Pyx_XDECREF(__pyx_r);
5155  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5156  __Pyx_GOTREF(__pyx_t_1);
5157  __pyx_r = __pyx_t_1;
5158  __pyx_t_1 = 0;
5159  goto __pyx_L0;
5160 
5161  /* "PyClical.pyx":349
5162  * return self.instance.min()
5163  *
5164  * def max(self): # <<<<<<<<<<<<<<
5165  * """
5166  * Maximum member.
5167  */
5168 
5169  /* function exit code */
5170  __pyx_L1_error:;
5171  __Pyx_XDECREF(__pyx_t_1);
5172  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5173  __pyx_r = NULL;
5174  __pyx_L0:;
5175  __Pyx_XGIVEREF(__pyx_r);
5176  __Pyx_RefNannyFinishContext();
5177  return __pyx_r;
5178 }
5179 
5180 /* "PyClical.pyx":358
5181  * return self.instance.max()
5182  *
5183  * def hash_fn(self): # <<<<<<<<<<<<<<
5184  * """
5185  * Hash function.
5186  */
5187 
5188 /* Python wrapper */
5189 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5190 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5191 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5192  PyObject *__pyx_r = 0;
5193  __Pyx_RefNannyDeclarations
5194  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5195  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5196 
5197  /* function exit code */
5198  __Pyx_RefNannyFinishContext();
5199  return __pyx_r;
5200 }
5201 
5202 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5203  PyObject *__pyx_r = NULL;
5204  __Pyx_RefNannyDeclarations
5205  PyObject *__pyx_t_1 = NULL;
5206  __Pyx_RefNannySetupContext("hash_fn", 0);
5207 
5208  /* "PyClical.pyx":362
5209  * Hash function.
5210  * """
5211  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5212  *
5213  * def sign_of_mult(self, rhs):
5214  */
5215  __Pyx_XDECREF(__pyx_r);
5216  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->hash_fn()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
5217  __Pyx_GOTREF(__pyx_t_1);
5218  __pyx_r = __pyx_t_1;
5219  __pyx_t_1 = 0;
5220  goto __pyx_L0;
5221 
5222  /* "PyClical.pyx":358
5223  * return self.instance.max()
5224  *
5225  * def hash_fn(self): # <<<<<<<<<<<<<<
5226  * """
5227  * Hash function.
5228  */
5229 
5230  /* function exit code */
5231  __pyx_L1_error:;
5232  __Pyx_XDECREF(__pyx_t_1);
5233  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5234  __pyx_r = NULL;
5235  __pyx_L0:;
5236  __Pyx_XGIVEREF(__pyx_r);
5237  __Pyx_RefNannyFinishContext();
5238  return __pyx_r;
5239 }
5240 
5241 /* "PyClical.pyx":364
5242  * return self.instance.hash_fn()
5243  *
5244  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5245  * """
5246  * Sign of geometric product of two Clifford basis elements.
5247  */
5248 
5249 /* Python wrapper */
5250 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5251 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 ";
5252 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5253  PyObject *__pyx_r = 0;
5254  __Pyx_RefNannyDeclarations
5255  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5256  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5257 
5258  /* function exit code */
5259  __Pyx_RefNannyFinishContext();
5260  return __pyx_r;
5261 }
5262 
5263 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5264  PyObject *__pyx_r = NULL;
5265  __Pyx_RefNannyDeclarations
5266  PyObject *__pyx_t_1 = NULL;
5267  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5268 
5269  /* "PyClical.pyx":371
5270  * 1
5271  * """
5272  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5273  *
5274  * def sign_of_square(self):
5275  */
5276  __Pyx_XDECREF(__pyx_r);
5277  __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, 371, __pyx_L1_error)
5278  __Pyx_GOTREF(__pyx_t_1);
5279  __pyx_r = __pyx_t_1;
5280  __pyx_t_1 = 0;
5281  goto __pyx_L0;
5282 
5283  /* "PyClical.pyx":364
5284  * return self.instance.hash_fn()
5285  *
5286  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5287  * """
5288  * Sign of geometric product of two Clifford basis elements.
5289  */
5290 
5291  /* function exit code */
5292  __pyx_L1_error:;
5293  __Pyx_XDECREF(__pyx_t_1);
5294  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5295  __pyx_r = NULL;
5296  __pyx_L0:;
5297  __Pyx_XGIVEREF(__pyx_r);
5298  __Pyx_RefNannyFinishContext();
5299  return __pyx_r;
5300 }
5301 
5302 /* "PyClical.pyx":373
5303  * return self.instance.sign_of_mult(toIndexSet(rhs))
5304  *
5305  * def sign_of_square(self): # <<<<<<<<<<<<<<
5306  * """
5307  * Sign of geometric square of a Clifford basis element.
5308  */
5309 
5310 /* Python wrapper */
5311 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5312 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 ";
5313 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5314  PyObject *__pyx_r = 0;
5315  __Pyx_RefNannyDeclarations
5316  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5317  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5318 
5319  /* function exit code */
5320  __Pyx_RefNannyFinishContext();
5321  return __pyx_r;
5322 }
5323 
5324 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5325  PyObject *__pyx_r = NULL;
5326  __Pyx_RefNannyDeclarations
5327  PyObject *__pyx_t_1 = NULL;
5328  __Pyx_RefNannySetupContext("sign_of_square", 0);
5329 
5330  /* "PyClical.pyx":380
5331  * -1
5332  * """
5333  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5334  *
5335  * def __repr__(self):
5336  */
5337  __Pyx_XDECREF(__pyx_r);
5338  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_square()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
5339  __Pyx_GOTREF(__pyx_t_1);
5340  __pyx_r = __pyx_t_1;
5341  __pyx_t_1 = 0;
5342  goto __pyx_L0;
5343 
5344  /* "PyClical.pyx":373
5345  * return self.instance.sign_of_mult(toIndexSet(rhs))
5346  *
5347  * def sign_of_square(self): # <<<<<<<<<<<<<<
5348  * """
5349  * Sign of geometric square of a Clifford basis element.
5350  */
5351 
5352  /* function exit code */
5353  __pyx_L1_error:;
5354  __Pyx_XDECREF(__pyx_t_1);
5355  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5356  __pyx_r = NULL;
5357  __pyx_L0:;
5358  __Pyx_XGIVEREF(__pyx_r);
5359  __Pyx_RefNannyFinishContext();
5360  return __pyx_r;
5361 }
5362 
5363 /* "PyClical.pyx":382
5364  * return self.instance.sign_of_square()
5365  *
5366  * def __repr__(self): # <<<<<<<<<<<<<<
5367  * """
5368  * The official string representation of self.
5369  */
5370 
5371 /* Python wrapper */
5372 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5373 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 ";
5374 #if CYTHON_COMPILING_IN_CPYTHON
5375 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5376 #endif
5377 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5378  PyObject *__pyx_r = 0;
5379  __Pyx_RefNannyDeclarations
5380  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5381  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5382 
5383  /* function exit code */
5384  __Pyx_RefNannyFinishContext();
5385  return __pyx_r;
5386 }
5387 
5388 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5389  PyObject *__pyx_r = NULL;
5390  __Pyx_RefNannyDeclarations
5391  PyObject *__pyx_t_1 = NULL;
5392  __Pyx_RefNannySetupContext("__repr__", 0);
5393 
5394  /* "PyClical.pyx":391
5395  * 'index_set({1,2})'
5396  * """
5397  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5398  *
5399  * def __str__(self):
5400  */
5401  __Pyx_XDECREF(__pyx_r);
5402  __pyx_t_1 = __Pyx_PyBytes_FromString(index_set_to_repr(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
5403  __Pyx_GOTREF(__pyx_t_1);
5404  __pyx_r = __pyx_t_1;
5405  __pyx_t_1 = 0;
5406  goto __pyx_L0;
5407 
5408  /* "PyClical.pyx":382
5409  * return self.instance.sign_of_square()
5410  *
5411  * def __repr__(self): # <<<<<<<<<<<<<<
5412  * """
5413  * The official string representation of self.
5414  */
5415 
5416  /* function exit code */
5417  __pyx_L1_error:;
5418  __Pyx_XDECREF(__pyx_t_1);
5419  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5420  __pyx_r = NULL;
5421  __pyx_L0:;
5422  __Pyx_XGIVEREF(__pyx_r);
5423  __Pyx_RefNannyFinishContext();
5424  return __pyx_r;
5425 }
5426 
5427 /* "PyClical.pyx":393
5428  * return index_set_to_repr( self.unwrap() ).c_str()
5429  *
5430  * def __str__(self): # <<<<<<<<<<<<<<
5431  * """
5432  * The informal string representation of self.
5433  */
5434 
5435 /* Python wrapper */
5436 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5437 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 ";
5438 #if CYTHON_COMPILING_IN_CPYTHON
5439 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5440 #endif
5441 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5442  PyObject *__pyx_r = 0;
5443  __Pyx_RefNannyDeclarations
5444  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5445  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5446 
5447  /* function exit code */
5448  __Pyx_RefNannyFinishContext();
5449  return __pyx_r;
5450 }
5451 
5452 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5453  PyObject *__pyx_r = NULL;
5454  __Pyx_RefNannyDeclarations
5455  PyObject *__pyx_t_1 = NULL;
5456  __Pyx_RefNannySetupContext("__str__", 0);
5457 
5458  /* "PyClical.pyx":402
5459  * '{1,2}'
5460  * """
5461  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5462  *
5463  * def index_set_hidden_doctests():
5464  */
5465  __Pyx_XDECREF(__pyx_r);
5466  __pyx_t_1 = __Pyx_PyBytes_FromString(index_set_to_str(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
5467  __Pyx_GOTREF(__pyx_t_1);
5468  __pyx_r = __pyx_t_1;
5469  __pyx_t_1 = 0;
5470  goto __pyx_L0;
5471 
5472  /* "PyClical.pyx":393
5473  * return index_set_to_repr( self.unwrap() ).c_str()
5474  *
5475  * def __str__(self): # <<<<<<<<<<<<<<
5476  * """
5477  * The informal string representation of self.
5478  */
5479 
5480  /* function exit code */
5481  __pyx_L1_error:;
5482  __Pyx_XDECREF(__pyx_t_1);
5483  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5484  __pyx_r = NULL;
5485  __pyx_L0:;
5486  __Pyx_XGIVEREF(__pyx_r);
5487  __Pyx_RefNannyFinishContext();
5488  return __pyx_r;
5489 }
5490 
5491 /* "(tree fragment)":1
5492  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5493  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5494  * def __setstate_cython__(self, __pyx_state):
5495  */
5496 
5497 /* Python wrapper */
5498 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5499 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5500  PyObject *__pyx_r = 0;
5501  __Pyx_RefNannyDeclarations
5502  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5503  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5504 
5505  /* function exit code */
5506  __Pyx_RefNannyFinishContext();
5507  return __pyx_r;
5508 }
5509 
5510 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5511  PyObject *__pyx_r = NULL;
5512  __Pyx_RefNannyDeclarations
5513  PyObject *__pyx_t_1 = NULL;
5514  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5515 
5516  /* "(tree fragment)":2
5517  * def __reduce_cython__(self):
5518  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5519  * def __setstate_cython__(self, __pyx_state):
5520  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5521  */
5522  __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)
5523  __Pyx_GOTREF(__pyx_t_1);
5524  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5525  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5526  __PYX_ERR(1, 2, __pyx_L1_error)
5527 
5528  /* "(tree fragment)":1
5529  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5530  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5531  * def __setstate_cython__(self, __pyx_state):
5532  */
5533 
5534  /* function exit code */
5535  __pyx_L1_error:;
5536  __Pyx_XDECREF(__pyx_t_1);
5537  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5538  __pyx_r = NULL;
5539  __Pyx_XGIVEREF(__pyx_r);
5540  __Pyx_RefNannyFinishContext();
5541  return __pyx_r;
5542 }
5543 
5544 /* "(tree fragment)":3
5545  * def __reduce_cython__(self):
5546  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5547  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5548  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5549  */
5550 
5551 /* Python wrapper */
5552 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5553 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5554  PyObject *__pyx_r = 0;
5555  __Pyx_RefNannyDeclarations
5556  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5557  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5558 
5559  /* function exit code */
5560  __Pyx_RefNannyFinishContext();
5561  return __pyx_r;
5562 }
5563 
5564 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) {
5565  PyObject *__pyx_r = NULL;
5566  __Pyx_RefNannyDeclarations
5567  PyObject *__pyx_t_1 = NULL;
5568  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5569 
5570  /* "(tree fragment)":4
5571  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5572  * def __setstate_cython__(self, __pyx_state):
5573  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5574  */
5575  __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)
5576  __Pyx_GOTREF(__pyx_t_1);
5577  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5578  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5579  __PYX_ERR(1, 4, __pyx_L1_error)
5580 
5581  /* "(tree fragment)":3
5582  * def __reduce_cython__(self):
5583  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5584  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5585  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5586  */
5587 
5588  /* function exit code */
5589  __pyx_L1_error:;
5590  __Pyx_XDECREF(__pyx_t_1);
5591  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5592  __pyx_r = NULL;
5593  __Pyx_XGIVEREF(__pyx_r);
5594  __Pyx_RefNannyFinishContext();
5595  return __pyx_r;
5596 }
5597 
5598 /* "PyClical.pyx":404
5599  * return index_set_to_str( self.unwrap() ).c_str()
5600  *
5601  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5602  * """
5603  * Tests for functions that Doctest cannot see.
5604  */
5605 
5606 /* Python wrapper */
5607 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5608 static char __pyx_doc_8PyClical_index_set_hidden_doctests[] = "\n Tests for functions that Doctest cannot see.\n\n For index_set.__cinit__: Construct index_set.\n\n >>> print index_set(1)\n {1}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set(index_set({1,2}))\n {1,2}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set(\"\")\n {}\n >>> print index_set(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{'.\n >>> print index_set(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1'.\n >>> print index_set(\"{1,2,100}\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1,2,100}'.\n >>> print index_set({1,2,100})\n Traceback (most recent call last):\n ...\n IndexError: Cannot initialize index_set object from invalid set([1, 2, 100]).\n >>> print index_set([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <type 'list'>.\n\n For index_set.__richcmp__: Compare two objects of class index_set.\n\n >>> index_set(1) == index_set({1})\n True\n >>> index_set({1}) != index_set({1})\n False\n >>> index_set({1}) != index_set({2})\n True\n >>> index_set({1}) == index_set({2})\n False\n >>> index_set({1}) < index_set({2})\n True\n >>> index_set({1}) <= index_set({2})\n True\n >>> index_set({1}) > index_set({2})\n False\n >>> index_set({1}) >= index_set({2})\n False\n >>> None == index_set({1,2})\n False\n >>> None != index_set({1,2})\n True\n >>> None < index_set({1,2})\n False\n >>> None <= index_set({1,2})\n False\n >>> None > index_set({1,2})\n False\n >>> None >= index_set({1,2})\n False\n >>> index_se""t({1,2}) == None\n False\n >>> index_set({1,2}) != None\n True\n >>> index_set({1,2}) < None\n False\n >>> index_set({1,2}) <= None\n False\n >>> index_set({1,2}) > None\n False\n >>> index_set({1,2}) >= None\n False\n ";
5609  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};
5610  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5611  PyObject *__pyx_r = 0;
5612  __Pyx_RefNannyDeclarations
5613  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5614  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5615 
5616  /* function exit code */
5617  __Pyx_RefNannyFinishContext();
5618  return __pyx_r;
5619  }
5620 
5621  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5622  PyObject *__pyx_r = NULL;
5623  __Pyx_RefNannyDeclarations
5624  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5625 
5626  /* "PyClical.pyx":488
5627  * False
5628  * """
5629  * return # <<<<<<<<<<<<<<
5630  *
5631  * cpdef inline compare(lhs,rhs):
5632  */
5633  __Pyx_XDECREF(__pyx_r);
5634  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5635  goto __pyx_L0;
5636 
5637  /* "PyClical.pyx":404
5638  * return index_set_to_str( self.unwrap() ).c_str()
5639  *
5640  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5641  * """
5642  * Tests for functions that Doctest cannot see.
5643  */
5644 
5645  /* function exit code */
5646  __pyx_L0:;
5647  __Pyx_XGIVEREF(__pyx_r);
5648  __Pyx_RefNannyFinishContext();
5649  return __pyx_r;
5650  }
5651 
5652  /* "PyClical.pyx":490
5653  * return
5654  *
5655  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5656  * """
5657  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5658  */
5659 
5660  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5661  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5662  PyObject *__pyx_r = NULL;
5663  __Pyx_RefNannyDeclarations
5664  PyObject *__pyx_t_1 = NULL;
5665  __Pyx_RefNannySetupContext("compare", 0);
5666 
5667  /* "PyClical.pyx":500
5668  * 1
5669  * """
5670  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5671  *
5672  * cpdef inline min_neg(obj):
5673  */
5674  __Pyx_XDECREF(__pyx_r);
5675  __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, 500, __pyx_L1_error)
5676  __Pyx_GOTREF(__pyx_t_1);
5677  __pyx_r = __pyx_t_1;
5678  __pyx_t_1 = 0;
5679  goto __pyx_L0;
5680 
5681  /* "PyClical.pyx":490
5682  * return
5683  *
5684  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5685  * """
5686  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5687  */
5688 
5689  /* function exit code */
5690  __pyx_L1_error:;
5691  __Pyx_XDECREF(__pyx_t_1);
5692  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5693  __pyx_r = 0;
5694  __pyx_L0:;
5695  __Pyx_XGIVEREF(__pyx_r);
5696  __Pyx_RefNannyFinishContext();
5697  return __pyx_r;
5698  }
5699 
5700  /* Python wrapper */
5701  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5702  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 ";
5703  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5704  PyObject *__pyx_v_lhs = 0;
5705  PyObject *__pyx_v_rhs = 0;
5706  PyObject *__pyx_r = 0;
5707  __Pyx_RefNannyDeclarations
5708  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5709  {
5710  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5711  PyObject* values[2] = {0,0};
5712  if (unlikely(__pyx_kwds)) {
5713  Py_ssize_t kw_args;
5714  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5715  switch (pos_args) {
5716  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5717  CYTHON_FALLTHROUGH;
5718  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5719  CYTHON_FALLTHROUGH;
5720  case 0: break;
5721  default: goto __pyx_L5_argtuple_error;
5722  }
5723  kw_args = PyDict_Size(__pyx_kwds);
5724  switch (pos_args) {
5725  case 0:
5726  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5727  else goto __pyx_L5_argtuple_error;
5728  CYTHON_FALLTHROUGH;
5729  case 1:
5730  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5731  else {
5732  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5733  }
5734  }
5735  if (unlikely(kw_args > 0)) {
5736  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5737  }
5738  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5739  goto __pyx_L5_argtuple_error;
5740  } else {
5741  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5742  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5743  }
5744  __pyx_v_lhs = values[0];
5745  __pyx_v_rhs = values[1];
5746  }
5747  goto __pyx_L4_argument_unpacking_done;
5748  __pyx_L5_argtuple_error:;
5749  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5750  __pyx_L3_error:;
5751  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5752  __Pyx_RefNannyFinishContext();
5753  return NULL;
5754  __pyx_L4_argument_unpacking_done:;
5755  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5756 
5757  /* function exit code */
5758  __Pyx_RefNannyFinishContext();
5759  return __pyx_r;
5760  }
5761 
5762  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5763  PyObject *__pyx_r = NULL;
5764  __Pyx_RefNannyDeclarations
5765  PyObject *__pyx_t_1 = NULL;
5766  __Pyx_RefNannySetupContext("compare", 0);
5767  __Pyx_XDECREF(__pyx_r);
5768  __pyx_t_1 = __pyx_f_8PyClical_compare(__pyx_v_lhs, __pyx_v_rhs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
5769  __Pyx_GOTREF(__pyx_t_1);
5770  __pyx_r = __pyx_t_1;
5771  __pyx_t_1 = 0;
5772  goto __pyx_L0;
5773 
5774  /* function exit code */
5775  __pyx_L1_error:;
5776  __Pyx_XDECREF(__pyx_t_1);
5777  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5778  __pyx_r = NULL;
5779  __pyx_L0:;
5780  __Pyx_XGIVEREF(__pyx_r);
5781  __Pyx_RefNannyFinishContext();
5782  return __pyx_r;
5783  }
5784 
5785  /* "PyClical.pyx":502
5786  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5787  *
5788  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5789  * """
5790  * Minimum negative index, or 0 if none.
5791  */
5792 
5793  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5794  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5795  PyObject *__pyx_r = NULL;
5796  __Pyx_RefNannyDeclarations
5797  PyObject *__pyx_t_1 = NULL;
5798  __Pyx_RefNannySetupContext("min_neg", 0);
5799 
5800  /* "PyClical.pyx":509
5801  * 0
5802  * """
5803  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5804  *
5805  * cpdef inline max_pos(obj):
5806  */
5807  __Pyx_XDECREF(__pyx_r);
5808  __pyx_t_1 = __Pyx_PyInt_From_int(min_neg(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
5809  __Pyx_GOTREF(__pyx_t_1);
5810  __pyx_r = __pyx_t_1;
5811  __pyx_t_1 = 0;
5812  goto __pyx_L0;
5813 
5814  /* "PyClical.pyx":502
5815  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5816  *
5817  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5818  * """
5819  * Minimum negative index, or 0 if none.
5820  */
5821 
5822  /* function exit code */
5823  __pyx_L1_error:;
5824  __Pyx_XDECREF(__pyx_t_1);
5825  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5826  __pyx_r = 0;
5827  __pyx_L0:;
5828  __Pyx_XGIVEREF(__pyx_r);
5829  __Pyx_RefNannyFinishContext();
5830  return __pyx_r;
5831  }
5832 
5833  /* Python wrapper */
5834  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5835  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 ";
5836  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5837  PyObject *__pyx_r = 0;
5838  __Pyx_RefNannyDeclarations
5839  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5840  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5841 
5842  /* function exit code */
5843  __Pyx_RefNannyFinishContext();
5844  return __pyx_r;
5845  }
5846 
5847  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5848  PyObject *__pyx_r = NULL;
5849  __Pyx_RefNannyDeclarations
5850  PyObject *__pyx_t_1 = NULL;
5851  __Pyx_RefNannySetupContext("min_neg", 0);
5852  __Pyx_XDECREF(__pyx_r);
5853  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5854  __Pyx_GOTREF(__pyx_t_1);
5855  __pyx_r = __pyx_t_1;
5856  __pyx_t_1 = 0;
5857  goto __pyx_L0;
5858 
5859  /* function exit code */
5860  __pyx_L1_error:;
5861  __Pyx_XDECREF(__pyx_t_1);
5862  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5863  __pyx_r = NULL;
5864  __pyx_L0:;
5865  __Pyx_XGIVEREF(__pyx_r);
5866  __Pyx_RefNannyFinishContext();
5867  return __pyx_r;
5868  }
5869 
5870  /* "PyClical.pyx":511
5871  * return glucat.min_neg( toIndexSet(obj) )
5872  *
5873  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5874  * """
5875  * Maximum positive index, or 0 if none.
5876  */
5877 
5878  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5879  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5880  PyObject *__pyx_r = NULL;
5881  __Pyx_RefNannyDeclarations
5882  PyObject *__pyx_t_1 = NULL;
5883  __Pyx_RefNannySetupContext("max_pos", 0);
5884 
5885  /* "PyClical.pyx":518
5886  * 2
5887  * """
5888  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5889  *
5890  * cdef inline vector[scalar_t] list_to_vector(lst):
5891  */
5892  __Pyx_XDECREF(__pyx_r);
5893  __pyx_t_1 = __Pyx_PyInt_From_int(max_pos(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
5894  __Pyx_GOTREF(__pyx_t_1);
5895  __pyx_r = __pyx_t_1;
5896  __pyx_t_1 = 0;
5897  goto __pyx_L0;
5898 
5899  /* "PyClical.pyx":511
5900  * return glucat.min_neg( toIndexSet(obj) )
5901  *
5902  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5903  * """
5904  * Maximum positive index, or 0 if none.
5905  */
5906 
5907  /* function exit code */
5908  __pyx_L1_error:;
5909  __Pyx_XDECREF(__pyx_t_1);
5910  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5911  __pyx_r = 0;
5912  __pyx_L0:;
5913  __Pyx_XGIVEREF(__pyx_r);
5914  __Pyx_RefNannyFinishContext();
5915  return __pyx_r;
5916  }
5917 
5918  /* Python wrapper */
5919  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5920  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 ";
5921  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5922  PyObject *__pyx_r = 0;
5923  __Pyx_RefNannyDeclarations
5924  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5925  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5926 
5927  /* function exit code */
5928  __Pyx_RefNannyFinishContext();
5929  return __pyx_r;
5930  }
5931 
5932  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5933  PyObject *__pyx_r = NULL;
5934  __Pyx_RefNannyDeclarations
5935  PyObject *__pyx_t_1 = NULL;
5936  __Pyx_RefNannySetupContext("max_pos", 0);
5937  __Pyx_XDECREF(__pyx_r);
5938  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5939  __Pyx_GOTREF(__pyx_t_1);
5940  __pyx_r = __pyx_t_1;
5941  __pyx_t_1 = 0;
5942  goto __pyx_L0;
5943 
5944  /* function exit code */
5945  __pyx_L1_error:;
5946  __Pyx_XDECREF(__pyx_t_1);
5947  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5948  __pyx_r = NULL;
5949  __pyx_L0:;
5950  __Pyx_XGIVEREF(__pyx_r);
5951  __Pyx_RefNannyFinishContext();
5952  return __pyx_r;
5953  }
5954 
5955  /* "PyClical.pyx":520
5956  * return glucat.max_pos( toIndexSet(obj) )
5957  *
5958  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5959  * """
5960  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5961  */
5962 
5963  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5964  std::vector<scalar_t> __pyx_v_v;
5965  PyObject *__pyx_v_s = NULL;
5966  std::vector<scalar_t> __pyx_r;
5967  __Pyx_RefNannyDeclarations
5968  PyObject *__pyx_t_1 = NULL;
5969  Py_ssize_t __pyx_t_2;
5970  PyObject *(*__pyx_t_3)(PyObject *);
5971  PyObject *__pyx_t_4 = NULL;
5972  scalar_t __pyx_t_5;
5973  __Pyx_RefNannySetupContext("list_to_vector", 0);
5974 
5975  /* "PyClical.pyx":525
5976  * """
5977  * cdef vector[scalar_t] v
5978  * for s in lst: # <<<<<<<<<<<<<<
5979  * v.push_back(<scalar_t>s)
5980  * return v
5981  */
5982  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5983  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5984  __pyx_t_3 = NULL;
5985  } else {
5986  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5987  __Pyx_GOTREF(__pyx_t_1);
5988  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5989  }
5990  for (;;) {
5991  if (likely(!__pyx_t_3)) {
5992  if (likely(PyList_CheckExact(__pyx_t_1))) {
5993  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5994  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5995  __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, 525, __pyx_L1_error)
5996  #else
5997  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
5998  __Pyx_GOTREF(__pyx_t_4);
5999  #endif
6000  } else {
6001  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
6002  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6003  __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, 525, __pyx_L1_error)
6004  #else
6005  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
6006  __Pyx_GOTREF(__pyx_t_4);
6007  #endif
6008  }
6009  } else {
6010  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6011  if (unlikely(!__pyx_t_4)) {
6012  PyObject* exc_type = PyErr_Occurred();
6013  if (exc_type) {
6014  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6015  else __PYX_ERR(0, 525, __pyx_L1_error)
6016  }
6017  break;
6018  }
6019  __Pyx_GOTREF(__pyx_t_4);
6020  }
6021  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6022  __pyx_t_4 = 0;
6023 
6024  /* "PyClical.pyx":526
6025  * cdef vector[scalar_t] v
6026  * for s in lst:
6027  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6028  * return v
6029  *
6030  */
6031  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_s); if (unlikely((__pyx_t_5 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 526, __pyx_L1_error)
6032  try {
6033  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6034  } catch(...) {
6035  __Pyx_CppExn2PyErr();
6036  __PYX_ERR(0, 526, __pyx_L1_error)
6037  }
6038 
6039  /* "PyClical.pyx":525
6040  * """
6041  * cdef vector[scalar_t] v
6042  * for s in lst: # <<<<<<<<<<<<<<
6043  * v.push_back(<scalar_t>s)
6044  * return v
6045  */
6046  }
6047  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6048 
6049  /* "PyClical.pyx":527
6050  * for s in lst:
6051  * v.push_back(<scalar_t>s)
6052  * return v # <<<<<<<<<<<<<<
6053  *
6054  * # Forward reference.
6055  */
6056  __pyx_r = __pyx_v_v;
6057  goto __pyx_L0;
6058 
6059  /* "PyClical.pyx":520
6060  * return glucat.max_pos( toIndexSet(obj) )
6061  *
6062  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6063  * """
6064  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6065  */
6066 
6067  /* function exit code */
6068  __pyx_L1_error:;
6069  __Pyx_XDECREF(__pyx_t_1);
6070  __Pyx_XDECREF(__pyx_t_4);
6071  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6072  __Pyx_pretend_to_initialize(&__pyx_r);
6073  __pyx_L0:;
6074  __Pyx_XDECREF(__pyx_v_s);
6075  __Pyx_RefNannyFinishContext();
6076  return __pyx_r;
6077  }
6078 
6079  /* "PyClical.pyx":532
6080  * cdef class clifford
6081  *
6082  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6083  * return clifford(obj).instance[0]
6084  *
6085  */
6086 
6087  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6088  Clifford __pyx_r;
6089  __Pyx_RefNannyDeclarations
6090  PyObject *__pyx_t_1 = NULL;
6091  __Pyx_RefNannySetupContext("toClifford", 0);
6092 
6093  /* "PyClical.pyx":533
6094  *
6095  * cdef inline Clifford toClifford(obj):
6096  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6097  *
6098  * cdef class clifford:
6099  */
6100  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
6101  __Pyx_GOTREF(__pyx_t_1);
6102  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6103  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6104  goto __pyx_L0;
6105 
6106  /* "PyClical.pyx":532
6107  * cdef class clifford
6108  *
6109  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6110  * return clifford(obj).instance[0]
6111  *
6112  */
6113 
6114  /* function exit code */
6115  __pyx_L1_error:;
6116  __Pyx_XDECREF(__pyx_t_1);
6117  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6118  __Pyx_pretend_to_initialize(&__pyx_r);
6119  __pyx_L0:;
6120  __Pyx_RefNannyFinishContext();
6121  return __pyx_r;
6122  }
6123 
6124  /* "PyClical.pyx":541
6125  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6126  *
6127  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6128  * """
6129  * Wrap an instance of the C++ class Clifford.
6130  */
6131 
6132  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6133  PyObject *__pyx_r = NULL;
6134  __Pyx_RefNannyDeclarations
6135  __Pyx_RefNannySetupContext("wrap", 0);
6136 
6137  /* "PyClical.pyx":545
6138  * Wrap an instance of the C++ class Clifford.
6139  * """
6140  * self.instance[0] = other # <<<<<<<<<<<<<<
6141  * return self
6142  *
6143  */
6144  (__pyx_v_self->instance[0]) = __pyx_v_other;
6145 
6146  /* "PyClical.pyx":546
6147  * """
6148  * self.instance[0] = other
6149  * return self # <<<<<<<<<<<<<<
6150  *
6151  * cdef inline Clifford unwrap(clifford self):
6152  */
6153  __Pyx_XDECREF(__pyx_r);
6154  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6155  __pyx_r = ((PyObject *)__pyx_v_self);
6156  goto __pyx_L0;
6157 
6158  /* "PyClical.pyx":541
6159  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6160  *
6161  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6162  * """
6163  * Wrap an instance of the C++ class Clifford.
6164  */
6165 
6166  /* function exit code */
6167  __pyx_L0:;
6168  __Pyx_XGIVEREF(__pyx_r);
6169  __Pyx_RefNannyFinishContext();
6170  return __pyx_r;
6171  }
6172 
6173  /* "PyClical.pyx":548
6174  * return self
6175  *
6176  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6177  * """
6178  * Return the wrapped C++ Clifford instance.
6179  */
6180 
6181  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6182  Clifford __pyx_r;
6183  __Pyx_RefNannyDeclarations
6184  __Pyx_RefNannySetupContext("unwrap", 0);
6185 
6186  /* "PyClical.pyx":552
6187  * Return the wrapped C++ Clifford instance.
6188  * """
6189  * return self.instance[0] # <<<<<<<<<<<<<<
6190  *
6191  * cpdef copy(clifford self):
6192  */
6193  __pyx_r = (__pyx_v_self->instance[0]);
6194  goto __pyx_L0;
6195 
6196  /* "PyClical.pyx":548
6197  * return self
6198  *
6199  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6200  * """
6201  * Return the wrapped C++ Clifford instance.
6202  */
6203 
6204  /* function exit code */
6205  __pyx_L0:;
6206  __Pyx_RefNannyFinishContext();
6207  return __pyx_r;
6208  }
6209 
6210  /* "PyClical.pyx":554
6211  * return self.instance[0]
6212  *
6213  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6214  * """
6215  * Copy this clifford object.
6216  */
6217 
6218  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6219  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6220  PyObject *__pyx_r = NULL;
6221  __Pyx_RefNannyDeclarations
6222  PyObject *__pyx_t_1 = NULL;
6223  PyObject *__pyx_t_2 = NULL;
6224  PyObject *__pyx_t_3 = NULL;
6225  PyObject *__pyx_t_4 = NULL;
6226  __Pyx_RefNannySetupContext("copy", 0);
6227  /* Check if called by wrapper */
6228  if (unlikely(__pyx_skip_dispatch)) ;
6229  /* Check if overridden in Python */
6230  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)))) {
6231  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6232  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6233  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6234  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6235  #endif
6236  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6237  __Pyx_GOTREF(__pyx_t_1);
6238  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6239  __Pyx_XDECREF(__pyx_r);
6240  __Pyx_INCREF(__pyx_t_1);
6241  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6242  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6243  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6244  if (likely(__pyx_t_4)) {
6245  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6246  __Pyx_INCREF(__pyx_t_4);
6247  __Pyx_INCREF(function);
6248  __Pyx_DECREF_SET(__pyx_t_3, function);
6249  }
6250  }
6251  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6252  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6253  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6254  __Pyx_GOTREF(__pyx_t_2);
6255  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6256  __pyx_r = __pyx_t_2;
6257  __pyx_t_2 = 0;
6258  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6259  goto __pyx_L0;
6260  }
6261  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6262  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6263  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6264  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6265  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6266  }
6267  #endif
6268  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6269  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6270  }
6271  #endif
6272  }
6273 
6274  /* "PyClical.pyx":561
6275  * {2}
6276  * """
6277  * return clifford(self) # <<<<<<<<<<<<<<
6278  *
6279  * def __cinit__(self, other = 0, ixt = None):
6280  */
6281  __Pyx_XDECREF(__pyx_r);
6282  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
6283  __Pyx_GOTREF(__pyx_t_1);
6284  __pyx_r = __pyx_t_1;
6285  __pyx_t_1 = 0;
6286  goto __pyx_L0;
6287 
6288  /* "PyClical.pyx":554
6289  * return self.instance[0]
6290  *
6291  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6292  * """
6293  * Copy this clifford object.
6294  */
6295 
6296  /* function exit code */
6297  __pyx_L1_error:;
6298  __Pyx_XDECREF(__pyx_t_1);
6299  __Pyx_XDECREF(__pyx_t_2);
6300  __Pyx_XDECREF(__pyx_t_3);
6301  __Pyx_XDECREF(__pyx_t_4);
6302  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6303  __pyx_r = 0;
6304  __pyx_L0:;
6305  __Pyx_XGIVEREF(__pyx_r);
6306  __Pyx_RefNannyFinishContext();
6307  return __pyx_r;
6308  }
6309 
6310  /* Python wrapper */
6311  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6312  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 ";
6313  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6314  PyObject *__pyx_r = 0;
6315  __Pyx_RefNannyDeclarations
6316  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6317  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6318 
6319  /* function exit code */
6320  __Pyx_RefNannyFinishContext();
6321  return __pyx_r;
6322  }
6323 
6324  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6325  PyObject *__pyx_r = NULL;
6326  __Pyx_RefNannyDeclarations
6327  PyObject *__pyx_t_1 = NULL;
6328  __Pyx_RefNannySetupContext("copy", 0);
6329  __Pyx_XDECREF(__pyx_r);
6330  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6331  __Pyx_GOTREF(__pyx_t_1);
6332  __pyx_r = __pyx_t_1;
6333  __pyx_t_1 = 0;
6334  goto __pyx_L0;
6335 
6336  /* function exit code */
6337  __pyx_L1_error:;
6338  __Pyx_XDECREF(__pyx_t_1);
6339  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6340  __pyx_r = NULL;
6341  __pyx_L0:;
6342  __Pyx_XGIVEREF(__pyx_r);
6343  __Pyx_RefNannyFinishContext();
6344  return __pyx_r;
6345  }
6346 
6347  /* "PyClical.pyx":563
6348  * return clifford(self)
6349  *
6350  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6351  * """
6352  * Construct an object of type clifford.
6353  */
6354 
6355  /* Python wrapper */
6356  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6357  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6358  PyObject *__pyx_v_other = 0;
6359  PyObject *__pyx_v_ixt = 0;
6360  int __pyx_r;
6361  __Pyx_RefNannyDeclarations
6362  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6363  {
6364  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6365  PyObject* values[2] = {0,0};
6366  values[0] = ((PyObject *)__pyx_int_0);
6367  values[1] = ((PyObject *)Py_None);
6368  if (unlikely(__pyx_kwds)) {
6369  Py_ssize_t kw_args;
6370  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6371  switch (pos_args) {
6372  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6373  CYTHON_FALLTHROUGH;
6374  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6375  CYTHON_FALLTHROUGH;
6376  case 0: break;
6377  default: goto __pyx_L5_argtuple_error;
6378  }
6379  kw_args = PyDict_Size(__pyx_kwds);
6380  switch (pos_args) {
6381  case 0:
6382  if (kw_args > 0) {
6383  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6384  if (value) { values[0] = value; kw_args--; }
6385  }
6386  CYTHON_FALLTHROUGH;
6387  case 1:
6388  if (kw_args > 0) {
6389  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6390  if (value) { values[1] = value; kw_args--; }
6391  }
6392  }
6393  if (unlikely(kw_args > 0)) {
6394  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6395  }
6396  } else {
6397  switch (PyTuple_GET_SIZE(__pyx_args)) {
6398  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6399  CYTHON_FALLTHROUGH;
6400  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6401  CYTHON_FALLTHROUGH;
6402  case 0: break;
6403  default: goto __pyx_L5_argtuple_error;
6404  }
6405  }
6406  __pyx_v_other = values[0];
6407  __pyx_v_ixt = values[1];
6408  }
6409  goto __pyx_L4_argument_unpacking_done;
6410  __pyx_L5_argtuple_error:;
6411  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6412  __pyx_L3_error:;
6413  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6414  __Pyx_RefNannyFinishContext();
6415  return -1;
6416  __pyx_L4_argument_unpacking_done:;
6417  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6418 
6419  /* function exit code */
6420  __Pyx_RefNannyFinishContext();
6421  return __pyx_r;
6422  }
6423 
6424  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6425  PyObject *__pyx_v_error_msg_prefix = NULL;
6426  PyObject *__pyx_v_err = NULL;
6427  int __pyx_r;
6428  __Pyx_RefNannyDeclarations
6429  int __pyx_t_1;
6430  int __pyx_t_2;
6431  PyObject *__pyx_t_3 = NULL;
6432  PyObject *__pyx_t_4 = NULL;
6433  PyObject *__pyx_t_5 = NULL;
6434  Clifford *__pyx_t_6;
6435  PyObject *__pyx_t_7 = NULL;
6436  PyObject *__pyx_t_8 = NULL;
6437  scalar_t __pyx_t_9;
6438  PyObject *__pyx_t_10 = NULL;
6439  PyObject *__pyx_t_11 = NULL;
6440  PyObject *__pyx_t_12 = NULL;
6441  char *__pyx_t_13;
6442  int __pyx_t_14;
6443  PyObject *__pyx_t_15 = NULL;
6444  PyObject *__pyx_t_16 = NULL;
6445  PyObject *__pyx_t_17 = NULL;
6446  PyObject *__pyx_t_18 = NULL;
6447  __Pyx_RefNannySetupContext("__cinit__", 0);
6448 
6449  /* "PyClical.pyx":588
6450  * 2{1}+3{2}
6451  * """
6452  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6453  * if ixt is None:
6454  * try:
6455  */
6456  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6457  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6458 
6459  /* "PyClical.pyx":589
6460  * """
6461  * error_msg_prefix = "Cannot initialize clifford object from"
6462  * if ixt is None: # <<<<<<<<<<<<<<
6463  * try:
6464  * if isinstance(other, clifford):
6465  */
6466  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6467  __pyx_t_2 = (__pyx_t_1 != 0);
6468  if (__pyx_t_2) {
6469 
6470  /* "PyClical.pyx":590
6471  * error_msg_prefix = "Cannot initialize clifford object from"
6472  * if ixt is None:
6473  * try: # <<<<<<<<<<<<<<
6474  * if isinstance(other, clifford):
6475  * self.instance = new Clifford((<clifford>other).unwrap())
6476  */
6477  {
6478  __Pyx_PyThreadState_declare
6479  __Pyx_PyThreadState_assign
6480  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6481  __Pyx_XGOTREF(__pyx_t_3);
6482  __Pyx_XGOTREF(__pyx_t_4);
6483  __Pyx_XGOTREF(__pyx_t_5);
6484  /*try:*/ {
6485 
6486  /* "PyClical.pyx":591
6487  * if ixt is None:
6488  * try:
6489  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6490  * self.instance = new Clifford((<clifford>other).unwrap())
6491  * elif isinstance(other, index_set):
6492  */
6493  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6494  __pyx_t_1 = (__pyx_t_2 != 0);
6495  if (__pyx_t_1) {
6496 
6497  /* "PyClical.pyx":592
6498  * try:
6499  * if isinstance(other, clifford):
6500  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6501  * elif isinstance(other, index_set):
6502  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6503  */
6504  try {
6505  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6506  } catch(...) {
6507  __Pyx_CppExn2PyErr();
6508  __PYX_ERR(0, 592, __pyx_L4_error)
6509  }
6510  __pyx_v_self->instance = __pyx_t_6;
6511 
6512  /* "PyClical.pyx":591
6513  * if ixt is None:
6514  * try:
6515  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6516  * self.instance = new Clifford((<clifford>other).unwrap())
6517  * elif isinstance(other, index_set):
6518  */
6519  goto __pyx_L10;
6520  }
6521 
6522  /* "PyClical.pyx":593
6523  * if isinstance(other, clifford):
6524  * self.instance = new Clifford((<clifford>other).unwrap())
6525  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6526  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6527  * elif isinstance(other, numbers.Real):
6528  */
6529  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6530  __pyx_t_2 = (__pyx_t_1 != 0);
6531  if (__pyx_t_2) {
6532 
6533  /* "PyClical.pyx":594
6534  * self.instance = new Clifford((<clifford>other).unwrap())
6535  * elif isinstance(other, index_set):
6536  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6537  * elif isinstance(other, numbers.Real):
6538  * self.instance = new Clifford(<scalar_t>other)
6539  */
6540  try {
6541  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6542  } catch(...) {
6543  __Pyx_CppExn2PyErr();
6544  __PYX_ERR(0, 594, __pyx_L4_error)
6545  }
6546  __pyx_v_self->instance = __pyx_t_6;
6547 
6548  /* "PyClical.pyx":593
6549  * if isinstance(other, clifford):
6550  * self.instance = new Clifford((<clifford>other).unwrap())
6551  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6552  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6553  * elif isinstance(other, numbers.Real):
6554  */
6555  goto __pyx_L10;
6556  }
6557 
6558  /* "PyClical.pyx":595
6559  * elif isinstance(other, index_set):
6560  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6561  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6562  * self.instance = new Clifford(<scalar_t>other)
6563  * elif isinstance(other, str):
6564  */
6565  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6566  __Pyx_GOTREF(__pyx_t_7);
6567  __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)
6568  __Pyx_GOTREF(__pyx_t_8);
6569  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6570  __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)
6571  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6572  __pyx_t_1 = (__pyx_t_2 != 0);
6573  if (__pyx_t_1) {
6574 
6575  /* "PyClical.pyx":596
6576  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6577  * elif isinstance(other, numbers.Real):
6578  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6579  * elif isinstance(other, str):
6580  * try:
6581  */
6582  __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)
6583  try {
6584  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6585  } catch(...) {
6586  __Pyx_CppExn2PyErr();
6587  __PYX_ERR(0, 596, __pyx_L4_error)
6588  }
6589  __pyx_v_self->instance = __pyx_t_6;
6590 
6591  /* "PyClical.pyx":595
6592  * elif isinstance(other, index_set):
6593  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6594  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6595  * self.instance = new Clifford(<scalar_t>other)
6596  * elif isinstance(other, str):
6597  */
6598  goto __pyx_L10;
6599  }
6600 
6601  /* "PyClical.pyx":597
6602  * elif isinstance(other, numbers.Real):
6603  * self.instance = new Clifford(<scalar_t>other)
6604  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6605  * try:
6606  * self.instance = new Clifford(<char *>other)
6607  */
6608  __pyx_t_1 = PyString_Check(__pyx_v_other);
6609  __pyx_t_2 = (__pyx_t_1 != 0);
6610  if (likely(__pyx_t_2)) {
6611 
6612  /* "PyClical.pyx":598
6613  * self.instance = new Clifford(<scalar_t>other)
6614  * elif isinstance(other, str):
6615  * try: # <<<<<<<<<<<<<<
6616  * self.instance = new Clifford(<char *>other)
6617  * except RuntimeError:
6618  */
6619  {
6620  __Pyx_PyThreadState_declare
6621  __Pyx_PyThreadState_assign
6622  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6623  __Pyx_XGOTREF(__pyx_t_10);
6624  __Pyx_XGOTREF(__pyx_t_11);
6625  __Pyx_XGOTREF(__pyx_t_12);
6626  /*try:*/ {
6627 
6628  /* "PyClical.pyx":599
6629  * elif isinstance(other, str):
6630  * try:
6631  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6632  * except RuntimeError:
6633  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6634  */
6635  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6636  try {
6637  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6638  } catch(...) {
6639  __Pyx_CppExn2PyErr();
6640  __PYX_ERR(0, 599, __pyx_L11_error)
6641  }
6642  __pyx_v_self->instance = __pyx_t_6;
6643 
6644  /* "PyClical.pyx":598
6645  * self.instance = new Clifford(<scalar_t>other)
6646  * elif isinstance(other, str):
6647  * try: # <<<<<<<<<<<<<<
6648  * self.instance = new Clifford(<char *>other)
6649  * except RuntimeError:
6650  */
6651  }
6652  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6653  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6654  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6655  goto __pyx_L16_try_end;
6656  __pyx_L11_error:;
6657  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6658  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6659 
6660  /* "PyClical.pyx":600
6661  * try:
6662  * self.instance = new Clifford(<char *>other)
6663  * except RuntimeError: # <<<<<<<<<<<<<<
6664  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6665  * else:
6666  */
6667  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6668  if (__pyx_t_14) {
6669  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6670  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6671  __Pyx_GOTREF(__pyx_t_8);
6672  __Pyx_GOTREF(__pyx_t_7);
6673  __Pyx_GOTREF(__pyx_t_15);
6674 
6675  /* "PyClical.pyx":601
6676  * self.instance = new Clifford(<char *>other)
6677  * except RuntimeError:
6678  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6679  * else:
6680  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6681  */
6682  __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid_string); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6683  __Pyx_GOTREF(__pyx_t_16);
6684  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6685  __Pyx_GOTREF(__pyx_t_17);
6686  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6687  __Pyx_GOTREF(__pyx_t_18);
6688  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6689  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6690  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6691  __Pyx_GOTREF(__pyx_t_17);
6692  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6693  __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6694  __Pyx_GOTREF(__pyx_t_18);
6695  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6696  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6697  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6698  __PYX_ERR(0, 601, __pyx_L13_except_error)
6699  }
6700  goto __pyx_L13_except_error;
6701  __pyx_L13_except_error:;
6702 
6703  /* "PyClical.pyx":598
6704  * self.instance = new Clifford(<scalar_t>other)
6705  * elif isinstance(other, str):
6706  * try: # <<<<<<<<<<<<<<
6707  * self.instance = new Clifford(<char *>other)
6708  * except RuntimeError:
6709  */
6710  __Pyx_XGIVEREF(__pyx_t_10);
6711  __Pyx_XGIVEREF(__pyx_t_11);
6712  __Pyx_XGIVEREF(__pyx_t_12);
6713  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6714  goto __pyx_L4_error;
6715  __pyx_L16_try_end:;
6716  }
6717 
6718  /* "PyClical.pyx":597
6719  * elif isinstance(other, numbers.Real):
6720  * self.instance = new Clifford(<scalar_t>other)
6721  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6722  * try:
6723  * self.instance = new Clifford(<char *>other)
6724  */
6725  goto __pyx_L10;
6726  }
6727 
6728  /* "PyClical.pyx":603
6729  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6730  * else:
6731  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6732  * except RuntimeError as err:
6733  * raise ValueError(error_msg_prefix + " " + str(type(other))
6734  */
6735  /*else*/ {
6736  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 603, __pyx_L4_error)
6737  __Pyx_GOTREF(__pyx_t_15);
6738  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6739  __Pyx_GOTREF(__pyx_t_7);
6740  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6741  __Pyx_GOTREF(__pyx_t_8);
6742  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6743  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6744  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6745  __Pyx_GOTREF(__pyx_t_7);
6746  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6747  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6748  __Pyx_GOTREF(__pyx_t_8);
6749  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6750  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6751  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6752  __PYX_ERR(0, 603, __pyx_L4_error)
6753  }
6754  __pyx_L10:;
6755 
6756  /* "PyClical.pyx":590
6757  * error_msg_prefix = "Cannot initialize clifford object from"
6758  * if ixt is None:
6759  * try: # <<<<<<<<<<<<<<
6760  * if isinstance(other, clifford):
6761  * self.instance = new Clifford((<clifford>other).unwrap())
6762  */
6763  }
6764  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6765  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6766  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6767  goto __pyx_L9_try_end;
6768  __pyx_L4_error:;
6769  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6770  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6771  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6772  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6773  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6774  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6775 
6776  /* "PyClical.pyx":604
6777  * else:
6778  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6779  * except RuntimeError as err: # <<<<<<<<<<<<<<
6780  * raise ValueError(error_msg_prefix + " " + str(type(other))
6781  * + " value " + repr(other) + ":"
6782  */
6783  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6784  if (__pyx_t_14) {
6785  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6786  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6787  __Pyx_GOTREF(__pyx_t_8);
6788  __Pyx_GOTREF(__pyx_t_7);
6789  __Pyx_GOTREF(__pyx_t_15);
6790  __Pyx_INCREF(__pyx_t_7);
6791  __pyx_v_err = __pyx_t_7;
6792 
6793  /* "PyClical.pyx":605
6794  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6795  * except RuntimeError as err:
6796  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6797  * + " value " + repr(other) + ":"
6798  * + "\n\t" + str(err))
6799  */
6800  __pyx_t_18 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6801  __Pyx_GOTREF(__pyx_t_18);
6802  __pyx_t_17 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6803  __Pyx_GOTREF(__pyx_t_17);
6804  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6805  __Pyx_GOTREF(__pyx_t_16);
6806  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6807  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6808 
6809  /* "PyClical.pyx":606
6810  * except RuntimeError as err:
6811  * raise ValueError(error_msg_prefix + " " + str(type(other))
6812  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6813  * + "\n\t" + str(err))
6814  * elif isinstance(ixt, index_set):
6815  */
6816  __pyx_t_17 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_value); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6817  __Pyx_GOTREF(__pyx_t_17);
6818  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6819  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6820  __Pyx_GOTREF(__pyx_t_16);
6821  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6822  __Pyx_GOTREF(__pyx_t_18);
6823  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6824  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6825  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_kp_s__5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6826  __Pyx_GOTREF(__pyx_t_16);
6827  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6828 
6829  /* "PyClical.pyx":607
6830  * raise ValueError(error_msg_prefix + " " + str(type(other))
6831  * + " value " + repr(other) + ":"
6832  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6833  * elif isinstance(ixt, index_set):
6834  * if isinstance(other, numbers.Real):
6835  */
6836  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_kp_s__6); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6837  __Pyx_GOTREF(__pyx_t_18);
6838  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6839  __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_err); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6840  __Pyx_GOTREF(__pyx_t_16);
6841  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6842  __Pyx_GOTREF(__pyx_t_17);
6843  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6844  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6845 
6846  /* "PyClical.pyx":605
6847  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6848  * except RuntimeError as err:
6849  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6850  * + " value " + repr(other) + ":"
6851  * + "\n\t" + str(err))
6852  */
6853  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6854  __Pyx_GOTREF(__pyx_t_16);
6855  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6856  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6857  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6858  __PYX_ERR(0, 605, __pyx_L6_except_error)
6859  }
6860  goto __pyx_L6_except_error;
6861  __pyx_L6_except_error:;
6862 
6863  /* "PyClical.pyx":590
6864  * error_msg_prefix = "Cannot initialize clifford object from"
6865  * if ixt is None:
6866  * try: # <<<<<<<<<<<<<<
6867  * if isinstance(other, clifford):
6868  * self.instance = new Clifford((<clifford>other).unwrap())
6869  */
6870  __Pyx_XGIVEREF(__pyx_t_3);
6871  __Pyx_XGIVEREF(__pyx_t_4);
6872  __Pyx_XGIVEREF(__pyx_t_5);
6873  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6874  goto __pyx_L1_error;
6875  __pyx_L9_try_end:;
6876  }
6877 
6878  /* "PyClical.pyx":589
6879  * """
6880  * error_msg_prefix = "Cannot initialize clifford object from"
6881  * if ixt is None: # <<<<<<<<<<<<<<
6882  * try:
6883  * if isinstance(other, clifford):
6884  */
6885  goto __pyx_L3;
6886  }
6887 
6888  /* "PyClical.pyx":608
6889  * + " value " + repr(other) + ":"
6890  * + "\n\t" + str(err))
6891  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6892  * if isinstance(other, numbers.Real):
6893  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6894  */
6895  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6896  __pyx_t_1 = (__pyx_t_2 != 0);
6897  if (likely(__pyx_t_1)) {
6898 
6899  /* "PyClical.pyx":609
6900  * + "\n\t" + str(err))
6901  * elif isinstance(ixt, index_set):
6902  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6903  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6904  * elif isinstance(other, collections.Sequence):
6905  */
6906  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6907  __Pyx_GOTREF(__pyx_t_15);
6908  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_Real); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error)
6909  __Pyx_GOTREF(__pyx_t_7);
6910  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6911  __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_7); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 609, __pyx_L1_error)
6912  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6913  __pyx_t_2 = (__pyx_t_1 != 0);
6914  if (__pyx_t_2) {
6915 
6916  /* "PyClical.pyx":610
6917  * elif isinstance(ixt, index_set):
6918  * if isinstance(other, numbers.Real):
6919  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6920  * elif isinstance(other, collections.Sequence):
6921  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6922  */
6923  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other); if (unlikely((__pyx_t_9 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 610, __pyx_L1_error)
6924  try {
6925  __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));
6926  } catch(...) {
6927  __Pyx_CppExn2PyErr();
6928  __PYX_ERR(0, 610, __pyx_L1_error)
6929  }
6930  __pyx_v_self->instance = __pyx_t_6;
6931 
6932  /* "PyClical.pyx":609
6933  * + "\n\t" + str(err))
6934  * elif isinstance(ixt, index_set):
6935  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6936  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6937  * elif isinstance(other, collections.Sequence):
6938  */
6939  goto __pyx_L21;
6940  }
6941 
6942  /* "PyClical.pyx":611
6943  * if isinstance(other, numbers.Real):
6944  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6945  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6946  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6947  * else:
6948  */
6949  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6950  __Pyx_GOTREF(__pyx_t_7);
6951  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 611, __pyx_L1_error)
6952  __Pyx_GOTREF(__pyx_t_15);
6953  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6954  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_15); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 611, __pyx_L1_error)
6955  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6956  __pyx_t_1 = (__pyx_t_2 != 0);
6957  if (likely(__pyx_t_1)) {
6958 
6959  /* "PyClical.pyx":612
6960  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6961  * elif isinstance(other, collections.Sequence):
6962  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6963  * else:
6964  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6965  */
6966  try {
6967  __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)));
6968  } catch(...) {
6969  __Pyx_CppExn2PyErr();
6970  __PYX_ERR(0, 612, __pyx_L1_error)
6971  }
6972  __pyx_v_self->instance = __pyx_t_6;
6973 
6974  /* "PyClical.pyx":611
6975  * if isinstance(other, numbers.Real):
6976  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6977  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6978  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6979  * else:
6980  */
6981  goto __pyx_L21;
6982  }
6983 
6984  /* "PyClical.pyx":614
6985  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6986  * else:
6987  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6988  * + ", " + repr(ixt) + ").")
6989  * else:
6990  */
6991  /*else*/ {
6992  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
6993  __Pyx_GOTREF(__pyx_t_15);
6994  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
6995  __Pyx_GOTREF(__pyx_t_7);
6996  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
6997  __Pyx_GOTREF(__pyx_t_8);
6998  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6999  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7000 
7001  /* "PyClical.pyx":615
7002  * else:
7003  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7004  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
7005  * else:
7006  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7007  */
7008  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7009  __Pyx_GOTREF(__pyx_t_7);
7010  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7011  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7012  __Pyx_GOTREF(__pyx_t_8);
7013  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
7014  __Pyx_GOTREF(__pyx_t_15);
7015  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7016  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7017  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7018  __Pyx_GOTREF(__pyx_t_8);
7019  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7020 
7021  /* "PyClical.pyx":614
7022  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7023  * else:
7024  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7025  * + ", " + repr(ixt) + ").")
7026  * else:
7027  */
7028  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
7029  __Pyx_GOTREF(__pyx_t_15);
7030  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7031  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7032  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7033  __PYX_ERR(0, 614, __pyx_L1_error)
7034  }
7035  __pyx_L21:;
7036 
7037  /* "PyClical.pyx":608
7038  * + " value " + repr(other) + ":"
7039  * + "\n\t" + str(err))
7040  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7041  * if isinstance(other, numbers.Real):
7042  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7043  */
7044  goto __pyx_L3;
7045  }
7046 
7047  /* "PyClical.pyx":617
7048  * + ", " + repr(ixt) + ").")
7049  * else:
7050  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7051  * + ", " + str(type(ixt)) + ").")
7052  *
7053  */
7054  /*else*/ {
7055  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7056  __Pyx_GOTREF(__pyx_t_15);
7057  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 617, __pyx_L1_error)
7058  __Pyx_GOTREF(__pyx_t_8);
7059  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
7060  __Pyx_GOTREF(__pyx_t_7);
7061  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7062  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7063 
7064  /* "PyClical.pyx":618
7065  * else:
7066  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7067  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7068  *
7069  * def __dealloc__(self):
7070  */
7071  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7072  __Pyx_GOTREF(__pyx_t_8);
7073  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7074  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_ixt))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7075  __Pyx_GOTREF(__pyx_t_7);
7076  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7077  __Pyx_GOTREF(__pyx_t_15);
7078  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7079  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7080  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7081  __Pyx_GOTREF(__pyx_t_7);
7082  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7083 
7084  /* "PyClical.pyx":617
7085  * + ", " + repr(ixt) + ").")
7086  * else:
7087  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7088  * + ", " + str(type(ixt)) + ").")
7089  *
7090  */
7091  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7092  __Pyx_GOTREF(__pyx_t_15);
7093  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7094  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7095  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7096  __PYX_ERR(0, 617, __pyx_L1_error)
7097  }
7098  __pyx_L3:;
7099 
7100  /* "PyClical.pyx":563
7101  * return clifford(self)
7102  *
7103  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7104  * """
7105  * Construct an object of type clifford.
7106  */
7107 
7108  /* function exit code */
7109  __pyx_r = 0;
7110  goto __pyx_L0;
7111  __pyx_L1_error:;
7112  __Pyx_XDECREF(__pyx_t_7);
7113  __Pyx_XDECREF(__pyx_t_8);
7114  __Pyx_XDECREF(__pyx_t_15);
7115  __Pyx_XDECREF(__pyx_t_16);
7116  __Pyx_XDECREF(__pyx_t_17);
7117  __Pyx_XDECREF(__pyx_t_18);
7118  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7119  __pyx_r = -1;
7120  __pyx_L0:;
7121  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7122  __Pyx_XDECREF(__pyx_v_err);
7123  __Pyx_RefNannyFinishContext();
7124  return __pyx_r;
7125  }
7126 
7127  /* "PyClical.pyx":620
7128  * + ", " + str(type(ixt)) + ").")
7129  *
7130  * def __dealloc__(self): # <<<<<<<<<<<<<<
7131  * """
7132  * Clean up by deallocating the instance of C++ class Clifford.
7133  */
7134 
7135  /* Python wrapper */
7136  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7137  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7138  __Pyx_RefNannyDeclarations
7139  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7140  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7141 
7142  /* function exit code */
7143  __Pyx_RefNannyFinishContext();
7144  }
7145 
7146  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7147  __Pyx_RefNannyDeclarations
7148  __Pyx_RefNannySetupContext("__dealloc__", 0);
7149 
7150  /* "PyClical.pyx":624
7151  * Clean up by deallocating the instance of C++ class Clifford.
7152  * """
7153  * del self.instance # <<<<<<<<<<<<<<
7154  *
7155  * def __contains__(self, x):
7156  */
7157  delete __pyx_v_self->instance;
7158 
7159  /* "PyClical.pyx":620
7160  * + ", " + str(type(ixt)) + ").")
7161  *
7162  * def __dealloc__(self): # <<<<<<<<<<<<<<
7163  * """
7164  * Clean up by deallocating the instance of C++ class Clifford.
7165  */
7166 
7167  /* function exit code */
7168  __Pyx_RefNannyFinishContext();
7169  }
7170 
7171  /* "PyClical.pyx":626
7172  * del self.instance
7173  *
7174  * def __contains__(self, x): # <<<<<<<<<<<<<<
7175  * """
7176  * Not applicable.
7177  */
7178 
7179  /* Python wrapper */
7180  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7181  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 ";
7182  #if CYTHON_COMPILING_IN_CPYTHON
7183  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7184  #endif
7185  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7186  int __pyx_r;
7187  __Pyx_RefNannyDeclarations
7188  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7189  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7190 
7191  /* function exit code */
7192  __Pyx_RefNannyFinishContext();
7193  return __pyx_r;
7194  }
7195 
7196  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7197  int __pyx_r;
7198  __Pyx_RefNannyDeclarations
7199  PyObject *__pyx_t_1 = NULL;
7200  __Pyx_RefNannySetupContext("__contains__", 0);
7201 
7202  /* "PyClical.pyx":635
7203  * TypeError: Not applicable.
7204  * """
7205  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7206  *
7207  * def __iter__(self):
7208  */
7209  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
7210  __Pyx_GOTREF(__pyx_t_1);
7211  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7212  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7213  __PYX_ERR(0, 635, __pyx_L1_error)
7214 
7215  /* "PyClical.pyx":626
7216  * del self.instance
7217  *
7218  * def __contains__(self, x): # <<<<<<<<<<<<<<
7219  * """
7220  * Not applicable.
7221  */
7222 
7223  /* function exit code */
7224  __pyx_L1_error:;
7225  __Pyx_XDECREF(__pyx_t_1);
7226  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7227  __pyx_r = -1;
7228  __Pyx_RefNannyFinishContext();
7229  return __pyx_r;
7230  }
7231 
7232  /* "PyClical.pyx":637
7233  * raise TypeError("Not applicable.")
7234  *
7235  * def __iter__(self): # <<<<<<<<<<<<<<
7236  * """
7237  * Not applicable.
7238  */
7239 
7240  /* Python wrapper */
7241  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7242  static char __pyx_doc_8PyClical_8clifford_8__iter__[] = "\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})): print a,\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
7243  #if CYTHON_COMPILING_IN_CPYTHON
7244  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7245  #endif
7246  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7247  PyObject *__pyx_r = 0;
7248  __Pyx_RefNannyDeclarations
7249  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7250  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7251 
7252  /* function exit code */
7253  __Pyx_RefNannyFinishContext();
7254  return __pyx_r;
7255  }
7256 
7257  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7258  PyObject *__pyx_r = NULL;
7259  __Pyx_RefNannyDeclarations
7260  PyObject *__pyx_t_1 = NULL;
7261  __Pyx_RefNannySetupContext("__iter__", 0);
7262 
7263  /* "PyClical.pyx":646
7264  * TypeError: Not applicable.
7265  * """
7266  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7267  *
7268  * def reframe(self, ixt):
7269  */
7270  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
7271  __Pyx_GOTREF(__pyx_t_1);
7272  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7273  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7274  __PYX_ERR(0, 646, __pyx_L1_error)
7275 
7276  /* "PyClical.pyx":637
7277  * raise TypeError("Not applicable.")
7278  *
7279  * def __iter__(self): # <<<<<<<<<<<<<<
7280  * """
7281  * Not applicable.
7282  */
7283 
7284  /* function exit code */
7285  __pyx_L1_error:;
7286  __Pyx_XDECREF(__pyx_t_1);
7287  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7288  __pyx_r = NULL;
7289  __Pyx_XGIVEREF(__pyx_r);
7290  __Pyx_RefNannyFinishContext();
7291  return __pyx_r;
7292  }
7293 
7294  /* "PyClical.pyx":648
7295  * raise TypeError("Not applicable.")
7296  *
7297  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7298  * """
7299  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7300  */
7301 
7302  /* Python wrapper */
7303  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7304  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 ";
7305  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7306  PyObject *__pyx_r = 0;
7307  __Pyx_RefNannyDeclarations
7308  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7309  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7310 
7311  /* function exit code */
7312  __Pyx_RefNannyFinishContext();
7313  return __pyx_r;
7314  }
7315 
7316  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7317  PyObject *__pyx_v_error_msg_prefix = NULL;
7318  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7319  PyObject *__pyx_v_err = NULL;
7320  PyObject *__pyx_r = NULL;
7321  __Pyx_RefNannyDeclarations
7322  int __pyx_t_1;
7323  int __pyx_t_2;
7324  PyObject *__pyx_t_3 = NULL;
7325  PyObject *__pyx_t_4 = NULL;
7326  PyObject *__pyx_t_5 = NULL;
7327  PyObject *__pyx_t_6 = NULL;
7328  Clifford *__pyx_t_7;
7329  int __pyx_t_8;
7330  PyObject *__pyx_t_9 = NULL;
7331  PyObject *__pyx_t_10 = NULL;
7332  PyObject *__pyx_t_11 = NULL;
7333  PyObject *__pyx_t_12 = NULL;
7334  PyObject *__pyx_t_13 = NULL;
7335  __Pyx_RefNannySetupContext("reframe", 0);
7336 
7337  /* "PyClical.pyx":658
7338  * True
7339  * """
7340  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7341  * if isinstance(ixt, index_set):
7342  * try:
7343  */
7344  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7345  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7346 
7347  /* "PyClical.pyx":659
7348  * """
7349  * error_msg_prefix = "Cannot reframe"
7350  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7351  * try:
7352  * result = clifford()
7353  */
7354  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7355  __pyx_t_2 = (__pyx_t_1 != 0);
7356  if (likely(__pyx_t_2)) {
7357 
7358  /* "PyClical.pyx":660
7359  * error_msg_prefix = "Cannot reframe"
7360  * if isinstance(ixt, index_set):
7361  * try: # <<<<<<<<<<<<<<
7362  * result = clifford()
7363  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7364  */
7365  {
7366  __Pyx_PyThreadState_declare
7367  __Pyx_PyThreadState_assign
7368  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7369  __Pyx_XGOTREF(__pyx_t_3);
7370  __Pyx_XGOTREF(__pyx_t_4);
7371  __Pyx_XGOTREF(__pyx_t_5);
7372  /*try:*/ {
7373 
7374  /* "PyClical.pyx":661
7375  * if isinstance(ixt, index_set):
7376  * try:
7377  * result = clifford() # <<<<<<<<<<<<<<
7378  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7379  * except RuntimeError as err:
7380  */
7381  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L4_error)
7382  __Pyx_GOTREF(__pyx_t_6);
7383  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7384  __pyx_t_6 = 0;
7385 
7386  /* "PyClical.pyx":662
7387  * try:
7388  * result = clifford()
7389  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7390  * except RuntimeError as err:
7391  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7392  */
7393  try {
7394  __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)));
7395  } catch(...) {
7396  __Pyx_CppExn2PyErr();
7397  __PYX_ERR(0, 662, __pyx_L4_error)
7398  }
7399  __pyx_v_result->instance = __pyx_t_7;
7400 
7401  /* "PyClical.pyx":660
7402  * error_msg_prefix = "Cannot reframe"
7403  * if isinstance(ixt, index_set):
7404  * try: # <<<<<<<<<<<<<<
7405  * result = clifford()
7406  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7407  */
7408  }
7409  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7410  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7411  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7412  goto __pyx_L9_try_end;
7413  __pyx_L4_error:;
7414  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7415 
7416  /* "PyClical.pyx":663
7417  * result = clifford()
7418  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7419  * except RuntimeError as err: # <<<<<<<<<<<<<<
7420  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7421  * + str(ixt) + ":"
7422  */
7423  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7424  if (__pyx_t_8) {
7425  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7426  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7427  __Pyx_GOTREF(__pyx_t_6);
7428  __Pyx_GOTREF(__pyx_t_9);
7429  __Pyx_GOTREF(__pyx_t_10);
7430  __Pyx_INCREF(__pyx_t_9);
7431  __pyx_v_err = __pyx_t_9;
7432 
7433  /* "PyClical.pyx":664
7434  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7435  * except RuntimeError as err:
7436  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7437  * + str(ixt) + ":"
7438  * + "\n\t" + str(err))
7439  */
7440  __pyx_t_11 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_from); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7441  __Pyx_GOTREF(__pyx_t_11);
7442  __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7443  __Pyx_GOTREF(__pyx_t_12);
7444  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7445  __Pyx_GOTREF(__pyx_t_13);
7446  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7447  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7448  __pyx_t_12 = PyNumber_Add(__pyx_t_13, __pyx_kp_s_to_frame); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7449  __Pyx_GOTREF(__pyx_t_12);
7450  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7451 
7452  /* "PyClical.pyx":665
7453  * except RuntimeError as err:
7454  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7455  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7456  * + "\n\t" + str(err))
7457  * else:
7458  */
7459  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_ixt); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7460  __Pyx_GOTREF(__pyx_t_13);
7461  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7462  __Pyx_GOTREF(__pyx_t_11);
7463  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7464  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7465  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_kp_s__5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7466  __Pyx_GOTREF(__pyx_t_13);
7467  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7468 
7469  /* "PyClical.pyx":666
7470  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7471  * + str(ixt) + ":"
7472  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7473  * else:
7474  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7475  */
7476  __pyx_t_11 = PyNumber_Add(__pyx_t_13, __pyx_kp_s__6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7477  __Pyx_GOTREF(__pyx_t_11);
7478  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7479  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_err); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7480  __Pyx_GOTREF(__pyx_t_13);
7481  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7482  __Pyx_GOTREF(__pyx_t_12);
7483  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7484  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7485 
7486  /* "PyClical.pyx":664
7487  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7488  * except RuntimeError as err:
7489  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7490  * + str(ixt) + ":"
7491  * + "\n\t" + str(err))
7492  */
7493  __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7494  __Pyx_GOTREF(__pyx_t_13);
7495  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7496  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7497  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7498  __PYX_ERR(0, 664, __pyx_L6_except_error)
7499  }
7500  goto __pyx_L6_except_error;
7501  __pyx_L6_except_error:;
7502 
7503  /* "PyClical.pyx":660
7504  * error_msg_prefix = "Cannot reframe"
7505  * if isinstance(ixt, index_set):
7506  * try: # <<<<<<<<<<<<<<
7507  * result = clifford()
7508  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7509  */
7510  __Pyx_XGIVEREF(__pyx_t_3);
7511  __Pyx_XGIVEREF(__pyx_t_4);
7512  __Pyx_XGIVEREF(__pyx_t_5);
7513  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7514  goto __pyx_L1_error;
7515  __pyx_L9_try_end:;
7516  }
7517 
7518  /* "PyClical.pyx":659
7519  * """
7520  * error_msg_prefix = "Cannot reframe"
7521  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7522  * try:
7523  * result = clifford()
7524  */
7525  goto __pyx_L3;
7526  }
7527 
7528  /* "PyClical.pyx":668
7529  * + "\n\t" + str(err))
7530  * else:
7531  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7532  * return result
7533  *
7534  */
7535  /*else*/ {
7536  __pyx_t_10 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_using); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 668, __pyx_L1_error)
7537  __Pyx_GOTREF(__pyx_t_10);
7538  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_ixt))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7539  __Pyx_GOTREF(__pyx_t_9);
7540  __pyx_t_6 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7541  __Pyx_GOTREF(__pyx_t_6);
7542  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7543  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7544  __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7545  __Pyx_GOTREF(__pyx_t_9);
7546  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7547  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7548  __Pyx_GOTREF(__pyx_t_6);
7549  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7550  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7551  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7552  __PYX_ERR(0, 668, __pyx_L1_error)
7553  }
7554  __pyx_L3:;
7555 
7556  /* "PyClical.pyx":669
7557  * else:
7558  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7559  * return result # <<<<<<<<<<<<<<
7560  *
7561  * def __richcmp__(lhs, rhs, int op):
7562  */
7563  __Pyx_XDECREF(__pyx_r);
7564  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7565  __pyx_r = ((PyObject *)__pyx_v_result);
7566  goto __pyx_L0;
7567 
7568  /* "PyClical.pyx":648
7569  * raise TypeError("Not applicable.")
7570  *
7571  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7572  * """
7573  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7574  */
7575 
7576  /* function exit code */
7577  __pyx_L1_error:;
7578  __Pyx_XDECREF(__pyx_t_6);
7579  __Pyx_XDECREF(__pyx_t_9);
7580  __Pyx_XDECREF(__pyx_t_10);
7581  __Pyx_XDECREF(__pyx_t_11);
7582  __Pyx_XDECREF(__pyx_t_12);
7583  __Pyx_XDECREF(__pyx_t_13);
7584  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7585  __pyx_r = NULL;
7586  __pyx_L0:;
7587  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7588  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7589  __Pyx_XDECREF(__pyx_v_err);
7590  __Pyx_XGIVEREF(__pyx_r);
7591  __Pyx_RefNannyFinishContext();
7592  return __pyx_r;
7593  }
7594 
7595  /* "PyClical.pyx":671
7596  * return result
7597  *
7598  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7599  * """
7600  * Compare objects of type clifford.
7601  */
7602 
7603  /* Python wrapper */
7604  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7605  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7606  PyObject *__pyx_r = 0;
7607  __Pyx_RefNannyDeclarations
7608  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7609  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7610 
7611  /* function exit code */
7612  __Pyx_RefNannyFinishContext();
7613  return __pyx_r;
7614  }
7615 
7616  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7617  PyObject *__pyx_r = NULL;
7618  __Pyx_RefNannyDeclarations
7619  int __pyx_t_1;
7620  int __pyx_t_2;
7621  int __pyx_t_3;
7622  PyObject *__pyx_t_4 = NULL;
7623  PyObject *__pyx_t_5 = NULL;
7624  PyObject *__pyx_t_6 = NULL;
7625  __Pyx_RefNannySetupContext("__richcmp__", 0);
7626 
7627  /* "PyClical.pyx":690
7628  * True
7629  * """
7630  * if op == 2: # == # <<<<<<<<<<<<<<
7631  * if (lhs is None) or (rhs is None):
7632  * return bool(lhs is rhs)
7633  */
7634  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7635  if (__pyx_t_1) {
7636 
7637  /* "PyClical.pyx":691
7638  * """
7639  * if op == 2: # ==
7640  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7641  * return bool(lhs is rhs)
7642  * else:
7643  */
7644  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7645  __pyx_t_3 = (__pyx_t_2 != 0);
7646  if (!__pyx_t_3) {
7647  } else {
7648  __pyx_t_1 = __pyx_t_3;
7649  goto __pyx_L5_bool_binop_done;
7650  }
7651  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7652  __pyx_t_2 = (__pyx_t_3 != 0);
7653  __pyx_t_1 = __pyx_t_2;
7654  __pyx_L5_bool_binop_done:;
7655  if (__pyx_t_1) {
7656 
7657  /* "PyClical.pyx":692
7658  * if op == 2: # ==
7659  * if (lhs is None) or (rhs is None):
7660  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7661  * else:
7662  * return bool( toClifford(lhs) == toClifford(rhs) )
7663  */
7664  __Pyx_XDECREF(__pyx_r);
7665  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7666  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7667  __Pyx_GOTREF(__pyx_t_4);
7668  __pyx_r = __pyx_t_4;
7669  __pyx_t_4 = 0;
7670  goto __pyx_L0;
7671 
7672  /* "PyClical.pyx":691
7673  * """
7674  * if op == 2: # ==
7675  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7676  * return bool(lhs is rhs)
7677  * else:
7678  */
7679  }
7680 
7681  /* "PyClical.pyx":694
7682  * return bool(lhs is rhs)
7683  * else:
7684  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7685  * elif op == 3: # !=
7686  * if (lhs is None) or (rhs is None):
7687  */
7688  /*else*/ {
7689  __Pyx_XDECREF(__pyx_r);
7690  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7691  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7692  __Pyx_GOTREF(__pyx_t_4);
7693  __pyx_r = __pyx_t_4;
7694  __pyx_t_4 = 0;
7695  goto __pyx_L0;
7696  }
7697 
7698  /* "PyClical.pyx":690
7699  * True
7700  * """
7701  * if op == 2: # == # <<<<<<<<<<<<<<
7702  * if (lhs is None) or (rhs is None):
7703  * return bool(lhs is rhs)
7704  */
7705  }
7706 
7707  /* "PyClical.pyx":695
7708  * else:
7709  * return bool( toClifford(lhs) == toClifford(rhs) )
7710  * elif op == 3: # != # <<<<<<<<<<<<<<
7711  * if (lhs is None) or (rhs is None):
7712  * return not bool(lhs is rhs)
7713  */
7714  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7715  if (__pyx_t_1) {
7716 
7717  /* "PyClical.pyx":696
7718  * return bool( toClifford(lhs) == toClifford(rhs) )
7719  * elif op == 3: # !=
7720  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7721  * return not bool(lhs is rhs)
7722  * else:
7723  */
7724  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7725  __pyx_t_3 = (__pyx_t_2 != 0);
7726  if (!__pyx_t_3) {
7727  } else {
7728  __pyx_t_1 = __pyx_t_3;
7729  goto __pyx_L8_bool_binop_done;
7730  }
7731  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7732  __pyx_t_2 = (__pyx_t_3 != 0);
7733  __pyx_t_1 = __pyx_t_2;
7734  __pyx_L8_bool_binop_done:;
7735  if (__pyx_t_1) {
7736 
7737  /* "PyClical.pyx":697
7738  * elif op == 3: # !=
7739  * if (lhs is None) or (rhs is None):
7740  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7741  * else:
7742  * return bool( toClifford(lhs) != toClifford(rhs) )
7743  */
7744  __Pyx_XDECREF(__pyx_r);
7745  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7746  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7747  __Pyx_GOTREF(__pyx_t_4);
7748  __pyx_r = __pyx_t_4;
7749  __pyx_t_4 = 0;
7750  goto __pyx_L0;
7751 
7752  /* "PyClical.pyx":696
7753  * return bool( toClifford(lhs) == toClifford(rhs) )
7754  * elif op == 3: # !=
7755  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7756  * return not bool(lhs is rhs)
7757  * else:
7758  */
7759  }
7760 
7761  /* "PyClical.pyx":699
7762  * return not bool(lhs is rhs)
7763  * else:
7764  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7765  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7766  * raise TypeError("This comparison operator is not implemented for "
7767  */
7768  /*else*/ {
7769  __Pyx_XDECREF(__pyx_r);
7770  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7771  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7772  __Pyx_GOTREF(__pyx_t_4);
7773  __pyx_r = __pyx_t_4;
7774  __pyx_t_4 = 0;
7775  goto __pyx_L0;
7776  }
7777 
7778  /* "PyClical.pyx":695
7779  * else:
7780  * return bool( toClifford(lhs) == toClifford(rhs) )
7781  * elif op == 3: # != # <<<<<<<<<<<<<<
7782  * if (lhs is None) or (rhs is None):
7783  * return not bool(lhs is rhs)
7784  */
7785  }
7786 
7787  /* "PyClical.pyx":700
7788  * else:
7789  * return bool( toClifford(lhs) != toClifford(rhs) )
7790  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7791  * raise TypeError("This comparison operator is not implemented for "
7792  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7793  */
7794  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
7795  __pyx_t_3 = (__pyx_t_2 != 0);
7796  if (!__pyx_t_3) {
7797  } else {
7798  __pyx_t_1 = __pyx_t_3;
7799  goto __pyx_L10_bool_binop_done;
7800  }
7801  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7802  __pyx_t_2 = (__pyx_t_3 != 0);
7803  __pyx_t_1 = __pyx_t_2;
7804  __pyx_L10_bool_binop_done:;
7805  if (unlikely(__pyx_t_1)) {
7806 
7807  /* "PyClical.pyx":702
7808  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7809  * raise TypeError("This comparison operator is not implemented for "
7810  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7811  * else:
7812  * return NotImplemented
7813  */
7814  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_lhs)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7815  __Pyx_GOTREF(__pyx_t_4);
7816  __pyx_t_5 = PyNumber_Add(__pyx_kp_s_This_comparison_operator_is_not, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7817  __Pyx_GOTREF(__pyx_t_5);
7818  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7819  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7820  __Pyx_GOTREF(__pyx_t_4);
7821  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7822  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_rhs))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7823  __Pyx_GOTREF(__pyx_t_5);
7824  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7825  __Pyx_GOTREF(__pyx_t_6);
7826  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7827  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7828  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7829  __Pyx_GOTREF(__pyx_t_5);
7830  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7831 
7832  /* "PyClical.pyx":701
7833  * return bool( toClifford(lhs) != toClifford(rhs) )
7834  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7835  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7836  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7837  * else:
7838  */
7839  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
7840  __Pyx_GOTREF(__pyx_t_6);
7841  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7842  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7843  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7844  __PYX_ERR(0, 701, __pyx_L1_error)
7845 
7846  /* "PyClical.pyx":700
7847  * else:
7848  * return bool( toClifford(lhs) != toClifford(rhs) )
7849  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7850  * raise TypeError("This comparison operator is not implemented for "
7851  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7852  */
7853  }
7854 
7855  /* "PyClical.pyx":704
7856  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7857  * else:
7858  * return NotImplemented # <<<<<<<<<<<<<<
7859  *
7860  * def __getitem__(self, ixt):
7861  */
7862  /*else*/ {
7863  __Pyx_XDECREF(__pyx_r);
7864  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7865  __pyx_r = __pyx_builtin_NotImplemented;
7866  goto __pyx_L0;
7867  }
7868 
7869  /* "PyClical.pyx":671
7870  * return result
7871  *
7872  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7873  * """
7874  * Compare objects of type clifford.
7875  */
7876 
7877  /* function exit code */
7878  __pyx_L1_error:;
7879  __Pyx_XDECREF(__pyx_t_4);
7880  __Pyx_XDECREF(__pyx_t_5);
7881  __Pyx_XDECREF(__pyx_t_6);
7882  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7883  __pyx_r = NULL;
7884  __pyx_L0:;
7885  __Pyx_XGIVEREF(__pyx_r);
7886  __Pyx_RefNannyFinishContext();
7887  return __pyx_r;
7888  }
7889 
7890  /* "PyClical.pyx":706
7891  * return NotImplemented
7892  *
7893  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7894  * """
7895  * Subscripting: map from index set to scalar coordinate.
7896  */
7897 
7898  /* Python wrapper */
7899  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7900  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 ";
7901  #if CYTHON_COMPILING_IN_CPYTHON
7902  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7903  #endif
7904  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7905  PyObject *__pyx_r = 0;
7906  __Pyx_RefNannyDeclarations
7907  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7908  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7909 
7910  /* function exit code */
7911  __Pyx_RefNannyFinishContext();
7912  return __pyx_r;
7913  }
7914 
7915  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7916  PyObject *__pyx_r = NULL;
7917  __Pyx_RefNannyDeclarations
7918  PyObject *__pyx_t_1 = NULL;
7919  __Pyx_RefNannySetupContext("__getitem__", 0);
7920 
7921  /* "PyClical.pyx":719
7922  * 2.0
7923  * """
7924  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7925  *
7926  * def __neg__(self):
7927  */
7928  __Pyx_XDECREF(__pyx_r);
7929  __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, 719, __pyx_L1_error)
7930  __Pyx_GOTREF(__pyx_t_1);
7931  __pyx_r = __pyx_t_1;
7932  __pyx_t_1 = 0;
7933  goto __pyx_L0;
7934 
7935  /* "PyClical.pyx":706
7936  * return NotImplemented
7937  *
7938  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7939  * """
7940  * Subscripting: map from index set to scalar coordinate.
7941  */
7942 
7943  /* function exit code */
7944  __pyx_L1_error:;
7945  __Pyx_XDECREF(__pyx_t_1);
7946  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7947  __pyx_r = NULL;
7948  __pyx_L0:;
7949  __Pyx_XGIVEREF(__pyx_r);
7950  __Pyx_RefNannyFinishContext();
7951  return __pyx_r;
7952  }
7953 
7954  /* "PyClical.pyx":721
7955  * return self.instance.getitem(toIndexSet(ixt))
7956  *
7957  * def __neg__(self): # <<<<<<<<<<<<<<
7958  * """
7959  * Unary -.
7960  */
7961 
7962  /* Python wrapper */
7963  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
7964  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7965  #if CYTHON_COMPILING_IN_CPYTHON
7966  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7967  #endif
7968  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7969  PyObject *__pyx_r = 0;
7970  __Pyx_RefNannyDeclarations
7971  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
7972  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7973 
7974  /* function exit code */
7975  __Pyx_RefNannyFinishContext();
7976  return __pyx_r;
7977  }
7978 
7979  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7980  PyObject *__pyx_r = NULL;
7981  __Pyx_RefNannyDeclarations
7982  PyObject *__pyx_t_1 = NULL;
7983  PyObject *__pyx_t_2 = NULL;
7984  __Pyx_RefNannySetupContext("__neg__", 0);
7985 
7986  /* "PyClical.pyx":728
7987  * -{1}
7988  * """
7989  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
7990  *
7991  * def __pos__(self):
7992  */
7993  __Pyx_XDECREF(__pyx_r);
7994  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
7995  __Pyx_GOTREF(__pyx_t_1);
7996  __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, 728, __pyx_L1_error)
7997  __Pyx_GOTREF(__pyx_t_2);
7998  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7999  __pyx_r = __pyx_t_2;
8000  __pyx_t_2 = 0;
8001  goto __pyx_L0;
8002 
8003  /* "PyClical.pyx":721
8004  * return self.instance.getitem(toIndexSet(ixt))
8005  *
8006  * def __neg__(self): # <<<<<<<<<<<<<<
8007  * """
8008  * Unary -.
8009  */
8010 
8011  /* function exit code */
8012  __pyx_L1_error:;
8013  __Pyx_XDECREF(__pyx_t_1);
8014  __Pyx_XDECREF(__pyx_t_2);
8015  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8016  __pyx_r = NULL;
8017  __pyx_L0:;
8018  __Pyx_XGIVEREF(__pyx_r);
8019  __Pyx_RefNannyFinishContext();
8020  return __pyx_r;
8021  }
8022 
8023  /* "PyClical.pyx":730
8024  * return clifford().wrap( self.instance.neg() )
8025  *
8026  * def __pos__(self): # <<<<<<<<<<<<<<
8027  * """
8028  * Unary +.
8029  */
8030 
8031  /* Python wrapper */
8032  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8033  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
8034  #if CYTHON_COMPILING_IN_CPYTHON
8035  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8036  #endif
8037  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8038  PyObject *__pyx_r = 0;
8039  __Pyx_RefNannyDeclarations
8040  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8041  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8042 
8043  /* function exit code */
8044  __Pyx_RefNannyFinishContext();
8045  return __pyx_r;
8046  }
8047 
8048  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8049  PyObject *__pyx_r = NULL;
8050  __Pyx_RefNannyDeclarations
8051  PyObject *__pyx_t_1 = NULL;
8052  __Pyx_RefNannySetupContext("__pos__", 0);
8053 
8054  /* "PyClical.pyx":737
8055  * {1}
8056  * """
8057  * return clifford(self) # <<<<<<<<<<<<<<
8058  *
8059  * def __add__(lhs, rhs):
8060  */
8061  __Pyx_XDECREF(__pyx_r);
8062  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
8063  __Pyx_GOTREF(__pyx_t_1);
8064  __pyx_r = __pyx_t_1;
8065  __pyx_t_1 = 0;
8066  goto __pyx_L0;
8067 
8068  /* "PyClical.pyx":730
8069  * return clifford().wrap( self.instance.neg() )
8070  *
8071  * def __pos__(self): # <<<<<<<<<<<<<<
8072  * """
8073  * Unary +.
8074  */
8075 
8076  /* function exit code */
8077  __pyx_L1_error:;
8078  __Pyx_XDECREF(__pyx_t_1);
8079  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8080  __pyx_r = NULL;
8081  __pyx_L0:;
8082  __Pyx_XGIVEREF(__pyx_r);
8083  __Pyx_RefNannyFinishContext();
8084  return __pyx_r;
8085  }
8086 
8087  /* "PyClical.pyx":739
8088  * return clifford(self)
8089  *
8090  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8091  * """
8092  * Geometric sum.
8093  */
8094 
8095  /* Python wrapper */
8096  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8097  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 ";
8098  #if CYTHON_COMPILING_IN_CPYTHON
8099  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8100  #endif
8101  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8102  PyObject *__pyx_r = 0;
8103  __Pyx_RefNannyDeclarations
8104  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8105  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8106 
8107  /* function exit code */
8108  __Pyx_RefNannyFinishContext();
8109  return __pyx_r;
8110  }
8111 
8112  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8113  PyObject *__pyx_r = NULL;
8114  __Pyx_RefNannyDeclarations
8115  PyObject *__pyx_t_1 = NULL;
8116  PyObject *__pyx_t_2 = NULL;
8117  __Pyx_RefNannySetupContext("__add__", 0);
8118 
8119  /* "PyClical.pyx":748
8120  * {1}+{2}
8121  * """
8122  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8123  *
8124  * def __iadd__(self, rhs):
8125  */
8126  __Pyx_XDECREF(__pyx_r);
8127  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
8128  __Pyx_GOTREF(__pyx_t_1);
8129  __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, 748, __pyx_L1_error)
8130  __Pyx_GOTREF(__pyx_t_2);
8131  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8132  __pyx_r = __pyx_t_2;
8133  __pyx_t_2 = 0;
8134  goto __pyx_L0;
8135 
8136  /* "PyClical.pyx":739
8137  * return clifford(self)
8138  *
8139  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8140  * """
8141  * Geometric sum.
8142  */
8143 
8144  /* function exit code */
8145  __pyx_L1_error:;
8146  __Pyx_XDECREF(__pyx_t_1);
8147  __Pyx_XDECREF(__pyx_t_2);
8148  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8149  __pyx_r = NULL;
8150  __pyx_L0:;
8151  __Pyx_XGIVEREF(__pyx_r);
8152  __Pyx_RefNannyFinishContext();
8153  return __pyx_r;
8154  }
8155 
8156  /* "PyClical.pyx":750
8157  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8158  *
8159  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8160  * """
8161  * Geometric sum.
8162  */
8163 
8164  /* Python wrapper */
8165  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8166  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 ";
8167  #if CYTHON_COMPILING_IN_CPYTHON
8168  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8169  #endif
8170  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8171  PyObject *__pyx_r = 0;
8172  __Pyx_RefNannyDeclarations
8173  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8174  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8175 
8176  /* function exit code */
8177  __Pyx_RefNannyFinishContext();
8178  return __pyx_r;
8179  }
8180 
8181  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8182  PyObject *__pyx_r = NULL;
8183  __Pyx_RefNannyDeclarations
8184  PyObject *__pyx_t_1 = NULL;
8185  __Pyx_RefNannySetupContext("__iadd__", 0);
8186 
8187  /* "PyClical.pyx":757
8188  * 1+{2}
8189  * """
8190  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8191  *
8192  * def __sub__(lhs, rhs):
8193  */
8194  __Pyx_XDECREF(__pyx_r);
8195  __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, 757, __pyx_L1_error)
8196  __Pyx_GOTREF(__pyx_t_1);
8197  __pyx_r = __pyx_t_1;
8198  __pyx_t_1 = 0;
8199  goto __pyx_L0;
8200 
8201  /* "PyClical.pyx":750
8202  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8203  *
8204  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8205  * """
8206  * Geometric sum.
8207  */
8208 
8209  /* function exit code */
8210  __pyx_L1_error:;
8211  __Pyx_XDECREF(__pyx_t_1);
8212  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8213  __pyx_r = NULL;
8214  __pyx_L0:;
8215  __Pyx_XGIVEREF(__pyx_r);
8216  __Pyx_RefNannyFinishContext();
8217  return __pyx_r;
8218  }
8219 
8220  /* "PyClical.pyx":759
8221  * return self.wrap( self.unwrap() + toClifford(rhs) )
8222  *
8223  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8224  * """
8225  * Geometric difference.
8226  */
8227 
8228  /* Python wrapper */
8229  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8230  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 ";
8231  #if CYTHON_COMPILING_IN_CPYTHON
8232  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8233  #endif
8234  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8235  PyObject *__pyx_r = 0;
8236  __Pyx_RefNannyDeclarations
8237  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8238  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8239 
8240  /* function exit code */
8241  __Pyx_RefNannyFinishContext();
8242  return __pyx_r;
8243  }
8244 
8245  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8246  PyObject *__pyx_r = NULL;
8247  __Pyx_RefNannyDeclarations
8248  PyObject *__pyx_t_1 = NULL;
8249  PyObject *__pyx_t_2 = NULL;
8250  __Pyx_RefNannySetupContext("__sub__", 0);
8251 
8252  /* "PyClical.pyx":768
8253  * {1}-{2}
8254  * """
8255  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8256  *
8257  * def __isub__(self, rhs):
8258  */
8259  __Pyx_XDECREF(__pyx_r);
8260  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
8261  __Pyx_GOTREF(__pyx_t_1);
8262  __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, 768, __pyx_L1_error)
8263  __Pyx_GOTREF(__pyx_t_2);
8264  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8265  __pyx_r = __pyx_t_2;
8266  __pyx_t_2 = 0;
8267  goto __pyx_L0;
8268 
8269  /* "PyClical.pyx":759
8270  * return self.wrap( self.unwrap() + toClifford(rhs) )
8271  *
8272  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8273  * """
8274  * Geometric difference.
8275  */
8276 
8277  /* function exit code */
8278  __pyx_L1_error:;
8279  __Pyx_XDECREF(__pyx_t_1);
8280  __Pyx_XDECREF(__pyx_t_2);
8281  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8282  __pyx_r = NULL;
8283  __pyx_L0:;
8284  __Pyx_XGIVEREF(__pyx_r);
8285  __Pyx_RefNannyFinishContext();
8286  return __pyx_r;
8287  }
8288 
8289  /* "PyClical.pyx":770
8290  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8291  *
8292  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8293  * """
8294  * Geometric difference.
8295  */
8296 
8297  /* Python wrapper */
8298  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8299  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 ";
8300  #if CYTHON_COMPILING_IN_CPYTHON
8301  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8302  #endif
8303  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8304  PyObject *__pyx_r = 0;
8305  __Pyx_RefNannyDeclarations
8306  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8307  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8308 
8309  /* function exit code */
8310  __Pyx_RefNannyFinishContext();
8311  return __pyx_r;
8312  }
8313 
8314  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8315  PyObject *__pyx_r = NULL;
8316  __Pyx_RefNannyDeclarations
8317  PyObject *__pyx_t_1 = NULL;
8318  __Pyx_RefNannySetupContext("__isub__", 0);
8319 
8320  /* "PyClical.pyx":777
8321  * 1-{2}
8322  * """
8323  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8324  *
8325  * def __mul__(lhs, rhs):
8326  */
8327  __Pyx_XDECREF(__pyx_r);
8328  __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, 777, __pyx_L1_error)
8329  __Pyx_GOTREF(__pyx_t_1);
8330  __pyx_r = __pyx_t_1;
8331  __pyx_t_1 = 0;
8332  goto __pyx_L0;
8333 
8334  /* "PyClical.pyx":770
8335  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8336  *
8337  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8338  * """
8339  * Geometric difference.
8340  */
8341 
8342  /* function exit code */
8343  __pyx_L1_error:;
8344  __Pyx_XDECREF(__pyx_t_1);
8345  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8346  __pyx_r = NULL;
8347  __pyx_L0:;
8348  __Pyx_XGIVEREF(__pyx_r);
8349  __Pyx_RefNannyFinishContext();
8350  return __pyx_r;
8351  }
8352 
8353  /* "PyClical.pyx":779
8354  * return self.wrap( self.unwrap() - toClifford(rhs) )
8355  *
8356  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8357  * """
8358  * Geometric product.
8359  */
8360 
8361  /* Python wrapper */
8362  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8363  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 ";
8364  #if CYTHON_COMPILING_IN_CPYTHON
8365  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8366  #endif
8367  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8368  PyObject *__pyx_r = 0;
8369  __Pyx_RefNannyDeclarations
8370  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8371  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8372 
8373  /* function exit code */
8374  __Pyx_RefNannyFinishContext();
8375  return __pyx_r;
8376  }
8377 
8378  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8379  PyObject *__pyx_r = NULL;
8380  __Pyx_RefNannyDeclarations
8381  PyObject *__pyx_t_1 = NULL;
8382  PyObject *__pyx_t_2 = NULL;
8383  __Pyx_RefNannySetupContext("__mul__", 0);
8384 
8385  /* "PyClical.pyx":790
8386  * {2}
8387  * """
8388  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8389  *
8390  * def __imul__(self, rhs):
8391  */
8392  __Pyx_XDECREF(__pyx_r);
8393  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
8394  __Pyx_GOTREF(__pyx_t_1);
8395  __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, 790, __pyx_L1_error)
8396  __Pyx_GOTREF(__pyx_t_2);
8397  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8398  __pyx_r = __pyx_t_2;
8399  __pyx_t_2 = 0;
8400  goto __pyx_L0;
8401 
8402  /* "PyClical.pyx":779
8403  * return self.wrap( self.unwrap() - toClifford(rhs) )
8404  *
8405  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8406  * """
8407  * Geometric product.
8408  */
8409 
8410  /* function exit code */
8411  __pyx_L1_error:;
8412  __Pyx_XDECREF(__pyx_t_1);
8413  __Pyx_XDECREF(__pyx_t_2);
8414  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8415  __pyx_r = NULL;
8416  __pyx_L0:;
8417  __Pyx_XGIVEREF(__pyx_r);
8418  __Pyx_RefNannyFinishContext();
8419  return __pyx_r;
8420  }
8421 
8422  /* "PyClical.pyx":792
8423  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8424  *
8425  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8426  * """
8427  * Geometric product.
8428  */
8429 
8430  /* Python wrapper */
8431  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8432  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 ";
8433  #if CYTHON_COMPILING_IN_CPYTHON
8434  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8435  #endif
8436  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8437  PyObject *__pyx_r = 0;
8438  __Pyx_RefNannyDeclarations
8439  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8440  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8441 
8442  /* function exit code */
8443  __Pyx_RefNannyFinishContext();
8444  return __pyx_r;
8445  }
8446 
8447  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8448  PyObject *__pyx_r = NULL;
8449  __Pyx_RefNannyDeclarations
8450  PyObject *__pyx_t_1 = NULL;
8451  __Pyx_RefNannySetupContext("__imul__", 0);
8452 
8453  /* "PyClical.pyx":803
8454  * {2}
8455  * """
8456  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8457  *
8458  * def __mod__(lhs, rhs):
8459  */
8460  __Pyx_XDECREF(__pyx_r);
8461  __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, 803, __pyx_L1_error)
8462  __Pyx_GOTREF(__pyx_t_1);
8463  __pyx_r = __pyx_t_1;
8464  __pyx_t_1 = 0;
8465  goto __pyx_L0;
8466 
8467  /* "PyClical.pyx":792
8468  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8469  *
8470  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8471  * """
8472  * Geometric product.
8473  */
8474 
8475  /* function exit code */
8476  __pyx_L1_error:;
8477  __Pyx_XDECREF(__pyx_t_1);
8478  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8479  __pyx_r = NULL;
8480  __pyx_L0:;
8481  __Pyx_XGIVEREF(__pyx_r);
8482  __Pyx_RefNannyFinishContext();
8483  return __pyx_r;
8484  }
8485 
8486  /* "PyClical.pyx":805
8487  * return self.wrap( self.unwrap() * toClifford(rhs) )
8488  *
8489  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8490  * """
8491  * Contraction.
8492  */
8493 
8494  /* Python wrapper */
8495  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8496  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 ";
8497  #if CYTHON_COMPILING_IN_CPYTHON
8498  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8499  #endif
8500  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8501  PyObject *__pyx_r = 0;
8502  __Pyx_RefNannyDeclarations
8503  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8504  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8505 
8506  /* function exit code */
8507  __Pyx_RefNannyFinishContext();
8508  return __pyx_r;
8509  }
8510 
8511  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8512  PyObject *__pyx_r = NULL;
8513  __Pyx_RefNannyDeclarations
8514  PyObject *__pyx_t_1 = NULL;
8515  PyObject *__pyx_t_2 = NULL;
8516  __Pyx_RefNannySetupContext("__mod__", 0);
8517 
8518  /* "PyClical.pyx":818
8519  * {2}
8520  * """
8521  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8522  *
8523  * def __imod__(self, rhs):
8524  */
8525  __Pyx_XDECREF(__pyx_r);
8526  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
8527  __Pyx_GOTREF(__pyx_t_1);
8528  __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, 818, __pyx_L1_error)
8529  __Pyx_GOTREF(__pyx_t_2);
8530  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8531  __pyx_r = __pyx_t_2;
8532  __pyx_t_2 = 0;
8533  goto __pyx_L0;
8534 
8535  /* "PyClical.pyx":805
8536  * return self.wrap( self.unwrap() * toClifford(rhs) )
8537  *
8538  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8539  * """
8540  * Contraction.
8541  */
8542 
8543  /* function exit code */
8544  __pyx_L1_error:;
8545  __Pyx_XDECREF(__pyx_t_1);
8546  __Pyx_XDECREF(__pyx_t_2);
8547  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8548  __pyx_r = NULL;
8549  __pyx_L0:;
8550  __Pyx_XGIVEREF(__pyx_r);
8551  __Pyx_RefNannyFinishContext();
8552  return __pyx_r;
8553  }
8554 
8555  /* "PyClical.pyx":820
8556  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8557  *
8558  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8559  * """
8560  * Contraction.
8561  */
8562 
8563  /* Python wrapper */
8564  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8565  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 ";
8566  #if CYTHON_COMPILING_IN_CPYTHON
8567  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8568  #endif
8569  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8570  PyObject *__pyx_r = 0;
8571  __Pyx_RefNannyDeclarations
8572  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8573  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8574 
8575  /* function exit code */
8576  __Pyx_RefNannyFinishContext();
8577  return __pyx_r;
8578  }
8579 
8580  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8581  PyObject *__pyx_r = NULL;
8582  __Pyx_RefNannyDeclarations
8583  PyObject *__pyx_t_1 = NULL;
8584  __Pyx_RefNannySetupContext("__imod__", 0);
8585 
8586  /* "PyClical.pyx":833
8587  * {2}
8588  * """
8589  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8590  *
8591  * def __and__(lhs, rhs):
8592  */
8593  __Pyx_XDECREF(__pyx_r);
8594  __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, 833, __pyx_L1_error)
8595  __Pyx_GOTREF(__pyx_t_1);
8596  __pyx_r = __pyx_t_1;
8597  __pyx_t_1 = 0;
8598  goto __pyx_L0;
8599 
8600  /* "PyClical.pyx":820
8601  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8602  *
8603  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8604  * """
8605  * Contraction.
8606  */
8607 
8608  /* function exit code */
8609  __pyx_L1_error:;
8610  __Pyx_XDECREF(__pyx_t_1);
8611  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8612  __pyx_r = NULL;
8613  __pyx_L0:;
8614  __Pyx_XGIVEREF(__pyx_r);
8615  __Pyx_RefNannyFinishContext();
8616  return __pyx_r;
8617  }
8618 
8619  /* "PyClical.pyx":835
8620  * return self.wrap( self.unwrap() % toClifford(rhs) )
8621  *
8622  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8623  * """
8624  * Inner product.
8625  */
8626 
8627  /* Python wrapper */
8628  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8629  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 ";
8630  #if CYTHON_COMPILING_IN_CPYTHON
8631  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8632  #endif
8633  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8634  PyObject *__pyx_r = 0;
8635  __Pyx_RefNannyDeclarations
8636  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8637  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8638 
8639  /* function exit code */
8640  __Pyx_RefNannyFinishContext();
8641  return __pyx_r;
8642  }
8643 
8644  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8645  PyObject *__pyx_r = NULL;
8646  __Pyx_RefNannyDeclarations
8647  PyObject *__pyx_t_1 = NULL;
8648  PyObject *__pyx_t_2 = NULL;
8649  __Pyx_RefNannySetupContext("__and__", 0);
8650 
8651  /* "PyClical.pyx":848
8652  * {2}
8653  * """
8654  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8655  *
8656  * def __iand__(self, rhs):
8657  */
8658  __Pyx_XDECREF(__pyx_r);
8659  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
8660  __Pyx_GOTREF(__pyx_t_1);
8661  __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, 848, __pyx_L1_error)
8662  __Pyx_GOTREF(__pyx_t_2);
8663  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8664  __pyx_r = __pyx_t_2;
8665  __pyx_t_2 = 0;
8666  goto __pyx_L0;
8667 
8668  /* "PyClical.pyx":835
8669  * return self.wrap( self.unwrap() % toClifford(rhs) )
8670  *
8671  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8672  * """
8673  * Inner product.
8674  */
8675 
8676  /* function exit code */
8677  __pyx_L1_error:;
8678  __Pyx_XDECREF(__pyx_t_1);
8679  __Pyx_XDECREF(__pyx_t_2);
8680  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8681  __pyx_r = NULL;
8682  __pyx_L0:;
8683  __Pyx_XGIVEREF(__pyx_r);
8684  __Pyx_RefNannyFinishContext();
8685  return __pyx_r;
8686  }
8687 
8688  /* "PyClical.pyx":850
8689  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8690  *
8691  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8692  * """
8693  * Inner product.
8694  */
8695 
8696  /* Python wrapper */
8697  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8698  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 ";
8699  #if CYTHON_COMPILING_IN_CPYTHON
8700  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8701  #endif
8702  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8703  PyObject *__pyx_r = 0;
8704  __Pyx_RefNannyDeclarations
8705  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8706  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8707 
8708  /* function exit code */
8709  __Pyx_RefNannyFinishContext();
8710  return __pyx_r;
8711  }
8712 
8713  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8714  PyObject *__pyx_r = NULL;
8715  __Pyx_RefNannyDeclarations
8716  PyObject *__pyx_t_1 = NULL;
8717  __Pyx_RefNannySetupContext("__iand__", 0);
8718 
8719  /* "PyClical.pyx":863
8720  * {2}
8721  * """
8722  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8723  *
8724  * def __xor__(lhs, rhs):
8725  */
8726  __Pyx_XDECREF(__pyx_r);
8727  __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, 863, __pyx_L1_error)
8728  __Pyx_GOTREF(__pyx_t_1);
8729  __pyx_r = __pyx_t_1;
8730  __pyx_t_1 = 0;
8731  goto __pyx_L0;
8732 
8733  /* "PyClical.pyx":850
8734  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8735  *
8736  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8737  * """
8738  * Inner product.
8739  */
8740 
8741  /* function exit code */
8742  __pyx_L1_error:;
8743  __Pyx_XDECREF(__pyx_t_1);
8744  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8745  __pyx_r = NULL;
8746  __pyx_L0:;
8747  __Pyx_XGIVEREF(__pyx_r);
8748  __Pyx_RefNannyFinishContext();
8749  return __pyx_r;
8750  }
8751 
8752  /* "PyClical.pyx":865
8753  * return self.wrap( self.unwrap() & toClifford(rhs) )
8754  *
8755  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8756  * """
8757  * Outer product.
8758  */
8759 
8760  /* Python wrapper */
8761  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8762  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 ";
8763  #if CYTHON_COMPILING_IN_CPYTHON
8764  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8765  #endif
8766  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8767  PyObject *__pyx_r = 0;
8768  __Pyx_RefNannyDeclarations
8769  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8770  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8771 
8772  /* function exit code */
8773  __Pyx_RefNannyFinishContext();
8774  return __pyx_r;
8775  }
8776 
8777  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8778  PyObject *__pyx_r = NULL;
8779  __Pyx_RefNannyDeclarations
8780  PyObject *__pyx_t_1 = NULL;
8781  PyObject *__pyx_t_2 = NULL;
8782  __Pyx_RefNannySetupContext("__xor__", 0);
8783 
8784  /* "PyClical.pyx":878
8785  * 0
8786  * """
8787  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8788  *
8789  * def __ixor__(self, rhs):
8790  */
8791  __Pyx_XDECREF(__pyx_r);
8792  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
8793  __Pyx_GOTREF(__pyx_t_1);
8794  __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, 878, __pyx_L1_error)
8795  __Pyx_GOTREF(__pyx_t_2);
8796  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8797  __pyx_r = __pyx_t_2;
8798  __pyx_t_2 = 0;
8799  goto __pyx_L0;
8800 
8801  /* "PyClical.pyx":865
8802  * return self.wrap( self.unwrap() & toClifford(rhs) )
8803  *
8804  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8805  * """
8806  * Outer product.
8807  */
8808 
8809  /* function exit code */
8810  __pyx_L1_error:;
8811  __Pyx_XDECREF(__pyx_t_1);
8812  __Pyx_XDECREF(__pyx_t_2);
8813  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8814  __pyx_r = NULL;
8815  __pyx_L0:;
8816  __Pyx_XGIVEREF(__pyx_r);
8817  __Pyx_RefNannyFinishContext();
8818  return __pyx_r;
8819  }
8820 
8821  /* "PyClical.pyx":880
8822  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8823  *
8824  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8825  * """
8826  * Outer product.
8827  */
8828 
8829  /* Python wrapper */
8830  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8831  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 ";
8832  #if CYTHON_COMPILING_IN_CPYTHON
8833  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8834  #endif
8835  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8836  PyObject *__pyx_r = 0;
8837  __Pyx_RefNannyDeclarations
8838  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8839  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8840 
8841  /* function exit code */
8842  __Pyx_RefNannyFinishContext();
8843  return __pyx_r;
8844  }
8845 
8846  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8847  PyObject *__pyx_r = NULL;
8848  __Pyx_RefNannyDeclarations
8849  PyObject *__pyx_t_1 = NULL;
8850  __Pyx_RefNannySetupContext("__ixor__", 0);
8851 
8852  /* "PyClical.pyx":893
8853  * 0
8854  * """
8855  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8856  *
8857  * def __div__(lhs, rhs):
8858  */
8859  __Pyx_XDECREF(__pyx_r);
8860  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) ^ __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
8861  __Pyx_GOTREF(__pyx_t_1);
8862  __pyx_r = __pyx_t_1;
8863  __pyx_t_1 = 0;
8864  goto __pyx_L0;
8865 
8866  /* "PyClical.pyx":880
8867  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8868  *
8869  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8870  * """
8871  * Outer product.
8872  */
8873 
8874  /* function exit code */
8875  __pyx_L1_error:;
8876  __Pyx_XDECREF(__pyx_t_1);
8877  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8878  __pyx_r = NULL;
8879  __pyx_L0:;
8880  __Pyx_XGIVEREF(__pyx_r);
8881  __Pyx_RefNannyFinishContext();
8882  return __pyx_r;
8883  }
8884 
8885  /* "PyClical.pyx":895
8886  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8887  *
8888  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8889  * """
8890  * Geometric quotient.
8891  */
8892 
8893  /* Python wrapper */
8894  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8895  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8896  static char __pyx_doc_8PyClical_8clifford_44__div__[] = "\n Geometric quotient.\n\n >>> print clifford(\"{1}\") / clifford(\"{2}\")\n {1,2}\n >>> print clifford(2) / clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") / clifford(\"{1}\")\n 1\n >>> print clifford(\"{1}\") / clifford(\"{1,2}\")\n -{2}\n ";
8897  #if CYTHON_COMPILING_IN_CPYTHON
8898  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8899  #endif
8900  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8901  PyObject *__pyx_r = 0;
8902  __Pyx_RefNannyDeclarations
8903  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8904  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8905 
8906  /* function exit code */
8907  __Pyx_RefNannyFinishContext();
8908  return __pyx_r;
8909  }
8910  #endif
8912  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8913  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8914  PyObject *__pyx_r = NULL;
8915  __Pyx_RefNannyDeclarations
8916  PyObject *__pyx_t_1 = NULL;
8917  PyObject *__pyx_t_2 = NULL;
8918  __Pyx_RefNannySetupContext("__div__", 0);
8919 
8920  /* "PyClical.pyx":908
8921  * -{2}
8922  * """
8923  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8924  *
8925  * def __idiv__(self, rhs):
8926  */
8927  __Pyx_XDECREF(__pyx_r);
8928  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
8929  __Pyx_GOTREF(__pyx_t_1);
8930  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) / __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
8931  __Pyx_GOTREF(__pyx_t_2);
8932  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8933  __pyx_r = __pyx_t_2;
8934  __pyx_t_2 = 0;
8935  goto __pyx_L0;
8936 
8937  /* "PyClical.pyx":895
8938  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8939  *
8940  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8941  * """
8942  * Geometric quotient.
8943  */
8944 
8945  /* function exit code */
8946  __pyx_L1_error:;
8947  __Pyx_XDECREF(__pyx_t_1);
8948  __Pyx_XDECREF(__pyx_t_2);
8949  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8950  __pyx_r = NULL;
8951  __pyx_L0:;
8952  __Pyx_XGIVEREF(__pyx_r);
8953  __Pyx_RefNannyFinishContext();
8954  return __pyx_r;
8955  }
8956  #endif
8958  /* "PyClical.pyx":910
8959  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8960  *
8961  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8962  * """
8963  * Geometric quotient.
8964  */
8965 
8966  /* Python wrapper */
8967  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8968  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8969  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 ";
8970  #if CYTHON_COMPILING_IN_CPYTHON
8971  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8972  #endif
8973  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8974  PyObject *__pyx_r = 0;
8975  __Pyx_RefNannyDeclarations
8976  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
8977  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8978 
8979  /* function exit code */
8980  __Pyx_RefNannyFinishContext();
8981  return __pyx_r;
8982  }
8983  #endif
8985  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8986  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8987  PyObject *__pyx_r = NULL;
8988  __Pyx_RefNannyDeclarations
8989  PyObject *__pyx_t_1 = NULL;
8990  __Pyx_RefNannySetupContext("__idiv__", 0);
8991 
8992  /* "PyClical.pyx":923
8993  * -{2}
8994  * """
8995  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
8996  *
8997  * def inv(self):
8998  */
8999  __Pyx_XDECREF(__pyx_r);
9000  __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, 923, __pyx_L1_error)
9001  __Pyx_GOTREF(__pyx_t_1);
9002  __pyx_r = __pyx_t_1;
9003  __pyx_t_1 = 0;
9004  goto __pyx_L0;
9005 
9006  /* "PyClical.pyx":910
9007  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9008  *
9009  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9010  * """
9011  * Geometric quotient.
9012  */
9013 
9014  /* function exit code */
9015  __pyx_L1_error:;
9016  __Pyx_XDECREF(__pyx_t_1);
9017  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9018  __pyx_r = NULL;
9019  __pyx_L0:;
9020  __Pyx_XGIVEREF(__pyx_r);
9021  __Pyx_RefNannyFinishContext();
9022  return __pyx_r;
9023  }
9024  #endif
9026  /* "PyClical.pyx":925
9027  * return self.wrap( self.unwrap() / toClifford(rhs) )
9028  *
9029  * def inv(self): # <<<<<<<<<<<<<<
9030  * """
9031  * Geometric multiplicative inverse.
9032  */
9033 
9034  /* Python wrapper */
9035  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9036  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 ";
9037  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9038  PyObject *__pyx_r = 0;
9039  __Pyx_RefNannyDeclarations
9040  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9041  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9042 
9043  /* function exit code */
9044  __Pyx_RefNannyFinishContext();
9045  return __pyx_r;
9046  }
9047 
9048  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9049  PyObject *__pyx_r = NULL;
9050  __Pyx_RefNannyDeclarations
9051  PyObject *__pyx_t_1 = NULL;
9052  PyObject *__pyx_t_2 = NULL;
9053  __Pyx_RefNannySetupContext("inv", 0);
9054 
9055  /* "PyClical.pyx":936
9056  * -{1,2}
9057  * """
9058  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9059  *
9060  * def __or__(lhs, rhs):
9061  */
9062  __Pyx_XDECREF(__pyx_r);
9063  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
9064  __Pyx_GOTREF(__pyx_t_1);
9065  __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, 936, __pyx_L1_error)
9066  __Pyx_GOTREF(__pyx_t_2);
9067  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9068  __pyx_r = __pyx_t_2;
9069  __pyx_t_2 = 0;
9070  goto __pyx_L0;
9071 
9072  /* "PyClical.pyx":925
9073  * return self.wrap( self.unwrap() / toClifford(rhs) )
9074  *
9075  * def inv(self): # <<<<<<<<<<<<<<
9076  * """
9077  * Geometric multiplicative inverse.
9078  */
9079 
9080  /* function exit code */
9081  __pyx_L1_error:;
9082  __Pyx_XDECREF(__pyx_t_1);
9083  __Pyx_XDECREF(__pyx_t_2);
9084  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9085  __pyx_r = NULL;
9086  __pyx_L0:;
9087  __Pyx_XGIVEREF(__pyx_r);
9088  __Pyx_RefNannyFinishContext();
9089  return __pyx_r;
9090  }
9091 
9092  /* "PyClical.pyx":938
9093  * return clifford().wrap( self.instance.inv() )
9094  *
9095  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9096  * """
9097  * Transform left hand side, using right hand side as a transformation.
9098  */
9099 
9100  /* Python wrapper */
9101  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9102  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 ";
9103  #if CYTHON_COMPILING_IN_CPYTHON
9104  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9105  #endif
9106  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9107  PyObject *__pyx_r = 0;
9108  __Pyx_RefNannyDeclarations
9109  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9110  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9111 
9112  /* function exit code */
9113  __Pyx_RefNannyFinishContext();
9114  return __pyx_r;
9115  }
9116 
9117  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9118  PyObject *__pyx_r = NULL;
9119  __Pyx_RefNannyDeclarations
9120  PyObject *__pyx_t_1 = NULL;
9121  PyObject *__pyx_t_2 = NULL;
9122  __Pyx_RefNannySetupContext("__or__", 0);
9123 
9124  /* "PyClical.pyx":947
9125  * -{1}
9126  * """
9127  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9128  *
9129  * def __ior__(self, rhs):
9130  */
9131  __Pyx_XDECREF(__pyx_r);
9132  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
9133  __Pyx_GOTREF(__pyx_t_1);
9134  __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, 947, __pyx_L1_error)
9135  __Pyx_GOTREF(__pyx_t_2);
9136  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9137  __pyx_r = __pyx_t_2;
9138  __pyx_t_2 = 0;
9139  goto __pyx_L0;
9140 
9141  /* "PyClical.pyx":938
9142  * return clifford().wrap( self.instance.inv() )
9143  *
9144  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9145  * """
9146  * Transform left hand side, using right hand side as a transformation.
9147  */
9148 
9149  /* function exit code */
9150  __pyx_L1_error:;
9151  __Pyx_XDECREF(__pyx_t_1);
9152  __Pyx_XDECREF(__pyx_t_2);
9153  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9154  __pyx_r = NULL;
9155  __pyx_L0:;
9156  __Pyx_XGIVEREF(__pyx_r);
9157  __Pyx_RefNannyFinishContext();
9158  return __pyx_r;
9159  }
9160 
9161  /* "PyClical.pyx":949
9162  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9163  *
9164  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9165  * """
9166  * Transform left hand side, using right hand side as a transformation.
9167  */
9168 
9169  /* Python wrapper */
9170  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9171  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 ";
9172  #if CYTHON_COMPILING_IN_CPYTHON
9173  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9174  #endif
9175  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9176  PyObject *__pyx_r = 0;
9177  __Pyx_RefNannyDeclarations
9178  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9179  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9180 
9181  /* function exit code */
9182  __Pyx_RefNannyFinishContext();
9183  return __pyx_r;
9184  }
9185 
9186  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9187  PyObject *__pyx_r = NULL;
9188  __Pyx_RefNannyDeclarations
9189  PyObject *__pyx_t_1 = NULL;
9190  __Pyx_RefNannySetupContext("__ior__", 0);
9191 
9192  /* "PyClical.pyx":958
9193  * -{1}
9194  * """
9195  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9196  *
9197  * def __pow__(self, m, dummy):
9198  */
9199  __Pyx_XDECREF(__pyx_r);
9200  __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, 958, __pyx_L1_error)
9201  __Pyx_GOTREF(__pyx_t_1);
9202  __pyx_r = __pyx_t_1;
9203  __pyx_t_1 = 0;
9204  goto __pyx_L0;
9205 
9206  /* "PyClical.pyx":949
9207  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9208  *
9209  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9210  * """
9211  * Transform left hand side, using right hand side as a transformation.
9212  */
9213 
9214  /* function exit code */
9215  __pyx_L1_error:;
9216  __Pyx_XDECREF(__pyx_t_1);
9217  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9218  __pyx_r = NULL;
9219  __pyx_L0:;
9220  __Pyx_XGIVEREF(__pyx_r);
9221  __Pyx_RefNannyFinishContext();
9222  return __pyx_r;
9223  }
9224 
9225  /* "PyClical.pyx":960
9226  * return self.wrap( self.unwrap() | toClifford(rhs) )
9227  *
9228  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9229  * """
9230  * Power: self to the m.
9231  */
9232 
9233  /* Python wrapper */
9234  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9235  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 ";
9236  #if CYTHON_COMPILING_IN_CPYTHON
9237  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9238  #endif
9239  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9240  PyObject *__pyx_r = 0;
9241  __Pyx_RefNannyDeclarations
9242  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9243  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9244 
9245  /* function exit code */
9246  __Pyx_RefNannyFinishContext();
9247  return __pyx_r;
9248  }
9249 
9250  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9251  PyObject *__pyx_r = NULL;
9252  __Pyx_RefNannyDeclarations
9253  PyObject *__pyx_t_1 = NULL;
9254  __Pyx_RefNannySetupContext("__pow__", 0);
9255 
9256  /* "PyClical.pyx":977
9257  * 1
9258  * """
9259  * return pow(self, m) # <<<<<<<<<<<<<<
9260  *
9261  * def pow(self, m):
9262  */
9263  __Pyx_XDECREF(__pyx_r);
9264  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_self, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
9265  __Pyx_GOTREF(__pyx_t_1);
9266  __pyx_r = __pyx_t_1;
9267  __pyx_t_1 = 0;
9268  goto __pyx_L0;
9269 
9270  /* "PyClical.pyx":960
9271  * return self.wrap( self.unwrap() | toClifford(rhs) )
9272  *
9273  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9274  * """
9275  * Power: self to the m.
9276  */
9277 
9278  /* function exit code */
9279  __pyx_L1_error:;
9280  __Pyx_XDECREF(__pyx_t_1);
9281  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9282  __pyx_r = NULL;
9283  __pyx_L0:;
9284  __Pyx_XGIVEREF(__pyx_r);
9285  __Pyx_RefNannyFinishContext();
9286  return __pyx_r;
9287  }
9288 
9289  /* "PyClical.pyx":979
9290  * return pow(self, m)
9291  *
9292  * def pow(self, m): # <<<<<<<<<<<<<<
9293  * """
9294  * Power: self to the m.
9295  */
9296 
9297  /* Python wrapper */
9298  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9299  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 ";
9300  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9301  PyObject *__pyx_r = 0;
9302  __Pyx_RefNannyDeclarations
9303  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9304  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9305 
9306  /* function exit code */
9307  __Pyx_RefNannyFinishContext();
9308  return __pyx_r;
9309  }
9310 
9311  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9312  PyObject *__pyx_r = NULL;
9313  __Pyx_RefNannyDeclarations
9314  PyObject *__pyx_t_1 = NULL;
9315  PyObject *__pyx_t_2 = NULL;
9316  int __pyx_t_3;
9317  int __pyx_t_4;
9318  int __pyx_t_5;
9319  __Pyx_RefNannySetupContext("pow", 0);
9320 
9321  /* "PyClical.pyx":998
9322  * 1
9323  * """
9324  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9325  * return clifford().wrap( self.instance.pow(m) )
9326  * else:
9327  */
9328  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9329  __Pyx_GOTREF(__pyx_t_1);
9330  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Integral); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
9331  __Pyx_GOTREF(__pyx_t_2);
9332  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9333  __pyx_t_3 = PyObject_IsInstance(__pyx_v_m, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 998, __pyx_L1_error)
9334  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9335  __pyx_t_4 = (__pyx_t_3 != 0);
9336  if (__pyx_t_4) {
9337 
9338  /* "PyClical.pyx":999
9339  * """
9340  * if isinstance(m, numbers.Integral):
9341  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9342  * else:
9343  * return exp(m * log(self))
9344  */
9345  __Pyx_XDECREF(__pyx_r);
9346  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9347  __Pyx_GOTREF(__pyx_t_2);
9348  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 999, __pyx_L1_error)
9349  __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, 999, __pyx_L1_error)
9350  __Pyx_GOTREF(__pyx_t_1);
9351  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9352  __pyx_r = __pyx_t_1;
9353  __pyx_t_1 = 0;
9354  goto __pyx_L0;
9355 
9356  /* "PyClical.pyx":998
9357  * 1
9358  * """
9359  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9360  * return clifford().wrap( self.instance.pow(m) )
9361  * else:
9362  */
9363  }
9364 
9365  /* "PyClical.pyx":1001
9366  * return clifford().wrap( self.instance.pow(m) )
9367  * else:
9368  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9369  *
9370  * def outer_pow(self, m):
9371  */
9372  /*else*/ {
9373  __Pyx_XDECREF(__pyx_r);
9374  __pyx_t_1 = __pyx_f_8PyClical_log(((PyObject *)__pyx_v_self), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9375  __Pyx_GOTREF(__pyx_t_1);
9376  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9377  __Pyx_GOTREF(__pyx_t_2);
9378  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9379  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9380  __Pyx_GOTREF(__pyx_t_1);
9381  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9382  __pyx_r = __pyx_t_1;
9383  __pyx_t_1 = 0;
9384  goto __pyx_L0;
9385  }
9386 
9387  /* "PyClical.pyx":979
9388  * return pow(self, m)
9389  *
9390  * def pow(self, m): # <<<<<<<<<<<<<<
9391  * """
9392  * Power: self to the m.
9393  */
9394 
9395  /* function exit code */
9396  __pyx_L1_error:;
9397  __Pyx_XDECREF(__pyx_t_1);
9398  __Pyx_XDECREF(__pyx_t_2);
9399  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9400  __pyx_r = NULL;
9401  __pyx_L0:;
9402  __Pyx_XGIVEREF(__pyx_r);
9403  __Pyx_RefNannyFinishContext();
9404  return __pyx_r;
9405  }
9406 
9407  /* "PyClical.pyx":1003
9408  * return exp(m * log(self))
9409  *
9410  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9411  * """
9412  * Outer product power.
9413  */
9414 
9415  /* Python wrapper */
9416  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9417  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 ";
9418  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9419  PyObject *__pyx_r = 0;
9420  __Pyx_RefNannyDeclarations
9421  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9422  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9423 
9424  /* function exit code */
9425  __Pyx_RefNannyFinishContext();
9426  return __pyx_r;
9427  }
9428 
9429  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9430  PyObject *__pyx_r = NULL;
9431  __Pyx_RefNannyDeclarations
9432  PyObject *__pyx_t_1 = NULL;
9433  int __pyx_t_2;
9434  PyObject *__pyx_t_3 = NULL;
9435  __Pyx_RefNannySetupContext("outer_pow", 0);
9436 
9437  /* "PyClical.pyx":1017
9438  *
9439  * """
9440  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9441  *
9442  * def __call__(self, grade):
9443  */
9444  __Pyx_XDECREF(__pyx_r);
9445  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
9446  __Pyx_GOTREF(__pyx_t_1);
9447  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1017, __pyx_L1_error)
9448  __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, 1017, __pyx_L1_error)
9449  __Pyx_GOTREF(__pyx_t_3);
9450  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9451  __pyx_r = __pyx_t_3;
9452  __pyx_t_3 = 0;
9453  goto __pyx_L0;
9454 
9455  /* "PyClical.pyx":1003
9456  * return exp(m * log(self))
9457  *
9458  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9459  * """
9460  * Outer product power.
9461  */
9462 
9463  /* function exit code */
9464  __pyx_L1_error:;
9465  __Pyx_XDECREF(__pyx_t_1);
9466  __Pyx_XDECREF(__pyx_t_3);
9467  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9468  __pyx_r = NULL;
9469  __pyx_L0:;
9470  __Pyx_XGIVEREF(__pyx_r);
9471  __Pyx_RefNannyFinishContext();
9472  return __pyx_r;
9473  }
9474 
9475  /* "PyClical.pyx":1019
9476  * return clifford().wrap( self.instance.outer_pow(m) )
9477  *
9478  * def __call__(self, grade): # <<<<<<<<<<<<<<
9479  * """
9480  * Pure grade-vector part.
9481  */
9482 
9483  /* Python wrapper */
9484  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9485  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 ";
9486  #if CYTHON_COMPILING_IN_CPYTHON
9487  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9488  #endif
9489  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9490  PyObject *__pyx_v_grade = 0;
9491  PyObject *__pyx_r = 0;
9492  __Pyx_RefNannyDeclarations
9493  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9494  {
9495  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9496  PyObject* values[1] = {0};
9497  if (unlikely(__pyx_kwds)) {
9498  Py_ssize_t kw_args;
9499  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9500  switch (pos_args) {
9501  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9502  CYTHON_FALLTHROUGH;
9503  case 0: break;
9504  default: goto __pyx_L5_argtuple_error;
9505  }
9506  kw_args = PyDict_Size(__pyx_kwds);
9507  switch (pos_args) {
9508  case 0:
9509  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9510  else goto __pyx_L5_argtuple_error;
9511  }
9512  if (unlikely(kw_args > 0)) {
9513  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9514  }
9515  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9516  goto __pyx_L5_argtuple_error;
9517  } else {
9518  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9519  }
9520  __pyx_v_grade = values[0];
9521  }
9522  goto __pyx_L4_argument_unpacking_done;
9523  __pyx_L5_argtuple_error:;
9524  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9525  __pyx_L3_error:;
9526  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9527  __Pyx_RefNannyFinishContext();
9528  return NULL;
9529  __pyx_L4_argument_unpacking_done:;
9530  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9531 
9532  /* function exit code */
9533  __Pyx_RefNannyFinishContext();
9534  return __pyx_r;
9535  }
9536 
9537  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9538  PyObject *__pyx_r = NULL;
9539  __Pyx_RefNannyDeclarations
9540  PyObject *__pyx_t_1 = NULL;
9541  int __pyx_t_2;
9542  PyObject *__pyx_t_3 = NULL;
9543  __Pyx_RefNannySetupContext("__call__", 0);
9544 
9545  /* "PyClical.pyx":1036
9546  * 0
9547  * """
9548  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9549  *
9550  * def scalar(self):
9551  */
9552  __Pyx_XDECREF(__pyx_r);
9553  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
9554  __Pyx_GOTREF(__pyx_t_1);
9555  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_grade); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1036, __pyx_L1_error)
9556  __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, 1036, __pyx_L1_error)
9557  __Pyx_GOTREF(__pyx_t_3);
9558  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9559  __pyx_r = __pyx_t_3;
9560  __pyx_t_3 = 0;
9561  goto __pyx_L0;
9562 
9563  /* "PyClical.pyx":1019
9564  * return clifford().wrap( self.instance.outer_pow(m) )
9565  *
9566  * def __call__(self, grade): # <<<<<<<<<<<<<<
9567  * """
9568  * Pure grade-vector part.
9569  */
9570 
9571  /* function exit code */
9572  __pyx_L1_error:;
9573  __Pyx_XDECREF(__pyx_t_1);
9574  __Pyx_XDECREF(__pyx_t_3);
9575  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9576  __pyx_r = NULL;
9577  __pyx_L0:;
9578  __Pyx_XGIVEREF(__pyx_r);
9579  __Pyx_RefNannyFinishContext();
9580  return __pyx_r;
9581  }
9582 
9583  /* "PyClical.pyx":1038
9584  * return clifford().wrap( self.instance.call(grade) )
9585  *
9586  * def scalar(self): # <<<<<<<<<<<<<<
9587  * """
9588  * Scalar part.
9589  */
9590 
9591  /* Python wrapper */
9592  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9593  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 ";
9594  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9595  PyObject *__pyx_r = 0;
9596  __Pyx_RefNannyDeclarations
9597  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9598  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9599 
9600  /* function exit code */
9601  __Pyx_RefNannyFinishContext();
9602  return __pyx_r;
9603  }
9604 
9605  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9606  PyObject *__pyx_r = NULL;
9607  __Pyx_RefNannyDeclarations
9608  PyObject *__pyx_t_1 = NULL;
9609  __Pyx_RefNannySetupContext("scalar", 0);
9610 
9611  /* "PyClical.pyx":1047
9612  * 0.0
9613  * """
9614  * return self.instance.scalar() # <<<<<<<<<<<<<<
9615  *
9616  * def pure(self):
9617  */
9618  __Pyx_XDECREF(__pyx_r);
9619  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9620  __Pyx_GOTREF(__pyx_t_1);
9621  __pyx_r = __pyx_t_1;
9622  __pyx_t_1 = 0;
9623  goto __pyx_L0;
9624 
9625  /* "PyClical.pyx":1038
9626  * return clifford().wrap( self.instance.call(grade) )
9627  *
9628  * def scalar(self): # <<<<<<<<<<<<<<
9629  * """
9630  * Scalar part.
9631  */
9632 
9633  /* function exit code */
9634  __pyx_L1_error:;
9635  __Pyx_XDECREF(__pyx_t_1);
9636  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9637  __pyx_r = NULL;
9638  __pyx_L0:;
9639  __Pyx_XGIVEREF(__pyx_r);
9640  __Pyx_RefNannyFinishContext();
9641  return __pyx_r;
9642  }
9643 
9644  /* "PyClical.pyx":1049
9645  * return self.instance.scalar()
9646  *
9647  * def pure(self): # <<<<<<<<<<<<<<
9648  * """
9649  * Pure part.
9650  */
9651 
9652  /* Python wrapper */
9653  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9654  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 ";
9655  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9656  PyObject *__pyx_r = 0;
9657  __Pyx_RefNannyDeclarations
9658  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9659  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9660 
9661  /* function exit code */
9662  __Pyx_RefNannyFinishContext();
9663  return __pyx_r;
9664  }
9665 
9666  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9667  PyObject *__pyx_r = NULL;
9668  __Pyx_RefNannyDeclarations
9669  PyObject *__pyx_t_1 = NULL;
9670  PyObject *__pyx_t_2 = NULL;
9671  __Pyx_RefNannySetupContext("pure", 0);
9672 
9673  /* "PyClical.pyx":1058
9674  * {1,2}
9675  * """
9676  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9677  *
9678  * def even(self):
9679  */
9680  __Pyx_XDECREF(__pyx_r);
9681  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
9682  __Pyx_GOTREF(__pyx_t_1);
9683  __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, 1058, __pyx_L1_error)
9684  __Pyx_GOTREF(__pyx_t_2);
9685  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9686  __pyx_r = __pyx_t_2;
9687  __pyx_t_2 = 0;
9688  goto __pyx_L0;
9689 
9690  /* "PyClical.pyx":1049
9691  * return self.instance.scalar()
9692  *
9693  * def pure(self): # <<<<<<<<<<<<<<
9694  * """
9695  * Pure part.
9696  */
9697 
9698  /* function exit code */
9699  __pyx_L1_error:;
9700  __Pyx_XDECREF(__pyx_t_1);
9701  __Pyx_XDECREF(__pyx_t_2);
9702  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9703  __pyx_r = NULL;
9704  __pyx_L0:;
9705  __Pyx_XGIVEREF(__pyx_r);
9706  __Pyx_RefNannyFinishContext();
9707  return __pyx_r;
9708  }
9709 
9710  /* "PyClical.pyx":1060
9711  * return clifford().wrap( self.instance.pure() )
9712  *
9713  * def even(self): # <<<<<<<<<<<<<<
9714  * """
9715  * Even part of multivector, sum of even grade terms.
9716  */
9717 
9718  /* Python wrapper */
9719  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9720  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 ";
9721  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9722  PyObject *__pyx_r = 0;
9723  __Pyx_RefNannyDeclarations
9724  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9725  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9726 
9727  /* function exit code */
9728  __Pyx_RefNannyFinishContext();
9729  return __pyx_r;
9730  }
9731 
9732  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9733  PyObject *__pyx_r = NULL;
9734  __Pyx_RefNannyDeclarations
9735  PyObject *__pyx_t_1 = NULL;
9736  PyObject *__pyx_t_2 = NULL;
9737  __Pyx_RefNannySetupContext("even", 0);
9738 
9739  /* "PyClical.pyx":1067
9740  * 1+{1,2}
9741  * """
9742  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9743  *
9744  * def odd(self):
9745  */
9746  __Pyx_XDECREF(__pyx_r);
9747  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
9748  __Pyx_GOTREF(__pyx_t_1);
9749  __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, 1067, __pyx_L1_error)
9750  __Pyx_GOTREF(__pyx_t_2);
9751  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9752  __pyx_r = __pyx_t_2;
9753  __pyx_t_2 = 0;
9754  goto __pyx_L0;
9755 
9756  /* "PyClical.pyx":1060
9757  * return clifford().wrap( self.instance.pure() )
9758  *
9759  * def even(self): # <<<<<<<<<<<<<<
9760  * """
9761  * Even part of multivector, sum of even grade terms.
9762  */
9763 
9764  /* function exit code */
9765  __pyx_L1_error:;
9766  __Pyx_XDECREF(__pyx_t_1);
9767  __Pyx_XDECREF(__pyx_t_2);
9768  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9769  __pyx_r = NULL;
9770  __pyx_L0:;
9771  __Pyx_XGIVEREF(__pyx_r);
9772  __Pyx_RefNannyFinishContext();
9773  return __pyx_r;
9774  }
9775 
9776  /* "PyClical.pyx":1069
9777  * return clifford().wrap( self.instance.even() )
9778  *
9779  * def odd(self): # <<<<<<<<<<<<<<
9780  * """
9781  * Odd part of multivector, sum of odd grade terms.
9782  */
9783 
9784  /* Python wrapper */
9785  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9786  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 ";
9787  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9788  PyObject *__pyx_r = 0;
9789  __Pyx_RefNannyDeclarations
9790  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9791  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9792 
9793  /* function exit code */
9794  __Pyx_RefNannyFinishContext();
9795  return __pyx_r;
9796  }
9797 
9798  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9799  PyObject *__pyx_r = NULL;
9800  __Pyx_RefNannyDeclarations
9801  PyObject *__pyx_t_1 = NULL;
9802  PyObject *__pyx_t_2 = NULL;
9803  __Pyx_RefNannySetupContext("odd", 0);
9804 
9805  /* "PyClical.pyx":1076
9806  * {1}
9807  * """
9808  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9809  *
9810  * def vector_part(self, frm = None):
9811  */
9812  __Pyx_XDECREF(__pyx_r);
9813  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
9814  __Pyx_GOTREF(__pyx_t_1);
9815  __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, 1076, __pyx_L1_error)
9816  __Pyx_GOTREF(__pyx_t_2);
9817  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9818  __pyx_r = __pyx_t_2;
9819  __pyx_t_2 = 0;
9820  goto __pyx_L0;
9821 
9822  /* "PyClical.pyx":1069
9823  * return clifford().wrap( self.instance.even() )
9824  *
9825  * def odd(self): # <<<<<<<<<<<<<<
9826  * """
9827  * Odd part of multivector, sum of odd grade terms.
9828  */
9829 
9830  /* function exit code */
9831  __pyx_L1_error:;
9832  __Pyx_XDECREF(__pyx_t_1);
9833  __Pyx_XDECREF(__pyx_t_2);
9834  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9835  __pyx_r = NULL;
9836  __pyx_L0:;
9837  __Pyx_XGIVEREF(__pyx_r);
9838  __Pyx_RefNannyFinishContext();
9839  return __pyx_r;
9840  }
9841 
9842  /* "PyClical.pyx":1078
9843  * return clifford().wrap( self.instance.odd() )
9844  *
9845  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9846  * """
9847  * Vector part of multivector, as a Python list, with respect to frm.
9848  */
9849 
9850  /* Python wrapper */
9851  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9852  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 ";
9853  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9854  PyObject *__pyx_v_frm = 0;
9855  PyObject *__pyx_r = 0;
9856  __Pyx_RefNannyDeclarations
9857  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9858  {
9859  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9860  PyObject* values[1] = {0};
9861  values[0] = ((PyObject *)Py_None);
9862  if (unlikely(__pyx_kwds)) {
9863  Py_ssize_t kw_args;
9864  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9865  switch (pos_args) {
9866  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9867  CYTHON_FALLTHROUGH;
9868  case 0: break;
9869  default: goto __pyx_L5_argtuple_error;
9870  }
9871  kw_args = PyDict_Size(__pyx_kwds);
9872  switch (pos_args) {
9873  case 0:
9874  if (kw_args > 0) {
9875  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
9876  if (value) { values[0] = value; kw_args--; }
9877  }
9878  }
9879  if (unlikely(kw_args > 0)) {
9880  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9881  }
9882  } else {
9883  switch (PyTuple_GET_SIZE(__pyx_args)) {
9884  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9885  CYTHON_FALLTHROUGH;
9886  case 0: break;
9887  default: goto __pyx_L5_argtuple_error;
9888  }
9889  }
9890  __pyx_v_frm = values[0];
9891  }
9892  goto __pyx_L4_argument_unpacking_done;
9893  __pyx_L5_argtuple_error:;
9894  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9895  __pyx_L3_error:;
9896  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9897  __Pyx_RefNannyFinishContext();
9898  return NULL;
9899  __pyx_L4_argument_unpacking_done:;
9900  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9901 
9902  /* function exit code */
9903  __Pyx_RefNannyFinishContext();
9904  return __pyx_r;
9905  }
9906 
9907  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9908  PyObject *__pyx_v_error_msg_prefix = NULL;
9909  std::vector<scalar_t> __pyx_v_vec;
9910  int __pyx_v_n;
9911  int __pyx_v_i;
9912  PyObject *__pyx_v_lst = NULL;
9913  PyObject *__pyx_v_err = NULL;
9914  PyObject *__pyx_r = NULL;
9915  __Pyx_RefNannyDeclarations
9916  PyObject *__pyx_t_1 = NULL;
9917  PyObject *__pyx_t_2 = NULL;
9918  PyObject *__pyx_t_3 = NULL;
9919  int __pyx_t_4;
9920  int __pyx_t_5;
9921  std::vector<scalar_t> __pyx_t_6;
9922  PyObject *__pyx_t_7 = NULL;
9923  int __pyx_t_8;
9924  int __pyx_t_9;
9925  int __pyx_t_10;
9926  PyObject *__pyx_t_11 = NULL;
9927  PyObject *__pyx_t_12 = NULL;
9928  PyObject *__pyx_t_13 = NULL;
9929  PyObject *__pyx_t_14 = NULL;
9930  PyObject *__pyx_t_15 = NULL;
9931  __Pyx_RefNannySetupContext("vector_part", 0);
9932 
9933  /* "PyClical.pyx":1087
9934  * [0.0, 2.0, 3.0]
9935  * """
9936  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9937  * cdef vector[scalar_t] vec
9938  * cdef int n
9939  */
9940  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9941  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9942 
9943  /* "PyClical.pyx":1091
9944  * cdef int n
9945  * cdef int i
9946  * try: # <<<<<<<<<<<<<<
9947  * if frm is None:
9948  * vec = self.instance.vector_part()
9949  */
9950  {
9951  __Pyx_PyThreadState_declare
9952  __Pyx_PyThreadState_assign
9953  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9954  __Pyx_XGOTREF(__pyx_t_1);
9955  __Pyx_XGOTREF(__pyx_t_2);
9956  __Pyx_XGOTREF(__pyx_t_3);
9957  /*try:*/ {
9958 
9959  /* "PyClical.pyx":1092
9960  * cdef int i
9961  * try:
9962  * if frm is None: # <<<<<<<<<<<<<<
9963  * vec = self.instance.vector_part()
9964  * else:
9965  */
9966  __pyx_t_4 = (__pyx_v_frm == Py_None);
9967  __pyx_t_5 = (__pyx_t_4 != 0);
9968  if (__pyx_t_5) {
9969 
9970  /* "PyClical.pyx":1093
9971  * try:
9972  * if frm is None:
9973  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
9974  * else:
9975  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9976  */
9977  __pyx_t_6 = __pyx_v_self->instance->vector_part();
9978  __pyx_v_vec = __pyx_t_6;
9979 
9980  /* "PyClical.pyx":1092
9981  * cdef int i
9982  * try:
9983  * if frm is None: # <<<<<<<<<<<<<<
9984  * vec = self.instance.vector_part()
9985  * else:
9986  */
9987  goto __pyx_L9;
9988  }
9989 
9990  /* "PyClical.pyx":1095
9991  * vec = self.instance.vector_part()
9992  * else:
9993  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
9994  * n = vec.size()
9995  * lst = [0.0]*n
9996  */
9997  /*else*/ {
9998  try {
9999  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
10000  } catch(...) {
10001  __Pyx_CppExn2PyErr();
10002  __PYX_ERR(0, 1095, __pyx_L3_error)
10003  }
10004  __pyx_v_vec = __pyx_t_6;
10005  }
10006  __pyx_L9:;
10007 
10008  /* "PyClical.pyx":1096
10009  * else:
10010  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10011  * n = vec.size() # <<<<<<<<<<<<<<
10012  * lst = [0.0]*n
10013  * for i in xrange(n):
10014  */
10015  __pyx_v_n = __pyx_v_vec.size();
10016 
10017  /* "PyClical.pyx":1097
10018  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10019  * n = vec.size()
10020  * lst = [0.0]*n # <<<<<<<<<<<<<<
10021  * for i in xrange(n):
10022  * lst[i] = vec[i]
10023  */
10024  __pyx_t_7 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1097, __pyx_L3_error)
10025  __Pyx_GOTREF(__pyx_t_7);
10026  { Py_ssize_t __pyx_temp;
10027  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10028  __Pyx_INCREF(__pyx_float_0_0);
10029  __Pyx_GIVEREF(__pyx_float_0_0);
10030  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10031  }
10032  }
10033  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10034  __pyx_t_7 = 0;
10035 
10036  /* "PyClical.pyx":1098
10037  * n = vec.size()
10038  * lst = [0.0]*n
10039  * for i in xrange(n): # <<<<<<<<<<<<<<
10040  * lst[i] = vec[i]
10041  * return lst
10042  */
10043  __pyx_t_8 = __pyx_v_n;
10044  __pyx_t_9 = __pyx_t_8;
10045  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10046  __pyx_v_i = __pyx_t_10;
10047 
10048  /* "PyClical.pyx":1099
10049  * lst = [0.0]*n
10050  * for i in xrange(n):
10051  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10052  * return lst
10053  * except RuntimeError as err:
10054  */
10055  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
10056  __Pyx_GOTREF(__pyx_t_7);
10057  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, 1099, __pyx_L3_error)
10058  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10059  }
10060 
10061  /* "PyClical.pyx":1100
10062  * for i in xrange(n):
10063  * lst[i] = vec[i]
10064  * return lst # <<<<<<<<<<<<<<
10065  * except RuntimeError as err:
10066  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10067  */
10068  __Pyx_XDECREF(__pyx_r);
10069  __Pyx_INCREF(__pyx_v_lst);
10070  __pyx_r = __pyx_v_lst;
10071  goto __pyx_L7_try_return;
10072 
10073  /* "PyClical.pyx":1091
10074  * cdef int n
10075  * cdef int i
10076  * try: # <<<<<<<<<<<<<<
10077  * if frm is None:
10078  * vec = self.instance.vector_part()
10079  */
10080  }
10081  __pyx_L3_error:;
10082  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10083 
10084  /* "PyClical.pyx":1101
10085  * lst[i] = vec[i]
10086  * return lst
10087  * except RuntimeError as err: # <<<<<<<<<<<<<<
10088  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10089  * + repr(frm) + " as frame:\n\t"
10090  */
10091  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10092  if (__pyx_t_8) {
10093  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10094  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10095  __Pyx_GOTREF(__pyx_t_7);
10096  __Pyx_GOTREF(__pyx_t_11);
10097  __Pyx_GOTREF(__pyx_t_12);
10098  __Pyx_INCREF(__pyx_t_11);
10099  __pyx_v_err = __pyx_t_11;
10100 
10101  /* "PyClical.pyx":1102
10102  * return lst
10103  * except RuntimeError as err:
10104  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10105  * + repr(frm) + " as frame:\n\t"
10106  * + str(err))
10107  */
10108  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10109  __Pyx_GOTREF(__pyx_t_13);
10110  __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10111  __Pyx_GOTREF(__pyx_t_14);
10112  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10113  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_using_invalid); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10114  __Pyx_GOTREF(__pyx_t_13);
10115  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10116 
10117  /* "PyClical.pyx":1103
10118  * except RuntimeError as err:
10119  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10120  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10121  * + str(err))
10122  *
10123  */
10124  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10125  __Pyx_GOTREF(__pyx_t_14);
10126  __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10127  __Pyx_GOTREF(__pyx_t_15);
10128  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10129  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10130  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_kp_s_as_frame); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10131  __Pyx_GOTREF(__pyx_t_14);
10132  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10133 
10134  /* "PyClical.pyx":1104
10135  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10136  * + repr(frm) + " as frame:\n\t"
10137  * + str(err)) # <<<<<<<<<<<<<<
10138  *
10139  * def involute(self):
10140  */
10141  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_err); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10142  __Pyx_GOTREF(__pyx_t_15);
10143  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10144  __Pyx_GOTREF(__pyx_t_13);
10145  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10146  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10147 
10148  /* "PyClical.pyx":1102
10149  * return lst
10150  * except RuntimeError as err:
10151  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10152  * + repr(frm) + " as frame:\n\t"
10153  * + str(err))
10154  */
10155  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10156  __Pyx_GOTREF(__pyx_t_15);
10157  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10158  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10159  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10160  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10161  }
10162  goto __pyx_L5_except_error;
10163  __pyx_L5_except_error:;
10164 
10165  /* "PyClical.pyx":1091
10166  * cdef int n
10167  * cdef int i
10168  * try: # <<<<<<<<<<<<<<
10169  * if frm is None:
10170  * vec = self.instance.vector_part()
10171  */
10172  __Pyx_XGIVEREF(__pyx_t_1);
10173  __Pyx_XGIVEREF(__pyx_t_2);
10174  __Pyx_XGIVEREF(__pyx_t_3);
10175  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10176  goto __pyx_L1_error;
10177  __pyx_L7_try_return:;
10178  __Pyx_XGIVEREF(__pyx_t_1);
10179  __Pyx_XGIVEREF(__pyx_t_2);
10180  __Pyx_XGIVEREF(__pyx_t_3);
10181  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10182  goto __pyx_L0;
10183  }
10184 
10185  /* "PyClical.pyx":1078
10186  * return clifford().wrap( self.instance.odd() )
10187  *
10188  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10189  * """
10190  * Vector part of multivector, as a Python list, with respect to frm.
10191  */
10192 
10193  /* function exit code */
10194  __pyx_L1_error:;
10195  __Pyx_XDECREF(__pyx_t_7);
10196  __Pyx_XDECREF(__pyx_t_11);
10197  __Pyx_XDECREF(__pyx_t_12);
10198  __Pyx_XDECREF(__pyx_t_13);
10199  __Pyx_XDECREF(__pyx_t_14);
10200  __Pyx_XDECREF(__pyx_t_15);
10201  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10202  __pyx_r = NULL;
10203  __pyx_L0:;
10204  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10205  __Pyx_XDECREF(__pyx_v_lst);
10206  __Pyx_XDECREF(__pyx_v_err);
10207  __Pyx_XGIVEREF(__pyx_r);
10208  __Pyx_RefNannyFinishContext();
10209  return __pyx_r;
10210  }
10211 
10212  /* "PyClical.pyx":1106
10213  * + str(err))
10214  *
10215  * def involute(self): # <<<<<<<<<<<<<<
10216  * """
10217  * Main involution, each {i} is replaced by -{i} in each term,
10218  */
10219 
10220  /* Python wrapper */
10221  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10222  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 ";
10223  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10224  PyObject *__pyx_r = 0;
10225  __Pyx_RefNannyDeclarations
10226  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10227  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10228 
10229  /* function exit code */
10230  __Pyx_RefNannyFinishContext();
10231  return __pyx_r;
10232  }
10233 
10234  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10235  PyObject *__pyx_r = NULL;
10236  __Pyx_RefNannyDeclarations
10237  PyObject *__pyx_t_1 = NULL;
10238  PyObject *__pyx_t_2 = NULL;
10239  __Pyx_RefNannySetupContext("involute", 0);
10240 
10241  /* "PyClical.pyx":1120
10242  * 1-{1}+{1,2}
10243  * """
10244  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10245  *
10246  * def reverse(self):
10247  */
10248  __Pyx_XDECREF(__pyx_r);
10249  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
10250  __Pyx_GOTREF(__pyx_t_1);
10251  __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, 1120, __pyx_L1_error)
10252  __Pyx_GOTREF(__pyx_t_2);
10253  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10254  __pyx_r = __pyx_t_2;
10255  __pyx_t_2 = 0;
10256  goto __pyx_L0;
10257 
10258  /* "PyClical.pyx":1106
10259  * + str(err))
10260  *
10261  * def involute(self): # <<<<<<<<<<<<<<
10262  * """
10263  * Main involution, each {i} is replaced by -{i} in each term,
10264  */
10265 
10266  /* function exit code */
10267  __pyx_L1_error:;
10268  __Pyx_XDECREF(__pyx_t_1);
10269  __Pyx_XDECREF(__pyx_t_2);
10270  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10271  __pyx_r = NULL;
10272  __pyx_L0:;
10273  __Pyx_XGIVEREF(__pyx_r);
10274  __Pyx_RefNannyFinishContext();
10275  return __pyx_r;
10276  }
10277 
10278  /* "PyClical.pyx":1122
10279  * return clifford().wrap( self.instance.involute() )
10280  *
10281  * def reverse(self): # <<<<<<<<<<<<<<
10282  * """
10283  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10284  */
10285 
10286  /* Python wrapper */
10287  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10288  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 ";
10289  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10290  PyObject *__pyx_r = 0;
10291  __Pyx_RefNannyDeclarations
10292  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10293  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10294 
10295  /* function exit code */
10296  __Pyx_RefNannyFinishContext();
10297  return __pyx_r;
10298  }
10299 
10300  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10301  PyObject *__pyx_r = NULL;
10302  __Pyx_RefNannyDeclarations
10303  PyObject *__pyx_t_1 = NULL;
10304  PyObject *__pyx_t_2 = NULL;
10305  __Pyx_RefNannySetupContext("reverse", 0);
10306 
10307  /* "PyClical.pyx":1135
10308  * 1+{1}-{1,2}
10309  * """
10310  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10311  *
10312  * def conj(self):
10313  */
10314  __Pyx_XDECREF(__pyx_r);
10315  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
10316  __Pyx_GOTREF(__pyx_t_1);
10317  __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, 1135, __pyx_L1_error)
10318  __Pyx_GOTREF(__pyx_t_2);
10319  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10320  __pyx_r = __pyx_t_2;
10321  __pyx_t_2 = 0;
10322  goto __pyx_L0;
10323 
10324  /* "PyClical.pyx":1122
10325  * return clifford().wrap( self.instance.involute() )
10326  *
10327  * def reverse(self): # <<<<<<<<<<<<<<
10328  * """
10329  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10330  */
10331 
10332  /* function exit code */
10333  __pyx_L1_error:;
10334  __Pyx_XDECREF(__pyx_t_1);
10335  __Pyx_XDECREF(__pyx_t_2);
10336  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10337  __pyx_r = NULL;
10338  __pyx_L0:;
10339  __Pyx_XGIVEREF(__pyx_r);
10340  __Pyx_RefNannyFinishContext();
10341  return __pyx_r;
10342  }
10343 
10344  /* "PyClical.pyx":1137
10345  * return clifford().wrap( self.instance.reverse() )
10346  *
10347  * def conj(self): # <<<<<<<<<<<<<<
10348  * """
10349  * Conjugation, reverse o involute == involute o reverse.
10350  */
10351 
10352  /* Python wrapper */
10353  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10354  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 ";
10355  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10356  PyObject *__pyx_r = 0;
10357  __Pyx_RefNannyDeclarations
10358  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10359  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10360 
10361  /* function exit code */
10362  __Pyx_RefNannyFinishContext();
10363  return __pyx_r;
10364  }
10365 
10366  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10367  PyObject *__pyx_r = NULL;
10368  __Pyx_RefNannyDeclarations
10369  PyObject *__pyx_t_1 = NULL;
10370  PyObject *__pyx_t_2 = NULL;
10371  __Pyx_RefNannySetupContext("conj", 0);
10372 
10373  /* "PyClical.pyx":1150
10374  * 1-{1}-{1,2}
10375  * """
10376  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10377  *
10378  * def quad(self):
10379  */
10380  __Pyx_XDECREF(__pyx_r);
10381  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
10382  __Pyx_GOTREF(__pyx_t_1);
10383  __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, 1150, __pyx_L1_error)
10384  __Pyx_GOTREF(__pyx_t_2);
10385  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10386  __pyx_r = __pyx_t_2;
10387  __pyx_t_2 = 0;
10388  goto __pyx_L0;
10389 
10390  /* "PyClical.pyx":1137
10391  * return clifford().wrap( self.instance.reverse() )
10392  *
10393  * def conj(self): # <<<<<<<<<<<<<<
10394  * """
10395  * Conjugation, reverse o involute == involute o reverse.
10396  */
10397 
10398  /* function exit code */
10399  __pyx_L1_error:;
10400  __Pyx_XDECREF(__pyx_t_1);
10401  __Pyx_XDECREF(__pyx_t_2);
10402  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10403  __pyx_r = NULL;
10404  __pyx_L0:;
10405  __Pyx_XGIVEREF(__pyx_r);
10406  __Pyx_RefNannyFinishContext();
10407  return __pyx_r;
10408  }
10409 
10410  /* "PyClical.pyx":1152
10411  * return clifford().wrap( self.instance.conj() )
10412  *
10413  * def quad(self): # <<<<<<<<<<<<<<
10414  * """
10415  * Quadratic form == (rev(x)*x)(0).
10416  */
10417 
10418  /* Python wrapper */
10419  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10420  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 ";
10421  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10422  PyObject *__pyx_r = 0;
10423  __Pyx_RefNannyDeclarations
10424  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10425  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10426 
10427  /* function exit code */
10428  __Pyx_RefNannyFinishContext();
10429  return __pyx_r;
10430  }
10431 
10432  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10433  PyObject *__pyx_r = NULL;
10434  __Pyx_RefNannyDeclarations
10435  PyObject *__pyx_t_1 = NULL;
10436  __Pyx_RefNannySetupContext("quad", 0);
10437 
10438  /* "PyClical.pyx":1161
10439  * 2.0
10440  * """
10441  * return self.instance.quad() # <<<<<<<<<<<<<<
10442  *
10443  * def norm(self):
10444  */
10445  __Pyx_XDECREF(__pyx_r);
10446  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10447  __Pyx_GOTREF(__pyx_t_1);
10448  __pyx_r = __pyx_t_1;
10449  __pyx_t_1 = 0;
10450  goto __pyx_L0;
10451 
10452  /* "PyClical.pyx":1152
10453  * return clifford().wrap( self.instance.conj() )
10454  *
10455  * def quad(self): # <<<<<<<<<<<<<<
10456  * """
10457  * Quadratic form == (rev(x)*x)(0).
10458  */
10459 
10460  /* function exit code */
10461  __pyx_L1_error:;
10462  __Pyx_XDECREF(__pyx_t_1);
10463  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10464  __pyx_r = NULL;
10465  __pyx_L0:;
10466  __Pyx_XGIVEREF(__pyx_r);
10467  __Pyx_RefNannyFinishContext();
10468  return __pyx_r;
10469  }
10470 
10471  /* "PyClical.pyx":1163
10472  * return self.instance.quad()
10473  *
10474  * def norm(self): # <<<<<<<<<<<<<<
10475  * """
10476  * Norm == sum of squares of coordinates.
10477  */
10478 
10479  /* Python wrapper */
10480  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10481  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 ";
10482  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10483  PyObject *__pyx_r = 0;
10484  __Pyx_RefNannyDeclarations
10485  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10486  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10487 
10488  /* function exit code */
10489  __Pyx_RefNannyFinishContext();
10490  return __pyx_r;
10491  }
10492 
10493  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10494  PyObject *__pyx_r = NULL;
10495  __Pyx_RefNannyDeclarations
10496  PyObject *__pyx_t_1 = NULL;
10497  __Pyx_RefNannySetupContext("norm", 0);
10498 
10499  /* "PyClical.pyx":1172
10500  * 4.0
10501  * """
10502  * return self.instance.norm() # <<<<<<<<<<<<<<
10503  *
10504  * def abs(self):
10505  */
10506  __Pyx_XDECREF(__pyx_r);
10507  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10508  __Pyx_GOTREF(__pyx_t_1);
10509  __pyx_r = __pyx_t_1;
10510  __pyx_t_1 = 0;
10511  goto __pyx_L0;
10512 
10513  /* "PyClical.pyx":1163
10514  * return self.instance.quad()
10515  *
10516  * def norm(self): # <<<<<<<<<<<<<<
10517  * """
10518  * Norm == sum of squares of coordinates.
10519  */
10520 
10521  /* function exit code */
10522  __pyx_L1_error:;
10523  __Pyx_XDECREF(__pyx_t_1);
10524  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10525  __pyx_r = NULL;
10526  __pyx_L0:;
10527  __Pyx_XGIVEREF(__pyx_r);
10528  __Pyx_RefNannyFinishContext();
10529  return __pyx_r;
10530  }
10531 
10532  /* "PyClical.pyx":1174
10533  * return self.instance.norm()
10534  *
10535  * def abs(self): # <<<<<<<<<<<<<<
10536  * """
10537  * Absolute value: square root of norm.
10538  */
10539 
10540  /* Python wrapper */
10541  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10542  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 ";
10543  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10544  PyObject *__pyx_r = 0;
10545  __Pyx_RefNannyDeclarations
10546  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10547  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10548 
10549  /* function exit code */
10550  __Pyx_RefNannyFinishContext();
10551  return __pyx_r;
10552  }
10553 
10554  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10555  PyObject *__pyx_r = NULL;
10556  __Pyx_RefNannyDeclarations
10557  PyObject *__pyx_t_1 = NULL;
10558  __Pyx_RefNannySetupContext("abs", 0);
10559 
10560  /* "PyClical.pyx":1181
10561  * 2.0
10562  * """
10563  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10564  *
10565  * def max_abs(self):
10566  */
10567  __Pyx_XDECREF(__pyx_r);
10568  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
10569  __Pyx_GOTREF(__pyx_t_1);
10570  __pyx_r = __pyx_t_1;
10571  __pyx_t_1 = 0;
10572  goto __pyx_L0;
10573 
10574  /* "PyClical.pyx":1174
10575  * return self.instance.norm()
10576  *
10577  * def abs(self): # <<<<<<<<<<<<<<
10578  * """
10579  * Absolute value: square root of norm.
10580  */
10581 
10582  /* function exit code */
10583  __pyx_L1_error:;
10584  __Pyx_XDECREF(__pyx_t_1);
10585  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10586  __pyx_r = NULL;
10587  __pyx_L0:;
10588  __Pyx_XGIVEREF(__pyx_r);
10589  __Pyx_RefNannyFinishContext();
10590  return __pyx_r;
10591  }
10592 
10593  /* "PyClical.pyx":1183
10594  * return glucat.abs( self.unwrap() )
10595  *
10596  * def max_abs(self): # <<<<<<<<<<<<<<
10597  * """
10598  * Maximum of absolute values of components of multivector: multivector infinity norm.
10599  */
10600 
10601  /* Python wrapper */
10602  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10603  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 ";
10604  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10605  PyObject *__pyx_r = 0;
10606  __Pyx_RefNannyDeclarations
10607  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10608  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10609 
10610  /* function exit code */
10611  __Pyx_RefNannyFinishContext();
10612  return __pyx_r;
10613  }
10614 
10615  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10616  PyObject *__pyx_r = NULL;
10617  __Pyx_RefNannyDeclarations
10618  PyObject *__pyx_t_1 = NULL;
10619  __Pyx_RefNannySetupContext("max_abs", 0);
10620 
10621  /* "PyClical.pyx":1192
10622  * 3.0
10623  * """
10624  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10625  *
10626  * def truncated(self, limit):
10627  */
10628  __Pyx_XDECREF(__pyx_r);
10629  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10630  __Pyx_GOTREF(__pyx_t_1);
10631  __pyx_r = __pyx_t_1;
10632  __pyx_t_1 = 0;
10633  goto __pyx_L0;
10634 
10635  /* "PyClical.pyx":1183
10636  * return glucat.abs( self.unwrap() )
10637  *
10638  * def max_abs(self): # <<<<<<<<<<<<<<
10639  * """
10640  * Maximum of absolute values of components of multivector: multivector infinity norm.
10641  */
10642 
10643  /* function exit code */
10644  __pyx_L1_error:;
10645  __Pyx_XDECREF(__pyx_t_1);
10646  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10647  __pyx_r = NULL;
10648  __pyx_L0:;
10649  __Pyx_XGIVEREF(__pyx_r);
10650  __Pyx_RefNannyFinishContext();
10651  return __pyx_r;
10652  }
10653 
10654  /* "PyClical.pyx":1194
10655  * return self.instance.max_abs()
10656  *
10657  * def truncated(self, limit): # <<<<<<<<<<<<<<
10658  * """
10659  * Remove all terms of self with relative size smaller than limit.
10660  */
10661 
10662  /* Python wrapper */
10663  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10664  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 ";
10665  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10666  PyObject *__pyx_r = 0;
10667  __Pyx_RefNannyDeclarations
10668  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10669  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10670 
10671  /* function exit code */
10672  __Pyx_RefNannyFinishContext();
10673  return __pyx_r;
10674  }
10675 
10676  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10677  PyObject *__pyx_r = NULL;
10678  __Pyx_RefNannyDeclarations
10679  PyObject *__pyx_t_1 = NULL;
10680  scalar_t __pyx_t_2;
10681  PyObject *__pyx_t_3 = NULL;
10682  __Pyx_RefNannySetupContext("truncated", 0);
10683 
10684  /* "PyClical.pyx":1203
10685  * clifford("10000+{1}")
10686  * """
10687  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10688  *
10689  * def isnan(self):
10690  */
10691  __Pyx_XDECREF(__pyx_r);
10692  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
10693  __Pyx_GOTREF(__pyx_t_1);
10694  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_limit); if (unlikely((__pyx_t_2 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L1_error)
10695  __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, 1203, __pyx_L1_error)
10696  __Pyx_GOTREF(__pyx_t_3);
10697  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10698  __pyx_r = __pyx_t_3;
10699  __pyx_t_3 = 0;
10700  goto __pyx_L0;
10701 
10702  /* "PyClical.pyx":1194
10703  * return self.instance.max_abs()
10704  *
10705  * def truncated(self, limit): # <<<<<<<<<<<<<<
10706  * """
10707  * Remove all terms of self with relative size smaller than limit.
10708  */
10709 
10710  /* function exit code */
10711  __pyx_L1_error:;
10712  __Pyx_XDECREF(__pyx_t_1);
10713  __Pyx_XDECREF(__pyx_t_3);
10714  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10715  __pyx_r = NULL;
10716  __pyx_L0:;
10717  __Pyx_XGIVEREF(__pyx_r);
10718  __Pyx_RefNannyFinishContext();
10719  return __pyx_r;
10720  }
10721 
10722  /* "PyClical.pyx":1205
10723  * return clifford().wrap( self.instance.truncated(limit) )
10724  *
10725  * def isnan(self): # <<<<<<<<<<<<<<
10726  * """
10727  * Check if a multivector contains any IEEE NaN values.
10728  */
10729 
10730  /* Python wrapper */
10731  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10732  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10733  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10734  PyObject *__pyx_r = 0;
10735  __Pyx_RefNannyDeclarations
10736  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10737  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10738 
10739  /* function exit code */
10740  __Pyx_RefNannyFinishContext();
10741  return __pyx_r;
10742  }
10743 
10744  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10745  PyObject *__pyx_r = NULL;
10746  __Pyx_RefNannyDeclarations
10747  PyObject *__pyx_t_1 = NULL;
10748  __Pyx_RefNannySetupContext("isnan", 0);
10749 
10750  /* "PyClical.pyx":1212
10751  * False
10752  * """
10753  * return self.instance.isnan() # <<<<<<<<<<<<<<
10754  *
10755  * def frame(self):
10756  */
10757  __Pyx_XDECREF(__pyx_r);
10758  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10759  __Pyx_GOTREF(__pyx_t_1);
10760  __pyx_r = __pyx_t_1;
10761  __pyx_t_1 = 0;
10762  goto __pyx_L0;
10763 
10764  /* "PyClical.pyx":1205
10765  * return clifford().wrap( self.instance.truncated(limit) )
10766  *
10767  * def isnan(self): # <<<<<<<<<<<<<<
10768  * """
10769  * Check if a multivector contains any IEEE NaN values.
10770  */
10771 
10772  /* function exit code */
10773  __pyx_L1_error:;
10774  __Pyx_XDECREF(__pyx_t_1);
10775  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10776  __pyx_r = NULL;
10777  __pyx_L0:;
10778  __Pyx_XGIVEREF(__pyx_r);
10779  __Pyx_RefNannyFinishContext();
10780  return __pyx_r;
10781  }
10782 
10783  /* "PyClical.pyx":1214
10784  * return self.instance.isnan()
10785  *
10786  * def frame(self): # <<<<<<<<<<<<<<
10787  * """
10788  * Subalgebra generated by all generators of terms of given multivector.
10789  */
10790 
10791  /* Python wrapper */
10792  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10793  static char __pyx_doc_8PyClical_8clifford_90frame[] = "\n Subalgebra generated by all generators of terms of given multivector.\n\n >>> print clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame()\n {-2,-1,1,2,7}\n >>> s=clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame(); type(s)\n <type 'PyClical.index_set'>\n ";
10794  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10795  PyObject *__pyx_r = 0;
10796  __Pyx_RefNannyDeclarations
10797  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10798  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10799 
10800  /* function exit code */
10801  __Pyx_RefNannyFinishContext();
10802  return __pyx_r;
10803  }
10804 
10805  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10806  PyObject *__pyx_r = NULL;
10807  __Pyx_RefNannyDeclarations
10808  PyObject *__pyx_t_1 = NULL;
10809  PyObject *__pyx_t_2 = NULL;
10810  __Pyx_RefNannySetupContext("frame", 0);
10811 
10812  /* "PyClical.pyx":1223
10813  * <type 'PyClical.index_set'>
10814  * """
10815  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10816  *
10817  * def __repr__(self):
10818  */
10819  __Pyx_XDECREF(__pyx_r);
10820  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
10821  __Pyx_GOTREF(__pyx_t_1);
10822  __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, 1223, __pyx_L1_error)
10823  __Pyx_GOTREF(__pyx_t_2);
10824  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10825  __pyx_r = __pyx_t_2;
10826  __pyx_t_2 = 0;
10827  goto __pyx_L0;
10828 
10829  /* "PyClical.pyx":1214
10830  * return self.instance.isnan()
10831  *
10832  * def frame(self): # <<<<<<<<<<<<<<
10833  * """
10834  * Subalgebra generated by all generators of terms of given multivector.
10835  */
10836 
10837  /* function exit code */
10838  __pyx_L1_error:;
10839  __Pyx_XDECREF(__pyx_t_1);
10840  __Pyx_XDECREF(__pyx_t_2);
10841  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10842  __pyx_r = NULL;
10843  __pyx_L0:;
10844  __Pyx_XGIVEREF(__pyx_r);
10845  __Pyx_RefNannyFinishContext();
10846  return __pyx_r;
10847  }
10848 
10849  /* "PyClical.pyx":1225
10850  * return index_set().wrap( self.instance.frame() )
10851  *
10852  * def __repr__(self): # <<<<<<<<<<<<<<
10853  * """
10854  * The official string representation of self.
10855  */
10856 
10857  /* Python wrapper */
10858  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10859  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 ";
10860  #if CYTHON_COMPILING_IN_CPYTHON
10861  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10862  #endif
10863  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10864  PyObject *__pyx_r = 0;
10865  __Pyx_RefNannyDeclarations
10866  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10867  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10868 
10869  /* function exit code */
10870  __Pyx_RefNannyFinishContext();
10871  return __pyx_r;
10872  }
10873 
10874  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10875  PyObject *__pyx_r = NULL;
10876  __Pyx_RefNannyDeclarations
10877  PyObject *__pyx_t_1 = NULL;
10878  __Pyx_RefNannySetupContext("__repr__", 0);
10879 
10880  /* "PyClical.pyx":1232
10881  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10882  * """
10883  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10884  *
10885  * def __str__(self):
10886  */
10887  __Pyx_XDECREF(__pyx_r);
10888  __pyx_t_1 = __Pyx_PyBytes_FromString(clifford_to_repr(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error)
10889  __Pyx_GOTREF(__pyx_t_1);
10890  __pyx_r = __pyx_t_1;
10891  __pyx_t_1 = 0;
10892  goto __pyx_L0;
10893 
10894  /* "PyClical.pyx":1225
10895  * return index_set().wrap( self.instance.frame() )
10896  *
10897  * def __repr__(self): # <<<<<<<<<<<<<<
10898  * """
10899  * The official string representation of self.
10900  */
10901 
10902  /* function exit code */
10903  __pyx_L1_error:;
10904  __Pyx_XDECREF(__pyx_t_1);
10905  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10906  __pyx_r = NULL;
10907  __pyx_L0:;
10908  __Pyx_XGIVEREF(__pyx_r);
10909  __Pyx_RefNannyFinishContext();
10910  return __pyx_r;
10911  }
10912 
10913  /* "PyClical.pyx":1234
10914  * return clifford_to_repr( self.unwrap() ).c_str()
10915  *
10916  * def __str__(self): # <<<<<<<<<<<<<<
10917  * """
10918  * The informal string representation of self.
10919  */
10920 
10921  /* Python wrapper */
10922  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10923  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 ";
10924  #if CYTHON_COMPILING_IN_CPYTHON
10925  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10926  #endif
10927  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10928  PyObject *__pyx_r = 0;
10929  __Pyx_RefNannyDeclarations
10930  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10931  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10932 
10933  /* function exit code */
10934  __Pyx_RefNannyFinishContext();
10935  return __pyx_r;
10936  }
10937 
10938  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10939  PyObject *__pyx_r = NULL;
10940  __Pyx_RefNannyDeclarations
10941  PyObject *__pyx_t_1 = NULL;
10942  __Pyx_RefNannySetupContext("__str__", 0);
10943 
10944  /* "PyClical.pyx":1241
10945  * '1+3{-1}+2{1,2}+4{-2,7}'
10946  * """
10947  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10948  *
10949  * def clifford_hidden_doctests():
10950  */
10951  __Pyx_XDECREF(__pyx_r);
10952  __pyx_t_1 = __Pyx_PyBytes_FromString(clifford_to_str(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L1_error)
10953  __Pyx_GOTREF(__pyx_t_1);
10954  __pyx_r = __pyx_t_1;
10955  __pyx_t_1 = 0;
10956  goto __pyx_L0;
10957 
10958  /* "PyClical.pyx":1234
10959  * return clifford_to_repr( self.unwrap() ).c_str()
10960  *
10961  * def __str__(self): # <<<<<<<<<<<<<<
10962  * """
10963  * The informal string representation of self.
10964  */
10965 
10966  /* function exit code */
10967  __pyx_L1_error:;
10968  __Pyx_XDECREF(__pyx_t_1);
10969  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10970  __pyx_r = NULL;
10971  __pyx_L0:;
10972  __Pyx_XGIVEREF(__pyx_r);
10973  __Pyx_RefNannyFinishContext();
10974  return __pyx_r;
10975  }
10976 
10977  /* "(tree fragment)":1
10978  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10979  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10980  * def __setstate_cython__(self, __pyx_state):
10981  */
10982 
10983  /* Python wrapper */
10984  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10985  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10986  PyObject *__pyx_r = 0;
10987  __Pyx_RefNannyDeclarations
10988  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10989  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10990 
10991  /* function exit code */
10992  __Pyx_RefNannyFinishContext();
10993  return __pyx_r;
10994  }
10995 
10996  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10997  PyObject *__pyx_r = NULL;
10998  __Pyx_RefNannyDeclarations
10999  PyObject *__pyx_t_1 = NULL;
11000  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11001 
11002  /* "(tree fragment)":2
11003  * def __reduce_cython__(self):
11004  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11005  * def __setstate_cython__(self, __pyx_state):
11006  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11007  */
11008  __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)
11009  __Pyx_GOTREF(__pyx_t_1);
11010  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11011  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11012  __PYX_ERR(1, 2, __pyx_L1_error)
11013 
11014  /* "(tree fragment)":1
11015  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11016  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11017  * def __setstate_cython__(self, __pyx_state):
11018  */
11019 
11020  /* function exit code */
11021  __pyx_L1_error:;
11022  __Pyx_XDECREF(__pyx_t_1);
11023  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11024  __pyx_r = NULL;
11025  __Pyx_XGIVEREF(__pyx_r);
11026  __Pyx_RefNannyFinishContext();
11027  return __pyx_r;
11028  }
11029 
11030  /* "(tree fragment)":3
11031  * def __reduce_cython__(self):
11032  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11033  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11034  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11035  */
11036 
11037  /* Python wrapper */
11038  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11039  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11040  PyObject *__pyx_r = 0;
11041  __Pyx_RefNannyDeclarations
11042  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11043  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11044 
11045  /* function exit code */
11046  __Pyx_RefNannyFinishContext();
11047  return __pyx_r;
11048  }
11049 
11050  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) {
11051  PyObject *__pyx_r = NULL;
11052  __Pyx_RefNannyDeclarations
11053  PyObject *__pyx_t_1 = NULL;
11054  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11055 
11056  /* "(tree fragment)":4
11057  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11058  * def __setstate_cython__(self, __pyx_state):
11059  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11060  */
11061  __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)
11062  __Pyx_GOTREF(__pyx_t_1);
11063  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11064  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11065  __PYX_ERR(1, 4, __pyx_L1_error)
11066 
11067  /* "(tree fragment)":3
11068  * def __reduce_cython__(self):
11069  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11070  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11071  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11072  */
11073 
11074  /* function exit code */
11075  __pyx_L1_error:;
11076  __Pyx_XDECREF(__pyx_t_1);
11077  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11078  __pyx_r = NULL;
11079  __Pyx_XGIVEREF(__pyx_r);
11080  __Pyx_RefNannyFinishContext();
11081  return __pyx_r;
11082  }
11083 
11084  /* "PyClical.pyx":1243
11085  * return clifford_to_str( self.unwrap() ).c_str()
11086  *
11087  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11088  * """
11089  * Tests for functions that Doctest cannot see.
11090  */
11091 
11092  /* Python wrapper */
11093  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11094  static char __pyx_doc_8PyClical_8clifford_hidden_doctests[] = "\n Tests for functions that Doctest cannot see.\n\n For clifford.__cinit__: Construct an object of type clifford.\n\n >>> print clifford(2)\n 2\n >>> print clifford(2L)\n 2\n >>> print clifford(2.0)\n 2\n >>> print clifford(1.0e-1)\n 0.1\n >>> print clifford(\"2\")\n 2\n >>> print clifford(\"2{1,2,3}\")\n 2{1,2,3}\n >>> print clifford(clifford(\"2{1,2,3}\"))\n 2{1,2,3}\n >>> print clifford(\"-{1}\")\n -{1}\n >>> print clifford(2,index_set({1,2}))\n 2{1,2}\n >>> print clifford([2,3],index_set({1,2}))\n 2{1}+3{2}\n >>> print clifford([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'list'>.\n >>> print clifford(None)\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'NoneType'>.\n >>> print clifford(None,[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'NoneType'>, <type 'list'>).\n >>> print clifford([1,2],[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'list'>, <type 'list'>).\n >>> print clifford(\"\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string ''.\n >>> print clifford(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{'.\n >>> print clifford(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1'.\n >>> print clifford(\"+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '+'.\n >>> print clifford(\"-\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford"" object from invalid string '-'.\n >>> print clifford(\"{1}+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1}+'.\n\n For clifford.__richcmp__: Compare objects of type clifford.\n\n >>> clifford(\"{1}\") == clifford(\"1{1}\")\n True\n >>> clifford(\"{1}\") != clifford(\"1.0{1}\")\n False\n >>> clifford(\"{1}\") != clifford(\"1.0\")\n True\n >>> clifford(\"{1,2}\") == None\n False\n >>> clifford(\"{1,2}\") != None\n True\n >>> None == clifford(\"{1,2}\")\n False\n >>> None != clifford(\"{1,2}\")\n True\n ";
11095  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};
11096  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11097  PyObject *__pyx_r = 0;
11098  __Pyx_RefNannyDeclarations
11099  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11100  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11101 
11102  /* function exit code */
11103  __Pyx_RefNannyFinishContext();
11104  return __pyx_r;
11105  }
11106 
11107  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11108  PyObject *__pyx_r = NULL;
11109  __Pyx_RefNannyDeclarations
11110  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11111 
11112  /* "PyClical.pyx":1327
11113  * True
11114  * """
11115  * return # <<<<<<<<<<<<<<
11116  *
11117  * cpdef inline inv(obj):
11118  */
11119  __Pyx_XDECREF(__pyx_r);
11120  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11121  goto __pyx_L0;
11122 
11123  /* "PyClical.pyx":1243
11124  * return clifford_to_str( self.unwrap() ).c_str()
11125  *
11126  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11127  * """
11128  * Tests for functions that Doctest cannot see.
11129  */
11130 
11131  /* function exit code */
11132  __pyx_L0:;
11133  __Pyx_XGIVEREF(__pyx_r);
11134  __Pyx_RefNannyFinishContext();
11135  return __pyx_r;
11136  }
11137 
11138  /* "PyClical.pyx":1329
11139  * return
11140  *
11141  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11142  * """
11143  * Geometric multiplicative inverse.
11144  */
11145 
11146  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11147  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11148  PyObject *__pyx_r = NULL;
11149  __Pyx_RefNannyDeclarations
11150  PyObject *__pyx_t_1 = NULL;
11151  PyObject *__pyx_t_2 = NULL;
11152  PyObject *__pyx_t_3 = NULL;
11153  __Pyx_RefNannySetupContext("inv", 0);
11154 
11155  /* "PyClical.pyx":1342
11156  * nan
11157  * """
11158  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11159  *
11160  * cpdef inline scalar(obj):
11161  */
11162  __Pyx_XDECREF(__pyx_r);
11163  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error)
11164  __Pyx_GOTREF(__pyx_t_2);
11165  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error)
11166  __Pyx_GOTREF(__pyx_t_3);
11167  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11168  __pyx_t_2 = NULL;
11169  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11170  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11171  if (likely(__pyx_t_2)) {
11172  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11173  __Pyx_INCREF(__pyx_t_2);
11174  __Pyx_INCREF(function);
11175  __Pyx_DECREF_SET(__pyx_t_3, function);
11176  }
11177  }
11178  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11179  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11180  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11181  __Pyx_GOTREF(__pyx_t_1);
11182  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11183  __pyx_r = __pyx_t_1;
11184  __pyx_t_1 = 0;
11185  goto __pyx_L0;
11186 
11187  /* "PyClical.pyx":1329
11188  * return
11189  *
11190  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11191  * """
11192  * Geometric multiplicative inverse.
11193  */
11194 
11195  /* function exit code */
11196  __pyx_L1_error:;
11197  __Pyx_XDECREF(__pyx_t_1);
11198  __Pyx_XDECREF(__pyx_t_2);
11199  __Pyx_XDECREF(__pyx_t_3);
11200  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11201  __pyx_r = 0;
11202  __pyx_L0:;
11203  __Pyx_XGIVEREF(__pyx_r);
11204  __Pyx_RefNannyFinishContext();
11205  return __pyx_r;
11206  }
11207 
11208  /* Python wrapper */
11209  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11210  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 ";
11211  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11212  PyObject *__pyx_r = 0;
11213  __Pyx_RefNannyDeclarations
11214  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11215  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11216 
11217  /* function exit code */
11218  __Pyx_RefNannyFinishContext();
11219  return __pyx_r;
11220  }
11221 
11222  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11223  PyObject *__pyx_r = NULL;
11224  __Pyx_RefNannyDeclarations
11225  PyObject *__pyx_t_1 = NULL;
11226  __Pyx_RefNannySetupContext("inv", 0);
11227  __Pyx_XDECREF(__pyx_r);
11228  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11229  __Pyx_GOTREF(__pyx_t_1);
11230  __pyx_r = __pyx_t_1;
11231  __pyx_t_1 = 0;
11232  goto __pyx_L0;
11233 
11234  /* function exit code */
11235  __pyx_L1_error:;
11236  __Pyx_XDECREF(__pyx_t_1);
11237  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11238  __pyx_r = NULL;
11239  __pyx_L0:;
11240  __Pyx_XGIVEREF(__pyx_r);
11241  __Pyx_RefNannyFinishContext();
11242  return __pyx_r;
11243  }
11244 
11245  /* "PyClical.pyx":1344
11246  * return clifford(obj).inv()
11247  *
11248  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11249  * """
11250  * Scalar part.
11251  */
11252 
11253  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11254  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11255  PyObject *__pyx_r = NULL;
11256  __Pyx_RefNannyDeclarations
11257  PyObject *__pyx_t_1 = NULL;
11258  PyObject *__pyx_t_2 = NULL;
11259  PyObject *__pyx_t_3 = NULL;
11260  __Pyx_RefNannySetupContext("scalar", 0);
11261 
11262  /* "PyClical.pyx":1353
11263  * 0.0
11264  * """
11265  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11266  *
11267  * cpdef inline real(obj):
11268  */
11269  __Pyx_XDECREF(__pyx_r);
11270  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
11271  __Pyx_GOTREF(__pyx_t_2);
11272  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
11273  __Pyx_GOTREF(__pyx_t_3);
11274  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11275  __pyx_t_2 = NULL;
11276  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11277  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11278  if (likely(__pyx_t_2)) {
11279  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11280  __Pyx_INCREF(__pyx_t_2);
11281  __Pyx_INCREF(function);
11282  __Pyx_DECREF_SET(__pyx_t_3, function);
11283  }
11284  }
11285  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11286  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11287  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11288  __Pyx_GOTREF(__pyx_t_1);
11289  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11290  __pyx_r = __pyx_t_1;
11291  __pyx_t_1 = 0;
11292  goto __pyx_L0;
11293 
11294  /* "PyClical.pyx":1344
11295  * return clifford(obj).inv()
11296  *
11297  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11298  * """
11299  * Scalar part.
11300  */
11301 
11302  /* function exit code */
11303  __pyx_L1_error:;
11304  __Pyx_XDECREF(__pyx_t_1);
11305  __Pyx_XDECREF(__pyx_t_2);
11306  __Pyx_XDECREF(__pyx_t_3);
11307  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11308  __pyx_r = 0;
11309  __pyx_L0:;
11310  __Pyx_XGIVEREF(__pyx_r);
11311  __Pyx_RefNannyFinishContext();
11312  return __pyx_r;
11313  }
11314 
11315  /* Python wrapper */
11316  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11317  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 ";
11318  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11319  PyObject *__pyx_r = 0;
11320  __Pyx_RefNannyDeclarations
11321  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11322  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11323 
11324  /* function exit code */
11325  __Pyx_RefNannyFinishContext();
11326  return __pyx_r;
11327  }
11328 
11329  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11330  PyObject *__pyx_r = NULL;
11331  __Pyx_RefNannyDeclarations
11332  PyObject *__pyx_t_1 = NULL;
11333  __Pyx_RefNannySetupContext("scalar", 0);
11334  __Pyx_XDECREF(__pyx_r);
11335  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11336  __Pyx_GOTREF(__pyx_t_1);
11337  __pyx_r = __pyx_t_1;
11338  __pyx_t_1 = 0;
11339  goto __pyx_L0;
11340 
11341  /* function exit code */
11342  __pyx_L1_error:;
11343  __Pyx_XDECREF(__pyx_t_1);
11344  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11345  __pyx_r = NULL;
11346  __pyx_L0:;
11347  __Pyx_XGIVEREF(__pyx_r);
11348  __Pyx_RefNannyFinishContext();
11349  return __pyx_r;
11350  }
11351 
11352  /* "PyClical.pyx":1355
11353  * return clifford(obj).scalar()
11354  *
11355  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11356  * """
11357  * Real part: synonym for scalar part.
11358  */
11359 
11360  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11361  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11362  PyObject *__pyx_r = NULL;
11363  __Pyx_RefNannyDeclarations
11364  PyObject *__pyx_t_1 = NULL;
11365  PyObject *__pyx_t_2 = NULL;
11366  PyObject *__pyx_t_3 = NULL;
11367  __Pyx_RefNannySetupContext("real", 0);
11368 
11369  /* "PyClical.pyx":1364
11370  * 0.0
11371  * """
11372  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11373  *
11374  * cpdef inline imag(obj):
11375  */
11376  __Pyx_XDECREF(__pyx_r);
11377  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
11378  __Pyx_GOTREF(__pyx_t_2);
11379  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error)
11380  __Pyx_GOTREF(__pyx_t_3);
11381  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11382  __pyx_t_2 = NULL;
11383  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11384  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11385  if (likely(__pyx_t_2)) {
11386  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11387  __Pyx_INCREF(__pyx_t_2);
11388  __Pyx_INCREF(function);
11389  __Pyx_DECREF_SET(__pyx_t_3, function);
11390  }
11391  }
11392  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11393  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11394  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11395  __Pyx_GOTREF(__pyx_t_1);
11396  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11397  __pyx_r = __pyx_t_1;
11398  __pyx_t_1 = 0;
11399  goto __pyx_L0;
11400 
11401  /* "PyClical.pyx":1355
11402  * return clifford(obj).scalar()
11403  *
11404  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11405  * """
11406  * Real part: synonym for scalar part.
11407  */
11408 
11409  /* function exit code */
11410  __pyx_L1_error:;
11411  __Pyx_XDECREF(__pyx_t_1);
11412  __Pyx_XDECREF(__pyx_t_2);
11413  __Pyx_XDECREF(__pyx_t_3);
11414  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11415  __pyx_r = 0;
11416  __pyx_L0:;
11417  __Pyx_XGIVEREF(__pyx_r);
11418  __Pyx_RefNannyFinishContext();
11419  return __pyx_r;
11420  }
11421 
11422  /* Python wrapper */
11423  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11424  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 ";
11425  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11426  PyObject *__pyx_r = 0;
11427  __Pyx_RefNannyDeclarations
11428  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11429  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11430 
11431  /* function exit code */
11432  __Pyx_RefNannyFinishContext();
11433  return __pyx_r;
11434  }
11435 
11436  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11437  PyObject *__pyx_r = NULL;
11438  __Pyx_RefNannyDeclarations
11439  PyObject *__pyx_t_1 = NULL;
11440  __Pyx_RefNannySetupContext("real", 0);
11441  __Pyx_XDECREF(__pyx_r);
11442  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11443  __Pyx_GOTREF(__pyx_t_1);
11444  __pyx_r = __pyx_t_1;
11445  __pyx_t_1 = 0;
11446  goto __pyx_L0;
11447 
11448  /* function exit code */
11449  __pyx_L1_error:;
11450  __Pyx_XDECREF(__pyx_t_1);
11451  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11452  __pyx_r = NULL;
11453  __pyx_L0:;
11454  __Pyx_XGIVEREF(__pyx_r);
11455  __Pyx_RefNannyFinishContext();
11456  return __pyx_r;
11457  }
11458 
11459  /* "PyClical.pyx":1366
11460  * return clifford(obj).scalar()
11461  *
11462  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11463  * """
11464  * Imaginary part: deprecated (always 0).
11465  */
11466 
11467  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11468  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11469  PyObject *__pyx_r = NULL;
11470  __Pyx_RefNannyDeclarations
11471  __Pyx_RefNannySetupContext("imag", 0);
11472 
11473  /* "PyClical.pyx":1375
11474  * 0.0
11475  * """
11476  * return 0.0 # <<<<<<<<<<<<<<
11477  *
11478  * cpdef inline pure(obj):
11479  */
11480  __Pyx_XDECREF(__pyx_r);
11481  __Pyx_INCREF(__pyx_float_0_0);
11482  __pyx_r = __pyx_float_0_0;
11483  goto __pyx_L0;
11484 
11485  /* "PyClical.pyx":1366
11486  * return clifford(obj).scalar()
11487  *
11488  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11489  * """
11490  * Imaginary part: deprecated (always 0).
11491  */
11492 
11493  /* function exit code */
11494  __pyx_L0:;
11495  __Pyx_XGIVEREF(__pyx_r);
11496  __Pyx_RefNannyFinishContext();
11497  return __pyx_r;
11498  }
11499 
11500  /* Python wrapper */
11501  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11502  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 ";
11503  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11504  PyObject *__pyx_r = 0;
11505  __Pyx_RefNannyDeclarations
11506  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11507  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11508 
11509  /* function exit code */
11510  __Pyx_RefNannyFinishContext();
11511  return __pyx_r;
11512  }
11513 
11514  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11515  PyObject *__pyx_r = NULL;
11516  __Pyx_RefNannyDeclarations
11517  PyObject *__pyx_t_1 = NULL;
11518  __Pyx_RefNannySetupContext("imag", 0);
11519  __Pyx_XDECREF(__pyx_r);
11520  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11521  __Pyx_GOTREF(__pyx_t_1);
11522  __pyx_r = __pyx_t_1;
11523  __pyx_t_1 = 0;
11524  goto __pyx_L0;
11525 
11526  /* function exit code */
11527  __pyx_L1_error:;
11528  __Pyx_XDECREF(__pyx_t_1);
11529  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11530  __pyx_r = NULL;
11531  __pyx_L0:;
11532  __Pyx_XGIVEREF(__pyx_r);
11533  __Pyx_RefNannyFinishContext();
11534  return __pyx_r;
11535  }
11536 
11537  /* "PyClical.pyx":1377
11538  * return 0.0
11539  *
11540  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11541  * """
11542  * Pure part
11543  */
11544 
11545  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11546  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11547  PyObject *__pyx_r = NULL;
11548  __Pyx_RefNannyDeclarations
11549  PyObject *__pyx_t_1 = NULL;
11550  PyObject *__pyx_t_2 = NULL;
11551  PyObject *__pyx_t_3 = NULL;
11552  __Pyx_RefNannySetupContext("pure", 0);
11553 
11554  /* "PyClical.pyx":1386
11555  * {1,2}
11556  * """
11557  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11558  *
11559  * cpdef inline even(obj):
11560  */
11561  __Pyx_XDECREF(__pyx_r);
11562  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error)
11563  __Pyx_GOTREF(__pyx_t_2);
11564  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1386, __pyx_L1_error)
11565  __Pyx_GOTREF(__pyx_t_3);
11566  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11567  __pyx_t_2 = NULL;
11568  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11569  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11570  if (likely(__pyx_t_2)) {
11571  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11572  __Pyx_INCREF(__pyx_t_2);
11573  __Pyx_INCREF(function);
11574  __Pyx_DECREF_SET(__pyx_t_3, function);
11575  }
11576  }
11577  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11578  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11579  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11580  __Pyx_GOTREF(__pyx_t_1);
11581  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11582  __pyx_r = __pyx_t_1;
11583  __pyx_t_1 = 0;
11584  goto __pyx_L0;
11585 
11586  /* "PyClical.pyx":1377
11587  * return 0.0
11588  *
11589  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11590  * """
11591  * Pure part
11592  */
11593 
11594  /* function exit code */
11595  __pyx_L1_error:;
11596  __Pyx_XDECREF(__pyx_t_1);
11597  __Pyx_XDECREF(__pyx_t_2);
11598  __Pyx_XDECREF(__pyx_t_3);
11599  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11600  __pyx_r = 0;
11601  __pyx_L0:;
11602  __Pyx_XGIVEREF(__pyx_r);
11603  __Pyx_RefNannyFinishContext();
11604  return __pyx_r;
11605  }
11606 
11607  /* Python wrapper */
11608  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11609  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 ";
11610  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11611  PyObject *__pyx_r = 0;
11612  __Pyx_RefNannyDeclarations
11613  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11614  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11615 
11616  /* function exit code */
11617  __Pyx_RefNannyFinishContext();
11618  return __pyx_r;
11619  }
11620 
11621  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11622  PyObject *__pyx_r = NULL;
11623  __Pyx_RefNannyDeclarations
11624  PyObject *__pyx_t_1 = NULL;
11625  __Pyx_RefNannySetupContext("pure", 0);
11626  __Pyx_XDECREF(__pyx_r);
11627  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11628  __Pyx_GOTREF(__pyx_t_1);
11629  __pyx_r = __pyx_t_1;
11630  __pyx_t_1 = 0;
11631  goto __pyx_L0;
11632 
11633  /* function exit code */
11634  __pyx_L1_error:;
11635  __Pyx_XDECREF(__pyx_t_1);
11636  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11637  __pyx_r = NULL;
11638  __pyx_L0:;
11639  __Pyx_XGIVEREF(__pyx_r);
11640  __Pyx_RefNannyFinishContext();
11641  return __pyx_r;
11642  }
11643 
11644  /* "PyClical.pyx":1388
11645  * return clifford(obj).pure()
11646  *
11647  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11648  * """
11649  * Even part of multivector, sum of even grade terms.
11650  */
11651 
11652  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11653  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11654  PyObject *__pyx_r = NULL;
11655  __Pyx_RefNannyDeclarations
11656  PyObject *__pyx_t_1 = NULL;
11657  PyObject *__pyx_t_2 = NULL;
11658  PyObject *__pyx_t_3 = NULL;
11659  __Pyx_RefNannySetupContext("even", 0);
11660 
11661  /* "PyClical.pyx":1395
11662  * 1+{1,2}
11663  * """
11664  * return clifford(obj).even() # <<<<<<<<<<<<<<
11665  *
11666  * cpdef inline odd(obj):
11667  */
11668  __Pyx_XDECREF(__pyx_r);
11669  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
11670  __Pyx_GOTREF(__pyx_t_2);
11671  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_even); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error)
11672  __Pyx_GOTREF(__pyx_t_3);
11673  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11674  __pyx_t_2 = NULL;
11675  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11676  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11677  if (likely(__pyx_t_2)) {
11678  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11679  __Pyx_INCREF(__pyx_t_2);
11680  __Pyx_INCREF(function);
11681  __Pyx_DECREF_SET(__pyx_t_3, function);
11682  }
11683  }
11684  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11685  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11686  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11687  __Pyx_GOTREF(__pyx_t_1);
11688  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11689  __pyx_r = __pyx_t_1;
11690  __pyx_t_1 = 0;
11691  goto __pyx_L0;
11692 
11693  /* "PyClical.pyx":1388
11694  * return clifford(obj).pure()
11695  *
11696  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11697  * """
11698  * Even part of multivector, sum of even grade terms.
11699  */
11700 
11701  /* function exit code */
11702  __pyx_L1_error:;
11703  __Pyx_XDECREF(__pyx_t_1);
11704  __Pyx_XDECREF(__pyx_t_2);
11705  __Pyx_XDECREF(__pyx_t_3);
11706  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11707  __pyx_r = 0;
11708  __pyx_L0:;
11709  __Pyx_XGIVEREF(__pyx_r);
11710  __Pyx_RefNannyFinishContext();
11711  return __pyx_r;
11712  }
11713 
11714  /* Python wrapper */
11715  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11716  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 ";
11717  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11718  PyObject *__pyx_r = 0;
11719  __Pyx_RefNannyDeclarations
11720  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11721  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11722 
11723  /* function exit code */
11724  __Pyx_RefNannyFinishContext();
11725  return __pyx_r;
11726  }
11727 
11728  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11729  PyObject *__pyx_r = NULL;
11730  __Pyx_RefNannyDeclarations
11731  PyObject *__pyx_t_1 = NULL;
11732  __Pyx_RefNannySetupContext("even", 0);
11733  __Pyx_XDECREF(__pyx_r);
11734  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11735  __Pyx_GOTREF(__pyx_t_1);
11736  __pyx_r = __pyx_t_1;
11737  __pyx_t_1 = 0;
11738  goto __pyx_L0;
11739 
11740  /* function exit code */
11741  __pyx_L1_error:;
11742  __Pyx_XDECREF(__pyx_t_1);
11743  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11744  __pyx_r = NULL;
11745  __pyx_L0:;
11746  __Pyx_XGIVEREF(__pyx_r);
11747  __Pyx_RefNannyFinishContext();
11748  return __pyx_r;
11749  }
11750 
11751  /* "PyClical.pyx":1397
11752  * return clifford(obj).even()
11753  *
11754  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11755  * """
11756  * Odd part of multivector, sum of odd grade terms.
11757  */
11758 
11759  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11760  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11761  PyObject *__pyx_r = NULL;
11762  __Pyx_RefNannyDeclarations
11763  PyObject *__pyx_t_1 = NULL;
11764  PyObject *__pyx_t_2 = NULL;
11765  PyObject *__pyx_t_3 = NULL;
11766  __Pyx_RefNannySetupContext("odd", 0);
11767 
11768  /* "PyClical.pyx":1404
11769  * {1}
11770  * """
11771  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11772  *
11773  * cpdef inline involute(obj):
11774  */
11775  __Pyx_XDECREF(__pyx_r);
11776  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
11777  __Pyx_GOTREF(__pyx_t_2);
11778  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_odd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error)
11779  __Pyx_GOTREF(__pyx_t_3);
11780  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11781  __pyx_t_2 = NULL;
11782  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11783  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11784  if (likely(__pyx_t_2)) {
11785  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11786  __Pyx_INCREF(__pyx_t_2);
11787  __Pyx_INCREF(function);
11788  __Pyx_DECREF_SET(__pyx_t_3, function);
11789  }
11790  }
11791  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11792  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11793  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11794  __Pyx_GOTREF(__pyx_t_1);
11795  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11796  __pyx_r = __pyx_t_1;
11797  __pyx_t_1 = 0;
11798  goto __pyx_L0;
11799 
11800  /* "PyClical.pyx":1397
11801  * return clifford(obj).even()
11802  *
11803  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11804  * """
11805  * Odd part of multivector, sum of odd grade terms.
11806  */
11807 
11808  /* function exit code */
11809  __pyx_L1_error:;
11810  __Pyx_XDECREF(__pyx_t_1);
11811  __Pyx_XDECREF(__pyx_t_2);
11812  __Pyx_XDECREF(__pyx_t_3);
11813  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11814  __pyx_r = 0;
11815  __pyx_L0:;
11816  __Pyx_XGIVEREF(__pyx_r);
11817  __Pyx_RefNannyFinishContext();
11818  return __pyx_r;
11819  }
11820 
11821  /* Python wrapper */
11822  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11823  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 ";
11824  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11825  PyObject *__pyx_r = 0;
11826  __Pyx_RefNannyDeclarations
11827  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11828  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11829 
11830  /* function exit code */
11831  __Pyx_RefNannyFinishContext();
11832  return __pyx_r;
11833  }
11834 
11835  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11836  PyObject *__pyx_r = NULL;
11837  __Pyx_RefNannyDeclarations
11838  PyObject *__pyx_t_1 = NULL;
11839  __Pyx_RefNannySetupContext("odd", 0);
11840  __Pyx_XDECREF(__pyx_r);
11841  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11842  __Pyx_GOTREF(__pyx_t_1);
11843  __pyx_r = __pyx_t_1;
11844  __pyx_t_1 = 0;
11845  goto __pyx_L0;
11846 
11847  /* function exit code */
11848  __pyx_L1_error:;
11849  __Pyx_XDECREF(__pyx_t_1);
11850  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11851  __pyx_r = NULL;
11852  __pyx_L0:;
11853  __Pyx_XGIVEREF(__pyx_r);
11854  __Pyx_RefNannyFinishContext();
11855  return __pyx_r;
11856  }
11857 
11858  /* "PyClical.pyx":1406
11859  * return clifford(obj).odd()
11860  *
11861  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11862  * """
11863  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11864  */
11865 
11866  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11867  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11868  PyObject *__pyx_r = NULL;
11869  __Pyx_RefNannyDeclarations
11870  PyObject *__pyx_t_1 = NULL;
11871  PyObject *__pyx_t_2 = NULL;
11872  PyObject *__pyx_t_3 = NULL;
11873  __Pyx_RefNannySetupContext("involute", 0);
11874 
11875  /* "PyClical.pyx":1419
11876  * 1-{1}+{1,2}
11877  * """
11878  * return clifford(obj).involute() # <<<<<<<<<<<<<<
11879  *
11880  * cpdef inline reverse(obj):
11881  */
11882  __Pyx_XDECREF(__pyx_r);
11883  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error)
11884  __Pyx_GOTREF(__pyx_t_2);
11885  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_involute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error)
11886  __Pyx_GOTREF(__pyx_t_3);
11887  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11888  __pyx_t_2 = NULL;
11889  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11890  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11891  if (likely(__pyx_t_2)) {
11892  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11893  __Pyx_INCREF(__pyx_t_2);
11894  __Pyx_INCREF(function);
11895  __Pyx_DECREF_SET(__pyx_t_3, function);
11896  }
11897  }
11898  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11899  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11900  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11901  __Pyx_GOTREF(__pyx_t_1);
11902  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11903  __pyx_r = __pyx_t_1;
11904  __pyx_t_1 = 0;
11905  goto __pyx_L0;
11906 
11907  /* "PyClical.pyx":1406
11908  * return clifford(obj).odd()
11909  *
11910  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11911  * """
11912  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11913  */
11914 
11915  /* function exit code */
11916  __pyx_L1_error:;
11917  __Pyx_XDECREF(__pyx_t_1);
11918  __Pyx_XDECREF(__pyx_t_2);
11919  __Pyx_XDECREF(__pyx_t_3);
11920  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11921  __pyx_r = 0;
11922  __pyx_L0:;
11923  __Pyx_XGIVEREF(__pyx_r);
11924  __Pyx_RefNannyFinishContext();
11925  return __pyx_r;
11926  }
11927 
11928  /* Python wrapper */
11929  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11930  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 ";
11931  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11932  PyObject *__pyx_r = 0;
11933  __Pyx_RefNannyDeclarations
11934  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
11935  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11936 
11937  /* function exit code */
11938  __Pyx_RefNannyFinishContext();
11939  return __pyx_r;
11940  }
11941 
11942  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11943  PyObject *__pyx_r = NULL;
11944  __Pyx_RefNannyDeclarations
11945  PyObject *__pyx_t_1 = NULL;
11946  __Pyx_RefNannySetupContext("involute", 0);
11947  __Pyx_XDECREF(__pyx_r);
11948  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
11949  __Pyx_GOTREF(__pyx_t_1);
11950  __pyx_r = __pyx_t_1;
11951  __pyx_t_1 = 0;
11952  goto __pyx_L0;
11953 
11954  /* function exit code */
11955  __pyx_L1_error:;
11956  __Pyx_XDECREF(__pyx_t_1);
11957  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11958  __pyx_r = NULL;
11959  __pyx_L0:;
11960  __Pyx_XGIVEREF(__pyx_r);
11961  __Pyx_RefNannyFinishContext();
11962  return __pyx_r;
11963  }
11964 
11965  /* "PyClical.pyx":1421
11966  * return clifford(obj).involute()
11967  *
11968  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11969  * """
11970  * Reversion, eg. {1}*{2} -> {2}*{1}
11971  */
11972 
11973  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11974  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11975  PyObject *__pyx_r = NULL;
11976  __Pyx_RefNannyDeclarations
11977  PyObject *__pyx_t_1 = NULL;
11978  PyObject *__pyx_t_2 = NULL;
11979  PyObject *__pyx_t_3 = NULL;
11980  __Pyx_RefNannySetupContext("reverse", 0);
11981 
11982  /* "PyClical.pyx":1434
11983  * 1+{1}-{1,2}
11984  * """
11985  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
11986  *
11987  * cpdef inline conj(obj):
11988  */
11989  __Pyx_XDECREF(__pyx_r);
11990  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error)
11991  __Pyx_GOTREF(__pyx_t_2);
11992  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reverse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error)
11993  __Pyx_GOTREF(__pyx_t_3);
11994  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11995  __pyx_t_2 = NULL;
11996  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11997  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11998  if (likely(__pyx_t_2)) {
11999  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12000  __Pyx_INCREF(__pyx_t_2);
12001  __Pyx_INCREF(function);
12002  __Pyx_DECREF_SET(__pyx_t_3, function);
12003  }
12004  }
12005  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12006  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12007  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12008  __Pyx_GOTREF(__pyx_t_1);
12009  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12010  __pyx_r = __pyx_t_1;
12011  __pyx_t_1 = 0;
12012  goto __pyx_L0;
12013 
12014  /* "PyClical.pyx":1421
12015  * return clifford(obj).involute()
12016  *
12017  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12018  * """
12019  * Reversion, eg. {1}*{2} -> {2}*{1}
12020  */
12021 
12022  /* function exit code */
12023  __pyx_L1_error:;
12024  __Pyx_XDECREF(__pyx_t_1);
12025  __Pyx_XDECREF(__pyx_t_2);
12026  __Pyx_XDECREF(__pyx_t_3);
12027  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12028  __pyx_r = 0;
12029  __pyx_L0:;
12030  __Pyx_XGIVEREF(__pyx_r);
12031  __Pyx_RefNannyFinishContext();
12032  return __pyx_r;
12033  }
12034 
12035  /* Python wrapper */
12036  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12037  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 ";
12038  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12039  PyObject *__pyx_r = 0;
12040  __Pyx_RefNannyDeclarations
12041  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12042  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12043 
12044  /* function exit code */
12045  __Pyx_RefNannyFinishContext();
12046  return __pyx_r;
12047  }
12048 
12049  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12050  PyObject *__pyx_r = NULL;
12051  __Pyx_RefNannyDeclarations
12052  PyObject *__pyx_t_1 = NULL;
12053  __Pyx_RefNannySetupContext("reverse", 0);
12054  __Pyx_XDECREF(__pyx_r);
12055  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12056  __Pyx_GOTREF(__pyx_t_1);
12057  __pyx_r = __pyx_t_1;
12058  __pyx_t_1 = 0;
12059  goto __pyx_L0;
12060 
12061  /* function exit code */
12062  __pyx_L1_error:;
12063  __Pyx_XDECREF(__pyx_t_1);
12064  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12065  __pyx_r = NULL;
12066  __pyx_L0:;
12067  __Pyx_XGIVEREF(__pyx_r);
12068  __Pyx_RefNannyFinishContext();
12069  return __pyx_r;
12070  }
12071 
12072  /* "PyClical.pyx":1436
12073  * return clifford(obj).reverse()
12074  *
12075  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12076  * """
12077  * Conjugation, reverse o involute == involute o reverse.
12078  */
12079 
12080  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12081  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12082  PyObject *__pyx_r = NULL;
12083  __Pyx_RefNannyDeclarations
12084  PyObject *__pyx_t_1 = NULL;
12085  PyObject *__pyx_t_2 = NULL;
12086  PyObject *__pyx_t_3 = NULL;
12087  __Pyx_RefNannySetupContext("conj", 0);
12088 
12089  /* "PyClical.pyx":1449
12090  * 1-{1}-{1,2}
12091  * """
12092  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12093  *
12094  * cpdef inline quad(obj):
12095  */
12096  __Pyx_XDECREF(__pyx_r);
12097  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
12098  __Pyx_GOTREF(__pyx_t_2);
12099  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_conj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error)
12100  __Pyx_GOTREF(__pyx_t_3);
12101  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12102  __pyx_t_2 = NULL;
12103  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12104  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12105  if (likely(__pyx_t_2)) {
12106  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12107  __Pyx_INCREF(__pyx_t_2);
12108  __Pyx_INCREF(function);
12109  __Pyx_DECREF_SET(__pyx_t_3, function);
12110  }
12111  }
12112  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12113  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12114  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12115  __Pyx_GOTREF(__pyx_t_1);
12116  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12117  __pyx_r = __pyx_t_1;
12118  __pyx_t_1 = 0;
12119  goto __pyx_L0;
12120 
12121  /* "PyClical.pyx":1436
12122  * return clifford(obj).reverse()
12123  *
12124  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12125  * """
12126  * Conjugation, reverse o involute == involute o reverse.
12127  */
12128 
12129  /* function exit code */
12130  __pyx_L1_error:;
12131  __Pyx_XDECREF(__pyx_t_1);
12132  __Pyx_XDECREF(__pyx_t_2);
12133  __Pyx_XDECREF(__pyx_t_3);
12134  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12135  __pyx_r = 0;
12136  __pyx_L0:;
12137  __Pyx_XGIVEREF(__pyx_r);
12138  __Pyx_RefNannyFinishContext();
12139  return __pyx_r;
12140  }
12141 
12142  /* Python wrapper */
12143  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12144  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 ";
12145  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12146  PyObject *__pyx_r = 0;
12147  __Pyx_RefNannyDeclarations
12148  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12149  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12150 
12151  /* function exit code */
12152  __Pyx_RefNannyFinishContext();
12153  return __pyx_r;
12154  }
12155 
12156  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12157  PyObject *__pyx_r = NULL;
12158  __Pyx_RefNannyDeclarations
12159  PyObject *__pyx_t_1 = NULL;
12160  __Pyx_RefNannySetupContext("conj", 0);
12161  __Pyx_XDECREF(__pyx_r);
12162  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12163  __Pyx_GOTREF(__pyx_t_1);
12164  __pyx_r = __pyx_t_1;
12165  __pyx_t_1 = 0;
12166  goto __pyx_L0;
12167 
12168  /* function exit code */
12169  __pyx_L1_error:;
12170  __Pyx_XDECREF(__pyx_t_1);
12171  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12172  __pyx_r = NULL;
12173  __pyx_L0:;
12174  __Pyx_XGIVEREF(__pyx_r);
12175  __Pyx_RefNannyFinishContext();
12176  return __pyx_r;
12177  }
12178 
12179  /* "PyClical.pyx":1451
12180  * return clifford(obj).conj()
12181  *
12182  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12183  * """
12184  * Quadratic form == (rev(x)*x)(0).
12185  */
12186 
12187  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12188  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12189  PyObject *__pyx_r = NULL;
12190  __Pyx_RefNannyDeclarations
12191  PyObject *__pyx_t_1 = NULL;
12192  PyObject *__pyx_t_2 = NULL;
12193  PyObject *__pyx_t_3 = NULL;
12194  __Pyx_RefNannySetupContext("quad", 0);
12195 
12196  /* "PyClical.pyx":1460
12197  * 2.0
12198  * """
12199  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12200  *
12201  * cpdef inline norm(obj):
12202  */
12203  __Pyx_XDECREF(__pyx_r);
12204  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1460, __pyx_L1_error)
12205  __Pyx_GOTREF(__pyx_t_2);
12206  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_quad); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1460, __pyx_L1_error)
12207  __Pyx_GOTREF(__pyx_t_3);
12208  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12209  __pyx_t_2 = NULL;
12210  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12211  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12212  if (likely(__pyx_t_2)) {
12213  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12214  __Pyx_INCREF(__pyx_t_2);
12215  __Pyx_INCREF(function);
12216  __Pyx_DECREF_SET(__pyx_t_3, function);
12217  }
12218  }
12219  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12220  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12221  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12222  __Pyx_GOTREF(__pyx_t_1);
12223  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12224  __pyx_r = __pyx_t_1;
12225  __pyx_t_1 = 0;
12226  goto __pyx_L0;
12227 
12228  /* "PyClical.pyx":1451
12229  * return clifford(obj).conj()
12230  *
12231  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12232  * """
12233  * Quadratic form == (rev(x)*x)(0).
12234  */
12235 
12236  /* function exit code */
12237  __pyx_L1_error:;
12238  __Pyx_XDECREF(__pyx_t_1);
12239  __Pyx_XDECREF(__pyx_t_2);
12240  __Pyx_XDECREF(__pyx_t_3);
12241  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12242  __pyx_r = 0;
12243  __pyx_L0:;
12244  __Pyx_XGIVEREF(__pyx_r);
12245  __Pyx_RefNannyFinishContext();
12246  return __pyx_r;
12247  }
12248 
12249  /* Python wrapper */
12250  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12251  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 ";
12252  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12253  PyObject *__pyx_r = 0;
12254  __Pyx_RefNannyDeclarations
12255  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12256  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12257 
12258  /* function exit code */
12259  __Pyx_RefNannyFinishContext();
12260  return __pyx_r;
12261  }
12262 
12263  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12264  PyObject *__pyx_r = NULL;
12265  __Pyx_RefNannyDeclarations
12266  PyObject *__pyx_t_1 = NULL;
12267  __Pyx_RefNannySetupContext("quad", 0);
12268  __Pyx_XDECREF(__pyx_r);
12269  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12270  __Pyx_GOTREF(__pyx_t_1);
12271  __pyx_r = __pyx_t_1;
12272  __pyx_t_1 = 0;
12273  goto __pyx_L0;
12274 
12275  /* function exit code */
12276  __pyx_L1_error:;
12277  __Pyx_XDECREF(__pyx_t_1);
12278  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12279  __pyx_r = NULL;
12280  __pyx_L0:;
12281  __Pyx_XGIVEREF(__pyx_r);
12282  __Pyx_RefNannyFinishContext();
12283  return __pyx_r;
12284  }
12285 
12286  /* "PyClical.pyx":1462
12287  * return clifford(obj).quad()
12288  *
12289  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12290  * """
12291  * norm == sum of squares of coordinates.
12292  */
12293 
12294  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12295  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12296  PyObject *__pyx_r = NULL;
12297  __Pyx_RefNannyDeclarations
12298  PyObject *__pyx_t_1 = NULL;
12299  PyObject *__pyx_t_2 = NULL;
12300  PyObject *__pyx_t_3 = NULL;
12301  __Pyx_RefNannySetupContext("norm", 0);
12302 
12303  /* "PyClical.pyx":1471
12304  * 4.0
12305  * """
12306  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12307  *
12308  * cpdef inline abs(obj):
12309  */
12310  __Pyx_XDECREF(__pyx_r);
12311  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
12312  __Pyx_GOTREF(__pyx_t_2);
12313  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_norm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1471, __pyx_L1_error)
12314  __Pyx_GOTREF(__pyx_t_3);
12315  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12316  __pyx_t_2 = NULL;
12317  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12318  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12319  if (likely(__pyx_t_2)) {
12320  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12321  __Pyx_INCREF(__pyx_t_2);
12322  __Pyx_INCREF(function);
12323  __Pyx_DECREF_SET(__pyx_t_3, function);
12324  }
12325  }
12326  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12327  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12328  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12329  __Pyx_GOTREF(__pyx_t_1);
12330  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12331  __pyx_r = __pyx_t_1;
12332  __pyx_t_1 = 0;
12333  goto __pyx_L0;
12334 
12335  /* "PyClical.pyx":1462
12336  * return clifford(obj).quad()
12337  *
12338  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12339  * """
12340  * norm == sum of squares of coordinates.
12341  */
12342 
12343  /* function exit code */
12344  __pyx_L1_error:;
12345  __Pyx_XDECREF(__pyx_t_1);
12346  __Pyx_XDECREF(__pyx_t_2);
12347  __Pyx_XDECREF(__pyx_t_3);
12348  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12349  __pyx_r = 0;
12350  __pyx_L0:;
12351  __Pyx_XGIVEREF(__pyx_r);
12352  __Pyx_RefNannyFinishContext();
12353  return __pyx_r;
12354  }
12355 
12356  /* Python wrapper */
12357  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12358  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 ";
12359  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12360  PyObject *__pyx_r = 0;
12361  __Pyx_RefNannyDeclarations
12362  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12363  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12364 
12365  /* function exit code */
12366  __Pyx_RefNannyFinishContext();
12367  return __pyx_r;
12368  }
12369 
12370  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12371  PyObject *__pyx_r = NULL;
12372  __Pyx_RefNannyDeclarations
12373  PyObject *__pyx_t_1 = NULL;
12374  __Pyx_RefNannySetupContext("norm", 0);
12375  __Pyx_XDECREF(__pyx_r);
12376  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12377  __Pyx_GOTREF(__pyx_t_1);
12378  __pyx_r = __pyx_t_1;
12379  __pyx_t_1 = 0;
12380  goto __pyx_L0;
12381 
12382  /* function exit code */
12383  __pyx_L1_error:;
12384  __Pyx_XDECREF(__pyx_t_1);
12385  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12386  __pyx_r = NULL;
12387  __pyx_L0:;
12388  __Pyx_XGIVEREF(__pyx_r);
12389  __Pyx_RefNannyFinishContext();
12390  return __pyx_r;
12391  }
12392 
12393  /* "PyClical.pyx":1473
12394  * return clifford(obj).norm()
12395  *
12396  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12397  * """
12398  * Absolute value of multivector: multivector 2-norm.
12399  */
12400 
12401  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12402  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12403  PyObject *__pyx_r = NULL;
12404  __Pyx_RefNannyDeclarations
12405  PyObject *__pyx_t_1 = NULL;
12406  __Pyx_RefNannySetupContext("abs", 0);
12407 
12408  /* "PyClical.pyx":1480
12409  * 2.0
12410  * """
12411  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12412  *
12413  * cpdef inline max_abs(obj):
12414  */
12415  __Pyx_XDECREF(__pyx_r);
12416  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1480, __pyx_L1_error)
12417  __Pyx_GOTREF(__pyx_t_1);
12418  __pyx_r = __pyx_t_1;
12419  __pyx_t_1 = 0;
12420  goto __pyx_L0;
12421 
12422  /* "PyClical.pyx":1473
12423  * return clifford(obj).norm()
12424  *
12425  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12426  * """
12427  * Absolute value of multivector: multivector 2-norm.
12428  */
12429 
12430  /* function exit code */
12431  __pyx_L1_error:;
12432  __Pyx_XDECREF(__pyx_t_1);
12433  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12434  __pyx_r = 0;
12435  __pyx_L0:;
12436  __Pyx_XGIVEREF(__pyx_r);
12437  __Pyx_RefNannyFinishContext();
12438  return __pyx_r;
12439  }
12440 
12441  /* Python wrapper */
12442  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12443  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 ";
12444  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12445  PyObject *__pyx_r = 0;
12446  __Pyx_RefNannyDeclarations
12447  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12448  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12449 
12450  /* function exit code */
12451  __Pyx_RefNannyFinishContext();
12452  return __pyx_r;
12453  }
12454 
12455  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12456  PyObject *__pyx_r = NULL;
12457  __Pyx_RefNannyDeclarations
12458  PyObject *__pyx_t_1 = NULL;
12459  __Pyx_RefNannySetupContext("abs", 0);
12460  __Pyx_XDECREF(__pyx_r);
12461  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12462  __Pyx_GOTREF(__pyx_t_1);
12463  __pyx_r = __pyx_t_1;
12464  __pyx_t_1 = 0;
12465  goto __pyx_L0;
12466 
12467  /* function exit code */
12468  __pyx_L1_error:;
12469  __Pyx_XDECREF(__pyx_t_1);
12470  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12471  __pyx_r = NULL;
12472  __pyx_L0:;
12473  __Pyx_XGIVEREF(__pyx_r);
12474  __Pyx_RefNannyFinishContext();
12475  return __pyx_r;
12476  }
12477 
12478  /* "PyClical.pyx":1482
12479  * return glucat.abs(toClifford(obj))
12480  *
12481  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12482  * """
12483  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12484  */
12485 
12486  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12487  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12488  PyObject *__pyx_r = NULL;
12489  __Pyx_RefNannyDeclarations
12490  PyObject *__pyx_t_1 = NULL;
12491  __Pyx_RefNannySetupContext("max_abs", 0);
12492 
12493  /* "PyClical.pyx":1492
12494  *
12495  * """
12496  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12497  *
12498  * cpdef inline pow(obj, m):
12499  */
12500  __Pyx_XDECREF(__pyx_r);
12501  __pyx_t_1 = PyFloat_FromDouble(max_abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
12502  __Pyx_GOTREF(__pyx_t_1);
12503  __pyx_r = __pyx_t_1;
12504  __pyx_t_1 = 0;
12505  goto __pyx_L0;
12506 
12507  /* "PyClical.pyx":1482
12508  * return glucat.abs(toClifford(obj))
12509  *
12510  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12511  * """
12512  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12513  */
12514 
12515  /* function exit code */
12516  __pyx_L1_error:;
12517  __Pyx_XDECREF(__pyx_t_1);
12518  __Pyx_AddTraceback("PyClical.max_abs", __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_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12528  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 ";
12529  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12530  PyObject *__pyx_r = 0;
12531  __Pyx_RefNannyDeclarations
12532  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12533  __pyx_r = __pyx_pf_8PyClical_36max_abs(__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_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12541  PyObject *__pyx_r = NULL;
12542  __Pyx_RefNannyDeclarations
12543  PyObject *__pyx_t_1 = NULL;
12544  __Pyx_RefNannySetupContext("max_abs", 0);
12545  __Pyx_XDECREF(__pyx_r);
12546  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12547  __Pyx_GOTREF(__pyx_t_1);
12548  __pyx_r = __pyx_t_1;
12549  __pyx_t_1 = 0;
12550  goto __pyx_L0;
12551 
12552  /* function exit code */
12553  __pyx_L1_error:;
12554  __Pyx_XDECREF(__pyx_t_1);
12555  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12556  __pyx_r = NULL;
12557  __pyx_L0:;
12558  __Pyx_XGIVEREF(__pyx_r);
12559  __Pyx_RefNannyFinishContext();
12560  return __pyx_r;
12561  }
12562 
12563  /* "PyClical.pyx":1494
12564  * return glucat.max_abs(toClifford(obj))
12565  *
12566  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12567  * """
12568  * Integer power of multivector: obj to the m.
12569  */
12570 
12571  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12572  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12573  PyObject *__pyx_r = NULL;
12574  __Pyx_RefNannyDeclarations
12575  PyObject *__pyx_t_1 = NULL;
12576  PyObject *__pyx_t_2 = NULL;
12577  PyObject *__pyx_t_3 = NULL;
12578  PyObject *__pyx_t_4 = NULL;
12579  PyObject *__pyx_t_5 = NULL;
12580  PyObject *__pyx_t_6 = NULL;
12581  int __pyx_t_7;
12582  PyObject *__pyx_t_8 = NULL;
12583  PyObject *__pyx_t_9 = NULL;
12584  PyObject *__pyx_t_10 = NULL;
12585  __Pyx_RefNannySetupContext("pow", 0);
12586 
12587  /* "PyClical.pyx":1513
12588  * 1
12589  * """
12590  * try: # <<<<<<<<<<<<<<
12591  * math.pow(obj, m)
12592  * except:
12593  */
12594  {
12595  __Pyx_PyThreadState_declare
12596  __Pyx_PyThreadState_assign
12597  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12598  __Pyx_XGOTREF(__pyx_t_1);
12599  __Pyx_XGOTREF(__pyx_t_2);
12600  __Pyx_XGOTREF(__pyx_t_3);
12601  /*try:*/ {
12602 
12603  /* "PyClical.pyx":1514
12604  * """
12605  * try:
12606  * math.pow(obj, m) # <<<<<<<<<<<<<<
12607  * except:
12608  * return clifford(obj).pow(m)
12609  */
12610  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12611  __Pyx_GOTREF(__pyx_t_5);
12612  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pow); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L3_error)
12613  __Pyx_GOTREF(__pyx_t_6);
12614  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12615  __pyx_t_5 = NULL;
12616  __pyx_t_7 = 0;
12617  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12618  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12619  if (likely(__pyx_t_5)) {
12620  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12621  __Pyx_INCREF(__pyx_t_5);
12622  __Pyx_INCREF(function);
12623  __Pyx_DECREF_SET(__pyx_t_6, function);
12624  __pyx_t_7 = 1;
12625  }
12626  }
12627  #if CYTHON_FAST_PYCALL
12628  if (PyFunction_Check(__pyx_t_6)) {
12629  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12630  __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, 1514, __pyx_L3_error)
12631  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12632  __Pyx_GOTREF(__pyx_t_4);
12633  } else
12634  #endif
12635  #if CYTHON_FAST_PYCCALL
12636  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12637  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12638  __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, 1514, __pyx_L3_error)
12639  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12640  __Pyx_GOTREF(__pyx_t_4);
12641  } else
12642  #endif
12643  {
12644  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12645  __Pyx_GOTREF(__pyx_t_8);
12646  if (__pyx_t_5) {
12647  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12648  }
12649  __Pyx_INCREF(__pyx_v_obj);
12650  __Pyx_GIVEREF(__pyx_v_obj);
12651  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12652  __Pyx_INCREF(__pyx_v_m);
12653  __Pyx_GIVEREF(__pyx_v_m);
12654  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12655  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1514, __pyx_L3_error)
12656  __Pyx_GOTREF(__pyx_t_4);
12657  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12658  }
12659  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12660  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12661 
12662  /* "PyClical.pyx":1513
12663  * 1
12664  * """
12665  * try: # <<<<<<<<<<<<<<
12666  * math.pow(obj, m)
12667  * except:
12668  */
12669  }
12670  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12671  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12672  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12673  goto __pyx_L8_try_end;
12674  __pyx_L3_error:;
12675  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12676  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12677  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12678  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12679 
12680  /* "PyClical.pyx":1515
12681  * try:
12682  * math.pow(obj, m)
12683  * except: # <<<<<<<<<<<<<<
12684  * return clifford(obj).pow(m)
12685  *
12686  */
12687  /*except:*/ {
12688  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12689  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12690  __Pyx_GOTREF(__pyx_t_4);
12691  __Pyx_GOTREF(__pyx_t_6);
12692  __Pyx_GOTREF(__pyx_t_8);
12693 
12694  /* "PyClical.pyx":1516
12695  * math.pow(obj, m)
12696  * except:
12697  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12698  *
12699  * cpdef inline outer_pow(obj, m):
12700  */
12701  __Pyx_XDECREF(__pyx_r);
12702  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12703  __Pyx_GOTREF(__pyx_t_9);
12704  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_pow); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12705  __Pyx_GOTREF(__pyx_t_10);
12706  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12707  __pyx_t_9 = NULL;
12708  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
12709  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
12710  if (likely(__pyx_t_9)) {
12711  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
12712  __Pyx_INCREF(__pyx_t_9);
12713  __Pyx_INCREF(function);
12714  __Pyx_DECREF_SET(__pyx_t_10, function);
12715  }
12716  }
12717  __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);
12718  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12719  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12720  __Pyx_GOTREF(__pyx_t_5);
12721  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12722  __pyx_r = __pyx_t_5;
12723  __pyx_t_5 = 0;
12724  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12725  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12726  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12727  goto __pyx_L6_except_return;
12728  }
12729  __pyx_L5_except_error:;
12730 
12731  /* "PyClical.pyx":1513
12732  * 1
12733  * """
12734  * try: # <<<<<<<<<<<<<<
12735  * math.pow(obj, m)
12736  * except:
12737  */
12738  __Pyx_XGIVEREF(__pyx_t_1);
12739  __Pyx_XGIVEREF(__pyx_t_2);
12740  __Pyx_XGIVEREF(__pyx_t_3);
12741  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12742  goto __pyx_L1_error;
12743  __pyx_L6_except_return:;
12744  __Pyx_XGIVEREF(__pyx_t_1);
12745  __Pyx_XGIVEREF(__pyx_t_2);
12746  __Pyx_XGIVEREF(__pyx_t_3);
12747  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12748  goto __pyx_L0;
12749  __pyx_L8_try_end:;
12750  }
12751 
12752  /* "PyClical.pyx":1494
12753  * return glucat.max_abs(toClifford(obj))
12754  *
12755  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12756  * """
12757  * Integer power of multivector: obj to the m.
12758  */
12759 
12760  /* function exit code */
12761  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12762  goto __pyx_L0;
12763  __pyx_L1_error:;
12764  __Pyx_XDECREF(__pyx_t_4);
12765  __Pyx_XDECREF(__pyx_t_5);
12766  __Pyx_XDECREF(__pyx_t_6);
12767  __Pyx_XDECREF(__pyx_t_8);
12768  __Pyx_XDECREF(__pyx_t_9);
12769  __Pyx_XDECREF(__pyx_t_10);
12770  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12771  __pyx_r = 0;
12772  __pyx_L0:;
12773  __Pyx_XGIVEREF(__pyx_r);
12774  __Pyx_RefNannyFinishContext();
12775  return __pyx_r;
12776  }
12777 
12778  /* Python wrapper */
12779  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12780  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 ";
12781  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12782  PyObject *__pyx_v_obj = 0;
12783  PyObject *__pyx_v_m = 0;
12784  PyObject *__pyx_r = 0;
12785  __Pyx_RefNannyDeclarations
12786  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12787  {
12788  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12789  PyObject* values[2] = {0,0};
12790  if (unlikely(__pyx_kwds)) {
12791  Py_ssize_t kw_args;
12792  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12793  switch (pos_args) {
12794  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12795  CYTHON_FALLTHROUGH;
12796  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12797  CYTHON_FALLTHROUGH;
12798  case 0: break;
12799  default: goto __pyx_L5_argtuple_error;
12800  }
12801  kw_args = PyDict_Size(__pyx_kwds);
12802  switch (pos_args) {
12803  case 0:
12804  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12805  else goto __pyx_L5_argtuple_error;
12806  CYTHON_FALLTHROUGH;
12807  case 1:
12808  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12809  else {
12810  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
12811  }
12812  }
12813  if (unlikely(kw_args > 0)) {
12814  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
12815  }
12816  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12817  goto __pyx_L5_argtuple_error;
12818  } else {
12819  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12820  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12821  }
12822  __pyx_v_obj = values[0];
12823  __pyx_v_m = values[1];
12824  }
12825  goto __pyx_L4_argument_unpacking_done;
12826  __pyx_L5_argtuple_error:;
12827  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
12828  __pyx_L3_error:;
12829  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12830  __Pyx_RefNannyFinishContext();
12831  return NULL;
12832  __pyx_L4_argument_unpacking_done:;
12833  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12834 
12835  /* function exit code */
12836  __Pyx_RefNannyFinishContext();
12837  return __pyx_r;
12838  }
12839 
12840  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12841  PyObject *__pyx_r = NULL;
12842  __Pyx_RefNannyDeclarations
12843  PyObject *__pyx_t_1 = NULL;
12844  __Pyx_RefNannySetupContext("pow", 0);
12845  __Pyx_XDECREF(__pyx_r);
12846  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error)
12847  __Pyx_GOTREF(__pyx_t_1);
12848  __pyx_r = __pyx_t_1;
12849  __pyx_t_1 = 0;
12850  goto __pyx_L0;
12851 
12852  /* function exit code */
12853  __pyx_L1_error:;
12854  __Pyx_XDECREF(__pyx_t_1);
12855  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12856  __pyx_r = NULL;
12857  __pyx_L0:;
12858  __Pyx_XGIVEREF(__pyx_r);
12859  __Pyx_RefNannyFinishContext();
12860  return __pyx_r;
12861  }
12862 
12863  /* "PyClical.pyx":1518
12864  * return clifford(obj).pow(m)
12865  *
12866  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12867  * """
12868  * Outer product power of multivector.
12869  */
12870 
12871  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12872  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12873  PyObject *__pyx_r = NULL;
12874  __Pyx_RefNannyDeclarations
12875  PyObject *__pyx_t_1 = NULL;
12876  PyObject *__pyx_t_2 = NULL;
12877  PyObject *__pyx_t_3 = NULL;
12878  __Pyx_RefNannySetupContext("outer_pow", 0);
12879 
12880  /* "PyClical.pyx":1525
12881  * 1+3{1}+3{1,2}
12882  * """
12883  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
12884  *
12885  * cpdef inline complexifier(obj):
12886  */
12887  __Pyx_XDECREF(__pyx_r);
12888  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
12889  __Pyx_GOTREF(__pyx_t_2);
12890  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outer_pow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1525, __pyx_L1_error)
12891  __Pyx_GOTREF(__pyx_t_3);
12892  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12893  __pyx_t_2 = NULL;
12894  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12895  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12896  if (likely(__pyx_t_2)) {
12897  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12898  __Pyx_INCREF(__pyx_t_2);
12899  __Pyx_INCREF(function);
12900  __Pyx_DECREF_SET(__pyx_t_3, function);
12901  }
12902  }
12903  __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);
12904  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12905  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12906  __Pyx_GOTREF(__pyx_t_1);
12907  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12908  __pyx_r = __pyx_t_1;
12909  __pyx_t_1 = 0;
12910  goto __pyx_L0;
12911 
12912  /* "PyClical.pyx":1518
12913  * return clifford(obj).pow(m)
12914  *
12915  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12916  * """
12917  * Outer product power of multivector.
12918  */
12919 
12920  /* function exit code */
12921  __pyx_L1_error:;
12922  __Pyx_XDECREF(__pyx_t_1);
12923  __Pyx_XDECREF(__pyx_t_2);
12924  __Pyx_XDECREF(__pyx_t_3);
12925  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12926  __pyx_r = 0;
12927  __pyx_L0:;
12928  __Pyx_XGIVEREF(__pyx_r);
12929  __Pyx_RefNannyFinishContext();
12930  return __pyx_r;
12931  }
12932 
12933  /* Python wrapper */
12934  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12935  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 ";
12936  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12937  PyObject *__pyx_v_obj = 0;
12938  PyObject *__pyx_v_m = 0;
12939  PyObject *__pyx_r = 0;
12940  __Pyx_RefNannyDeclarations
12941  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
12942  {
12943  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12944  PyObject* values[2] = {0,0};
12945  if (unlikely(__pyx_kwds)) {
12946  Py_ssize_t kw_args;
12947  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12948  switch (pos_args) {
12949  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12950  CYTHON_FALLTHROUGH;
12951  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12952  CYTHON_FALLTHROUGH;
12953  case 0: break;
12954  default: goto __pyx_L5_argtuple_error;
12955  }
12956  kw_args = PyDict_Size(__pyx_kwds);
12957  switch (pos_args) {
12958  case 0:
12959  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12960  else goto __pyx_L5_argtuple_error;
12961  CYTHON_FALLTHROUGH;
12962  case 1:
12963  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12964  else {
12965  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
12966  }
12967  }
12968  if (unlikely(kw_args > 0)) {
12969  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
12970  }
12971  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12972  goto __pyx_L5_argtuple_error;
12973  } else {
12974  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12975  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12976  }
12977  __pyx_v_obj = values[0];
12978  __pyx_v_m = values[1];
12979  }
12980  goto __pyx_L4_argument_unpacking_done;
12981  __pyx_L5_argtuple_error:;
12982  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
12983  __pyx_L3_error:;
12984  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12985  __Pyx_RefNannyFinishContext();
12986  return NULL;
12987  __pyx_L4_argument_unpacking_done:;
12988  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12989 
12990  /* function exit code */
12991  __Pyx_RefNannyFinishContext();
12992  return __pyx_r;
12993  }
12994 
12995  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12996  PyObject *__pyx_r = NULL;
12997  __Pyx_RefNannyDeclarations
12998  PyObject *__pyx_t_1 = NULL;
12999  __Pyx_RefNannySetupContext("outer_pow", 0);
13000  __Pyx_XDECREF(__pyx_r);
13001  __pyx_t_1 = __pyx_f_8PyClical_outer_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __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.outer_pow", __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":1527
13019  * return clifford(obj).outer_pow(m)
13020  *
13021  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13022  * """
13023  * Square root of -1 which commutes with all members of the frame of the given multivector.
13024  */
13025 
13026  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13027  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(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  PyObject *__pyx_t_2 = NULL;
13032  __Pyx_RefNannySetupContext("complexifier", 0);
13033 
13034  /* "PyClical.pyx":1540
13035  * {-1}
13036  * """
13037  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13038  *
13039  * cpdef inline sqrt(obj, i = None):
13040  */
13041  __Pyx_XDECREF(__pyx_r);
13042  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
13043  __Pyx_GOTREF(__pyx_t_1);
13044  __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, 1540, __pyx_L1_error)
13045  __Pyx_GOTREF(__pyx_t_2);
13046  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13047  __pyx_r = __pyx_t_2;
13048  __pyx_t_2 = 0;
13049  goto __pyx_L0;
13050 
13051  /* "PyClical.pyx":1527
13052  * return clifford(obj).outer_pow(m)
13053  *
13054  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13055  * """
13056  * Square root of -1 which commutes with all members of the frame of the given multivector.
13057  */
13058 
13059  /* function exit code */
13060  __pyx_L1_error:;
13061  __Pyx_XDECREF(__pyx_t_1);
13062  __Pyx_XDECREF(__pyx_t_2);
13063  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13064  __pyx_r = 0;
13065  __pyx_L0:;
13066  __Pyx_XGIVEREF(__pyx_r);
13067  __Pyx_RefNannyFinishContext();
13068  return __pyx_r;
13069  }
13070 
13071  /* Python wrapper */
13072  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13073  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 ";
13074  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13075  PyObject *__pyx_r = 0;
13076  __Pyx_RefNannyDeclarations
13077  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13078  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13079 
13080  /* function exit code */
13081  __Pyx_RefNannyFinishContext();
13082  return __pyx_r;
13083  }
13084 
13085  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13086  PyObject *__pyx_r = NULL;
13087  __Pyx_RefNannyDeclarations
13088  PyObject *__pyx_t_1 = NULL;
13089  __Pyx_RefNannySetupContext("complexifier", 0);
13090  __Pyx_XDECREF(__pyx_r);
13091  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13092  __Pyx_GOTREF(__pyx_t_1);
13093  __pyx_r = __pyx_t_1;
13094  __pyx_t_1 = 0;
13095  goto __pyx_L0;
13096 
13097  /* function exit code */
13098  __pyx_L1_error:;
13099  __Pyx_XDECREF(__pyx_t_1);
13100  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13101  __pyx_r = NULL;
13102  __pyx_L0:;
13103  __Pyx_XGIVEREF(__pyx_r);
13104  __Pyx_RefNannyFinishContext();
13105  return __pyx_r;
13106  }
13107 
13108  /* "PyClical.pyx":1542
13109  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13110  *
13111  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13112  * """
13113  * Square root of multivector with optional complexifier.
13114  */
13115 
13116  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13117  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) {
13118  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13119  PyObject *__pyx_r = NULL;
13120  __Pyx_RefNannyDeclarations
13121  int __pyx_t_1;
13122  int __pyx_t_2;
13123  PyObject *__pyx_t_3 = NULL;
13124  Clifford __pyx_t_4;
13125  PyObject *__pyx_t_5 = NULL;
13126  PyObject *__pyx_t_6 = NULL;
13127  PyObject *__pyx_t_7 = NULL;
13128  PyObject *__pyx_t_8 = NULL;
13129  PyObject *__pyx_t_9 = NULL;
13130  PyObject *__pyx_t_10 = NULL;
13131  PyObject *__pyx_t_11 = NULL;
13132  __Pyx_RefNannySetupContext("sqrt", 0);
13133  if (__pyx_optional_args) {
13134  if (__pyx_optional_args->__pyx_n > 0) {
13135  __pyx_v_i = __pyx_optional_args->i;
13136  }
13137  }
13138 
13139  /* "PyClical.pyx":1557
13140  * -1
13141  * """
13142  * if not (i is None): # <<<<<<<<<<<<<<
13143  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13144  * else:
13145  */
13146  __pyx_t_1 = (__pyx_v_i != Py_None);
13147  __pyx_t_2 = (__pyx_t_1 != 0);
13148  if (__pyx_t_2) {
13149 
13150  /* "PyClical.pyx":1558
13151  * """
13152  * if not (i is None):
13153  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13154  * else:
13155  * try:
13156  */
13157  __Pyx_XDECREF(__pyx_r);
13158  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
13159  __Pyx_GOTREF(__pyx_t_3);
13160  try {
13161  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13162  } catch(...) {
13163  __Pyx_CppExn2PyErr();
13164  __PYX_ERR(0, 1558, __pyx_L1_error)
13165  }
13166  __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, 1558, __pyx_L1_error)
13167  __Pyx_GOTREF(__pyx_t_5);
13168  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13169  __pyx_r = __pyx_t_5;
13170  __pyx_t_5 = 0;
13171  goto __pyx_L0;
13172 
13173  /* "PyClical.pyx":1557
13174  * -1
13175  * """
13176  * if not (i is None): # <<<<<<<<<<<<<<
13177  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13178  * else:
13179  */
13180  }
13181 
13182  /* "PyClical.pyx":1560
13183  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13184  * else:
13185  * try: # <<<<<<<<<<<<<<
13186  * return math.sqrt(obj)
13187  * except:
13188  */
13189  /*else*/ {
13190  {
13191  __Pyx_PyThreadState_declare
13192  __Pyx_PyThreadState_assign
13193  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13194  __Pyx_XGOTREF(__pyx_t_6);
13195  __Pyx_XGOTREF(__pyx_t_7);
13196  __Pyx_XGOTREF(__pyx_t_8);
13197  /*try:*/ {
13198 
13199  /* "PyClical.pyx":1561
13200  * else:
13201  * try:
13202  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13203  * except:
13204  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13205  */
13206  __Pyx_XDECREF(__pyx_r);
13207  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13208  __Pyx_GOTREF(__pyx_t_3);
13209  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1561, __pyx_L4_error)
13210  __Pyx_GOTREF(__pyx_t_9);
13211  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13212  __pyx_t_3 = NULL;
13213  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13214  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13215  if (likely(__pyx_t_3)) {
13216  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13217  __Pyx_INCREF(__pyx_t_3);
13218  __Pyx_INCREF(function);
13219  __Pyx_DECREF_SET(__pyx_t_9, function);
13220  }
13221  }
13222  __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);
13223  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13224  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13225  __Pyx_GOTREF(__pyx_t_5);
13226  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13227  __pyx_r = __pyx_t_5;
13228  __pyx_t_5 = 0;
13229  goto __pyx_L8_try_return;
13230 
13231  /* "PyClical.pyx":1560
13232  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13233  * else:
13234  * try: # <<<<<<<<<<<<<<
13235  * return math.sqrt(obj)
13236  * except:
13237  */
13238  }
13239  __pyx_L4_error:;
13240  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13241  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13242  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13243 
13244  /* "PyClical.pyx":1562
13245  * try:
13246  * return math.sqrt(obj)
13247  * except: # <<<<<<<<<<<<<<
13248  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13249  *
13250  */
13251  /*except:*/ {
13252  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13253  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13254  __Pyx_GOTREF(__pyx_t_5);
13255  __Pyx_GOTREF(__pyx_t_9);
13256  __Pyx_GOTREF(__pyx_t_3);
13257 
13258  /* "PyClical.pyx":1563
13259  * return math.sqrt(obj)
13260  * except:
13261  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13262  *
13263  * cpdef inline exp(obj):
13264  */
13265  __Pyx_XDECREF(__pyx_r);
13266  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13267  __Pyx_GOTREF(__pyx_t_10);
13268  __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, 1563, __pyx_L6_except_error)
13269  __Pyx_GOTREF(__pyx_t_11);
13270  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13271  __pyx_r = __pyx_t_11;
13272  __pyx_t_11 = 0;
13273  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13274  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13275  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13276  goto __pyx_L7_except_return;
13277  }
13278  __pyx_L6_except_error:;
13279 
13280  /* "PyClical.pyx":1560
13281  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13282  * else:
13283  * try: # <<<<<<<<<<<<<<
13284  * return math.sqrt(obj)
13285  * except:
13286  */
13287  __Pyx_XGIVEREF(__pyx_t_6);
13288  __Pyx_XGIVEREF(__pyx_t_7);
13289  __Pyx_XGIVEREF(__pyx_t_8);
13290  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13291  goto __pyx_L1_error;
13292  __pyx_L8_try_return:;
13293  __Pyx_XGIVEREF(__pyx_t_6);
13294  __Pyx_XGIVEREF(__pyx_t_7);
13295  __Pyx_XGIVEREF(__pyx_t_8);
13296  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13297  goto __pyx_L0;
13298  __pyx_L7_except_return:;
13299  __Pyx_XGIVEREF(__pyx_t_6);
13300  __Pyx_XGIVEREF(__pyx_t_7);
13301  __Pyx_XGIVEREF(__pyx_t_8);
13302  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13303  goto __pyx_L0;
13304  }
13305  }
13306 
13307  /* "PyClical.pyx":1542
13308  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13309  *
13310  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13311  * """
13312  * Square root of multivector with optional complexifier.
13313  */
13314 
13315  /* function exit code */
13316  __pyx_L1_error:;
13317  __Pyx_XDECREF(__pyx_t_3);
13318  __Pyx_XDECREF(__pyx_t_5);
13319  __Pyx_XDECREF(__pyx_t_9);
13320  __Pyx_XDECREF(__pyx_t_10);
13321  __Pyx_XDECREF(__pyx_t_11);
13322  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13323  __pyx_r = 0;
13324  __pyx_L0:;
13325  __Pyx_XGIVEREF(__pyx_r);
13326  __Pyx_RefNannyFinishContext();
13327  return __pyx_r;
13328  }
13329 
13330  /* Python wrapper */
13331  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13332  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 ";
13333  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13334  PyObject *__pyx_v_obj = 0;
13335  PyObject *__pyx_v_i = 0;
13336  PyObject *__pyx_r = 0;
13337  __Pyx_RefNannyDeclarations
13338  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13339  {
13340  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13341  PyObject* values[2] = {0,0};
13342  values[1] = ((PyObject *)Py_None);
13343  if (unlikely(__pyx_kwds)) {
13344  Py_ssize_t kw_args;
13345  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13346  switch (pos_args) {
13347  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13348  CYTHON_FALLTHROUGH;
13349  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13350  CYTHON_FALLTHROUGH;
13351  case 0: break;
13352  default: goto __pyx_L5_argtuple_error;
13353  }
13354  kw_args = PyDict_Size(__pyx_kwds);
13355  switch (pos_args) {
13356  case 0:
13357  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13358  else goto __pyx_L5_argtuple_error;
13359  CYTHON_FALLTHROUGH;
13360  case 1:
13361  if (kw_args > 0) {
13362  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13363  if (value) { values[1] = value; kw_args--; }
13364  }
13365  }
13366  if (unlikely(kw_args > 0)) {
13367  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13368  }
13369  } else {
13370  switch (PyTuple_GET_SIZE(__pyx_args)) {
13371  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13372  CYTHON_FALLTHROUGH;
13373  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13374  break;
13375  default: goto __pyx_L5_argtuple_error;
13376  }
13377  }
13378  __pyx_v_obj = values[0];
13379  __pyx_v_i = values[1];
13380  }
13381  goto __pyx_L4_argument_unpacking_done;
13382  __pyx_L5_argtuple_error:;
13383  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13384  __pyx_L3_error:;
13385  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13386  __Pyx_RefNannyFinishContext();
13387  return NULL;
13388  __pyx_L4_argument_unpacking_done:;
13389  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13390 
13391  /* function exit code */
13392  __Pyx_RefNannyFinishContext();
13393  return __pyx_r;
13394  }
13395 
13396  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13397  PyObject *__pyx_r = NULL;
13398  __Pyx_RefNannyDeclarations
13399  PyObject *__pyx_t_1 = NULL;
13400  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13401  __Pyx_RefNannySetupContext("sqrt", 0);
13402  __Pyx_XDECREF(__pyx_r);
13403  __pyx_t_2.__pyx_n = 1;
13404  __pyx_t_2.i = __pyx_v_i;
13405  __pyx_t_1 = __pyx_f_8PyClical_sqrt(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error)
13406  __Pyx_GOTREF(__pyx_t_1);
13407  __pyx_r = __pyx_t_1;
13408  __pyx_t_1 = 0;
13409  goto __pyx_L0;
13410 
13411  /* function exit code */
13412  __pyx_L1_error:;
13413  __Pyx_XDECREF(__pyx_t_1);
13414  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13415  __pyx_r = NULL;
13416  __pyx_L0:;
13417  __Pyx_XGIVEREF(__pyx_r);
13418  __Pyx_RefNannyFinishContext();
13419  return __pyx_r;
13420  }
13421 
13422  /* "PyClical.pyx":1565
13423  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13424  *
13425  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13426  * """
13427  * Exponential of multivector.
13428  */
13429 
13430  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13431  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13432  PyObject *__pyx_r = NULL;
13433  __Pyx_RefNannyDeclarations
13434  PyObject *__pyx_t_1 = NULL;
13435  PyObject *__pyx_t_2 = NULL;
13436  PyObject *__pyx_t_3 = NULL;
13437  PyObject *__pyx_t_4 = NULL;
13438  PyObject *__pyx_t_5 = NULL;
13439  PyObject *__pyx_t_6 = NULL;
13440  PyObject *__pyx_t_7 = NULL;
13441  PyObject *__pyx_t_8 = NULL;
13442  __Pyx_RefNannySetupContext("exp", 0);
13443 
13444  /* "PyClical.pyx":1574
13445  * {1,2}
13446  * """
13447  * try: # <<<<<<<<<<<<<<
13448  * return math.exp(obj)
13449  * except:
13450  */
13451  {
13452  __Pyx_PyThreadState_declare
13453  __Pyx_PyThreadState_assign
13454  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13455  __Pyx_XGOTREF(__pyx_t_1);
13456  __Pyx_XGOTREF(__pyx_t_2);
13457  __Pyx_XGOTREF(__pyx_t_3);
13458  /*try:*/ {
13459 
13460  /* "PyClical.pyx":1575
13461  * """
13462  * try:
13463  * return math.exp(obj) # <<<<<<<<<<<<<<
13464  * except:
13465  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13466  */
13467  __Pyx_XDECREF(__pyx_r);
13468  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13469  __Pyx_GOTREF(__pyx_t_5);
13470  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1575, __pyx_L3_error)
13471  __Pyx_GOTREF(__pyx_t_6);
13472  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13473  __pyx_t_5 = NULL;
13474  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13475  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13476  if (likely(__pyx_t_5)) {
13477  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13478  __Pyx_INCREF(__pyx_t_5);
13479  __Pyx_INCREF(function);
13480  __Pyx_DECREF_SET(__pyx_t_6, function);
13481  }
13482  }
13483  __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);
13484  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13485  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13486  __Pyx_GOTREF(__pyx_t_4);
13487  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13488  __pyx_r = __pyx_t_4;
13489  __pyx_t_4 = 0;
13490  goto __pyx_L7_try_return;
13491 
13492  /* "PyClical.pyx":1574
13493  * {1,2}
13494  * """
13495  * try: # <<<<<<<<<<<<<<
13496  * return math.exp(obj)
13497  * except:
13498  */
13499  }
13500  __pyx_L3_error:;
13501  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13502  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13503  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13504 
13505  /* "PyClical.pyx":1576
13506  * try:
13507  * return math.exp(obj)
13508  * except: # <<<<<<<<<<<<<<
13509  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13510  *
13511  */
13512  /*except:*/ {
13513  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13514  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13515  __Pyx_GOTREF(__pyx_t_4);
13516  __Pyx_GOTREF(__pyx_t_6);
13517  __Pyx_GOTREF(__pyx_t_5);
13518 
13519  /* "PyClical.pyx":1577
13520  * return math.exp(obj)
13521  * except:
13522  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13523  *
13524  * cpdef inline log(obj,i = None):
13525  */
13526  __Pyx_XDECREF(__pyx_r);
13527  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13528  __Pyx_GOTREF(__pyx_t_7);
13529  __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, 1577, __pyx_L5_except_error)
13530  __Pyx_GOTREF(__pyx_t_8);
13531  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13532  __pyx_r = __pyx_t_8;
13533  __pyx_t_8 = 0;
13534  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13535  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13536  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13537  goto __pyx_L6_except_return;
13538  }
13539  __pyx_L5_except_error:;
13540 
13541  /* "PyClical.pyx":1574
13542  * {1,2}
13543  * """
13544  * try: # <<<<<<<<<<<<<<
13545  * return math.exp(obj)
13546  * except:
13547  */
13548  __Pyx_XGIVEREF(__pyx_t_1);
13549  __Pyx_XGIVEREF(__pyx_t_2);
13550  __Pyx_XGIVEREF(__pyx_t_3);
13551  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13552  goto __pyx_L1_error;
13553  __pyx_L7_try_return:;
13554  __Pyx_XGIVEREF(__pyx_t_1);
13555  __Pyx_XGIVEREF(__pyx_t_2);
13556  __Pyx_XGIVEREF(__pyx_t_3);
13557  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13558  goto __pyx_L0;
13559  __pyx_L6_except_return:;
13560  __Pyx_XGIVEREF(__pyx_t_1);
13561  __Pyx_XGIVEREF(__pyx_t_2);
13562  __Pyx_XGIVEREF(__pyx_t_3);
13563  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13564  goto __pyx_L0;
13565  }
13566 
13567  /* "PyClical.pyx":1565
13568  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13569  *
13570  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13571  * """
13572  * Exponential of multivector.
13573  */
13574 
13575  /* function exit code */
13576  __pyx_L1_error:;
13577  __Pyx_XDECREF(__pyx_t_4);
13578  __Pyx_XDECREF(__pyx_t_5);
13579  __Pyx_XDECREF(__pyx_t_6);
13580  __Pyx_XDECREF(__pyx_t_7);
13581  __Pyx_XDECREF(__pyx_t_8);
13582  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13583  __pyx_r = 0;
13584  __pyx_L0:;
13585  __Pyx_XGIVEREF(__pyx_r);
13586  __Pyx_RefNannyFinishContext();
13587  return __pyx_r;
13588  }
13589 
13590  /* Python wrapper */
13591  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13592  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 ";
13593  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13594  PyObject *__pyx_r = 0;
13595  __Pyx_RefNannyDeclarations
13596  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13597  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13598 
13599  /* function exit code */
13600  __Pyx_RefNannyFinishContext();
13601  return __pyx_r;
13602  }
13603 
13604  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13605  PyObject *__pyx_r = NULL;
13606  __Pyx_RefNannyDeclarations
13607  PyObject *__pyx_t_1 = NULL;
13608  __Pyx_RefNannySetupContext("exp", 0);
13609  __Pyx_XDECREF(__pyx_r);
13610  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13611  __Pyx_GOTREF(__pyx_t_1);
13612  __pyx_r = __pyx_t_1;
13613  __pyx_t_1 = 0;
13614  goto __pyx_L0;
13615 
13616  /* function exit code */
13617  __pyx_L1_error:;
13618  __Pyx_XDECREF(__pyx_t_1);
13619  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13620  __pyx_r = NULL;
13621  __pyx_L0:;
13622  __Pyx_XGIVEREF(__pyx_r);
13623  __Pyx_RefNannyFinishContext();
13624  return __pyx_r;
13625  }
13626 
13627  /* "PyClical.pyx":1579
13628  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13629  *
13630  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13631  * """
13632  * Natural logarithm of multivector with optional complexifier.
13633  */
13634 
13635  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13636  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) {
13637  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13638  PyObject *__pyx_r = NULL;
13639  __Pyx_RefNannyDeclarations
13640  int __pyx_t_1;
13641  int __pyx_t_2;
13642  PyObject *__pyx_t_3 = NULL;
13643  Clifford __pyx_t_4;
13644  PyObject *__pyx_t_5 = NULL;
13645  PyObject *__pyx_t_6 = NULL;
13646  PyObject *__pyx_t_7 = NULL;
13647  PyObject *__pyx_t_8 = NULL;
13648  PyObject *__pyx_t_9 = NULL;
13649  PyObject *__pyx_t_10 = NULL;
13650  PyObject *__pyx_t_11 = NULL;
13651  __Pyx_RefNannySetupContext("log", 0);
13652  if (__pyx_optional_args) {
13653  if (__pyx_optional_args->__pyx_n > 0) {
13654  __pyx_v_i = __pyx_optional_args->i;
13655  }
13656  }
13657 
13658  /* "PyClical.pyx":1594
13659  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13660  * """
13661  * if not (i is None): # <<<<<<<<<<<<<<
13662  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13663  * else:
13664  */
13665  __pyx_t_1 = (__pyx_v_i != Py_None);
13666  __pyx_t_2 = (__pyx_t_1 != 0);
13667  if (__pyx_t_2) {
13668 
13669  /* "PyClical.pyx":1595
13670  * """
13671  * if not (i is None):
13672  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13673  * else:
13674  * try:
13675  */
13676  __Pyx_XDECREF(__pyx_r);
13677  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
13678  __Pyx_GOTREF(__pyx_t_3);
13679  try {
13680  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13681  } catch(...) {
13682  __Pyx_CppExn2PyErr();
13683  __PYX_ERR(0, 1595, __pyx_L1_error)
13684  }
13685  __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, 1595, __pyx_L1_error)
13686  __Pyx_GOTREF(__pyx_t_5);
13687  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13688  __pyx_r = __pyx_t_5;
13689  __pyx_t_5 = 0;
13690  goto __pyx_L0;
13691 
13692  /* "PyClical.pyx":1594
13693  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13694  * """
13695  * if not (i is None): # <<<<<<<<<<<<<<
13696  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13697  * else:
13698  */
13699  }
13700 
13701  /* "PyClical.pyx":1597
13702  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13703  * else:
13704  * try: # <<<<<<<<<<<<<<
13705  * return math.log(obj)
13706  * except:
13707  */
13708  /*else*/ {
13709  {
13710  __Pyx_PyThreadState_declare
13711  __Pyx_PyThreadState_assign
13712  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13713  __Pyx_XGOTREF(__pyx_t_6);
13714  __Pyx_XGOTREF(__pyx_t_7);
13715  __Pyx_XGOTREF(__pyx_t_8);
13716  /*try:*/ {
13717 
13718  /* "PyClical.pyx":1598
13719  * else:
13720  * try:
13721  * return math.log(obj) # <<<<<<<<<<<<<<
13722  * except:
13723  * return clifford().wrap( glucat.log(toClifford(obj)) )
13724  */
13725  __Pyx_XDECREF(__pyx_r);
13726  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
13727  __Pyx_GOTREF(__pyx_t_3);
13728  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1598, __pyx_L4_error)
13729  __Pyx_GOTREF(__pyx_t_9);
13730  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13731  __pyx_t_3 = NULL;
13732  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13733  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13734  if (likely(__pyx_t_3)) {
13735  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13736  __Pyx_INCREF(__pyx_t_3);
13737  __Pyx_INCREF(function);
13738  __Pyx_DECREF_SET(__pyx_t_9, function);
13739  }
13740  }
13741  __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);
13742  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13743  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13744  __Pyx_GOTREF(__pyx_t_5);
13745  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13746  __pyx_r = __pyx_t_5;
13747  __pyx_t_5 = 0;
13748  goto __pyx_L8_try_return;
13749 
13750  /* "PyClical.pyx":1597
13751  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13752  * else:
13753  * try: # <<<<<<<<<<<<<<
13754  * return math.log(obj)
13755  * except:
13756  */
13757  }
13758  __pyx_L4_error:;
13759  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13760  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13761  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13762 
13763  /* "PyClical.pyx":1599
13764  * try:
13765  * return math.log(obj)
13766  * except: # <<<<<<<<<<<<<<
13767  * return clifford().wrap( glucat.log(toClifford(obj)) )
13768  *
13769  */
13770  /*except:*/ {
13771  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13772  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
13773  __Pyx_GOTREF(__pyx_t_5);
13774  __Pyx_GOTREF(__pyx_t_9);
13775  __Pyx_GOTREF(__pyx_t_3);
13776 
13777  /* "PyClical.pyx":1600
13778  * return math.log(obj)
13779  * except:
13780  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
13781  *
13782  * cpdef inline cos(obj,i = None):
13783  */
13784  __Pyx_XDECREF(__pyx_r);
13785  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13786  __Pyx_GOTREF(__pyx_t_10);
13787  __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, 1600, __pyx_L6_except_error)
13788  __Pyx_GOTREF(__pyx_t_11);
13789  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13790  __pyx_r = __pyx_t_11;
13791  __pyx_t_11 = 0;
13792  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13793  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13794  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13795  goto __pyx_L7_except_return;
13796  }
13797  __pyx_L6_except_error:;
13798 
13799  /* "PyClical.pyx":1597
13800  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13801  * else:
13802  * try: # <<<<<<<<<<<<<<
13803  * return math.log(obj)
13804  * except:
13805  */
13806  __Pyx_XGIVEREF(__pyx_t_6);
13807  __Pyx_XGIVEREF(__pyx_t_7);
13808  __Pyx_XGIVEREF(__pyx_t_8);
13809  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13810  goto __pyx_L1_error;
13811  __pyx_L8_try_return:;
13812  __Pyx_XGIVEREF(__pyx_t_6);
13813  __Pyx_XGIVEREF(__pyx_t_7);
13814  __Pyx_XGIVEREF(__pyx_t_8);
13815  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13816  goto __pyx_L0;
13817  __pyx_L7_except_return:;
13818  __Pyx_XGIVEREF(__pyx_t_6);
13819  __Pyx_XGIVEREF(__pyx_t_7);
13820  __Pyx_XGIVEREF(__pyx_t_8);
13821  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13822  goto __pyx_L0;
13823  }
13824  }
13825 
13826  /* "PyClical.pyx":1579
13827  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13828  *
13829  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13830  * """
13831  * Natural logarithm of multivector with optional complexifier.
13832  */
13833 
13834  /* function exit code */
13835  __pyx_L1_error:;
13836  __Pyx_XDECREF(__pyx_t_3);
13837  __Pyx_XDECREF(__pyx_t_5);
13838  __Pyx_XDECREF(__pyx_t_9);
13839  __Pyx_XDECREF(__pyx_t_10);
13840  __Pyx_XDECREF(__pyx_t_11);
13841  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13842  __pyx_r = 0;
13843  __pyx_L0:;
13844  __Pyx_XGIVEREF(__pyx_r);
13845  __Pyx_RefNannyFinishContext();
13846  return __pyx_r;
13847  }
13848 
13849  /* Python wrapper */
13850  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13851  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 ";
13852  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13853  PyObject *__pyx_v_obj = 0;
13854  PyObject *__pyx_v_i = 0;
13855  PyObject *__pyx_r = 0;
13856  __Pyx_RefNannyDeclarations
13857  __Pyx_RefNannySetupContext("log (wrapper)", 0);
13858  {
13859  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13860  PyObject* values[2] = {0,0};
13861  values[1] = ((PyObject *)Py_None);
13862  if (unlikely(__pyx_kwds)) {
13863  Py_ssize_t kw_args;
13864  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13865  switch (pos_args) {
13866  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13867  CYTHON_FALLTHROUGH;
13868  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13869  CYTHON_FALLTHROUGH;
13870  case 0: break;
13871  default: goto __pyx_L5_argtuple_error;
13872  }
13873  kw_args = PyDict_Size(__pyx_kwds);
13874  switch (pos_args) {
13875  case 0:
13876  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13877  else goto __pyx_L5_argtuple_error;
13878  CYTHON_FALLTHROUGH;
13879  case 1:
13880  if (kw_args > 0) {
13881  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13882  if (value) { values[1] = value; kw_args--; }
13883  }
13884  }
13885  if (unlikely(kw_args > 0)) {
13886  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
13887  }
13888  } else {
13889  switch (PyTuple_GET_SIZE(__pyx_args)) {
13890  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13891  CYTHON_FALLTHROUGH;
13892  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13893  break;
13894  default: goto __pyx_L5_argtuple_error;
13895  }
13896  }
13897  __pyx_v_obj = values[0];
13898  __pyx_v_i = values[1];
13899  }
13900  goto __pyx_L4_argument_unpacking_done;
13901  __pyx_L5_argtuple_error:;
13902  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
13903  __pyx_L3_error:;
13904  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13905  __Pyx_RefNannyFinishContext();
13906  return NULL;
13907  __pyx_L4_argument_unpacking_done:;
13908  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13909 
13910  /* function exit code */
13911  __Pyx_RefNannyFinishContext();
13912  return __pyx_r;
13913  }
13914 
13915  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13916  PyObject *__pyx_r = NULL;
13917  __Pyx_RefNannyDeclarations
13918  PyObject *__pyx_t_1 = NULL;
13919  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13920  __Pyx_RefNannySetupContext("log", 0);
13921  __Pyx_XDECREF(__pyx_r);
13922  __pyx_t_2.__pyx_n = 1;
13923  __pyx_t_2.i = __pyx_v_i;
13924  __pyx_t_1 = __pyx_f_8PyClical_log(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error)
13925  __Pyx_GOTREF(__pyx_t_1);
13926  __pyx_r = __pyx_t_1;
13927  __pyx_t_1 = 0;
13928  goto __pyx_L0;
13929 
13930  /* function exit code */
13931  __pyx_L1_error:;
13932  __Pyx_XDECREF(__pyx_t_1);
13933  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13934  __pyx_r = NULL;
13935  __pyx_L0:;
13936  __Pyx_XGIVEREF(__pyx_r);
13937  __Pyx_RefNannyFinishContext();
13938  return __pyx_r;
13939  }
13940 
13941  /* "PyClical.pyx":1602
13942  * return clifford().wrap( glucat.log(toClifford(obj)) )
13943  *
13944  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
13945  * """
13946  * Cosine of multivector with optional complexifier.
13947  */
13948 
13949  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13950  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) {
13951  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13952  PyObject *__pyx_r = NULL;
13953  __Pyx_RefNannyDeclarations
13954  int __pyx_t_1;
13955  int __pyx_t_2;
13956  PyObject *__pyx_t_3 = NULL;
13957  Clifford __pyx_t_4;
13958  PyObject *__pyx_t_5 = NULL;
13959  PyObject *__pyx_t_6 = NULL;
13960  PyObject *__pyx_t_7 = NULL;
13961  PyObject *__pyx_t_8 = NULL;
13962  PyObject *__pyx_t_9 = NULL;
13963  PyObject *__pyx_t_10 = NULL;
13964  PyObject *__pyx_t_11 = NULL;
13965  __Pyx_RefNannySetupContext("cos", 0);
13966  if (__pyx_optional_args) {
13967  if (__pyx_optional_args->__pyx_n > 0) {
13968  __pyx_v_i = __pyx_optional_args->i;
13969  }
13970  }
13971 
13972  /* "PyClical.pyx":1611
13973  * {1,2}
13974  * """
13975  * if not (i is None): # <<<<<<<<<<<<<<
13976  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
13977  * else:
13978  */
13979  __pyx_t_1 = (__pyx_v_i != Py_None);
13980  __pyx_t_2 = (__pyx_t_1 != 0);
13981  if (__pyx_t_2) {
13982 
13983  /* "PyClical.pyx":1612
13984  * """
13985  * if not (i is None):
13986  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13987  * else:
13988  * try:
13989  */
13990  __Pyx_XDECREF(__pyx_r);
13991  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
13992  __Pyx_GOTREF(__pyx_t_3);
13993  try {
13994  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13995  } catch(...) {
13996  __Pyx_CppExn2PyErr();
13997  __PYX_ERR(0, 1612, __pyx_L1_error)
13998  }
13999  __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, 1612, __pyx_L1_error)
14000  __Pyx_GOTREF(__pyx_t_5);
14001  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14002  __pyx_r = __pyx_t_5;
14003  __pyx_t_5 = 0;
14004  goto __pyx_L0;
14005 
14006  /* "PyClical.pyx":1611
14007  * {1,2}
14008  * """
14009  * if not (i is None): # <<<<<<<<<<<<<<
14010  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14011  * else:
14012  */
14013  }
14014 
14015  /* "PyClical.pyx":1614
14016  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14017  * else:
14018  * try: # <<<<<<<<<<<<<<
14019  * return math.cos(obj)
14020  * except:
14021  */
14022  /*else*/ {
14023  {
14024  __Pyx_PyThreadState_declare
14025  __Pyx_PyThreadState_assign
14026  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14027  __Pyx_XGOTREF(__pyx_t_6);
14028  __Pyx_XGOTREF(__pyx_t_7);
14029  __Pyx_XGOTREF(__pyx_t_8);
14030  /*try:*/ {
14031 
14032  /* "PyClical.pyx":1615
14033  * else:
14034  * try:
14035  * return math.cos(obj) # <<<<<<<<<<<<<<
14036  * except:
14037  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14038  */
14039  __Pyx_XDECREF(__pyx_r);
14040  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14041  __Pyx_GOTREF(__pyx_t_3);
14042  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1615, __pyx_L4_error)
14043  __Pyx_GOTREF(__pyx_t_9);
14044  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14045  __pyx_t_3 = NULL;
14046  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14047  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14048  if (likely(__pyx_t_3)) {
14049  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14050  __Pyx_INCREF(__pyx_t_3);
14051  __Pyx_INCREF(function);
14052  __Pyx_DECREF_SET(__pyx_t_9, function);
14053  }
14054  }
14055  __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);
14056  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14057  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14058  __Pyx_GOTREF(__pyx_t_5);
14059  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14060  __pyx_r = __pyx_t_5;
14061  __pyx_t_5 = 0;
14062  goto __pyx_L8_try_return;
14063 
14064  /* "PyClical.pyx":1614
14065  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14066  * else:
14067  * try: # <<<<<<<<<<<<<<
14068  * return math.cos(obj)
14069  * except:
14070  */
14071  }
14072  __pyx_L4_error:;
14073  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14074  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14075  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14076 
14077  /* "PyClical.pyx":1616
14078  * try:
14079  * return math.cos(obj)
14080  * except: # <<<<<<<<<<<<<<
14081  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14082  *
14083  */
14084  /*except:*/ {
14085  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14086  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14087  __Pyx_GOTREF(__pyx_t_5);
14088  __Pyx_GOTREF(__pyx_t_9);
14089  __Pyx_GOTREF(__pyx_t_3);
14090 
14091  /* "PyClical.pyx":1617
14092  * return math.cos(obj)
14093  * except:
14094  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14095  *
14096  * cpdef inline acos(obj,i = None):
14097  */
14098  __Pyx_XDECREF(__pyx_r);
14099  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14100  __Pyx_GOTREF(__pyx_t_10);
14101  __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, 1617, __pyx_L6_except_error)
14102  __Pyx_GOTREF(__pyx_t_11);
14103  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14104  __pyx_r = __pyx_t_11;
14105  __pyx_t_11 = 0;
14106  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14107  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14108  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14109  goto __pyx_L7_except_return;
14110  }
14111  __pyx_L6_except_error:;
14112 
14113  /* "PyClical.pyx":1614
14114  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14115  * else:
14116  * try: # <<<<<<<<<<<<<<
14117  * return math.cos(obj)
14118  * except:
14119  */
14120  __Pyx_XGIVEREF(__pyx_t_6);
14121  __Pyx_XGIVEREF(__pyx_t_7);
14122  __Pyx_XGIVEREF(__pyx_t_8);
14123  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14124  goto __pyx_L1_error;
14125  __pyx_L8_try_return:;
14126  __Pyx_XGIVEREF(__pyx_t_6);
14127  __Pyx_XGIVEREF(__pyx_t_7);
14128  __Pyx_XGIVEREF(__pyx_t_8);
14129  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14130  goto __pyx_L0;
14131  __pyx_L7_except_return:;
14132  __Pyx_XGIVEREF(__pyx_t_6);
14133  __Pyx_XGIVEREF(__pyx_t_7);
14134  __Pyx_XGIVEREF(__pyx_t_8);
14135  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14136  goto __pyx_L0;
14137  }
14138  }
14139 
14140  /* "PyClical.pyx":1602
14141  * return clifford().wrap( glucat.log(toClifford(obj)) )
14142  *
14143  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14144  * """
14145  * Cosine of multivector with optional complexifier.
14146  */
14147 
14148  /* function exit code */
14149  __pyx_L1_error:;
14150  __Pyx_XDECREF(__pyx_t_3);
14151  __Pyx_XDECREF(__pyx_t_5);
14152  __Pyx_XDECREF(__pyx_t_9);
14153  __Pyx_XDECREF(__pyx_t_10);
14154  __Pyx_XDECREF(__pyx_t_11);
14155  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14156  __pyx_r = 0;
14157  __pyx_L0:;
14158  __Pyx_XGIVEREF(__pyx_r);
14159  __Pyx_RefNannyFinishContext();
14160  return __pyx_r;
14161  }
14162 
14163  /* Python wrapper */
14164  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14165  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 ";
14166  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14167  PyObject *__pyx_v_obj = 0;
14168  PyObject *__pyx_v_i = 0;
14169  PyObject *__pyx_r = 0;
14170  __Pyx_RefNannyDeclarations
14171  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14172  {
14173  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14174  PyObject* values[2] = {0,0};
14175  values[1] = ((PyObject *)Py_None);
14176  if (unlikely(__pyx_kwds)) {
14177  Py_ssize_t kw_args;
14178  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14179  switch (pos_args) {
14180  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14181  CYTHON_FALLTHROUGH;
14182  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14183  CYTHON_FALLTHROUGH;
14184  case 0: break;
14185  default: goto __pyx_L5_argtuple_error;
14186  }
14187  kw_args = PyDict_Size(__pyx_kwds);
14188  switch (pos_args) {
14189  case 0:
14190  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14191  else goto __pyx_L5_argtuple_error;
14192  CYTHON_FALLTHROUGH;
14193  case 1:
14194  if (kw_args > 0) {
14195  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14196  if (value) { values[1] = value; kw_args--; }
14197  }
14198  }
14199  if (unlikely(kw_args > 0)) {
14200  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14201  }
14202  } else {
14203  switch (PyTuple_GET_SIZE(__pyx_args)) {
14204  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14205  CYTHON_FALLTHROUGH;
14206  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14207  break;
14208  default: goto __pyx_L5_argtuple_error;
14209  }
14210  }
14211  __pyx_v_obj = values[0];
14212  __pyx_v_i = values[1];
14213  }
14214  goto __pyx_L4_argument_unpacking_done;
14215  __pyx_L5_argtuple_error:;
14216  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14217  __pyx_L3_error:;
14218  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14219  __Pyx_RefNannyFinishContext();
14220  return NULL;
14221  __pyx_L4_argument_unpacking_done:;
14222  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14223 
14224  /* function exit code */
14225  __Pyx_RefNannyFinishContext();
14226  return __pyx_r;
14227  }
14228 
14229  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14230  PyObject *__pyx_r = NULL;
14231  __Pyx_RefNannyDeclarations
14232  PyObject *__pyx_t_1 = NULL;
14233  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14234  __Pyx_RefNannySetupContext("cos", 0);
14235  __Pyx_XDECREF(__pyx_r);
14236  __pyx_t_2.__pyx_n = 1;
14237  __pyx_t_2.i = __pyx_v_i;
14238  __pyx_t_1 = __pyx_f_8PyClical_cos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error)
14239  __Pyx_GOTREF(__pyx_t_1);
14240  __pyx_r = __pyx_t_1;
14241  __pyx_t_1 = 0;
14242  goto __pyx_L0;
14243 
14244  /* function exit code */
14245  __pyx_L1_error:;
14246  __Pyx_XDECREF(__pyx_t_1);
14247  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14248  __pyx_r = NULL;
14249  __pyx_L0:;
14250  __Pyx_XGIVEREF(__pyx_r);
14251  __Pyx_RefNannyFinishContext();
14252  return __pyx_r;
14253  }
14254 
14255  /* "PyClical.pyx":1619
14256  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14257  *
14258  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14259  * """
14260  * Inverse cosine of multivector with optional complexifier.
14261  */
14262 
14263  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14264  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) {
14265  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14266  PyObject *__pyx_r = NULL;
14267  __Pyx_RefNannyDeclarations
14268  int __pyx_t_1;
14269  int __pyx_t_2;
14270  PyObject *__pyx_t_3 = NULL;
14271  Clifford __pyx_t_4;
14272  PyObject *__pyx_t_5 = NULL;
14273  PyObject *__pyx_t_6 = NULL;
14274  PyObject *__pyx_t_7 = NULL;
14275  PyObject *__pyx_t_8 = NULL;
14276  PyObject *__pyx_t_9 = NULL;
14277  PyObject *__pyx_t_10 = NULL;
14278  PyObject *__pyx_t_11 = NULL;
14279  __Pyx_RefNannySetupContext("acos", 0);
14280  if (__pyx_optional_args) {
14281  if (__pyx_optional_args->__pyx_n > 0) {
14282  __pyx_v_i = __pyx_optional_args->i;
14283  }
14284  }
14285 
14286  /* "PyClical.pyx":1632
14287  * {1,2}
14288  * """
14289  * if not (i is None): # <<<<<<<<<<<<<<
14290  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14291  * else:
14292  */
14293  __pyx_t_1 = (__pyx_v_i != Py_None);
14294  __pyx_t_2 = (__pyx_t_1 != 0);
14295  if (__pyx_t_2) {
14296 
14297  /* "PyClical.pyx":1633
14298  * """
14299  * if not (i is None):
14300  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14301  * else:
14302  * try:
14303  */
14304  __Pyx_XDECREF(__pyx_r);
14305  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
14306  __Pyx_GOTREF(__pyx_t_3);
14307  try {
14308  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14309  } catch(...) {
14310  __Pyx_CppExn2PyErr();
14311  __PYX_ERR(0, 1633, __pyx_L1_error)
14312  }
14313  __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, 1633, __pyx_L1_error)
14314  __Pyx_GOTREF(__pyx_t_5);
14315  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14316  __pyx_r = __pyx_t_5;
14317  __pyx_t_5 = 0;
14318  goto __pyx_L0;
14319 
14320  /* "PyClical.pyx":1632
14321  * {1,2}
14322  * """
14323  * if not (i is None): # <<<<<<<<<<<<<<
14324  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14325  * else:
14326  */
14327  }
14328 
14329  /* "PyClical.pyx":1635
14330  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14331  * else:
14332  * try: # <<<<<<<<<<<<<<
14333  * return math.acos(obj)
14334  * except:
14335  */
14336  /*else*/ {
14337  {
14338  __Pyx_PyThreadState_declare
14339  __Pyx_PyThreadState_assign
14340  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14341  __Pyx_XGOTREF(__pyx_t_6);
14342  __Pyx_XGOTREF(__pyx_t_7);
14343  __Pyx_XGOTREF(__pyx_t_8);
14344  /*try:*/ {
14345 
14346  /* "PyClical.pyx":1636
14347  * else:
14348  * try:
14349  * return math.acos(obj) # <<<<<<<<<<<<<<
14350  * except:
14351  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14352  */
14353  __Pyx_XDECREF(__pyx_r);
14354  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14355  __Pyx_GOTREF(__pyx_t_3);
14356  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1636, __pyx_L4_error)
14357  __Pyx_GOTREF(__pyx_t_9);
14358  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14359  __pyx_t_3 = NULL;
14360  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14361  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14362  if (likely(__pyx_t_3)) {
14363  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14364  __Pyx_INCREF(__pyx_t_3);
14365  __Pyx_INCREF(function);
14366  __Pyx_DECREF_SET(__pyx_t_9, function);
14367  }
14368  }
14369  __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);
14370  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14371  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14372  __Pyx_GOTREF(__pyx_t_5);
14373  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14374  __pyx_r = __pyx_t_5;
14375  __pyx_t_5 = 0;
14376  goto __pyx_L8_try_return;
14377 
14378  /* "PyClical.pyx":1635
14379  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14380  * else:
14381  * try: # <<<<<<<<<<<<<<
14382  * return math.acos(obj)
14383  * except:
14384  */
14385  }
14386  __pyx_L4_error:;
14387  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14388  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14389  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14390 
14391  /* "PyClical.pyx":1637
14392  * try:
14393  * return math.acos(obj)
14394  * except: # <<<<<<<<<<<<<<
14395  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14396  *
14397  */
14398  /*except:*/ {
14399  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14400  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14401  __Pyx_GOTREF(__pyx_t_5);
14402  __Pyx_GOTREF(__pyx_t_9);
14403  __Pyx_GOTREF(__pyx_t_3);
14404 
14405  /* "PyClical.pyx":1638
14406  * return math.acos(obj)
14407  * except:
14408  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14409  *
14410  * cpdef inline cosh(obj):
14411  */
14412  __Pyx_XDECREF(__pyx_r);
14413  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14414  __Pyx_GOTREF(__pyx_t_10);
14415  __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, 1638, __pyx_L6_except_error)
14416  __Pyx_GOTREF(__pyx_t_11);
14417  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14418  __pyx_r = __pyx_t_11;
14419  __pyx_t_11 = 0;
14420  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14421  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14422  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14423  goto __pyx_L7_except_return;
14424  }
14425  __pyx_L6_except_error:;
14426 
14427  /* "PyClical.pyx":1635
14428  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14429  * else:
14430  * try: # <<<<<<<<<<<<<<
14431  * return math.acos(obj)
14432  * except:
14433  */
14434  __Pyx_XGIVEREF(__pyx_t_6);
14435  __Pyx_XGIVEREF(__pyx_t_7);
14436  __Pyx_XGIVEREF(__pyx_t_8);
14437  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14438  goto __pyx_L1_error;
14439  __pyx_L8_try_return:;
14440  __Pyx_XGIVEREF(__pyx_t_6);
14441  __Pyx_XGIVEREF(__pyx_t_7);
14442  __Pyx_XGIVEREF(__pyx_t_8);
14443  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14444  goto __pyx_L0;
14445  __pyx_L7_except_return:;
14446  __Pyx_XGIVEREF(__pyx_t_6);
14447  __Pyx_XGIVEREF(__pyx_t_7);
14448  __Pyx_XGIVEREF(__pyx_t_8);
14449  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14450  goto __pyx_L0;
14451  }
14452  }
14453 
14454  /* "PyClical.pyx":1619
14455  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14456  *
14457  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14458  * """
14459  * Inverse cosine of multivector with optional complexifier.
14460  */
14461 
14462  /* function exit code */
14463  __pyx_L1_error:;
14464  __Pyx_XDECREF(__pyx_t_3);
14465  __Pyx_XDECREF(__pyx_t_5);
14466  __Pyx_XDECREF(__pyx_t_9);
14467  __Pyx_XDECREF(__pyx_t_10);
14468  __Pyx_XDECREF(__pyx_t_11);
14469  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14470  __pyx_r = 0;
14471  __pyx_L0:;
14472  __Pyx_XGIVEREF(__pyx_r);
14473  __Pyx_RefNannyFinishContext();
14474  return __pyx_r;
14475  }
14476 
14477  /* Python wrapper */
14478  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14479  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 ";
14480  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14481  PyObject *__pyx_v_obj = 0;
14482  PyObject *__pyx_v_i = 0;
14483  PyObject *__pyx_r = 0;
14484  __Pyx_RefNannyDeclarations
14485  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14486  {
14487  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14488  PyObject* values[2] = {0,0};
14489  values[1] = ((PyObject *)Py_None);
14490  if (unlikely(__pyx_kwds)) {
14491  Py_ssize_t kw_args;
14492  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14493  switch (pos_args) {
14494  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14495  CYTHON_FALLTHROUGH;
14496  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14497  CYTHON_FALLTHROUGH;
14498  case 0: break;
14499  default: goto __pyx_L5_argtuple_error;
14500  }
14501  kw_args = PyDict_Size(__pyx_kwds);
14502  switch (pos_args) {
14503  case 0:
14504  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14505  else goto __pyx_L5_argtuple_error;
14506  CYTHON_FALLTHROUGH;
14507  case 1:
14508  if (kw_args > 0) {
14509  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14510  if (value) { values[1] = value; kw_args--; }
14511  }
14512  }
14513  if (unlikely(kw_args > 0)) {
14514  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14515  }
14516  } else {
14517  switch (PyTuple_GET_SIZE(__pyx_args)) {
14518  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14519  CYTHON_FALLTHROUGH;
14520  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14521  break;
14522  default: goto __pyx_L5_argtuple_error;
14523  }
14524  }
14525  __pyx_v_obj = values[0];
14526  __pyx_v_i = values[1];
14527  }
14528  goto __pyx_L4_argument_unpacking_done;
14529  __pyx_L5_argtuple_error:;
14530  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14531  __pyx_L3_error:;
14532  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14533  __Pyx_RefNannyFinishContext();
14534  return NULL;
14535  __pyx_L4_argument_unpacking_done:;
14536  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14537 
14538  /* function exit code */
14539  __Pyx_RefNannyFinishContext();
14540  return __pyx_r;
14541  }
14542 
14543  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14544  PyObject *__pyx_r = NULL;
14545  __Pyx_RefNannyDeclarations
14546  PyObject *__pyx_t_1 = NULL;
14547  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14548  __Pyx_RefNannySetupContext("acos", 0);
14549  __Pyx_XDECREF(__pyx_r);
14550  __pyx_t_2.__pyx_n = 1;
14551  __pyx_t_2.i = __pyx_v_i;
14552  __pyx_t_1 = __pyx_f_8PyClical_acos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
14553  __Pyx_GOTREF(__pyx_t_1);
14554  __pyx_r = __pyx_t_1;
14555  __pyx_t_1 = 0;
14556  goto __pyx_L0;
14557 
14558  /* function exit code */
14559  __pyx_L1_error:;
14560  __Pyx_XDECREF(__pyx_t_1);
14561  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14562  __pyx_r = NULL;
14563  __pyx_L0:;
14564  __Pyx_XGIVEREF(__pyx_r);
14565  __Pyx_RefNannyFinishContext();
14566  return __pyx_r;
14567  }
14568 
14569  /* "PyClical.pyx":1640
14570  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14571  *
14572  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14573  * """
14574  * Hyperbolic cosine of multivector.
14575  */
14576 
14577  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14578  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14579  PyObject *__pyx_r = NULL;
14580  __Pyx_RefNannyDeclarations
14581  PyObject *__pyx_t_1 = NULL;
14582  PyObject *__pyx_t_2 = NULL;
14583  PyObject *__pyx_t_3 = NULL;
14584  PyObject *__pyx_t_4 = NULL;
14585  PyObject *__pyx_t_5 = NULL;
14586  PyObject *__pyx_t_6 = NULL;
14587  PyObject *__pyx_t_7 = NULL;
14588  PyObject *__pyx_t_8 = NULL;
14589  __Pyx_RefNannySetupContext("cosh", 0);
14590 
14591  /* "PyClical.pyx":1651
14592  * {1,2}
14593  * """
14594  * try: # <<<<<<<<<<<<<<
14595  * return math.cosh(obj)
14596  * except:
14597  */
14598  {
14599  __Pyx_PyThreadState_declare
14600  __Pyx_PyThreadState_assign
14601  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14602  __Pyx_XGOTREF(__pyx_t_1);
14603  __Pyx_XGOTREF(__pyx_t_2);
14604  __Pyx_XGOTREF(__pyx_t_3);
14605  /*try:*/ {
14606 
14607  /* "PyClical.pyx":1652
14608  * """
14609  * try:
14610  * return math.cosh(obj) # <<<<<<<<<<<<<<
14611  * except:
14612  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14613  */
14614  __Pyx_XDECREF(__pyx_r);
14615  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
14616  __Pyx_GOTREF(__pyx_t_5);
14617  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cosh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1652, __pyx_L3_error)
14618  __Pyx_GOTREF(__pyx_t_6);
14619  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14620  __pyx_t_5 = NULL;
14621  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14622  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14623  if (likely(__pyx_t_5)) {
14624  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14625  __Pyx_INCREF(__pyx_t_5);
14626  __Pyx_INCREF(function);
14627  __Pyx_DECREF_SET(__pyx_t_6, function);
14628  }
14629  }
14630  __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);
14631  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14632  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14633  __Pyx_GOTREF(__pyx_t_4);
14634  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14635  __pyx_r = __pyx_t_4;
14636  __pyx_t_4 = 0;
14637  goto __pyx_L7_try_return;
14638 
14639  /* "PyClical.pyx":1651
14640  * {1,2}
14641  * """
14642  * try: # <<<<<<<<<<<<<<
14643  * return math.cosh(obj)
14644  * except:
14645  */
14646  }
14647  __pyx_L3_error:;
14648  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14649  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14650  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14651 
14652  /* "PyClical.pyx":1653
14653  * try:
14654  * return math.cosh(obj)
14655  * except: # <<<<<<<<<<<<<<
14656  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14657  *
14658  */
14659  /*except:*/ {
14660  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14661  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
14662  __Pyx_GOTREF(__pyx_t_4);
14663  __Pyx_GOTREF(__pyx_t_6);
14664  __Pyx_GOTREF(__pyx_t_5);
14665 
14666  /* "PyClical.pyx":1654
14667  * return math.cosh(obj)
14668  * except:
14669  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14670  *
14671  * cpdef inline acosh(obj,i = None):
14672  */
14673  __Pyx_XDECREF(__pyx_r);
14674  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14675  __Pyx_GOTREF(__pyx_t_7);
14676  __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, 1654, __pyx_L5_except_error)
14677  __Pyx_GOTREF(__pyx_t_8);
14678  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14679  __pyx_r = __pyx_t_8;
14680  __pyx_t_8 = 0;
14681  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14682  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14683  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14684  goto __pyx_L6_except_return;
14685  }
14686  __pyx_L5_except_error:;
14687 
14688  /* "PyClical.pyx":1651
14689  * {1,2}
14690  * """
14691  * try: # <<<<<<<<<<<<<<
14692  * return math.cosh(obj)
14693  * except:
14694  */
14695  __Pyx_XGIVEREF(__pyx_t_1);
14696  __Pyx_XGIVEREF(__pyx_t_2);
14697  __Pyx_XGIVEREF(__pyx_t_3);
14698  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14699  goto __pyx_L1_error;
14700  __pyx_L7_try_return:;
14701  __Pyx_XGIVEREF(__pyx_t_1);
14702  __Pyx_XGIVEREF(__pyx_t_2);
14703  __Pyx_XGIVEREF(__pyx_t_3);
14704  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14705  goto __pyx_L0;
14706  __pyx_L6_except_return:;
14707  __Pyx_XGIVEREF(__pyx_t_1);
14708  __Pyx_XGIVEREF(__pyx_t_2);
14709  __Pyx_XGIVEREF(__pyx_t_3);
14710  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14711  goto __pyx_L0;
14712  }
14713 
14714  /* "PyClical.pyx":1640
14715  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14716  *
14717  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14718  * """
14719  * Hyperbolic cosine of multivector.
14720  */
14721 
14722  /* function exit code */
14723  __pyx_L1_error:;
14724  __Pyx_XDECREF(__pyx_t_4);
14725  __Pyx_XDECREF(__pyx_t_5);
14726  __Pyx_XDECREF(__pyx_t_6);
14727  __Pyx_XDECREF(__pyx_t_7);
14728  __Pyx_XDECREF(__pyx_t_8);
14729  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14730  __pyx_r = 0;
14731  __pyx_L0:;
14732  __Pyx_XGIVEREF(__pyx_r);
14733  __Pyx_RefNannyFinishContext();
14734  return __pyx_r;
14735  }
14736 
14737  /* Python wrapper */
14738  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14739  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 ";
14740  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14741  PyObject *__pyx_r = 0;
14742  __Pyx_RefNannyDeclarations
14743  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
14744  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14745 
14746  /* function exit code */
14747  __Pyx_RefNannyFinishContext();
14748  return __pyx_r;
14749  }
14750 
14751  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14752  PyObject *__pyx_r = NULL;
14753  __Pyx_RefNannyDeclarations
14754  PyObject *__pyx_t_1 = NULL;
14755  __Pyx_RefNannySetupContext("cosh", 0);
14756  __Pyx_XDECREF(__pyx_r);
14757  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
14758  __Pyx_GOTREF(__pyx_t_1);
14759  __pyx_r = __pyx_t_1;
14760  __pyx_t_1 = 0;
14761  goto __pyx_L0;
14762 
14763  /* function exit code */
14764  __pyx_L1_error:;
14765  __Pyx_XDECREF(__pyx_t_1);
14766  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14767  __pyx_r = NULL;
14768  __pyx_L0:;
14769  __Pyx_XGIVEREF(__pyx_r);
14770  __Pyx_RefNannyFinishContext();
14771  return __pyx_r;
14772  }
14773 
14774  /* "PyClical.pyx":1656
14775  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14776  *
14777  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14778  * """
14779  * Inverse hyperbolic cosine of multivector with optional complexifier.
14780  */
14781 
14782  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14783  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) {
14784  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14785  PyObject *__pyx_r = NULL;
14786  __Pyx_RefNannyDeclarations
14787  int __pyx_t_1;
14788  int __pyx_t_2;
14789  PyObject *__pyx_t_3 = NULL;
14790  Clifford __pyx_t_4;
14791  PyObject *__pyx_t_5 = NULL;
14792  PyObject *__pyx_t_6 = NULL;
14793  PyObject *__pyx_t_7 = NULL;
14794  PyObject *__pyx_t_8 = NULL;
14795  PyObject *__pyx_t_9 = NULL;
14796  PyObject *__pyx_t_10 = NULL;
14797  PyObject *__pyx_t_11 = NULL;
14798  __Pyx_RefNannySetupContext("acosh", 0);
14799  if (__pyx_optional_args) {
14800  if (__pyx_optional_args->__pyx_n > 0) {
14801  __pyx_v_i = __pyx_optional_args->i;
14802  }
14803  }
14804 
14805  /* "PyClical.pyx":1671
14806  * {1,2}
14807  * """
14808  * if not (i is None): # <<<<<<<<<<<<<<
14809  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14810  * else:
14811  */
14812  __pyx_t_1 = (__pyx_v_i != Py_None);
14813  __pyx_t_2 = (__pyx_t_1 != 0);
14814  if (__pyx_t_2) {
14815 
14816  /* "PyClical.pyx":1672
14817  * """
14818  * if not (i is None):
14819  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14820  * else:
14821  * try:
14822  */
14823  __Pyx_XDECREF(__pyx_r);
14824  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
14825  __Pyx_GOTREF(__pyx_t_3);
14826  try {
14827  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14828  } catch(...) {
14829  __Pyx_CppExn2PyErr();
14830  __PYX_ERR(0, 1672, __pyx_L1_error)
14831  }
14832  __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, 1672, __pyx_L1_error)
14833  __Pyx_GOTREF(__pyx_t_5);
14834  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14835  __pyx_r = __pyx_t_5;
14836  __pyx_t_5 = 0;
14837  goto __pyx_L0;
14838 
14839  /* "PyClical.pyx":1671
14840  * {1,2}
14841  * """
14842  * if not (i is None): # <<<<<<<<<<<<<<
14843  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14844  * else:
14845  */
14846  }
14847 
14848  /* "PyClical.pyx":1674
14849  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14850  * else:
14851  * try: # <<<<<<<<<<<<<<
14852  * return math.acosh(obj)
14853  * except:
14854  */
14855  /*else*/ {
14856  {
14857  __Pyx_PyThreadState_declare
14858  __Pyx_PyThreadState_assign
14859  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14860  __Pyx_XGOTREF(__pyx_t_6);
14861  __Pyx_XGOTREF(__pyx_t_7);
14862  __Pyx_XGOTREF(__pyx_t_8);
14863  /*try:*/ {
14864 
14865  /* "PyClical.pyx":1675
14866  * else:
14867  * try:
14868  * return math.acosh(obj) # <<<<<<<<<<<<<<
14869  * except:
14870  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14871  */
14872  __Pyx_XDECREF(__pyx_r);
14873  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
14874  __Pyx_GOTREF(__pyx_t_3);
14875  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acosh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1675, __pyx_L4_error)
14876  __Pyx_GOTREF(__pyx_t_9);
14877  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14878  __pyx_t_3 = NULL;
14879  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14880  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14881  if (likely(__pyx_t_3)) {
14882  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14883  __Pyx_INCREF(__pyx_t_3);
14884  __Pyx_INCREF(function);
14885  __Pyx_DECREF_SET(__pyx_t_9, function);
14886  }
14887  }
14888  __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);
14889  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14890  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
14891  __Pyx_GOTREF(__pyx_t_5);
14892  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14893  __pyx_r = __pyx_t_5;
14894  __pyx_t_5 = 0;
14895  goto __pyx_L8_try_return;
14896 
14897  /* "PyClical.pyx":1674
14898  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14899  * else:
14900  * try: # <<<<<<<<<<<<<<
14901  * return math.acosh(obj)
14902  * except:
14903  */
14904  }
14905  __pyx_L4_error:;
14906  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14907  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14908  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14909 
14910  /* "PyClical.pyx":1676
14911  * try:
14912  * return math.acosh(obj)
14913  * except: # <<<<<<<<<<<<<<
14914  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14915  *
14916  */
14917  /*except:*/ {
14918  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14919  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
14920  __Pyx_GOTREF(__pyx_t_5);
14921  __Pyx_GOTREF(__pyx_t_9);
14922  __Pyx_GOTREF(__pyx_t_3);
14923 
14924  /* "PyClical.pyx":1677
14925  * return math.acosh(obj)
14926  * except:
14927  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14928  *
14929  * cpdef inline sin(obj,i = None):
14930  */
14931  __Pyx_XDECREF(__pyx_r);
14932  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
14933  __Pyx_GOTREF(__pyx_t_10);
14934  __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, 1677, __pyx_L6_except_error)
14935  __Pyx_GOTREF(__pyx_t_11);
14936  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14937  __pyx_r = __pyx_t_11;
14938  __pyx_t_11 = 0;
14939  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14940  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14941  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14942  goto __pyx_L7_except_return;
14943  }
14944  __pyx_L6_except_error:;
14945 
14946  /* "PyClical.pyx":1674
14947  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14948  * else:
14949  * try: # <<<<<<<<<<<<<<
14950  * return math.acosh(obj)
14951  * except:
14952  */
14953  __Pyx_XGIVEREF(__pyx_t_6);
14954  __Pyx_XGIVEREF(__pyx_t_7);
14955  __Pyx_XGIVEREF(__pyx_t_8);
14956  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14957  goto __pyx_L1_error;
14958  __pyx_L8_try_return:;
14959  __Pyx_XGIVEREF(__pyx_t_6);
14960  __Pyx_XGIVEREF(__pyx_t_7);
14961  __Pyx_XGIVEREF(__pyx_t_8);
14962  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14963  goto __pyx_L0;
14964  __pyx_L7_except_return:;
14965  __Pyx_XGIVEREF(__pyx_t_6);
14966  __Pyx_XGIVEREF(__pyx_t_7);
14967  __Pyx_XGIVEREF(__pyx_t_8);
14968  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14969  goto __pyx_L0;
14970  }
14971  }
14972 
14973  /* "PyClical.pyx":1656
14974  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14975  *
14976  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14977  * """
14978  * Inverse hyperbolic cosine of multivector with optional complexifier.
14979  */
14980 
14981  /* function exit code */
14982  __pyx_L1_error:;
14983  __Pyx_XDECREF(__pyx_t_3);
14984  __Pyx_XDECREF(__pyx_t_5);
14985  __Pyx_XDECREF(__pyx_t_9);
14986  __Pyx_XDECREF(__pyx_t_10);
14987  __Pyx_XDECREF(__pyx_t_11);
14988  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14989  __pyx_r = 0;
14990  __pyx_L0:;
14991  __Pyx_XGIVEREF(__pyx_r);
14992  __Pyx_RefNannyFinishContext();
14993  return __pyx_r;
14994  }
14995 
14996  /* Python wrapper */
14997  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14998  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 ";
14999  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15000  PyObject *__pyx_v_obj = 0;
15001  PyObject *__pyx_v_i = 0;
15002  PyObject *__pyx_r = 0;
15003  __Pyx_RefNannyDeclarations
15004  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15005  {
15006  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15007  PyObject* values[2] = {0,0};
15008  values[1] = ((PyObject *)Py_None);
15009  if (unlikely(__pyx_kwds)) {
15010  Py_ssize_t kw_args;
15011  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15012  switch (pos_args) {
15013  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15014  CYTHON_FALLTHROUGH;
15015  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15016  CYTHON_FALLTHROUGH;
15017  case 0: break;
15018  default: goto __pyx_L5_argtuple_error;
15019  }
15020  kw_args = PyDict_Size(__pyx_kwds);
15021  switch (pos_args) {
15022  case 0:
15023  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15024  else goto __pyx_L5_argtuple_error;
15025  CYTHON_FALLTHROUGH;
15026  case 1:
15027  if (kw_args > 0) {
15028  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15029  if (value) { values[1] = value; kw_args--; }
15030  }
15031  }
15032  if (unlikely(kw_args > 0)) {
15033  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15034  }
15035  } else {
15036  switch (PyTuple_GET_SIZE(__pyx_args)) {
15037  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15038  CYTHON_FALLTHROUGH;
15039  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15040  break;
15041  default: goto __pyx_L5_argtuple_error;
15042  }
15043  }
15044  __pyx_v_obj = values[0];
15045  __pyx_v_i = values[1];
15046  }
15047  goto __pyx_L4_argument_unpacking_done;
15048  __pyx_L5_argtuple_error:;
15049  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15050  __pyx_L3_error:;
15051  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15052  __Pyx_RefNannyFinishContext();
15053  return NULL;
15054  __pyx_L4_argument_unpacking_done:;
15055  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15056 
15057  /* function exit code */
15058  __Pyx_RefNannyFinishContext();
15059  return __pyx_r;
15060  }
15061 
15062  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15063  PyObject *__pyx_r = NULL;
15064  __Pyx_RefNannyDeclarations
15065  PyObject *__pyx_t_1 = NULL;
15066  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15067  __Pyx_RefNannySetupContext("acosh", 0);
15068  __Pyx_XDECREF(__pyx_r);
15069  __pyx_t_2.__pyx_n = 1;
15070  __pyx_t_2.i = __pyx_v_i;
15071  __pyx_t_1 = __pyx_f_8PyClical_acosh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1656, __pyx_L1_error)
15072  __Pyx_GOTREF(__pyx_t_1);
15073  __pyx_r = __pyx_t_1;
15074  __pyx_t_1 = 0;
15075  goto __pyx_L0;
15076 
15077  /* function exit code */
15078  __pyx_L1_error:;
15079  __Pyx_XDECREF(__pyx_t_1);
15080  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15081  __pyx_r = NULL;
15082  __pyx_L0:;
15083  __Pyx_XGIVEREF(__pyx_r);
15084  __Pyx_RefNannyFinishContext();
15085  return __pyx_r;
15086  }
15087 
15088  /* "PyClical.pyx":1679
15089  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15090  *
15091  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15092  * """
15093  * Sine of multivector with optional complexifier.
15094  */
15095 
15096  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15097  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) {
15098  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15099  PyObject *__pyx_r = NULL;
15100  __Pyx_RefNannyDeclarations
15101  int __pyx_t_1;
15102  int __pyx_t_2;
15103  PyObject *__pyx_t_3 = NULL;
15104  Clifford __pyx_t_4;
15105  PyObject *__pyx_t_5 = NULL;
15106  PyObject *__pyx_t_6 = NULL;
15107  PyObject *__pyx_t_7 = NULL;
15108  PyObject *__pyx_t_8 = NULL;
15109  PyObject *__pyx_t_9 = NULL;
15110  PyObject *__pyx_t_10 = NULL;
15111  PyObject *__pyx_t_11 = NULL;
15112  __Pyx_RefNannySetupContext("sin", 0);
15113  if (__pyx_optional_args) {
15114  if (__pyx_optional_args->__pyx_n > 0) {
15115  __pyx_v_i = __pyx_optional_args->i;
15116  }
15117  }
15118 
15119  /* "PyClical.pyx":1690
15120  * {1,2,3}
15121  * """
15122  * if not (i is None): # <<<<<<<<<<<<<<
15123  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15124  * else:
15125  */
15126  __pyx_t_1 = (__pyx_v_i != Py_None);
15127  __pyx_t_2 = (__pyx_t_1 != 0);
15128  if (__pyx_t_2) {
15129 
15130  /* "PyClical.pyx":1691
15131  * """
15132  * if not (i is None):
15133  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15134  * else:
15135  * try:
15136  */
15137  __Pyx_XDECREF(__pyx_r);
15138  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
15139  __Pyx_GOTREF(__pyx_t_3);
15140  try {
15141  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15142  } catch(...) {
15143  __Pyx_CppExn2PyErr();
15144  __PYX_ERR(0, 1691, __pyx_L1_error)
15145  }
15146  __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, 1691, __pyx_L1_error)
15147  __Pyx_GOTREF(__pyx_t_5);
15148  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15149  __pyx_r = __pyx_t_5;
15150  __pyx_t_5 = 0;
15151  goto __pyx_L0;
15152 
15153  /* "PyClical.pyx":1690
15154  * {1,2,3}
15155  * """
15156  * if not (i is None): # <<<<<<<<<<<<<<
15157  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15158  * else:
15159  */
15160  }
15161 
15162  /* "PyClical.pyx":1693
15163  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15164  * else:
15165  * try: # <<<<<<<<<<<<<<
15166  * return math.sin(obj)
15167  * except:
15168  */
15169  /*else*/ {
15170  {
15171  __Pyx_PyThreadState_declare
15172  __Pyx_PyThreadState_assign
15173  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15174  __Pyx_XGOTREF(__pyx_t_6);
15175  __Pyx_XGOTREF(__pyx_t_7);
15176  __Pyx_XGOTREF(__pyx_t_8);
15177  /*try:*/ {
15178 
15179  /* "PyClical.pyx":1694
15180  * else:
15181  * try:
15182  * return math.sin(obj) # <<<<<<<<<<<<<<
15183  * except:
15184  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15185  */
15186  __Pyx_XDECREF(__pyx_r);
15187  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15188  __Pyx_GOTREF(__pyx_t_3);
15189  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sin); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1694, __pyx_L4_error)
15190  __Pyx_GOTREF(__pyx_t_9);
15191  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15192  __pyx_t_3 = NULL;
15193  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15194  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15195  if (likely(__pyx_t_3)) {
15196  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15197  __Pyx_INCREF(__pyx_t_3);
15198  __Pyx_INCREF(function);
15199  __Pyx_DECREF_SET(__pyx_t_9, function);
15200  }
15201  }
15202  __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);
15203  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15204  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15205  __Pyx_GOTREF(__pyx_t_5);
15206  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15207  __pyx_r = __pyx_t_5;
15208  __pyx_t_5 = 0;
15209  goto __pyx_L8_try_return;
15210 
15211  /* "PyClical.pyx":1693
15212  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15213  * else:
15214  * try: # <<<<<<<<<<<<<<
15215  * return math.sin(obj)
15216  * except:
15217  */
15218  }
15219  __pyx_L4_error:;
15220  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15221  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15222  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15223 
15224  /* "PyClical.pyx":1695
15225  * try:
15226  * return math.sin(obj)
15227  * except: # <<<<<<<<<<<<<<
15228  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15229  *
15230  */
15231  /*except:*/ {
15232  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15233  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15234  __Pyx_GOTREF(__pyx_t_5);
15235  __Pyx_GOTREF(__pyx_t_9);
15236  __Pyx_GOTREF(__pyx_t_3);
15237 
15238  /* "PyClical.pyx":1696
15239  * return math.sin(obj)
15240  * except:
15241  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15242  *
15243  * cpdef inline asin(obj,i = None):
15244  */
15245  __Pyx_XDECREF(__pyx_r);
15246  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15247  __Pyx_GOTREF(__pyx_t_10);
15248  __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, 1696, __pyx_L6_except_error)
15249  __Pyx_GOTREF(__pyx_t_11);
15250  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15251  __pyx_r = __pyx_t_11;
15252  __pyx_t_11 = 0;
15253  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15254  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15255  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15256  goto __pyx_L7_except_return;
15257  }
15258  __pyx_L6_except_error:;
15259 
15260  /* "PyClical.pyx":1693
15261  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15262  * else:
15263  * try: # <<<<<<<<<<<<<<
15264  * return math.sin(obj)
15265  * except:
15266  */
15267  __Pyx_XGIVEREF(__pyx_t_6);
15268  __Pyx_XGIVEREF(__pyx_t_7);
15269  __Pyx_XGIVEREF(__pyx_t_8);
15270  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15271  goto __pyx_L1_error;
15272  __pyx_L8_try_return:;
15273  __Pyx_XGIVEREF(__pyx_t_6);
15274  __Pyx_XGIVEREF(__pyx_t_7);
15275  __Pyx_XGIVEREF(__pyx_t_8);
15276  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15277  goto __pyx_L0;
15278  __pyx_L7_except_return:;
15279  __Pyx_XGIVEREF(__pyx_t_6);
15280  __Pyx_XGIVEREF(__pyx_t_7);
15281  __Pyx_XGIVEREF(__pyx_t_8);
15282  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15283  goto __pyx_L0;
15284  }
15285  }
15286 
15287  /* "PyClical.pyx":1679
15288  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15289  *
15290  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15291  * """
15292  * Sine of multivector with optional complexifier.
15293  */
15294 
15295  /* function exit code */
15296  __pyx_L1_error:;
15297  __Pyx_XDECREF(__pyx_t_3);
15298  __Pyx_XDECREF(__pyx_t_5);
15299  __Pyx_XDECREF(__pyx_t_9);
15300  __Pyx_XDECREF(__pyx_t_10);
15301  __Pyx_XDECREF(__pyx_t_11);
15302  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15303  __pyx_r = 0;
15304  __pyx_L0:;
15305  __Pyx_XGIVEREF(__pyx_r);
15306  __Pyx_RefNannyFinishContext();
15307  return __pyx_r;
15308  }
15309 
15310  /* Python wrapper */
15311  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15312  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 ";
15313  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15314  PyObject *__pyx_v_obj = 0;
15315  PyObject *__pyx_v_i = 0;
15316  PyObject *__pyx_r = 0;
15317  __Pyx_RefNannyDeclarations
15318  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15319  {
15320  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15321  PyObject* values[2] = {0,0};
15322  values[1] = ((PyObject *)Py_None);
15323  if (unlikely(__pyx_kwds)) {
15324  Py_ssize_t kw_args;
15325  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15326  switch (pos_args) {
15327  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15328  CYTHON_FALLTHROUGH;
15329  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15330  CYTHON_FALLTHROUGH;
15331  case 0: break;
15332  default: goto __pyx_L5_argtuple_error;
15333  }
15334  kw_args = PyDict_Size(__pyx_kwds);
15335  switch (pos_args) {
15336  case 0:
15337  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15338  else goto __pyx_L5_argtuple_error;
15339  CYTHON_FALLTHROUGH;
15340  case 1:
15341  if (kw_args > 0) {
15342  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15343  if (value) { values[1] = value; kw_args--; }
15344  }
15345  }
15346  if (unlikely(kw_args > 0)) {
15347  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15348  }
15349  } else {
15350  switch (PyTuple_GET_SIZE(__pyx_args)) {
15351  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15352  CYTHON_FALLTHROUGH;
15353  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15354  break;
15355  default: goto __pyx_L5_argtuple_error;
15356  }
15357  }
15358  __pyx_v_obj = values[0];
15359  __pyx_v_i = values[1];
15360  }
15361  goto __pyx_L4_argument_unpacking_done;
15362  __pyx_L5_argtuple_error:;
15363  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15364  __pyx_L3_error:;
15365  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15366  __Pyx_RefNannyFinishContext();
15367  return NULL;
15368  __pyx_L4_argument_unpacking_done:;
15369  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15370 
15371  /* function exit code */
15372  __Pyx_RefNannyFinishContext();
15373  return __pyx_r;
15374  }
15375 
15376  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15377  PyObject *__pyx_r = NULL;
15378  __Pyx_RefNannyDeclarations
15379  PyObject *__pyx_t_1 = NULL;
15380  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15381  __Pyx_RefNannySetupContext("sin", 0);
15382  __Pyx_XDECREF(__pyx_r);
15383  __pyx_t_2.__pyx_n = 1;
15384  __pyx_t_2.i = __pyx_v_i;
15385  __pyx_t_1 = __pyx_f_8PyClical_sin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error)
15386  __Pyx_GOTREF(__pyx_t_1);
15387  __pyx_r = __pyx_t_1;
15388  __pyx_t_1 = 0;
15389  goto __pyx_L0;
15390 
15391  /* function exit code */
15392  __pyx_L1_error:;
15393  __Pyx_XDECREF(__pyx_t_1);
15394  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15395  __pyx_r = NULL;
15396  __pyx_L0:;
15397  __Pyx_XGIVEREF(__pyx_r);
15398  __Pyx_RefNannyFinishContext();
15399  return __pyx_r;
15400  }
15401 
15402  /* "PyClical.pyx":1698
15403  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15404  *
15405  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15406  * """
15407  * Inverse sine of multivector with optional complexifier.
15408  */
15409 
15410  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15411  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) {
15412  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15413  PyObject *__pyx_r = NULL;
15414  __Pyx_RefNannyDeclarations
15415  int __pyx_t_1;
15416  int __pyx_t_2;
15417  PyObject *__pyx_t_3 = NULL;
15418  Clifford __pyx_t_4;
15419  PyObject *__pyx_t_5 = NULL;
15420  PyObject *__pyx_t_6 = NULL;
15421  PyObject *__pyx_t_7 = NULL;
15422  PyObject *__pyx_t_8 = NULL;
15423  PyObject *__pyx_t_9 = NULL;
15424  PyObject *__pyx_t_10 = NULL;
15425  PyObject *__pyx_t_11 = NULL;
15426  __Pyx_RefNannySetupContext("asin", 0);
15427  if (__pyx_optional_args) {
15428  if (__pyx_optional_args->__pyx_n > 0) {
15429  __pyx_v_i = __pyx_optional_args->i;
15430  }
15431  }
15432 
15433  /* "PyClical.pyx":1711
15434  * {1,2,3}
15435  * """
15436  * if not (i is None): # <<<<<<<<<<<<<<
15437  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15438  * else:
15439  */
15440  __pyx_t_1 = (__pyx_v_i != Py_None);
15441  __pyx_t_2 = (__pyx_t_1 != 0);
15442  if (__pyx_t_2) {
15443 
15444  /* "PyClical.pyx":1712
15445  * """
15446  * if not (i is None):
15447  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15448  * else:
15449  * try:
15450  */
15451  __Pyx_XDECREF(__pyx_r);
15452  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
15453  __Pyx_GOTREF(__pyx_t_3);
15454  try {
15455  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15456  } catch(...) {
15457  __Pyx_CppExn2PyErr();
15458  __PYX_ERR(0, 1712, __pyx_L1_error)
15459  }
15460  __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, 1712, __pyx_L1_error)
15461  __Pyx_GOTREF(__pyx_t_5);
15462  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15463  __pyx_r = __pyx_t_5;
15464  __pyx_t_5 = 0;
15465  goto __pyx_L0;
15466 
15467  /* "PyClical.pyx":1711
15468  * {1,2,3}
15469  * """
15470  * if not (i is None): # <<<<<<<<<<<<<<
15471  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15472  * else:
15473  */
15474  }
15475 
15476  /* "PyClical.pyx":1714
15477  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15478  * else:
15479  * try: # <<<<<<<<<<<<<<
15480  * return math.asin(obj)
15481  * except:
15482  */
15483  /*else*/ {
15484  {
15485  __Pyx_PyThreadState_declare
15486  __Pyx_PyThreadState_assign
15487  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15488  __Pyx_XGOTREF(__pyx_t_6);
15489  __Pyx_XGOTREF(__pyx_t_7);
15490  __Pyx_XGOTREF(__pyx_t_8);
15491  /*try:*/ {
15492 
15493  /* "PyClical.pyx":1715
15494  * else:
15495  * try:
15496  * return math.asin(obj) # <<<<<<<<<<<<<<
15497  * except:
15498  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15499  */
15500  __Pyx_XDECREF(__pyx_r);
15501  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15502  __Pyx_GOTREF(__pyx_t_3);
15503  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asin); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1715, __pyx_L4_error)
15504  __Pyx_GOTREF(__pyx_t_9);
15505  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15506  __pyx_t_3 = NULL;
15507  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15508  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15509  if (likely(__pyx_t_3)) {
15510  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15511  __Pyx_INCREF(__pyx_t_3);
15512  __Pyx_INCREF(function);
15513  __Pyx_DECREF_SET(__pyx_t_9, function);
15514  }
15515  }
15516  __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);
15517  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15518  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15519  __Pyx_GOTREF(__pyx_t_5);
15520  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15521  __pyx_r = __pyx_t_5;
15522  __pyx_t_5 = 0;
15523  goto __pyx_L8_try_return;
15524 
15525  /* "PyClical.pyx":1714
15526  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15527  * else:
15528  * try: # <<<<<<<<<<<<<<
15529  * return math.asin(obj)
15530  * except:
15531  */
15532  }
15533  __pyx_L4_error:;
15534  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15535  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15536  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15537 
15538  /* "PyClical.pyx":1716
15539  * try:
15540  * return math.asin(obj)
15541  * except: # <<<<<<<<<<<<<<
15542  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15543  *
15544  */
15545  /*except:*/ {
15546  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15547  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
15548  __Pyx_GOTREF(__pyx_t_5);
15549  __Pyx_GOTREF(__pyx_t_9);
15550  __Pyx_GOTREF(__pyx_t_3);
15551 
15552  /* "PyClical.pyx":1717
15553  * return math.asin(obj)
15554  * except:
15555  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15556  *
15557  * cpdef inline sinh(obj):
15558  */
15559  __Pyx_XDECREF(__pyx_r);
15560  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15561  __Pyx_GOTREF(__pyx_t_10);
15562  __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, 1717, __pyx_L6_except_error)
15563  __Pyx_GOTREF(__pyx_t_11);
15564  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15565  __pyx_r = __pyx_t_11;
15566  __pyx_t_11 = 0;
15567  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15568  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15569  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15570  goto __pyx_L7_except_return;
15571  }
15572  __pyx_L6_except_error:;
15573 
15574  /* "PyClical.pyx":1714
15575  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15576  * else:
15577  * try: # <<<<<<<<<<<<<<
15578  * return math.asin(obj)
15579  * except:
15580  */
15581  __Pyx_XGIVEREF(__pyx_t_6);
15582  __Pyx_XGIVEREF(__pyx_t_7);
15583  __Pyx_XGIVEREF(__pyx_t_8);
15584  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15585  goto __pyx_L1_error;
15586  __pyx_L8_try_return:;
15587  __Pyx_XGIVEREF(__pyx_t_6);
15588  __Pyx_XGIVEREF(__pyx_t_7);
15589  __Pyx_XGIVEREF(__pyx_t_8);
15590  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15591  goto __pyx_L0;
15592  __pyx_L7_except_return:;
15593  __Pyx_XGIVEREF(__pyx_t_6);
15594  __Pyx_XGIVEREF(__pyx_t_7);
15595  __Pyx_XGIVEREF(__pyx_t_8);
15596  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15597  goto __pyx_L0;
15598  }
15599  }
15600 
15601  /* "PyClical.pyx":1698
15602  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15603  *
15604  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15605  * """
15606  * Inverse sine of multivector with optional complexifier.
15607  */
15608 
15609  /* function exit code */
15610  __pyx_L1_error:;
15611  __Pyx_XDECREF(__pyx_t_3);
15612  __Pyx_XDECREF(__pyx_t_5);
15613  __Pyx_XDECREF(__pyx_t_9);
15614  __Pyx_XDECREF(__pyx_t_10);
15615  __Pyx_XDECREF(__pyx_t_11);
15616  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15617  __pyx_r = 0;
15618  __pyx_L0:;
15619  __Pyx_XGIVEREF(__pyx_r);
15620  __Pyx_RefNannyFinishContext();
15621  return __pyx_r;
15622  }
15623 
15624  /* Python wrapper */
15625  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15626  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 ";
15627  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15628  PyObject *__pyx_v_obj = 0;
15629  PyObject *__pyx_v_i = 0;
15630  PyObject *__pyx_r = 0;
15631  __Pyx_RefNannyDeclarations
15632  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
15633  {
15634  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15635  PyObject* values[2] = {0,0};
15636  values[1] = ((PyObject *)Py_None);
15637  if (unlikely(__pyx_kwds)) {
15638  Py_ssize_t kw_args;
15639  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15640  switch (pos_args) {
15641  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15642  CYTHON_FALLTHROUGH;
15643  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15644  CYTHON_FALLTHROUGH;
15645  case 0: break;
15646  default: goto __pyx_L5_argtuple_error;
15647  }
15648  kw_args = PyDict_Size(__pyx_kwds);
15649  switch (pos_args) {
15650  case 0:
15651  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15652  else goto __pyx_L5_argtuple_error;
15653  CYTHON_FALLTHROUGH;
15654  case 1:
15655  if (kw_args > 0) {
15656  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15657  if (value) { values[1] = value; kw_args--; }
15658  }
15659  }
15660  if (unlikely(kw_args > 0)) {
15661  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
15662  }
15663  } else {
15664  switch (PyTuple_GET_SIZE(__pyx_args)) {
15665  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15666  CYTHON_FALLTHROUGH;
15667  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15668  break;
15669  default: goto __pyx_L5_argtuple_error;
15670  }
15671  }
15672  __pyx_v_obj = values[0];
15673  __pyx_v_i = values[1];
15674  }
15675  goto __pyx_L4_argument_unpacking_done;
15676  __pyx_L5_argtuple_error:;
15677  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
15678  __pyx_L3_error:;
15679  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15680  __Pyx_RefNannyFinishContext();
15681  return NULL;
15682  __pyx_L4_argument_unpacking_done:;
15683  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15684 
15685  /* function exit code */
15686  __Pyx_RefNannyFinishContext();
15687  return __pyx_r;
15688  }
15689 
15690  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15691  PyObject *__pyx_r = NULL;
15692  __Pyx_RefNannyDeclarations
15693  PyObject *__pyx_t_1 = NULL;
15694  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15695  __Pyx_RefNannySetupContext("asin", 0);
15696  __Pyx_XDECREF(__pyx_r);
15697  __pyx_t_2.__pyx_n = 1;
15698  __pyx_t_2.i = __pyx_v_i;
15699  __pyx_t_1 = __pyx_f_8PyClical_asin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error)
15700  __Pyx_GOTREF(__pyx_t_1);
15701  __pyx_r = __pyx_t_1;
15702  __pyx_t_1 = 0;
15703  goto __pyx_L0;
15704 
15705  /* function exit code */
15706  __pyx_L1_error:;
15707  __Pyx_XDECREF(__pyx_t_1);
15708  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15709  __pyx_r = NULL;
15710  __pyx_L0:;
15711  __Pyx_XGIVEREF(__pyx_r);
15712  __Pyx_RefNannyFinishContext();
15713  return __pyx_r;
15714  }
15715 
15716  /* "PyClical.pyx":1719
15717  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15718  *
15719  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15720  * """
15721  * Hyperbolic sine of multivector.
15722  */
15723 
15724  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15725  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15726  PyObject *__pyx_r = NULL;
15727  __Pyx_RefNannyDeclarations
15728  PyObject *__pyx_t_1 = NULL;
15729  PyObject *__pyx_t_2 = NULL;
15730  PyObject *__pyx_t_3 = NULL;
15731  PyObject *__pyx_t_4 = NULL;
15732  PyObject *__pyx_t_5 = NULL;
15733  PyObject *__pyx_t_6 = NULL;
15734  PyObject *__pyx_t_7 = NULL;
15735  PyObject *__pyx_t_8 = NULL;
15736  __Pyx_RefNannySetupContext("sinh", 0);
15737 
15738  /* "PyClical.pyx":1728
15739  * 0.5{1,2}
15740  * """
15741  * try: # <<<<<<<<<<<<<<
15742  * return math.sinh(obj)
15743  * except:
15744  */
15745  {
15746  __Pyx_PyThreadState_declare
15747  __Pyx_PyThreadState_assign
15748  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15749  __Pyx_XGOTREF(__pyx_t_1);
15750  __Pyx_XGOTREF(__pyx_t_2);
15751  __Pyx_XGOTREF(__pyx_t_3);
15752  /*try:*/ {
15753 
15754  /* "PyClical.pyx":1729
15755  * """
15756  * try:
15757  * return math.sinh(obj) # <<<<<<<<<<<<<<
15758  * except:
15759  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15760  */
15761  __Pyx_XDECREF(__pyx_r);
15762  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
15763  __Pyx_GOTREF(__pyx_t_5);
15764  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sinh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1729, __pyx_L3_error)
15765  __Pyx_GOTREF(__pyx_t_6);
15766  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15767  __pyx_t_5 = NULL;
15768  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15769  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15770  if (likely(__pyx_t_5)) {
15771  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15772  __Pyx_INCREF(__pyx_t_5);
15773  __Pyx_INCREF(function);
15774  __Pyx_DECREF_SET(__pyx_t_6, function);
15775  }
15776  }
15777  __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);
15778  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15779  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
15780  __Pyx_GOTREF(__pyx_t_4);
15781  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15782  __pyx_r = __pyx_t_4;
15783  __pyx_t_4 = 0;
15784  goto __pyx_L7_try_return;
15785 
15786  /* "PyClical.pyx":1728
15787  * 0.5{1,2}
15788  * """
15789  * try: # <<<<<<<<<<<<<<
15790  * return math.sinh(obj)
15791  * except:
15792  */
15793  }
15794  __pyx_L3_error:;
15795  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15796  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15797  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15798 
15799  /* "PyClical.pyx":1730
15800  * try:
15801  * return math.sinh(obj)
15802  * except: # <<<<<<<<<<<<<<
15803  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15804  *
15805  */
15806  /*except:*/ {
15807  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15808  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
15809  __Pyx_GOTREF(__pyx_t_4);
15810  __Pyx_GOTREF(__pyx_t_6);
15811  __Pyx_GOTREF(__pyx_t_5);
15812 
15813  /* "PyClical.pyx":1731
15814  * return math.sinh(obj)
15815  * except:
15816  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15817  *
15818  * cpdef inline asinh(obj,i = None):
15819  */
15820  __Pyx_XDECREF(__pyx_r);
15821  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
15822  __Pyx_GOTREF(__pyx_t_7);
15823  __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, 1731, __pyx_L5_except_error)
15824  __Pyx_GOTREF(__pyx_t_8);
15825  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15826  __pyx_r = __pyx_t_8;
15827  __pyx_t_8 = 0;
15828  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15829  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15830  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15831  goto __pyx_L6_except_return;
15832  }
15833  __pyx_L5_except_error:;
15834 
15835  /* "PyClical.pyx":1728
15836  * 0.5{1,2}
15837  * """
15838  * try: # <<<<<<<<<<<<<<
15839  * return math.sinh(obj)
15840  * except:
15841  */
15842  __Pyx_XGIVEREF(__pyx_t_1);
15843  __Pyx_XGIVEREF(__pyx_t_2);
15844  __Pyx_XGIVEREF(__pyx_t_3);
15845  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15846  goto __pyx_L1_error;
15847  __pyx_L7_try_return:;
15848  __Pyx_XGIVEREF(__pyx_t_1);
15849  __Pyx_XGIVEREF(__pyx_t_2);
15850  __Pyx_XGIVEREF(__pyx_t_3);
15851  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15852  goto __pyx_L0;
15853  __pyx_L6_except_return:;
15854  __Pyx_XGIVEREF(__pyx_t_1);
15855  __Pyx_XGIVEREF(__pyx_t_2);
15856  __Pyx_XGIVEREF(__pyx_t_3);
15857  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15858  goto __pyx_L0;
15859  }
15860 
15861  /* "PyClical.pyx":1719
15862  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15863  *
15864  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15865  * """
15866  * Hyperbolic sine of multivector.
15867  */
15868 
15869  /* function exit code */
15870  __pyx_L1_error:;
15871  __Pyx_XDECREF(__pyx_t_4);
15872  __Pyx_XDECREF(__pyx_t_5);
15873  __Pyx_XDECREF(__pyx_t_6);
15874  __Pyx_XDECREF(__pyx_t_7);
15875  __Pyx_XDECREF(__pyx_t_8);
15876  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15877  __pyx_r = 0;
15878  __pyx_L0:;
15879  __Pyx_XGIVEREF(__pyx_r);
15880  __Pyx_RefNannyFinishContext();
15881  return __pyx_r;
15882  }
15883 
15884  /* Python wrapper */
15885  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15886  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 ";
15887  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15888  PyObject *__pyx_r = 0;
15889  __Pyx_RefNannyDeclarations
15890  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
15891  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15892 
15893  /* function exit code */
15894  __Pyx_RefNannyFinishContext();
15895  return __pyx_r;
15896  }
15897 
15898  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15899  PyObject *__pyx_r = NULL;
15900  __Pyx_RefNannyDeclarations
15901  PyObject *__pyx_t_1 = NULL;
15902  __Pyx_RefNannySetupContext("sinh", 0);
15903  __Pyx_XDECREF(__pyx_r);
15904  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
15905  __Pyx_GOTREF(__pyx_t_1);
15906  __pyx_r = __pyx_t_1;
15907  __pyx_t_1 = 0;
15908  goto __pyx_L0;
15909 
15910  /* function exit code */
15911  __pyx_L1_error:;
15912  __Pyx_XDECREF(__pyx_t_1);
15913  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15914  __pyx_r = NULL;
15915  __pyx_L0:;
15916  __Pyx_XGIVEREF(__pyx_r);
15917  __Pyx_RefNannyFinishContext();
15918  return __pyx_r;
15919  }
15920 
15921  /* "PyClical.pyx":1733
15922  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15923  *
15924  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
15925  * """
15926  * Inverse hyperbolic sine of multivector with optional complexifier.
15927  */
15928 
15929  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15930  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) {
15931  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15932  PyObject *__pyx_r = NULL;
15933  __Pyx_RefNannyDeclarations
15934  int __pyx_t_1;
15935  int __pyx_t_2;
15936  PyObject *__pyx_t_3 = NULL;
15937  Clifford __pyx_t_4;
15938  PyObject *__pyx_t_5 = NULL;
15939  PyObject *__pyx_t_6 = NULL;
15940  PyObject *__pyx_t_7 = NULL;
15941  PyObject *__pyx_t_8 = NULL;
15942  PyObject *__pyx_t_9 = NULL;
15943  PyObject *__pyx_t_10 = NULL;
15944  PyObject *__pyx_t_11 = NULL;
15945  __Pyx_RefNannySetupContext("asinh", 0);
15946  if (__pyx_optional_args) {
15947  if (__pyx_optional_args->__pyx_n > 0) {
15948  __pyx_v_i = __pyx_optional_args->i;
15949  }
15950  }
15951 
15952  /* "PyClical.pyx":1744
15953  * {1,2}
15954  * """
15955  * if not (i is None): # <<<<<<<<<<<<<<
15956  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15957  * else:
15958  */
15959  __pyx_t_1 = (__pyx_v_i != Py_None);
15960  __pyx_t_2 = (__pyx_t_1 != 0);
15961  if (__pyx_t_2) {
15962 
15963  /* "PyClical.pyx":1745
15964  * """
15965  * if not (i is None):
15966  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15967  * else:
15968  * try:
15969  */
15970  __Pyx_XDECREF(__pyx_r);
15971  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
15972  __Pyx_GOTREF(__pyx_t_3);
15973  try {
15974  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15975  } catch(...) {
15976  __Pyx_CppExn2PyErr();
15977  __PYX_ERR(0, 1745, __pyx_L1_error)
15978  }
15979  __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, 1745, __pyx_L1_error)
15980  __Pyx_GOTREF(__pyx_t_5);
15981  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15982  __pyx_r = __pyx_t_5;
15983  __pyx_t_5 = 0;
15984  goto __pyx_L0;
15985 
15986  /* "PyClical.pyx":1744
15987  * {1,2}
15988  * """
15989  * if not (i is None): # <<<<<<<<<<<<<<
15990  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15991  * else:
15992  */
15993  }
15994 
15995  /* "PyClical.pyx":1747
15996  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15997  * else:
15998  * try: # <<<<<<<<<<<<<<
15999  * return math.asinh(obj)
16000  * except:
16001  */
16002  /*else*/ {
16003  {
16004  __Pyx_PyThreadState_declare
16005  __Pyx_PyThreadState_assign
16006  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16007  __Pyx_XGOTREF(__pyx_t_6);
16008  __Pyx_XGOTREF(__pyx_t_7);
16009  __Pyx_XGOTREF(__pyx_t_8);
16010  /*try:*/ {
16011 
16012  /* "PyClical.pyx":1748
16013  * else:
16014  * try:
16015  * return math.asinh(obj) # <<<<<<<<<<<<<<
16016  * except:
16017  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16018  */
16019  __Pyx_XDECREF(__pyx_r);
16020  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16021  __Pyx_GOTREF(__pyx_t_3);
16022  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asinh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1748, __pyx_L4_error)
16023  __Pyx_GOTREF(__pyx_t_9);
16024  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16025  __pyx_t_3 = NULL;
16026  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16027  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16028  if (likely(__pyx_t_3)) {
16029  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16030  __Pyx_INCREF(__pyx_t_3);
16031  __Pyx_INCREF(function);
16032  __Pyx_DECREF_SET(__pyx_t_9, function);
16033  }
16034  }
16035  __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);
16036  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16037  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16038  __Pyx_GOTREF(__pyx_t_5);
16039  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16040  __pyx_r = __pyx_t_5;
16041  __pyx_t_5 = 0;
16042  goto __pyx_L8_try_return;
16043 
16044  /* "PyClical.pyx":1747
16045  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16046  * else:
16047  * try: # <<<<<<<<<<<<<<
16048  * return math.asinh(obj)
16049  * except:
16050  */
16051  }
16052  __pyx_L4_error:;
16053  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16054  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16055  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16056 
16057  /* "PyClical.pyx":1749
16058  * try:
16059  * return math.asinh(obj)
16060  * except: # <<<<<<<<<<<<<<
16061  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16062  *
16063  */
16064  /*except:*/ {
16065  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16066  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16067  __Pyx_GOTREF(__pyx_t_5);
16068  __Pyx_GOTREF(__pyx_t_9);
16069  __Pyx_GOTREF(__pyx_t_3);
16070 
16071  /* "PyClical.pyx":1750
16072  * return math.asinh(obj)
16073  * except:
16074  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16075  *
16076  * cpdef inline tan(obj,i = None):
16077  */
16078  __Pyx_XDECREF(__pyx_r);
16079  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16080  __Pyx_GOTREF(__pyx_t_10);
16081  __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, 1750, __pyx_L6_except_error)
16082  __Pyx_GOTREF(__pyx_t_11);
16083  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16084  __pyx_r = __pyx_t_11;
16085  __pyx_t_11 = 0;
16086  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16087  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16088  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16089  goto __pyx_L7_except_return;
16090  }
16091  __pyx_L6_except_error:;
16092 
16093  /* "PyClical.pyx":1747
16094  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16095  * else:
16096  * try: # <<<<<<<<<<<<<<
16097  * return math.asinh(obj)
16098  * except:
16099  */
16100  __Pyx_XGIVEREF(__pyx_t_6);
16101  __Pyx_XGIVEREF(__pyx_t_7);
16102  __Pyx_XGIVEREF(__pyx_t_8);
16103  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16104  goto __pyx_L1_error;
16105  __pyx_L8_try_return:;
16106  __Pyx_XGIVEREF(__pyx_t_6);
16107  __Pyx_XGIVEREF(__pyx_t_7);
16108  __Pyx_XGIVEREF(__pyx_t_8);
16109  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16110  goto __pyx_L0;
16111  __pyx_L7_except_return:;
16112  __Pyx_XGIVEREF(__pyx_t_6);
16113  __Pyx_XGIVEREF(__pyx_t_7);
16114  __Pyx_XGIVEREF(__pyx_t_8);
16115  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16116  goto __pyx_L0;
16117  }
16118  }
16119 
16120  /* "PyClical.pyx":1733
16121  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16122  *
16123  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16124  * """
16125  * Inverse hyperbolic sine of multivector with optional complexifier.
16126  */
16127 
16128  /* function exit code */
16129  __pyx_L1_error:;
16130  __Pyx_XDECREF(__pyx_t_3);
16131  __Pyx_XDECREF(__pyx_t_5);
16132  __Pyx_XDECREF(__pyx_t_9);
16133  __Pyx_XDECREF(__pyx_t_10);
16134  __Pyx_XDECREF(__pyx_t_11);
16135  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16136  __pyx_r = 0;
16137  __pyx_L0:;
16138  __Pyx_XGIVEREF(__pyx_r);
16139  __Pyx_RefNannyFinishContext();
16140  return __pyx_r;
16141  }
16142 
16143  /* Python wrapper */
16144  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16145  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 ";
16146  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16147  PyObject *__pyx_v_obj = 0;
16148  PyObject *__pyx_v_i = 0;
16149  PyObject *__pyx_r = 0;
16150  __Pyx_RefNannyDeclarations
16151  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16152  {
16153  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16154  PyObject* values[2] = {0,0};
16155  values[1] = ((PyObject *)Py_None);
16156  if (unlikely(__pyx_kwds)) {
16157  Py_ssize_t kw_args;
16158  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16159  switch (pos_args) {
16160  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16161  CYTHON_FALLTHROUGH;
16162  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16163  CYTHON_FALLTHROUGH;
16164  case 0: break;
16165  default: goto __pyx_L5_argtuple_error;
16166  }
16167  kw_args = PyDict_Size(__pyx_kwds);
16168  switch (pos_args) {
16169  case 0:
16170  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16171  else goto __pyx_L5_argtuple_error;
16172  CYTHON_FALLTHROUGH;
16173  case 1:
16174  if (kw_args > 0) {
16175  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16176  if (value) { values[1] = value; kw_args--; }
16177  }
16178  }
16179  if (unlikely(kw_args > 0)) {
16180  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16181  }
16182  } else {
16183  switch (PyTuple_GET_SIZE(__pyx_args)) {
16184  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16185  CYTHON_FALLTHROUGH;
16186  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16187  break;
16188  default: goto __pyx_L5_argtuple_error;
16189  }
16190  }
16191  __pyx_v_obj = values[0];
16192  __pyx_v_i = values[1];
16193  }
16194  goto __pyx_L4_argument_unpacking_done;
16195  __pyx_L5_argtuple_error:;
16196  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16197  __pyx_L3_error:;
16198  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16199  __Pyx_RefNannyFinishContext();
16200  return NULL;
16201  __pyx_L4_argument_unpacking_done:;
16202  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16203 
16204  /* function exit code */
16205  __Pyx_RefNannyFinishContext();
16206  return __pyx_r;
16207  }
16208 
16209  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16210  PyObject *__pyx_r = NULL;
16211  __Pyx_RefNannyDeclarations
16212  PyObject *__pyx_t_1 = NULL;
16213  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16214  __Pyx_RefNannySetupContext("asinh", 0);
16215  __Pyx_XDECREF(__pyx_r);
16216  __pyx_t_2.__pyx_n = 1;
16217  __pyx_t_2.i = __pyx_v_i;
16218  __pyx_t_1 = __pyx_f_8PyClical_asinh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1733, __pyx_L1_error)
16219  __Pyx_GOTREF(__pyx_t_1);
16220  __pyx_r = __pyx_t_1;
16221  __pyx_t_1 = 0;
16222  goto __pyx_L0;
16223 
16224  /* function exit code */
16225  __pyx_L1_error:;
16226  __Pyx_XDECREF(__pyx_t_1);
16227  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16228  __pyx_r = NULL;
16229  __pyx_L0:;
16230  __Pyx_XGIVEREF(__pyx_r);
16231  __Pyx_RefNannyFinishContext();
16232  return __pyx_r;
16233  }
16234 
16235  /* "PyClical.pyx":1752
16236  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16237  *
16238  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16239  * """
16240  * Tangent of multivector with optional complexifier.
16241  */
16242 
16243  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16244  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) {
16245  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16246  PyObject *__pyx_r = NULL;
16247  __Pyx_RefNannyDeclarations
16248  int __pyx_t_1;
16249  int __pyx_t_2;
16250  PyObject *__pyx_t_3 = NULL;
16251  Clifford __pyx_t_4;
16252  PyObject *__pyx_t_5 = NULL;
16253  PyObject *__pyx_t_6 = NULL;
16254  PyObject *__pyx_t_7 = NULL;
16255  PyObject *__pyx_t_8 = NULL;
16256  PyObject *__pyx_t_9 = NULL;
16257  PyObject *__pyx_t_10 = NULL;
16258  PyObject *__pyx_t_11 = NULL;
16259  __Pyx_RefNannySetupContext("tan", 0);
16260  if (__pyx_optional_args) {
16261  if (__pyx_optional_args->__pyx_n > 0) {
16262  __pyx_v_i = __pyx_optional_args->i;
16263  }
16264  }
16265 
16266  /* "PyClical.pyx":1761
16267  * 0.7616{1,2}
16268  * """
16269  * if not (i is None): # <<<<<<<<<<<<<<
16270  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16271  * else:
16272  */
16273  __pyx_t_1 = (__pyx_v_i != Py_None);
16274  __pyx_t_2 = (__pyx_t_1 != 0);
16275  if (__pyx_t_2) {
16276 
16277  /* "PyClical.pyx":1762
16278  * """
16279  * if not (i is None):
16280  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16281  * else:
16282  * try:
16283  */
16284  __Pyx_XDECREF(__pyx_r);
16285  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
16286  __Pyx_GOTREF(__pyx_t_3);
16287  try {
16288  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16289  } catch(...) {
16290  __Pyx_CppExn2PyErr();
16291  __PYX_ERR(0, 1762, __pyx_L1_error)
16292  }
16293  __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, 1762, __pyx_L1_error)
16294  __Pyx_GOTREF(__pyx_t_5);
16295  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16296  __pyx_r = __pyx_t_5;
16297  __pyx_t_5 = 0;
16298  goto __pyx_L0;
16299 
16300  /* "PyClical.pyx":1761
16301  * 0.7616{1,2}
16302  * """
16303  * if not (i is None): # <<<<<<<<<<<<<<
16304  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16305  * else:
16306  */
16307  }
16308 
16309  /* "PyClical.pyx":1764
16310  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16311  * else:
16312  * try: # <<<<<<<<<<<<<<
16313  * return math.tan(obj)
16314  * except:
16315  */
16316  /*else*/ {
16317  {
16318  __Pyx_PyThreadState_declare
16319  __Pyx_PyThreadState_assign
16320  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16321  __Pyx_XGOTREF(__pyx_t_6);
16322  __Pyx_XGOTREF(__pyx_t_7);
16323  __Pyx_XGOTREF(__pyx_t_8);
16324  /*try:*/ {
16325 
16326  /* "PyClical.pyx":1765
16327  * else:
16328  * try:
16329  * return math.tan(obj) # <<<<<<<<<<<<<<
16330  * except:
16331  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16332  */
16333  __Pyx_XDECREF(__pyx_r);
16334  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16335  __Pyx_GOTREF(__pyx_t_3);
16336  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1765, __pyx_L4_error)
16337  __Pyx_GOTREF(__pyx_t_9);
16338  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16339  __pyx_t_3 = NULL;
16340  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16341  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16342  if (likely(__pyx_t_3)) {
16343  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16344  __Pyx_INCREF(__pyx_t_3);
16345  __Pyx_INCREF(function);
16346  __Pyx_DECREF_SET(__pyx_t_9, function);
16347  }
16348  }
16349  __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);
16350  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16351  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16352  __Pyx_GOTREF(__pyx_t_5);
16353  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16354  __pyx_r = __pyx_t_5;
16355  __pyx_t_5 = 0;
16356  goto __pyx_L8_try_return;
16357 
16358  /* "PyClical.pyx":1764
16359  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16360  * else:
16361  * try: # <<<<<<<<<<<<<<
16362  * return math.tan(obj)
16363  * except:
16364  */
16365  }
16366  __pyx_L4_error:;
16367  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16368  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16369  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16370 
16371  /* "PyClical.pyx":1766
16372  * try:
16373  * return math.tan(obj)
16374  * except: # <<<<<<<<<<<<<<
16375  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16376  *
16377  */
16378  /*except:*/ {
16379  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16380  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16381  __Pyx_GOTREF(__pyx_t_5);
16382  __Pyx_GOTREF(__pyx_t_9);
16383  __Pyx_GOTREF(__pyx_t_3);
16384 
16385  /* "PyClical.pyx":1767
16386  * return math.tan(obj)
16387  * except:
16388  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16389  *
16390  * cpdef inline atan(obj,i = None):
16391  */
16392  __Pyx_XDECREF(__pyx_r);
16393  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16394  __Pyx_GOTREF(__pyx_t_10);
16395  __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, 1767, __pyx_L6_except_error)
16396  __Pyx_GOTREF(__pyx_t_11);
16397  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16398  __pyx_r = __pyx_t_11;
16399  __pyx_t_11 = 0;
16400  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16401  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16402  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16403  goto __pyx_L7_except_return;
16404  }
16405  __pyx_L6_except_error:;
16406 
16407  /* "PyClical.pyx":1764
16408  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16409  * else:
16410  * try: # <<<<<<<<<<<<<<
16411  * return math.tan(obj)
16412  * except:
16413  */
16414  __Pyx_XGIVEREF(__pyx_t_6);
16415  __Pyx_XGIVEREF(__pyx_t_7);
16416  __Pyx_XGIVEREF(__pyx_t_8);
16417  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16418  goto __pyx_L1_error;
16419  __pyx_L8_try_return:;
16420  __Pyx_XGIVEREF(__pyx_t_6);
16421  __Pyx_XGIVEREF(__pyx_t_7);
16422  __Pyx_XGIVEREF(__pyx_t_8);
16423  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16424  goto __pyx_L0;
16425  __pyx_L7_except_return:;
16426  __Pyx_XGIVEREF(__pyx_t_6);
16427  __Pyx_XGIVEREF(__pyx_t_7);
16428  __Pyx_XGIVEREF(__pyx_t_8);
16429  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16430  goto __pyx_L0;
16431  }
16432  }
16433 
16434  /* "PyClical.pyx":1752
16435  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16436  *
16437  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16438  * """
16439  * Tangent of multivector with optional complexifier.
16440  */
16441 
16442  /* function exit code */
16443  __pyx_L1_error:;
16444  __Pyx_XDECREF(__pyx_t_3);
16445  __Pyx_XDECREF(__pyx_t_5);
16446  __Pyx_XDECREF(__pyx_t_9);
16447  __Pyx_XDECREF(__pyx_t_10);
16448  __Pyx_XDECREF(__pyx_t_11);
16449  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16450  __pyx_r = 0;
16451  __pyx_L0:;
16452  __Pyx_XGIVEREF(__pyx_r);
16453  __Pyx_RefNannyFinishContext();
16454  return __pyx_r;
16455  }
16456 
16457  /* Python wrapper */
16458  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16459  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 ";
16460  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16461  PyObject *__pyx_v_obj = 0;
16462  PyObject *__pyx_v_i = 0;
16463  PyObject *__pyx_r = 0;
16464  __Pyx_RefNannyDeclarations
16465  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
16466  {
16467  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16468  PyObject* values[2] = {0,0};
16469  values[1] = ((PyObject *)Py_None);
16470  if (unlikely(__pyx_kwds)) {
16471  Py_ssize_t kw_args;
16472  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16473  switch (pos_args) {
16474  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16475  CYTHON_FALLTHROUGH;
16476  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16477  CYTHON_FALLTHROUGH;
16478  case 0: break;
16479  default: goto __pyx_L5_argtuple_error;
16480  }
16481  kw_args = PyDict_Size(__pyx_kwds);
16482  switch (pos_args) {
16483  case 0:
16484  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16485  else goto __pyx_L5_argtuple_error;
16486  CYTHON_FALLTHROUGH;
16487  case 1:
16488  if (kw_args > 0) {
16489  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16490  if (value) { values[1] = value; kw_args--; }
16491  }
16492  }
16493  if (unlikely(kw_args > 0)) {
16494  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
16495  }
16496  } else {
16497  switch (PyTuple_GET_SIZE(__pyx_args)) {
16498  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16499  CYTHON_FALLTHROUGH;
16500  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16501  break;
16502  default: goto __pyx_L5_argtuple_error;
16503  }
16504  }
16505  __pyx_v_obj = values[0];
16506  __pyx_v_i = values[1];
16507  }
16508  goto __pyx_L4_argument_unpacking_done;
16509  __pyx_L5_argtuple_error:;
16510  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
16511  __pyx_L3_error:;
16512  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16513  __Pyx_RefNannyFinishContext();
16514  return NULL;
16515  __pyx_L4_argument_unpacking_done:;
16516  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16517 
16518  /* function exit code */
16519  __Pyx_RefNannyFinishContext();
16520  return __pyx_r;
16521  }
16522 
16523  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16524  PyObject *__pyx_r = NULL;
16525  __Pyx_RefNannyDeclarations
16526  PyObject *__pyx_t_1 = NULL;
16527  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16528  __Pyx_RefNannySetupContext("tan", 0);
16529  __Pyx_XDECREF(__pyx_r);
16530  __pyx_t_2.__pyx_n = 1;
16531  __pyx_t_2.i = __pyx_v_i;
16532  __pyx_t_1 = __pyx_f_8PyClical_tan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1752, __pyx_L1_error)
16533  __Pyx_GOTREF(__pyx_t_1);
16534  __pyx_r = __pyx_t_1;
16535  __pyx_t_1 = 0;
16536  goto __pyx_L0;
16537 
16538  /* function exit code */
16539  __pyx_L1_error:;
16540  __Pyx_XDECREF(__pyx_t_1);
16541  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16542  __pyx_r = NULL;
16543  __pyx_L0:;
16544  __Pyx_XGIVEREF(__pyx_r);
16545  __Pyx_RefNannyFinishContext();
16546  return __pyx_r;
16547  }
16548 
16549  /* "PyClical.pyx":1769
16550  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16551  *
16552  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16553  * """
16554  * Inverse tangent of multivector with optional complexifier.
16555  */
16556 
16557  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16558  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) {
16559  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16560  PyObject *__pyx_r = NULL;
16561  __Pyx_RefNannyDeclarations
16562  int __pyx_t_1;
16563  int __pyx_t_2;
16564  PyObject *__pyx_t_3 = NULL;
16565  Clifford __pyx_t_4;
16566  PyObject *__pyx_t_5 = NULL;
16567  PyObject *__pyx_t_6 = NULL;
16568  PyObject *__pyx_t_7 = NULL;
16569  PyObject *__pyx_t_8 = NULL;
16570  PyObject *__pyx_t_9 = NULL;
16571  PyObject *__pyx_t_10 = NULL;
16572  PyObject *__pyx_t_11 = NULL;
16573  __Pyx_RefNannySetupContext("atan", 0);
16574  if (__pyx_optional_args) {
16575  if (__pyx_optional_args->__pyx_n > 0) {
16576  __pyx_v_i = __pyx_optional_args->i;
16577  }
16578  }
16579 
16580  /* "PyClical.pyx":1778
16581  * {1}
16582  * """
16583  * if not (i is None): # <<<<<<<<<<<<<<
16584  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16585  * else:
16586  */
16587  __pyx_t_1 = (__pyx_v_i != Py_None);
16588  __pyx_t_2 = (__pyx_t_1 != 0);
16589  if (__pyx_t_2) {
16590 
16591  /* "PyClical.pyx":1779
16592  * """
16593  * if not (i is None):
16594  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16595  * else:
16596  * try:
16597  */
16598  __Pyx_XDECREF(__pyx_r);
16599  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
16600  __Pyx_GOTREF(__pyx_t_3);
16601  try {
16602  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16603  } catch(...) {
16604  __Pyx_CppExn2PyErr();
16605  __PYX_ERR(0, 1779, __pyx_L1_error)
16606  }
16607  __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, 1779, __pyx_L1_error)
16608  __Pyx_GOTREF(__pyx_t_5);
16609  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16610  __pyx_r = __pyx_t_5;
16611  __pyx_t_5 = 0;
16612  goto __pyx_L0;
16613 
16614  /* "PyClical.pyx":1778
16615  * {1}
16616  * """
16617  * if not (i is None): # <<<<<<<<<<<<<<
16618  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16619  * else:
16620  */
16621  }
16622 
16623  /* "PyClical.pyx":1781
16624  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16625  * else:
16626  * try: # <<<<<<<<<<<<<<
16627  * return math.atan(obj)
16628  * except:
16629  */
16630  /*else*/ {
16631  {
16632  __Pyx_PyThreadState_declare
16633  __Pyx_PyThreadState_assign
16634  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16635  __Pyx_XGOTREF(__pyx_t_6);
16636  __Pyx_XGOTREF(__pyx_t_7);
16637  __Pyx_XGOTREF(__pyx_t_8);
16638  /*try:*/ {
16639 
16640  /* "PyClical.pyx":1782
16641  * else:
16642  * try:
16643  * return math.atan(obj) # <<<<<<<<<<<<<<
16644  * except:
16645  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16646  */
16647  __Pyx_XDECREF(__pyx_r);
16648  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
16649  __Pyx_GOTREF(__pyx_t_3);
16650  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1782, __pyx_L4_error)
16651  __Pyx_GOTREF(__pyx_t_9);
16652  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16653  __pyx_t_3 = NULL;
16654  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16655  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16656  if (likely(__pyx_t_3)) {
16657  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16658  __Pyx_INCREF(__pyx_t_3);
16659  __Pyx_INCREF(function);
16660  __Pyx_DECREF_SET(__pyx_t_9, function);
16661  }
16662  }
16663  __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);
16664  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16665  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
16666  __Pyx_GOTREF(__pyx_t_5);
16667  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16668  __pyx_r = __pyx_t_5;
16669  __pyx_t_5 = 0;
16670  goto __pyx_L8_try_return;
16671 
16672  /* "PyClical.pyx":1781
16673  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16674  * else:
16675  * try: # <<<<<<<<<<<<<<
16676  * return math.atan(obj)
16677  * except:
16678  */
16679  }
16680  __pyx_L4_error:;
16681  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16682  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16683  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16684 
16685  /* "PyClical.pyx":1783
16686  * try:
16687  * return math.atan(obj)
16688  * except: # <<<<<<<<<<<<<<
16689  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16690  *
16691  */
16692  /*except:*/ {
16693  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16694  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
16695  __Pyx_GOTREF(__pyx_t_5);
16696  __Pyx_GOTREF(__pyx_t_9);
16697  __Pyx_GOTREF(__pyx_t_3);
16698 
16699  /* "PyClical.pyx":1784
16700  * return math.atan(obj)
16701  * except:
16702  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16703  *
16704  * cpdef inline tanh(obj):
16705  */
16706  __Pyx_XDECREF(__pyx_r);
16707  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
16708  __Pyx_GOTREF(__pyx_t_10);
16709  __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, 1784, __pyx_L6_except_error)
16710  __Pyx_GOTREF(__pyx_t_11);
16711  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16712  __pyx_r = __pyx_t_11;
16713  __pyx_t_11 = 0;
16714  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16715  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16716  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16717  goto __pyx_L7_except_return;
16718  }
16719  __pyx_L6_except_error:;
16720 
16721  /* "PyClical.pyx":1781
16722  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16723  * else:
16724  * try: # <<<<<<<<<<<<<<
16725  * return math.atan(obj)
16726  * except:
16727  */
16728  __Pyx_XGIVEREF(__pyx_t_6);
16729  __Pyx_XGIVEREF(__pyx_t_7);
16730  __Pyx_XGIVEREF(__pyx_t_8);
16731  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16732  goto __pyx_L1_error;
16733  __pyx_L8_try_return:;
16734  __Pyx_XGIVEREF(__pyx_t_6);
16735  __Pyx_XGIVEREF(__pyx_t_7);
16736  __Pyx_XGIVEREF(__pyx_t_8);
16737  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16738  goto __pyx_L0;
16739  __pyx_L7_except_return:;
16740  __Pyx_XGIVEREF(__pyx_t_6);
16741  __Pyx_XGIVEREF(__pyx_t_7);
16742  __Pyx_XGIVEREF(__pyx_t_8);
16743  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16744  goto __pyx_L0;
16745  }
16746  }
16747 
16748  /* "PyClical.pyx":1769
16749  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16750  *
16751  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16752  * """
16753  * Inverse tangent of multivector with optional complexifier.
16754  */
16755 
16756  /* function exit code */
16757  __pyx_L1_error:;
16758  __Pyx_XDECREF(__pyx_t_3);
16759  __Pyx_XDECREF(__pyx_t_5);
16760  __Pyx_XDECREF(__pyx_t_9);
16761  __Pyx_XDECREF(__pyx_t_10);
16762  __Pyx_XDECREF(__pyx_t_11);
16763  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16764  __pyx_r = 0;
16765  __pyx_L0:;
16766  __Pyx_XGIVEREF(__pyx_r);
16767  __Pyx_RefNannyFinishContext();
16768  return __pyx_r;
16769  }
16770 
16771  /* Python wrapper */
16772  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16773  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 ";
16774  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16775  PyObject *__pyx_v_obj = 0;
16776  PyObject *__pyx_v_i = 0;
16777  PyObject *__pyx_r = 0;
16778  __Pyx_RefNannyDeclarations
16779  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
16780  {
16781  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16782  PyObject* values[2] = {0,0};
16783  values[1] = ((PyObject *)Py_None);
16784  if (unlikely(__pyx_kwds)) {
16785  Py_ssize_t kw_args;
16786  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16787  switch (pos_args) {
16788  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16789  CYTHON_FALLTHROUGH;
16790  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16791  CYTHON_FALLTHROUGH;
16792  case 0: break;
16793  default: goto __pyx_L5_argtuple_error;
16794  }
16795  kw_args = PyDict_Size(__pyx_kwds);
16796  switch (pos_args) {
16797  case 0:
16798  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16799  else goto __pyx_L5_argtuple_error;
16800  CYTHON_FALLTHROUGH;
16801  case 1:
16802  if (kw_args > 0) {
16803  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16804  if (value) { values[1] = value; kw_args--; }
16805  }
16806  }
16807  if (unlikely(kw_args > 0)) {
16808  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
16809  }
16810  } else {
16811  switch (PyTuple_GET_SIZE(__pyx_args)) {
16812  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16813  CYTHON_FALLTHROUGH;
16814  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16815  break;
16816  default: goto __pyx_L5_argtuple_error;
16817  }
16818  }
16819  __pyx_v_obj = values[0];
16820  __pyx_v_i = values[1];
16821  }
16822  goto __pyx_L4_argument_unpacking_done;
16823  __pyx_L5_argtuple_error:;
16824  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
16825  __pyx_L3_error:;
16826  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16827  __Pyx_RefNannyFinishContext();
16828  return NULL;
16829  __pyx_L4_argument_unpacking_done:;
16830  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16831 
16832  /* function exit code */
16833  __Pyx_RefNannyFinishContext();
16834  return __pyx_r;
16835  }
16836 
16837  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16838  PyObject *__pyx_r = NULL;
16839  __Pyx_RefNannyDeclarations
16840  PyObject *__pyx_t_1 = NULL;
16841  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16842  __Pyx_RefNannySetupContext("atan", 0);
16843  __Pyx_XDECREF(__pyx_r);
16844  __pyx_t_2.__pyx_n = 1;
16845  __pyx_t_2.i = __pyx_v_i;
16846  __pyx_t_1 = __pyx_f_8PyClical_atan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1769, __pyx_L1_error)
16847  __Pyx_GOTREF(__pyx_t_1);
16848  __pyx_r = __pyx_t_1;
16849  __pyx_t_1 = 0;
16850  goto __pyx_L0;
16851 
16852  /* function exit code */
16853  __pyx_L1_error:;
16854  __Pyx_XDECREF(__pyx_t_1);
16855  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16856  __pyx_r = NULL;
16857  __pyx_L0:;
16858  __Pyx_XGIVEREF(__pyx_r);
16859  __Pyx_RefNannyFinishContext();
16860  return __pyx_r;
16861  }
16862 
16863  /* "PyClical.pyx":1786
16864  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16865  *
16866  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
16867  * """
16868  * Hyperbolic tangent of multivector.
16869  */
16870 
16871  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16872  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16873  PyObject *__pyx_r = NULL;
16874  __Pyx_RefNannyDeclarations
16875  PyObject *__pyx_t_1 = NULL;
16876  PyObject *__pyx_t_2 = NULL;
16877  PyObject *__pyx_t_3 = NULL;
16878  PyObject *__pyx_t_4 = NULL;
16879  PyObject *__pyx_t_5 = NULL;
16880  PyObject *__pyx_t_6 = NULL;
16881  PyObject *__pyx_t_7 = NULL;
16882  PyObject *__pyx_t_8 = NULL;
16883  __Pyx_RefNannySetupContext("tanh", 0);
16884 
16885  /* "PyClical.pyx":1793
16886  * {1,2}
16887  * """
16888  * try: # <<<<<<<<<<<<<<
16889  * return math.tanh(obj)
16890  * except:
16891  */
16892  {
16893  __Pyx_PyThreadState_declare
16894  __Pyx_PyThreadState_assign
16895  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16896  __Pyx_XGOTREF(__pyx_t_1);
16897  __Pyx_XGOTREF(__pyx_t_2);
16898  __Pyx_XGOTREF(__pyx_t_3);
16899  /*try:*/ {
16900 
16901  /* "PyClical.pyx":1794
16902  * """
16903  * try:
16904  * return math.tanh(obj) # <<<<<<<<<<<<<<
16905  * except:
16906  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16907  */
16908  __Pyx_XDECREF(__pyx_r);
16909  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
16910  __Pyx_GOTREF(__pyx_t_5);
16911  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tanh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1794, __pyx_L3_error)
16912  __Pyx_GOTREF(__pyx_t_6);
16913  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16914  __pyx_t_5 = NULL;
16915  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16916  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16917  if (likely(__pyx_t_5)) {
16918  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16919  __Pyx_INCREF(__pyx_t_5);
16920  __Pyx_INCREF(function);
16921  __Pyx_DECREF_SET(__pyx_t_6, function);
16922  }
16923  }
16924  __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);
16925  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16926  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
16927  __Pyx_GOTREF(__pyx_t_4);
16928  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16929  __pyx_r = __pyx_t_4;
16930  __pyx_t_4 = 0;
16931  goto __pyx_L7_try_return;
16932 
16933  /* "PyClical.pyx":1793
16934  * {1,2}
16935  * """
16936  * try: # <<<<<<<<<<<<<<
16937  * return math.tanh(obj)
16938  * except:
16939  */
16940  }
16941  __pyx_L3_error:;
16942  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16943  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16944  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16945 
16946  /* "PyClical.pyx":1795
16947  * try:
16948  * return math.tanh(obj)
16949  * except: # <<<<<<<<<<<<<<
16950  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16951  *
16952  */
16953  /*except:*/ {
16954  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16955  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
16956  __Pyx_GOTREF(__pyx_t_4);
16957  __Pyx_GOTREF(__pyx_t_6);
16958  __Pyx_GOTREF(__pyx_t_5);
16959 
16960  /* "PyClical.pyx":1796
16961  * return math.tanh(obj)
16962  * except:
16963  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16964  *
16965  * cpdef inline atanh(obj,i = None):
16966  */
16967  __Pyx_XDECREF(__pyx_r);
16968  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
16969  __Pyx_GOTREF(__pyx_t_7);
16970  __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, 1796, __pyx_L5_except_error)
16971  __Pyx_GOTREF(__pyx_t_8);
16972  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16973  __pyx_r = __pyx_t_8;
16974  __pyx_t_8 = 0;
16975  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16976  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16977  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16978  goto __pyx_L6_except_return;
16979  }
16980  __pyx_L5_except_error:;
16981 
16982  /* "PyClical.pyx":1793
16983  * {1,2}
16984  * """
16985  * try: # <<<<<<<<<<<<<<
16986  * return math.tanh(obj)
16987  * except:
16988  */
16989  __Pyx_XGIVEREF(__pyx_t_1);
16990  __Pyx_XGIVEREF(__pyx_t_2);
16991  __Pyx_XGIVEREF(__pyx_t_3);
16992  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16993  goto __pyx_L1_error;
16994  __pyx_L7_try_return:;
16995  __Pyx_XGIVEREF(__pyx_t_1);
16996  __Pyx_XGIVEREF(__pyx_t_2);
16997  __Pyx_XGIVEREF(__pyx_t_3);
16998  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16999  goto __pyx_L0;
17000  __pyx_L6_except_return:;
17001  __Pyx_XGIVEREF(__pyx_t_1);
17002  __Pyx_XGIVEREF(__pyx_t_2);
17003  __Pyx_XGIVEREF(__pyx_t_3);
17004  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17005  goto __pyx_L0;
17006  }
17007 
17008  /* "PyClical.pyx":1786
17009  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17010  *
17011  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17012  * """
17013  * Hyperbolic tangent of multivector.
17014  */
17015 
17016  /* function exit code */
17017  __pyx_L1_error:;
17018  __Pyx_XDECREF(__pyx_t_4);
17019  __Pyx_XDECREF(__pyx_t_5);
17020  __Pyx_XDECREF(__pyx_t_6);
17021  __Pyx_XDECREF(__pyx_t_7);
17022  __Pyx_XDECREF(__pyx_t_8);
17023  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17024  __pyx_r = 0;
17025  __pyx_L0:;
17026  __Pyx_XGIVEREF(__pyx_r);
17027  __Pyx_RefNannyFinishContext();
17028  return __pyx_r;
17029  }
17030 
17031  /* Python wrapper */
17032  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17033  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 ";
17034  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17035  PyObject *__pyx_r = 0;
17036  __Pyx_RefNannyDeclarations
17037  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17038  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17039 
17040  /* function exit code */
17041  __Pyx_RefNannyFinishContext();
17042  return __pyx_r;
17043  }
17044 
17045  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17046  PyObject *__pyx_r = NULL;
17047  __Pyx_RefNannyDeclarations
17048  PyObject *__pyx_t_1 = NULL;
17049  __Pyx_RefNannySetupContext("tanh", 0);
17050  __Pyx_XDECREF(__pyx_r);
17051  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17052  __Pyx_GOTREF(__pyx_t_1);
17053  __pyx_r = __pyx_t_1;
17054  __pyx_t_1 = 0;
17055  goto __pyx_L0;
17056 
17057  /* function exit code */
17058  __pyx_L1_error:;
17059  __Pyx_XDECREF(__pyx_t_1);
17060  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17061  __pyx_r = NULL;
17062  __pyx_L0:;
17063  __Pyx_XGIVEREF(__pyx_r);
17064  __Pyx_RefNannyFinishContext();
17065  return __pyx_r;
17066  }
17067 
17068  /* "PyClical.pyx":1798
17069  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17070  *
17071  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17072  * """
17073  * Inverse hyperbolic tangent of multivector with optional complexifier.
17074  */
17075 
17076  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17077  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) {
17078  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17079  PyObject *__pyx_r = NULL;
17080  __Pyx_RefNannyDeclarations
17081  int __pyx_t_1;
17082  int __pyx_t_2;
17083  PyObject *__pyx_t_3 = NULL;
17084  Clifford __pyx_t_4;
17085  PyObject *__pyx_t_5 = NULL;
17086  PyObject *__pyx_t_6 = NULL;
17087  PyObject *__pyx_t_7 = NULL;
17088  PyObject *__pyx_t_8 = NULL;
17089  PyObject *__pyx_t_9 = NULL;
17090  PyObject *__pyx_t_10 = NULL;
17091  PyObject *__pyx_t_11 = NULL;
17092  __Pyx_RefNannySetupContext("atanh", 0);
17093  if (__pyx_optional_args) {
17094  if (__pyx_optional_args->__pyx_n > 0) {
17095  __pyx_v_i = __pyx_optional_args->i;
17096  }
17097  }
17098 
17099  /* "PyClical.pyx":1807
17100  * {1,2}
17101  * """
17102  * if not (i is None): # <<<<<<<<<<<<<<
17103  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17104  * else:
17105  */
17106  __pyx_t_1 = (__pyx_v_i != Py_None);
17107  __pyx_t_2 = (__pyx_t_1 != 0);
17108  if (__pyx_t_2) {
17109 
17110  /* "PyClical.pyx":1808
17111  * """
17112  * if not (i is None):
17113  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17114  * else:
17115  * try:
17116  */
17117  __Pyx_XDECREF(__pyx_r);
17118  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
17119  __Pyx_GOTREF(__pyx_t_3);
17120  try {
17121  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17122  } catch(...) {
17123  __Pyx_CppExn2PyErr();
17124  __PYX_ERR(0, 1808, __pyx_L1_error)
17125  }
17126  __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, 1808, __pyx_L1_error)
17127  __Pyx_GOTREF(__pyx_t_5);
17128  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17129  __pyx_r = __pyx_t_5;
17130  __pyx_t_5 = 0;
17131  goto __pyx_L0;
17132 
17133  /* "PyClical.pyx":1807
17134  * {1,2}
17135  * """
17136  * if not (i is None): # <<<<<<<<<<<<<<
17137  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17138  * else:
17139  */
17140  }
17141 
17142  /* "PyClical.pyx":1810
17143  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17144  * else:
17145  * try: # <<<<<<<<<<<<<<
17146  * return math.atanh(obj)
17147  * except:
17148  */
17149  /*else*/ {
17150  {
17151  __Pyx_PyThreadState_declare
17152  __Pyx_PyThreadState_assign
17153  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17154  __Pyx_XGOTREF(__pyx_t_6);
17155  __Pyx_XGOTREF(__pyx_t_7);
17156  __Pyx_XGOTREF(__pyx_t_8);
17157  /*try:*/ {
17158 
17159  /* "PyClical.pyx":1811
17160  * else:
17161  * try:
17162  * return math.atanh(obj) # <<<<<<<<<<<<<<
17163  * except:
17164  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17165  */
17166  __Pyx_XDECREF(__pyx_r);
17167  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17168  __Pyx_GOTREF(__pyx_t_3);
17169  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atanh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1811, __pyx_L4_error)
17170  __Pyx_GOTREF(__pyx_t_9);
17171  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17172  __pyx_t_3 = NULL;
17173  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17174  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17175  if (likely(__pyx_t_3)) {
17176  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17177  __Pyx_INCREF(__pyx_t_3);
17178  __Pyx_INCREF(function);
17179  __Pyx_DECREF_SET(__pyx_t_9, function);
17180  }
17181  }
17182  __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);
17183  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17184  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17185  __Pyx_GOTREF(__pyx_t_5);
17186  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17187  __pyx_r = __pyx_t_5;
17188  __pyx_t_5 = 0;
17189  goto __pyx_L8_try_return;
17190 
17191  /* "PyClical.pyx":1810
17192  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17193  * else:
17194  * try: # <<<<<<<<<<<<<<
17195  * return math.atanh(obj)
17196  * except:
17197  */
17198  }
17199  __pyx_L4_error:;
17200  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17201  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17202  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17203 
17204  /* "PyClical.pyx":1812
17205  * try:
17206  * return math.atanh(obj)
17207  * except: # <<<<<<<<<<<<<<
17208  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17209  *
17210  */
17211  /*except:*/ {
17212  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17213  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17214  __Pyx_GOTREF(__pyx_t_5);
17215  __Pyx_GOTREF(__pyx_t_9);
17216  __Pyx_GOTREF(__pyx_t_3);
17217 
17218  /* "PyClical.pyx":1813
17219  * return math.atanh(obj)
17220  * except:
17221  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17222  *
17223  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17224  */
17225  __Pyx_XDECREF(__pyx_r);
17226  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17227  __Pyx_GOTREF(__pyx_t_10);
17228  __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, 1813, __pyx_L6_except_error)
17229  __Pyx_GOTREF(__pyx_t_11);
17230  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17231  __pyx_r = __pyx_t_11;
17232  __pyx_t_11 = 0;
17233  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17234  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17235  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17236  goto __pyx_L7_except_return;
17237  }
17238  __pyx_L6_except_error:;
17239 
17240  /* "PyClical.pyx":1810
17241  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17242  * else:
17243  * try: # <<<<<<<<<<<<<<
17244  * return math.atanh(obj)
17245  * except:
17246  */
17247  __Pyx_XGIVEREF(__pyx_t_6);
17248  __Pyx_XGIVEREF(__pyx_t_7);
17249  __Pyx_XGIVEREF(__pyx_t_8);
17250  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17251  goto __pyx_L1_error;
17252  __pyx_L8_try_return:;
17253  __Pyx_XGIVEREF(__pyx_t_6);
17254  __Pyx_XGIVEREF(__pyx_t_7);
17255  __Pyx_XGIVEREF(__pyx_t_8);
17256  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17257  goto __pyx_L0;
17258  __pyx_L7_except_return:;
17259  __Pyx_XGIVEREF(__pyx_t_6);
17260  __Pyx_XGIVEREF(__pyx_t_7);
17261  __Pyx_XGIVEREF(__pyx_t_8);
17262  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17263  goto __pyx_L0;
17264  }
17265  }
17266 
17267  /* "PyClical.pyx":1798
17268  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17269  *
17270  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17271  * """
17272  * Inverse hyperbolic tangent of multivector with optional complexifier.
17273  */
17274 
17275  /* function exit code */
17276  __pyx_L1_error:;
17277  __Pyx_XDECREF(__pyx_t_3);
17278  __Pyx_XDECREF(__pyx_t_5);
17279  __Pyx_XDECREF(__pyx_t_9);
17280  __Pyx_XDECREF(__pyx_t_10);
17281  __Pyx_XDECREF(__pyx_t_11);
17282  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17283  __pyx_r = 0;
17284  __pyx_L0:;
17285  __Pyx_XGIVEREF(__pyx_r);
17286  __Pyx_RefNannyFinishContext();
17287  return __pyx_r;
17288  }
17289 
17290  /* Python wrapper */
17291  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17292  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 ";
17293  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17294  PyObject *__pyx_v_obj = 0;
17295  PyObject *__pyx_v_i = 0;
17296  PyObject *__pyx_r = 0;
17297  __Pyx_RefNannyDeclarations
17298  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17299  {
17300  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17301  PyObject* values[2] = {0,0};
17302  values[1] = ((PyObject *)Py_None);
17303  if (unlikely(__pyx_kwds)) {
17304  Py_ssize_t kw_args;
17305  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17306  switch (pos_args) {
17307  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17308  CYTHON_FALLTHROUGH;
17309  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17310  CYTHON_FALLTHROUGH;
17311  case 0: break;
17312  default: goto __pyx_L5_argtuple_error;
17313  }
17314  kw_args = PyDict_Size(__pyx_kwds);
17315  switch (pos_args) {
17316  case 0:
17317  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17318  else goto __pyx_L5_argtuple_error;
17319  CYTHON_FALLTHROUGH;
17320  case 1:
17321  if (kw_args > 0) {
17322  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17323  if (value) { values[1] = value; kw_args--; }
17324  }
17325  }
17326  if (unlikely(kw_args > 0)) {
17327  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
17328  }
17329  } else {
17330  switch (PyTuple_GET_SIZE(__pyx_args)) {
17331  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17332  CYTHON_FALLTHROUGH;
17333  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17334  break;
17335  default: goto __pyx_L5_argtuple_error;
17336  }
17337  }
17338  __pyx_v_obj = values[0];
17339  __pyx_v_i = values[1];
17340  }
17341  goto __pyx_L4_argument_unpacking_done;
17342  __pyx_L5_argtuple_error:;
17343  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
17344  __pyx_L3_error:;
17345  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17346  __Pyx_RefNannyFinishContext();
17347  return NULL;
17348  __pyx_L4_argument_unpacking_done:;
17349  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17350 
17351  /* function exit code */
17352  __Pyx_RefNannyFinishContext();
17353  return __pyx_r;
17354  }
17355 
17356  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17357  PyObject *__pyx_r = NULL;
17358  __Pyx_RefNannyDeclarations
17359  PyObject *__pyx_t_1 = NULL;
17360  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17361  __Pyx_RefNannySetupContext("atanh", 0);
17362  __Pyx_XDECREF(__pyx_r);
17363  __pyx_t_2.__pyx_n = 1;
17364  __pyx_t_2.i = __pyx_v_i;
17365  __pyx_t_1 = __pyx_f_8PyClical_atanh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error)
17366  __Pyx_GOTREF(__pyx_t_1);
17367  __pyx_r = __pyx_t_1;
17368  __pyx_t_1 = 0;
17369  goto __pyx_L0;
17370 
17371  /* function exit code */
17372  __pyx_L1_error:;
17373  __Pyx_XDECREF(__pyx_t_1);
17374  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17375  __pyx_r = NULL;
17376  __pyx_L0:;
17377  __Pyx_XGIVEREF(__pyx_r);
17378  __Pyx_RefNannyFinishContext();
17379  return __pyx_r;
17380  }
17381 
17382  /* "PyClical.pyx":1815
17383  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17384  *
17385  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17386  * """
17387  * Random multivector within a frame.
17388  */
17389 
17390  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17391  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) {
17392  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17393  PyObject *__pyx_r = NULL;
17394  __Pyx_RefNannyDeclarations
17395  PyObject *__pyx_t_1 = NULL;
17396  PyObject *__pyx_t_2 = NULL;
17397  scalar_t __pyx_t_3;
17398  PyObject *__pyx_t_4 = NULL;
17399  __Pyx_RefNannySetupContext("random_clifford", 0);
17400  if (__pyx_optional_args) {
17401  if (__pyx_optional_args->__pyx_n > 0) {
17402  __pyx_v_fill = __pyx_optional_args->fill;
17403  }
17404  }
17405 
17406  /* "PyClical.pyx":1822
17407  * {-3,-1,2}
17408  * """
17409  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
17410  *
17411  * cpdef inline cga3(obj):
17412  */
17413  __Pyx_XDECREF(__pyx_r);
17414  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
17415  __Pyx_GOTREF(__pyx_t_1);
17416  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
17417  __Pyx_GOTREF(__pyx_t_2);
17418  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_fill); if (unlikely((__pyx_t_3 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1822, __pyx_L1_error)
17419  __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, 1822, __pyx_L1_error)
17420  __Pyx_GOTREF(__pyx_t_4);
17421  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17422  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17423  __pyx_r = __pyx_t_4;
17424  __pyx_t_4 = 0;
17425  goto __pyx_L0;
17426 
17427  /* "PyClical.pyx":1815
17428  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17429  *
17430  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17431  * """
17432  * Random multivector within a frame.
17433  */
17434 
17435  /* function exit code */
17436  __pyx_L1_error:;
17437  __Pyx_XDECREF(__pyx_t_1);
17438  __Pyx_XDECREF(__pyx_t_2);
17439  __Pyx_XDECREF(__pyx_t_4);
17440  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17441  __pyx_r = 0;
17442  __pyx_L0:;
17443  __Pyx_XGIVEREF(__pyx_r);
17444  __Pyx_RefNannyFinishContext();
17445  return __pyx_r;
17446  }
17447 
17448  /* Python wrapper */
17449  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17450  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 ";
17451  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17452  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17453  PyObject *__pyx_v_fill = 0;
17454  PyObject *__pyx_r = 0;
17455  __Pyx_RefNannyDeclarations
17456  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
17457  {
17458  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17459  PyObject* values[2] = {0,0};
17460  values[1] = ((PyObject *)__pyx_float_1_0);
17461  if (unlikely(__pyx_kwds)) {
17462  Py_ssize_t kw_args;
17463  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17464  switch (pos_args) {
17465  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17466  CYTHON_FALLTHROUGH;
17467  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17468  CYTHON_FALLTHROUGH;
17469  case 0: break;
17470  default: goto __pyx_L5_argtuple_error;
17471  }
17472  kw_args = PyDict_Size(__pyx_kwds);
17473  switch (pos_args) {
17474  case 0:
17475  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17476  else goto __pyx_L5_argtuple_error;
17477  CYTHON_FALLTHROUGH;
17478  case 1:
17479  if (kw_args > 0) {
17480  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
17481  if (value) { values[1] = value; kw_args--; }
17482  }
17483  }
17484  if (unlikely(kw_args > 0)) {
17485  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
17486  }
17487  } else {
17488  switch (PyTuple_GET_SIZE(__pyx_args)) {
17489  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17490  CYTHON_FALLTHROUGH;
17491  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17492  break;
17493  default: goto __pyx_L5_argtuple_error;
17494  }
17495  }
17496  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
17497  __pyx_v_fill = values[1];
17498  }
17499  goto __pyx_L4_argument_unpacking_done;
17500  __pyx_L5_argtuple_error:;
17501  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
17502  __pyx_L3_error:;
17503  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17504  __Pyx_RefNannyFinishContext();
17505  return NULL;
17506  __pyx_L4_argument_unpacking_done:;
17507  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
17508  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17509 
17510  /* function exit code */
17511  goto __pyx_L0;
17512  __pyx_L1_error:;
17513  __pyx_r = NULL;
17514  __pyx_L0:;
17515  __Pyx_RefNannyFinishContext();
17516  return __pyx_r;
17517  }
17518 
17519  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) {
17520  PyObject *__pyx_r = NULL;
17521  __Pyx_RefNannyDeclarations
17522  PyObject *__pyx_t_1 = NULL;
17523  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17524  __Pyx_RefNannySetupContext("random_clifford", 0);
17525  __Pyx_XDECREF(__pyx_r);
17526  __pyx_t_2.__pyx_n = 1;
17527  __pyx_t_2.fill = __pyx_v_fill;
17528  __pyx_t_1 = __pyx_f_8PyClical_random_clifford(__pyx_v_ixt, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L1_error)
17529  __Pyx_GOTREF(__pyx_t_1);
17530  __pyx_r = __pyx_t_1;
17531  __pyx_t_1 = 0;
17532  goto __pyx_L0;
17533 
17534  /* function exit code */
17535  __pyx_L1_error:;
17536  __Pyx_XDECREF(__pyx_t_1);
17537  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17538  __pyx_r = NULL;
17539  __pyx_L0:;
17540  __Pyx_XGIVEREF(__pyx_r);
17541  __Pyx_RefNannyFinishContext();
17542  return __pyx_r;
17543  }
17544 
17545  /* "PyClical.pyx":1824
17546  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17547  *
17548  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17549  * """
17550  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17551  */
17552 
17553  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17554  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17555  PyObject *__pyx_r = NULL;
17556  __Pyx_RefNannyDeclarations
17557  PyObject *__pyx_t_1 = NULL;
17558  PyObject *__pyx_t_2 = NULL;
17559  __Pyx_RefNannySetupContext("cga3", 0);
17560 
17561  /* "PyClical.pyx":1831
17562  * 87{-1}+4{1}+18{2}+2{3}+85{4}
17563  * """
17564  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17565  *
17566  * cpdef inline cga3std(obj):
17567  */
17568  __Pyx_XDECREF(__pyx_r);
17569  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
17570  __Pyx_GOTREF(__pyx_t_1);
17571  __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, 1831, __pyx_L1_error)
17572  __Pyx_GOTREF(__pyx_t_2);
17573  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17574  __pyx_r = __pyx_t_2;
17575  __pyx_t_2 = 0;
17576  goto __pyx_L0;
17577 
17578  /* "PyClical.pyx":1824
17579  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17580  *
17581  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17582  * """
17583  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17584  */
17585 
17586  /* function exit code */
17587  __pyx_L1_error:;
17588  __Pyx_XDECREF(__pyx_t_1);
17589  __Pyx_XDECREF(__pyx_t_2);
17590  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17591  __pyx_r = 0;
17592  __pyx_L0:;
17593  __Pyx_XGIVEREF(__pyx_r);
17594  __Pyx_RefNannyFinishContext();
17595  return __pyx_r;
17596  }
17597 
17598  /* Python wrapper */
17599  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17600  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 ";
17601  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17602  PyObject *__pyx_r = 0;
17603  __Pyx_RefNannyDeclarations
17604  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
17605  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
17606 
17607  /* function exit code */
17608  __Pyx_RefNannyFinishContext();
17609  return __pyx_r;
17610  }
17611 
17612  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17613  PyObject *__pyx_r = NULL;
17614  __Pyx_RefNannyDeclarations
17615  PyObject *__pyx_t_1 = NULL;
17616  __Pyx_RefNannySetupContext("cga3", 0);
17617  __Pyx_XDECREF(__pyx_r);
17618  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
17619  __Pyx_GOTREF(__pyx_t_1);
17620  __pyx_r = __pyx_t_1;
17621  __pyx_t_1 = 0;
17622  goto __pyx_L0;
17623 
17624  /* function exit code */
17625  __pyx_L1_error:;
17626  __Pyx_XDECREF(__pyx_t_1);
17627  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17628  __pyx_r = NULL;
17629  __pyx_L0:;
17630  __Pyx_XGIVEREF(__pyx_r);
17631  __Pyx_RefNannyFinishContext();
17632  return __pyx_r;
17633  }
17634 
17635  /* "PyClical.pyx":1833
17636  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17637  *
17638  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17639  * """
17640  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17641  */
17642 
17643  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17644  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17645  PyObject *__pyx_r = NULL;
17646  __Pyx_RefNannyDeclarations
17647  PyObject *__pyx_t_1 = NULL;
17648  PyObject *__pyx_t_2 = NULL;
17649  __Pyx_RefNannySetupContext("cga3std", 0);
17650 
17651  /* "PyClical.pyx":1842
17652  * 0
17653  * """
17654  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
17655  *
17656  * cpdef inline agc3(obj):
17657  */
17658  __Pyx_XDECREF(__pyx_r);
17659  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
17660  __Pyx_GOTREF(__pyx_t_1);
17661  __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, 1842, __pyx_L1_error)
17662  __Pyx_GOTREF(__pyx_t_2);
17663  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17664  __pyx_r = __pyx_t_2;
17665  __pyx_t_2 = 0;
17666  goto __pyx_L0;
17667 
17668  /* "PyClical.pyx":1833
17669  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17670  *
17671  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17672  * """
17673  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17674  */
17675 
17676  /* function exit code */
17677  __pyx_L1_error:;
17678  __Pyx_XDECREF(__pyx_t_1);
17679  __Pyx_XDECREF(__pyx_t_2);
17680  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17681  __pyx_r = 0;
17682  __pyx_L0:;
17683  __Pyx_XGIVEREF(__pyx_r);
17684  __Pyx_RefNannyFinishContext();
17685  return __pyx_r;
17686  }
17687 
17688  /* Python wrapper */
17689  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17690  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 ";
17691  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17692  PyObject *__pyx_r = 0;
17693  __Pyx_RefNannyDeclarations
17694  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
17695  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
17696 
17697  /* function exit code */
17698  __Pyx_RefNannyFinishContext();
17699  return __pyx_r;
17700  }
17701 
17702  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17703  PyObject *__pyx_r = NULL;
17704  __Pyx_RefNannyDeclarations
17705  PyObject *__pyx_t_1 = NULL;
17706  __Pyx_RefNannySetupContext("cga3std", 0);
17707  __Pyx_XDECREF(__pyx_r);
17708  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
17709  __Pyx_GOTREF(__pyx_t_1);
17710  __pyx_r = __pyx_t_1;
17711  __pyx_t_1 = 0;
17712  goto __pyx_L0;
17713 
17714  /* function exit code */
17715  __pyx_L1_error:;
17716  __Pyx_XDECREF(__pyx_t_1);
17717  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17718  __pyx_r = NULL;
17719  __pyx_L0:;
17720  __Pyx_XGIVEREF(__pyx_r);
17721  __Pyx_RefNannyFinishContext();
17722  return __pyx_r;
17723  }
17724 
17725  /* "PyClical.pyx":1844
17726  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17727  *
17728  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17729  * """
17730  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17731  */
17732 
17733  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17734  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17735  PyObject *__pyx_r = NULL;
17736  __Pyx_RefNannyDeclarations
17737  PyObject *__pyx_t_1 = NULL;
17738  PyObject *__pyx_t_2 = NULL;
17739  __Pyx_RefNannySetupContext("agc3", 0);
17740 
17741  /* "PyClical.pyx":1853
17742  * 0
17743  * """
17744  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17745  *
17746  * # Some abbreviations.
17747  */
17748  __Pyx_XDECREF(__pyx_r);
17749  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
17750  __Pyx_GOTREF(__pyx_t_1);
17751  __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, 1853, __pyx_L1_error)
17752  __Pyx_GOTREF(__pyx_t_2);
17753  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17754  __pyx_r = __pyx_t_2;
17755  __pyx_t_2 = 0;
17756  goto __pyx_L0;
17757 
17758  /* "PyClical.pyx":1844
17759  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17760  *
17761  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17762  * """
17763  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17764  */
17765 
17766  /* function exit code */
17767  __pyx_L1_error:;
17768  __Pyx_XDECREF(__pyx_t_1);
17769  __Pyx_XDECREF(__pyx_t_2);
17770  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17771  __pyx_r = 0;
17772  __pyx_L0:;
17773  __Pyx_XGIVEREF(__pyx_r);
17774  __Pyx_RefNannyFinishContext();
17775  return __pyx_r;
17776  }
17777 
17778  /* Python wrapper */
17779  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17780  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 ";
17781  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17782  PyObject *__pyx_r = 0;
17783  __Pyx_RefNannyDeclarations
17784  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
17785  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17786 
17787  /* function exit code */
17788  __Pyx_RefNannyFinishContext();
17789  return __pyx_r;
17790  }
17791 
17792  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17793  PyObject *__pyx_r = NULL;
17794  __Pyx_RefNannyDeclarations
17795  PyObject *__pyx_t_1 = NULL;
17796  __Pyx_RefNannySetupContext("agc3", 0);
17797  __Pyx_XDECREF(__pyx_r);
17798  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
17799  __Pyx_GOTREF(__pyx_t_1);
17800  __pyx_r = __pyx_t_1;
17801  __pyx_t_1 = 0;
17802  goto __pyx_L0;
17803 
17804  /* function exit code */
17805  __pyx_L1_error:;
17806  __Pyx_XDECREF(__pyx_t_1);
17807  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17808  __pyx_r = NULL;
17809  __pyx_L0:;
17810  __Pyx_XGIVEREF(__pyx_r);
17811  __Pyx_RefNannyFinishContext();
17812  return __pyx_r;
17813  }
17814 
17815  /* "PyClical.pyx":1887
17816  * """
17817  *
17818  * def e(obj): # <<<<<<<<<<<<<<
17819  * """
17820  * Abbreviation for clifford(index_set(obj)).
17821  */
17822 
17823  /* Python wrapper */
17824  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17825  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 ";
17826  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17827  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17828  PyObject *__pyx_r = 0;
17829  __Pyx_RefNannyDeclarations
17830  __Pyx_RefNannySetupContext("e (wrapper)", 0);
17831  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17832 
17833  /* function exit code */
17834  __Pyx_RefNannyFinishContext();
17835  return __pyx_r;
17836  }
17837 
17838  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17839  PyObject *__pyx_r = NULL;
17840  __Pyx_RefNannyDeclarations
17841  PyObject *__pyx_t_1 = NULL;
17842  PyObject *__pyx_t_2 = NULL;
17843  __Pyx_RefNannySetupContext("e", 0);
17844 
17845  /* "PyClical.pyx":1898
17846  * 1
17847  * """
17848  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
17849  *
17850  * def istpq(p, q):
17851  */
17852  __Pyx_XDECREF(__pyx_r);
17853  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
17854  __Pyx_GOTREF(__pyx_t_1);
17855  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __pyx_L1_error)
17856  __Pyx_GOTREF(__pyx_t_2);
17857  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17858  __pyx_r = __pyx_t_2;
17859  __pyx_t_2 = 0;
17860  goto __pyx_L0;
17861 
17862  /* "PyClical.pyx":1887
17863  * """
17864  *
17865  * def e(obj): # <<<<<<<<<<<<<<
17866  * """
17867  * Abbreviation for clifford(index_set(obj)).
17868  */
17869 
17870  /* function exit code */
17871  __pyx_L1_error:;
17872  __Pyx_XDECREF(__pyx_t_1);
17873  __Pyx_XDECREF(__pyx_t_2);
17874  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17875  __pyx_r = NULL;
17876  __pyx_L0:;
17877  __Pyx_XGIVEREF(__pyx_r);
17878  __Pyx_RefNannyFinishContext();
17879  return __pyx_r;
17880  }
17881 
17882  /* "PyClical.pyx":1900
17883  * return clifford(index_set(obj))
17884  *
17885  * def istpq(p, q): # <<<<<<<<<<<<<<
17886  * """
17887  * Abbreviation for index_set({-q,...p}).
17888  */
17889 
17890  /* Python wrapper */
17891  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17892  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 ";
17893  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17894  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17895  PyObject *__pyx_v_p = 0;
17896  PyObject *__pyx_v_q = 0;
17897  PyObject *__pyx_r = 0;
17898  __Pyx_RefNannyDeclarations
17899  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
17900  {
17901  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17902  PyObject* values[2] = {0,0};
17903  if (unlikely(__pyx_kwds)) {
17904  Py_ssize_t kw_args;
17905  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17906  switch (pos_args) {
17907  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17908  CYTHON_FALLTHROUGH;
17909  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17910  CYTHON_FALLTHROUGH;
17911  case 0: break;
17912  default: goto __pyx_L5_argtuple_error;
17913  }
17914  kw_args = PyDict_Size(__pyx_kwds);
17915  switch (pos_args) {
17916  case 0:
17917  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17918  else goto __pyx_L5_argtuple_error;
17919  CYTHON_FALLTHROUGH;
17920  case 1:
17921  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17922  else {
17923  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
17924  }
17925  }
17926  if (unlikely(kw_args > 0)) {
17927  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
17928  }
17929  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
17930  goto __pyx_L5_argtuple_error;
17931  } else {
17932  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17933  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17934  }
17935  __pyx_v_p = values[0];
17936  __pyx_v_q = values[1];
17937  }
17938  goto __pyx_L4_argument_unpacking_done;
17939  __pyx_L5_argtuple_error:;
17940  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
17941  __pyx_L3_error:;
17942  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17943  __Pyx_RefNannyFinishContext();
17944  return NULL;
17945  __pyx_L4_argument_unpacking_done:;
17946  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
17947 
17948  /* function exit code */
17949  __Pyx_RefNannyFinishContext();
17950  return __pyx_r;
17951  }
17952 
17953  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
17954  PyObject *__pyx_r = NULL;
17955  __Pyx_RefNannyDeclarations
17956  PyObject *__pyx_t_1 = NULL;
17957  PyObject *__pyx_t_2 = NULL;
17958  PyObject *__pyx_t_3 = NULL;
17959  __Pyx_RefNannySetupContext("istpq", 0);
17960 
17961  /* "PyClical.pyx":1907
17962  * {-3,-2,-1,1,2}
17963  * """
17964  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
17965  *
17966  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
17967  */
17968  __Pyx_XDECREF(__pyx_r);
17969  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
17970  __Pyx_GOTREF(__pyx_t_1);
17971  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_p, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
17972  __Pyx_GOTREF(__pyx_t_2);
17973  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17974  __Pyx_GOTREF(__pyx_t_3);
17975  __Pyx_GIVEREF(__pyx_t_1);
17976  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17977  __Pyx_GIVEREF(__pyx_t_2);
17978  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
17979  __pyx_t_1 = 0;
17980  __pyx_t_2 = 0;
17981  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
17982  __Pyx_GOTREF(__pyx_t_2);
17983  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17984  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17985  __Pyx_GOTREF(__pyx_t_3);
17986  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17987  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
17988  __Pyx_GOTREF(__pyx_t_2);
17989  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17990  __pyx_r = __pyx_t_2;
17991  __pyx_t_2 = 0;
17992  goto __pyx_L0;
17993 
17994  /* "PyClical.pyx":1900
17995  * return clifford(index_set(obj))
17996  *
17997  * def istpq(p, q): # <<<<<<<<<<<<<<
17998  * """
17999  * Abbreviation for index_set({-q,...p}).
18000  */
18001 
18002  /* function exit code */
18003  __pyx_L1_error:;
18004  __Pyx_XDECREF(__pyx_t_1);
18005  __Pyx_XDECREF(__pyx_t_2);
18006  __Pyx_XDECREF(__pyx_t_3);
18007  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18008  __pyx_r = NULL;
18009  __pyx_L0:;
18010  __Pyx_XGIVEREF(__pyx_r);
18011  __Pyx_RefNannyFinishContext();
18012  return __pyx_r;
18013  }
18014 
18015  /* "PyClical.pyx":1913
18016  *
18017  * # Doctest interface.
18018  * def _test(): # <<<<<<<<<<<<<<
18019  * import PyClical, doctest
18020  * return doctest.testmod(PyClical)
18021  */
18022 
18023  /* Python wrapper */
18024  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18025  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18026  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18027  PyObject *__pyx_r = 0;
18028  __Pyx_RefNannyDeclarations
18029  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18030  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18031 
18032  /* function exit code */
18033  __Pyx_RefNannyFinishContext();
18034  return __pyx_r;
18035  }
18036 
18037  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18038  PyObject *__pyx_v_PyClical = NULL;
18039  PyObject *__pyx_v_doctest = NULL;
18040  PyObject *__pyx_r = NULL;
18041  __Pyx_RefNannyDeclarations
18042  PyObject *__pyx_t_1 = NULL;
18043  PyObject *__pyx_t_2 = NULL;
18044  PyObject *__pyx_t_3 = NULL;
18045  __Pyx_RefNannySetupContext("_test", 0);
18046 
18047  /* "PyClical.pyx":1914
18048  * # Doctest interface.
18049  * def _test():
18050  * import PyClical, doctest # <<<<<<<<<<<<<<
18051  * return doctest.testmod(PyClical)
18052  *
18053  */
18054  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18055  __Pyx_GOTREF(__pyx_t_1);
18056  __pyx_v_PyClical = __pyx_t_1;
18057  __pyx_t_1 = 0;
18058  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18059  __Pyx_GOTREF(__pyx_t_1);
18060  __pyx_v_doctest = __pyx_t_1;
18061  __pyx_t_1 = 0;
18062 
18063  /* "PyClical.pyx":1915
18064  * def _test():
18065  * import PyClical, doctest
18066  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18067  *
18068  * if __name__ == "__main__":
18069  */
18070  __Pyx_XDECREF(__pyx_r);
18071  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_doctest, __pyx_n_s_testmod); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1915, __pyx_L1_error)
18072  __Pyx_GOTREF(__pyx_t_2);
18073  __pyx_t_3 = NULL;
18074  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18075  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18076  if (likely(__pyx_t_3)) {
18077  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18078  __Pyx_INCREF(__pyx_t_3);
18079  __Pyx_INCREF(function);
18080  __Pyx_DECREF_SET(__pyx_t_2, function);
18081  }
18082  }
18083  __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);
18084  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18085  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18086  __Pyx_GOTREF(__pyx_t_1);
18087  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18088  __pyx_r = __pyx_t_1;
18089  __pyx_t_1 = 0;
18090  goto __pyx_L0;
18091 
18092  /* "PyClical.pyx":1913
18093  *
18094  * # Doctest interface.
18095  * def _test(): # <<<<<<<<<<<<<<
18096  * import PyClical, doctest
18097  * return doctest.testmod(PyClical)
18098  */
18099 
18100  /* function exit code */
18101  __pyx_L1_error:;
18102  __Pyx_XDECREF(__pyx_t_1);
18103  __Pyx_XDECREF(__pyx_t_2);
18104  __Pyx_XDECREF(__pyx_t_3);
18105  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18106  __pyx_r = NULL;
18107  __pyx_L0:;
18108  __Pyx_XDECREF(__pyx_v_PyClical);
18109  __Pyx_XDECREF(__pyx_v_doctest);
18110  __Pyx_XGIVEREF(__pyx_r);
18111  __Pyx_RefNannyFinishContext();
18112  return __pyx_r;
18113  }
18114  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18115 
18116  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18117  struct __pyx_obj_8PyClical_index_set *p;
18118  PyObject *o;
18119  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18120  o = (*t->tp_alloc)(t, 0);
18121  } else {
18122  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18123  }
18124  if (unlikely(!o)) return 0;
18125  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18126  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18127  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18128  return o;
18129  bad:
18130  Py_DECREF(o); o = 0;
18131  return NULL;
18132  }
18133 
18134  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18135  #if CYTHON_USE_TP_FINALIZE
18136  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))) {
18137  if (PyObject_CallFinalizerFromDealloc(o)) return;
18138  }
18139  #endif
18140  {
18141  PyObject *etype, *eval, *etb;
18142  PyErr_Fetch(&etype, &eval, &etb);
18143  ++Py_REFCNT(o);
18144  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18145  --Py_REFCNT(o);
18146  PyErr_Restore(etype, eval, etb);
18147  }
18148  (*Py_TYPE(o)->tp_free)(o);
18149  }
18150  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18151  PyObject *r;
18152  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18153  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18154  Py_DECREF(x);
18155  return r;
18156  }
18157 
18158  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18159  if (v) {
18160  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18161  }
18162  else {
18163  PyErr_Format(PyExc_NotImplementedError,
18164  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18165  return -1;
18166  }
18167  }
18168 
18169  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18170  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18171  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18172  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18173  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18174  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18175  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18176  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18177  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18178  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18179  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18180  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18181  {0, 0, 0, 0}
18182  };
18183 
18184  static PyNumberMethods __pyx_tp_as_number_index_set = {
18185  0, /*nb_add*/
18186  0, /*nb_subtract*/
18187  0, /*nb_multiply*/
18188  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18189  0, /*nb_divide*/
18190  #endif
18191  0, /*nb_remainder*/
18192  0, /*nb_divmod*/
18193  0, /*nb_power*/
18194  0, /*nb_negative*/
18195  0, /*nb_positive*/
18196  0, /*nb_absolute*/
18197  0, /*nb_nonzero*/
18198  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18199  0, /*nb_lshift*/
18200  0, /*nb_rshift*/
18201  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18202  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18203  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18204  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18205  0, /*nb_coerce*/
18206  #endif
18207  0, /*nb_int*/
18208  #if PY_MAJOR_VERSION < 3
18209  0, /*nb_long*/
18210  #else
18211  0, /*reserved*/
18212  #endif
18213  0, /*nb_float*/
18214  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18215  0, /*nb_oct*/
18216  #endif
18217  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18218  0, /*nb_hex*/
18219  #endif
18220  0, /*nb_inplace_add*/
18221  0, /*nb_inplace_subtract*/
18222  0, /*nb_inplace_multiply*/
18223  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18224  0, /*nb_inplace_divide*/
18225  #endif
18226  0, /*nb_inplace_remainder*/
18227  0, /*nb_inplace_power*/
18228  0, /*nb_inplace_lshift*/
18229  0, /*nb_inplace_rshift*/
18230  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18231  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18232  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18233  0, /*nb_floor_divide*/
18234  0, /*nb_true_divide*/
18235  0, /*nb_inplace_floor_divide*/
18236  0, /*nb_inplace_true_divide*/
18237  0, /*nb_index*/
18238  #if PY_VERSION_HEX >= 0x03050000
18239  0, /*nb_matrix_multiply*/
18240  #endif
18241  #if PY_VERSION_HEX >= 0x03050000
18242  0, /*nb_inplace_matrix_multiply*/
18243  #endif
18244  };
18245 
18246  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18247  0, /*sq_length*/
18248  0, /*sq_concat*/
18249  0, /*sq_repeat*/
18250  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18251  0, /*sq_slice*/
18252  0, /*sq_ass_item*/
18253  0, /*sq_ass_slice*/
18254  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18255  0, /*sq_inplace_concat*/
18256  0, /*sq_inplace_repeat*/
18257  };
18258 
18259  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18260  0, /*mp_length*/
18261  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18262  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18263  };
18264 
18265  static PyTypeObject __pyx_type_8PyClical_index_set = {
18266  PyVarObject_HEAD_INIT(0, 0)
18267  "PyClical.index_set", /*tp_name*/
18268  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18269  0, /*tp_itemsize*/
18270  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18271  #if PY_VERSION_HEX < 0x030800b4
18272  0, /*tp_print*/
18273  #endif
18274  #if PY_VERSION_HEX >= 0x030800b4
18275  0, /*tp_vectorcall_offset*/
18276  #endif
18277  0, /*tp_getattr*/
18278  0, /*tp_setattr*/
18279  #if PY_MAJOR_VERSION < 3
18280  0, /*tp_compare*/
18281  #endif
18282  #if PY_MAJOR_VERSION >= 3
18283  0, /*tp_as_async*/
18284  #endif
18285  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
18286  &__pyx_tp_as_number_index_set, /*tp_as_number*/
18287  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
18288  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
18289  0, /*tp_hash*/
18290  0, /*tp_call*/
18291  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
18292  0, /*tp_getattro*/
18293  0, /*tp_setattro*/
18294  0, /*tp_as_buffer*/
18295  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18296  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
18297  0, /*tp_traverse*/
18298  0, /*tp_clear*/
18299  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
18300  0, /*tp_weaklistoffset*/
18301  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
18302  0, /*tp_iternext*/
18303  __pyx_methods_8PyClical_index_set, /*tp_methods*/
18304  0, /*tp_members*/
18305  0, /*tp_getset*/
18306  0, /*tp_base*/
18307  0, /*tp_dict*/
18308  0, /*tp_descr_get*/
18309  0, /*tp_descr_set*/
18310  0, /*tp_dictoffset*/
18311  0, /*tp_init*/
18312  0, /*tp_alloc*/
18313  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
18314  0, /*tp_free*/
18315  0, /*tp_is_gc*/
18316  0, /*tp_bases*/
18317  0, /*tp_mro*/
18318  0, /*tp_cache*/
18319  0, /*tp_subclasses*/
18320  0, /*tp_weaklist*/
18321  0, /*tp_del*/
18322  0, /*tp_version_tag*/
18323  #if PY_VERSION_HEX >= 0x030400a1
18324  0, /*tp_finalize*/
18325  #endif
18326  #if PY_VERSION_HEX >= 0x030800b1
18327  0, /*tp_vectorcall*/
18328  #endif
18329  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
18330  0, /*tp_print*/
18331  #endif
18332  };
18333  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18334 
18335  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18336  struct __pyx_obj_8PyClical_clifford *p;
18337  PyObject *o;
18338  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18339  o = (*t->tp_alloc)(t, 0);
18340  } else {
18341  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18342  }
18343  if (unlikely(!o)) return 0;
18344  p = ((struct __pyx_obj_8PyClical_clifford *)o);
18345  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18346  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
18347  return o;
18348  bad:
18349  Py_DECREF(o); o = 0;
18350  return NULL;
18351  }
18352 
18353  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18354  #if CYTHON_USE_TP_FINALIZE
18355  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))) {
18356  if (PyObject_CallFinalizerFromDealloc(o)) return;
18357  }
18358  #endif
18359  {
18360  PyObject *etype, *eval, *etb;
18361  PyErr_Fetch(&etype, &eval, &etb);
18362  ++Py_REFCNT(o);
18363  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18364  --Py_REFCNT(o);
18365  PyErr_Restore(etype, eval, etb);
18366  }
18367  (*Py_TYPE(o)->tp_free)(o);
18368  }
18369  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
18370  PyObject *r;
18371  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18372  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18373  Py_DECREF(x);
18374  return r;
18375  }
18376 
18377  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18378  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18379  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18380  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18381  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18382  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18383  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18384  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18385  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18386  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18387  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18388  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18389  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18390  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18391  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18392  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18393  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18394  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18395  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18396  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18397  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18398  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
18399  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
18400  {0, 0, 0, 0}
18401  };
18402 
18403  static PyNumberMethods __pyx_tp_as_number_clifford = {
18404  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
18405  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
18406  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
18407  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18408  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
18409  #endif
18410  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
18411  0, /*nb_divmod*/
18412  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
18413  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
18414  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
18415  0, /*nb_absolute*/
18416  0, /*nb_nonzero*/
18417  0, /*nb_invert*/
18418  0, /*nb_lshift*/
18419  0, /*nb_rshift*/
18420  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
18421  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
18422  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
18423  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18424  0, /*nb_coerce*/
18425  #endif
18426  0, /*nb_int*/
18427  #if PY_MAJOR_VERSION < 3
18428  0, /*nb_long*/
18429  #else
18430  0, /*reserved*/
18431  #endif
18432  0, /*nb_float*/
18433  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18434  0, /*nb_oct*/
18435  #endif
18436  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18437  0, /*nb_hex*/
18438  #endif
18439  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
18440  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
18441  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
18442  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18443  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
18444  #endif
18445  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
18446  0, /*nb_inplace_power*/
18447  0, /*nb_inplace_lshift*/
18448  0, /*nb_inplace_rshift*/
18449  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
18450  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
18451  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
18452  0, /*nb_floor_divide*/
18453  0, /*nb_true_divide*/
18454  0, /*nb_inplace_floor_divide*/
18455  0, /*nb_inplace_true_divide*/
18456  0, /*nb_index*/
18457  #if PY_VERSION_HEX >= 0x03050000
18458  0, /*nb_matrix_multiply*/
18459  #endif
18460  #if PY_VERSION_HEX >= 0x03050000
18461  0, /*nb_inplace_matrix_multiply*/
18462  #endif
18463  };
18464 
18465  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18466  0, /*sq_length*/
18467  0, /*sq_concat*/
18468  0, /*sq_repeat*/
18469  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
18470  0, /*sq_slice*/
18471  0, /*sq_ass_item*/
18472  0, /*sq_ass_slice*/
18473  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
18474  0, /*sq_inplace_concat*/
18475  0, /*sq_inplace_repeat*/
18476  };
18477 
18478  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18479  0, /*mp_length*/
18480  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
18481  0, /*mp_ass_subscript*/
18482  };
18483 
18484  static PyTypeObject __pyx_type_8PyClical_clifford = {
18485  PyVarObject_HEAD_INIT(0, 0)
18486  "PyClical.clifford", /*tp_name*/
18487  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
18488  0, /*tp_itemsize*/
18489  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
18490  #if PY_VERSION_HEX < 0x030800b4
18491  0, /*tp_print*/
18492  #endif
18493  #if PY_VERSION_HEX >= 0x030800b4
18494  0, /*tp_vectorcall_offset*/
18495  #endif
18496  0, /*tp_getattr*/
18497  0, /*tp_setattr*/
18498  #if PY_MAJOR_VERSION < 3
18499  0, /*tp_compare*/
18500  #endif
18501  #if PY_MAJOR_VERSION >= 3
18502  0, /*tp_as_async*/
18503  #endif
18504  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
18505  &__pyx_tp_as_number_clifford, /*tp_as_number*/
18506  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
18507  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
18508  0, /*tp_hash*/
18509  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
18510  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
18511  0, /*tp_getattro*/
18512  0, /*tp_setattro*/
18513  0, /*tp_as_buffer*/
18514  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18515  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
18516  0, /*tp_traverse*/
18517  0, /*tp_clear*/
18518  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
18519  0, /*tp_weaklistoffset*/
18520  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
18521  0, /*tp_iternext*/
18522  __pyx_methods_8PyClical_clifford, /*tp_methods*/
18523  0, /*tp_members*/
18524  0, /*tp_getset*/
18525  0, /*tp_base*/
18526  0, /*tp_dict*/
18527  0, /*tp_descr_get*/
18528  0, /*tp_descr_set*/
18529  0, /*tp_dictoffset*/
18530  0, /*tp_init*/
18531  0, /*tp_alloc*/
18532  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
18533  0, /*tp_free*/
18534  0, /*tp_is_gc*/
18535  0, /*tp_bases*/
18536  0, /*tp_mro*/
18537  0, /*tp_cache*/
18538  0, /*tp_subclasses*/
18539  0, /*tp_weaklist*/
18540  0, /*tp_del*/
18541  0, /*tp_version_tag*/
18542  #if PY_VERSION_HEX >= 0x030400a1
18543  0, /*tp_finalize*/
18544  #endif
18545  #if PY_VERSION_HEX >= 0x030800b1
18546  0, /*tp_vectorcall*/
18547  #endif
18548  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
18549  0, /*tp_print*/
18550  #endif
18551  };
18552 
18553  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
18554  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
18555 
18556  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
18557  PyObject *o;
18558  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__)))) {
18559  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
18560  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
18561  (void) PyObject_INIT(o, t);
18562  PyObject_GC_Track(o);
18563  } else {
18564  o = (*t->tp_alloc)(t, 0);
18565  if (unlikely(!o)) return 0;
18566  }
18567  return o;
18568  }
18569 
18570  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18571  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18572  PyObject_GC_UnTrack(o);
18573  Py_CLEAR(p->__pyx_v_idx);
18574  Py_CLEAR(p->__pyx_v_self);
18575  Py_CLEAR(p->__pyx_t_0);
18576  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__)))) {
18577  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
18578  } else {
18579  (*Py_TYPE(o)->tp_free)(o);
18580  }
18581  }
18582 
18583  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
18584  int e;
18585  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18586  if (p->__pyx_v_idx) {
18587  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
18588  }
18589  if (p->__pyx_v_self) {
18590  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
18591  }
18592  if (p->__pyx_t_0) {
18593  e = (*v)(p->__pyx_t_0, a); if (e) return e;
18594  }
18595  return 0;
18596  }
18597 
18598  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
18599  PyVarObject_HEAD_INIT(0, 0)
18600  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
18601  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
18602  0, /*tp_itemsize*/
18603  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
18604  #if PY_VERSION_HEX < 0x030800b4
18605  0, /*tp_print*/
18606  #endif
18607  #if PY_VERSION_HEX >= 0x030800b4
18608  0, /*tp_vectorcall_offset*/
18609  #endif
18610  0, /*tp_getattr*/
18611  0, /*tp_setattr*/
18612  #if PY_MAJOR_VERSION < 3
18613  0, /*tp_compare*/
18614  #endif
18615  #if PY_MAJOR_VERSION >= 3
18616  0, /*tp_as_async*/
18617  #endif
18618  0, /*tp_repr*/
18619  0, /*tp_as_number*/
18620  0, /*tp_as_sequence*/
18621  0, /*tp_as_mapping*/
18622  0, /*tp_hash*/
18623  0, /*tp_call*/
18624  0, /*tp_str*/
18625  0, /*tp_getattro*/
18626  0, /*tp_setattro*/
18627  0, /*tp_as_buffer*/
18628  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
18629  0, /*tp_doc*/
18630  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
18631  0, /*tp_clear*/
18632  0, /*tp_richcompare*/
18633  0, /*tp_weaklistoffset*/
18634  0, /*tp_iter*/
18635  0, /*tp_iternext*/
18636  0, /*tp_methods*/
18637  0, /*tp_members*/
18638  0, /*tp_getset*/
18639  0, /*tp_base*/
18640  0, /*tp_dict*/
18641  0, /*tp_descr_get*/
18642  0, /*tp_descr_set*/
18643  0, /*tp_dictoffset*/
18644  0, /*tp_init*/
18645  0, /*tp_alloc*/
18646  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
18647  0, /*tp_free*/
18648  0, /*tp_is_gc*/
18649  0, /*tp_bases*/
18650  0, /*tp_mro*/
18651  0, /*tp_cache*/
18652  0, /*tp_subclasses*/
18653  0, /*tp_weaklist*/
18654  0, /*tp_del*/
18655  0, /*tp_version_tag*/
18656  #if PY_VERSION_HEX >= 0x030400a1
18657  0, /*tp_finalize*/
18658  #endif
18659  #if PY_VERSION_HEX >= 0x030800b1
18660  0, /*tp_vectorcall*/
18661  #endif
18662  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
18663  0, /*tp_print*/
18664  #endif
18665  };
18666 
18667  static PyMethodDef __pyx_methods[] = {
18668  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
18669  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
18670  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
18671  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
18672  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
18673  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
18674  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
18675  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
18676  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
18677  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
18678  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
18679  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
18680  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
18681  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
18682  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
18683  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
18684  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
18685  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
18686  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
18687  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
18688  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
18689  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
18690  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
18691  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
18692  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
18693  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
18694  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
18695  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
18696  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
18697  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
18698  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
18699  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
18700  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
18701  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
18702  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
18703  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
18704  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
18705  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
18706  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
18707  {0, 0, 0, 0}
18708  };
18709 
18710  #if PY_MAJOR_VERSION >= 3
18711  #if CYTHON_PEP489_MULTI_PHASE_INIT
18712  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
18713  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
18714  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
18715  {Py_mod_create, (void*)__pyx_pymod_create},
18716  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
18717  {0, NULL}
18718  };
18719  #endif
18720 
18721  static struct PyModuleDef __pyx_moduledef = {
18722  PyModuleDef_HEAD_INIT,
18723  "PyClical",
18724  0, /* m_doc */
18725  #if CYTHON_PEP489_MULTI_PHASE_INIT
18726  0, /* m_size */
18727  #else
18728  -1, /* m_size */
18729  #endif
18730  __pyx_methods /* m_methods */,
18731  #if CYTHON_PEP489_MULTI_PHASE_INIT
18732  __pyx_moduledef_slots, /* m_slots */
18733  #else
18734  NULL, /* m_reload */
18735  #endif
18736  NULL, /* m_traverse */
18737  NULL, /* m_clear */
18738  NULL /* m_free */
18739  };
18740  #endif
18741  #ifndef CYTHON_SMALL_CODE
18742 #if defined(__clang__)
18743  #define CYTHON_SMALL_CODE
18744 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
18745  #define CYTHON_SMALL_CODE __attribute__((cold))
18746 #else
18747  #define CYTHON_SMALL_CODE
18748 #endif
18749 #endif
18750 
18751 static __Pyx_StringTabEntry __pyx_string_tab[] = {
18752  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
18753  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
18754  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
18755  {&__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},
18756  {&__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},
18757  {&__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},
18758  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
18759  {&__pyx_kp_s_Cannot_initialize_index_set_obje, __pyx_k_Cannot_initialize_index_set_obje, sizeof(__pyx_k_Cannot_initialize_index_set_obje), 0, 0, 1, 0},
18760  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
18761  {&__pyx_kp_s_Cannot_take_vector_part_of, __pyx_k_Cannot_take_vector_part_of, sizeof(__pyx_k_Cannot_take_vector_part_of), 0, 0, 1, 0},
18762  {&__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},
18763  {&__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},
18764  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18765  {&__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},
18766  {&__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},
18767  {&__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},
18768  {&__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},
18769  {&__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},
18770  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18771  {&__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},
18772  {&__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},
18773  {&__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},
18774  {&__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},
18775  {&__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},
18776  {&__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},
18777  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18778  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18779  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18780  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18781  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18782  {&__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},
18783  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18784  {&__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},
18785  {&__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},
18786  {&__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},
18787  {&__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},
18788  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18789  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18790  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18791  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18792  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18793  {&__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},
18794  {&__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},
18795  {&__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},
18796  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18797  {&__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},
18798  {&__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},
18799  {&__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},
18800  {&__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},
18801  {&__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},
18802  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18803  {&__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},
18804  {&__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},
18805  {&__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},
18806  {&__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},
18807  {&__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},
18808  {&__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},
18809  {&__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},
18810  {&__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},
18811  {&__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},
18812  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18813  {&__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},
18814  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18815  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18816  {&__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},
18817  {&__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},
18818  {&__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},
18819  {&__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},
18820  {&__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},
18821  {&__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},
18822  {&__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},
18823  {&__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},
18824  {&__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},
18825  {&__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},
18826  {&__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},
18827  {&__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},
18828  {&__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},
18829  {&__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},
18830  {&__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},
18831  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18832  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
18833  {&__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},
18834  {&__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},
18835  {&__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},
18836  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
18837  {&__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},
18838  {&__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},
18839  {&__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},
18840  {&__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},
18841  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18842  {&__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},
18843  {&__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},
18844  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18845  {&__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},
18846  {&__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},
18847  {&__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},
18848  {&__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},
18849  {&__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},
18850  {&__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},
18851  {&__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},
18852  {&__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},
18853  {&__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},
18854  {&__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},
18855  {&__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},
18856  {&__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},
18857  {&__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},
18858  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18859  {&__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},
18860  {&__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},
18861  {&__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},
18862  {&__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},
18863  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18864  {&__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},
18865  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18866  {&__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},
18867  {&__pyx_kp_s_This_comparison_operator_is_not, __pyx_k_This_comparison_operator_is_not, sizeof(__pyx_k_This_comparison_operator_is_not), 0, 0, 1, 0},
18868  {&__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},
18869  {&__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},
18870  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18871  {&__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},
18872  {&__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},
18873  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18874  {&__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},
18875  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
18876  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
18877  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
18878  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
18879  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
18880  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
18881  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18882  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
18883  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18884  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18885  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18886  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18887  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
18888  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18889  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
18890  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18891  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18892  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18893  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
18894  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18895  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18896  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18897  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18898  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18899  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
18900  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
18901  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18902  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18903  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18904  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18905  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18906  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18907  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18908  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18909  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18910  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18911  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18912  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18913  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18914  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18915  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18916  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18917  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18918  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18919  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18920  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18921  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18922  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18923  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18924  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18925  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18926  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18927  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18928  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18929  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18930  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18931  {&__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},
18932  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18933  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18934  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18935  {&__pyx_kp_u_clifford_max_abs_line_1183, __pyx_k_clifford_max_abs_line_1183, sizeof(__pyx_k_clifford_max_abs_line_1183), 0, 1, 0, 0},
18936  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18937  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18938  {&__pyx_kp_u_clifford_outer_pow_line_1003, __pyx_k_clifford_outer_pow_line_1003, sizeof(__pyx_k_clifford_outer_pow_line_1003), 0, 1, 0, 0},
18939  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18940  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18941  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18942  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18943  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18944  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18945  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18946  {&__pyx_kp_u_clifford_vector_part_line_1078, __pyx_k_clifford_vector_part_line_1078, sizeof(__pyx_k_clifford_vector_part_line_1078), 0, 1, 0, 0},
18947  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
18948  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
18949  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
18950  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18951  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18952  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
18953  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18954  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
18955  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
18956  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
18957  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
18958  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
18959  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
18960  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
18961  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
18962  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
18963  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
18964  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
18965  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
18966  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
18967  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
18968  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
18969  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
18970  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
18971  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
18972  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
18973  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
18974  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
18975  {&__pyx_kp_u_index_set___and___line_269, __pyx_k_index_set___and___line_269, sizeof(__pyx_k_index_set___and___line_269), 0, 1, 0, 0},
18976  {&__pyx_kp_u_index_set___getitem___line_189, __pyx_k_index_set___getitem___line_189, sizeof(__pyx_k_index_set___getitem___line_189), 0, 1, 0, 0},
18977  {&__pyx_kp_u_index_set___iand___line_280, __pyx_k_index_set___iand___line_280, sizeof(__pyx_k_index_set___iand___line_280), 0, 1, 0, 0},
18978  {&__pyx_kp_u_index_set___invert___line_238, __pyx_k_index_set___invert___line_238, sizeof(__pyx_k_index_set___invert___line_238), 0, 1, 0, 0},
18979  {&__pyx_kp_u_index_set___ior___line_302, __pyx_k_index_set___ior___line_302, sizeof(__pyx_k_index_set___ior___line_302), 0, 1, 0, 0},
18980  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
18981  {&__pyx_kp_u_index_set___iter___line_227, __pyx_k_index_set___iter___line_227, sizeof(__pyx_k_index_set___iter___line_227), 0, 1, 0, 0},
18982  {&__pyx_kp_u_index_set___ixor___line_258, __pyx_k_index_set___ixor___line_258, sizeof(__pyx_k_index_set___ixor___line_258), 0, 1, 0, 0},
18983  {&__pyx_kp_u_index_set___or___line_291, __pyx_k_index_set___or___line_291, sizeof(__pyx_k_index_set___or___line_291), 0, 1, 0, 0},
18984  {&__pyx_kp_u_index_set___repr___line_382, __pyx_k_index_set___repr___line_382, sizeof(__pyx_k_index_set___repr___line_382), 0, 1, 0, 0},
18985  {&__pyx_kp_u_index_set___setitem___line_177, __pyx_k_index_set___setitem___line_177, sizeof(__pyx_k_index_set___setitem___line_177), 0, 1, 0, 0},
18986  {&__pyx_kp_u_index_set___str___line_393, __pyx_k_index_set___str___line_393, sizeof(__pyx_k_index_set___str___line_393), 0, 1, 0, 0},
18987  {&__pyx_kp_u_index_set___xor___line_247, __pyx_k_index_set___xor___line_247, sizeof(__pyx_k_index_set___xor___line_247), 0, 1, 0, 0},
18988  {&__pyx_kp_u_index_set_copy_line_64, __pyx_k_index_set_copy_line_64, sizeof(__pyx_k_index_set_copy_line_64), 0, 1, 0, 0},
18989  {&__pyx_kp_u_index_set_count_line_313, __pyx_k_index_set_count_line_313, sizeof(__pyx_k_index_set_count_line_313), 0, 1, 0, 0},
18990  {&__pyx_kp_u_index_set_count_neg_line_322, __pyx_k_index_set_count_neg_line_322, sizeof(__pyx_k_index_set_count_neg_line_322), 0, 1, 0, 0},
18991  {&__pyx_kp_u_index_set_count_pos_line_331, __pyx_k_index_set_count_pos_line_331, sizeof(__pyx_k_index_set_count_pos_line_331), 0, 1, 0, 0},
18992  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
18993  {&__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},
18994  {&__pyx_kp_u_index_set_max_line_349, __pyx_k_index_set_max_line_349, sizeof(__pyx_k_index_set_max_line_349), 0, 1, 0, 0},
18995  {&__pyx_kp_u_index_set_min_line_340, __pyx_k_index_set_min_line_340, sizeof(__pyx_k_index_set_min_line_340), 0, 1, 0, 0},
18996  {&__pyx_kp_u_index_set_sign_of_mult_line_364, __pyx_k_index_set_sign_of_mult_line_364, sizeof(__pyx_k_index_set_sign_of_mult_line_364), 0, 1, 0, 0},
18997  {&__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},
18998  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
18999  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
19000  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19001  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19002  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
19003  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19004  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
19005  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19006  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19007  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
19008  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19009  {&__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},
19010  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19011  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
19012  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19013  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
19014  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19015  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
19016  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
19017  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19018  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19019  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
19020  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19021  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
19022  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19023  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19024  {&__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},
19025  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
19026  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19027  {&__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},
19028  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19029  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
19030  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
19031  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19032  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
19033  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19034  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19035  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
19036  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19037  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19038  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19039  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19040  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19041  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19042  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19043  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19044  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19045  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19046  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19047  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19048  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19049  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19050  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19051  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19052  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19053  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19054  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19055  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19056  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19057  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19058  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19059  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19060  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19061  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19062  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19063  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19064  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19065  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19066  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19067  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19068  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19069  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19070  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19071  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19072  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19073  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19074  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19075  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19076  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19077  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19078  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19079  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19080  {0, 0, 0, 0, 0, 0, 0}
19081 };
19082 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
19083  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19084  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19085  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19086  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19087  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19088  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19089  #if PY_MAJOR_VERSION >= 3
19090  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19091  #else
19092  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19093  #endif
19094  return 0;
19095  __pyx_L1_error:;
19096  return -1;
19097 }
19098 
19099 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
19100  __Pyx_RefNannyDeclarations
19101  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19102 
19103  /* "(tree fragment)":2
19104  * def __reduce_cython__(self):
19105  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19106  * def __setstate_cython__(self, __pyx_state):
19107  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19108  */
19109  __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)
19110  __Pyx_GOTREF(__pyx_tuple__3);
19111  __Pyx_GIVEREF(__pyx_tuple__3);
19112 
19113  /* "(tree fragment)":4
19114  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19115  * def __setstate_cython__(self, __pyx_state):
19116  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19117  */
19118  __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)
19119  __Pyx_GOTREF(__pyx_tuple__4);
19120  __Pyx_GIVEREF(__pyx_tuple__4);
19121 
19122  /* "PyClical.pyx":635
19123  * TypeError: Not applicable.
19124  * """
19125  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19126  *
19127  * def __iter__(self):
19128  */
19129  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19130  __Pyx_GOTREF(__pyx_tuple__10);
19131  __Pyx_GIVEREF(__pyx_tuple__10);
19132 
19133  /* "(tree fragment)":2
19134  * def __reduce_cython__(self):
19135  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19136  * def __setstate_cython__(self, __pyx_state):
19137  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19138  */
19139  __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)
19140  __Pyx_GOTREF(__pyx_tuple__11);
19141  __Pyx_GIVEREF(__pyx_tuple__11);
19142 
19143  /* "(tree fragment)":4
19144  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19145  * def __setstate_cython__(self, __pyx_state):
19146  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19147  */
19148  __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)
19149  __Pyx_GOTREF(__pyx_tuple__12);
19150  __Pyx_GIVEREF(__pyx_tuple__12);
19151 
19152  /* "PyClical.pyx":404
19153  * return index_set_to_str( self.unwrap() ).c_str()
19154  *
19155  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19156  * """
19157  * Tests for functions that Doctest cannot see.
19158  */
19159  __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, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 404, __pyx_L1_error)
19160 
19161  /* "PyClical.pyx":1243
19162  * return clifford_to_str( self.unwrap() ).c_str()
19163  *
19164  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19165  * """
19166  * Tests for functions that Doctest cannot see.
19167  */
19168  __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, 1243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 1243, __pyx_L1_error)
19169 
19170  /* "PyClical.pyx":1856
19171  *
19172  * # Some abbreviations.
19173  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19174  * pi = tau / 2.0
19175  *
19176  */
19177  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1856, __pyx_L1_error)
19178  __Pyx_GOTREF(__pyx_tuple__15);
19179  __Pyx_GIVEREF(__pyx_tuple__15);
19180 
19181  /* "PyClical.pyx":1887
19182  * """
19183  *
19184  * def e(obj): # <<<<<<<<<<<<<<
19185  * """
19186  * Abbreviation for clifford(index_set(obj)).
19187  */
19188  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1887, __pyx_L1_error)
19189  __Pyx_GOTREF(__pyx_tuple__16);
19190  __Pyx_GIVEREF(__pyx_tuple__16);
19191  __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, 1887, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 1887, __pyx_L1_error)
19192 
19193  /* "PyClical.pyx":1900
19194  * return clifford(index_set(obj))
19195  *
19196  * def istpq(p, q): # <<<<<<<<<<<<<<
19197  * """
19198  * Abbreviation for index_set({-q,...p}).
19199  */
19200  __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1900, __pyx_L1_error)
19201  __Pyx_GOTREF(__pyx_tuple__18);
19202  __Pyx_GIVEREF(__pyx_tuple__18);
19203  __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, 1900, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 1900, __pyx_L1_error)
19204 
19205  /* "PyClical.pyx":1909
19206  * return index_set(set(range(-q,p+1)))
19207  *
19208  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19209  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19210  *
19211  */
19212  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1909, __pyx_L1_error)
19213  __Pyx_GOTREF(__pyx_tuple__20);
19214  __Pyx_GIVEREF(__pyx_tuple__20);
19215  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19216  __Pyx_GOTREF(__pyx_tuple__21);
19217  __Pyx_GIVEREF(__pyx_tuple__21);
19218 
19219  /* "PyClical.pyx":1913
19220  *
19221  * # Doctest interface.
19222  * def _test(): # <<<<<<<<<<<<<<
19223  * import PyClical, doctest
19224  * return doctest.testmod(PyClical)
19225  */
19226  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1913, __pyx_L1_error)
19227  __Pyx_GOTREF(__pyx_tuple__22);
19228  __Pyx_GIVEREF(__pyx_tuple__22);
19229  __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, 1913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 1913, __pyx_L1_error)
19230  __Pyx_RefNannyFinishContext();
19231  return 0;
19232  __pyx_L1_error:;
19233  __Pyx_RefNannyFinishContext();
19234  return -1;
19235 }
19236 
19237 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
19238  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19239  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19240  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19241  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19242  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19243  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19244  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19245  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19246  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19247  return 0;
19248  __pyx_L1_error:;
19249  return -1;
19250 }
19251 
19252 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
19253 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
19254 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
19255 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
19256 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
19257 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
19258 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
19259 
19260 static int __Pyx_modinit_global_init_code(void) {
19261  __Pyx_RefNannyDeclarations
19262  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
19263  /*--- Global init code ---*/
19264  __Pyx_RefNannyFinishContext();
19265  return 0;
19266 }
19267 
19268 static int __Pyx_modinit_variable_export_code(void) {
19269  __Pyx_RefNannyDeclarations
19270  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
19271  /*--- Variable export code ---*/
19272  __Pyx_RefNannyFinishContext();
19273  return 0;
19274 }
19275 
19276 static int __Pyx_modinit_function_export_code(void) {
19277  __Pyx_RefNannyDeclarations
19278  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
19279  /*--- Function export code ---*/
19280  __Pyx_RefNannyFinishContext();
19281  return 0;
19282 }
19283 
19284 static int __Pyx_modinit_type_init_code(void) {
19285  __Pyx_RefNannyDeclarations
19286  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
19287  /*--- Type init code ---*/
19288  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19289  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19290  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19291  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19292  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19293  #if PY_VERSION_HEX < 0x030800B1
19294  __pyx_type_8PyClical_index_set.tp_print = 0;
19295  #endif
19296  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)) {
19297  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19298  }
19299  #if CYTHON_COMPILING_IN_CPYTHON
19300  {
19301  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19302  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19303  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19304  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19305  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19306  }
19307  }
19308  #endif
19309  #if CYTHON_COMPILING_IN_CPYTHON
19310  {
19311  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19312  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19313  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19314  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19315  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19316  }
19317  }
19318  #endif
19319  #if CYTHON_COMPILING_IN_CPYTHON
19320  {
19321  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19322  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19323  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19324  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19325  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19326  }
19327  }
19328  #endif
19329  #if CYTHON_COMPILING_IN_CPYTHON
19330  {
19331  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19332  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19333  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19334  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19335  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19336  }
19337  }
19338  #endif
19339  #if CYTHON_COMPILING_IN_CPYTHON
19340  {
19341  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19342  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19343  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19344  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19345  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19346  }
19347  }
19348  #endif
19349  #if CYTHON_COMPILING_IN_CPYTHON
19350  {
19351  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19352  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19353  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19354  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19355  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19356  }
19357  }
19358  #endif
19359  #if CYTHON_COMPILING_IN_CPYTHON
19360  {
19361  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19362  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19363  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19364  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19365  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19366  }
19367  }
19368  #endif
19369  #if CYTHON_COMPILING_IN_CPYTHON
19370  {
19371  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19372  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19373  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19374  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19375  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19376  }
19377  }
19378  #endif
19379  #if CYTHON_COMPILING_IN_CPYTHON
19380  {
19381  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19382  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19383  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19384  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19385  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19386  }
19387  }
19388  #endif
19389  #if CYTHON_COMPILING_IN_CPYTHON
19390  {
19391  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19392  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19393  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19394  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19395  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19396  }
19397  }
19398  #endif
19399  #if CYTHON_COMPILING_IN_CPYTHON
19400  {
19401  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19402  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19403  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19404  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19405  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19406  }
19407  }
19408  #endif
19409  #if CYTHON_COMPILING_IN_CPYTHON
19410  {
19411  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19412  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19413  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19414  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19415  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19416  }
19417  }
19418  #endif
19419  #if CYTHON_COMPILING_IN_CPYTHON
19420  {
19421  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19422  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19423  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19424  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19425  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19426  }
19427  }
19428  #endif
19429  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19430  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19431  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19432  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19433  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19434  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
19435  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19436  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19437  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19438  #if PY_VERSION_HEX < 0x030800B1
19439  __pyx_type_8PyClical_clifford.tp_print = 0;
19440  #endif
19441  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
19442  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19443  }
19444  #if CYTHON_COMPILING_IN_CPYTHON
19445  {
19446  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19447  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19448  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19449  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19450  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19451  }
19452  }
19453  #endif
19454  #if CYTHON_COMPILING_IN_CPYTHON
19455  {
19456  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19457  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19458  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19459  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19460  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19461  }
19462  }
19463  #endif
19464  #if CYTHON_COMPILING_IN_CPYTHON
19465  {
19466  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19467  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19468  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19469  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19470  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19471  }
19472  }
19473  #endif
19474  #if CYTHON_COMPILING_IN_CPYTHON
19475  {
19476  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19477  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19478  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19479  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19480  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19481  }
19482  }
19483  #endif
19484  #if CYTHON_COMPILING_IN_CPYTHON
19485  {
19486  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19487  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19488  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19489  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19490  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19491  }
19492  }
19493  #endif
19494  #if CYTHON_COMPILING_IN_CPYTHON
19495  {
19496  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19497  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19498  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19499  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19500  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19501  }
19502  }
19503  #endif
19504  #if CYTHON_COMPILING_IN_CPYTHON
19505  {
19506  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19507  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19508  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19509  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19510  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19511  }
19512  }
19513  #endif
19514  #if CYTHON_COMPILING_IN_CPYTHON
19515  {
19516  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19517  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19518  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19519  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19520  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19521  }
19522  }
19523  #endif
19524  #if CYTHON_COMPILING_IN_CPYTHON
19525  {
19526  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19527  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19528  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19529  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19530  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19531  }
19532  }
19533  #endif
19534  #if CYTHON_COMPILING_IN_CPYTHON
19535  {
19536  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19537  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19538  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19539  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
19540  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
19541  }
19542  }
19543  #endif
19544  #if CYTHON_COMPILING_IN_CPYTHON
19545  {
19546  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19547  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19548  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19549  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
19550  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
19551  }
19552  }
19553  #endif
19554  #if CYTHON_COMPILING_IN_CPYTHON
19555  {
19556  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19557  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19558  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19559  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
19560  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
19561  }
19562  }
19563  #endif
19564  #if CYTHON_COMPILING_IN_CPYTHON
19565  {
19566  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19567  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19568  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19569  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
19570  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
19571  }
19572  }
19573  #endif
19574  #if CYTHON_COMPILING_IN_CPYTHON
19575  {
19576  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19577  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19578  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19579  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
19580  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
19581  }
19582  }
19583  #endif
19584  #if CYTHON_COMPILING_IN_CPYTHON
19585  {
19586  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19587  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19588  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19589  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
19590  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
19591  }
19592  }
19593  #endif
19594  #if CYTHON_COMPILING_IN_CPYTHON
19595  {
19596  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19597  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19598  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19599  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
19600  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
19601  }
19602  }
19603  #endif
19604  #if CYTHON_COMPILING_IN_CPYTHON
19605  {
19606  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19607  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19608  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19609  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
19610  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
19611  }
19612  }
19613  #endif
19614  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19615  #if CYTHON_COMPILING_IN_CPYTHON
19616  {
19617  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19618  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19619  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19620  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
19621  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
19622  }
19623  }
19624  #endif
19625  #endif
19626  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19627  #if CYTHON_COMPILING_IN_CPYTHON
19628  {
19629  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19630  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19631  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19632  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
19633  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
19634  }
19635  }
19636  #endif
19637  #endif
19638  #if CYTHON_COMPILING_IN_CPYTHON
19639  {
19640  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19641  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19642  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19643  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
19644  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
19645  }
19646  }
19647  #endif
19648  #if CYTHON_COMPILING_IN_CPYTHON
19649  {
19650  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19651  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19652  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19653  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
19654  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
19655  }
19656  }
19657  #endif
19658  #if CYTHON_COMPILING_IN_CPYTHON
19659  {
19660  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19661  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19662  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19663  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
19664  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
19665  }
19666  }
19667  #endif
19668  #if CYTHON_COMPILING_IN_CPYTHON
19669  {
19670  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19671  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19672  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19673  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
19674  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
19675  }
19676  }
19677  #endif
19678  #if CYTHON_COMPILING_IN_CPYTHON
19679  {
19680  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19681  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19682  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19683  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
19684  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
19685  }
19686  }
19687  #endif
19688  #if CYTHON_COMPILING_IN_CPYTHON
19689  {
19690  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19691  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19692  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19693  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
19694  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
19695  }
19696  }
19697  #endif
19698  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19699  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19700  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19701  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
19702  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
19703  #if PY_VERSION_HEX < 0x030800B1
19704  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
19705  #endif
19706  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)) {
19707  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
19708  }
19709  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
19710  __Pyx_RefNannyFinishContext();
19711  return 0;
19712  __pyx_L1_error:;
19713  __Pyx_RefNannyFinishContext();
19714  return -1;
19715 }
19716 
19717 static int __Pyx_modinit_type_import_code(void) {
19718  __Pyx_RefNannyDeclarations
19719  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
19720  /*--- Type import code ---*/
19721  __Pyx_RefNannyFinishContext();
19722  return 0;
19723 }
19724 
19725 static int __Pyx_modinit_variable_import_code(void) {
19726  __Pyx_RefNannyDeclarations
19727  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
19728  /*--- Variable import code ---*/
19729  __Pyx_RefNannyFinishContext();
19730  return 0;
19731 }
19732 
19733 static int __Pyx_modinit_function_import_code(void) {
19734  __Pyx_RefNannyDeclarations
19735  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
19736  /*--- Function import code ---*/
19737  __Pyx_RefNannyFinishContext();
19738  return 0;
19739 }
19740 
19741 
19742 #if PY_MAJOR_VERSION < 3
19743 #ifdef CYTHON_NO_PYINIT_EXPORT
19744 #define __Pyx_PyMODINIT_FUNC void
19745 #else
19746 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19747 #endif
19748 #else
19749 #ifdef CYTHON_NO_PYINIT_EXPORT
19750 #define __Pyx_PyMODINIT_FUNC PyObject *
19751 #else
19752 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19753 #endif
19754 #endif
19755 
19756 
19757 #if PY_MAJOR_VERSION < 3
19758 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
19759 __Pyx_PyMODINIT_FUNC initPyClical(void)
19760 #else
19761 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
19762 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
19763 #if CYTHON_PEP489_MULTI_PHASE_INIT
19764 {
19765  return PyModuleDef_Init(&__pyx_moduledef);
19766 }
19767 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
19768  #if PY_VERSION_HEX >= 0x030700A1
19769  static PY_INT64_T main_interpreter_id = -1;
19770  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
19771  if (main_interpreter_id == -1) {
19772  main_interpreter_id = current_id;
19773  return (unlikely(current_id == -1)) ? -1 : 0;
19774  } else if (unlikely(main_interpreter_id != current_id))
19775  #else
19776  static PyInterpreterState *main_interpreter = NULL;
19777  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
19778  if (!main_interpreter) {
19779  main_interpreter = current_interpreter;
19780  } else if (unlikely(main_interpreter != current_interpreter))
19781  #endif
19782  {
19783  PyErr_SetString(
19784  PyExc_ImportError,
19785  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
19786  return -1;
19787  }
19788  return 0;
19789 }
19790 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) {
19791  PyObject *value = PyObject_GetAttrString(spec, from_name);
19792  int result = 0;
19793  if (likely(value)) {
19794  if (allow_none || value != Py_None) {
19795  result = PyDict_SetItemString(moddict, to_name, value);
19796  }
19797  Py_DECREF(value);
19798  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19799  PyErr_Clear();
19800  } else {
19801  result = -1;
19802  }
19803  return result;
19804 }
19805 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
19806  PyObject *module = NULL, *moddict, *modname;
19807  if (__Pyx_check_single_interpreter())
19808  return NULL;
19809  if (__pyx_m)
19810  return __Pyx_NewRef(__pyx_m);
19811  modname = PyObject_GetAttrString(spec, "name");
19812  if (unlikely(!modname)) goto bad;
19813  module = PyModule_NewObject(modname);
19814  Py_DECREF(modname);
19815  if (unlikely(!module)) goto bad;
19816  moddict = PyModule_GetDict(module);
19817  if (unlikely(!moddict)) goto bad;
19818  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
19819  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
19820  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
19821  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
19822  return module;
19823 bad:
19824  Py_XDECREF(module);
19825  return NULL;
19826 }
19827 
19828 
19829 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
19830 #endif
19831 #endif
19832 {
19833  PyObject *__pyx_t_1 = NULL;
19834  PyObject *__pyx_t_2 = NULL;
19835  PyObject *__pyx_t_3 = NULL;
19836  int __pyx_t_4;
19837  __Pyx_RefNannyDeclarations
19838  #if CYTHON_PEP489_MULTI_PHASE_INIT
19839  if (__pyx_m) {
19840  if (__pyx_m == __pyx_pyinit_module) return 0;
19841  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
19842  return -1;
19843  }
19844  #elif PY_MAJOR_VERSION >= 3
19845  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
19846  #endif
19847  #if CYTHON_REFNANNY
19848 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
19849 if (!__Pyx_RefNanny) {
19850  PyErr_Clear();
19851  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
19852  if (!__Pyx_RefNanny)
19853  Py_FatalError("failed to import 'refnanny' module");
19854 }
19855 #endif
19856  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
19857  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19858  #ifdef __Pxy_PyFrame_Initialize_Offsets
19859  __Pxy_PyFrame_Initialize_Offsets();
19860  #endif
19861  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
19862  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
19863  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
19864  #ifdef __Pyx_CyFunction_USED
19865  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19866  #endif
19867  #ifdef __Pyx_FusedFunction_USED
19868  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19869  #endif
19870  #ifdef __Pyx_Coroutine_USED
19871  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19872  #endif
19873  #ifdef __Pyx_Generator_USED
19874  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19875  #endif
19876  #ifdef __Pyx_AsyncGen_USED
19877  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19878  #endif
19879  #ifdef __Pyx_StopAsyncIteration_USED
19880  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19881  #endif
19882  /*--- Library function declarations ---*/
19883  /*--- Threads initialization code ---*/
19884  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
19885  #ifdef WITH_THREAD /* Python build with threading support? */
19886  PyEval_InitThreads();
19887  #endif
19888  #endif
19889  /*--- Module creation code ---*/
19890  #if CYTHON_PEP489_MULTI_PHASE_INIT
19891  __pyx_m = __pyx_pyinit_module;
19892  Py_INCREF(__pyx_m);
19893  #else
19894  #if PY_MAJOR_VERSION < 3
19895  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
19896  #else
19897  __pyx_m = PyModule_Create(&__pyx_moduledef);
19898  #endif
19899  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
19900  #endif
19901  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
19902  Py_INCREF(__pyx_d);
19903  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
19904  Py_INCREF(__pyx_b);
19905  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
19906  Py_INCREF(__pyx_cython_runtime);
19907  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19908  /*--- Initialize various global constants etc. ---*/
19909  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19910  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
19911  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19912  #endif
19913  if (__pyx_module_is_main_PyClical) {
19914  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19915  }
19916  #if PY_MAJOR_VERSION >= 3
19917  {
19918  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
19919  if (!PyDict_GetItemString(modules, "PyClical")) {
19920  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
19921  }
19922  }
19923  #endif
19924  /*--- Builtin init code ---*/
19925  if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
19926  /*--- Constants init code ---*/
19927  if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
19928  /*--- Global type/function init code ---*/
19929  (void)__Pyx_modinit_global_init_code();
19930  (void)__Pyx_modinit_variable_export_code();
19931  (void)__Pyx_modinit_function_export_code();
19932  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
19933  (void)__Pyx_modinit_type_import_code();
19934  (void)__Pyx_modinit_variable_import_code();
19935  (void)__Pyx_modinit_function_import_code();
19936  /*--- Execution code ---*/
19937  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
19938  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19939  #endif
19940 
19941  /* "PyClical.pyx":28
19942  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
19943  *
19944  * import math # <<<<<<<<<<<<<<
19945  * import numbers
19946  * import collections
19947  */
19948  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
19949  __Pyx_GOTREF(__pyx_t_1);
19950  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
19951  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19952 
19953  /* "PyClical.pyx":29
19954  *
19955  * import math
19956  * import numbers # <<<<<<<<<<<<<<
19957  * import collections
19958  *
19959  */
19960  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
19961  __Pyx_GOTREF(__pyx_t_1);
19962  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
19963  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19964 
19965  /* "PyClical.pyx":30
19966  * import math
19967  * import numbers
19968  * import collections # <<<<<<<<<<<<<<
19969  *
19970  * __version__ = "0.8.2"
19971  */
19972  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
19973  __Pyx_GOTREF(__pyx_t_1);
19974  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
19975  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19976 
19977  /* "PyClical.pyx":32
19978  * import collections
19979  *
19980  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
19981  *
19982  * from PyClical cimport *
19983  */
19984  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
19985 
19986  /* "PyClical.pyx":404
19987  * return index_set_to_str( self.unwrap() ).c_str()
19988  *
19989  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19990  * """
19991  * Tests for functions that Doctest cannot see.
19992  */
19993  __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, 404, __pyx_L1_error)
19994  __Pyx_GOTREF(__pyx_t_1);
19995  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
19996  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19997 
19998  /* "PyClical.pyx":1243
19999  * return clifford_to_str( self.unwrap() ).c_str()
20000  *
20001  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20002  * """
20003  * Tests for functions that Doctest cannot see.
20004  */
20005  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_9clifford_hidden_doctests, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L1_error)
20006  __Pyx_GOTREF(__pyx_t_1);
20007  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
20008  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20009 
20010  /* "PyClical.pyx":1856
20011  *
20012  * # Some abbreviations.
20013  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
20014  * pi = tau / 2.0
20015  *
20016  */
20017  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20018  __Pyx_GOTREF(__pyx_t_1);
20019  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
20020  __Pyx_GOTREF(__pyx_t_2);
20021  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20022  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20023  __Pyx_GOTREF(__pyx_t_1);
20024  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20025  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
20026  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20027 
20028  /* "PyClical.pyx":1857
20029  * # Some abbreviations.
20030  * tau = atan(clifford(1.0)) * 8.0
20031  * pi = tau / 2.0 # <<<<<<<<<<<<<<
20032  *
20033  * cl = clifford
20034  */
20035  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20036  __Pyx_GOTREF(__pyx_t_1);
20037  __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_2_0, 2.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
20038  __Pyx_GOTREF(__pyx_t_2);
20039  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20040  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
20041  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20042 
20043  /* "PyClical.pyx":1859
20044  * pi = tau / 2.0
20045  *
20046  * cl = clifford # <<<<<<<<<<<<<<
20047  * """
20048  * Abbreviation for clifford.
20049  */
20050  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20051 
20052  /* "PyClical.pyx":1879
20053  * """
20054  *
20055  * ist = index_set # <<<<<<<<<<<<<<
20056  * """
20057  * Abbreviation for index_set.
20058  */
20059  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20060 
20061  /* "PyClical.pyx":1887
20062  * """
20063  *
20064  * def e(obj): # <<<<<<<<<<<<<<
20065  * """
20066  * Abbreviation for clifford(index_set(obj)).
20067  */
20068  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_83e, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
20069  __Pyx_GOTREF(__pyx_t_2);
20070  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20071  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20072 
20073  /* "PyClical.pyx":1900
20074  * return clifford(index_set(obj))
20075  *
20076  * def istpq(p, q): # <<<<<<<<<<<<<<
20077  * """
20078  * Abbreviation for index_set({-q,...p}).
20079  */
20080  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_85istpq, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1900, __pyx_L1_error)
20081  __Pyx_GOTREF(__pyx_t_2);
20082  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20083  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20084 
20085  /* "PyClical.pyx":1909
20086  * return index_set(set(range(-q,p+1)))
20087  *
20088  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20089  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20090  *
20091  */
20092  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20093  __Pyx_GOTREF(__pyx_t_2);
20094  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
20095  __Pyx_GOTREF(__pyx_t_1);
20096  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20097  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20098  __Pyx_GOTREF(__pyx_t_2);
20099  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L1_error)
20100  __Pyx_GOTREF(__pyx_t_3);
20101  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20102  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20103  __Pyx_GOTREF(__pyx_t_2);
20104  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20105  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20106  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20107  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20108 
20109  /* "PyClical.pyx":1910
20110  *
20111  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20112  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20113  *
20114  * # Doctest interface.
20115  */
20116  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20117  __Pyx_GOTREF(__pyx_t_2);
20118  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1910, __pyx_L1_error)
20119  __Pyx_GOTREF(__pyx_t_3);
20120  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20121  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20122  __Pyx_GOTREF(__pyx_t_2);
20123  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
20124  __Pyx_GOTREF(__pyx_t_1);
20125  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20126  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20127  __Pyx_GOTREF(__pyx_t_2);
20128  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20129  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20130  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20131  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20132 
20133  /* "PyClical.pyx":1913
20134  *
20135  * # Doctest interface.
20136  * def _test(): # <<<<<<<<<<<<<<
20137  * import PyClical, doctest
20138  * return doctest.testmod(PyClical)
20139  */
20140  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_87_test, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1913, __pyx_L1_error)
20141  __Pyx_GOTREF(__pyx_t_2);
20142  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20143  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20144 
20145  /* "PyClical.pyx":1917
20146  * return doctest.testmod(PyClical)
20147  *
20148  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20149  * _test()
20150  */
20151  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20152  __Pyx_GOTREF(__pyx_t_2);
20153  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_main, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1917, __pyx_L1_error)
20154  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20155  if (__pyx_t_4) {
20156 
20157  /* "PyClical.pyx":1918
20158  *
20159  * if __name__ == "__main__":
20160  * _test() # <<<<<<<<<<<<<<
20161  */
20162  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20163  __Pyx_GOTREF(__pyx_t_2);
20164  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20165  __Pyx_GOTREF(__pyx_t_1);
20166  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20167  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20168 
20169  /* "PyClical.pyx":1917
20170  * return doctest.testmod(PyClical)
20171  *
20172  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20173  * _test()
20174  */
20175  }
20176 
20177  /* "PyClical.pyx":1
20178  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20179  * # distutils: language = c++
20180  * #
20181  */
20182  __pyx_t_1 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20183  __Pyx_GOTREF(__pyx_t_1);
20184  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set_copy_line_64, __pyx_kp_u_Copy_this_index_set_object_s_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20185  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___setitem___line_177, __pyx_kp_u_Set_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20186  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___getitem___line_189, __pyx_kp_u_Get_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20187  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___iter___line_227, __pyx_kp_u_Iterate_over_the_indices_of_an) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20188  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___invert___line_238, __pyx_kp_u_Set_complement_not_print_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20189  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___xor___line_247, __pyx_kp_u_Symmetric_set_difference_exclus) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20190  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___ixor___line_258, __pyx_kp_u_Symmetric_set_difference_exclus_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20191  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___and___line_269, __pyx_kp_u_Set_intersection_and_print_inde) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20192  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___iand___line_280, __pyx_kp_u_Set_intersection_and_x_index_se) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20193  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___or___line_291, __pyx_kp_u_Set_union_or_print_index_set_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20194  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___ior___line_302, __pyx_kp_u_Set_union_or_x_index_set_1_x_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20195  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set_count_line_313, __pyx_kp_u_Cardinality_Number_of_indices_i) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20196  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set_count_neg_line_322, __pyx_kp_u_Number_of_negative_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20197  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set_count_pos_line_331, __pyx_kp_u_Number_of_positive_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20198  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set_min_line_340, __pyx_kp_u_Minimum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20199  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set_max_line_349, __pyx_kp_u_Maximum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20200  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set_sign_of_mult_line_364, __pyx_kp_u_Sign_of_geometric_product_of_tw) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20201  if (PyDict_SetItem(__pyx_t_1, __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)
20202  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___repr___line_382, __pyx_kp_u_The_official_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20203  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___str___line_393, __pyx_kp_u_The_informal_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20204  if (PyDict_SetItem(__pyx_t_1, __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)
20205  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_compare_line_490, __pyx_kp_u_lexicographic_compare_eg_3_4_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20206  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_min_neg_line_502, __pyx_kp_u_Minimum_negative_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20207  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_max_pos_line_511, __pyx_kp_u_Maximum_positive_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20208  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_copy_line_554, __pyx_kp_u_Copy_this_clifford_object_x_cli) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20209  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___iter___line_637, __pyx_kp_u_Not_applicable_for_a_in_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20210  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_reframe_line_648, __pyx_kp_u_Put_self_into_a_larger_frame_co) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20211  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___getitem___line_706, __pyx_kp_u_Subscripting_map_from_index_set) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20212  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___neg___line_721, __pyx_kp_u_Unary_print_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20213  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___pos___line_730, __pyx_kp_u_Unary_print_clifford_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20214  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___add___line_739, __pyx_kp_u_Geometric_sum_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20215  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___iadd___line_750, __pyx_kp_u_Geometric_sum_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20216  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___sub___line_759, __pyx_kp_u_Geometric_difference_print_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20217  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___isub___line_770, __pyx_kp_u_Geometric_difference_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20218  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___mul___line_779, __pyx_kp_u_Geometric_product_print_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20219  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___imul___line_792, __pyx_kp_u_Geometric_product_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20220  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___mod___line_805, __pyx_kp_u_Contraction_print_clifford_1_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20221  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___imod___line_820, __pyx_kp_u_Contraction_x_clifford_1_x_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20222  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___and___line_835, __pyx_kp_u_Inner_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20223  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___iand___line_850, __pyx_kp_u_Inner_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20224  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___xor___line_865, __pyx_kp_u_Outer_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20225  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___ixor___line_880, __pyx_kp_u_Outer_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20226  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___div___line_895, __pyx_kp_u_Geometric_quotient_print_cliffo) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20227  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___idiv___line_910, __pyx_kp_u_Geometric_quotient_x_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20228  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_inv_line_925, __pyx_kp_u_Geometric_multiplicative_invers) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20229  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___or___line_938, __pyx_kp_u_Transform_left_hand_side_using) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20230  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___ior___line_949, __pyx_kp_u_Transform_left_hand_side_using_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20231  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___pow___line_960, __pyx_kp_u_Power_self_to_the_m_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20232  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_pow_line_979, __pyx_kp_u_Power_self_to_the_m_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20233  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_outer_pow_line_1003, __pyx_kp_u_Outer_product_power_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20234  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___call___line_1019, __pyx_kp_u_Pure_grade_vector_part_print_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20235  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_scalar_line_1038, __pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20236  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_pure_line_1049, __pyx_kp_u_Pure_part_print_clifford_1_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20237  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_even_line_1060, __pyx_kp_u_Even_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20238  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_odd_line_1069, __pyx_kp_u_Odd_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20239  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_vector_part_line_1078, __pyx_kp_u_Vector_part_of_multivector_as_a) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20240  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_involute_line_1106, __pyx_kp_u_Main_involution_each_i_is_repla) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20241  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_reverse_line_1122, __pyx_kp_u_Reversion_eg_clifford_1_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20242  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_conj_line_1137, __pyx_kp_u_Conjugation_reverse_o_involute) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20243  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_quad_line_1152, __pyx_kp_u_Quadratic_form_rev_x_x_0_print) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20244  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_norm_line_1163, __pyx_kp_u_Norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20245  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_abs_line_1174, __pyx_kp_u_Absolute_value_square_root_of_n) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20246  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_max_abs_line_1183, __pyx_kp_u_Maximum_of_absolute_values_of_c) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20247  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_truncated_line_1194, __pyx_kp_u_Remove_all_terms_of_self_with_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20248  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_isnan_line_1205, __pyx_kp_u_Check_if_a_multivector_contains) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20249  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_frame_line_1214, __pyx_kp_u_Subalgebra_generated_by_all_gen) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20250  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___repr___line_1225, __pyx_kp_u_The_official_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20251  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___str___line_1234, __pyx_kp_u_The_informal_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20252  if (PyDict_SetItem(__pyx_t_1, __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)
20253  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_inv_line_1329, __pyx_kp_u_Geometric_multiplicative_invers_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20254  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_scalar_line_1344, __pyx_kp_u_Scalar_part_scalar_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20255  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_real_line_1355, __pyx_kp_u_Real_part_synonym_for_scalar_pa) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20256  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_imag_line_1366, __pyx_kp_u_Imaginary_part_deprecated_alway) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20257  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_pure_line_1377, __pyx_kp_u_Pure_part_print_pure_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20258  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_even_line_1388, __pyx_kp_u_Even_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20259  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_odd_line_1397, __pyx_kp_u_Odd_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20260  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_involute_line_1406, __pyx_kp_u_Main_involution_each_i_is_repla_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20261  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_reverse_line_1421, __pyx_kp_u_Reversion_eg_1_2_2_1_print_reve) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20262  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_conj_line_1436, __pyx_kp_u_Conjugation_reverse_o_involute_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20263  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_quad_line_1451, __pyx_kp_u_Quadratic_form_rev_x_x_0_print_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20264  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_norm_line_1462, __pyx_kp_u_norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20265  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_abs_line_1473, __pyx_kp_u_Absolute_value_of_multivector_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20266  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_max_abs_line_1482, __pyx_kp_u_Maximum_absolute_value_of_coord) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20267  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_pow_line_1494, __pyx_kp_u_Integer_power_of_multivector_ob) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20268  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_outer_pow_line_1518, __pyx_kp_u_Outer_product_power_of_multivec) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20269  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_complexifier_line_1527, __pyx_kp_u_Square_root_of_1_which_commutes) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20270  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_sqrt_line_1542, __pyx_kp_u_Square_root_of_multivector_with) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20271  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_exp_line_1565, __pyx_kp_u_Exponential_of_multivector_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20272  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_log_line_1579, __pyx_kp_u_Natural_logarithm_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20273  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_cos_line_1602, __pyx_kp_u_Cosine_of_multivector_with_opti) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20274  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_acos_line_1619, __pyx_kp_u_Inverse_cosine_of_multivector_w) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20275  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_cosh_line_1640, __pyx_kp_u_Hyperbolic_cosine_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20276  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_acosh_line_1656, __pyx_kp_u_Inverse_hyperbolic_cosine_of_mu) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20277  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_sin_line_1679, __pyx_kp_u_Sine_of_multivector_with_option) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20278  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_asin_line_1698, __pyx_kp_u_Inverse_sine_of_multivector_wit) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20279  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_sinh_line_1719, __pyx_kp_u_Hyperbolic_sine_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20280  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_asinh_line_1733, __pyx_kp_u_Inverse_hyperbolic_sine_of_mult) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20281  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_tan_line_1752, __pyx_kp_u_Tangent_of_multivector_with_opt) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20282  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_atan_line_1769, __pyx_kp_u_Inverse_tangent_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20283  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_tanh_line_1786, __pyx_kp_u_Hyperbolic_tangent_of_multivect) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20284  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_atanh_line_1798, __pyx_kp_u_Inverse_hyperbolic_tangent_of_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20285  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_random_clifford_line_1815, __pyx_kp_u_Random_multivector_within_a_fra) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20286  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_cga3_line_1824, __pyx_kp_u_Convert_Euclidean_3D_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20287  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_cga3std_line_1833, __pyx_kp_u_Convert_CGA3_null_vector_to_sta) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20288  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_agc3_line_1844, __pyx_kp_u_Convert_CGA3_null_vector_to_Euc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20289  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_e_line_1887, __pyx_kp_u_Abbreviation_for_clifford_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20290  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_istpq_line_1900, __pyx_kp_u_Abbreviation_for_index_set_q_p) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20291  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20292  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20293 
20294  /*--- Wrapped vars code ---*/
20295 
20296  goto __pyx_L0;
20297  __pyx_L1_error:;
20298  __Pyx_XDECREF(__pyx_t_1);
20299  __Pyx_XDECREF(__pyx_t_2);
20300  __Pyx_XDECREF(__pyx_t_3);
20301  if (__pyx_m) {
20302  if (__pyx_d) {
20303  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
20304  }
20305  Py_CLEAR(__pyx_m);
20306  } else if (!PyErr_Occurred()) {
20307  PyErr_SetString(PyExc_ImportError, "init PyClical");
20308  }
20309  __pyx_L0:;
20310  __Pyx_RefNannyFinishContext();
20311  #if CYTHON_PEP489_MULTI_PHASE_INIT
20312  return (__pyx_m != NULL) ? 0 : -1;
20313  #elif PY_MAJOR_VERSION >= 3
20314  return __pyx_m;
20315  #else
20316  return;
20317  #endif
20318 }
20319 
20320 /* --- Runtime support code --- */
20321 /* Refnanny */
20322 #if CYTHON_REFNANNY
20323 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20324  PyObject *m = NULL, *p = NULL;
20325  void *r = NULL;
20326  m = PyImport_ImportModule(modname);
20327  if (!m) goto end;
20328  p = PyObject_GetAttrString(m, "RefNannyAPI");
20329  if (!p) goto end;
20330  r = PyLong_AsVoidPtr(p);
20331 end:
20332  Py_XDECREF(p);
20333  Py_XDECREF(m);
20334  return (__Pyx_RefNannyAPIStruct *)r;
20335 }
20336 #endif
20337 
20338 /* PyObjectGetAttrStr */
20339 #if CYTHON_USE_TYPE_SLOTS
20340 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20341  PyTypeObject* tp = Py_TYPE(obj);
20342  if (likely(tp->tp_getattro))
20343  return tp->tp_getattro(obj, attr_name);
20344 #if PY_MAJOR_VERSION < 3
20345  if (likely(tp->tp_getattr))
20346  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
20347 #endif
20348  return PyObject_GetAttr(obj, attr_name);
20349 }
20350 #endif
20351 
20352 /* GetBuiltinName */
20353 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20354  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20355  if (unlikely(!result)) {
20356  PyErr_Format(PyExc_NameError,
20357 #if PY_MAJOR_VERSION >= 3
20358  "name '%U' is not defined", name);
20359 #else
20360  "name '%.200s' is not defined", PyString_AS_STRING(name));
20361 #endif
20362  }
20363  return result;
20364 }
20365 
20366 /* PyCFunctionFastCall */
20367 #if CYTHON_FAST_PYCCALL
20368 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
20369  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
20370  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
20371  PyObject *self = PyCFunction_GET_SELF(func);
20372  int flags = PyCFunction_GET_FLAGS(func);
20373  assert(PyCFunction_Check(func));
20374  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
20375  assert(nargs >= 0);
20376  assert(nargs == 0 || args != NULL);
20377  /* _PyCFunction_FastCallDict() must not be called with an exception set,
20378  because it may clear it (directly or indirectly) and so the
20379  caller loses its exception */
20380  assert(!PyErr_Occurred());
20381  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
20382  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
20383  } else {
20384  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
20385  }
20386 }
20387 #endif
20388 
20389 /* PyFunctionFastCall */
20390 #if CYTHON_FAST_PYCALL
20391 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
20392  PyObject *globals) {
20393  PyFrameObject *f;
20394  PyThreadState *tstate = __Pyx_PyThreadState_Current;
20395  PyObject **fastlocals;
20396  Py_ssize_t i;
20397  PyObject *result;
20398  assert(globals != NULL);
20399  /* XXX Perhaps we should create a specialized
20400  PyFrame_New() that doesn't take locals, but does
20401  take builtins without sanity checking them.
20402  */
20403  assert(tstate != NULL);
20404  f = PyFrame_New(tstate, co, globals, NULL);
20405  if (f == NULL) {
20406  return NULL;
20407  }
20408  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
20409  for (i = 0; i < na; i++) {
20410  Py_INCREF(*args);
20411  fastlocals[i] = *args++;
20412  }
20413  result = PyEval_EvalFrameEx(f,0);
20414  ++tstate->recursion_depth;
20415  Py_DECREF(f);
20416  --tstate->recursion_depth;
20417  return result;
20418 }
20419 #if 1 || PY_VERSION_HEX < 0x030600B1
20420 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
20421  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
20422  PyObject *globals = PyFunction_GET_GLOBALS(func);
20423  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
20424  PyObject *closure;
20425 #if PY_MAJOR_VERSION >= 3
20426  PyObject *kwdefs;
20427 #endif
20428  PyObject *kwtuple, **k;
20429  PyObject **d;
20430  Py_ssize_t nd;
20431  Py_ssize_t nk;
20432  PyObject *result;
20433  assert(kwargs == NULL || PyDict_Check(kwargs));
20434  nk = kwargs ? PyDict_Size(kwargs) : 0;
20435  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
20436  return NULL;
20437  }
20438  if (
20439 #if PY_MAJOR_VERSION >= 3
20440  co->co_kwonlyargcount == 0 &&
20441 #endif
20442  likely(kwargs == NULL || nk == 0) &&
20443  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
20444  if (argdefs == NULL && co->co_argcount == nargs) {
20445  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
20446  goto done;
20447  }
20448  else if (nargs == 0 && argdefs != NULL
20449  && co->co_argcount == Py_SIZE(argdefs)) {
20450  /* function called with no arguments, but all parameters have
20451  a default value: use default values as arguments .*/
20452  args = &PyTuple_GET_ITEM(argdefs, 0);
20453  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
20454  goto done;
20455  }
20456  }
20457  if (kwargs != NULL) {
20458  Py_ssize_t pos, i;
20459  kwtuple = PyTuple_New(2 * nk);
20460  if (kwtuple == NULL) {
20461  result = NULL;
20462  goto done;
20463  }
20464  k = &PyTuple_GET_ITEM(kwtuple, 0);
20465  pos = i = 0;
20466  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
20467  Py_INCREF(k[i]);
20468  Py_INCREF(k[i+1]);
20469  i += 2;
20470  }
20471  nk = i / 2;
20472  }
20473  else {
20474  kwtuple = NULL;
20475  k = NULL;
20476  }
20477  closure = PyFunction_GET_CLOSURE(func);
20478 #if PY_MAJOR_VERSION >= 3
20479  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
20480 #endif
20481  if (argdefs != NULL) {
20482  d = &PyTuple_GET_ITEM(argdefs, 0);
20483  nd = Py_SIZE(argdefs);
20484  }
20485  else {
20486  d = NULL;
20487  nd = 0;
20488  }
20489 #if PY_MAJOR_VERSION >= 3
20490  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
20491  args, (int)nargs,
20492  k, (int)nk,
20493  d, (int)nd, kwdefs, closure);
20494 #else
20495  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
20496  args, (int)nargs,
20497  k, (int)nk,
20498  d, (int)nd, closure);
20499 #endif
20500  Py_XDECREF(kwtuple);
20501 done:
20502  Py_LeaveRecursiveCall();
20503  return result;
20504 }
20505 #endif
20506 #endif
20507 
20508 /* PyObjectCall */
20509 #if CYTHON_COMPILING_IN_CPYTHON
20510 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20511  PyObject *result;
20512  ternaryfunc call = func->ob_type->tp_call;
20513  if (unlikely(!call))
20514  return PyObject_Call(func, arg, kw);
20515  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20516  return NULL;
20517  result = (*call)(func, arg, kw);
20518  Py_LeaveRecursiveCall();
20519  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20520  PyErr_SetString(
20521  PyExc_SystemError,
20522  "NULL result without error in PyObject_Call");
20523  }
20524  return result;
20525 }
20526 #endif
20527 
20528 /* PyObjectCallMethO */
20529 #if CYTHON_COMPILING_IN_CPYTHON
20530 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20531  PyObject *self, *result;
20532  PyCFunction cfunc;
20533  cfunc = PyCFunction_GET_FUNCTION(func);
20534  self = PyCFunction_GET_SELF(func);
20535  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20536  return NULL;
20537  result = cfunc(self, arg);
20538  Py_LeaveRecursiveCall();
20539  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20540  PyErr_SetString(
20541  PyExc_SystemError,
20542  "NULL result without error in PyObject_Call");
20543  }
20544  return result;
20545 }
20546 #endif
20547 
20548 /* PyObjectCallOneArg */
20549 #if CYTHON_COMPILING_IN_CPYTHON
20550 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20551  PyObject *result;
20552  PyObject *args = PyTuple_New(1);
20553  if (unlikely(!args)) return NULL;
20554  Py_INCREF(arg);
20555  PyTuple_SET_ITEM(args, 0, arg);
20556  result = __Pyx_PyObject_Call(func, args, NULL);
20557  Py_DECREF(args);
20558  return result;
20559 }
20560 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20561 #if CYTHON_FAST_PYCALL
20562  if (PyFunction_Check(func)) {
20563  return __Pyx_PyFunction_FastCall(func, &arg, 1);
20564  }
20565 #endif
20566  if (likely(PyCFunction_Check(func))) {
20567  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
20568  return __Pyx_PyObject_CallMethO(func, arg);
20569 #if CYTHON_FAST_PYCCALL
20570  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
20571  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
20572 #endif
20573  }
20574  }
20575  return __Pyx__PyObject_CallOneArg(func, arg);
20576 }
20577 #else
20578 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20579  PyObject *result;
20580  PyObject *args = PyTuple_Pack(1, arg);
20581  if (unlikely(!args)) return NULL;
20582  result = __Pyx_PyObject_Call(func, args, NULL);
20583  Py_DECREF(args);
20584  return result;
20585 }
20586 #endif
20587 
20588 /* PyErrFetchRestore */
20589 #if CYTHON_FAST_THREAD_STATE
20590 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20591  PyObject *tmp_type, *tmp_value, *tmp_tb;
20592  tmp_type = tstate->curexc_type;
20593  tmp_value = tstate->curexc_value;
20594  tmp_tb = tstate->curexc_traceback;
20595  tstate->curexc_type = type;
20596  tstate->curexc_value = value;
20597  tstate->curexc_traceback = tb;
20598  Py_XDECREF(tmp_type);
20599  Py_XDECREF(tmp_value);
20600  Py_XDECREF(tmp_tb);
20601 }
20602 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20603  *type = tstate->curexc_type;
20604  *value = tstate->curexc_value;
20605  *tb = tstate->curexc_traceback;
20606  tstate->curexc_type = 0;
20607  tstate->curexc_value = 0;
20608  tstate->curexc_traceback = 0;
20609 }
20610 #endif
20611 
20612 /* WriteUnraisableException */
20613 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
20614  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
20615  int full_traceback, CYTHON_UNUSED int nogil) {
20616  PyObject *old_exc, *old_val, *old_tb;
20617  PyObject *ctx;
20618  __Pyx_PyThreadState_declare
20619 #ifdef WITH_THREAD
20620  PyGILState_STATE state;
20621  if (nogil)
20622  state = PyGILState_Ensure();
20623 #ifdef _MSC_VER
20624  else state = (PyGILState_STATE)-1;
20625 #endif
20626 #endif
20627  __Pyx_PyThreadState_assign
20628  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20629  if (full_traceback) {
20630  Py_XINCREF(old_exc);
20631  Py_XINCREF(old_val);
20632  Py_XINCREF(old_tb);
20633  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20634  PyErr_PrintEx(1);
20635  }
20636  #if PY_MAJOR_VERSION < 3
20637  ctx = PyString_FromString(name);
20638  #else
20639  ctx = PyUnicode_FromString(name);
20640  #endif
20641  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20642  if (!ctx) {
20643  PyErr_WriteUnraisable(Py_None);
20644  } else {
20645  PyErr_WriteUnraisable(ctx);
20646  Py_DECREF(ctx);
20647  }
20648 #ifdef WITH_THREAD
20649  if (nogil)
20650  PyGILState_Release(state);
20651 #endif
20652 }
20653 
20654 /* PyDictVersioning */
20655 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
20656 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
20657  PyObject *dict = Py_TYPE(obj)->tp_dict;
20658  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
20659 }
20660 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
20661  PyObject **dictptr = NULL;
20662  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
20663  if (offset) {
20664 #if CYTHON_COMPILING_IN_CPYTHON
20665  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
20666 #else
20667  dictptr = _PyObject_GetDictPtr(obj);
20668 #endif
20669  }
20670  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
20671 }
20672 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
20673  PyObject *dict = Py_TYPE(obj)->tp_dict;
20674  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
20675  return 0;
20676  return obj_dict_version == __Pyx_get_object_dict_version(obj);
20677 }
20678 #endif
20679 
20680 /* PyObjectCallNoArg */
20681 #if CYTHON_COMPILING_IN_CPYTHON
20682 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
20683 #if CYTHON_FAST_PYCALL
20684  if (PyFunction_Check(func)) {
20685  return __Pyx_PyFunction_FastCall(func, NULL, 0);
20686  }
20687 #endif
20688 #ifdef __Pyx_CyFunction_USED
20689  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
20690 #else
20691  if (likely(PyCFunction_Check(func)))
20692 #endif
20693  {
20694  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
20695  return __Pyx_PyObject_CallMethO(func, NULL);
20696  }
20697  }
20698  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
20699 }
20700 #endif
20701 
20702 /* RaiseDoubleKeywords */
20703 static void __Pyx_RaiseDoubleKeywordsError(
20704  const char* func_name,
20705  PyObject* kw_name)
20706 {
20707  PyErr_Format(PyExc_TypeError,
20708  #if PY_MAJOR_VERSION >= 3
20709  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
20710  #else
20711  "%s() got multiple values for keyword argument '%s'", func_name,
20712  PyString_AsString(kw_name));
20713  #endif
20714 }
20715 
20716 /* ParseKeywords */
20717 static int __Pyx_ParseOptionalKeywords(
20718  PyObject *kwds,
20719  PyObject **argnames[],
20720  PyObject *kwds2,
20721  PyObject *values[],
20722  Py_ssize_t num_pos_args,
20723  const char* function_name)
20724 {
20725  PyObject *key = 0, *value = 0;
20726  Py_ssize_t pos = 0;
20727  PyObject*** name;
20728  PyObject*** first_kw_arg = argnames + num_pos_args;
20729  while (PyDict_Next(kwds, &pos, &key, &value)) {
20730  name = first_kw_arg;
20731  while (*name && (**name != key)) name++;
20732  if (*name) {
20733  values[name-argnames] = value;
20734  continue;
20735  }
20736  name = first_kw_arg;
20737  #if PY_MAJOR_VERSION < 3
20738  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
20739  while (*name) {
20740  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
20741  && _PyString_Eq(**name, key)) {
20742  values[name-argnames] = value;
20743  break;
20744  }
20745  name++;
20746  }
20747  if (*name) continue;
20748  else {
20749  PyObject*** argname = argnames;
20750  while (argname != first_kw_arg) {
20751  if ((**argname == key) || (
20752  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
20753  && _PyString_Eq(**argname, key))) {
20754  goto arg_passed_twice;
20755  }
20756  argname++;
20757  }
20758  }
20759  } else
20760  #endif
20761  if (likely(PyUnicode_Check(key))) {
20762  while (*name) {
20763  int cmp = (**name == key) ? 0 :
20764  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20765  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
20766  #endif
20767  PyUnicode_Compare(**name, key);
20768  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20769  if (cmp == 0) {
20770  values[name-argnames] = value;
20771  break;
20772  }
20773  name++;
20774  }
20775  if (*name) continue;
20776  else {
20777  PyObject*** argname = argnames;
20778  while (argname != first_kw_arg) {
20779  int cmp = (**argname == key) ? 0 :
20780  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20781  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
20782  #endif
20783  PyUnicode_Compare(**argname, key);
20784  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20785  if (cmp == 0) goto arg_passed_twice;
20786  argname++;
20787  }
20788  }
20789  } else
20790  goto invalid_keyword_type;
20791  if (kwds2) {
20792  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
20793  } else {
20794  goto invalid_keyword;
20795  }
20796  }
20797  return 0;
20798 arg_passed_twice:
20799  __Pyx_RaiseDoubleKeywordsError(function_name, key);
20800  goto bad;
20801 invalid_keyword_type:
20802  PyErr_Format(PyExc_TypeError,
20803  "%.200s() keywords must be strings", function_name);
20804  goto bad;
20805 invalid_keyword:
20806  PyErr_Format(PyExc_TypeError,
20807  #if PY_MAJOR_VERSION < 3
20808  "%.200s() got an unexpected keyword argument '%.200s'",
20809  function_name, PyString_AsString(key));
20810  #else
20811  "%s() got an unexpected keyword argument '%U'",
20812  function_name, key);
20813  #endif
20814 bad:
20815  return -1;
20816 }
20817 
20818 /* RaiseArgTupleInvalid */
20819 static void __Pyx_RaiseArgtupleInvalid(
20820  const char* func_name,
20821  int exact,
20822  Py_ssize_t num_min,
20823  Py_ssize_t num_max,
20824  Py_ssize_t num_found)
20825 {
20826  Py_ssize_t num_expected;
20827  const char *more_or_less;
20828  if (num_found < num_min) {
20829  num_expected = num_min;
20830  more_or_less = "at least";
20831  } else {
20832  num_expected = num_max;
20833  more_or_less = "at most";
20834  }
20835  if (exact) {
20836  more_or_less = "exactly";
20837  }
20838  PyErr_Format(PyExc_TypeError,
20839  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
20840  func_name, more_or_less, num_expected,
20841  (num_expected == 1) ? "" : "s", num_found);
20842 }
20843 
20844 /* GetModuleGlobalName */
20845 #if CYTHON_USE_DICT_VERSIONS
20846 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
20847 #else
20848 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
20849 #endif
20850 {
20851  PyObject *result;
20852 #if !CYTHON_AVOID_BORROWED_REFS
20853 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
20854  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
20855  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20856  if (likely(result)) {
20857  return __Pyx_NewRef(result);
20858  } else if (unlikely(PyErr_Occurred())) {
20859  return NULL;
20860  }
20861 #else
20862  result = PyDict_GetItem(__pyx_d, name);
20863  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20864  if (likely(result)) {
20865  return __Pyx_NewRef(result);
20866  }
20867 #endif
20868 #else
20869  result = PyObject_GetItem(__pyx_d, name);
20870  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20871  if (likely(result)) {
20872  return __Pyx_NewRef(result);
20873  }
20874  PyErr_Clear();
20875 #endif
20876  return __Pyx_GetBuiltinName(name);
20877 }
20878 
20879 /* GetTopmostException */
20880 #if CYTHON_USE_EXC_INFO_STACK
20881 static _PyErr_StackItem *
20882 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
20883 {
20884  _PyErr_StackItem *exc_info = tstate->exc_info;
20885  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
20886  exc_info->previous_item != NULL)
20887  {
20888  exc_info = exc_info->previous_item;
20889  }
20890  return exc_info;
20891 }
20892 #endif
20893 
20894 /* SaveResetException */
20895 #if CYTHON_FAST_THREAD_STATE
20896 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20897  #if CYTHON_USE_EXC_INFO_STACK
20898  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
20899  *type = exc_info->exc_type;
20900  *value = exc_info->exc_value;
20901  *tb = exc_info->exc_traceback;
20902  #else
20903  *type = tstate->exc_type;
20904  *value = tstate->exc_value;
20905  *tb = tstate->exc_traceback;
20906  #endif
20907  Py_XINCREF(*type);
20908  Py_XINCREF(*value);
20909  Py_XINCREF(*tb);
20910 }
20911 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20912  PyObject *tmp_type, *tmp_value, *tmp_tb;
20913  #if CYTHON_USE_EXC_INFO_STACK
20914  _PyErr_StackItem *exc_info = tstate->exc_info;
20915  tmp_type = exc_info->exc_type;
20916  tmp_value = exc_info->exc_value;
20917  tmp_tb = exc_info->exc_traceback;
20918  exc_info->exc_type = type;
20919  exc_info->exc_value = value;
20920  exc_info->exc_traceback = tb;
20921  #else
20922  tmp_type = tstate->exc_type;
20923  tmp_value = tstate->exc_value;
20924  tmp_tb = tstate->exc_traceback;
20925  tstate->exc_type = type;
20926  tstate->exc_value = value;
20927  tstate->exc_traceback = tb;
20928  #endif
20929  Py_XDECREF(tmp_type);
20930  Py_XDECREF(tmp_value);
20931  Py_XDECREF(tmp_tb);
20932 }
20933 #endif
20934 
20935 /* PyErrExceptionMatches */
20936 #if CYTHON_FAST_THREAD_STATE
20937 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
20938  Py_ssize_t i, n;
20939  n = PyTuple_GET_SIZE(tuple);
20940 #if PY_MAJOR_VERSION >= 3
20941  for (i=0; i<n; i++) {
20942  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
20943  }
20944 #endif
20945  for (i=0; i<n; i++) {
20946  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
20947  }
20948  return 0;
20949 }
20950 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
20951  PyObject *exc_type = tstate->curexc_type;
20952  if (exc_type == err) return 1;
20953  if (unlikely(!exc_type)) return 0;
20954  if (unlikely(PyTuple_Check(err)))
20955  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
20956  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
20957 }
20958 #endif
20959 
20960 /* GetException */
20961 #if CYTHON_FAST_THREAD_STATE
20962 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
20963 #else
20964 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
20965 #endif
20966 {
20967  PyObject *local_type, *local_value, *local_tb;
20968 #if CYTHON_FAST_THREAD_STATE
20969  PyObject *tmp_type, *tmp_value, *tmp_tb;
20970  local_type = tstate->curexc_type;
20971  local_value = tstate->curexc_value;
20972  local_tb = tstate->curexc_traceback;
20973  tstate->curexc_type = 0;
20974  tstate->curexc_value = 0;
20975  tstate->curexc_traceback = 0;
20976 #else
20977  PyErr_Fetch(&local_type, &local_value, &local_tb);
20978 #endif
20979  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
20980 #if CYTHON_FAST_THREAD_STATE
20981  if (unlikely(tstate->curexc_type))
20982 #else
20983  if (unlikely(PyErr_Occurred()))
20984 #endif
20985  goto bad;
20986  #if PY_MAJOR_VERSION >= 3
20987  if (local_tb) {
20988  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
20989  goto bad;
20990  }
20991  #endif
20992  Py_XINCREF(local_tb);
20993  Py_XINCREF(local_type);
20994  Py_XINCREF(local_value);
20995  *type = local_type;
20996  *value = local_value;
20997  *tb = local_tb;
20998 #if CYTHON_FAST_THREAD_STATE
20999  #if CYTHON_USE_EXC_INFO_STACK
21000  {
21001  _PyErr_StackItem *exc_info = tstate->exc_info;
21002  tmp_type = exc_info->exc_type;
21003  tmp_value = exc_info->exc_value;
21004  tmp_tb = exc_info->exc_traceback;
21005  exc_info->exc_type = local_type;
21006  exc_info->exc_value = local_value;
21007  exc_info->exc_traceback = local_tb;
21008  }
21009  #else
21010  tmp_type = tstate->exc_type;
21011  tmp_value = tstate->exc_value;
21012  tmp_tb = tstate->exc_traceback;
21013  tstate->exc_type = local_type;
21014  tstate->exc_value = local_value;
21015  tstate->exc_traceback = local_tb;
21016  #endif
21017  Py_XDECREF(tmp_type);
21018  Py_XDECREF(tmp_value);
21019  Py_XDECREF(tmp_tb);
21020 #else
21021  PyErr_SetExcInfo(local_type, local_value, local_tb);
21022 #endif
21023  return 0;
21024 bad:
21025  *type = 0;
21026  *value = 0;
21027  *tb = 0;
21028  Py_XDECREF(local_type);
21029  Py_XDECREF(local_value);
21030  Py_XDECREF(local_tb);
21031  return -1;
21032 }
21033 
21034 /* RaiseException */
21035 #if PY_MAJOR_VERSION < 3
21036 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21037  CYTHON_UNUSED PyObject *cause) {
21038  __Pyx_PyThreadState_declare
21039  Py_XINCREF(type);
21040  if (!value || value == Py_None)
21041  value = NULL;
21042  else
21043  Py_INCREF(value);
21044  if (!tb || tb == Py_None)
21045  tb = NULL;
21046  else {
21047  Py_INCREF(tb);
21048  if (!PyTraceBack_Check(tb)) {
21049  PyErr_SetString(PyExc_TypeError,
21050  "raise: arg 3 must be a traceback or None");
21051  goto raise_error;
21052  }
21053  }
21054  if (PyType_Check(type)) {
21055 #if CYTHON_COMPILING_IN_PYPY
21056  if (!value) {
21057  Py_INCREF(Py_None);
21058  value = Py_None;
21059  }
21060 #endif
21061  PyErr_NormalizeException(&type, &value, &tb);
21062  } else {
21063  if (value) {
21064  PyErr_SetString(PyExc_TypeError,
21065  "instance exception may not have a separate value");
21066  goto raise_error;
21067  }
21068  value = type;
21069  type = (PyObject*) Py_TYPE(type);
21070  Py_INCREF(type);
21071  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21072  PyErr_SetString(PyExc_TypeError,
21073  "raise: exception class must be a subclass of BaseException");
21074  goto raise_error;
21075  }
21076  }
21077  __Pyx_PyThreadState_assign
21078  __Pyx_ErrRestore(type, value, tb);
21079  return;
21080 raise_error:
21081  Py_XDECREF(value);
21082  Py_XDECREF(type);
21083  Py_XDECREF(tb);
21084  return;
21085 }
21086 #else
21087 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21088  PyObject* owned_instance = NULL;
21089  if (tb == Py_None) {
21090  tb = 0;
21091  } else if (tb && !PyTraceBack_Check(tb)) {
21092  PyErr_SetString(PyExc_TypeError,
21093  "raise: arg 3 must be a traceback or None");
21094  goto bad;
21095  }
21096  if (value == Py_None)
21097  value = 0;
21098  if (PyExceptionInstance_Check(type)) {
21099  if (value) {
21100  PyErr_SetString(PyExc_TypeError,
21101  "instance exception may not have a separate value");
21102  goto bad;
21103  }
21104  value = type;
21105  type = (PyObject*) Py_TYPE(value);
21106  } else if (PyExceptionClass_Check(type)) {
21107  PyObject *instance_class = NULL;
21108  if (value && PyExceptionInstance_Check(value)) {
21109  instance_class = (PyObject*) Py_TYPE(value);
21110  if (instance_class != type) {
21111  int is_subclass = PyObject_IsSubclass(instance_class, type);
21112  if (!is_subclass) {
21113  instance_class = NULL;
21114  } else if (unlikely(is_subclass == -1)) {
21115  goto bad;
21116  } else {
21117  type = instance_class;
21118  }
21119  }
21120  }
21121  if (!instance_class) {
21122  PyObject *args;
21123  if (!value)
21124  args = PyTuple_New(0);
21125  else if (PyTuple_Check(value)) {
21126  Py_INCREF(value);
21127  args = value;
21128  } else
21129  args = PyTuple_Pack(1, value);
21130  if (!args)
21131  goto bad;
21132  owned_instance = PyObject_Call(type, args, NULL);
21133  Py_DECREF(args);
21134  if (!owned_instance)
21135  goto bad;
21136  value = owned_instance;
21137  if (!PyExceptionInstance_Check(value)) {
21138  PyErr_Format(PyExc_TypeError,
21139  "calling %R should have returned an instance of "
21140  "BaseException, not %R",
21141  type, Py_TYPE(value));
21142  goto bad;
21143  }
21144  }
21145  } else {
21146  PyErr_SetString(PyExc_TypeError,
21147  "raise: exception class must be a subclass of BaseException");
21148  goto bad;
21149  }
21150  if (cause) {
21151  PyObject *fixed_cause;
21152  if (cause == Py_None) {
21153  fixed_cause = NULL;
21154  } else if (PyExceptionClass_Check(cause)) {
21155  fixed_cause = PyObject_CallObject(cause, NULL);
21156  if (fixed_cause == NULL)
21157  goto bad;
21158  } else if (PyExceptionInstance_Check(cause)) {
21159  fixed_cause = cause;
21160  Py_INCREF(fixed_cause);
21161  } else {
21162  PyErr_SetString(PyExc_TypeError,
21163  "exception causes must derive from "
21164  "BaseException");
21165  goto bad;
21166  }
21167  PyException_SetCause(value, fixed_cause);
21168  }
21169  PyErr_SetObject(type, value);
21170  if (tb) {
21171 #if CYTHON_COMPILING_IN_PYPY
21172  PyObject *tmp_type, *tmp_value, *tmp_tb;
21173  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21174  Py_INCREF(tb);
21175  PyErr_Restore(tmp_type, tmp_value, tb);
21176  Py_XDECREF(tmp_tb);
21177 #else
21178  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21179  PyObject* tmp_tb = tstate->curexc_traceback;
21180  if (tb != tmp_tb) {
21181  Py_INCREF(tb);
21182  tstate->curexc_traceback = tb;
21183  Py_XDECREF(tmp_tb);
21184  }
21185 #endif
21186  }
21187 bad:
21188  Py_XDECREF(owned_instance);
21189  return;
21190 }
21191 #endif
21192 
21193 /* PyIntBinop */
21194 #if !CYTHON_COMPILING_IN_PYPY
21195 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
21196  (void)inplace;
21197  (void)zerodivision_check;
21198  #if PY_MAJOR_VERSION < 3
21199  if (likely(PyInt_CheckExact(op1))) {
21200  const long b = intval;
21201  long x;
21202  long a = PyInt_AS_LONG(op1);
21203  x = (long)((unsigned long)a + b);
21204  if (likely((x^a) >= 0 || (x^b) >= 0))
21205  return PyInt_FromLong(x);
21206  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21207  }
21208  #endif
21209  #if CYTHON_USE_PYLONG_INTERNALS
21210  if (likely(PyLong_CheckExact(op1))) {
21211  const long b = intval;
21212  long a, x;
21213 #ifdef HAVE_LONG_LONG
21214  const PY_LONG_LONG llb = intval;
21215  PY_LONG_LONG lla, llx;
21216 #endif
21217  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21218  const Py_ssize_t size = Py_SIZE(op1);
21219  if (likely(__Pyx_sst_abs(size) <= 1)) {
21220  a = likely(size) ? digits[0] : 0;
21221  if (size == -1) a = -a;
21222  } else {
21223  switch (size) {
21224  case -2:
21225  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21226  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21227  break;
21228 #ifdef HAVE_LONG_LONG
21229  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21230  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21231  goto long_long;
21232 #endif
21233  }
21234  CYTHON_FALLTHROUGH;
21235  case 2:
21236  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21237  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21238  break;
21239 #ifdef HAVE_LONG_LONG
21240  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21241  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21242  goto long_long;
21243 #endif
21244  }
21245  CYTHON_FALLTHROUGH;
21246  case -3:
21247  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21248  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21249  break;
21250 #ifdef HAVE_LONG_LONG
21251  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21252  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]));
21253  goto long_long;
21254 #endif
21255  }
21256  CYTHON_FALLTHROUGH;
21257  case 3:
21258  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21259  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21260  break;
21261 #ifdef HAVE_LONG_LONG
21262  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21263  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]));
21264  goto long_long;
21265 #endif
21266  }
21267  CYTHON_FALLTHROUGH;
21268  case -4:
21269  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21270  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21271  break;
21272 #ifdef HAVE_LONG_LONG
21273  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21274  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]));
21275  goto long_long;
21276 #endif
21277  }
21278  CYTHON_FALLTHROUGH;
21279  case 4:
21280  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21281  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21282  break;
21283 #ifdef HAVE_LONG_LONG
21284  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21285  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]));
21286  goto long_long;
21287 #endif
21288  }
21289  CYTHON_FALLTHROUGH;
21290  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21291  }
21292  }
21293  x = a + b;
21294  return PyLong_FromLong(x);
21295 #ifdef HAVE_LONG_LONG
21296  long_long:
21297  llx = lla + llb;
21298  return PyLong_FromLongLong(llx);
21299 #endif
21300 
21301 
21302  }
21303  #endif
21304  if (PyFloat_CheckExact(op1)) {
21305  const long b = intval;
21306  double a = PyFloat_AS_DOUBLE(op1);
21307  double result;
21308  PyFPE_START_PROTECT("add", return NULL)
21309  result = ((double)a) + (double)b;
21310  PyFPE_END_PROTECT(result)
21311  return PyFloat_FromDouble(result);
21312  }
21313  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21314 }
21315 #endif
21316 
21317 /* SetItemInt */
21318 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21319  int r;
21320  if (!j) return -1;
21321  r = PyObject_SetItem(o, j, v);
21322  Py_DECREF(j);
21323  return r;
21324 }
21325 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21326  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21327 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21328  if (is_list || PyList_CheckExact(o)) {
21329  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21330  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
21331  PyObject* old = PyList_GET_ITEM(o, n);
21332  Py_INCREF(v);
21333  PyList_SET_ITEM(o, n, v);
21334  Py_DECREF(old);
21335  return 1;
21336  }
21337  } else {
21338  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21339  if (likely(m && m->sq_ass_item)) {
21340  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21341  Py_ssize_t l = m->sq_length(o);
21342  if (likely(l >= 0)) {
21343  i += l;
21344  } else {
21345  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21346  return -1;
21347  PyErr_Clear();
21348  }
21349  }
21350  return m->sq_ass_item(o, i, v);
21351  }
21352  }
21353 #else
21354 #if CYTHON_COMPILING_IN_PYPY
21355  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
21356 #else
21357  if (is_list || PySequence_Check(o))
21358 #endif
21359  {
21360  return PySequence_SetItem(o, i, v);
21361  }
21362 #endif
21363  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21364 }
21365 
21366 /* PyObjectCall2Args */
21367 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
21368  PyObject *args, *result = NULL;
21369  #if CYTHON_FAST_PYCALL
21370  if (PyFunction_Check(function)) {
21371  PyObject *args[2] = {arg1, arg2};
21372  return __Pyx_PyFunction_FastCall(function, args, 2);
21373  }
21374  #endif
21375  #if CYTHON_FAST_PYCCALL
21376  if (__Pyx_PyFastCFunction_Check(function)) {
21377  PyObject *args[2] = {arg1, arg2};
21378  return __Pyx_PyCFunction_FastCall(function, args, 2);
21379  }
21380  #endif
21381  args = PyTuple_New(2);
21382  if (unlikely(!args)) goto done;
21383  Py_INCREF(arg1);
21384  PyTuple_SET_ITEM(args, 0, arg1);
21385  Py_INCREF(arg2);
21386  PyTuple_SET_ITEM(args, 1, arg2);
21387  Py_INCREF(function);
21388  result = __Pyx_PyObject_Call(function, args, NULL);
21389  Py_DECREF(args);
21390  Py_DECREF(function);
21391 done:
21392  return result;
21393 }
21394 
21395 /* ArgTypeTest */
21396 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21397 {
21398  if (unlikely(!type)) {
21399  PyErr_SetString(PyExc_SystemError, "Missing type object");
21400  return 0;
21401  }
21402  else if (exact) {
21403  #if PY_MAJOR_VERSION == 2
21404  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21405  #endif
21406  }
21407  else {
21408  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21409  }
21410  PyErr_Format(PyExc_TypeError,
21411  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21412  name, type->tp_name, Py_TYPE(obj)->tp_name);
21413  return 0;
21414 }
21415 
21416 /* Import */
21417 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21418  PyObject *empty_list = 0;
21419  PyObject *module = 0;
21420  PyObject *global_dict = 0;
21421  PyObject *empty_dict = 0;
21422  PyObject *list;
21423  #if PY_MAJOR_VERSION < 3
21424  PyObject *py_import;
21425  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21426  if (!py_import)
21427  goto bad;
21428  #endif
21429  if (from_list)
21430  list = from_list;
21431  else {
21432  empty_list = PyList_New(0);
21433  if (!empty_list)
21434  goto bad;
21435  list = empty_list;
21436  }
21437  global_dict = PyModule_GetDict(__pyx_m);
21438  if (!global_dict)
21439  goto bad;
21440  empty_dict = PyDict_New();
21441  if (!empty_dict)
21442  goto bad;
21443  {
21444  #if PY_MAJOR_VERSION >= 3
21445  if (level == -1) {
21446  if (strchr(__Pyx_MODULE_NAME, '.')) {
21447  module = PyImport_ImportModuleLevelObject(
21448  name, global_dict, empty_dict, list, 1);
21449  if (!module) {
21450  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21451  goto bad;
21452  PyErr_Clear();
21453  }
21454  }
21455  level = 0;
21456  }
21457  #endif
21458  if (!module) {
21459  #if PY_MAJOR_VERSION < 3
21460  PyObject *py_level = PyInt_FromLong(level);
21461  if (!py_level)
21462  goto bad;
21463  module = PyObject_CallFunctionObjArgs(py_import,
21464  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
21465  Py_DECREF(py_level);
21466  #else
21467  module = PyImport_ImportModuleLevelObject(
21468  name, global_dict, empty_dict, list, level);
21469  #endif
21470  }
21471  }
21472 bad:
21473  #if PY_MAJOR_VERSION < 3
21474  Py_XDECREF(py_import);
21475  #endif
21476  Py_XDECREF(empty_list);
21477  Py_XDECREF(empty_dict);
21478  return module;
21479 }
21480 
21481 /* PyObject_GenericGetAttrNoDict */
21482 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21483 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
21484  PyErr_Format(PyExc_AttributeError,
21485 #if PY_MAJOR_VERSION >= 3
21486  "'%.50s' object has no attribute '%U'",
21487  tp->tp_name, attr_name);
21488 #else
21489  "'%.50s' object has no attribute '%.400s'",
21490  tp->tp_name, PyString_AS_STRING(attr_name));
21491 #endif
21492  return NULL;
21493 }
21494 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
21495  PyObject *descr;
21496  PyTypeObject *tp = Py_TYPE(obj);
21497  if (unlikely(!PyString_Check(attr_name))) {
21498  return PyObject_GenericGetAttr(obj, attr_name);
21499  }
21500  assert(!tp->tp_dictoffset);
21501  descr = _PyType_Lookup(tp, attr_name);
21502  if (unlikely(!descr)) {
21503  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
21504  }
21505  Py_INCREF(descr);
21506  #if PY_MAJOR_VERSION < 3
21507  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
21508  #endif
21509  {
21510  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
21511  if (unlikely(f)) {
21512  PyObject *res = f(descr, obj, (PyObject *)tp);
21513  Py_DECREF(descr);
21514  return res;
21515  }
21516  }
21517  return descr;
21518 }
21519 #endif
21520 
21521 /* PyObject_GenericGetAttr */
21522 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21523 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
21524  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
21525  return PyObject_GenericGetAttr(obj, attr_name);
21526  }
21527  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
21528 }
21529 #endif
21530 
21531 /* SetVTable */
21532 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21533 #if PY_VERSION_HEX >= 0x02070000
21534  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21535 #else
21536  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21537 #endif
21538  if (!ob)
21539  goto bad;
21540  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21541  goto bad;
21542  Py_DECREF(ob);
21543  return 0;
21544 bad:
21545  Py_XDECREF(ob);
21546  return -1;
21547 }
21548 
21549 /* SetupReduce */
21550 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21551  int ret;
21552  PyObject *name_attr;
21553  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21554  if (likely(name_attr)) {
21555  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21556  } else {
21557  ret = -1;
21558  }
21559  if (unlikely(ret < 0)) {
21560  PyErr_Clear();
21561  ret = 0;
21562  }
21563  Py_XDECREF(name_attr);
21564  return ret;
21565 }
21566 static int __Pyx_setup_reduce(PyObject* type_obj) {
21567  int ret = 0;
21568  PyObject *object_reduce = NULL;
21569  PyObject *object_reduce_ex = NULL;
21570  PyObject *reduce = NULL;
21571  PyObject *reduce_ex = NULL;
21572  PyObject *reduce_cython = NULL;
21573  PyObject *setstate = NULL;
21574  PyObject *setstate_cython = NULL;
21575 #if CYTHON_USE_PYTYPE_LOOKUP
21576  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21577 #else
21578  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21579 #endif
21580 #if CYTHON_USE_PYTYPE_LOOKUP
21581  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21582 #else
21583  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21584 #endif
21585  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
21586  if (reduce_ex == object_reduce_ex) {
21587 #if CYTHON_USE_PYTYPE_LOOKUP
21588  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21589 #else
21590  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21591 #endif
21592  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
21593  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
21594  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
21595  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
21596  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
21597  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
21598  if (!setstate) PyErr_Clear();
21599  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
21600  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
21601  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
21602  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
21603  }
21604  PyType_Modified((PyTypeObject*)type_obj);
21605  }
21606  }
21607  goto GOOD;
21608 BAD:
21609  if (!PyErr_Occurred())
21610  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
21611  ret = -1;
21612 GOOD:
21613 #if !CYTHON_USE_PYTYPE_LOOKUP
21614  Py_XDECREF(object_reduce);
21615  Py_XDECREF(object_reduce_ex);
21616 #endif
21617  Py_XDECREF(reduce);
21618  Py_XDECREF(reduce_ex);
21619  Py_XDECREF(reduce_cython);
21620  Py_XDECREF(setstate);
21621  Py_XDECREF(setstate_cython);
21622  return ret;
21623 }
21624 
21625 /* PyFloatBinop */
21626 #if !CYTHON_COMPILING_IN_PYPY
21627 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
21628  const double b = floatval;
21629  double a, result;
21630  (void)inplace;
21631  (void)zerodivision_check;
21632  if (likely(PyFloat_CheckExact(op1))) {
21633  a = PyFloat_AS_DOUBLE(op1);
21634 
21635  } else
21636  #if PY_MAJOR_VERSION < 3
21637  if (likely(PyInt_CheckExact(op1))) {
21638  a = (double) PyInt_AS_LONG(op1);
21639 
21640  } else
21641  #endif
21642  if (likely(PyLong_CheckExact(op1))) {
21643  #if CYTHON_USE_PYLONG_INTERNALS
21644  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21645  const Py_ssize_t size = Py_SIZE(op1);
21646  switch (size) {
21647  case 0: a = 0.0; break;
21648  case -1: a = -(double) digits[0]; break;
21649  case 1: a = (double) digits[0]; break;
21650  case -2:
21651  case 2:
21652  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
21653  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21654  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21655  if (size == -2)
21656  a = -a;
21657  break;
21658  }
21659  }
21660  CYTHON_FALLTHROUGH;
21661  case -3:
21662  case 3:
21663  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
21664  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21665  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21666  if (size == -3)
21667  a = -a;
21668  break;
21669  }
21670  }
21671  CYTHON_FALLTHROUGH;
21672  case -4:
21673  case 4:
21674  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
21675  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21676  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21677  if (size == -4)
21678  a = -a;
21679  break;
21680  }
21681  }
21682  CYTHON_FALLTHROUGH;
21683  default:
21684  #else
21685  {
21686  #endif
21687  a = PyLong_AsDouble(op1);
21688  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
21689 
21690  }
21691  } else {
21692  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
21693  }
21694 
21695  PyFPE_START_PROTECT("divide", return NULL)
21696  result = a / b;
21697  PyFPE_END_PROTECT(result)
21698  return PyFloat_FromDouble(result);
21699 }
21700 #endif
21701 
21702 /* BytesEquals */
21703  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
21704 #if CYTHON_COMPILING_IN_PYPY
21705  return PyObject_RichCompareBool(s1, s2, equals);
21706 #else
21707  if (s1 == s2) {
21708  return (equals == Py_EQ);
21709  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
21710  const char *ps1, *ps2;
21711  Py_ssize_t length = PyBytes_GET_SIZE(s1);
21712  if (length != PyBytes_GET_SIZE(s2))
21713  return (equals == Py_NE);
21714  ps1 = PyBytes_AS_STRING(s1);
21715  ps2 = PyBytes_AS_STRING(s2);
21716  if (ps1[0] != ps2[0]) {
21717  return (equals == Py_NE);
21718  } else if (length == 1) {
21719  return (equals == Py_EQ);
21720  } else {
21721  int result;
21722 #if CYTHON_USE_UNICODE_INTERNALS
21723  Py_hash_t hash1, hash2;
21724  hash1 = ((PyBytesObject*)s1)->ob_shash;
21725  hash2 = ((PyBytesObject*)s2)->ob_shash;
21726  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21727  return (equals == Py_NE);
21728  }
21729 #endif
21730  result = memcmp(ps1, ps2, (size_t)length);
21731  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21732  }
21733  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
21734  return (equals == Py_NE);
21735  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
21736  return (equals == Py_NE);
21737  } else {
21738  int result;
21739  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21740  if (!py_result)
21741  return -1;
21742  result = __Pyx_PyObject_IsTrue(py_result);
21743  Py_DECREF(py_result);
21744  return result;
21745  }
21746 #endif
21747 }
21748 
21749 /* UnicodeEquals */
21750  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
21751 #if CYTHON_COMPILING_IN_PYPY
21752  return PyObject_RichCompareBool(s1, s2, equals);
21753 #else
21754 #if PY_MAJOR_VERSION < 3
21755  PyObject* owned_ref = NULL;
21756 #endif
21757  int s1_is_unicode, s2_is_unicode;
21758  if (s1 == s2) {
21759  goto return_eq;
21760  }
21761  s1_is_unicode = PyUnicode_CheckExact(s1);
21762  s2_is_unicode = PyUnicode_CheckExact(s2);
21763 #if PY_MAJOR_VERSION < 3
21764  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
21765  owned_ref = PyUnicode_FromObject(s2);
21766  if (unlikely(!owned_ref))
21767  return -1;
21768  s2 = owned_ref;
21769  s2_is_unicode = 1;
21770  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
21771  owned_ref = PyUnicode_FromObject(s1);
21772  if (unlikely(!owned_ref))
21773  return -1;
21774  s1 = owned_ref;
21775  s1_is_unicode = 1;
21776  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
21777  return __Pyx_PyBytes_Equals(s1, s2, equals);
21778  }
21779 #endif
21780  if (s1_is_unicode & s2_is_unicode) {
21781  Py_ssize_t length;
21782  int kind;
21783  void *data1, *data2;
21784  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
21785  return -1;
21786  length = __Pyx_PyUnicode_GET_LENGTH(s1);
21787  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
21788  goto return_ne;
21789  }
21790 #if CYTHON_USE_UNICODE_INTERNALS
21791  {
21792  Py_hash_t hash1, hash2;
21793  #if CYTHON_PEP393_ENABLED
21794  hash1 = ((PyASCIIObject*)s1)->hash;
21795  hash2 = ((PyASCIIObject*)s2)->hash;
21796  #else
21797  hash1 = ((PyUnicodeObject*)s1)->hash;
21798  hash2 = ((PyUnicodeObject*)s2)->hash;
21799  #endif
21800  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21801  goto return_ne;
21802  }
21803  }
21804 #endif
21805  kind = __Pyx_PyUnicode_KIND(s1);
21806  if (kind != __Pyx_PyUnicode_KIND(s2)) {
21807  goto return_ne;
21808  }
21809  data1 = __Pyx_PyUnicode_DATA(s1);
21810  data2 = __Pyx_PyUnicode_DATA(s2);
21811  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
21812  goto return_ne;
21813  } else if (length == 1) {
21814  goto return_eq;
21815  } else {
21816  int result = memcmp(data1, data2, (size_t)(length * kind));
21817  #if PY_MAJOR_VERSION < 3
21818  Py_XDECREF(owned_ref);
21819  #endif
21820  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21821  }
21822  } else if ((s1 == Py_None) & s2_is_unicode) {
21823  goto return_ne;
21824  } else if ((s2 == Py_None) & s1_is_unicode) {
21825  goto return_ne;
21826  } else {
21827  int result;
21828  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21829  #if PY_MAJOR_VERSION < 3
21830  Py_XDECREF(owned_ref);
21831  #endif
21832  if (!py_result)
21833  return -1;
21834  result = __Pyx_PyObject_IsTrue(py_result);
21835  Py_DECREF(py_result);
21836  return result;
21837  }
21838 return_eq:
21839  #if PY_MAJOR_VERSION < 3
21840  Py_XDECREF(owned_ref);
21841  #endif
21842  return (equals == Py_EQ);
21843 return_ne:
21844  #if PY_MAJOR_VERSION < 3
21845  Py_XDECREF(owned_ref);
21846  #endif
21847  return (equals == Py_NE);
21848 #endif
21849 }
21850 
21851 /* CLineInTraceback */
21852  #ifndef CYTHON_CLINE_IN_TRACEBACK
21853 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
21854  PyObject *use_cline;
21855  PyObject *ptype, *pvalue, *ptraceback;
21856 #if CYTHON_COMPILING_IN_CPYTHON
21857  PyObject **cython_runtime_dict;
21858 #endif
21859  if (unlikely(!__pyx_cython_runtime)) {
21860  return c_line;
21861  }
21862  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
21863 #if CYTHON_COMPILING_IN_CPYTHON
21864  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
21865  if (likely(cython_runtime_dict)) {
21866  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
21867  use_cline, *cython_runtime_dict,
21868  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
21869  } else
21870 #endif
21871  {
21872  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
21873  if (use_cline_obj) {
21874  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
21875  Py_DECREF(use_cline_obj);
21876  } else {
21877  PyErr_Clear();
21878  use_cline = NULL;
21879  }
21880  }
21881  if (!use_cline) {
21882  c_line = 0;
21883  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
21884  }
21885  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
21886  c_line = 0;
21887  }
21888  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
21889  return c_line;
21890 }
21891 #endif
21892 
21893 /* CodeObjectCache */
21894  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
21895  int start = 0, mid = 0, end = count - 1;
21896  if (end >= 0 && code_line > entries[end].code_line) {
21897  return count;
21898  }
21899  while (start < end) {
21900  mid = start + (end - start) / 2;
21901  if (code_line < entries[mid].code_line) {
21902  end = mid;
21903  } else if (code_line > entries[mid].code_line) {
21904  start = mid + 1;
21905  } else {
21906  return mid;
21907  }
21908  }
21909  if (code_line <= entries[mid].code_line) {
21910  return mid;
21911  } else {
21912  return mid + 1;
21913  }
21914 }
21915 static PyCodeObject *__pyx_find_code_object(int code_line) {
21916  PyCodeObject* code_object;
21917  int pos;
21918  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
21919  return NULL;
21920  }
21921  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21922  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
21923  return NULL;
21924  }
21925  code_object = __pyx_code_cache.entries[pos].code_object;
21926  Py_INCREF(code_object);
21927  return code_object;
21928 }
21929 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
21930  int pos, i;
21931  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
21932  if (unlikely(!code_line)) {
21933  return;
21934  }
21935  if (unlikely(!entries)) {
21936  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
21937  if (likely(entries)) {
21938  __pyx_code_cache.entries = entries;
21939  __pyx_code_cache.max_count = 64;
21940  __pyx_code_cache.count = 1;
21941  entries[0].code_line = code_line;
21942  entries[0].code_object = code_object;
21943  Py_INCREF(code_object);
21944  }
21945  return;
21946  }
21947  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21948  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
21949  PyCodeObject* tmp = entries[pos].code_object;
21950  entries[pos].code_object = code_object;
21951  Py_DECREF(tmp);
21952  return;
21953  }
21954  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
21955  int new_max = __pyx_code_cache.max_count + 64;
21956  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
21957  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
21958  if (unlikely(!entries)) {
21959  return;
21960  }
21961  __pyx_code_cache.entries = entries;
21962  __pyx_code_cache.max_count = new_max;
21963  }
21964  for (i=__pyx_code_cache.count; i>pos; i--) {
21965  entries[i] = entries[i-1];
21966  }
21967  entries[pos].code_line = code_line;
21968  entries[pos].code_object = code_object;
21969  __pyx_code_cache.count++;
21970  Py_INCREF(code_object);
21971 }
21972 
21973 /* AddTraceback */
21974  #include "compile.h"
21975 #include "frameobject.h"
21976 #include "traceback.h"
21977 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
21978  const char *funcname, int c_line,
21979  int py_line, const char *filename) {
21980  PyCodeObject *py_code = 0;
21981  PyObject *py_srcfile = 0;
21982  PyObject *py_funcname = 0;
21983  #if PY_MAJOR_VERSION < 3
21984  py_srcfile = PyString_FromString(filename);
21985  #else
21986  py_srcfile = PyUnicode_FromString(filename);
21987  #endif
21988  if (!py_srcfile) goto bad;
21989  if (c_line) {
21990  #if PY_MAJOR_VERSION < 3
21991  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21992  #else
21993  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21994  #endif
21995  }
21996  else {
21997  #if PY_MAJOR_VERSION < 3
21998  py_funcname = PyString_FromString(funcname);
21999  #else
22000  py_funcname = PyUnicode_FromString(funcname);
22001  #endif
22002  }
22003  if (!py_funcname) goto bad;
22004  py_code = __Pyx_PyCode_New(
22005  0,
22006  0,
22007  0,
22008  0,
22009  0,
22010  __pyx_empty_bytes, /*PyObject *code,*/
22011  __pyx_empty_tuple, /*PyObject *consts,*/
22012  __pyx_empty_tuple, /*PyObject *names,*/
22013  __pyx_empty_tuple, /*PyObject *varnames,*/
22014  __pyx_empty_tuple, /*PyObject *freevars,*/
22015  __pyx_empty_tuple, /*PyObject *cellvars,*/
22016  py_srcfile, /*PyObject *filename,*/
22017  py_funcname, /*PyObject *name,*/
22018  py_line,
22019  __pyx_empty_bytes /*PyObject *lnotab*/
22020  );
22021  Py_DECREF(py_srcfile);
22022  Py_DECREF(py_funcname);
22023  return py_code;
22024 bad:
22025  Py_XDECREF(py_srcfile);
22026  Py_XDECREF(py_funcname);
22027  return NULL;
22028 }
22029 static void __Pyx_AddTraceback(const char *funcname, int c_line,
22030  int py_line, const char *filename) {
22031  PyCodeObject *py_code = 0;
22032  PyFrameObject *py_frame = 0;
22033  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22034  if (c_line) {
22035  c_line = __Pyx_CLineForTraceback(tstate, c_line);
22036  }
22037  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
22038  if (!py_code) {
22039  py_code = __Pyx_CreateCodeObjectForTraceback(
22040  funcname, c_line, py_line, filename);
22041  if (!py_code) goto bad;
22042  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22043  }
22044  py_frame = PyFrame_New(
22045  tstate, /*PyThreadState *tstate,*/
22046  py_code, /*PyCodeObject *code,*/
22047  __pyx_d, /*PyObject *globals,*/
22048  0 /*PyObject *locals*/
22049  );
22050  if (!py_frame) goto bad;
22051  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22052  PyTraceBack_Here(py_frame);
22053 bad:
22054  Py_XDECREF(py_code);
22055  Py_XDECREF(py_frame);
22056 }
22057 
22058 /* CIntFromPyVerify */
22059  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22060  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22061 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22062  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22063 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22064  {\
22065  func_type value = func_value;\
22066  if (sizeof(target_type) < sizeof(func_type)) {\
22067  if (unlikely(value != (func_type) (target_type) value)) {\
22068  func_type zero = 0;\
22069  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22070  return (target_type) -1;\
22071  if (is_unsigned && unlikely(value < zero))\
22072  goto raise_neg_overflow;\
22073  else\
22074  goto raise_overflow;\
22075  }\
22076  }\
22077  return (target_type) value;\
22078  }
22079 
22080 /* CIntToPy */
22081  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22082  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22083  const int is_unsigned = neg_one > const_zero;
22084  if (is_unsigned) {
22085  if (sizeof(int) < sizeof(long)) {
22086  return PyInt_FromLong((long) value);
22087  } else if (sizeof(int) <= sizeof(unsigned long)) {
22088  return PyLong_FromUnsignedLong((unsigned long) value);
22089 #ifdef HAVE_LONG_LONG
22090  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22091  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22092 #endif
22093  }
22094  } else {
22095  if (sizeof(int) <= sizeof(long)) {
22096  return PyInt_FromLong((long) value);
22097 #ifdef HAVE_LONG_LONG
22098  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22099  return PyLong_FromLongLong((PY_LONG_LONG) value);
22100 #endif
22101  }
22102  }
22103  {
22104  int one = 1; int little = (int)*(unsigned char *)&one;
22105  unsigned char *bytes = (unsigned char *)&value;
22106  return _PyLong_FromByteArray(bytes, sizeof(int),
22107  little, !is_unsigned);
22108  }
22109 }
22110 
22111 /* CIntFromPy */
22112  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22113  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22114  const int is_unsigned = neg_one > const_zero;
22115 #if PY_MAJOR_VERSION < 3
22116  if (likely(PyInt_Check(x))) {
22117  if (sizeof(int) < sizeof(long)) {
22118  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22119  } else {
22120  long val = PyInt_AS_LONG(x);
22121  if (is_unsigned && unlikely(val < 0)) {
22122  goto raise_neg_overflow;
22123  }
22124  return (int) val;
22125  }
22126  } else
22127 #endif
22128  if (likely(PyLong_Check(x))) {
22129  if (is_unsigned) {
22130 #if CYTHON_USE_PYLONG_INTERNALS
22131  const digit* digits = ((PyLongObject*)x)->ob_digit;
22132  switch (Py_SIZE(x)) {
22133  case 0: return (int) 0;
22134  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22135  case 2:
22136  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22137  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22138  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22139  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22140  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22141  }
22142  }
22143  break;
22144  case 3:
22145  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22146  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22147  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22148  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22149  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22150  }
22151  }
22152  break;
22153  case 4:
22154  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22155  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22156  __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])))
22157  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22158  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22159  }
22160  }
22161  break;
22162  }
22163 #endif
22164 #if CYTHON_COMPILING_IN_CPYTHON
22165  if (unlikely(Py_SIZE(x) < 0)) {
22166  goto raise_neg_overflow;
22167  }
22168 #else
22169  {
22170  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22171  if (unlikely(result < 0))
22172  return (int) -1;
22173  if (unlikely(result == 1))
22174  goto raise_neg_overflow;
22175  }
22176 #endif
22177  if (sizeof(int) <= sizeof(unsigned long)) {
22178  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22179 #ifdef HAVE_LONG_LONG
22180  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22181  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22182 #endif
22183  }
22184  } else {
22185 #if CYTHON_USE_PYLONG_INTERNALS
22186  const digit* digits = ((PyLongObject*)x)->ob_digit;
22187  switch (Py_SIZE(x)) {
22188  case 0: return (int) 0;
22189  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22190  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22191  case -2:
22192  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22193  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22194  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22195  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22196  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22197  }
22198  }
22199  break;
22200  case 2:
22201  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22202  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22203  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22204  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22205  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22206  }
22207  }
22208  break;
22209  case -3:
22210  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22211  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22212  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22213  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22214  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22215  }
22216  }
22217  break;
22218  case 3:
22219  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22220  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22221  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22222  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22223  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22224  }
22225  }
22226  break;
22227  case -4:
22228  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22229  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22230  __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])))
22231  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22232  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22233  }
22234  }
22235  break;
22236  case 4:
22237  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22238  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22239  __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])))
22240  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22241  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22242  }
22243  }
22244  break;
22245  }
22246 #endif
22247  if (sizeof(int) <= sizeof(long)) {
22248  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22249 #ifdef HAVE_LONG_LONG
22250  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22251  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22252 #endif
22253  }
22254  }
22255  {
22256 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22257  PyErr_SetString(PyExc_RuntimeError,
22258  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22259 #else
22260  int val;
22261  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22262  #if PY_MAJOR_VERSION < 3
22263  if (likely(v) && !PyLong_Check(v)) {
22264  PyObject *tmp = v;
22265  v = PyNumber_Long(tmp);
22266  Py_DECREF(tmp);
22267  }
22268  #endif
22269  if (likely(v)) {
22270  int one = 1; int is_little = (int)*(unsigned char *)&one;
22271  unsigned char *bytes = (unsigned char *)&val;
22272  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22273  bytes, sizeof(val),
22274  is_little, !is_unsigned);
22275  Py_DECREF(v);
22276  if (likely(!ret))
22277  return val;
22278  }
22279 #endif
22280  return (int) -1;
22281  }
22282  } else {
22283  int val;
22284  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22285  if (!tmp) return (int) -1;
22286  val = __Pyx_PyInt_As_int(tmp);
22287  Py_DECREF(tmp);
22288  return val;
22289  }
22290 raise_overflow:
22291  PyErr_SetString(PyExc_OverflowError,
22292  "value too large to convert to int");
22293  return (int) -1;
22294 raise_neg_overflow:
22295  PyErr_SetString(PyExc_OverflowError,
22296  "can't convert negative value to int");
22297  return (int) -1;
22298 }
22299 
22300 /* CIntToPy */
22301  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22302  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22303  const int is_unsigned = neg_one > const_zero;
22304  if (is_unsigned) {
22305  if (sizeof(long) < sizeof(long)) {
22306  return PyInt_FromLong((long) value);
22307  } else if (sizeof(long) <= sizeof(unsigned long)) {
22308  return PyLong_FromUnsignedLong((unsigned long) value);
22309 #ifdef HAVE_LONG_LONG
22310  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22311  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22312 #endif
22313  }
22314  } else {
22315  if (sizeof(long) <= sizeof(long)) {
22316  return PyInt_FromLong((long) value);
22317 #ifdef HAVE_LONG_LONG
22318  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22319  return PyLong_FromLongLong((PY_LONG_LONG) value);
22320 #endif
22321  }
22322  }
22323  {
22324  int one = 1; int little = (int)*(unsigned char *)&one;
22325  unsigned char *bytes = (unsigned char *)&value;
22326  return _PyLong_FromByteArray(bytes, sizeof(long),
22327  little, !is_unsigned);
22328  }
22329 }
22330 
22331 /* CIntFromPy */
22332  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22333  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22334  const int is_unsigned = neg_one > const_zero;
22335 #if PY_MAJOR_VERSION < 3
22336  if (likely(PyInt_Check(x))) {
22337  if (sizeof(long) < sizeof(long)) {
22338  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22339  } else {
22340  long val = PyInt_AS_LONG(x);
22341  if (is_unsigned && unlikely(val < 0)) {
22342  goto raise_neg_overflow;
22343  }
22344  return (long) val;
22345  }
22346  } else
22347 #endif
22348  if (likely(PyLong_Check(x))) {
22349  if (is_unsigned) {
22350 #if CYTHON_USE_PYLONG_INTERNALS
22351  const digit* digits = ((PyLongObject*)x)->ob_digit;
22352  switch (Py_SIZE(x)) {
22353  case 0: return (long) 0;
22354  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22355  case 2:
22356  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22357  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22358  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22359  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22360  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22361  }
22362  }
22363  break;
22364  case 3:
22365  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22366  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22367  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22368  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22369  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22370  }
22371  }
22372  break;
22373  case 4:
22374  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22375  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22376  __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])))
22377  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22378  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22379  }
22380  }
22381  break;
22382  }
22383 #endif
22384 #if CYTHON_COMPILING_IN_CPYTHON
22385  if (unlikely(Py_SIZE(x) < 0)) {
22386  goto raise_neg_overflow;
22387  }
22388 #else
22389  {
22390  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22391  if (unlikely(result < 0))
22392  return (long) -1;
22393  if (unlikely(result == 1))
22394  goto raise_neg_overflow;
22395  }
22396 #endif
22397  if (sizeof(long) <= sizeof(unsigned long)) {
22398  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22399 #ifdef HAVE_LONG_LONG
22400  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22401  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22402 #endif
22403  }
22404  } else {
22405 #if CYTHON_USE_PYLONG_INTERNALS
22406  const digit* digits = ((PyLongObject*)x)->ob_digit;
22407  switch (Py_SIZE(x)) {
22408  case 0: return (long) 0;
22409  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22410  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22411  case -2:
22412  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22413  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22414  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22415  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22416  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22417  }
22418  }
22419  break;
22420  case 2:
22421  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22422  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22423  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22424  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22425  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22426  }
22427  }
22428  break;
22429  case -3:
22430  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22431  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22432  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22433  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22434  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22435  }
22436  }
22437  break;
22438  case 3:
22439  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22440  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22441  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22442  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22443  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22444  }
22445  }
22446  break;
22447  case -4:
22448  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22449  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22450  __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])))
22451  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22452  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22453  }
22454  }
22455  break;
22456  case 4:
22457  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22458  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22459  __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])))
22460  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22461  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22462  }
22463  }
22464  break;
22465  }
22466 #endif
22467  if (sizeof(long) <= sizeof(long)) {
22468  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22469 #ifdef HAVE_LONG_LONG
22470  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22471  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22472 #endif
22473  }
22474  }
22475  {
22476 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22477  PyErr_SetString(PyExc_RuntimeError,
22478  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22479 #else
22480  long val;
22481  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22482  #if PY_MAJOR_VERSION < 3
22483  if (likely(v) && !PyLong_Check(v)) {
22484  PyObject *tmp = v;
22485  v = PyNumber_Long(tmp);
22486  Py_DECREF(tmp);
22487  }
22488  #endif
22489  if (likely(v)) {
22490  int one = 1; int is_little = (int)*(unsigned char *)&one;
22491  unsigned char *bytes = (unsigned char *)&val;
22492  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22493  bytes, sizeof(val),
22494  is_little, !is_unsigned);
22495  Py_DECREF(v);
22496  if (likely(!ret))
22497  return val;
22498  }
22499 #endif
22500  return (long) -1;
22501  }
22502  } else {
22503  long val;
22504  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22505  if (!tmp) return (long) -1;
22506  val = __Pyx_PyInt_As_long(tmp);
22507  Py_DECREF(tmp);
22508  return val;
22509  }
22510 raise_overflow:
22511  PyErr_SetString(PyExc_OverflowError,
22512  "value too large to convert to long");
22513  return (long) -1;
22514 raise_neg_overflow:
22515  PyErr_SetString(PyExc_OverflowError,
22516  "can't convert negative value to long");
22517  return (long) -1;
22518 }
22519 
22520 /* FastTypeChecks */
22521  #if CYTHON_COMPILING_IN_CPYTHON
22522 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22523  while (a) {
22524  a = a->tp_base;
22525  if (a == b)
22526  return 1;
22527  }
22528  return b == &PyBaseObject_Type;
22529 }
22530 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22531  PyObject *mro;
22532  if (a == b) return 1;
22533  mro = a->tp_mro;
22534  if (likely(mro)) {
22535  Py_ssize_t i, n;
22536  n = PyTuple_GET_SIZE(mro);
22537  for (i = 0; i < n; i++) {
22538  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22539  return 1;
22540  }
22541  return 0;
22542  }
22543  return __Pyx_InBases(a, b);
22544 }
22545 #if PY_MAJOR_VERSION == 2
22546 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22547  PyObject *exception, *value, *tb;
22548  int res;
22549  __Pyx_PyThreadState_declare
22550  __Pyx_PyThreadState_assign
22551  __Pyx_ErrFetch(&exception, &value, &tb);
22552  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22553  if (unlikely(res == -1)) {
22554  PyErr_WriteUnraisable(err);
22555  res = 0;
22556  }
22557  if (!res) {
22558  res = PyObject_IsSubclass(err, exc_type2);
22559  if (unlikely(res == -1)) {
22560  PyErr_WriteUnraisable(err);
22561  res = 0;
22562  }
22563  }
22564  __Pyx_ErrRestore(exception, value, tb);
22565  return res;
22566 }
22567 #else
22568 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22569  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22570  if (!res) {
22571  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22572  }
22573  return res;
22574 }
22575 #endif
22576 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22577  Py_ssize_t i, n;
22578  assert(PyExceptionClass_Check(exc_type));
22579  n = PyTuple_GET_SIZE(tuple);
22580 #if PY_MAJOR_VERSION >= 3
22581  for (i=0; i<n; i++) {
22582  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22583  }
22584 #endif
22585  for (i=0; i<n; i++) {
22586  PyObject *t = PyTuple_GET_ITEM(tuple, i);
22587  #if PY_MAJOR_VERSION < 3
22588  if (likely(exc_type == t)) return 1;
22589  #endif
22590  if (likely(PyExceptionClass_Check(t))) {
22591  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
22592  } else {
22593  }
22594  }
22595  return 0;
22596 }
22597 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22598  if (likely(err == exc_type)) return 1;
22599  if (likely(PyExceptionClass_Check(err))) {
22600  if (likely(PyExceptionClass_Check(exc_type))) {
22601  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22602  } else if (likely(PyTuple_Check(exc_type))) {
22603  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
22604  } else {
22605  }
22606  }
22607  return PyErr_GivenExceptionMatches(err, exc_type);
22608 }
22609 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22610  assert(PyExceptionClass_Check(exc_type1));
22611  assert(PyExceptionClass_Check(exc_type2));
22612  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22613  if (likely(PyExceptionClass_Check(err))) {
22614  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22615  }
22616  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22617 }
22618 #endif
22619 
22620 /* FetchCommonType */
22621  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22622  PyObject* fake_module;
22623  PyTypeObject* cached_type = NULL;
22624  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
22625  if (!fake_module) return NULL;
22626  Py_INCREF(fake_module);
22627  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
22628  if (cached_type) {
22629  if (!PyType_Check((PyObject*)cached_type)) {
22630  PyErr_Format(PyExc_TypeError,
22631  "Shared Cython type %.200s is not a type object",
22632  type->tp_name);
22633  goto bad;
22634  }
22635  if (cached_type->tp_basicsize != type->tp_basicsize) {
22636  PyErr_Format(PyExc_TypeError,
22637  "Shared Cython type %.200s has the wrong size, try recompiling",
22638  type->tp_name);
22639  goto bad;
22640  }
22641  } else {
22642  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
22643  PyErr_Clear();
22644  if (PyType_Ready(type) < 0) goto bad;
22645  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
22646  goto bad;
22647  Py_INCREF(type);
22648  cached_type = type;
22649  }
22650 done:
22651  Py_DECREF(fake_module);
22652  return cached_type;
22653 bad:
22654  Py_XDECREF(cached_type);
22655  cached_type = NULL;
22656  goto done;
22657 }
22658 
22659 /* SwapException */
22660  #if CYTHON_FAST_THREAD_STATE
22661 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22662  PyObject *tmp_type, *tmp_value, *tmp_tb;
22663  #if CYTHON_USE_EXC_INFO_STACK
22664  _PyErr_StackItem *exc_info = tstate->exc_info;
22665  tmp_type = exc_info->exc_type;
22666  tmp_value = exc_info->exc_value;
22667  tmp_tb = exc_info->exc_traceback;
22668  exc_info->exc_type = *type;
22669  exc_info->exc_value = *value;
22670  exc_info->exc_traceback = *tb;
22671  #else
22672  tmp_type = tstate->exc_type;
22673  tmp_value = tstate->exc_value;
22674  tmp_tb = tstate->exc_traceback;
22675  tstate->exc_type = *type;
22676  tstate->exc_value = *value;
22677  tstate->exc_traceback = *tb;
22678  #endif
22679  *type = tmp_type;
22680  *value = tmp_value;
22681  *tb = tmp_tb;
22682 }
22683 #else
22684 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22685  PyObject *tmp_type, *tmp_value, *tmp_tb;
22686  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22687  PyErr_SetExcInfo(*type, *value, *tb);
22688  *type = tmp_type;
22689  *value = tmp_value;
22690  *tb = tmp_tb;
22691 }
22692 #endif
22693 
22694 /* PyObjectGetMethod */
22695  static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
22696  PyObject *attr;
22697 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
22698  PyTypeObject *tp = Py_TYPE(obj);
22699  PyObject *descr;
22700  descrgetfunc f = NULL;
22701  PyObject **dictptr, *dict;
22702  int meth_found = 0;
22703  assert (*method == NULL);
22704  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
22705  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22706  goto try_unpack;
22707  }
22708  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
22709  return 0;
22710  }
22711  descr = _PyType_Lookup(tp, name);
22712  if (likely(descr != NULL)) {
22713  Py_INCREF(descr);
22714 #if PY_MAJOR_VERSION >= 3
22715  #ifdef __Pyx_CyFunction_USED
22716  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
22717  #else
22718  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
22719  #endif
22720 #else
22721  #ifdef __Pyx_CyFunction_USED
22722  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
22723  #else
22724  if (likely(PyFunction_Check(descr)))
22725  #endif
22726 #endif
22727  {
22728  meth_found = 1;
22729  } else {
22730  f = Py_TYPE(descr)->tp_descr_get;
22731  if (f != NULL && PyDescr_IsData(descr)) {
22732  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22733  Py_DECREF(descr);
22734  goto try_unpack;
22735  }
22736  }
22737  }
22738  dictptr = _PyObject_GetDictPtr(obj);
22739  if (dictptr != NULL && (dict = *dictptr) != NULL) {
22740  Py_INCREF(dict);
22741  attr = __Pyx_PyDict_GetItemStr(dict, name);
22742  if (attr != NULL) {
22743  Py_INCREF(attr);
22744  Py_DECREF(dict);
22745  Py_XDECREF(descr);
22746  goto try_unpack;
22747  }
22748  Py_DECREF(dict);
22749  }
22750  if (meth_found) {
22751  *method = descr;
22752  return 1;
22753  }
22754  if (f != NULL) {
22755  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22756  Py_DECREF(descr);
22757  goto try_unpack;
22758  }
22759  if (descr != NULL) {
22760  *method = descr;
22761  return 0;
22762  }
22763  PyErr_Format(PyExc_AttributeError,
22764 #if PY_MAJOR_VERSION >= 3
22765  "'%.50s' object has no attribute '%U'",
22766  tp->tp_name, name);
22767 #else
22768  "'%.50s' object has no attribute '%.400s'",
22769  tp->tp_name, PyString_AS_STRING(name));
22770 #endif
22771  return 0;
22772 #else
22773  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22774  goto try_unpack;
22775 #endif
22776 try_unpack:
22777 #if CYTHON_UNPACK_METHODS
22778  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
22779  PyObject *function = PyMethod_GET_FUNCTION(attr);
22780  Py_INCREF(function);
22781  Py_DECREF(attr);
22782  *method = function;
22783  return 1;
22784  }
22785 #endif
22786  *method = attr;
22787  return 0;
22788 }
22789 
22790 /* PyObjectCallMethod1 */
22791  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
22792  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
22793  Py_DECREF(method);
22794  return result;
22795 }
22796 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
22797  PyObject *method = NULL, *result;
22798  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
22799  if (likely(is_method)) {
22800  result = __Pyx_PyObject_Call2Args(method, obj, arg);
22801  Py_DECREF(method);
22802  return result;
22803  }
22804  if (unlikely(!method)) return NULL;
22805  return __Pyx__PyObject_CallMethod1(method, arg);
22806 }
22807 
22808 /* CoroutineBase */
22809  #include <structmember.h>
22810 #include <frameobject.h>
22811 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
22812 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
22813  PyObject *et, *ev, *tb;
22814  PyObject *value = NULL;
22815  __Pyx_ErrFetch(&et, &ev, &tb);
22816  if (!et) {
22817  Py_XDECREF(tb);
22818  Py_XDECREF(ev);
22819  Py_INCREF(Py_None);
22820  *pvalue = Py_None;
22821  return 0;
22822  }
22823  if (likely(et == PyExc_StopIteration)) {
22824  if (!ev) {
22825  Py_INCREF(Py_None);
22826  value = Py_None;
22827  }
22828 #if PY_VERSION_HEX >= 0x030300A0
22829  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
22830  value = ((PyStopIterationObject *)ev)->value;
22831  Py_INCREF(value);
22832  Py_DECREF(ev);
22833  }
22834 #endif
22835  else if (unlikely(PyTuple_Check(ev))) {
22836  if (PyTuple_GET_SIZE(ev) >= 1) {
22837 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22838  value = PyTuple_GET_ITEM(ev, 0);
22839  Py_INCREF(value);
22840 #else
22841  value = PySequence_ITEM(ev, 0);
22842 #endif
22843  } else {
22844  Py_INCREF(Py_None);
22845  value = Py_None;
22846  }
22847  Py_DECREF(ev);
22848  }
22849  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
22850  value = ev;
22851  }
22852  if (likely(value)) {
22853  Py_XDECREF(tb);
22854  Py_DECREF(et);
22855  *pvalue = value;
22856  return 0;
22857  }
22858  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
22859  __Pyx_ErrRestore(et, ev, tb);
22860  return -1;
22861  }
22862  PyErr_NormalizeException(&et, &ev, &tb);
22863  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
22864  __Pyx_ErrRestore(et, ev, tb);
22865  return -1;
22866  }
22867  Py_XDECREF(tb);
22868  Py_DECREF(et);
22869 #if PY_VERSION_HEX >= 0x030300A0
22870  value = ((PyStopIterationObject *)ev)->value;
22871  Py_INCREF(value);
22872  Py_DECREF(ev);
22873 #else
22874  {
22875  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
22876  Py_DECREF(ev);
22877  if (likely(args)) {
22878  value = PySequence_GetItem(args, 0);
22879  Py_DECREF(args);
22880  }
22881  if (unlikely(!value)) {
22882  __Pyx_ErrRestore(NULL, NULL, NULL);
22883  Py_INCREF(Py_None);
22884  value = Py_None;
22885  }
22886  }
22887 #endif
22888  *pvalue = value;
22889  return 0;
22890 }
22891 static CYTHON_INLINE
22892 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
22893  PyObject *t, *v, *tb;
22894  t = exc_state->exc_type;
22895  v = exc_state->exc_value;
22896  tb = exc_state->exc_traceback;
22897  exc_state->exc_type = NULL;
22898  exc_state->exc_value = NULL;
22899  exc_state->exc_traceback = NULL;
22900  Py_XDECREF(t);
22901  Py_XDECREF(v);
22902  Py_XDECREF(tb);
22903 }
22904 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
22905 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
22906  const char *msg;
22907  if ((0)) {
22908  #ifdef __Pyx_Coroutine_USED
22909  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
22910  msg = "coroutine already executing";
22911  #endif
22912  #ifdef __Pyx_AsyncGen_USED
22913  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
22914  msg = "async generator already executing";
22915  #endif
22916  } else {
22917  msg = "generator already executing";
22918  }
22919  PyErr_SetString(PyExc_ValueError, msg);
22920 }
22921 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
22922 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
22923  const char *msg;
22924  if ((0)) {
22925  #ifdef __Pyx_Coroutine_USED
22926  } else if (__Pyx_Coroutine_Check(gen)) {
22927  msg = "can't send non-None value to a just-started coroutine";
22928  #endif
22929  #ifdef __Pyx_AsyncGen_USED
22930  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
22931  msg = "can't send non-None value to a just-started async generator";
22932  #endif
22933  } else {
22934  msg = "can't send non-None value to a just-started generator";
22935  }
22936  PyErr_SetString(PyExc_TypeError, msg);
22937 }
22938 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
22939 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
22940  #ifdef __Pyx_Coroutine_USED
22941  if (!closing && __Pyx_Coroutine_Check(gen)) {
22942  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
22943  } else
22944  #endif
22945  if (value) {
22946  #ifdef __Pyx_AsyncGen_USED
22947  if (__Pyx_AsyncGen_CheckExact(gen))
22948  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
22949  else
22950  #endif
22951  PyErr_SetNone(PyExc_StopIteration);
22952  }
22953 }
22954 static
22955 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
22956  __Pyx_PyThreadState_declare
22957  PyThreadState *tstate;
22958  __Pyx_ExcInfoStruct *exc_state;
22959  PyObject *retval;
22960  assert(!self->is_running);
22961  if (unlikely(self->resume_label == 0)) {
22962  if (unlikely(value && value != Py_None)) {
22963  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
22964  }
22965  }
22966  if (unlikely(self->resume_label == -1)) {
22967  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
22968  }
22969 #if CYTHON_FAST_THREAD_STATE
22970  __Pyx_PyThreadState_assign
22971  tstate = __pyx_tstate;
22972 #else
22973  tstate = __Pyx_PyThreadState_Current;
22974 #endif
22975  exc_state = &self->gi_exc_state;
22976  if (exc_state->exc_type) {
22977  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
22978  #else
22979  if (exc_state->exc_traceback) {
22980  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
22981  PyFrameObject *f = tb->tb_frame;
22982  Py_XINCREF(tstate->frame);
22983  assert(f->f_back == NULL);
22984  f->f_back = tstate->frame;
22985  }
22986  #endif
22987  }
22988 #if CYTHON_USE_EXC_INFO_STACK
22989  exc_state->previous_item = tstate->exc_info;
22990  tstate->exc_info = exc_state;
22991 #else
22992  if (exc_state->exc_type) {
22993  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22994  } else {
22995  __Pyx_Coroutine_ExceptionClear(exc_state);
22996  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22997  }
22998 #endif
22999  self->is_running = 1;
23000  retval = self->body((PyObject *) self, tstate, value);
23001  self->is_running = 0;
23002 #if CYTHON_USE_EXC_INFO_STACK
23003  exc_state = &self->gi_exc_state;
23004  tstate->exc_info = exc_state->previous_item;
23005  exc_state->previous_item = NULL;
23006  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
23007 #endif
23008  return retval;
23009 }
23010 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
23011  PyObject *exc_tb = exc_state->exc_traceback;
23012  if (likely(exc_tb)) {
23013 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23014 #else
23015  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
23016  PyFrameObject *f = tb->tb_frame;
23017  Py_CLEAR(f->f_back);
23018 #endif
23019  }
23020 }
23021 static CYTHON_INLINE
23022 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
23023  if (unlikely(!retval)) {
23024  __Pyx_PyThreadState_declare
23025  __Pyx_PyThreadState_assign
23026  if (!__Pyx_PyErr_Occurred()) {
23027  PyObject *exc = PyExc_StopIteration;
23028  #ifdef __Pyx_AsyncGen_USED
23029  if (__Pyx_AsyncGen_CheckExact(gen))
23030  exc = __Pyx_PyExc_StopAsyncIteration;
23031  #endif
23032  __Pyx_PyErr_SetNone(exc);
23033  }
23034  }
23035  return retval;
23036 }
23037 static CYTHON_INLINE
23038 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
23039  PyObject *ret;
23040  PyObject *val = NULL;
23041  __Pyx_Coroutine_Undelegate(gen);
23042  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23043  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23044  Py_XDECREF(val);
23045  return ret;
23046 }
23047 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23048  PyObject *retval;
23049  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23050  PyObject *yf = gen->yieldfrom;
23051  if (unlikely(gen->is_running))
23052  return __Pyx_Coroutine_AlreadyRunningError(gen);
23053  if (yf) {
23054  PyObject *ret;
23055  gen->is_running = 1;
23056  #ifdef __Pyx_Generator_USED
23057  if (__Pyx_Generator_CheckExact(yf)) {
23058  ret = __Pyx_Coroutine_Send(yf, value);
23059  } else
23060  #endif
23061  #ifdef __Pyx_Coroutine_USED
23062  if (__Pyx_Coroutine_Check(yf)) {
23063  ret = __Pyx_Coroutine_Send(yf, value);
23064  } else
23065  #endif
23066  #ifdef __Pyx_AsyncGen_USED
23067  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23068  ret = __Pyx_async_gen_asend_send(yf, value);
23069  } else
23070  #endif
23071  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23072  if (PyGen_CheckExact(yf)) {
23073  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23074  } else
23075  #endif
23076  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23077  if (PyCoro_CheckExact(yf)) {
23078  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23079  } else
23080  #endif
23081  {
23082  if (value == Py_None)
23083  ret = Py_TYPE(yf)->tp_iternext(yf);
23084  else
23085  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23086  }
23087  gen->is_running = 0;
23088  if (likely(ret)) {
23089  return ret;
23090  }
23091  retval = __Pyx_Coroutine_FinishDelegation(gen);
23092  } else {
23093  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23094  }
23095  return __Pyx_Coroutine_MethodReturn(self, retval);
23096 }
23097 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23098  PyObject *retval = NULL;
23099  int err = 0;
23100  #ifdef __Pyx_Generator_USED
23101  if (__Pyx_Generator_CheckExact(yf)) {
23102  retval = __Pyx_Coroutine_Close(yf);
23103  if (!retval)
23104  return -1;
23105  } else
23106  #endif
23107  #ifdef __Pyx_Coroutine_USED
23108  if (__Pyx_Coroutine_Check(yf)) {
23109  retval = __Pyx_Coroutine_Close(yf);
23110  if (!retval)
23111  return -1;
23112  } else
23113  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23114  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
23115  if (!retval)
23116  return -1;
23117  } else
23118  #endif
23119  #ifdef __Pyx_AsyncGen_USED
23120  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23121  retval = __Pyx_async_gen_asend_close(yf, NULL);
23122  } else
23123  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23124  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23125  } else
23126  #endif
23127  {
23128  PyObject *meth;
23129  gen->is_running = 1;
23130  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23131  if (unlikely(!meth)) {
23132  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23133  PyErr_WriteUnraisable(yf);
23134  }
23135  PyErr_Clear();
23136  } else {
23137  retval = PyObject_CallFunction(meth, NULL);
23138  Py_DECREF(meth);
23139  if (!retval)
23140  err = -1;
23141  }
23142  gen->is_running = 0;
23143  }
23144  Py_XDECREF(retval);
23145  return err;
23146 }
23147 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23148  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23149  PyObject *yf = gen->yieldfrom;
23150  if (unlikely(gen->is_running))
23151  return __Pyx_Coroutine_AlreadyRunningError(gen);
23152  if (yf) {
23153  PyObject *ret;
23154  gen->is_running = 1;
23155  #ifdef __Pyx_Generator_USED
23156  if (__Pyx_Generator_CheckExact(yf)) {
23157  ret = __Pyx_Generator_Next(yf);
23158  } else
23159  #endif
23160  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23161  if (PyGen_CheckExact(yf)) {
23162  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23163  } else
23164  #endif
23165  #ifdef __Pyx_Coroutine_USED
23166  if (__Pyx_Coroutine_Check(yf)) {
23167  ret = __Pyx_Coroutine_Send(yf, Py_None);
23168  } else
23169  #endif
23170  ret = Py_TYPE(yf)->tp_iternext(yf);
23171  gen->is_running = 0;
23172  if (likely(ret)) {
23173  return ret;
23174  }
23175  return __Pyx_Coroutine_FinishDelegation(gen);
23176  }
23177  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23178 }
23179 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
23180  return __Pyx_Coroutine_Close(self);
23181 }
23182 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23183  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23184  PyObject *retval, *raised_exception;
23185  PyObject *yf = gen->yieldfrom;
23186  int err = 0;
23187  if (unlikely(gen->is_running))
23188  return __Pyx_Coroutine_AlreadyRunningError(gen);
23189  if (yf) {
23190  Py_INCREF(yf);
23191  err = __Pyx_Coroutine_CloseIter(gen, yf);
23192  __Pyx_Coroutine_Undelegate(gen);
23193  Py_DECREF(yf);
23194  }
23195  if (err == 0)
23196  PyErr_SetNone(PyExc_GeneratorExit);
23197  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23198  if (unlikely(retval)) {
23199  const char *msg;
23200  Py_DECREF(retval);
23201  if ((0)) {
23202  #ifdef __Pyx_Coroutine_USED
23203  } else if (__Pyx_Coroutine_Check(self)) {
23204  msg = "coroutine ignored GeneratorExit";
23205  #endif
23206  #ifdef __Pyx_AsyncGen_USED
23207  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23208 #if PY_VERSION_HEX < 0x03060000
23209  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23210 #else
23211  msg = "async generator ignored GeneratorExit";
23212 #endif
23213  #endif
23214  } else {
23215  msg = "generator ignored GeneratorExit";
23216  }
23217  PyErr_SetString(PyExc_RuntimeError, msg);
23218  return NULL;
23219  }
23220  raised_exception = PyErr_Occurred();
23221  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23222  if (raised_exception) PyErr_Clear();
23223  Py_INCREF(Py_None);
23224  return Py_None;
23225  }
23226  return NULL;
23227 }
23228 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23229  PyObject *args, int close_on_genexit) {
23230  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23231  PyObject *yf = gen->yieldfrom;
23232  if (unlikely(gen->is_running))
23233  return __Pyx_Coroutine_AlreadyRunningError(gen);
23234  if (yf) {
23235  PyObject *ret;
23236  Py_INCREF(yf);
23237  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23238  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23239  Py_DECREF(yf);
23240  __Pyx_Coroutine_Undelegate(gen);
23241  if (err < 0)
23242  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23243  goto throw_here;
23244  }
23245  gen->is_running = 1;
23246  if (0
23247  #ifdef __Pyx_Generator_USED
23248  || __Pyx_Generator_CheckExact(yf)
23249  #endif
23250  #ifdef __Pyx_Coroutine_USED
23251  || __Pyx_Coroutine_Check(yf)
23252  #endif
23253  ) {
23254  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23255  #ifdef __Pyx_Coroutine_USED
23256  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23257  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23258  #endif
23259  } else {
23260  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23261  if (unlikely(!meth)) {
23262  Py_DECREF(yf);
23263  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23264  gen->is_running = 0;
23265  return NULL;
23266  }
23267  PyErr_Clear();
23268  __Pyx_Coroutine_Undelegate(gen);
23269  gen->is_running = 0;
23270  goto throw_here;
23271  }
23272  if (likely(args)) {
23273  ret = PyObject_CallObject(meth, args);
23274  } else {
23275  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23276  }
23277  Py_DECREF(meth);
23278  }
23279  gen->is_running = 0;
23280  Py_DECREF(yf);
23281  if (!ret) {
23282  ret = __Pyx_Coroutine_FinishDelegation(gen);
23283  }
23284  return __Pyx_Coroutine_MethodReturn(self, ret);
23285  }
23286 throw_here:
23287  __Pyx_Raise(typ, val, tb, NULL);
23288  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23289 }
23290 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23291  PyObject *typ;
23292  PyObject *val = NULL;
23293  PyObject *tb = NULL;
23294  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23295  return NULL;
23296  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23297 }
23298 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
23299  Py_VISIT(exc_state->exc_type);
23300  Py_VISIT(exc_state->exc_value);
23301  Py_VISIT(exc_state->exc_traceback);
23302  return 0;
23303 }
23304 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23305  Py_VISIT(gen->closure);
23306  Py_VISIT(gen->classobj);
23307  Py_VISIT(gen->yieldfrom);
23308  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
23309 }
23310 static int __Pyx_Coroutine_clear(PyObject *self) {
23311  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23312  Py_CLEAR(gen->closure);
23313  Py_CLEAR(gen->classobj);
23314  Py_CLEAR(gen->yieldfrom);
23315  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
23316 #ifdef __Pyx_AsyncGen_USED
23317  if (__Pyx_AsyncGen_CheckExact(self)) {
23318  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23319  }
23320 #endif
23321  Py_CLEAR(gen->gi_code);
23322  Py_CLEAR(gen->gi_name);
23323  Py_CLEAR(gen->gi_qualname);
23324  Py_CLEAR(gen->gi_modulename);
23325  return 0;
23326 }
23327 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23328  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23329  PyObject_GC_UnTrack(gen);
23330  if (gen->gi_weakreflist != NULL)
23331  PyObject_ClearWeakRefs(self);
23332  if (gen->resume_label >= 0) {
23333  PyObject_GC_Track(self);
23334 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23335  if (PyObject_CallFinalizerFromDealloc(self))
23336 #else
23337  Py_TYPE(gen)->tp_del(self);
23338  if (self->ob_refcnt > 0)
23339 #endif
23340  {
23341  return;
23342  }
23343  PyObject_GC_UnTrack(self);
23344  }
23345 #ifdef __Pyx_AsyncGen_USED
23346  if (__Pyx_AsyncGen_CheckExact(self)) {
23347  /* We have to handle this case for asynchronous generators
23348  right here, because this code has to be between UNTRACK
23349  and GC_Del. */
23350  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23351  }
23352 #endif
23353  __Pyx_Coroutine_clear(self);
23354  PyObject_GC_Del(gen);
23355 }
23356 static void __Pyx_Coroutine_del(PyObject *self) {
23357  PyObject *error_type, *error_value, *error_traceback;
23358  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23359  __Pyx_PyThreadState_declare
23360  if (gen->resume_label < 0) {
23361  return;
23362  }
23363 #if !CYTHON_USE_TP_FINALIZE
23364  assert(self->ob_refcnt == 0);
23365  self->ob_refcnt = 1;
23366 #endif
23367  __Pyx_PyThreadState_assign
23368  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23369 #ifdef __Pyx_AsyncGen_USED
23370  if (__Pyx_AsyncGen_CheckExact(self)) {
23371  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23372  PyObject *finalizer = agen->ag_finalizer;
23373  if (finalizer && !agen->ag_closed) {
23374  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23375  if (unlikely(!res)) {
23376  PyErr_WriteUnraisable(self);
23377  } else {
23378  Py_DECREF(res);
23379  }
23380  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23381  return;
23382  }
23383  }
23384 #endif
23385  if (unlikely(gen->resume_label == 0 && !error_value)) {
23386 #ifdef __Pyx_Coroutine_USED
23387 #ifdef __Pyx_Generator_USED
23388  if (!__Pyx_Generator_CheckExact(self))
23389 #endif
23390  {
23391  PyObject_GC_UnTrack(self);
23392 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23393  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23394  PyErr_WriteUnraisable(self);
23395 #else
23396  {PyObject *msg;
23397  char *cmsg;
23398  #if CYTHON_COMPILING_IN_PYPY
23399  msg = NULL;
23400  cmsg = (char*) "coroutine was never awaited";
23401  #else
23402  char *cname;
23403  PyObject *qualname;
23404  qualname = gen->gi_qualname;
23405  cname = PyString_AS_STRING(qualname);
23406  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23407  if (unlikely(!msg)) {
23408  PyErr_Clear();
23409  cmsg = (char*) "coroutine was never awaited";
23410  } else {
23411  cmsg = PyString_AS_STRING(msg);
23412  }
23413  #endif
23414  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23415  PyErr_WriteUnraisable(self);
23416  Py_XDECREF(msg);}
23417 #endif
23418  PyObject_GC_Track(self);
23419  }
23420 #endif
23421  } else {
23422  PyObject *res = __Pyx_Coroutine_Close(self);
23423  if (unlikely(!res)) {
23424  if (PyErr_Occurred())
23425  PyErr_WriteUnraisable(self);
23426  } else {
23427  Py_DECREF(res);
23428  }
23429  }
23430  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23431 #if !CYTHON_USE_TP_FINALIZE
23432  assert(self->ob_refcnt > 0);
23433  if (--self->ob_refcnt == 0) {
23434  return;
23435  }
23436  {
23437  Py_ssize_t refcnt = self->ob_refcnt;
23438  _Py_NewReference(self);
23439  self->ob_refcnt = refcnt;
23440  }
23441 #if CYTHON_COMPILING_IN_CPYTHON
23442  assert(PyType_IS_GC(self->ob_type) &&
23443  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23444  _Py_DEC_REFTOTAL;
23445 #endif
23446 #ifdef COUNT_ALLOCS
23447  --Py_TYPE(self)->tp_frees;
23448  --Py_TYPE(self)->tp_allocs;
23449 #endif
23450 #endif
23451 }
23452 static PyObject *
23453 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23454 {
23455  PyObject *name = self->gi_name;
23456  if (unlikely(!name)) name = Py_None;
23457  Py_INCREF(name);
23458  return name;
23459 }
23460 static int
23461 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23462 {
23463  PyObject *tmp;
23464 #if PY_MAJOR_VERSION >= 3
23465  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23466 #else
23467  if (unlikely(value == NULL || !PyString_Check(value)))
23468 #endif
23469  {
23470  PyErr_SetString(PyExc_TypeError,
23471  "__name__ must be set to a string object");
23472  return -1;
23473  }
23474  tmp = self->gi_name;
23475  Py_INCREF(value);
23476  self->gi_name = value;
23477  Py_XDECREF(tmp);
23478  return 0;
23479 }
23480 static PyObject *
23481 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23482 {
23483  PyObject *name = self->gi_qualname;
23484  if (unlikely(!name)) name = Py_None;
23485  Py_INCREF(name);
23486  return name;
23487 }
23488 static int
23489 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23490 {
23491  PyObject *tmp;
23492 #if PY_MAJOR_VERSION >= 3
23493  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23494 #else
23495  if (unlikely(value == NULL || !PyString_Check(value)))
23496 #endif
23497  {
23498  PyErr_SetString(PyExc_TypeError,
23499  "__qualname__ must be set to a string object");
23500  return -1;
23501  }
23502  tmp = self->gi_qualname;
23503  Py_INCREF(value);
23504  self->gi_qualname = value;
23505  Py_XDECREF(tmp);
23506  return 0;
23507 }
23508 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23509  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23510  PyObject *name, PyObject *qualname, PyObject *module_name) {
23511  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23512  if (unlikely(!gen))
23513  return NULL;
23514  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
23515 }
23516 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23517  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23518  PyObject *name, PyObject *qualname, PyObject *module_name) {
23519  gen->body = body;
23520  gen->closure = closure;
23521  Py_XINCREF(closure);
23522  gen->is_running = 0;
23523  gen->resume_label = 0;
23524  gen->classobj = NULL;
23525  gen->yieldfrom = NULL;
23526  gen->gi_exc_state.exc_type = NULL;
23527  gen->gi_exc_state.exc_value = NULL;
23528  gen->gi_exc_state.exc_traceback = NULL;
23529 #if CYTHON_USE_EXC_INFO_STACK
23530  gen->gi_exc_state.previous_item = NULL;
23531 #endif
23532  gen->gi_weakreflist = NULL;
23533  Py_XINCREF(qualname);
23534  gen->gi_qualname = qualname;
23535  Py_XINCREF(name);
23536  gen->gi_name = name;
23537  Py_XINCREF(module_name);
23538  gen->gi_modulename = module_name;
23539  Py_XINCREF(code);
23540  gen->gi_code = code;
23541  PyObject_GC_Track(gen);
23542  return gen;
23543 }
23544 
23545 /* PatchModuleWithCoroutine */
23546  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23547 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23548  int result;
23549  PyObject *globals, *result_obj;
23550  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23551  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23552  #ifdef __Pyx_Coroutine_USED
23553  (PyObject*)__pyx_CoroutineType);
23554  #else
23555  Py_None);
23556  #endif
23557  if (unlikely(result < 0)) goto ignore;
23558  result = PyDict_SetItemString(globals, "_cython_generator_type",
23559  #ifdef __Pyx_Generator_USED
23560  (PyObject*)__pyx_GeneratorType);
23561  #else
23562  Py_None);
23563  #endif
23564  if (unlikely(result < 0)) goto ignore;
23565  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23566  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23567  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23568  if (unlikely(!result_obj)) goto ignore;
23569  Py_DECREF(result_obj);
23570  Py_DECREF(globals);
23571  return module;
23572 ignore:
23573  Py_XDECREF(globals);
23574  PyErr_WriteUnraisable(module);
23575  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23576  Py_DECREF(module);
23577  module = NULL;
23578  }
23579 #else
23580  py_code++;
23581 #endif
23582  return module;
23583 }
23584 
23585 /* PatchGeneratorABC */
23586  #ifndef CYTHON_REGISTER_ABCS
23587 #define CYTHON_REGISTER_ABCS 1
23588 #endif
23589 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23590 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23591 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23592  module = __Pyx_Coroutine_patch_module(
23593  module, ""
23594 "if _cython_generator_type is not None:\n"
23595 " try: Generator = _module.Generator\n"
23596 " except AttributeError: pass\n"
23597 " else: Generator.register(_cython_generator_type)\n"
23598 "if _cython_coroutine_type is not None:\n"
23599 " try: Coroutine = _module.Coroutine\n"
23600 " except AttributeError: pass\n"
23601 " else: Coroutine.register(_cython_coroutine_type)\n"
23602  );
23603  return module;
23604 }
23605 #endif
23606 static int __Pyx_patch_abc(void) {
23607 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23608  static int abc_patched = 0;
23609  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23610  PyObject *module;
23611  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23612  if (!module) {
23613  PyErr_WriteUnraisable(NULL);
23614  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23615  ((PY_MAJOR_VERSION >= 3) ?
23616  "Cython module failed to register with collections.abc module" :
23617  "Cython module failed to register with collections module"), 1) < 0)) {
23618  return -1;
23619  }
23620  } else {
23621  module = __Pyx_patch_abc_module(module);
23622  abc_patched = 1;
23623  if (unlikely(!module))
23624  return -1;
23625  Py_DECREF(module);
23626  }
23627  module = PyImport_ImportModule("backports_abc");
23628  if (module) {
23629  module = __Pyx_patch_abc_module(module);
23630  Py_XDECREF(module);
23631  }
23632  if (!module) {
23633  PyErr_Clear();
23634  }
23635  }
23636 #else
23637  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23638 #endif
23639  return 0;
23640 }
23641 
23642 /* Generator */
23643  static PyMethodDef __pyx_Generator_methods[] = {
23644  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23645  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23646  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23647  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23648  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
23649  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23650  {0, 0, 0, 0}
23651 };
23652 static PyMemberDef __pyx_Generator_memberlist[] = {
23653  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23654  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23655  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23656  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
23657  {0, 0, 0, 0, 0}
23658 };
23659 static PyGetSetDef __pyx_Generator_getsets[] = {
23660  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23661  (char*) PyDoc_STR("name of the generator"), 0},
23662  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23663  (char*) PyDoc_STR("qualified name of the generator"), 0},
23664  {0, 0, 0, 0, 0}
23665 };
23666 static PyTypeObject __pyx_GeneratorType_type = {
23667  PyVarObject_HEAD_INIT(0, 0)
23668  "generator",
23669  sizeof(__pyx_CoroutineObject),
23670  0,
23671  (destructor) __Pyx_Coroutine_dealloc,
23672  0,
23673  0,
23674  0,
23675  0,
23676  0,
23677  0,
23678  0,
23679  0,
23680  0,
23681  0,
23682  0,
23683  0,
23684  0,
23685  0,
23686  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23687  0,
23688  (traverseproc) __Pyx_Coroutine_traverse,
23689  0,
23690  0,
23691  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23692  0,
23693  (iternextfunc) __Pyx_Generator_Next,
23694  __pyx_Generator_methods,
23695  __pyx_Generator_memberlist,
23696  __pyx_Generator_getsets,
23697  0,
23698  0,
23699  0,
23700  0,
23701  0,
23702  0,
23703  0,
23704  0,
23705  0,
23706  0,
23707  0,
23708  0,
23709  0,
23710  0,
23711  0,
23712 #if CYTHON_USE_TP_FINALIZE
23713  0,
23714 #else
23715  __Pyx_Coroutine_del,
23716 #endif
23717  0,
23718 #if CYTHON_USE_TP_FINALIZE
23719  __Pyx_Coroutine_del,
23720 #elif PY_VERSION_HEX >= 0x030400a1
23721  0,
23722 #endif
23723 #if PY_VERSION_HEX >= 0x030800b1
23724  0,
23725 #endif
23726 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
23727  0,
23728 #endif
23729 };
23730 static int __pyx_Generator_init(void) {
23731  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
23732  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
23733  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
23734  if (unlikely(!__pyx_GeneratorType)) {
23735  return -1;
23736  }
23737  return 0;
23738 }
23739 
23740 /* CheckBinaryVersion */
23741  static int __Pyx_check_binary_version(void) {
23742  char ctversion[4], rtversion[4];
23743  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
23744  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
23745  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
23746  char message[200];
23747  PyOS_snprintf(message, sizeof(message),
23748  "compiletime version %s of module '%.100s' "
23749  "does not match runtime version %s",
23750  ctversion, __Pyx_MODULE_NAME, rtversion);
23751  return PyErr_WarnEx(NULL, message, 1);
23752  }
23753  return 0;
23754 }
23755 
23756 /* InitStrings */
23757  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
23758  while (t->p) {
23759  #if PY_MAJOR_VERSION < 3
23760  if (t->is_unicode) {
23761  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
23762  } else if (t->intern) {
23763  *t->p = PyString_InternFromString(t->s);
23764  } else {
23765  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
23766  }
23767  #else
23768  if (t->is_unicode | t->is_str) {
23769  if (t->intern) {
23770  *t->p = PyUnicode_InternFromString(t->s);
23771  } else if (t->encoding) {
23772  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
23773  } else {
23774  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
23775  }
23776  } else {
23777  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
23778  }
23779  #endif
23780  if (!*t->p)
23781  return -1;
23782  if (PyObject_Hash(*t->p) == -1)
23783  return -1;
23784  ++t;
23785  }
23786  return 0;
23787 }
23788 
23789 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
23790  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
23791 }
23792 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
23793  Py_ssize_t ignore;
23794  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
23795 }
23796 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23797 #if !CYTHON_PEP393_ENABLED
23798 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23799  char* defenc_c;
23800  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
23801  if (!defenc) return NULL;
23802  defenc_c = PyBytes_AS_STRING(defenc);
23803 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23804  {
23805  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
23806  char* c;
23807  for (c = defenc_c; c < end; c++) {
23808  if ((unsigned char) (*c) >= 128) {
23809  PyUnicode_AsASCIIString(o);
23810  return NULL;
23811  }
23812  }
23813  }
23814 #endif
23815  *length = PyBytes_GET_SIZE(defenc);
23816  return defenc_c;
23817 }
23818 #else
23819 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23820  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
23821 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23822  if (likely(PyUnicode_IS_ASCII(o))) {
23823  *length = PyUnicode_GET_LENGTH(o);
23824  return PyUnicode_AsUTF8(o);
23825  } else {
23826  PyUnicode_AsASCIIString(o);
23827  return NULL;
23828  }
23829 #else
23830  return PyUnicode_AsUTF8AndSize(o, length);
23831 #endif
23832 }
23833 #endif
23834 #endif
23835 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23836 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23837  if (
23838 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23839  __Pyx_sys_getdefaultencoding_not_ascii &&
23840 #endif
23841  PyUnicode_Check(o)) {
23842  return __Pyx_PyUnicode_AsStringAndSize(o, length);
23843  } else
23844 #endif
23845 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
23846  if (PyByteArray_Check(o)) {
23847  *length = PyByteArray_GET_SIZE(o);
23848  return PyByteArray_AS_STRING(o);
23849  } else
23850 #endif
23851  {
23852  char* result;
23853  int r = PyBytes_AsStringAndSize(o, &result, length);
23854  if (unlikely(r < 0)) {
23855  return NULL;
23856  } else {
23857  return result;
23858  }
23859  }
23860 }
23861 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
23862  int is_true = x == Py_True;
23863  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
23864  else return PyObject_IsTrue(x);
23865 }
23866 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
23867  int retval;
23868  if (unlikely(!x)) return -1;
23869  retval = __Pyx_PyObject_IsTrue(x);
23870  Py_DECREF(x);
23871  return retval;
23872 }
23873 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
23874 #if PY_MAJOR_VERSION >= 3
23875  if (PyLong_Check(result)) {
23876  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
23877  "__int__ returned non-int (type %.200s). "
23878  "The ability to return an instance of a strict subclass of int "
23879  "is deprecated, and may be removed in a future version of Python.",
23880  Py_TYPE(result)->tp_name)) {
23881  Py_DECREF(result);
23882  return NULL;
23883  }
23884  return result;
23885  }
23886 #endif
23887  PyErr_Format(PyExc_TypeError,
23888  "__%.4s__ returned non-%.4s (type %.200s)",
23889  type_name, type_name, Py_TYPE(result)->tp_name);
23890  Py_DECREF(result);
23891  return NULL;
23892 }
23893 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
23894 #if CYTHON_USE_TYPE_SLOTS
23895  PyNumberMethods *m;
23896 #endif
23897  const char *name = NULL;
23898  PyObject *res = NULL;
23899 #if PY_MAJOR_VERSION < 3
23900  if (likely(PyInt_Check(x) || PyLong_Check(x)))
23901 #else
23902  if (likely(PyLong_Check(x)))
23903 #endif
23904  return __Pyx_NewRef(x);
23905 #if CYTHON_USE_TYPE_SLOTS
23906  m = Py_TYPE(x)->tp_as_number;
23907  #if PY_MAJOR_VERSION < 3
23908  if (m && m->nb_int) {
23909  name = "int";
23910  res = m->nb_int(x);
23911  }
23912  else if (m && m->nb_long) {
23913  name = "long";
23914  res = m->nb_long(x);
23915  }
23916  #else
23917  if (likely(m && m->nb_int)) {
23918  name = "int";
23919  res = m->nb_int(x);
23920  }
23921  #endif
23922 #else
23923  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
23924  res = PyNumber_Int(x);
23925  }
23926 #endif
23927  if (likely(res)) {
23928 #if PY_MAJOR_VERSION < 3
23929  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
23930 #else
23931  if (unlikely(!PyLong_CheckExact(res))) {
23932 #endif
23933  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
23934  }
23935  }
23936  else if (!PyErr_Occurred()) {
23937  PyErr_SetString(PyExc_TypeError,
23938  "an integer is required");
23939  }
23940  return res;
23941 }
23942 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
23943  Py_ssize_t ival;
23944  PyObject *x;
23945 #if PY_MAJOR_VERSION < 3
23946  if (likely(PyInt_CheckExact(b))) {
23947  if (sizeof(Py_ssize_t) >= sizeof(long))
23948  return PyInt_AS_LONG(b);
23949  else
23950  return PyInt_AsSsize_t(b);
23951  }
23952 #endif
23953  if (likely(PyLong_CheckExact(b))) {
23954  #if CYTHON_USE_PYLONG_INTERNALS
23955  const digit* digits = ((PyLongObject*)b)->ob_digit;
23956  const Py_ssize_t size = Py_SIZE(b);
23957  if (likely(__Pyx_sst_abs(size) <= 1)) {
23958  ival = likely(size) ? digits[0] : 0;
23959  if (size == -1) ival = -ival;
23960  return ival;
23961  } else {
23962  switch (size) {
23963  case 2:
23964  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23965  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23966  }
23967  break;
23968  case -2:
23969  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23970  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23971  }
23972  break;
23973  case 3:
23974  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23975  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23976  }
23977  break;
23978  case -3:
23979  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23980  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23981  }
23982  break;
23983  case 4:
23984  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23985  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]));
23986  }
23987  break;
23988  case -4:
23989  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23990  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]));
23991  }
23992  break;
23993  }
23994  }
23995  #endif
23996  return PyLong_AsSsize_t(b);
23997  }
23998  x = PyNumber_Index(b);
23999  if (!x) return -1;
24000  ival = PyInt_AsSsize_t(x);
24001  Py_DECREF(x);
24002  return ival;
24003 }
24004 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
24005  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
24006 }
24007 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24008  return PyInt_FromSize_t(ival);
24009 }
24010 
24011 
24012 #endif /* Py_PYTHON_H */
int compare(const index_set< LO, HI > &a, const index_set< LO, HI > &b)
"lexicographic compare" eg. {3,4,5} is less than {3,7,8}
const Multivector< Scalar_T, LO, HI > sqrt(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Square root of multivector with specified complexifier.
String clifford_to_str(const Multivector_T &mv)
The "informal" string representation of Multivector_T mv.
Definition: PyClical.h:98
const Multivector< Scalar_T, LO, HI > acosh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic cosine of multivector with specified complexifier.
String index_set_to_repr(const Index_Set_T &ist)
The “official” string representation of Index_Set_T ist.
Definition: PyClical.h:69
const Multivector< Scalar_T, LO, HI > sinh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic sine of multivector.
index_set< lo_ndx, hi_ndx > IndexSet
Definition: PyClical.h:157
Scalar_T abs(const Multivector< Scalar_T, LO, HI > &val)
Absolute value == sqrt(norm)
const Multivector< Scalar_T, LO, HI > log(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Natural logarithm of multivector with specified complexifier.
String clifford_to_repr(const Multivector_T &mv)
The “official” string representation of Multivector_T mv.
Definition: PyClical.h:87
Multivector_T cga3(const Multivector_T &x)
Convert Euclidean 3D vector to Conformal Geometric Algebra null vector [DL (10.50)].
Definition: PyClical.h:115
const Multivector< Scalar_T, LO, HI > sin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Sine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > atanh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic tangent of multivector with specified complexifier.
const framed_multi< Scalar_T, LO, HI > exp(const framed_multi< Scalar_T, LO, HI > &val)
Exponential of multivector.
const Multivector< Scalar_T, LO, HI > cos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Cosine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > tanh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic tangent of multivector.
index_t min_neg(const index_set< LO, HI > &ist)
Minimum negative index, or 0 if none.
const Multivector< Scalar_T, LO, HI > asin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse sine of multivector with specified complexifier.
matrix_multi< scalar_t > Clifford
Definition: PyClical.h:160
const Multivector< Scalar_T, LO, HI > complexifier(const Multivector< Scalar_T, LO, HI > &val)
Square root of -1 which commutes with all members of the frame of the given multivector.
PyObject * PyFloat_FromDouble(Scalar_T v)
Definition: PyClical.h:59
const Multivector< Scalar_T, LO, HI > atan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse tangent of multivector with specified complexifier.
double scalar_t
Definition: PyClical.h:159
const Multivector< Scalar_T, LO, HI > tan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Tangent of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > acos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse cosine of multivector with specified complexifier.
String index_set_to_str(const Index_Set_T &ist)
The "informal" string representation of Index_Set_T ist.
Definition: PyClical.h:78
index_t max_pos(const index_set< LO, HI > &ist)
Maximum positive index, or 0 if none.
const Multivector< Scalar_T, LO, HI > asinh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic sine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > operator &(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Inner product.
Scalar_T max_abs(const Multivector< Scalar_T, LO, HI > &val)
Maximum of absolute values of components of multivector: multivector infinity norm.
def e(obj)
Definition: PyClical.pyx:1887
const Multivector< Scalar_T, LO, HI > cosh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic cosine of multivector.
bool operator!=(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Test for inequality of multivectors.
Multivector_T cga3std(const Multivector_T &X)
Convert CGA3 null vector to standard Conformal Geometric Algebra null vector [DL (10.52)].
Definition: PyClical.h:126
Multivector_T agc3(const Multivector_T &X)
Convert CGA3 null vector to Euclidean 3D vector [DL (10.50)].
Definition: PyClical.h:138