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  "-g",
16  "-O3",
17  "-fmessage-length=0",
18  "-grecord-gcc-switches",
19  "-O2",
20  "-Wall",
21  "-D_FORTIFY_SOURCE=2",
22  "-fstack-protector-strong",
23  "-funwind-tables",
24  "-fasynchronous-unwind-tables",
25  "-fstack-clash-protection",
26  "-finline-limit=4000",
27  "--param",
28  "inline-unit-growth=200",
29  "-funroll-loops",
30  "-fvariable-expansion-in-unroller",
31  "-DNDEBUG",
32  "-DHAVE_BITS_WORDSIZE_H",
33  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
34  "-D_GLUCAT_USE_DENSE_MATRICES",
35  "-D_GLUCAT_CHECK_ISNAN",
36  "-Wno-unused-local-typedefs",
37  "-Wno-misleading-indentation",
38  "-fno-check-new",
39  "-fexceptions"
40  ],
41  "include_dirs": [
42  ".",
43  ".."
44  ],
45  "language": "c++",
46  "name": "PyClical",
47  "sources": [
48  "PyClical.pyx"
49  ]
50  },
51  "module_name": "PyClical"
52 }
53 END: Cython Metadata */
54 
55 #define PY_SSIZE_T_CLEAN
56 #include "Python.h"
57 #ifndef Py_PYTHON_H
58  #error Python headers needed to compile C extensions, please install development version of Python.
59 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
60  #error Cython requires Python 2.6+ or Python 3.3+.
61 #else
62 #define CYTHON_ABI "0_29_14"
63 #define CYTHON_HEX_VERSION 0x001D0EF0
64 #define CYTHON_FUTURE_DIVISION 0
65 #include <stddef.h>
66 #ifndef offsetof
67  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
68 #endif
69 #if !defined(WIN32) && !defined(MS_WINDOWS)
70  #ifndef __stdcall
71  #define __stdcall
72  #endif
73  #ifndef __cdecl
74  #define __cdecl
75  #endif
76  #ifndef __fastcall
77  #define __fastcall
78  #endif
79 #endif
80 #ifndef DL_IMPORT
81  #define DL_IMPORT(t) t
82 #endif
83 #ifndef DL_EXPORT
84  #define DL_EXPORT(t) t
85 #endif
86 #define __PYX_COMMA ,
87 #ifndef HAVE_LONG_LONG
88  #if PY_VERSION_HEX >= 0x02070000
89  #define HAVE_LONG_LONG
90  #endif
91 #endif
92 #ifndef PY_LONG_LONG
93  #define PY_LONG_LONG LONG_LONG
94 #endif
95 #ifndef Py_HUGE_VAL
96  #define Py_HUGE_VAL HUGE_VAL
97 #endif
98 #ifdef PYPY_VERSION
99  #define CYTHON_COMPILING_IN_PYPY 1
100  #define CYTHON_COMPILING_IN_PYSTON 0
101  #define CYTHON_COMPILING_IN_CPYTHON 0
102  #undef CYTHON_USE_TYPE_SLOTS
103  #define CYTHON_USE_TYPE_SLOTS 0
104  #undef CYTHON_USE_PYTYPE_LOOKUP
105  #define CYTHON_USE_PYTYPE_LOOKUP 0
106  #if PY_VERSION_HEX < 0x03050000
107  #undef CYTHON_USE_ASYNC_SLOTS
108  #define CYTHON_USE_ASYNC_SLOTS 0
109  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
110  #define CYTHON_USE_ASYNC_SLOTS 1
111  #endif
112  #undef CYTHON_USE_PYLIST_INTERNALS
113  #define CYTHON_USE_PYLIST_INTERNALS 0
114  #undef CYTHON_USE_UNICODE_INTERNALS
115  #define CYTHON_USE_UNICODE_INTERNALS 0
116  #undef CYTHON_USE_UNICODE_WRITER
117  #define CYTHON_USE_UNICODE_WRITER 0
118  #undef CYTHON_USE_PYLONG_INTERNALS
119  #define CYTHON_USE_PYLONG_INTERNALS 0
120  #undef CYTHON_AVOID_BORROWED_REFS
121  #define CYTHON_AVOID_BORROWED_REFS 1
122  #undef CYTHON_ASSUME_SAFE_MACROS
123  #define CYTHON_ASSUME_SAFE_MACROS 0
124  #undef CYTHON_UNPACK_METHODS
125  #define CYTHON_UNPACK_METHODS 0
126  #undef CYTHON_FAST_THREAD_STATE
127  #define CYTHON_FAST_THREAD_STATE 0
128  #undef CYTHON_FAST_PYCALL
129  #define CYTHON_FAST_PYCALL 0
130  #undef CYTHON_PEP489_MULTI_PHASE_INIT
131  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
132  #undef CYTHON_USE_TP_FINALIZE
133  #define CYTHON_USE_TP_FINALIZE 0
134  #undef CYTHON_USE_DICT_VERSIONS
135  #define CYTHON_USE_DICT_VERSIONS 0
136  #undef CYTHON_USE_EXC_INFO_STACK
137  #define CYTHON_USE_EXC_INFO_STACK 0
138 #elif defined(PYSTON_VERSION)
139  #define CYTHON_COMPILING_IN_PYPY 0
140  #define CYTHON_COMPILING_IN_PYSTON 1
141  #define CYTHON_COMPILING_IN_CPYTHON 0
142  #ifndef CYTHON_USE_TYPE_SLOTS
143  #define CYTHON_USE_TYPE_SLOTS 1
144  #endif
145  #undef CYTHON_USE_PYTYPE_LOOKUP
146  #define CYTHON_USE_PYTYPE_LOOKUP 0
147  #undef CYTHON_USE_ASYNC_SLOTS
148  #define CYTHON_USE_ASYNC_SLOTS 0
149  #undef CYTHON_USE_PYLIST_INTERNALS
150  #define CYTHON_USE_PYLIST_INTERNALS 0
151  #ifndef CYTHON_USE_UNICODE_INTERNALS
152  #define CYTHON_USE_UNICODE_INTERNALS 1
153  #endif
154  #undef CYTHON_USE_UNICODE_WRITER
155  #define CYTHON_USE_UNICODE_WRITER 0
156  #undef CYTHON_USE_PYLONG_INTERNALS
157  #define CYTHON_USE_PYLONG_INTERNALS 0
158  #ifndef CYTHON_AVOID_BORROWED_REFS
159  #define CYTHON_AVOID_BORROWED_REFS 0
160  #endif
161  #ifndef CYTHON_ASSUME_SAFE_MACROS
162  #define CYTHON_ASSUME_SAFE_MACROS 1
163  #endif
164  #ifndef CYTHON_UNPACK_METHODS
165  #define CYTHON_UNPACK_METHODS 1
166  #endif
167  #undef CYTHON_FAST_THREAD_STATE
168  #define CYTHON_FAST_THREAD_STATE 0
169  #undef CYTHON_FAST_PYCALL
170  #define CYTHON_FAST_PYCALL 0
171  #undef CYTHON_PEP489_MULTI_PHASE_INIT
172  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
173  #undef CYTHON_USE_TP_FINALIZE
174  #define CYTHON_USE_TP_FINALIZE 0
175  #undef CYTHON_USE_DICT_VERSIONS
176  #define CYTHON_USE_DICT_VERSIONS 0
177  #undef CYTHON_USE_EXC_INFO_STACK
178  #define CYTHON_USE_EXC_INFO_STACK 0
179 #else
180  #define CYTHON_COMPILING_IN_PYPY 0
181  #define CYTHON_COMPILING_IN_PYSTON 0
182  #define CYTHON_COMPILING_IN_CPYTHON 1
183  #ifndef CYTHON_USE_TYPE_SLOTS
184  #define CYTHON_USE_TYPE_SLOTS 1
185  #endif
186  #if PY_VERSION_HEX < 0x02070000
187  #undef CYTHON_USE_PYTYPE_LOOKUP
188  #define CYTHON_USE_PYTYPE_LOOKUP 0
189  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
190  #define CYTHON_USE_PYTYPE_LOOKUP 1
191  #endif
192  #if PY_MAJOR_VERSION < 3
193  #undef CYTHON_USE_ASYNC_SLOTS
194  #define CYTHON_USE_ASYNC_SLOTS 0
195  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
196  #define CYTHON_USE_ASYNC_SLOTS 1
197  #endif
198  #if PY_VERSION_HEX < 0x02070000
199  #undef CYTHON_USE_PYLONG_INTERNALS
200  #define CYTHON_USE_PYLONG_INTERNALS 0
201  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
202  #define CYTHON_USE_PYLONG_INTERNALS 1
203  #endif
204  #ifndef CYTHON_USE_PYLIST_INTERNALS
205  #define CYTHON_USE_PYLIST_INTERNALS 1
206  #endif
207  #ifndef CYTHON_USE_UNICODE_INTERNALS
208  #define CYTHON_USE_UNICODE_INTERNALS 1
209  #endif
210  #if PY_VERSION_HEX < 0x030300F0
211  #undef CYTHON_USE_UNICODE_WRITER
212  #define CYTHON_USE_UNICODE_WRITER 0
213  #elif !defined(CYTHON_USE_UNICODE_WRITER)
214  #define CYTHON_USE_UNICODE_WRITER 1
215  #endif
216  #ifndef CYTHON_AVOID_BORROWED_REFS
217  #define CYTHON_AVOID_BORROWED_REFS 0
218  #endif
219  #ifndef CYTHON_ASSUME_SAFE_MACROS
220  #define CYTHON_ASSUME_SAFE_MACROS 1
221  #endif
222  #ifndef CYTHON_UNPACK_METHODS
223  #define CYTHON_UNPACK_METHODS 1
224  #endif
225  #ifndef CYTHON_FAST_THREAD_STATE
226  #define CYTHON_FAST_THREAD_STATE 1
227  #endif
228  #ifndef CYTHON_FAST_PYCALL
229  #define CYTHON_FAST_PYCALL 1
230  #endif
231  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
232  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
233  #endif
234  #ifndef CYTHON_USE_TP_FINALIZE
235  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
236  #endif
237  #ifndef CYTHON_USE_DICT_VERSIONS
238  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
239  #endif
240  #ifndef CYTHON_USE_EXC_INFO_STACK
241  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
242  #endif
243 #endif
244 #if !defined(CYTHON_FAST_PYCCALL)
245 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
246 #endif
247 #if CYTHON_USE_PYLONG_INTERNALS
248  #include "longintrepr.h"
249  #undef SHIFT
250  #undef BASE
251  #undef MASK
252  #ifdef SIZEOF_VOID_P
253  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
254  #endif
255 #endif
256 #ifndef __has_attribute
257  #define __has_attribute(x) 0
258 #endif
259 #ifndef __has_cpp_attribute
260  #define __has_cpp_attribute(x) 0
261 #endif
262 #ifndef CYTHON_RESTRICT
263  #if defined(__GNUC__)
264  #define CYTHON_RESTRICT __restrict__
265  #elif defined(_MSC_VER) && _MSC_VER >= 1400
266  #define CYTHON_RESTRICT __restrict
267  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
268  #define CYTHON_RESTRICT restrict
269  #else
270  #define CYTHON_RESTRICT
271  #endif
272 #endif
273 #ifndef CYTHON_UNUSED
274 # if defined(__GNUC__)
275 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
276 # define CYTHON_UNUSED __attribute__ ((__unused__))
277 # else
278 # define CYTHON_UNUSED
279 # endif
280 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
281 # define CYTHON_UNUSED __attribute__ ((__unused__))
282 # else
283 # define CYTHON_UNUSED
284 # endif
285 #endif
286 #ifndef CYTHON_MAYBE_UNUSED_VAR
287 # if defined(__cplusplus)
288  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
289 # else
290 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
291 # endif
292 #endif
293 #ifndef CYTHON_NCP_UNUSED
294 # if CYTHON_COMPILING_IN_CPYTHON
295 # define CYTHON_NCP_UNUSED
296 # else
297 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
298 # endif
299 #endif
300 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
301 #ifdef _MSC_VER
302  #ifndef _MSC_STDINT_H_
303  #if _MSC_VER < 1300
304  typedef unsigned char uint8_t;
305  typedef unsigned int uint32_t;
306  #else
307  typedef unsigned __int8 uint8_t;
308  typedef unsigned __int32 uint32_t;
309  #endif
310  #endif
311 #else
312  #include <stdint.h>
313 #endif
314 #ifndef CYTHON_FALLTHROUGH
315  #if defined(__cplusplus) && __cplusplus >= 201103L
316  #if __has_cpp_attribute(fallthrough)
317  #define CYTHON_FALLTHROUGH [[fallthrough]]
318  #elif __has_cpp_attribute(clang::fallthrough)
319  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
320  #elif __has_cpp_attribute(gnu::fallthrough)
321  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
322  #endif
323  #endif
324  #ifndef CYTHON_FALLTHROUGH
325  #if __has_attribute(fallthrough)
326  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
327  #else
328  #define CYTHON_FALLTHROUGH
329  #endif
330  #endif
331  #if defined(__clang__ ) && defined(__apple_build_version__)
332  #if __apple_build_version__ < 7000000
333  #undef CYTHON_FALLTHROUGH
334  #define CYTHON_FALLTHROUGH
335  #endif
336  #endif
337 #endif
338 
339 #ifndef __cplusplus
340  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
341 #endif
342 #ifndef CYTHON_INLINE
343  #if defined(__clang__)
344  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
345  #else
346  #define CYTHON_INLINE inline
347  #endif
348 #endif
349 template<typename T>
350 void __Pyx_call_destructor(T& x) {
351  x.~T();
352 }
353 template<typename T>
354 class __Pyx_FakeReference {
355  public:
356  __Pyx_FakeReference() : ptr(NULL) { }
357  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
358  T *operator->() { return ptr; }
359  T *operator&() { return ptr; }
360  operator T&() { return *ptr; }
361  template<typename U> bool operator ==(U other) { return *ptr == other; }
362  template<typename U> bool operator !=(U other) { return *ptr != other; }
363  private:
364  T *ptr;
365 };
366 
367 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
368  #define Py_OptimizeFlag 0
369 #endif
370 #define __PYX_BUILD_PY_SSIZE_T "n"
371 #define CYTHON_FORMAT_SSIZE_T "z"
372 #if PY_MAJOR_VERSION < 3
373  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
374  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
375  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
376  #define __Pyx_DefaultClassType PyClass_Type
377 #else
378  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
379 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
380  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
381  PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
382 #else
383  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
384  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
385 #endif
386  #define __Pyx_DefaultClassType PyType_Type
387 #endif
388 #ifndef Py_TPFLAGS_CHECKTYPES
389  #define Py_TPFLAGS_CHECKTYPES 0
390 #endif
391 #ifndef Py_TPFLAGS_HAVE_INDEX
392  #define Py_TPFLAGS_HAVE_INDEX 0
393 #endif
394 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
395  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
396 #endif
397 #ifndef Py_TPFLAGS_HAVE_FINALIZE
398  #define Py_TPFLAGS_HAVE_FINALIZE 0
399 #endif
400 #ifndef METH_STACKLESS
401  #define METH_STACKLESS 0
402 #endif
403 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
404  #ifndef METH_FASTCALL
405  #define METH_FASTCALL 0x80
406  #endif
407  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
408  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
409  Py_ssize_t nargs, PyObject *kwnames);
410 #else
411  #define __Pyx_PyCFunctionFast _PyCFunctionFast
412  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
413 #endif
414 #if CYTHON_FAST_PYCCALL
415 #define __Pyx_PyFastCFunction_Check(func)\
416  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
417 #else
418 #define __Pyx_PyFastCFunction_Check(func) 0
419 #endif
420 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
421  #define PyObject_Malloc(s) PyMem_Malloc(s)
422  #define PyObject_Free(p) PyMem_Free(p)
423  #define PyObject_Realloc(p) PyMem_Realloc(p)
424 #endif
425 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
426  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
427  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
428  #define PyMem_RawFree(p) PyMem_Free(p)
429 #endif
430 #if CYTHON_COMPILING_IN_PYSTON
431  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
432  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
433 #else
434  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
435  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
436 #endif
437 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
438  #define __Pyx_PyThreadState_Current PyThreadState_GET()
439 #elif PY_VERSION_HEX >= 0x03060000
440  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
441 #elif PY_VERSION_HEX >= 0x03000000
442  #define __Pyx_PyThreadState_Current PyThreadState_GET()
443 #else
444  #define __Pyx_PyThreadState_Current _PyThreadState_Current
445 #endif
446 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
447 #include "pythread.h"
448 #define Py_tss_NEEDS_INIT 0
449 typedef int Py_tss_t;
450 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
451  *key = PyThread_create_key();
452  return 0;
453 }
454 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
455  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
456  *key = Py_tss_NEEDS_INIT;
457  return key;
458 }
459 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
460  PyObject_Free(key);
461 }
462 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
463  return *key != Py_tss_NEEDS_INIT;
464 }
465 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
466  PyThread_delete_key(*key);
467  *key = Py_tss_NEEDS_INIT;
468 }
469 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
470  return PyThread_set_key_value(*key, value);
471 }
472 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
473  return PyThread_get_key_value(*key);
474 }
475 #endif
476 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
477 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
478 #else
479 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
480 #endif
481 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
482  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
483  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
484 #else
485  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
486  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
487 #endif
488 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
489 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
490 #else
491 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
492 #endif
493 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
494  #define CYTHON_PEP393_ENABLED 1
495  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
496  0 : _PyUnicode_Ready((PyObject *)(op)))
497  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
498  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
499  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
500  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
501  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
502  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
503  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
504  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
505 #else
506  #define CYTHON_PEP393_ENABLED 0
507  #define PyUnicode_1BYTE_KIND 1
508  #define PyUnicode_2BYTE_KIND 2
509  #define PyUnicode_4BYTE_KIND 4
510  #define __Pyx_PyUnicode_READY(op) (0)
511  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
512  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
513  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
514  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
515  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
516  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
517  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
518  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
519 #endif
520 #if CYTHON_COMPILING_IN_PYPY
521  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
522  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
523 #else
524  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
525  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
526  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
527 #endif
528 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
529  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
530 #endif
531 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
532  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
533 #endif
534 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
535  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
536 #endif
537 #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))
538 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
539 #if PY_MAJOR_VERSION >= 3
540  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
541 #else
542  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
543 #endif
544 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
545  #define PyObject_ASCII(o) PyObject_Repr(o)
546 #endif
547 #if PY_MAJOR_VERSION >= 3
548  #define PyBaseString_Type PyUnicode_Type
549  #define PyStringObject PyUnicodeObject
550  #define PyString_Type PyUnicode_Type
551  #define PyString_Check PyUnicode_Check
552  #define PyString_CheckExact PyUnicode_CheckExact
553  #define PyObject_Unicode PyObject_Str
554 #endif
555 #if PY_MAJOR_VERSION >= 3
556  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
557  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
558 #else
559  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
560  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
561 #endif
562 #ifndef PySet_CheckExact
563  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
564 #endif
565 #if CYTHON_ASSUME_SAFE_MACROS
566  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
567 #else
568  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
569 #endif
570 #if PY_MAJOR_VERSION >= 3
571  #define PyIntObject PyLongObject
572  #define PyInt_Type PyLong_Type
573  #define PyInt_Check(op) PyLong_Check(op)
574  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
575  #define PyInt_FromString PyLong_FromString
576  #define PyInt_FromUnicode PyLong_FromUnicode
577  #define PyInt_FromLong PyLong_FromLong
578  #define PyInt_FromSize_t PyLong_FromSize_t
579  #define PyInt_FromSsize_t PyLong_FromSsize_t
580  #define PyInt_AsLong PyLong_AsLong
581  #define PyInt_AS_LONG PyLong_AS_LONG
582  #define PyInt_AsSsize_t PyLong_AsSsize_t
583  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
584  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
585  #define PyNumber_Int PyNumber_Long
586 #endif
587 #if PY_MAJOR_VERSION >= 3
588  #define PyBoolObject PyLongObject
589 #endif
590 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
591  #ifndef PyUnicode_InternFromString
592  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
593  #endif
594 #endif
595 #if PY_VERSION_HEX < 0x030200A4
596  typedef long Py_hash_t;
597  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
598  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
599 #else
600  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
601  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
602 #endif
603 #if PY_MAJOR_VERSION >= 3
604  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
605 #else
606  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
607 #endif
608 #if CYTHON_USE_ASYNC_SLOTS
609  #if PY_VERSION_HEX >= 0x030500B1
610  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
611  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
612  #else
613  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
614  #endif
615 #else
616  #define __Pyx_PyType_AsAsync(obj) NULL
617 #endif
618 #ifndef __Pyx_PyAsyncMethodsStruct
619  typedef struct {
620  unaryfunc am_await;
621  unaryfunc am_aiter;
622  unaryfunc am_anext;
623  } __Pyx_PyAsyncMethodsStruct;
624 #endif
625 
626 #if defined(WIN32) || defined(MS_WINDOWS)
627  #define _USE_MATH_DEFINES
628 #endif
629 #include <math.h>
630 #ifdef NAN
631 #define __PYX_NAN() ((float) NAN)
632 #else
633 static CYTHON_INLINE float __PYX_NAN() {
634  float value;
635  memset(&value, 0xFF, sizeof(value));
636  return value;
637 }
638 #endif
639 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
640 #define __Pyx_truncl trunc
641 #else
642 #define __Pyx_truncl truncl
643 #endif
644 
645 
646 #define __PYX_ERR(f_index, lineno, Ln_error) \
647 { \
648  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
649 }
650 
651 #ifndef __PYX_EXTERN_C
652  #ifdef __cplusplus
653  #define __PYX_EXTERN_C extern "C"
654  #else
655  #define __PYX_EXTERN_C extern
656  #endif
657 #endif
658 
659 #define __PYX_HAVE__PyClical
660 #define __PYX_HAVE_API__PyClical
661 /* Early includes */
662 #include "ios"
663 #include "new"
664 #include "stdexcept"
665 #include "typeinfo"
666 #include <vector>
667 #include "PyClical.h"
668 #ifdef _OPENMP
669 #include <omp.h>
670 #endif /* _OPENMP */
671 
672 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
673 #define CYTHON_WITHOUT_ASSERTIONS
674 #endif
675 
676 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
677  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
678 
679 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
680 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
681 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
682 #define __PYX_DEFAULT_STRING_ENCODING ""
683 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
684 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
685 #define __Pyx_uchar_cast(c) ((unsigned char)c)
686 #define __Pyx_long_cast(x) ((long)x)
687 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
688  (sizeof(type) < sizeof(Py_ssize_t)) ||\
689  (sizeof(type) > sizeof(Py_ssize_t) &&\
690  likely(v < (type)PY_SSIZE_T_MAX ||\
691  v == (type)PY_SSIZE_T_MAX) &&\
692  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
693  v == (type)PY_SSIZE_T_MIN))) ||\
694  (sizeof(type) == sizeof(Py_ssize_t) &&\
695  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
696  v == (type)PY_SSIZE_T_MAX))) )
697 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
698  return (size_t) i < (size_t) limit;
699 }
700 #if defined (__cplusplus) && __cplusplus >= 201103L
701  #include <cstdlib>
702  #define __Pyx_sst_abs(value) std::abs(value)
703 #elif SIZEOF_INT >= SIZEOF_SIZE_T
704  #define __Pyx_sst_abs(value) abs(value)
705 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
706  #define __Pyx_sst_abs(value) labs(value)
707 #elif defined (_MSC_VER)
708  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
709 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
710  #define __Pyx_sst_abs(value) llabs(value)
711 #elif defined (__GNUC__)
712  #define __Pyx_sst_abs(value) __builtin_llabs(value)
713 #else
714  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
715 #endif
716 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
717 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
718 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
719 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
720 #define __Pyx_PyBytes_FromString PyBytes_FromString
721 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
722 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
723 #if PY_MAJOR_VERSION < 3
724  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
725  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
726 #else
727  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
728  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
729 #endif
730 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
731 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
732 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
733 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
734 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
735 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
736 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
737 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
738 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
739 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
740 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
741 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
742 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
743 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
744 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
745 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
746 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
747  const Py_UNICODE *u_end = u;
748  while (*u_end++) ;
749  return (size_t)(u_end - u - 1);
750 }
751 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
752 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
753 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
754 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
755 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
756 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
757 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
758 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
759 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
760 #define __Pyx_PySequence_Tuple(obj)\
761  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
762 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
763 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
764 #if CYTHON_ASSUME_SAFE_MACROS
765 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
766 #else
767 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
768 #endif
769 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
770 #if PY_MAJOR_VERSION >= 3
771 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
772 #else
773 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
774 #endif
775 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
776 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
777 static int __Pyx_sys_getdefaultencoding_not_ascii;
778 static int __Pyx_init_sys_getdefaultencoding_params(void) {
779  PyObject* sys;
780  PyObject* default_encoding = NULL;
781  PyObject* ascii_chars_u = NULL;
782  PyObject* ascii_chars_b = NULL;
783  const char* default_encoding_c;
784  sys = PyImport_ImportModule("sys");
785  if (!sys) goto bad;
786  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
787  Py_DECREF(sys);
788  if (!default_encoding) goto bad;
789  default_encoding_c = PyBytes_AsString(default_encoding);
790  if (!default_encoding_c) goto bad;
791  if (strcmp(default_encoding_c, "ascii") == 0) {
792  __Pyx_sys_getdefaultencoding_not_ascii = 0;
793  } else {
794  char ascii_chars[128];
795  int c;
796  for (c = 0; c < 128; c++) {
797  ascii_chars[c] = c;
798  }
799  __Pyx_sys_getdefaultencoding_not_ascii = 1;
800  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
801  if (!ascii_chars_u) goto bad;
802  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
803  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
804  PyErr_Format(
805  PyExc_ValueError,
806  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
807  default_encoding_c);
808  goto bad;
809  }
810  Py_DECREF(ascii_chars_u);
811  Py_DECREF(ascii_chars_b);
812  }
813  Py_DECREF(default_encoding);
814  return 0;
815 bad:
816  Py_XDECREF(default_encoding);
817  Py_XDECREF(ascii_chars_u);
818  Py_XDECREF(ascii_chars_b);
819  return -1;
820 }
821 #endif
822 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
823 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
824 #else
825 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
826 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
827 static char* __PYX_DEFAULT_STRING_ENCODING;
828 static int __Pyx_init_sys_getdefaultencoding_params(void) {
829  PyObject* sys;
830  PyObject* default_encoding = NULL;
831  char* default_encoding_c;
832  sys = PyImport_ImportModule("sys");
833  if (!sys) goto bad;
834  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
835  Py_DECREF(sys);
836  if (!default_encoding) goto bad;
837  default_encoding_c = PyBytes_AsString(default_encoding);
838  if (!default_encoding_c) goto bad;
839  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
840  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
841  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
842  Py_DECREF(default_encoding);
843  return 0;
844 bad:
845  Py_XDECREF(default_encoding);
846  return -1;
847 }
848 #endif
849 #endif
850 
851 
852 /* Test for GCC > 2.95 */
853 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
854  #define likely(x) __builtin_expect(!!(x), 1)
855  #define unlikely(x) __builtin_expect(!!(x), 0)
856 #else /* !__GNUC__ or GCC < 2.95 */
857  #define likely(x) (x)
858  #define unlikely(x) (x)
859 #endif /* __GNUC__ */
860 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
861 
862 static PyObject *__pyx_m = NULL;
863 static PyObject *__pyx_d;
864 static PyObject *__pyx_b;
865 static PyObject *__pyx_cython_runtime = NULL;
866 static PyObject *__pyx_empty_tuple;
867 static PyObject *__pyx_empty_bytes;
868 static PyObject *__pyx_empty_unicode;
869 static int __pyx_lineno;
870 static int __pyx_clineno = 0;
871 static const char * __pyx_cfilenm= __FILE__;
872 static const char *__pyx_filename;
873 
874 
875 static const char *__pyx_f[] = {
876  "PyClical.pyx",
877  "stringsource",
878 };
879 
880 /*--- Type declarations ---*/
881 struct __pyx_obj_8PyClical_index_set;
882 struct __pyx_obj_8PyClical_clifford;
883 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
884 struct __pyx_opt_args_8PyClical_sqrt;
885 struct __pyx_opt_args_8PyClical_log;
886 struct __pyx_opt_args_8PyClical_cos;
887 struct __pyx_opt_args_8PyClical_acos;
888 struct __pyx_opt_args_8PyClical_acosh;
889 struct __pyx_opt_args_8PyClical_sin;
890 struct __pyx_opt_args_8PyClical_asin;
891 struct __pyx_opt_args_8PyClical_asinh;
892 struct __pyx_opt_args_8PyClical_tan;
893 struct __pyx_opt_args_8PyClical_atan;
894 struct __pyx_opt_args_8PyClical_atanh;
895 struct __pyx_opt_args_8PyClical_random_clifford;
896 
897 /* "PyClical.pyx":1542
898  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
899  *
900  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
901  * """
902  * Square root of multivector with optional complexifier.
903  */
904 struct __pyx_opt_args_8PyClical_sqrt {
905  int __pyx_n;
906  PyObject *i;
907 };
908 
909 /* "PyClical.pyx":1579
910  * return clifford().wrap( glucat.exp(toClifford(obj)) )
911  *
912  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
913  * """
914  * Natural logarithm of multivector with optional complexifier.
915  */
916 struct __pyx_opt_args_8PyClical_log {
917  int __pyx_n;
918  PyObject *i;
919 };
920 
921 /* "PyClical.pyx":1602
922  * return clifford().wrap( glucat.log(toClifford(obj)) )
923  *
924  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
925  * """
926  * Cosine of multivector with optional complexifier.
927  */
928 struct __pyx_opt_args_8PyClical_cos {
929  int __pyx_n;
930  PyObject *i;
931 };
932 
933 /* "PyClical.pyx":1619
934  * return clifford().wrap( glucat.cos(toClifford(obj)) )
935  *
936  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
937  * """
938  * Inverse cosine of multivector with optional complexifier.
939  */
940 struct __pyx_opt_args_8PyClical_acos {
941  int __pyx_n;
942  PyObject *i;
943 };
944 
945 /* "PyClical.pyx":1656
946  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
947  *
948  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
949  * """
950  * Inverse hyperbolic cosine of multivector with optional complexifier.
951  */
952 struct __pyx_opt_args_8PyClical_acosh {
953  int __pyx_n;
954  PyObject *i;
955 };
956 
957 /* "PyClical.pyx":1679
958  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
959  *
960  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
961  * """
962  * Sine of multivector with optional complexifier.
963  */
964 struct __pyx_opt_args_8PyClical_sin {
965  int __pyx_n;
966  PyObject *i;
967 };
968 
969 /* "PyClical.pyx":1698
970  * return clifford().wrap( glucat.sin(toClifford(obj)) )
971  *
972  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
973  * """
974  * Inverse sine of multivector with optional complexifier.
975  */
976 struct __pyx_opt_args_8PyClical_asin {
977  int __pyx_n;
978  PyObject *i;
979 };
980 
981 /* "PyClical.pyx":1733
982  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
983  *
984  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
985  * """
986  * Inverse hyperbolic sine of multivector with optional complexifier.
987  */
988 struct __pyx_opt_args_8PyClical_asinh {
989  int __pyx_n;
990  PyObject *i;
991 };
992 
993 /* "PyClical.pyx":1752
994  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
995  *
996  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
997  * """
998  * Tangent of multivector with optional complexifier.
999  */
1000 struct __pyx_opt_args_8PyClical_tan {
1001  int __pyx_n;
1002  PyObject *i;
1003 };
1004 
1005 /* "PyClical.pyx":1769
1006  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1007  *
1008  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1009  * """
1010  * Inverse tangent of multivector with optional complexifier.
1011  */
1012 struct __pyx_opt_args_8PyClical_atan {
1013  int __pyx_n;
1014  PyObject *i;
1015 };
1016 
1017 /* "PyClical.pyx":1798
1018  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1019  *
1020  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1021  * """
1022  * Inverse hyperbolic tangent of multivector with optional complexifier.
1023  */
1024 struct __pyx_opt_args_8PyClical_atanh {
1025  int __pyx_n;
1026  PyObject *i;
1027 };
1028 
1029 /* "PyClical.pyx":1815
1030  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1031  *
1032  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1033  * """
1034  * Random multivector within a frame.
1035  */
1036 struct __pyx_opt_args_8PyClical_random_clifford {
1037  int __pyx_n;
1038  PyObject *fill;
1039 };
1040 
1041 /* "PyClical.pyx":37
1042  *
1043  * # Forward reference
1044  * cdef class index_set # <<<<<<<<<<<<<<
1045  *
1046  * cdef inline IndexSet toIndexSet(obj):
1047  */
1048 struct __pyx_obj_8PyClical_index_set {
1049  PyObject_HEAD
1050  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1051  IndexSet *instance;
1052 };
1053 
1054 
1055 /* "PyClical.pyx":530
1056  *
1057  * # Forward reference.
1058  * cdef class clifford # <<<<<<<<<<<<<<
1059  *
1060  * cdef inline Clifford toClifford(obj):
1061  */
1062 struct __pyx_obj_8PyClical_clifford {
1063  PyObject_HEAD
1064  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1065  Clifford *instance;
1066 };
1067 
1068 
1069 /* "PyClical.pyx":227
1070  * return self.instance.getitem(idx)
1071  *
1072  * def __iter__(self): # <<<<<<<<<<<<<<
1073  * """
1074  * Iterate over the indices of an index_set.
1075  */
1076 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1077  PyObject_HEAD
1078  PyObject *__pyx_v_idx;
1079  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1080  PyObject *__pyx_t_0;
1081  Py_ssize_t __pyx_t_1;
1082  PyObject *(*__pyx_t_2)(PyObject *);
1083 };
1084 
1085 
1086 
1087 /* "PyClical.pyx":45
1088  * return index_set(obj).instance[0]
1089  *
1090  * cdef class index_set: # <<<<<<<<<<<<<<
1091  * """
1092  * Python class index_set wraps C++ class IndexSet.
1093  */
1094 
1095 struct __pyx_vtabstruct_8PyClical_index_set {
1096  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1097  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1098  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1099 };
1100 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1101 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1102 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1103 
1104 
1105 /* "PyClical.pyx":535
1106  * return clifford(obj).instance[0]
1107  *
1108  * cdef class clifford: # <<<<<<<<<<<<<<
1109  * """
1110  * Python class clifford wraps C++ class Clifford.
1111  */
1112 
1113 struct __pyx_vtabstruct_8PyClical_clifford {
1114  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1115  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1116  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1117 };
1118 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1119 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1120 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1121 
1122 /* --- Runtime support code (head) --- */
1123 /* Refnanny.proto */
1124 #ifndef CYTHON_REFNANNY
1125  #define CYTHON_REFNANNY 0
1126 #endif
1127 #if CYTHON_REFNANNY
1128  typedef struct {
1129  void (*INCREF)(void*, PyObject*, int);
1130  void (*DECREF)(void*, PyObject*, int);
1131  void (*GOTREF)(void*, PyObject*, int);
1132  void (*GIVEREF)(void*, PyObject*, int);
1133  void* (*SetupContext)(const char*, int, const char*);
1134  void (*FinishContext)(void**);
1135  } __Pyx_RefNannyAPIStruct;
1136  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1137  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1138  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1139 #ifdef WITH_THREAD
1140  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1141  if (acquire_gil) {\
1142  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1143  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1144  PyGILState_Release(__pyx_gilstate_save);\
1145  } else {\
1146  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1147  }
1148 #else
1149  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1150  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1151 #endif
1152  #define __Pyx_RefNannyFinishContext()\
1153  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1154  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1155  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1156  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1157  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1158  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1159  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1160  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1161  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1162 #else
1163  #define __Pyx_RefNannyDeclarations
1164  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1165  #define __Pyx_RefNannyFinishContext()
1166  #define __Pyx_INCREF(r) Py_INCREF(r)
1167  #define __Pyx_DECREF(r) Py_DECREF(r)
1168  #define __Pyx_GOTREF(r)
1169  #define __Pyx_GIVEREF(r)
1170  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1171  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1172  #define __Pyx_XGOTREF(r)
1173  #define __Pyx_XGIVEREF(r)
1174 #endif
1175 #define __Pyx_XDECREF_SET(r, v) do {\
1176  PyObject *tmp = (PyObject *) r;\
1177  r = v; __Pyx_XDECREF(tmp);\
1178  } while (0)
1179 #define __Pyx_DECREF_SET(r, v) do {\
1180  PyObject *tmp = (PyObject *) r;\
1181  r = v; __Pyx_DECREF(tmp);\
1182  } while (0)
1183 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1184 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1185 
1186 /* PyObjectGetAttrStr.proto */
1187 #if CYTHON_USE_TYPE_SLOTS
1188 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1189 #else
1190 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1191 #endif
1192 
1193 /* GetBuiltinName.proto */
1194 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1195 
1196 /* PyCFunctionFastCall.proto */
1197 #if CYTHON_FAST_PYCCALL
1198 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1199 #else
1200 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1201 #endif
1202 
1203 /* PyFunctionFastCall.proto */
1204 #if CYTHON_FAST_PYCALL
1205 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1206  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1207 #if 1 || PY_VERSION_HEX < 0x030600B1
1208 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1209 #else
1210 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1211 #endif
1212 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1213  (sizeof(char [1 - 2*!(cond)]) - 1)
1214 #ifndef Py_MEMBER_SIZE
1215 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1216 #endif
1217  static size_t __pyx_pyframe_localsplus_offset = 0;
1218  #include "frameobject.h"
1219  #define __Pxy_PyFrame_Initialize_Offsets()\
1220  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1221  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1222  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1223  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1224 #endif
1225 
1226 /* PyObjectCall.proto */
1227 #if CYTHON_COMPILING_IN_CPYTHON
1228 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1229 #else
1230 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1231 #endif
1232 
1233 /* PyObjectCallMethO.proto */
1234 #if CYTHON_COMPILING_IN_CPYTHON
1235 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1236 #endif
1237 
1238 /* PyObjectCallOneArg.proto */
1239 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1240 
1241 /* PyThreadStateGet.proto */
1242 #if CYTHON_FAST_THREAD_STATE
1243 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1244 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1245 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1246 #else
1247 #define __Pyx_PyThreadState_declare
1248 #define __Pyx_PyThreadState_assign
1249 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1250 #endif
1251 
1252 /* PyErrFetchRestore.proto */
1253 #if CYTHON_FAST_THREAD_STATE
1254 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1255 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1256 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1257 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1258 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1259 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1260 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1261 #if CYTHON_COMPILING_IN_CPYTHON
1262 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1263 #else
1264 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1265 #endif
1266 #else
1267 #define __Pyx_PyErr_Clear() PyErr_Clear()
1268 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1269 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1270 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1271 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1272 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1273 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1274 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1275 #endif
1276 
1277 /* WriteUnraisableException.proto */
1278 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1279  int lineno, const char *filename,
1280  int full_traceback, int nogil);
1281 
1282 /* PyDictVersioning.proto */
1283 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1284 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1285 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1286 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1287  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1288  (cache_var) = (value);
1289 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1290  static PY_UINT64_T __pyx_dict_version = 0;\
1291  static PyObject *__pyx_dict_cached_value = NULL;\
1292  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1293  (VAR) = __pyx_dict_cached_value;\
1294  } else {\
1295  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1296  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1297  }\
1298 }
1299 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1300 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1301 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1302 #else
1303 #define __PYX_GET_DICT_VERSION(dict) (0)
1304 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1305 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1306 #endif
1307 
1308 /* PyObjectCallNoArg.proto */
1309 #if CYTHON_COMPILING_IN_CPYTHON
1310 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1311 #else
1312 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1313 #endif
1314 
1315 /* RaiseDoubleKeywords.proto */
1316 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1317 
1318 /* ParseKeywords.proto */
1319 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1320  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1321  const char* function_name);
1322 
1323 /* RaiseArgTupleInvalid.proto */
1324 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1325  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1326 
1327 /* GetModuleGlobalName.proto */
1328 #if CYTHON_USE_DICT_VERSIONS
1329 #define __Pyx_GetModuleGlobalName(var, name) {\
1330  static PY_UINT64_T __pyx_dict_version = 0;\
1331  static PyObject *__pyx_dict_cached_value = NULL;\
1332  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1333  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1334  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1335 }
1336 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1337  PY_UINT64_T __pyx_dict_version;\
1338  PyObject *__pyx_dict_cached_value;\
1339  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1340 }
1341 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1342 #else
1343 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1344 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1345 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1346 #endif
1347 
1348 /* GetTopmostException.proto */
1349 #if CYTHON_USE_EXC_INFO_STACK
1350 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1351 #endif
1352 
1353 /* SaveResetException.proto */
1354 #if CYTHON_FAST_THREAD_STATE
1355 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1356 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1357 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1358 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1359 #else
1360 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1361 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1362 #endif
1363 
1364 /* PyErrExceptionMatches.proto */
1365 #if CYTHON_FAST_THREAD_STATE
1366 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1367 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1368 #else
1369 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1370 #endif
1371 
1372 /* GetException.proto */
1373 #if CYTHON_FAST_THREAD_STATE
1374 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1375 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1376 #else
1377 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1378 #endif
1379 
1380 /* RaiseException.proto */
1381 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1382 
1383 /* PyIntBinop.proto */
1384 #if !CYTHON_COMPILING_IN_PYPY
1385 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1386 #else
1387 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1388  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1389 #endif
1390 
1391 /* PySequenceContains.proto */
1392 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1393  int result = PySequence_Contains(seq, item);
1394  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1395 }
1396 
1397 /* SetItemInt.proto */
1398 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1399  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1400  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1401  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1402  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1403 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1404 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1405  int is_list, int wraparound, int boundscheck);
1406 
1407 /* PyObjectCall2Args.proto */
1408 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1409 
1410 /* ArgTypeTest.proto */
1411 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1412  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1413  __Pyx__ArgTypeTest(obj, type, name, exact))
1414 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1415 
1416 /* Import.proto */
1417 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1418 
1419 /* IncludeStringH.proto */
1420 #include <string.h>
1421 
1422 /* PyObject_GenericGetAttrNoDict.proto */
1423 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1424 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1425 #else
1426 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1427 #endif
1428 
1429 /* PyObject_GenericGetAttr.proto */
1430 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1431 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1432 #else
1433 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1434 #endif
1435 
1436 /* SetVTable.proto */
1437 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1438 
1439 /* SetupReduce.proto */
1440 static int __Pyx_setup_reduce(PyObject* type_obj);
1441 
1442 /* PyFloatBinop.proto */
1443 #if !CYTHON_COMPILING_IN_PYPY
1444 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1445 #else
1446 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
1447  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1448  #endif
1449 
1450 /* BytesEquals.proto */
1451 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1452 
1453 /* UnicodeEquals.proto */
1454 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1455 
1456 /* StrEquals.proto */
1457 #if PY_MAJOR_VERSION >= 3
1458 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1459 #else
1460 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1461 #endif
1462 
1463 /* CLineInTraceback.proto */
1464 #ifdef CYTHON_CLINE_IN_TRACEBACK
1465 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1466 #else
1467 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1468 #endif
1469 
1470 /* CodeObjectCache.proto */
1471 typedef struct {
1472  PyCodeObject* code_object;
1473  int code_line;
1474 } __Pyx_CodeObjectCacheEntry;
1475 struct __Pyx_CodeObjectCache {
1476  int count;
1477  int max_count;
1478  __Pyx_CodeObjectCacheEntry* entries;
1479 };
1480 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1481 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1482 static PyCodeObject *__pyx_find_code_object(int code_line);
1483 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1484 
1485 /* AddTraceback.proto */
1486 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1487  int py_line, const char *filename);
1488 
1489 /* CppExceptionConversion.proto */
1490 #ifndef __Pyx_CppExn2PyErr
1491 #include <new>
1492 #include <typeinfo>
1493 #include <stdexcept>
1494 #include <ios>
1495 static void __Pyx_CppExn2PyErr() {
1496  try {
1497  if (PyErr_Occurred())
1498  ; // let the latest Python exn pass through and ignore the current one
1499  else
1500  throw;
1501  } catch (const std::bad_alloc& exn) {
1502  PyErr_SetString(PyExc_MemoryError, exn.what());
1503  } catch (const std::bad_cast& exn) {
1504  PyErr_SetString(PyExc_TypeError, exn.what());
1505  } catch (const std::bad_typeid& exn) {
1506  PyErr_SetString(PyExc_TypeError, exn.what());
1507  } catch (const std::domain_error& exn) {
1508  PyErr_SetString(PyExc_ValueError, exn.what());
1509  } catch (const std::invalid_argument& exn) {
1510  PyErr_SetString(PyExc_ValueError, exn.what());
1511  } catch (const std::ios_base::failure& exn) {
1512  PyErr_SetString(PyExc_IOError, exn.what());
1513  } catch (const std::out_of_range& exn) {
1514  PyErr_SetString(PyExc_IndexError, exn.what());
1515  } catch (const std::overflow_error& exn) {
1516  PyErr_SetString(PyExc_OverflowError, exn.what());
1517  } catch (const std::range_error& exn) {
1518  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1519  } catch (const std::underflow_error& exn) {
1520  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1521  } catch (const std::exception& exn) {
1522  PyErr_SetString(PyExc_RuntimeError, exn.what());
1523  }
1524  catch (...)
1525  {
1526  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1527  }
1528 }
1529 #endif
1530 
1531 /* CIntToPy.proto */
1532 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1533 
1534 /* CIntFromPy.proto */
1535 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1536 
1537 /* CIntToPy.proto */
1538 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1539 
1540 /* CIntFromPy.proto */
1541 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1542 
1543 /* FastTypeChecks.proto */
1544 #if CYTHON_COMPILING_IN_CPYTHON
1545 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1546 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1547 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1548 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1549 #else
1550 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1551 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1552 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1553 #endif
1554 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1555 
1556 /* FetchCommonType.proto */
1557 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1558 
1559 /* SwapException.proto */
1560 #if CYTHON_FAST_THREAD_STATE
1561 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1562 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1563 #else
1564 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1565 #endif
1566 
1567 /* PyObjectGetMethod.proto */
1568 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1569 
1570 /* PyObjectCallMethod1.proto */
1571 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1572 
1573 /* CoroutineBase.proto */
1574 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1575 #if CYTHON_USE_EXC_INFO_STACK
1576 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1577 #else
1578 typedef struct {
1579  PyObject *exc_type;
1580  PyObject *exc_value;
1581  PyObject *exc_traceback;
1582 } __Pyx_ExcInfoStruct;
1583 #endif
1584 typedef struct {
1585  PyObject_HEAD
1586  __pyx_coroutine_body_t body;
1587  PyObject *closure;
1588  __Pyx_ExcInfoStruct gi_exc_state;
1589  PyObject *gi_weakreflist;
1590  PyObject *classobj;
1591  PyObject *yieldfrom;
1592  PyObject *gi_name;
1593  PyObject *gi_qualname;
1594  PyObject *gi_modulename;
1595  PyObject *gi_code;
1596  int resume_label;
1597  char is_running;
1598 } __pyx_CoroutineObject;
1599 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1600  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1601  PyObject *name, PyObject *qualname, PyObject *module_name);
1602 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1603  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1604  PyObject *name, PyObject *qualname, PyObject *module_name);
1605 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1606 static int __Pyx_Coroutine_clear(PyObject *self);
1607 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1608 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1609 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1610 #if CYTHON_USE_EXC_INFO_STACK
1611 #define __Pyx_Coroutine_SwapException(self)
1612 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1613 #else
1614 #define __Pyx_Coroutine_SwapException(self) {\
1615  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1616  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1617  }
1618 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1619  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1620  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1621  }
1622 #endif
1623 #if CYTHON_FAST_THREAD_STATE
1624 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1625  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1626 #else
1627 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1628  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1629 #endif
1630 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1631 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1632 
1633 /* PatchModuleWithCoroutine.proto */
1634 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1635 
1636 /* PatchGeneratorABC.proto */
1637 static int __Pyx_patch_abc(void);
1638 
1639 /* Generator.proto */
1640 #define __Pyx_Generator_USED
1641 static PyTypeObject *__pyx_GeneratorType = 0;
1642 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1643 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1644  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1645 static PyObject *__Pyx_Generator_Next(PyObject *self);
1646 static int __pyx_Generator_init(void);
1647 
1648 /* CheckBinaryVersion.proto */
1649 static int __Pyx_check_binary_version(void);
1650 
1651 /* InitStrings.proto */
1652 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1653 
1654 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1655 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1656 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1657 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1658 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1659 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1660 
1661 /* Module declarations from 'libcpp.vector' */
1662 
1663 /* Module declarations from 'glucat' */
1664 
1665 /* Module declarations from 'PyClical' */
1666 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1667 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1668 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1669 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1670 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1671 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1672 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1673 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1674 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1675 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1676 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1677 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1678 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1679 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1680 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1681 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1682 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1683 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1684 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1685 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1686 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1687 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1688 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1689 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1690 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1691 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1692 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1693 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1694 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1695 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1696 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1697 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1698 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1699 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1700 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1701 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1702 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1703 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1704 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1705 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1706 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1707 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*/
1708 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1709 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1710 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1711 #define __Pyx_MODULE_NAME "PyClical"
1712 extern int __pyx_module_is_main_PyClical;
1713 int __pyx_module_is_main_PyClical = 0;
1714 
1715 /* Implementation of 'PyClical' */
1716 static PyObject *__pyx_builtin_IndexError;
1717 static PyObject *__pyx_builtin_RuntimeError;
1718 static PyObject *__pyx_builtin_TypeError;
1719 static PyObject *__pyx_builtin_ValueError;
1720 static PyObject *__pyx_builtin_NotImplemented;
1721 static PyObject *__pyx_builtin_range;
1722 static PyObject *__pyx_builtin_xrange;
1723 static const char __pyx_k_[] = ".";
1724 static const char __pyx_k_e[] = "e";
1725 static const char __pyx_k_i[] = "i";
1726 static const char __pyx_k_m[] = "m";
1727 static const char __pyx_k_p[] = "p";
1728 static const char __pyx_k_q[] = "q";
1729 static const char __pyx_k__2[] = " ";
1730 static const char __pyx_k__5[] = ":";
1731 static const char __pyx_k__6[] = "\n\t";
1732 static const char __pyx_k__7[] = " (";
1733 static const char __pyx_k__8[] = ", ";
1734 static const char __pyx_k__9[] = ").";
1735 static const char __pyx_k_cl[] = "cl";
1736 static const char __pyx_k_pi[] = "pi";
1737 static const char __pyx_k_cos[] = "cos";
1738 static const char __pyx_k_exp[] = "exp";
1739 static const char __pyx_k_frm[] = "frm";
1740 static const char __pyx_k_inv[] = "inv";
1741 static const char __pyx_k_ist[] = "ist";
1742 static const char __pyx_k_ixt[] = "ixt";
1743 static const char __pyx_k_lhs[] = "lhs";
1744 static const char __pyx_k_log[] = "log";
1745 static const char __pyx_k_max[] = "max";
1746 static const char __pyx_k_min[] = "min";
1747 static const char __pyx_k_obj[] = "obj";
1748 static const char __pyx_k_odd[] = "odd";
1749 static const char __pyx_k_pow[] = "pow";
1750 static const char __pyx_k_rhs[] = "rhs";
1751 static const char __pyx_k_sin[] = "sin";
1752 static const char __pyx_k_tan[] = "tan";
1753 static const char __pyx_k_tau[] = "tau";
1754 static const char __pyx_k_Real[] = "Real";
1755 static const char __pyx_k_acos[] = "acos";
1756 static const char __pyx_k_args[] = "args";
1757 static const char __pyx_k_asin[] = "asin";
1758 static const char __pyx_k_atan[] = "atan";
1759 static const char __pyx_k_conj[] = "conj";
1760 static const char __pyx_k_copy[] = "copy";
1761 static const char __pyx_k_cosh[] = "cosh";
1762 static const char __pyx_k_even[] = "even";
1763 static const char __pyx_k_fill[] = "fill";
1764 static const char __pyx_k_from[] = " from ";
1765 static const char __pyx_k_iter[] = "__iter__";
1766 static const char __pyx_k_main[] = "__main__";
1767 static const char __pyx_k_math[] = "math";
1768 static const char __pyx_k_name[] = "__name__";
1769 static const char __pyx_k_norm[] = "norm";
1770 static const char __pyx_k_pure[] = "pure";
1771 static const char __pyx_k_quad[] = "quad";
1772 static const char __pyx_k_send[] = "send";
1773 static const char __pyx_k_sinh[] = "sinh";
1774 static const char __pyx_k_sqrt[] = "sqrt";
1775 static const char __pyx_k_tanh[] = "tanh";
1776 static const char __pyx_k_test[] = "_test";
1777 static const char __pyx_k_0_8_2[] = "0.8.2";
1778 static const char __pyx_k_acosh[] = "acosh";
1779 static const char __pyx_k_asinh[] = "asinh";
1780 static const char __pyx_k_atanh[] = "atanh";
1781 static const char __pyx_k_close[] = "close";
1782 static const char __pyx_k_grade[] = "grade";
1783 static const char __pyx_k_istpq[] = "istpq";
1784 static const char __pyx_k_nbar3[] = "nbar3";
1785 static const char __pyx_k_ninf3[] = "ninf3";
1786 static const char __pyx_k_other[] = "other";
1787 static const char __pyx_k_range[] = "range";
1788 static const char __pyx_k_throw[] = "throw";
1789 static const char __pyx_k_using[] = " using (";
1790 static const char __pyx_k_value[] = " value ";
1791 static const char __pyx_k_import[] = "__import__";
1792 static const char __pyx_k_reduce[] = "__reduce__";
1793 static const char __pyx_k_scalar[] = "scalar";
1794 static const char __pyx_k_test_2[] = "__test__";
1795 static const char __pyx_k_xrange[] = "xrange";
1796 static const char __pyx_k_doctest[] = "doctest";
1797 static const char __pyx_k_invalid[] = " invalid ";
1798 static const char __pyx_k_numbers[] = "numbers";
1799 static const char __pyx_k_reverse[] = "reverse";
1800 static const char __pyx_k_testmod[] = "testmod";
1801 static const char __pyx_k_version[] = "__version__";
1802 static const char __pyx_k_Integral[] = "Integral";
1803 static const char __pyx_k_PyClical[] = "PyClical";
1804 static const char __pyx_k_Sequence[] = "Sequence";
1805 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1806 static const char __pyx_k_clifford[] = "clifford";
1807 static const char __pyx_k_getstate[] = "__getstate__";
1808 static const char __pyx_k_involute[] = "involute";
1809 static const char __pyx_k_setstate[] = "__setstate__";
1810 static const char __pyx_k_to_frame[] = " to frame ";
1811 static const char __pyx_k_TypeError[] = "TypeError";
1812 static const char __pyx_k_index_set[] = "index_set";
1813 static const char __pyx_k_outer_pow[] = "outer_pow";
1814 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1815 static const char __pyx_k_IndexError[] = "IndexError";
1816 static const char __pyx_k_ValueError[] = "ValueError";
1817 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1818 static const char __pyx_k_collections[] = "collections";
1819 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1820 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1821 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1822 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1823 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1824 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1825 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1826 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1827 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1828 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1829 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1830 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1831 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1832 static const char __pyx_k_using_invalid[] = " using invalid ";
1833 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1834 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1835 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1836 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1837 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1838 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1839 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1840 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1841 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1842 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1843 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1844 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1845 static const char __pyx_k_invalid_string[] = " invalid string ";
1846 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1847 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1848 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1849 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1850 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1851 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1852 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1853 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1854 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1855 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1856 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1857 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1858 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1859 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1860 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1861 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1862 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1863 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1864 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1865 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1866 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1867 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1868 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1869 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1870 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1871 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1872 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1873 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1874 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1875 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1876 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1877 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1878 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1879 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1880 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1881 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1882 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1883 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1884 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1885 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1886 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1887 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1888 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1889 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1890 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1891 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1892 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1893 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1894 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1895 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1896 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1897 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1898 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1899 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1900 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1901 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1902 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1903 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1904 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1905 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1906 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1907 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1908 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1909 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1910 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1911 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1912 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1913 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1914 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1915 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1916 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1917 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1918 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1919 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1920 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1921 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1922 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1923 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1924 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1925 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1926 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1927 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1928 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1929 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1930 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1931 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1932 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1933 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1934 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1935 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 ";
1936 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 ";
1937 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 ";
1938 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 ";
1939 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 ";
1940 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 ";
1941 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 ";
1942 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 ";
1943 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 ";
1944 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 ";
1945 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 ";
1946 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 ";
1947 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 ";
1948 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 ";
1949 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 ";
1950 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 ";
1951 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 ";
1952 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 ";
1953 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 ";
1954 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 ";
1955 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 ";
1956 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1957 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1958 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1959 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 ";
1960 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 ";
1961 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 ";
1962 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 ";
1963 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 ";
1964 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 ";
1965 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 ";
1966 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 ";
1967 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 ";
1968 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 ";
1969 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 ";
1970 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 ";
1971 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 ";
1972 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 ";
1973 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 ";
1974 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 ";
1975 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 ";
1976 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 ";
1977 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 ";
1978 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 ";
1979 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 ";
1980 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 ";
1981 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 ";
1982 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 ";
1983 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 ";
1984 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 ";
1985 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 ";
1986 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 ";
1987 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 ";
1988 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 ";
1989 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 ";
1990 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 ";
1991 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 ";
1992 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 ";
1993 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 ";
1994 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 ";
1995 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 ";
1996 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 ";
1997 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 ";
1998 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 ";
1999 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 ";
2000 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 ";
2001 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 ";
2002 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 ";
2003 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 ";
2004 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 ";
2005 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 ";
2006 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 ";
2007 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 ";
2008 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 ";
2009 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 ";
2010 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 ";
2011 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 ";
2012 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 ";
2013 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 ";
2014 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 ";
2015 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 ";
2016 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 ";
2017 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 ";
2018 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 ";
2019 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 ";
2020 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 ";
2021 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 ";
2022 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 ";
2023 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 ";
2024 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 ";
2025 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 ";
2026 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 ";
2027  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 ";
2028  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 ";
2029  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2030  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 ";
2031  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
2032  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 ";
2033  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2034  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2035  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 ";
2036  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 ";
2037  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 ";
2038  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 ";
2039  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 ";
2040  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
2041  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
2042  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
2043  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2044  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 ";
2045  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 ";
2046  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 ";
2047  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 ";
2048  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 ";
2049  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 ";
2050  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 ";
2051  static PyObject *__pyx_kp_s_;
2052  static PyObject *__pyx_kp_s_0_8_2;
2053  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2054  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2055  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2056  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2057  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
2058  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
2059  static PyObject *__pyx_kp_s_Cannot_reframe;
2060  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
2061  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2062  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2063  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2064  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2065  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2066  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2067  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2068  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2069  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2070  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2071  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2072  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2073  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2074  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2075  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2076  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2077  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2078  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2079  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2080  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2081  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2082  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2083  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2084  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2085  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2086  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2087  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2088  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2089  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2090  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2091  static PyObject *__pyx_n_s_IndexError;
2092  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2093  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2094  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2095  static PyObject *__pyx_n_s_Integral;
2096  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2097  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2098  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2099  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2100  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2101  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2102  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2103  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2104  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2105  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2106  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2107  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2108  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2109  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2110  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2111  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2112  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2113  static PyObject *__pyx_n_s_NotImplemented;
2114  static PyObject *__pyx_kp_s_Not_applicable;
2115  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2116  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2117  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2118  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2119  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2120  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2121  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2122  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2123  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2124  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2125  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2126  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2127  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2128  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2129  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2130  static PyObject *__pyx_n_s_PyClical;
2131  static PyObject *__pyx_kp_s_PyClical_pyx;
2132  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2133  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2134  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2135  static PyObject *__pyx_n_s_Real;
2136  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2137  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2138  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2139  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2140  static PyObject *__pyx_n_s_RuntimeError;
2141  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2142  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2143  static PyObject *__pyx_n_s_Sequence;
2144  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2145  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2146  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2147  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2148  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2149  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2150  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2151  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2152  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2153  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2154  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2155  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2156  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2157  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2158  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2159  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2160  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2161  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2162  static PyObject *__pyx_kp_u_The_informal_string_representat;
2163  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2164  static PyObject *__pyx_kp_u_The_official_string_representat;
2165  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2166  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2167  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2168  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2169  static PyObject *__pyx_n_s_TypeError;
2170  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2171  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2172  static PyObject *__pyx_n_s_ValueError;
2173  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2174  static PyObject *__pyx_kp_s__2;
2175  static PyObject *__pyx_kp_s__5;
2176  static PyObject *__pyx_kp_s__6;
2177  static PyObject *__pyx_kp_s__7;
2178  static PyObject *__pyx_kp_s__8;
2179  static PyObject *__pyx_kp_s__9;
2180  static PyObject *__pyx_kp_u_abs_line_1473;
2181  static PyObject *__pyx_n_s_acos;
2182  static PyObject *__pyx_kp_u_acos_line_1619;
2183  static PyObject *__pyx_n_s_acosh;
2184  static PyObject *__pyx_kp_u_acosh_line_1656;
2185  static PyObject *__pyx_kp_u_agc3_line_1844;
2186  static PyObject *__pyx_n_s_args;
2187  static PyObject *__pyx_kp_s_as_frame;
2188  static PyObject *__pyx_n_s_asin;
2189  static PyObject *__pyx_kp_u_asin_line_1698;
2190  static PyObject *__pyx_n_s_asinh;
2191  static PyObject *__pyx_kp_u_asinh_line_1733;
2192  static PyObject *__pyx_n_s_atan;
2193  static PyObject *__pyx_kp_u_atan_line_1769;
2194  static PyObject *__pyx_n_s_atanh;
2195  static PyObject *__pyx_kp_u_atanh_line_1798;
2196  static PyObject *__pyx_kp_u_cga3_line_1824;
2197  static PyObject *__pyx_kp_u_cga3std_line_1833;
2198  static PyObject *__pyx_n_s_cl;
2199  static PyObject *__pyx_n_s_clifford;
2200  static PyObject *__pyx_kp_u_clifford___add___line_739;
2201  static PyObject *__pyx_kp_u_clifford___and___line_835;
2202  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2203  static PyObject *__pyx_kp_u_clifford___div___line_895;
2204  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2205  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2206  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2207  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2208  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2209  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2210  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2211  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2212  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2213  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2214  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2215  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2216  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2217  static PyObject *__pyx_kp_u_clifford___or___line_938;
2218  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2219  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2220  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2221  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2222  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2223  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2224  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2225  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2226  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2227  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2228  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2229  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2230  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2231  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2232  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2233  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2234  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2235  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2236  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2237  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2238  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2239  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2240  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2241  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2242  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2243  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2244  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2245  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2246  static PyObject *__pyx_n_s_cline_in_traceback;
2247  static PyObject *__pyx_n_s_close;
2248  static PyObject *__pyx_n_s_collections;
2249  static PyObject *__pyx_kp_u_compare_line_490;
2250  static PyObject *__pyx_kp_u_complexifier_line_1527;
2251  static PyObject *__pyx_n_s_conj;
2252  static PyObject *__pyx_kp_u_conj_line_1436;
2253  static PyObject *__pyx_n_s_copy;
2254  static PyObject *__pyx_n_s_cos;
2255  static PyObject *__pyx_kp_u_cos_line_1602;
2256  static PyObject *__pyx_n_s_cosh;
2257  static PyObject *__pyx_kp_u_cosh_line_1640;
2258  static PyObject *__pyx_n_s_doctest;
2259  static PyObject *__pyx_n_s_e;
2260  static PyObject *__pyx_kp_u_e_line_1887;
2261  static PyObject *__pyx_n_s_even;
2262  static PyObject *__pyx_kp_u_even_line_1388;
2263  static PyObject *__pyx_n_s_exp;
2264  static PyObject *__pyx_kp_u_exp_line_1565;
2265  static PyObject *__pyx_n_s_fill;
2266  static PyObject *__pyx_n_s_frm;
2267  static PyObject *__pyx_kp_s_from;
2268  static PyObject *__pyx_n_s_getstate;
2269  static PyObject *__pyx_n_s_grade;
2270  static PyObject *__pyx_n_s_i;
2271  static PyObject *__pyx_kp_u_imag_line_1366;
2272  static PyObject *__pyx_n_s_import;
2273  static PyObject *__pyx_n_s_index_set;
2274  static PyObject *__pyx_kp_u_index_set___and___line_269;
2275  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2276  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2277  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2278  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2279  static PyObject *__pyx_n_s_index_set___iter;
2280  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2281  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2282  static PyObject *__pyx_kp_u_index_set___or___line_291;
2283  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2284  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2285  static PyObject *__pyx_kp_u_index_set___str___line_393;
2286  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2287  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2288  static PyObject *__pyx_kp_u_index_set_count_line_313;
2289  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2290  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2291  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2292  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2293  static PyObject *__pyx_kp_u_index_set_max_line_349;
2294  static PyObject *__pyx_kp_u_index_set_min_line_340;
2295  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2296  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2297  static PyObject *__pyx_n_s_inv;
2298  static PyObject *__pyx_kp_u_inv_line_1329;
2299  static PyObject *__pyx_kp_s_invalid;
2300  static PyObject *__pyx_kp_s_invalid_string;
2301  static PyObject *__pyx_n_s_involute;
2302  static PyObject *__pyx_kp_u_involute_line_1406;
2303  static PyObject *__pyx_n_s_ist;
2304  static PyObject *__pyx_n_s_istpq;
2305  static PyObject *__pyx_kp_u_istpq_line_1900;
2306  static PyObject *__pyx_n_s_iter;
2307  static PyObject *__pyx_n_s_ixt;
2308  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2309  static PyObject *__pyx_n_s_lhs;
2310  static PyObject *__pyx_n_s_log;
2311  static PyObject *__pyx_kp_u_log_line_1579;
2312  static PyObject *__pyx_n_s_m;
2313  static PyObject *__pyx_n_s_main;
2314  static PyObject *__pyx_n_s_math;
2315  static PyObject *__pyx_n_s_max;
2316  static PyObject *__pyx_kp_u_max_abs_line_1482;
2317  static PyObject *__pyx_kp_u_max_pos_line_511;
2318  static PyObject *__pyx_n_s_min;
2319  static PyObject *__pyx_kp_u_min_neg_line_502;
2320  static PyObject *__pyx_n_s_name;
2321  static PyObject *__pyx_n_s_nbar3;
2322  static PyObject *__pyx_n_s_ninf3;
2323  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2324  static PyObject *__pyx_n_s_norm;
2325  static PyObject *__pyx_kp_u_norm_line_1462;
2326  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2327  static PyObject *__pyx_n_s_numbers;
2328  static PyObject *__pyx_n_s_obj;
2329  static PyObject *__pyx_n_s_odd;
2330  static PyObject *__pyx_kp_u_odd_line_1397;
2331  static PyObject *__pyx_n_s_other;
2332  static PyObject *__pyx_n_s_outer_pow;
2333  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2334  static PyObject *__pyx_n_s_p;
2335  static PyObject *__pyx_n_s_pi;
2336  static PyObject *__pyx_n_s_pow;
2337  static PyObject *__pyx_kp_u_pow_line_1494;
2338  static PyObject *__pyx_n_s_pure;
2339  static PyObject *__pyx_kp_u_pure_line_1377;
2340  static PyObject *__pyx_n_s_pyx_vtable;
2341  static PyObject *__pyx_n_s_q;
2342  static PyObject *__pyx_n_s_quad;
2343  static PyObject *__pyx_kp_u_quad_line_1451;
2344  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2345  static PyObject *__pyx_n_s_range;
2346  static PyObject *__pyx_kp_u_real_line_1355;
2347  static PyObject *__pyx_n_s_reduce;
2348  static PyObject *__pyx_n_s_reduce_cython;
2349  static PyObject *__pyx_n_s_reduce_ex;
2350  static PyObject *__pyx_n_s_reverse;
2351  static PyObject *__pyx_kp_u_reverse_line_1421;
2352  static PyObject *__pyx_n_s_rhs;
2353  static PyObject *__pyx_n_s_scalar;
2354  static PyObject *__pyx_kp_u_scalar_line_1344;
2355  static PyObject *__pyx_n_s_send;
2356  static PyObject *__pyx_n_s_setstate;
2357  static PyObject *__pyx_n_s_setstate_cython;
2358  static PyObject *__pyx_n_s_sin;
2359  static PyObject *__pyx_kp_u_sin_line_1679;
2360  static PyObject *__pyx_n_s_sinh;
2361  static PyObject *__pyx_kp_u_sinh_line_1719;
2362  static PyObject *__pyx_n_s_sqrt;
2363  static PyObject *__pyx_kp_u_sqrt_line_1542;
2364  static PyObject *__pyx_n_s_tan;
2365  static PyObject *__pyx_kp_u_tan_line_1752;
2366  static PyObject *__pyx_n_s_tanh;
2367  static PyObject *__pyx_kp_u_tanh_line_1786;
2368  static PyObject *__pyx_n_s_tau;
2369  static PyObject *__pyx_n_s_test;
2370  static PyObject *__pyx_n_s_test_2;
2371  static PyObject *__pyx_n_s_testmod;
2372  static PyObject *__pyx_n_s_throw;
2373  static PyObject *__pyx_kp_s_to_frame;
2374  static PyObject *__pyx_kp_s_using;
2375  static PyObject *__pyx_kp_s_using_invalid;
2376  static PyObject *__pyx_kp_s_value;
2377  static PyObject *__pyx_n_s_version;
2378  static PyObject *__pyx_n_s_xrange;
2379 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2380 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2381 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2382 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 */
2383 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 */
2384 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2385 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2386 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2387 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2388 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2389 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2390 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2391 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2392 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2393 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2394 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2395 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2396 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2397 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2398 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2399 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2400 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2401 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2402 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2403 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2404 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2405 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 */
2406 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2407 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2408 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2409 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2410 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2411 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 */
2412 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2413 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 */
2414 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2415 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2416 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 */
2417 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2418 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2419 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2420 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2421 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2422 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2423 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2424 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2425 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2426 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2427 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2428 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2429 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2430 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2431 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2432 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2433 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2434 #endif
2435 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2436 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2437 #endif
2438 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2439 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2440 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2441 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2442 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2443 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2444 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2445 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2446 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2447 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2448 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2449 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2450 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2451 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2452 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2453 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2454 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2455 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2456 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2457 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2458 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2459 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2460 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2461 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2462 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2463 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 */
2464 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2465 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2466 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2467 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2468 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2469 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2470 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2471 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2472 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2473 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2474 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2475 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2476 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2477 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2478 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2479 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2480 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2481 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2482 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2483 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2484 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2485 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2486 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2487 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2488 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2489 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2490 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2491 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2492 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2493 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2494 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2495 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2496 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2497 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 */
2498 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2499 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2500 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2501 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2502 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2503 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2504 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2505 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2506 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2507 static PyObject *__pyx_float_0_0;
2508 static PyObject *__pyx_float_1_0;
2509 static PyObject *__pyx_float_2_0;
2510 static PyObject *__pyx_float_8_0;
2511 static PyObject *__pyx_int_0;
2512 static PyObject *__pyx_int_1;
2513 static PyObject *__pyx_int_4;
2514 static PyObject *__pyx_int_neg_1;
2515 static PyObject *__pyx_tuple__3;
2516 static PyObject *__pyx_tuple__4;
2517 static PyObject *__pyx_tuple__10;
2518 static PyObject *__pyx_tuple__11;
2519 static PyObject *__pyx_tuple__12;
2520 static PyObject *__pyx_tuple__15;
2521 static PyObject *__pyx_tuple__16;
2522 static PyObject *__pyx_tuple__18;
2523 static PyObject *__pyx_tuple__20;
2524 static PyObject *__pyx_tuple__21;
2525 static PyObject *__pyx_tuple__22;
2526 static PyObject *__pyx_codeobj__13;
2527 static PyObject *__pyx_codeobj__14;
2528 static PyObject *__pyx_codeobj__17;
2529 static PyObject *__pyx_codeobj__19;
2530 static PyObject *__pyx_codeobj__23;
2531 /* Late includes */
2532 
2533 /* "PyClical.pyx":39
2534  * cdef class index_set
2535  *
2536  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2537  * """
2538  * Return the C++ IndexSet instance wrapped by index_set(obj).
2539  */
2540 
2541 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2542  IndexSet __pyx_r;
2543  __Pyx_RefNannyDeclarations
2544  PyObject *__pyx_t_1 = NULL;
2545  __Pyx_RefNannySetupContext("toIndexSet", 0);
2546 
2547  /* "PyClical.pyx":43
2548  * Return the C++ IndexSet instance wrapped by index_set(obj).
2549  * """
2550  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2551  *
2552  * cdef class index_set:
2553  */
2554  __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)
2555  __Pyx_GOTREF(__pyx_t_1);
2556  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2557  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2558  goto __pyx_L0;
2559 
2560  /* "PyClical.pyx":39
2561  * cdef class index_set
2562  *
2563  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2564  * """
2565  * Return the C++ IndexSet instance wrapped by index_set(obj).
2566  */
2567 
2568  /* function exit code */
2569  __pyx_L1_error:;
2570  __Pyx_XDECREF(__pyx_t_1);
2571  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2572  __Pyx_pretend_to_initialize(&__pyx_r);
2573  __pyx_L0:;
2574  __Pyx_RefNannyFinishContext();
2575  return __pyx_r;
2576 }
2577 
2578 /* "PyClical.pyx":51
2579  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2580  *
2581  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2582  * """
2583  * Wrap an instance of the C++ class IndexSet.
2584  */
2585 
2586 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2587  PyObject *__pyx_r = NULL;
2588  __Pyx_RefNannyDeclarations
2589  __Pyx_RefNannySetupContext("wrap", 0);
2590 
2591  /* "PyClical.pyx":55
2592  * Wrap an instance of the C++ class IndexSet.
2593  * """
2594  * self.instance[0] = other # <<<<<<<<<<<<<<
2595  * return self
2596  *
2597  */
2598  (__pyx_v_self->instance[0]) = __pyx_v_other;
2599 
2600  /* "PyClical.pyx":56
2601  * """
2602  * self.instance[0] = other
2603  * return self # <<<<<<<<<<<<<<
2604  *
2605  * cdef inline IndexSet unwrap(index_set self):
2606  */
2607  __Pyx_XDECREF(__pyx_r);
2608  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2609  __pyx_r = ((PyObject *)__pyx_v_self);
2610  goto __pyx_L0;
2611 
2612  /* "PyClical.pyx":51
2613  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2614  *
2615  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2616  * """
2617  * Wrap an instance of the C++ class IndexSet.
2618  */
2619 
2620  /* function exit code */
2621  __pyx_L0:;
2622  __Pyx_XGIVEREF(__pyx_r);
2623  __Pyx_RefNannyFinishContext();
2624  return __pyx_r;
2625 }
2626 
2627 /* "PyClical.pyx":58
2628  * return self
2629  *
2630  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2631  * """
2632  * Return the wrapped C++ IndexSet instance.
2633  */
2634 
2635 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2636  IndexSet __pyx_r;
2637  __Pyx_RefNannyDeclarations
2638  __Pyx_RefNannySetupContext("unwrap", 0);
2639 
2640  /* "PyClical.pyx":62
2641  * Return the wrapped C++ IndexSet instance.
2642  * """
2643  * return self.instance[0] # <<<<<<<<<<<<<<
2644  *
2645  * cpdef copy(index_set self):
2646  */
2647  __pyx_r = (__pyx_v_self->instance[0]);
2648  goto __pyx_L0;
2649 
2650  /* "PyClical.pyx":58
2651  * return self
2652  *
2653  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2654  * """
2655  * Return the wrapped C++ IndexSet instance.
2656  */
2657 
2658  /* function exit code */
2659  __pyx_L0:;
2660  __Pyx_RefNannyFinishContext();
2661  return __pyx_r;
2662 }
2663 
2664 /* "PyClical.pyx":64
2665  * return self.instance[0]
2666  *
2667  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2668  * """
2669  * Copy this index_set object.
2670  */
2671 
2672 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2673 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2674  PyObject *__pyx_r = NULL;
2675  __Pyx_RefNannyDeclarations
2676  PyObject *__pyx_t_1 = NULL;
2677  PyObject *__pyx_t_2 = NULL;
2678  PyObject *__pyx_t_3 = NULL;
2679  PyObject *__pyx_t_4 = NULL;
2680  __Pyx_RefNannySetupContext("copy", 0);
2681  /* Check if called by wrapper */
2682  if (unlikely(__pyx_skip_dispatch)) ;
2683  /* Check if overridden in Python */
2684  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)))) {
2685  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2686  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2687  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2688  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2689  #endif
2690  __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)
2691  __Pyx_GOTREF(__pyx_t_1);
2692  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2693  __Pyx_XDECREF(__pyx_r);
2694  __Pyx_INCREF(__pyx_t_1);
2695  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2696  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2697  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2698  if (likely(__pyx_t_4)) {
2699  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2700  __Pyx_INCREF(__pyx_t_4);
2701  __Pyx_INCREF(function);
2702  __Pyx_DECREF_SET(__pyx_t_3, function);
2703  }
2704  }
2705  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2706  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2707  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2708  __Pyx_GOTREF(__pyx_t_2);
2709  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2710  __pyx_r = __pyx_t_2;
2711  __pyx_t_2 = 0;
2712  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2713  goto __pyx_L0;
2714  }
2715  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2716  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2717  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2718  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2719  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2720  }
2721  #endif
2722  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2723  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2724  }
2725  #endif
2726  }
2727 
2728  /* "PyClical.pyx":71
2729  * {1}
2730  * """
2731  * return index_set(self) # <<<<<<<<<<<<<<
2732  *
2733  * def __cinit__(self, other = 0):
2734  */
2735  __Pyx_XDECREF(__pyx_r);
2736  __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)
2737  __Pyx_GOTREF(__pyx_t_1);
2738  __pyx_r = __pyx_t_1;
2739  __pyx_t_1 = 0;
2740  goto __pyx_L0;
2741 
2742  /* "PyClical.pyx":64
2743  * return self.instance[0]
2744  *
2745  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2746  * """
2747  * Copy this index_set object.
2748  */
2749 
2750  /* function exit code */
2751  __pyx_L1_error:;
2752  __Pyx_XDECREF(__pyx_t_1);
2753  __Pyx_XDECREF(__pyx_t_2);
2754  __Pyx_XDECREF(__pyx_t_3);
2755  __Pyx_XDECREF(__pyx_t_4);
2756  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2757  __pyx_r = 0;
2758  __pyx_L0:;
2759  __Pyx_XGIVEREF(__pyx_r);
2760  __Pyx_RefNannyFinishContext();
2761  return __pyx_r;
2762 }
2763 
2764 /* Python wrapper */
2765 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2766 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 ";
2767 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2768  PyObject *__pyx_r = 0;
2769  __Pyx_RefNannyDeclarations
2770  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2771  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2772 
2773  /* function exit code */
2774  __Pyx_RefNannyFinishContext();
2775  return __pyx_r;
2776 }
2777 
2778 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2779  PyObject *__pyx_r = NULL;
2780  __Pyx_RefNannyDeclarations
2781  PyObject *__pyx_t_1 = NULL;
2782  __Pyx_RefNannySetupContext("copy", 0);
2783  __Pyx_XDECREF(__pyx_r);
2784  __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)
2785  __Pyx_GOTREF(__pyx_t_1);
2786  __pyx_r = __pyx_t_1;
2787  __pyx_t_1 = 0;
2788  goto __pyx_L0;
2789 
2790  /* function exit code */
2791  __pyx_L1_error:;
2792  __Pyx_XDECREF(__pyx_t_1);
2793  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2794  __pyx_r = NULL;
2795  __pyx_L0:;
2796  __Pyx_XGIVEREF(__pyx_r);
2797  __Pyx_RefNannyFinishContext();
2798  return __pyx_r;
2799 }
2800 
2801 /* "PyClical.pyx":73
2802  * return index_set(self)
2803  *
2804  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2805  * """
2806  * Construct an object of type index_set.
2807  */
2808 
2809 /* Python wrapper */
2810 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2811 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2812  PyObject *__pyx_v_other = 0;
2813  int __pyx_r;
2814  __Pyx_RefNannyDeclarations
2815  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2816  {
2817  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2818  PyObject* values[1] = {0};
2819  values[0] = ((PyObject *)__pyx_int_0);
2820  if (unlikely(__pyx_kwds)) {
2821  Py_ssize_t kw_args;
2822  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2823  switch (pos_args) {
2824  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2825  CYTHON_FALLTHROUGH;
2826  case 0: break;
2827  default: goto __pyx_L5_argtuple_error;
2828  }
2829  kw_args = PyDict_Size(__pyx_kwds);
2830  switch (pos_args) {
2831  case 0:
2832  if (kw_args > 0) {
2833  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2834  if (value) { values[0] = value; kw_args--; }
2835  }
2836  }
2837  if (unlikely(kw_args > 0)) {
2838  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2839  }
2840  } else {
2841  switch (PyTuple_GET_SIZE(__pyx_args)) {
2842  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2843  CYTHON_FALLTHROUGH;
2844  case 0: break;
2845  default: goto __pyx_L5_argtuple_error;
2846  }
2847  }
2848  __pyx_v_other = values[0];
2849  }
2850  goto __pyx_L4_argument_unpacking_done;
2851  __pyx_L5_argtuple_error:;
2852  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2853  __pyx_L3_error:;
2854  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2855  __Pyx_RefNannyFinishContext();
2856  return -1;
2857  __pyx_L4_argument_unpacking_done:;
2858  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2859 
2860  /* function exit code */
2861  __Pyx_RefNannyFinishContext();
2862  return __pyx_r;
2863 }
2864 
2865 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2866  PyObject *__pyx_v_error_msg_prefix = NULL;
2867  PyObject *__pyx_v_idx = NULL;
2868  int __pyx_r;
2869  __Pyx_RefNannyDeclarations
2870  int __pyx_t_1;
2871  int __pyx_t_2;
2872  IndexSet *__pyx_t_3;
2873  PyObject *__pyx_t_4 = NULL;
2874  PyObject *__pyx_t_5 = NULL;
2875  int __pyx_t_6;
2876  int __pyx_t_7;
2877  PyObject *__pyx_t_8 = NULL;
2878  PyObject *__pyx_t_9 = NULL;
2879  PyObject *__pyx_t_10 = NULL;
2880  Py_ssize_t __pyx_t_11;
2881  PyObject *(*__pyx_t_12)(PyObject *);
2882  PyObject *__pyx_t_13 = NULL;
2883  PyObject *__pyx_t_14 = NULL;
2884  PyObject *__pyx_t_15 = NULL;
2885  PyObject *__pyx_t_16 = NULL;
2886  char *__pyx_t_17;
2887  __Pyx_RefNannySetupContext("__cinit__", 0);
2888 
2889  /* "PyClical.pyx":92
2890  * {}
2891  * """
2892  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2893  * if isinstance(other, index_set):
2894  * self.instance = new IndexSet((<index_set>other).unwrap())
2895  */
2896  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2897  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2898 
2899  /* "PyClical.pyx":93
2900  * """
2901  * error_msg_prefix = "Cannot initialize index_set object from"
2902  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2903  * self.instance = new IndexSet((<index_set>other).unwrap())
2904  * elif isinstance(other, numbers.Integral):
2905  */
2906  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2907  __pyx_t_2 = (__pyx_t_1 != 0);
2908  if (__pyx_t_2) {
2909 
2910  /* "PyClical.pyx":94
2911  * error_msg_prefix = "Cannot initialize index_set object from"
2912  * if isinstance(other, index_set):
2913  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2914  * elif isinstance(other, numbers.Integral):
2915  * self.instance = new IndexSet(<int>other)
2916  */
2917  try {
2918  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2919  } catch(...) {
2920  __Pyx_CppExn2PyErr();
2921  __PYX_ERR(0, 94, __pyx_L1_error)
2922  }
2923  __pyx_v_self->instance = __pyx_t_3;
2924 
2925  /* "PyClical.pyx":93
2926  * """
2927  * error_msg_prefix = "Cannot initialize index_set object from"
2928  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2929  * self.instance = new IndexSet((<index_set>other).unwrap())
2930  * elif isinstance(other, numbers.Integral):
2931  */
2932  goto __pyx_L3;
2933  }
2934 
2935  /* "PyClical.pyx":95
2936  * if isinstance(other, index_set):
2937  * self.instance = new IndexSet((<index_set>other).unwrap())
2938  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2939  * self.instance = new IndexSet(<int>other)
2940  * elif isinstance(other, (set, frozenset)):
2941  */
2942  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2943  __Pyx_GOTREF(__pyx_t_4);
2944  __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)
2945  __Pyx_GOTREF(__pyx_t_5);
2946  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2947  __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)
2948  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2949  __pyx_t_1 = (__pyx_t_2 != 0);
2950  if (__pyx_t_1) {
2951 
2952  /* "PyClical.pyx":96
2953  * self.instance = new IndexSet((<index_set>other).unwrap())
2954  * elif isinstance(other, numbers.Integral):
2955  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2956  * elif isinstance(other, (set, frozenset)):
2957  * try:
2958  */
2959  __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)
2960  try {
2961  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2962  } catch(...) {
2963  __Pyx_CppExn2PyErr();
2964  __PYX_ERR(0, 96, __pyx_L1_error)
2965  }
2966  __pyx_v_self->instance = __pyx_t_3;
2967 
2968  /* "PyClical.pyx":95
2969  * if isinstance(other, index_set):
2970  * self.instance = new IndexSet((<index_set>other).unwrap())
2971  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2972  * self.instance = new IndexSet(<int>other)
2973  * elif isinstance(other, (set, frozenset)):
2974  */
2975  goto __pyx_L3;
2976  }
2977 
2978  /* "PyClical.pyx":97
2979  * elif isinstance(other, numbers.Integral):
2980  * self.instance = new IndexSet(<int>other)
2981  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2982  * try:
2983  * self.instance = new IndexSet()
2984  */
2985  __pyx_t_2 = PySet_Check(__pyx_v_other);
2986  __pyx_t_7 = (__pyx_t_2 != 0);
2987  if (!__pyx_t_7) {
2988  } else {
2989  __pyx_t_1 = __pyx_t_7;
2990  goto __pyx_L4_bool_binop_done;
2991  }
2992  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2993  __pyx_t_2 = (__pyx_t_7 != 0);
2994  __pyx_t_1 = __pyx_t_2;
2995  __pyx_L4_bool_binop_done:;
2996  __pyx_t_2 = (__pyx_t_1 != 0);
2997  if (__pyx_t_2) {
2998 
2999  /* "PyClical.pyx":98
3000  * self.instance = new IndexSet(<int>other)
3001  * elif isinstance(other, (set, frozenset)):
3002  * try: # <<<<<<<<<<<<<<
3003  * self.instance = new IndexSet()
3004  * for idx in other:
3005  */
3006  {
3007  __Pyx_PyThreadState_declare
3008  __Pyx_PyThreadState_assign
3009  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3010  __Pyx_XGOTREF(__pyx_t_8);
3011  __Pyx_XGOTREF(__pyx_t_9);
3012  __Pyx_XGOTREF(__pyx_t_10);
3013  /*try:*/ {
3014 
3015  /* "PyClical.pyx":99
3016  * elif isinstance(other, (set, frozenset)):
3017  * try:
3018  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3019  * for idx in other:
3020  * self[idx] = True
3021  */
3022  __pyx_t_3 = new IndexSet();
3023  __pyx_v_self->instance = __pyx_t_3;
3024 
3025  /* "PyClical.pyx":100
3026  * try:
3027  * self.instance = new IndexSet()
3028  * for idx in other: # <<<<<<<<<<<<<<
3029  * self[idx] = True
3030  * except IndexError:
3031  */
3032  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3033  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3034  __pyx_t_12 = NULL;
3035  } else {
3036  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
3037  __Pyx_GOTREF(__pyx_t_5);
3038  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
3039  }
3040  for (;;) {
3041  if (likely(!__pyx_t_12)) {
3042  if (likely(PyList_CheckExact(__pyx_t_5))) {
3043  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3044  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3045  __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)
3046  #else
3047  __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)
3048  __Pyx_GOTREF(__pyx_t_4);
3049  #endif
3050  } else {
3051  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3052  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3053  __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)
3054  #else
3055  __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)
3056  __Pyx_GOTREF(__pyx_t_4);
3057  #endif
3058  }
3059  } else {
3060  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3061  if (unlikely(!__pyx_t_4)) {
3062  PyObject* exc_type = PyErr_Occurred();
3063  if (exc_type) {
3064  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3065  else __PYX_ERR(0, 100, __pyx_L6_error)
3066  }
3067  break;
3068  }
3069  __Pyx_GOTREF(__pyx_t_4);
3070  }
3071  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3072  __pyx_t_4 = 0;
3073 
3074  /* "PyClical.pyx":101
3075  * self.instance = new IndexSet()
3076  * for idx in other:
3077  * self[idx] = True # <<<<<<<<<<<<<<
3078  * except IndexError:
3079  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3080  */
3081  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
3082 
3083  /* "PyClical.pyx":100
3084  * try:
3085  * self.instance = new IndexSet()
3086  * for idx in other: # <<<<<<<<<<<<<<
3087  * self[idx] = True
3088  * except IndexError:
3089  */
3090  }
3091  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3092 
3093  /* "PyClical.pyx":98
3094  * self.instance = new IndexSet(<int>other)
3095  * elif isinstance(other, (set, frozenset)):
3096  * try: # <<<<<<<<<<<<<<
3097  * self.instance = new IndexSet()
3098  * for idx in other:
3099  */
3100  }
3101  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3102  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3103  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3104  goto __pyx_L11_try_end;
3105  __pyx_L6_error:;
3106  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3107  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3108 
3109  /* "PyClical.pyx":102
3110  * for idx in other:
3111  * self[idx] = True
3112  * except IndexError: # <<<<<<<<<<<<<<
3113  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3114  * except (RuntimeError, TypeError):
3115  */
3116  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3117  if (__pyx_t_6) {
3118  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3119  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
3120  __Pyx_GOTREF(__pyx_t_5);
3121  __Pyx_GOTREF(__pyx_t_4);
3122  __Pyx_GOTREF(__pyx_t_13);
3123 
3124  /* "PyClical.pyx":103
3125  * self[idx] = True
3126  * except IndexError:
3127  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3128  * except (RuntimeError, TypeError):
3129  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3130  */
3131  __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)
3132  __Pyx_GOTREF(__pyx_t_14);
3133  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3134  __Pyx_GOTREF(__pyx_t_15);
3135  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3136  __Pyx_GOTREF(__pyx_t_16);
3137  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3138  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3139  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3140  __Pyx_GOTREF(__pyx_t_15);
3141  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3142  __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)
3143  __Pyx_GOTREF(__pyx_t_16);
3144  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3145  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3146  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3147  __PYX_ERR(0, 103, __pyx_L8_except_error)
3148  }
3149 
3150  /* "PyClical.pyx":104
3151  * except IndexError:
3152  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3153  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3154  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3155  * elif isinstance(other, str):
3156  */
3157  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3158  if (__pyx_t_6) {
3159  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3160  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3161  __Pyx_GOTREF(__pyx_t_13);
3162  __Pyx_GOTREF(__pyx_t_4);
3163  __Pyx_GOTREF(__pyx_t_5);
3164 
3165  /* "PyClical.pyx":105
3166  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3167  * except (RuntimeError, TypeError):
3168  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3169  * elif isinstance(other, str):
3170  * try:
3171  */
3172  __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)
3173  __Pyx_GOTREF(__pyx_t_16);
3174  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3175  __Pyx_GOTREF(__pyx_t_15);
3176  __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3177  __Pyx_GOTREF(__pyx_t_14);
3178  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3179  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3180  __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3181  __Pyx_GOTREF(__pyx_t_15);
3182  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3183  __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)
3184  __Pyx_GOTREF(__pyx_t_14);
3185  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3186  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3187  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3188  __PYX_ERR(0, 105, __pyx_L8_except_error)
3189  }
3190  goto __pyx_L8_except_error;
3191  __pyx_L8_except_error:;
3192 
3193  /* "PyClical.pyx":98
3194  * self.instance = new IndexSet(<int>other)
3195  * elif isinstance(other, (set, frozenset)):
3196  * try: # <<<<<<<<<<<<<<
3197  * self.instance = new IndexSet()
3198  * for idx in other:
3199  */
3200  __Pyx_XGIVEREF(__pyx_t_8);
3201  __Pyx_XGIVEREF(__pyx_t_9);
3202  __Pyx_XGIVEREF(__pyx_t_10);
3203  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3204  goto __pyx_L1_error;
3205  __pyx_L11_try_end:;
3206  }
3207 
3208  /* "PyClical.pyx":97
3209  * elif isinstance(other, numbers.Integral):
3210  * self.instance = new IndexSet(<int>other)
3211  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3212  * try:
3213  * self.instance = new IndexSet()
3214  */
3215  goto __pyx_L3;
3216  }
3217 
3218  /* "PyClical.pyx":106
3219  * except (RuntimeError, TypeError):
3220  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3221  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3222  * try:
3223  * self.instance = new IndexSet(<char *>other)
3224  */
3225  __pyx_t_2 = PyString_Check(__pyx_v_other);
3226  __pyx_t_1 = (__pyx_t_2 != 0);
3227  if (likely(__pyx_t_1)) {
3228 
3229  /* "PyClical.pyx":107
3230  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3231  * elif isinstance(other, str):
3232  * try: # <<<<<<<<<<<<<<
3233  * self.instance = new IndexSet(<char *>other)
3234  * except RuntimeError:
3235  */
3236  {
3237  __Pyx_PyThreadState_declare
3238  __Pyx_PyThreadState_assign
3239  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3240  __Pyx_XGOTREF(__pyx_t_10);
3241  __Pyx_XGOTREF(__pyx_t_9);
3242  __Pyx_XGOTREF(__pyx_t_8);
3243  /*try:*/ {
3244 
3245  /* "PyClical.pyx":108
3246  * elif isinstance(other, str):
3247  * try:
3248  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3249  * except RuntimeError:
3250  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3251  */
3252  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3253  try {
3254  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3255  } catch(...) {
3256  __Pyx_CppExn2PyErr();
3257  __PYX_ERR(0, 108, __pyx_L18_error)
3258  }
3259  __pyx_v_self->instance = __pyx_t_3;
3260 
3261  /* "PyClical.pyx":107
3262  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3263  * elif isinstance(other, str):
3264  * try: # <<<<<<<<<<<<<<
3265  * self.instance = new IndexSet(<char *>other)
3266  * except RuntimeError:
3267  */
3268  }
3269  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3270  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3271  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3272  goto __pyx_L23_try_end;
3273  __pyx_L18_error:;
3274  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3275  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3276  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3277  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3278  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3279  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3280 
3281  /* "PyClical.pyx":109
3282  * try:
3283  * self.instance = new IndexSet(<char *>other)
3284  * except RuntimeError: # <<<<<<<<<<<<<<
3285  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3286  * else:
3287  */
3288  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3289  if (__pyx_t_6) {
3290  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3291  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3292  __Pyx_GOTREF(__pyx_t_5);
3293  __Pyx_GOTREF(__pyx_t_4);
3294  __Pyx_GOTREF(__pyx_t_13);
3295 
3296  /* "PyClical.pyx":110
3297  * self.instance = new IndexSet(<char *>other)
3298  * except RuntimeError:
3299  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3300  * else:
3301  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3302  */
3303  __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)
3304  __Pyx_GOTREF(__pyx_t_14);
3305  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3306  __Pyx_GOTREF(__pyx_t_15);
3307  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3308  __Pyx_GOTREF(__pyx_t_16);
3309  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3310  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3311  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3312  __Pyx_GOTREF(__pyx_t_15);
3313  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3314  __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)
3315  __Pyx_GOTREF(__pyx_t_16);
3316  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3317  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3318  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3319  __PYX_ERR(0, 110, __pyx_L20_except_error)
3320  }
3321  goto __pyx_L20_except_error;
3322  __pyx_L20_except_error:;
3323 
3324  /* "PyClical.pyx":107
3325  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3326  * elif isinstance(other, str):
3327  * try: # <<<<<<<<<<<<<<
3328  * self.instance = new IndexSet(<char *>other)
3329  * except RuntimeError:
3330  */
3331  __Pyx_XGIVEREF(__pyx_t_10);
3332  __Pyx_XGIVEREF(__pyx_t_9);
3333  __Pyx_XGIVEREF(__pyx_t_8);
3334  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3335  goto __pyx_L1_error;
3336  __pyx_L23_try_end:;
3337  }
3338 
3339  /* "PyClical.pyx":106
3340  * except (RuntimeError, TypeError):
3341  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3342  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3343  * try:
3344  * self.instance = new IndexSet(<char *>other)
3345  */
3346  goto __pyx_L3;
3347  }
3348 
3349  /* "PyClical.pyx":112
3350  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3351  * else:
3352  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3353  *
3354  * def __dealloc__(self):
3355  */
3356  /*else*/ {
3357  __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)
3358  __Pyx_GOTREF(__pyx_t_13);
3359  __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)
3360  __Pyx_GOTREF(__pyx_t_4);
3361  __pyx_t_5 = PyNumber_Add(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3362  __Pyx_GOTREF(__pyx_t_5);
3363  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3364  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3365  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3366  __Pyx_GOTREF(__pyx_t_4);
3367  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3368  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3369  __Pyx_GOTREF(__pyx_t_5);
3370  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3371  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3372  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3373  __PYX_ERR(0, 112, __pyx_L1_error)
3374  }
3375  __pyx_L3:;
3376 
3377  /* "PyClical.pyx":73
3378  * return index_set(self)
3379  *
3380  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3381  * """
3382  * Construct an object of type index_set.
3383  */
3384 
3385  /* function exit code */
3386  __pyx_r = 0;
3387  goto __pyx_L0;
3388  __pyx_L1_error:;
3389  __Pyx_XDECREF(__pyx_t_4);
3390  __Pyx_XDECREF(__pyx_t_5);
3391  __Pyx_XDECREF(__pyx_t_13);
3392  __Pyx_XDECREF(__pyx_t_14);
3393  __Pyx_XDECREF(__pyx_t_15);
3394  __Pyx_XDECREF(__pyx_t_16);
3395  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3396  __pyx_r = -1;
3397  __pyx_L0:;
3398  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3399  __Pyx_XDECREF(__pyx_v_idx);
3400  __Pyx_RefNannyFinishContext();
3401  return __pyx_r;
3402 }
3403 
3404 /* "PyClical.pyx":114
3405  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3406  *
3407  * def __dealloc__(self): # <<<<<<<<<<<<<<
3408  * """
3409  * Clean up by deallocating the instance of C++ class IndexSet.
3410  */
3411 
3412 /* Python wrapper */
3413 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3414 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3415  __Pyx_RefNannyDeclarations
3416  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3417  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3418 
3419  /* function exit code */
3420  __Pyx_RefNannyFinishContext();
3421 }
3422 
3423 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3424  __Pyx_RefNannyDeclarations
3425  __Pyx_RefNannySetupContext("__dealloc__", 0);
3426 
3427  /* "PyClical.pyx":118
3428  * Clean up by deallocating the instance of C++ class IndexSet.
3429  * """
3430  * del self.instance # <<<<<<<<<<<<<<
3431  *
3432  * def __richcmp__(lhs, rhs, int op):
3433  */
3434  delete __pyx_v_self->instance;
3435 
3436  /* "PyClical.pyx":114
3437  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3438  *
3439  * def __dealloc__(self): # <<<<<<<<<<<<<<
3440  * """
3441  * Clean up by deallocating the instance of C++ class IndexSet.
3442  */
3443 
3444  /* function exit code */
3445  __Pyx_RefNannyFinishContext();
3446 }
3447 
3448 /* "PyClical.pyx":120
3449  * del self.instance
3450  *
3451  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3452  * """
3453  * Compare two objects of class index_set.
3454  */
3455 
3456 /* Python wrapper */
3457 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3458 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3459  PyObject *__pyx_r = 0;
3460  __Pyx_RefNannyDeclarations
3461  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3462  __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));
3463 
3464  /* function exit code */
3465  __Pyx_RefNannyFinishContext();
3466  return __pyx_r;
3467 }
3468 
3469 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) {
3470  PyObject *__pyx_v_eq = NULL;
3471  PyObject *__pyx_v_lt = NULL;
3472  PyObject *__pyx_r = NULL;
3473  __Pyx_RefNannyDeclarations
3474  int __pyx_t_1;
3475  int __pyx_t_2;
3476  int __pyx_t_3;
3477  PyObject *__pyx_t_4 = NULL;
3478  __Pyx_RefNannySetupContext("__richcmp__", 0);
3479 
3480  /* "PyClical.pyx":141
3481  * False
3482  * """
3483  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3484  * eq = bool(lhs is rhs)
3485  * if op == 2: # ==
3486  */
3487  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3488  __pyx_t_3 = (__pyx_t_2 != 0);
3489  if (!__pyx_t_3) {
3490  } else {
3491  __pyx_t_1 = __pyx_t_3;
3492  goto __pyx_L4_bool_binop_done;
3493  }
3494  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3495  __pyx_t_2 = (__pyx_t_3 != 0);
3496  __pyx_t_1 = __pyx_t_2;
3497  __pyx_L4_bool_binop_done:;
3498  if (__pyx_t_1) {
3499 
3500  /* "PyClical.pyx":142
3501  * """
3502  * if (lhs is None) or (rhs is None):
3503  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3504  * if op == 2: # ==
3505  * return eq
3506  */
3507  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3508  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3509  __Pyx_GOTREF(__pyx_t_4);
3510  __pyx_v_eq = __pyx_t_4;
3511  __pyx_t_4 = 0;
3512 
3513  /* "PyClical.pyx":143
3514  * if (lhs is None) or (rhs is None):
3515  * eq = bool(lhs is rhs)
3516  * if op == 2: # == # <<<<<<<<<<<<<<
3517  * return eq
3518  * elif op == 3: # !=
3519  */
3520  switch (__pyx_v_op) {
3521  case 2:
3522 
3523  /* "PyClical.pyx":144
3524  * eq = bool(lhs is rhs)
3525  * if op == 2: # ==
3526  * return eq # <<<<<<<<<<<<<<
3527  * elif op == 3: # !=
3528  * return not eq
3529  */
3530  __Pyx_XDECREF(__pyx_r);
3531  __Pyx_INCREF(__pyx_v_eq);
3532  __pyx_r = __pyx_v_eq;
3533  goto __pyx_L0;
3534 
3535  /* "PyClical.pyx":143
3536  * if (lhs is None) or (rhs is None):
3537  * eq = bool(lhs is rhs)
3538  * if op == 2: # == # <<<<<<<<<<<<<<
3539  * return eq
3540  * elif op == 3: # !=
3541  */
3542  break;
3543  case 3:
3544 
3545  /* "PyClical.pyx":146
3546  * return eq
3547  * elif op == 3: # !=
3548  * return not eq # <<<<<<<<<<<<<<
3549  * else:
3550  * if op == 0: # <
3551  */
3552  __Pyx_XDECREF(__pyx_r);
3553  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3554  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3555  __Pyx_GOTREF(__pyx_t_4);
3556  __pyx_r = __pyx_t_4;
3557  __pyx_t_4 = 0;
3558  goto __pyx_L0;
3559 
3560  /* "PyClical.pyx":145
3561  * if op == 2: # ==
3562  * return eq
3563  * elif op == 3: # != # <<<<<<<<<<<<<<
3564  * return not eq
3565  * else:
3566  */
3567  break;
3568  default:
3569 
3570  /* "PyClical.pyx":148
3571  * return not eq
3572  * else:
3573  * if op == 0: # < # <<<<<<<<<<<<<<
3574  * return False
3575  * elif op == 1: # <=
3576  */
3577  switch (__pyx_v_op) {
3578  case 0:
3579 
3580  /* "PyClical.pyx":149
3581  * else:
3582  * if op == 0: # <
3583  * return False # <<<<<<<<<<<<<<
3584  * elif op == 1: # <=
3585  * return eq
3586  */
3587  __Pyx_XDECREF(__pyx_r);
3588  __Pyx_INCREF(Py_False);
3589  __pyx_r = Py_False;
3590  goto __pyx_L0;
3591 
3592  /* "PyClical.pyx":148
3593  * return not eq
3594  * else:
3595  * if op == 0: # < # <<<<<<<<<<<<<<
3596  * return False
3597  * elif op == 1: # <=
3598  */
3599  break;
3600  case 1:
3601 
3602  /* "PyClical.pyx":151
3603  * return False
3604  * elif op == 1: # <=
3605  * return eq # <<<<<<<<<<<<<<
3606  * elif op == 4: # >
3607  * return False
3608  */
3609  __Pyx_XDECREF(__pyx_r);
3610  __Pyx_INCREF(__pyx_v_eq);
3611  __pyx_r = __pyx_v_eq;
3612  goto __pyx_L0;
3613 
3614  /* "PyClical.pyx":150
3615  * if op == 0: # <
3616  * return False
3617  * elif op == 1: # <= # <<<<<<<<<<<<<<
3618  * return eq
3619  * elif op == 4: # >
3620  */
3621  break;
3622  case 4:
3623 
3624  /* "PyClical.pyx":153
3625  * return eq
3626  * elif op == 4: # >
3627  * return False # <<<<<<<<<<<<<<
3628  * elif op == 5: # >=
3629  * return eq
3630  */
3631  __Pyx_XDECREF(__pyx_r);
3632  __Pyx_INCREF(Py_False);
3633  __pyx_r = Py_False;
3634  goto __pyx_L0;
3635 
3636  /* "PyClical.pyx":152
3637  * elif op == 1: # <=
3638  * return eq
3639  * elif op == 4: # > # <<<<<<<<<<<<<<
3640  * return False
3641  * elif op == 5: # >=
3642  */
3643  break;
3644  case 5:
3645 
3646  /* "PyClical.pyx":155
3647  * return False
3648  * elif op == 5: # >=
3649  * return eq # <<<<<<<<<<<<<<
3650  * else:
3651  * return NotImplemented
3652  */
3653  __Pyx_XDECREF(__pyx_r);
3654  __Pyx_INCREF(__pyx_v_eq);
3655  __pyx_r = __pyx_v_eq;
3656  goto __pyx_L0;
3657 
3658  /* "PyClical.pyx":154
3659  * elif op == 4: # >
3660  * return False
3661  * elif op == 5: # >= # <<<<<<<<<<<<<<
3662  * return eq
3663  * else:
3664  */
3665  break;
3666  default:
3667 
3668  /* "PyClical.pyx":157
3669  * return eq
3670  * else:
3671  * return NotImplemented # <<<<<<<<<<<<<<
3672  * else:
3673  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3674  */
3675  __Pyx_XDECREF(__pyx_r);
3676  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3677  __pyx_r = __pyx_builtin_NotImplemented;
3678  goto __pyx_L0;
3679  break;
3680  }
3681  break;
3682  }
3683 
3684  /* "PyClical.pyx":141
3685  * False
3686  * """
3687  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3688  * eq = bool(lhs is rhs)
3689  * if op == 2: # ==
3690  */
3691  }
3692 
3693  /* "PyClical.pyx":159
3694  * return NotImplemented
3695  * else:
3696  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3697  * if op == 2: # ==
3698  * return eq
3699  */
3700  /*else*/ {
3701  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3702  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3703  __Pyx_GOTREF(__pyx_t_4);
3704  __pyx_v_eq = __pyx_t_4;
3705  __pyx_t_4 = 0;
3706 
3707  /* "PyClical.pyx":160
3708  * else:
3709  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3710  * if op == 2: # == # <<<<<<<<<<<<<<
3711  * return eq
3712  * elif op == 3: # !=
3713  */
3714  switch (__pyx_v_op) {
3715  case 2:
3716 
3717  /* "PyClical.pyx":161
3718  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3719  * if op == 2: # ==
3720  * return eq # <<<<<<<<<<<<<<
3721  * elif op == 3: # !=
3722  * return not eq
3723  */
3724  __Pyx_XDECREF(__pyx_r);
3725  __Pyx_INCREF(__pyx_v_eq);
3726  __pyx_r = __pyx_v_eq;
3727  goto __pyx_L0;
3728 
3729  /* "PyClical.pyx":160
3730  * else:
3731  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3732  * if op == 2: # == # <<<<<<<<<<<<<<
3733  * return eq
3734  * elif op == 3: # !=
3735  */
3736  break;
3737  case 3:
3738 
3739  /* "PyClical.pyx":163
3740  * return eq
3741  * elif op == 3: # !=
3742  * return not eq # <<<<<<<<<<<<<<
3743  * else:
3744  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3745  */
3746  __Pyx_XDECREF(__pyx_r);
3747  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3748  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3749  __Pyx_GOTREF(__pyx_t_4);
3750  __pyx_r = __pyx_t_4;
3751  __pyx_t_4 = 0;
3752  goto __pyx_L0;
3753 
3754  /* "PyClical.pyx":162
3755  * if op == 2: # ==
3756  * return eq
3757  * elif op == 3: # != # <<<<<<<<<<<<<<
3758  * return not eq
3759  * else:
3760  */
3761  break;
3762  default:
3763 
3764  /* "PyClical.pyx":165
3765  * return not eq
3766  * else:
3767  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3768  * if op == 0: # <
3769  * return lt
3770  */
3771  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3772  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3773  __Pyx_GOTREF(__pyx_t_4);
3774  __pyx_v_lt = __pyx_t_4;
3775  __pyx_t_4 = 0;
3776 
3777  /* "PyClical.pyx":166
3778  * else:
3779  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3780  * if op == 0: # < # <<<<<<<<<<<<<<
3781  * return lt
3782  * elif op == 1: # <=
3783  */
3784  switch (__pyx_v_op) {
3785  case 0:
3786 
3787  /* "PyClical.pyx":167
3788  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3789  * if op == 0: # <
3790  * return lt # <<<<<<<<<<<<<<
3791  * elif op == 1: # <=
3792  * return lt or eq
3793  */
3794  __Pyx_XDECREF(__pyx_r);
3795  __Pyx_INCREF(__pyx_v_lt);
3796  __pyx_r = __pyx_v_lt;
3797  goto __pyx_L0;
3798 
3799  /* "PyClical.pyx":166
3800  * else:
3801  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3802  * if op == 0: # < # <<<<<<<<<<<<<<
3803  * return lt
3804  * elif op == 1: # <=
3805  */
3806  break;
3807  case 1:
3808 
3809  /* "PyClical.pyx":169
3810  * return lt
3811  * elif op == 1: # <=
3812  * return lt or eq # <<<<<<<<<<<<<<
3813  * elif op == 4: # >
3814  * return not (lt or eq)
3815  */
3816  __Pyx_XDECREF(__pyx_r);
3817  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3818  if (!__pyx_t_1) {
3819  } else {
3820  __Pyx_INCREF(__pyx_v_lt);
3821  __pyx_t_4 = __pyx_v_lt;
3822  goto __pyx_L6_bool_binop_done;
3823  }
3824  __Pyx_INCREF(__pyx_v_eq);
3825  __pyx_t_4 = __pyx_v_eq;
3826  __pyx_L6_bool_binop_done:;
3827  __pyx_r = __pyx_t_4;
3828  __pyx_t_4 = 0;
3829  goto __pyx_L0;
3830 
3831  /* "PyClical.pyx":168
3832  * if op == 0: # <
3833  * return lt
3834  * elif op == 1: # <= # <<<<<<<<<<<<<<
3835  * return lt or eq
3836  * elif op == 4: # >
3837  */
3838  break;
3839  case 4:
3840 
3841  /* "PyClical.pyx":171
3842  * return lt or eq
3843  * elif op == 4: # >
3844  * return not (lt or eq) # <<<<<<<<<<<<<<
3845  * elif op == 5: # >=
3846  * return not lt
3847  */
3848  __Pyx_XDECREF(__pyx_r);
3849  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3850  if (!__pyx_t_2) {
3851  } else {
3852  __pyx_t_1 = __pyx_t_2;
3853  goto __pyx_L8_bool_binop_done;
3854  }
3855  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3856  __pyx_t_1 = __pyx_t_2;
3857  __pyx_L8_bool_binop_done:;
3858  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3859  __Pyx_GOTREF(__pyx_t_4);
3860  __pyx_r = __pyx_t_4;
3861  __pyx_t_4 = 0;
3862  goto __pyx_L0;
3863 
3864  /* "PyClical.pyx":170
3865  * elif op == 1: # <=
3866  * return lt or eq
3867  * elif op == 4: # > # <<<<<<<<<<<<<<
3868  * return not (lt or eq)
3869  * elif op == 5: # >=
3870  */
3871  break;
3872  case 5:
3873 
3874  /* "PyClical.pyx":173
3875  * return not (lt or eq)
3876  * elif op == 5: # >=
3877  * return not lt # <<<<<<<<<<<<<<
3878  * else:
3879  * return NotImplemented
3880  */
3881  __Pyx_XDECREF(__pyx_r);
3882  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3883  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3884  __Pyx_GOTREF(__pyx_t_4);
3885  __pyx_r = __pyx_t_4;
3886  __pyx_t_4 = 0;
3887  goto __pyx_L0;
3888 
3889  /* "PyClical.pyx":172
3890  * elif op == 4: # >
3891  * return not (lt or eq)
3892  * elif op == 5: # >= # <<<<<<<<<<<<<<
3893  * return not lt
3894  * else:
3895  */
3896  break;
3897  default:
3898 
3899  /* "PyClical.pyx":175
3900  * return not lt
3901  * else:
3902  * return NotImplemented # <<<<<<<<<<<<<<
3903  *
3904  * def __setitem__(self, idx, val):
3905  */
3906  __Pyx_XDECREF(__pyx_r);
3907  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3908  __pyx_r = __pyx_builtin_NotImplemented;
3909  goto __pyx_L0;
3910  break;
3911  }
3912  break;
3913  }
3914  }
3915 
3916  /* "PyClical.pyx":120
3917  * del self.instance
3918  *
3919  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3920  * """
3921  * Compare two objects of class index_set.
3922  */
3923 
3924  /* function exit code */
3925  __pyx_L1_error:;
3926  __Pyx_XDECREF(__pyx_t_4);
3927  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3928  __pyx_r = NULL;
3929  __pyx_L0:;
3930  __Pyx_XDECREF(__pyx_v_eq);
3931  __Pyx_XDECREF(__pyx_v_lt);
3932  __Pyx_XGIVEREF(__pyx_r);
3933  __Pyx_RefNannyFinishContext();
3934  return __pyx_r;
3935 }
3936 
3937 /* "PyClical.pyx":177
3938  * return NotImplemented
3939  *
3940  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3941  * """
3942  * Set the value of an index_set object at index idx to value val.
3943  */
3944 
3945 /* Python wrapper */
3946 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3947 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 ";
3948 #if CYTHON_COMPILING_IN_CPYTHON
3949 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3950 #endif
3951 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3952  int __pyx_r;
3953  __Pyx_RefNannyDeclarations
3954  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3955  __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));
3956 
3957  /* function exit code */
3958  __Pyx_RefNannyFinishContext();
3959  return __pyx_r;
3960 }
3961 
3962 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) {
3963  int __pyx_r;
3964  __Pyx_RefNannyDeclarations
3965  int __pyx_t_1;
3966  int __pyx_t_2;
3967  __Pyx_RefNannySetupContext("__setitem__", 0);
3968 
3969  /* "PyClical.pyx":186
3970  * {2}
3971  * """
3972  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3973  * return
3974  *
3975  */
3976  __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)
3977  __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)
3978  try {
3979  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3980  } catch(...) {
3981  __Pyx_CppExn2PyErr();
3982  __PYX_ERR(0, 186, __pyx_L1_error)
3983  }
3984 
3985  /* "PyClical.pyx":187
3986  * """
3987  * self.instance.set(idx, val)
3988  * return # <<<<<<<<<<<<<<
3989  *
3990  * def __getitem__(self, idx):
3991  */
3992  __pyx_r = 0;
3993  goto __pyx_L0;
3994 
3995  /* "PyClical.pyx":177
3996  * return NotImplemented
3997  *
3998  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3999  * """
4000  * Set the value of an index_set object at index idx to value val.
4001  */
4002 
4003  /* function exit code */
4004  __pyx_L1_error:;
4005  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4006  __pyx_r = -1;
4007  __pyx_L0:;
4008  __Pyx_RefNannyFinishContext();
4009  return __pyx_r;
4010 }
4011 
4012 /* "PyClical.pyx":189
4013  * return
4014  *
4015  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4016  * """
4017  * Get the value of an index_set object at an index.
4018  */
4019 
4020 /* Python wrapper */
4021 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4022 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 ";
4023 #if CYTHON_COMPILING_IN_CPYTHON
4024 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4025 #endif
4026 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4027  PyObject *__pyx_r = 0;
4028  __Pyx_RefNannyDeclarations
4029  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4030  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4031 
4032  /* function exit code */
4033  __Pyx_RefNannyFinishContext();
4034  return __pyx_r;
4035 }
4036 
4037 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4038  PyObject *__pyx_r = NULL;
4039  __Pyx_RefNannyDeclarations
4040  int __pyx_t_1;
4041  PyObject *__pyx_t_2 = NULL;
4042  __Pyx_RefNannySetupContext("__getitem__", 0);
4043 
4044  /* "PyClical.pyx":206
4045  * False
4046  * """
4047  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4048  *
4049  * def __contains__(self, idx):
4050  */
4051  __Pyx_XDECREF(__pyx_r);
4052  __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)
4053  __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)
4054  __Pyx_GOTREF(__pyx_t_2);
4055  __pyx_r = __pyx_t_2;
4056  __pyx_t_2 = 0;
4057  goto __pyx_L0;
4058 
4059  /* "PyClical.pyx":189
4060  * return
4061  *
4062  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4063  * """
4064  * Get the value of an index_set object at an index.
4065  */
4066 
4067  /* function exit code */
4068  __pyx_L1_error:;
4069  __Pyx_XDECREF(__pyx_t_2);
4070  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4071  __pyx_r = NULL;
4072  __pyx_L0:;
4073  __Pyx_XGIVEREF(__pyx_r);
4074  __Pyx_RefNannyFinishContext();
4075  return __pyx_r;
4076 }
4077 
4078 /* "PyClical.pyx":208
4079  * return self.instance.getitem(idx)
4080  *
4081  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4082  * """
4083  * Check that an index_set object contains the index idx: idx in self.
4084  */
4085 
4086 /* Python wrapper */
4087 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4088 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 ";
4089 #if CYTHON_COMPILING_IN_CPYTHON
4090 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4091 #endif
4092 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4093  int __pyx_r;
4094  __Pyx_RefNannyDeclarations
4095  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4096  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4097 
4098  /* function exit code */
4099  __Pyx_RefNannyFinishContext();
4100  return __pyx_r;
4101 }
4102 
4103 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4104  int __pyx_r;
4105  __Pyx_RefNannyDeclarations
4106  int __pyx_t_1;
4107  __Pyx_RefNannySetupContext("__contains__", 0);
4108 
4109  /* "PyClical.pyx":225
4110  * False
4111  * """
4112  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4113  *
4114  * def __iter__(self):
4115  */
4116  __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)
4117  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4118  goto __pyx_L0;
4119 
4120  /* "PyClical.pyx":208
4121  * return self.instance.getitem(idx)
4122  *
4123  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4124  * """
4125  * Check that an index_set object contains the index idx: idx in self.
4126  */
4127 
4128  /* function exit code */
4129  __pyx_L1_error:;
4130  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4131  __pyx_r = -1;
4132  __pyx_L0:;
4133  __Pyx_RefNannyFinishContext();
4134  return __pyx_r;
4135 }
4136 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4137 
4138 /* "PyClical.pyx":227
4139  * return self.instance.getitem(idx)
4140  *
4141  * def __iter__(self): # <<<<<<<<<<<<<<
4142  * """
4143  * Iterate over the indices of an index_set.
4144  */
4145 
4146 /* Python wrapper */
4147 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4148 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 ";
4149 #if CYTHON_COMPILING_IN_CPYTHON
4150 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4151 #endif
4152 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4153  PyObject *__pyx_r = 0;
4154  __Pyx_RefNannyDeclarations
4155  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4156  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4157 
4158  /* function exit code */
4159  __Pyx_RefNannyFinishContext();
4160  return __pyx_r;
4161 }
4162 
4163 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4164  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4165  PyObject *__pyx_r = NULL;
4166  __Pyx_RefNannyDeclarations
4167  __Pyx_RefNannySetupContext("__iter__", 0);
4168  __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);
4169  if (unlikely(!__pyx_cur_scope)) {
4170  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4171  __Pyx_INCREF(Py_None);
4172  __PYX_ERR(0, 227, __pyx_L1_error)
4173  } else {
4174  __Pyx_GOTREF(__pyx_cur_scope);
4175  }
4176  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4177  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4178  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4179  {
4180  __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)
4181  __Pyx_DECREF(__pyx_cur_scope);
4182  __Pyx_RefNannyFinishContext();
4183  return (PyObject *) gen;
4184  }
4185 
4186  /* function exit code */
4187  __pyx_L1_error:;
4188  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4189  __pyx_r = NULL;
4190  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4191  __Pyx_XGIVEREF(__pyx_r);
4192  __Pyx_RefNannyFinishContext();
4193  return __pyx_r;
4194 }
4195 
4196 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4197 {
4198  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4199  PyObject *__pyx_r = NULL;
4200  PyObject *__pyx_t_1 = NULL;
4201  PyObject *__pyx_t_2 = NULL;
4202  PyObject *__pyx_t_3 = NULL;
4203  PyObject *__pyx_t_4 = NULL;
4204  Py_ssize_t __pyx_t_5;
4205  PyObject *(*__pyx_t_6)(PyObject *);
4206  int __pyx_t_7;
4207  int __pyx_t_8;
4208  __Pyx_RefNannyDeclarations
4209  __Pyx_RefNannySetupContext("__iter__", 0);
4210  switch (__pyx_generator->resume_label) {
4211  case 0: goto __pyx_L3_first_run;
4212  case 1: goto __pyx_L7_resume_from_yield;
4213  default: /* CPython raises the right error here */
4214  __Pyx_RefNannyFinishContext();
4215  return NULL;
4216  }
4217  __pyx_L3_first_run:;
4218  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4219 
4220  /* "PyClical.pyx":234
4221  * -3 4 7
4222  * """
4223  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4224  * if idx in self:
4225  * yield idx
4226  */
4227  __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)
4228  __Pyx_GOTREF(__pyx_t_2);
4229  __pyx_t_3 = NULL;
4230  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4231  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4232  if (likely(__pyx_t_3)) {
4233  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4234  __Pyx_INCREF(__pyx_t_3);
4235  __Pyx_INCREF(function);
4236  __Pyx_DECREF_SET(__pyx_t_2, function);
4237  }
4238  }
4239  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4240  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4241  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4242  __Pyx_GOTREF(__pyx_t_1);
4243  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4244  __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)
4245  __Pyx_GOTREF(__pyx_t_3);
4246  __pyx_t_4 = NULL;
4247  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4248  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4249  if (likely(__pyx_t_4)) {
4250  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4251  __Pyx_INCREF(__pyx_t_4);
4252  __Pyx_INCREF(function);
4253  __Pyx_DECREF_SET(__pyx_t_3, function);
4254  }
4255  }
4256  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4257  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4258  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4259  __Pyx_GOTREF(__pyx_t_2);
4260  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4261  __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)
4262  __Pyx_GOTREF(__pyx_t_3);
4263  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4264  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4265  __Pyx_GOTREF(__pyx_t_2);
4266  __Pyx_GIVEREF(__pyx_t_1);
4267  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4268  __Pyx_GIVEREF(__pyx_t_3);
4269  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4270  __pyx_t_1 = 0;
4271  __pyx_t_3 = 0;
4272  __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)
4273  __Pyx_GOTREF(__pyx_t_3);
4274  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4275  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4276  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4277  __pyx_t_6 = NULL;
4278  } else {
4279  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4280  __Pyx_GOTREF(__pyx_t_2);
4281  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4282  }
4283  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4284  for (;;) {
4285  if (likely(!__pyx_t_6)) {
4286  if (likely(PyList_CheckExact(__pyx_t_2))) {
4287  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4288  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4289  __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)
4290  #else
4291  __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)
4292  __Pyx_GOTREF(__pyx_t_3);
4293  #endif
4294  } else {
4295  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4296  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4297  __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)
4298  #else
4299  __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)
4300  __Pyx_GOTREF(__pyx_t_3);
4301  #endif
4302  }
4303  } else {
4304  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4305  if (unlikely(!__pyx_t_3)) {
4306  PyObject* exc_type = PyErr_Occurred();
4307  if (exc_type) {
4308  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4309  else __PYX_ERR(0, 234, __pyx_L1_error)
4310  }
4311  break;
4312  }
4313  __Pyx_GOTREF(__pyx_t_3);
4314  }
4315  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4316  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4317  __Pyx_GIVEREF(__pyx_t_3);
4318  __pyx_t_3 = 0;
4319 
4320  /* "PyClical.pyx":235
4321  * """
4322  * for idx in range(self.min(), self.max()+1):
4323  * if idx in self: # <<<<<<<<<<<<<<
4324  * yield idx
4325  *
4326  */
4327  __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)
4328  __pyx_t_8 = (__pyx_t_7 != 0);
4329  if (__pyx_t_8) {
4330 
4331  /* "PyClical.pyx":236
4332  * for idx in range(self.min(), self.max()+1):
4333  * if idx in self:
4334  * yield idx # <<<<<<<<<<<<<<
4335  *
4336  * def __invert__(self):
4337  */
4338  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4339  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4340  __Pyx_XGIVEREF(__pyx_t_2);
4341  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4342  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4343  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4344  __Pyx_XGIVEREF(__pyx_r);
4345  __Pyx_RefNannyFinishContext();
4346  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4347  /* return from generator, yielding value */
4348  __pyx_generator->resume_label = 1;
4349  return __pyx_r;
4350  __pyx_L7_resume_from_yield:;
4351  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4352  __pyx_cur_scope->__pyx_t_0 = 0;
4353  __Pyx_XGOTREF(__pyx_t_2);
4354  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4355  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4356  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4357 
4358  /* "PyClical.pyx":235
4359  * """
4360  * for idx in range(self.min(), self.max()+1):
4361  * if idx in self: # <<<<<<<<<<<<<<
4362  * yield idx
4363  *
4364  */
4365  }
4366 
4367  /* "PyClical.pyx":234
4368  * -3 4 7
4369  * """
4370  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4371  * if idx in self:
4372  * yield idx
4373  */
4374  }
4375  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4376  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4377 
4378  /* "PyClical.pyx":227
4379  * return self.instance.getitem(idx)
4380  *
4381  * def __iter__(self): # <<<<<<<<<<<<<<
4382  * """
4383  * Iterate over the indices of an index_set.
4384  */
4385 
4386  /* function exit code */
4387  PyErr_SetNone(PyExc_StopIteration);
4388  goto __pyx_L0;
4389  __pyx_L1_error:;
4390  __Pyx_XDECREF(__pyx_t_1);
4391  __Pyx_XDECREF(__pyx_t_2);
4392  __Pyx_XDECREF(__pyx_t_3);
4393  __Pyx_XDECREF(__pyx_t_4);
4394  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4395  __pyx_L0:;
4396  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4397  #if !CYTHON_USE_EXC_INFO_STACK
4398  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4399  #endif
4400  __pyx_generator->resume_label = -1;
4401  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4402  __Pyx_RefNannyFinishContext();
4403  return __pyx_r;
4404 }
4405 
4406 /* "PyClical.pyx":238
4407  * yield idx
4408  *
4409  * def __invert__(self): # <<<<<<<<<<<<<<
4410  * """
4411  * Set complement: not.
4412  */
4413 
4414 /* Python wrapper */
4415 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4416 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 ";
4417 #if CYTHON_COMPILING_IN_CPYTHON
4418 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4419 #endif
4420 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4421  PyObject *__pyx_r = 0;
4422  __Pyx_RefNannyDeclarations
4423  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4424  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4425 
4426  /* function exit code */
4427  __Pyx_RefNannyFinishContext();
4428  return __pyx_r;
4429 }
4430 
4431 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4432  PyObject *__pyx_r = NULL;
4433  __Pyx_RefNannyDeclarations
4434  PyObject *__pyx_t_1 = NULL;
4435  PyObject *__pyx_t_2 = NULL;
4436  __Pyx_RefNannySetupContext("__invert__", 0);
4437 
4438  /* "PyClical.pyx":245
4439  * {-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}
4440  * """
4441  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4442  *
4443  * def __xor__(lhs, rhs):
4444  */
4445  __Pyx_XDECREF(__pyx_r);
4446  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4447  __Pyx_GOTREF(__pyx_t_1);
4448  __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)
4449  __Pyx_GOTREF(__pyx_t_2);
4450  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4451  __pyx_r = __pyx_t_2;
4452  __pyx_t_2 = 0;
4453  goto __pyx_L0;
4454 
4455  /* "PyClical.pyx":238
4456  * yield idx
4457  *
4458  * def __invert__(self): # <<<<<<<<<<<<<<
4459  * """
4460  * Set complement: not.
4461  */
4462 
4463  /* function exit code */
4464  __pyx_L1_error:;
4465  __Pyx_XDECREF(__pyx_t_1);
4466  __Pyx_XDECREF(__pyx_t_2);
4467  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4468  __pyx_r = NULL;
4469  __pyx_L0:;
4470  __Pyx_XGIVEREF(__pyx_r);
4471  __Pyx_RefNannyFinishContext();
4472  return __pyx_r;
4473 }
4474 
4475 /* "PyClical.pyx":247
4476  * return index_set().wrap( self.instance.invert() )
4477  *
4478  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4479  * """
4480  * Symmetric set difference: exclusive or.
4481  */
4482 
4483 /* Python wrapper */
4484 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4485 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 ";
4486 #if CYTHON_COMPILING_IN_CPYTHON
4487 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4488 #endif
4489 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4490  PyObject *__pyx_r = 0;
4491  __Pyx_RefNannyDeclarations
4492  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4493  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4494 
4495  /* function exit code */
4496  __Pyx_RefNannyFinishContext();
4497  return __pyx_r;
4498 }
4499 
4500 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4501  PyObject *__pyx_r = NULL;
4502  __Pyx_RefNannyDeclarations
4503  PyObject *__pyx_t_1 = NULL;
4504  PyObject *__pyx_t_2 = NULL;
4505  __Pyx_RefNannySetupContext("__xor__", 0);
4506 
4507  /* "PyClical.pyx":256
4508  * {1}
4509  * """
4510  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4511  *
4512  * def __ixor__(self, rhs):
4513  */
4514  __Pyx_XDECREF(__pyx_r);
4515  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
4516  __Pyx_GOTREF(__pyx_t_1);
4517  __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)
4518  __Pyx_GOTREF(__pyx_t_2);
4519  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4520  __pyx_r = __pyx_t_2;
4521  __pyx_t_2 = 0;
4522  goto __pyx_L0;
4523 
4524  /* "PyClical.pyx":247
4525  * return index_set().wrap( self.instance.invert() )
4526  *
4527  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4528  * """
4529  * Symmetric set difference: exclusive or.
4530  */
4531 
4532  /* function exit code */
4533  __pyx_L1_error:;
4534  __Pyx_XDECREF(__pyx_t_1);
4535  __Pyx_XDECREF(__pyx_t_2);
4536  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4537  __pyx_r = NULL;
4538  __pyx_L0:;
4539  __Pyx_XGIVEREF(__pyx_r);
4540  __Pyx_RefNannyFinishContext();
4541  return __pyx_r;
4542 }
4543 
4544 /* "PyClical.pyx":258
4545  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4546  *
4547  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4548  * """
4549  * Symmetric set difference: exclusive or.
4550  */
4551 
4552 /* Python wrapper */
4553 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4554 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 ";
4555 #if CYTHON_COMPILING_IN_CPYTHON
4556 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4557 #endif
4558 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4559  PyObject *__pyx_r = 0;
4560  __Pyx_RefNannyDeclarations
4561  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4562  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4563 
4564  /* function exit code */
4565  __Pyx_RefNannyFinishContext();
4566  return __pyx_r;
4567 }
4568 
4569 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4570  PyObject *__pyx_r = NULL;
4571  __Pyx_RefNannyDeclarations
4572  PyObject *__pyx_t_1 = NULL;
4573  __Pyx_RefNannySetupContext("__ixor__", 0);
4574 
4575  /* "PyClical.pyx":267
4576  * {1}
4577  * """
4578  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4579  *
4580  * def __and__(lhs, rhs):
4581  */
4582  __Pyx_XDECREF(__pyx_r);
4583  __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)
4584  __Pyx_GOTREF(__pyx_t_1);
4585  __pyx_r = __pyx_t_1;
4586  __pyx_t_1 = 0;
4587  goto __pyx_L0;
4588 
4589  /* "PyClical.pyx":258
4590  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4591  *
4592  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4593  * """
4594  * Symmetric set difference: exclusive or.
4595  */
4596 
4597  /* function exit code */
4598  __pyx_L1_error:;
4599  __Pyx_XDECREF(__pyx_t_1);
4600  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4601  __pyx_r = NULL;
4602  __pyx_L0:;
4603  __Pyx_XGIVEREF(__pyx_r);
4604  __Pyx_RefNannyFinishContext();
4605  return __pyx_r;
4606 }
4607 
4608 /* "PyClical.pyx":269
4609  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4610  *
4611  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4612  * """
4613  * Set intersection: and.
4614  */
4615 
4616 /* Python wrapper */
4617 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4618 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 ";
4619 #if CYTHON_COMPILING_IN_CPYTHON
4620 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4621 #endif
4622 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4623  PyObject *__pyx_r = 0;
4624  __Pyx_RefNannyDeclarations
4625  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4626  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4627 
4628  /* function exit code */
4629  __Pyx_RefNannyFinishContext();
4630  return __pyx_r;
4631 }
4632 
4633 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4634  PyObject *__pyx_r = NULL;
4635  __Pyx_RefNannyDeclarations
4636  PyObject *__pyx_t_1 = NULL;
4637  PyObject *__pyx_t_2 = NULL;
4638  __Pyx_RefNannySetupContext("__and__", 0);
4639 
4640  /* "PyClical.pyx":278
4641  * {2}
4642  * """
4643  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4644  *
4645  * def __iand__(self, rhs):
4646  */
4647  __Pyx_XDECREF(__pyx_r);
4648  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
4649  __Pyx_GOTREF(__pyx_t_1);
4650  __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)
4651  __Pyx_GOTREF(__pyx_t_2);
4652  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4653  __pyx_r = __pyx_t_2;
4654  __pyx_t_2 = 0;
4655  goto __pyx_L0;
4656 
4657  /* "PyClical.pyx":269
4658  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4659  *
4660  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4661  * """
4662  * Set intersection: and.
4663  */
4664 
4665  /* function exit code */
4666  __pyx_L1_error:;
4667  __Pyx_XDECREF(__pyx_t_1);
4668  __Pyx_XDECREF(__pyx_t_2);
4669  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4670  __pyx_r = NULL;
4671  __pyx_L0:;
4672  __Pyx_XGIVEREF(__pyx_r);
4673  __Pyx_RefNannyFinishContext();
4674  return __pyx_r;
4675 }
4676 
4677 /* "PyClical.pyx":280
4678  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4679  *
4680  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4681  * """
4682  * Set intersection: and.
4683  */
4684 
4685 /* Python wrapper */
4686 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4687 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 ";
4688 #if CYTHON_COMPILING_IN_CPYTHON
4689 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4690 #endif
4691 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4692  PyObject *__pyx_r = 0;
4693  __Pyx_RefNannyDeclarations
4694  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4695  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4696 
4697  /* function exit code */
4698  __Pyx_RefNannyFinishContext();
4699  return __pyx_r;
4700 }
4701 
4702 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4703  PyObject *__pyx_r = NULL;
4704  __Pyx_RefNannyDeclarations
4705  PyObject *__pyx_t_1 = NULL;
4706  __Pyx_RefNannySetupContext("__iand__", 0);
4707 
4708  /* "PyClical.pyx":289
4709  * {2}
4710  * """
4711  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4712  *
4713  * def __or__(lhs, rhs):
4714  */
4715  __Pyx_XDECREF(__pyx_r);
4716  __pyx_t_1 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self) & __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
4717  __Pyx_GOTREF(__pyx_t_1);
4718  __pyx_r = __pyx_t_1;
4719  __pyx_t_1 = 0;
4720  goto __pyx_L0;
4721 
4722  /* "PyClical.pyx":280
4723  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4724  *
4725  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4726  * """
4727  * Set intersection: and.
4728  */
4729 
4730  /* function exit code */
4731  __pyx_L1_error:;
4732  __Pyx_XDECREF(__pyx_t_1);
4733  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4734  __pyx_r = NULL;
4735  __pyx_L0:;
4736  __Pyx_XGIVEREF(__pyx_r);
4737  __Pyx_RefNannyFinishContext();
4738  return __pyx_r;
4739 }
4740 
4741 /* "PyClical.pyx":291
4742  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4743  *
4744  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4745  * """
4746  * Set union: or.
4747  */
4748 
4749 /* Python wrapper */
4750 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4751 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 ";
4752 #if CYTHON_COMPILING_IN_CPYTHON
4753 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4754 #endif
4755 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4756  PyObject *__pyx_r = 0;
4757  __Pyx_RefNannyDeclarations
4758  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4759  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4760 
4761  /* function exit code */
4762  __Pyx_RefNannyFinishContext();
4763  return __pyx_r;
4764 }
4765 
4766 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4767  PyObject *__pyx_r = NULL;
4768  __Pyx_RefNannyDeclarations
4769  PyObject *__pyx_t_1 = NULL;
4770  PyObject *__pyx_t_2 = NULL;
4771  __Pyx_RefNannySetupContext("__or__", 0);
4772 
4773  /* "PyClical.pyx":300
4774  * {1,2}
4775  * """
4776  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4777  *
4778  * def __ior__(self, rhs):
4779  */
4780  __Pyx_XDECREF(__pyx_r);
4781  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
4782  __Pyx_GOTREF(__pyx_t_1);
4783  __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)
4784  __Pyx_GOTREF(__pyx_t_2);
4785  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4786  __pyx_r = __pyx_t_2;
4787  __pyx_t_2 = 0;
4788  goto __pyx_L0;
4789 
4790  /* "PyClical.pyx":291
4791  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4792  *
4793  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4794  * """
4795  * Set union: or.
4796  */
4797 
4798  /* function exit code */
4799  __pyx_L1_error:;
4800  __Pyx_XDECREF(__pyx_t_1);
4801  __Pyx_XDECREF(__pyx_t_2);
4802  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4803  __pyx_r = NULL;
4804  __pyx_L0:;
4805  __Pyx_XGIVEREF(__pyx_r);
4806  __Pyx_RefNannyFinishContext();
4807  return __pyx_r;
4808 }
4809 
4810 /* "PyClical.pyx":302
4811  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4812  *
4813  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4814  * """
4815  * Set union: or.
4816  */
4817 
4818 /* Python wrapper */
4819 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4820 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 ";
4821 #if CYTHON_COMPILING_IN_CPYTHON
4822 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4823 #endif
4824 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4825  PyObject *__pyx_r = 0;
4826  __Pyx_RefNannyDeclarations
4827  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4828  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4829 
4830  /* function exit code */
4831  __Pyx_RefNannyFinishContext();
4832  return __pyx_r;
4833 }
4834 
4835 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4836  PyObject *__pyx_r = NULL;
4837  __Pyx_RefNannyDeclarations
4838  PyObject *__pyx_t_1 = NULL;
4839  __Pyx_RefNannySetupContext("__ior__", 0);
4840 
4841  /* "PyClical.pyx":311
4842  * {1,2}
4843  * """
4844  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4845  *
4846  * def count(self):
4847  */
4848  __Pyx_XDECREF(__pyx_r);
4849  __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)
4850  __Pyx_GOTREF(__pyx_t_1);
4851  __pyx_r = __pyx_t_1;
4852  __pyx_t_1 = 0;
4853  goto __pyx_L0;
4854 
4855  /* "PyClical.pyx":302
4856  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4857  *
4858  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4859  * """
4860  * Set union: or.
4861  */
4862 
4863  /* function exit code */
4864  __pyx_L1_error:;
4865  __Pyx_XDECREF(__pyx_t_1);
4866  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4867  __pyx_r = NULL;
4868  __pyx_L0:;
4869  __Pyx_XGIVEREF(__pyx_r);
4870  __Pyx_RefNannyFinishContext();
4871  return __pyx_r;
4872 }
4873 
4874 /* "PyClical.pyx":313
4875  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4876  *
4877  * def count(self): # <<<<<<<<<<<<<<
4878  * """
4879  * Cardinality: Number of indices included in set.
4880  */
4881 
4882 /* Python wrapper */
4883 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4884 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 ";
4885 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4886  PyObject *__pyx_r = 0;
4887  __Pyx_RefNannyDeclarations
4888  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4889  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4890 
4891  /* function exit code */
4892  __Pyx_RefNannyFinishContext();
4893  return __pyx_r;
4894 }
4895 
4896 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4897  PyObject *__pyx_r = NULL;
4898  __Pyx_RefNannyDeclarations
4899  PyObject *__pyx_t_1 = NULL;
4900  __Pyx_RefNannySetupContext("count", 0);
4901 
4902  /* "PyClical.pyx":320
4903  * 3
4904  * """
4905  * return self.instance.count() # <<<<<<<<<<<<<<
4906  *
4907  * def count_neg(self):
4908  */
4909  __Pyx_XDECREF(__pyx_r);
4910  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4911  __Pyx_GOTREF(__pyx_t_1);
4912  __pyx_r = __pyx_t_1;
4913  __pyx_t_1 = 0;
4914  goto __pyx_L0;
4915 
4916  /* "PyClical.pyx":313
4917  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4918  *
4919  * def count(self): # <<<<<<<<<<<<<<
4920  * """
4921  * Cardinality: Number of indices included in set.
4922  */
4923 
4924  /* function exit code */
4925  __pyx_L1_error:;
4926  __Pyx_XDECREF(__pyx_t_1);
4927  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4928  __pyx_r = NULL;
4929  __pyx_L0:;
4930  __Pyx_XGIVEREF(__pyx_r);
4931  __Pyx_RefNannyFinishContext();
4932  return __pyx_r;
4933 }
4934 
4935 /* "PyClical.pyx":322
4936  * return self.instance.count()
4937  *
4938  * def count_neg(self): # <<<<<<<<<<<<<<
4939  * """
4940  * Number of negative indices included in set.
4941  */
4942 
4943 /* Python wrapper */
4944 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4945 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 ";
4946 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4947  PyObject *__pyx_r = 0;
4948  __Pyx_RefNannyDeclarations
4949  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4950  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4951 
4952  /* function exit code */
4953  __Pyx_RefNannyFinishContext();
4954  return __pyx_r;
4955 }
4956 
4957 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4958  PyObject *__pyx_r = NULL;
4959  __Pyx_RefNannyDeclarations
4960  PyObject *__pyx_t_1 = NULL;
4961  __Pyx_RefNannySetupContext("count_neg", 0);
4962 
4963  /* "PyClical.pyx":329
4964  * 1
4965  * """
4966  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4967  *
4968  * def count_pos(self):
4969  */
4970  __Pyx_XDECREF(__pyx_r);
4971  __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)
4972  __Pyx_GOTREF(__pyx_t_1);
4973  __pyx_r = __pyx_t_1;
4974  __pyx_t_1 = 0;
4975  goto __pyx_L0;
4976 
4977  /* "PyClical.pyx":322
4978  * return self.instance.count()
4979  *
4980  * def count_neg(self): # <<<<<<<<<<<<<<
4981  * """
4982  * Number of negative indices included in set.
4983  */
4984 
4985  /* function exit code */
4986  __pyx_L1_error:;
4987  __Pyx_XDECREF(__pyx_t_1);
4988  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4989  __pyx_r = NULL;
4990  __pyx_L0:;
4991  __Pyx_XGIVEREF(__pyx_r);
4992  __Pyx_RefNannyFinishContext();
4993  return __pyx_r;
4994 }
4995 
4996 /* "PyClical.pyx":331
4997  * return self.instance.count_neg()
4998  *
4999  * def count_pos(self): # <<<<<<<<<<<<<<
5000  * """
5001  * Number of positive indices included in set.
5002  */
5003 
5004 /* Python wrapper */
5005 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5006 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 ";
5007 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5008  PyObject *__pyx_r = 0;
5009  __Pyx_RefNannyDeclarations
5010  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5011  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5012 
5013  /* function exit code */
5014  __Pyx_RefNannyFinishContext();
5015  return __pyx_r;
5016 }
5017 
5018 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5019  PyObject *__pyx_r = NULL;
5020  __Pyx_RefNannyDeclarations
5021  PyObject *__pyx_t_1 = NULL;
5022  __Pyx_RefNannySetupContext("count_pos", 0);
5023 
5024  /* "PyClical.pyx":338
5025  * 2
5026  * """
5027  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5028  *
5029  * def min(self):
5030  */
5031  __Pyx_XDECREF(__pyx_r);
5032  __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)
5033  __Pyx_GOTREF(__pyx_t_1);
5034  __pyx_r = __pyx_t_1;
5035  __pyx_t_1 = 0;
5036  goto __pyx_L0;
5037 
5038  /* "PyClical.pyx":331
5039  * return self.instance.count_neg()
5040  *
5041  * def count_pos(self): # <<<<<<<<<<<<<<
5042  * """
5043  * Number of positive indices included in set.
5044  */
5045 
5046  /* function exit code */
5047  __pyx_L1_error:;
5048  __Pyx_XDECREF(__pyx_t_1);
5049  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5050  __pyx_r = NULL;
5051  __pyx_L0:;
5052  __Pyx_XGIVEREF(__pyx_r);
5053  __Pyx_RefNannyFinishContext();
5054  return __pyx_r;
5055 }
5056 
5057 /* "PyClical.pyx":340
5058  * return self.instance.count_pos()
5059  *
5060  * def min(self): # <<<<<<<<<<<<<<
5061  * """
5062  * Minimum member.
5063  */
5064 
5065 /* Python wrapper */
5066 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5067 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5068 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5069  PyObject *__pyx_r = 0;
5070  __Pyx_RefNannyDeclarations
5071  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5072  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5073 
5074  /* function exit code */
5075  __Pyx_RefNannyFinishContext();
5076  return __pyx_r;
5077 }
5078 
5079 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5080  PyObject *__pyx_r = NULL;
5081  __Pyx_RefNannyDeclarations
5082  PyObject *__pyx_t_1 = NULL;
5083  __Pyx_RefNannySetupContext("min", 0);
5084 
5085  /* "PyClical.pyx":347
5086  * -1
5087  * """
5088  * return self.instance.min() # <<<<<<<<<<<<<<
5089  *
5090  * def max(self):
5091  */
5092  __Pyx_XDECREF(__pyx_r);
5093  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5094  __Pyx_GOTREF(__pyx_t_1);
5095  __pyx_r = __pyx_t_1;
5096  __pyx_t_1 = 0;
5097  goto __pyx_L0;
5098 
5099  /* "PyClical.pyx":340
5100  * return self.instance.count_pos()
5101  *
5102  * def min(self): # <<<<<<<<<<<<<<
5103  * """
5104  * Minimum member.
5105  */
5106 
5107  /* function exit code */
5108  __pyx_L1_error:;
5109  __Pyx_XDECREF(__pyx_t_1);
5110  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5111  __pyx_r = NULL;
5112  __pyx_L0:;
5113  __Pyx_XGIVEREF(__pyx_r);
5114  __Pyx_RefNannyFinishContext();
5115  return __pyx_r;
5116 }
5117 
5118 /* "PyClical.pyx":349
5119  * return self.instance.min()
5120  *
5121  * def max(self): # <<<<<<<<<<<<<<
5122  * """
5123  * Maximum member.
5124  */
5125 
5126 /* Python wrapper */
5127 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5128 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5129 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5130  PyObject *__pyx_r = 0;
5131  __Pyx_RefNannyDeclarations
5132  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5133  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5134 
5135  /* function exit code */
5136  __Pyx_RefNannyFinishContext();
5137  return __pyx_r;
5138 }
5139 
5140 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5141  PyObject *__pyx_r = NULL;
5142  __Pyx_RefNannyDeclarations
5143  PyObject *__pyx_t_1 = NULL;
5144  __Pyx_RefNannySetupContext("max", 0);
5145 
5146  /* "PyClical.pyx":356
5147  * 2
5148  * """
5149  * return self.instance.max() # <<<<<<<<<<<<<<
5150  *
5151  * def hash_fn(self):
5152  */
5153  __Pyx_XDECREF(__pyx_r);
5154  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5155  __Pyx_GOTREF(__pyx_t_1);
5156  __pyx_r = __pyx_t_1;
5157  __pyx_t_1 = 0;
5158  goto __pyx_L0;
5159 
5160  /* "PyClical.pyx":349
5161  * return self.instance.min()
5162  *
5163  * def max(self): # <<<<<<<<<<<<<<
5164  * """
5165  * Maximum member.
5166  */
5167 
5168  /* function exit code */
5169  __pyx_L1_error:;
5170  __Pyx_XDECREF(__pyx_t_1);
5171  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5172  __pyx_r = NULL;
5173  __pyx_L0:;
5174  __Pyx_XGIVEREF(__pyx_r);
5175  __Pyx_RefNannyFinishContext();
5176  return __pyx_r;
5177 }
5178 
5179 /* "PyClical.pyx":358
5180  * return self.instance.max()
5181  *
5182  * def hash_fn(self): # <<<<<<<<<<<<<<
5183  * """
5184  * Hash function.
5185  */
5186 
5187 /* Python wrapper */
5188 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5189 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5190 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5191  PyObject *__pyx_r = 0;
5192  __Pyx_RefNannyDeclarations
5193  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5194  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5195 
5196  /* function exit code */
5197  __Pyx_RefNannyFinishContext();
5198  return __pyx_r;
5199 }
5200 
5201 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5202  PyObject *__pyx_r = NULL;
5203  __Pyx_RefNannyDeclarations
5204  PyObject *__pyx_t_1 = NULL;
5205  __Pyx_RefNannySetupContext("hash_fn", 0);
5206 
5207  /* "PyClical.pyx":362
5208  * Hash function.
5209  * """
5210  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5211  *
5212  * def sign_of_mult(self, rhs):
5213  */
5214  __Pyx_XDECREF(__pyx_r);
5215  __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)
5216  __Pyx_GOTREF(__pyx_t_1);
5217  __pyx_r = __pyx_t_1;
5218  __pyx_t_1 = 0;
5219  goto __pyx_L0;
5220 
5221  /* "PyClical.pyx":358
5222  * return self.instance.max()
5223  *
5224  * def hash_fn(self): # <<<<<<<<<<<<<<
5225  * """
5226  * Hash function.
5227  */
5228 
5229  /* function exit code */
5230  __pyx_L1_error:;
5231  __Pyx_XDECREF(__pyx_t_1);
5232  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5233  __pyx_r = NULL;
5234  __pyx_L0:;
5235  __Pyx_XGIVEREF(__pyx_r);
5236  __Pyx_RefNannyFinishContext();
5237  return __pyx_r;
5238 }
5239 
5240 /* "PyClical.pyx":364
5241  * return self.instance.hash_fn()
5242  *
5243  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5244  * """
5245  * Sign of geometric product of two Clifford basis elements.
5246  */
5247 
5248 /* Python wrapper */
5249 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5250 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 ";
5251 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5252  PyObject *__pyx_r = 0;
5253  __Pyx_RefNannyDeclarations
5254  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5255  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5256 
5257  /* function exit code */
5258  __Pyx_RefNannyFinishContext();
5259  return __pyx_r;
5260 }
5261 
5262 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5263  PyObject *__pyx_r = NULL;
5264  __Pyx_RefNannyDeclarations
5265  PyObject *__pyx_t_1 = NULL;
5266  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5267 
5268  /* "PyClical.pyx":371
5269  * 1
5270  * """
5271  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5272  *
5273  * def sign_of_square(self):
5274  */
5275  __Pyx_XDECREF(__pyx_r);
5276  __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)
5277  __Pyx_GOTREF(__pyx_t_1);
5278  __pyx_r = __pyx_t_1;
5279  __pyx_t_1 = 0;
5280  goto __pyx_L0;
5281 
5282  /* "PyClical.pyx":364
5283  * return self.instance.hash_fn()
5284  *
5285  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5286  * """
5287  * Sign of geometric product of two Clifford basis elements.
5288  */
5289 
5290  /* function exit code */
5291  __pyx_L1_error:;
5292  __Pyx_XDECREF(__pyx_t_1);
5293  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5294  __pyx_r = NULL;
5295  __pyx_L0:;
5296  __Pyx_XGIVEREF(__pyx_r);
5297  __Pyx_RefNannyFinishContext();
5298  return __pyx_r;
5299 }
5300 
5301 /* "PyClical.pyx":373
5302  * return self.instance.sign_of_mult(toIndexSet(rhs))
5303  *
5304  * def sign_of_square(self): # <<<<<<<<<<<<<<
5305  * """
5306  * Sign of geometric square of a Clifford basis element.
5307  */
5308 
5309 /* Python wrapper */
5310 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5311 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 ";
5312 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5313  PyObject *__pyx_r = 0;
5314  __Pyx_RefNannyDeclarations
5315  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5316  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5317 
5318  /* function exit code */
5319  __Pyx_RefNannyFinishContext();
5320  return __pyx_r;
5321 }
5322 
5323 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5324  PyObject *__pyx_r = NULL;
5325  __Pyx_RefNannyDeclarations
5326  PyObject *__pyx_t_1 = NULL;
5327  __Pyx_RefNannySetupContext("sign_of_square", 0);
5328 
5329  /* "PyClical.pyx":380
5330  * -1
5331  * """
5332  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5333  *
5334  * def __repr__(self):
5335  */
5336  __Pyx_XDECREF(__pyx_r);
5337  __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)
5338  __Pyx_GOTREF(__pyx_t_1);
5339  __pyx_r = __pyx_t_1;
5340  __pyx_t_1 = 0;
5341  goto __pyx_L0;
5342 
5343  /* "PyClical.pyx":373
5344  * return self.instance.sign_of_mult(toIndexSet(rhs))
5345  *
5346  * def sign_of_square(self): # <<<<<<<<<<<<<<
5347  * """
5348  * Sign of geometric square of a Clifford basis element.
5349  */
5350 
5351  /* function exit code */
5352  __pyx_L1_error:;
5353  __Pyx_XDECREF(__pyx_t_1);
5354  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5355  __pyx_r = NULL;
5356  __pyx_L0:;
5357  __Pyx_XGIVEREF(__pyx_r);
5358  __Pyx_RefNannyFinishContext();
5359  return __pyx_r;
5360 }
5361 
5362 /* "PyClical.pyx":382
5363  * return self.instance.sign_of_square()
5364  *
5365  * def __repr__(self): # <<<<<<<<<<<<<<
5366  * """
5367  * The official string representation of self.
5368  */
5369 
5370 /* Python wrapper */
5371 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5372 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 ";
5373 #if CYTHON_COMPILING_IN_CPYTHON
5374 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5375 #endif
5376 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5377  PyObject *__pyx_r = 0;
5378  __Pyx_RefNannyDeclarations
5379  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5380  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5381 
5382  /* function exit code */
5383  __Pyx_RefNannyFinishContext();
5384  return __pyx_r;
5385 }
5386 
5387 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5388  PyObject *__pyx_r = NULL;
5389  __Pyx_RefNannyDeclarations
5390  PyObject *__pyx_t_1 = NULL;
5391  __Pyx_RefNannySetupContext("__repr__", 0);
5392 
5393  /* "PyClical.pyx":391
5394  * 'index_set({1,2})'
5395  * """
5396  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5397  *
5398  * def __str__(self):
5399  */
5400  __Pyx_XDECREF(__pyx_r);
5401  __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)
5402  __Pyx_GOTREF(__pyx_t_1);
5403  __pyx_r = __pyx_t_1;
5404  __pyx_t_1 = 0;
5405  goto __pyx_L0;
5406 
5407  /* "PyClical.pyx":382
5408  * return self.instance.sign_of_square()
5409  *
5410  * def __repr__(self): # <<<<<<<<<<<<<<
5411  * """
5412  * The official string representation of self.
5413  */
5414 
5415  /* function exit code */
5416  __pyx_L1_error:;
5417  __Pyx_XDECREF(__pyx_t_1);
5418  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5419  __pyx_r = NULL;
5420  __pyx_L0:;
5421  __Pyx_XGIVEREF(__pyx_r);
5422  __Pyx_RefNannyFinishContext();
5423  return __pyx_r;
5424 }
5425 
5426 /* "PyClical.pyx":393
5427  * return index_set_to_repr( self.unwrap() ).c_str()
5428  *
5429  * def __str__(self): # <<<<<<<<<<<<<<
5430  * """
5431  * The informal string representation of self.
5432  */
5433 
5434 /* Python wrapper */
5435 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5436 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 ";
5437 #if CYTHON_COMPILING_IN_CPYTHON
5438 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5439 #endif
5440 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5441  PyObject *__pyx_r = 0;
5442  __Pyx_RefNannyDeclarations
5443  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5444  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5445 
5446  /* function exit code */
5447  __Pyx_RefNannyFinishContext();
5448  return __pyx_r;
5449 }
5450 
5451 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5452  PyObject *__pyx_r = NULL;
5453  __Pyx_RefNannyDeclarations
5454  PyObject *__pyx_t_1 = NULL;
5455  __Pyx_RefNannySetupContext("__str__", 0);
5456 
5457  /* "PyClical.pyx":402
5458  * '{1,2}'
5459  * """
5460  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5461  *
5462  * def index_set_hidden_doctests():
5463  */
5464  __Pyx_XDECREF(__pyx_r);
5465  __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)
5466  __Pyx_GOTREF(__pyx_t_1);
5467  __pyx_r = __pyx_t_1;
5468  __pyx_t_1 = 0;
5469  goto __pyx_L0;
5470 
5471  /* "PyClical.pyx":393
5472  * return index_set_to_repr( self.unwrap() ).c_str()
5473  *
5474  * def __str__(self): # <<<<<<<<<<<<<<
5475  * """
5476  * The informal string representation of self.
5477  */
5478 
5479  /* function exit code */
5480  __pyx_L1_error:;
5481  __Pyx_XDECREF(__pyx_t_1);
5482  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5483  __pyx_r = NULL;
5484  __pyx_L0:;
5485  __Pyx_XGIVEREF(__pyx_r);
5486  __Pyx_RefNannyFinishContext();
5487  return __pyx_r;
5488 }
5489 
5490 /* "(tree fragment)":1
5491  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5492  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5493  * def __setstate_cython__(self, __pyx_state):
5494  */
5495 
5496 /* Python wrapper */
5497 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5498 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5499  PyObject *__pyx_r = 0;
5500  __Pyx_RefNannyDeclarations
5501  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5502  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5503 
5504  /* function exit code */
5505  __Pyx_RefNannyFinishContext();
5506  return __pyx_r;
5507 }
5508 
5509 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5510  PyObject *__pyx_r = NULL;
5511  __Pyx_RefNannyDeclarations
5512  PyObject *__pyx_t_1 = NULL;
5513  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5514 
5515  /* "(tree fragment)":2
5516  * def __reduce_cython__(self):
5517  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5518  * def __setstate_cython__(self, __pyx_state):
5519  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5520  */
5521  __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)
5522  __Pyx_GOTREF(__pyx_t_1);
5523  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5524  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5525  __PYX_ERR(1, 2, __pyx_L1_error)
5526 
5527  /* "(tree fragment)":1
5528  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5529  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5530  * def __setstate_cython__(self, __pyx_state):
5531  */
5532 
5533  /* function exit code */
5534  __pyx_L1_error:;
5535  __Pyx_XDECREF(__pyx_t_1);
5536  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5537  __pyx_r = NULL;
5538  __Pyx_XGIVEREF(__pyx_r);
5539  __Pyx_RefNannyFinishContext();
5540  return __pyx_r;
5541 }
5542 
5543 /* "(tree fragment)":3
5544  * def __reduce_cython__(self):
5545  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5546  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5547  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5548  */
5549 
5550 /* Python wrapper */
5551 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5552 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5553  PyObject *__pyx_r = 0;
5554  __Pyx_RefNannyDeclarations
5555  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5556  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5557 
5558  /* function exit code */
5559  __Pyx_RefNannyFinishContext();
5560  return __pyx_r;
5561 }
5562 
5563 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) {
5564  PyObject *__pyx_r = NULL;
5565  __Pyx_RefNannyDeclarations
5566  PyObject *__pyx_t_1 = NULL;
5567  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5568 
5569  /* "(tree fragment)":4
5570  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5571  * def __setstate_cython__(self, __pyx_state):
5572  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5573  */
5574  __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)
5575  __Pyx_GOTREF(__pyx_t_1);
5576  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5577  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5578  __PYX_ERR(1, 4, __pyx_L1_error)
5579 
5580  /* "(tree fragment)":3
5581  * def __reduce_cython__(self):
5582  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5583  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5584  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5585  */
5586 
5587  /* function exit code */
5588  __pyx_L1_error:;
5589  __Pyx_XDECREF(__pyx_t_1);
5590  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5591  __pyx_r = NULL;
5592  __Pyx_XGIVEREF(__pyx_r);
5593  __Pyx_RefNannyFinishContext();
5594  return __pyx_r;
5595 }
5596 
5597 /* "PyClical.pyx":404
5598  * return index_set_to_str( self.unwrap() ).c_str()
5599  *
5600  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5601  * """
5602  * Tests for functions that Doctest cannot see.
5603  */
5604 
5605 /* Python wrapper */
5606 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5607 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 ";
5608  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};
5609  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5610  PyObject *__pyx_r = 0;
5611  __Pyx_RefNannyDeclarations
5612  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5613  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5614 
5615  /* function exit code */
5616  __Pyx_RefNannyFinishContext();
5617  return __pyx_r;
5618  }
5619 
5620  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5621  PyObject *__pyx_r = NULL;
5622  __Pyx_RefNannyDeclarations
5623  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5624 
5625  /* "PyClical.pyx":488
5626  * False
5627  * """
5628  * return # <<<<<<<<<<<<<<
5629  *
5630  * cpdef inline compare(lhs,rhs):
5631  */
5632  __Pyx_XDECREF(__pyx_r);
5633  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5634  goto __pyx_L0;
5635 
5636  /* "PyClical.pyx":404
5637  * return index_set_to_str( self.unwrap() ).c_str()
5638  *
5639  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5640  * """
5641  * Tests for functions that Doctest cannot see.
5642  */
5643 
5644  /* function exit code */
5645  __pyx_L0:;
5646  __Pyx_XGIVEREF(__pyx_r);
5647  __Pyx_RefNannyFinishContext();
5648  return __pyx_r;
5649  }
5650 
5651  /* "PyClical.pyx":490
5652  * return
5653  *
5654  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5655  * """
5656  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5657  */
5658 
5659  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5660  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5661  PyObject *__pyx_r = NULL;
5662  __Pyx_RefNannyDeclarations
5663  PyObject *__pyx_t_1 = NULL;
5664  __Pyx_RefNannySetupContext("compare", 0);
5665 
5666  /* "PyClical.pyx":500
5667  * 1
5668  * """
5669  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5670  *
5671  * cpdef inline min_neg(obj):
5672  */
5673  __Pyx_XDECREF(__pyx_r);
5674  __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)
5675  __Pyx_GOTREF(__pyx_t_1);
5676  __pyx_r = __pyx_t_1;
5677  __pyx_t_1 = 0;
5678  goto __pyx_L0;
5679 
5680  /* "PyClical.pyx":490
5681  * return
5682  *
5683  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5684  * """
5685  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5686  */
5687 
5688  /* function exit code */
5689  __pyx_L1_error:;
5690  __Pyx_XDECREF(__pyx_t_1);
5691  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5692  __pyx_r = 0;
5693  __pyx_L0:;
5694  __Pyx_XGIVEREF(__pyx_r);
5695  __Pyx_RefNannyFinishContext();
5696  return __pyx_r;
5697  }
5698 
5699  /* Python wrapper */
5700  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5701  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 ";
5702  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5703  PyObject *__pyx_v_lhs = 0;
5704  PyObject *__pyx_v_rhs = 0;
5705  PyObject *__pyx_r = 0;
5706  __Pyx_RefNannyDeclarations
5707  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5708  {
5709  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5710  PyObject* values[2] = {0,0};
5711  if (unlikely(__pyx_kwds)) {
5712  Py_ssize_t kw_args;
5713  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5714  switch (pos_args) {
5715  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5716  CYTHON_FALLTHROUGH;
5717  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5718  CYTHON_FALLTHROUGH;
5719  case 0: break;
5720  default: goto __pyx_L5_argtuple_error;
5721  }
5722  kw_args = PyDict_Size(__pyx_kwds);
5723  switch (pos_args) {
5724  case 0:
5725  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5726  else goto __pyx_L5_argtuple_error;
5727  CYTHON_FALLTHROUGH;
5728  case 1:
5729  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5730  else {
5731  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5732  }
5733  }
5734  if (unlikely(kw_args > 0)) {
5735  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5736  }
5737  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5738  goto __pyx_L5_argtuple_error;
5739  } else {
5740  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5741  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5742  }
5743  __pyx_v_lhs = values[0];
5744  __pyx_v_rhs = values[1];
5745  }
5746  goto __pyx_L4_argument_unpacking_done;
5747  __pyx_L5_argtuple_error:;
5748  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5749  __pyx_L3_error:;
5750  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5751  __Pyx_RefNannyFinishContext();
5752  return NULL;
5753  __pyx_L4_argument_unpacking_done:;
5754  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5755 
5756  /* function exit code */
5757  __Pyx_RefNannyFinishContext();
5758  return __pyx_r;
5759  }
5760 
5761  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5762  PyObject *__pyx_r = NULL;
5763  __Pyx_RefNannyDeclarations
5764  PyObject *__pyx_t_1 = NULL;
5765  __Pyx_RefNannySetupContext("compare", 0);
5766  __Pyx_XDECREF(__pyx_r);
5767  __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)
5768  __Pyx_GOTREF(__pyx_t_1);
5769  __pyx_r = __pyx_t_1;
5770  __pyx_t_1 = 0;
5771  goto __pyx_L0;
5772 
5773  /* function exit code */
5774  __pyx_L1_error:;
5775  __Pyx_XDECREF(__pyx_t_1);
5776  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5777  __pyx_r = NULL;
5778  __pyx_L0:;
5779  __Pyx_XGIVEREF(__pyx_r);
5780  __Pyx_RefNannyFinishContext();
5781  return __pyx_r;
5782  }
5783 
5784  /* "PyClical.pyx":502
5785  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5786  *
5787  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5788  * """
5789  * Minimum negative index, or 0 if none.
5790  */
5791 
5792  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5793  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5794  PyObject *__pyx_r = NULL;
5795  __Pyx_RefNannyDeclarations
5796  PyObject *__pyx_t_1 = NULL;
5797  __Pyx_RefNannySetupContext("min_neg", 0);
5798 
5799  /* "PyClical.pyx":509
5800  * 0
5801  * """
5802  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5803  *
5804  * cpdef inline max_pos(obj):
5805  */
5806  __Pyx_XDECREF(__pyx_r);
5807  __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)
5808  __Pyx_GOTREF(__pyx_t_1);
5809  __pyx_r = __pyx_t_1;
5810  __pyx_t_1 = 0;
5811  goto __pyx_L0;
5812 
5813  /* "PyClical.pyx":502
5814  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5815  *
5816  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5817  * """
5818  * Minimum negative index, or 0 if none.
5819  */
5820 
5821  /* function exit code */
5822  __pyx_L1_error:;
5823  __Pyx_XDECREF(__pyx_t_1);
5824  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5825  __pyx_r = 0;
5826  __pyx_L0:;
5827  __Pyx_XGIVEREF(__pyx_r);
5828  __Pyx_RefNannyFinishContext();
5829  return __pyx_r;
5830  }
5831 
5832  /* Python wrapper */
5833  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5834  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 ";
5835  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5836  PyObject *__pyx_r = 0;
5837  __Pyx_RefNannyDeclarations
5838  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5839  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5840 
5841  /* function exit code */
5842  __Pyx_RefNannyFinishContext();
5843  return __pyx_r;
5844  }
5845 
5846  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5847  PyObject *__pyx_r = NULL;
5848  __Pyx_RefNannyDeclarations
5849  PyObject *__pyx_t_1 = NULL;
5850  __Pyx_RefNannySetupContext("min_neg", 0);
5851  __Pyx_XDECREF(__pyx_r);
5852  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5853  __Pyx_GOTREF(__pyx_t_1);
5854  __pyx_r = __pyx_t_1;
5855  __pyx_t_1 = 0;
5856  goto __pyx_L0;
5857 
5858  /* function exit code */
5859  __pyx_L1_error:;
5860  __Pyx_XDECREF(__pyx_t_1);
5861  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5862  __pyx_r = NULL;
5863  __pyx_L0:;
5864  __Pyx_XGIVEREF(__pyx_r);
5865  __Pyx_RefNannyFinishContext();
5866  return __pyx_r;
5867  }
5868 
5869  /* "PyClical.pyx":511
5870  * return glucat.min_neg( toIndexSet(obj) )
5871  *
5872  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5873  * """
5874  * Maximum positive index, or 0 if none.
5875  */
5876 
5877  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5878  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5879  PyObject *__pyx_r = NULL;
5880  __Pyx_RefNannyDeclarations
5881  PyObject *__pyx_t_1 = NULL;
5882  __Pyx_RefNannySetupContext("max_pos", 0);
5883 
5884  /* "PyClical.pyx":518
5885  * 2
5886  * """
5887  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5888  *
5889  * cdef inline vector[scalar_t] list_to_vector(lst):
5890  */
5891  __Pyx_XDECREF(__pyx_r);
5892  __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)
5893  __Pyx_GOTREF(__pyx_t_1);
5894  __pyx_r = __pyx_t_1;
5895  __pyx_t_1 = 0;
5896  goto __pyx_L0;
5897 
5898  /* "PyClical.pyx":511
5899  * return glucat.min_neg( toIndexSet(obj) )
5900  *
5901  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5902  * """
5903  * Maximum positive index, or 0 if none.
5904  */
5905 
5906  /* function exit code */
5907  __pyx_L1_error:;
5908  __Pyx_XDECREF(__pyx_t_1);
5909  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5910  __pyx_r = 0;
5911  __pyx_L0:;
5912  __Pyx_XGIVEREF(__pyx_r);
5913  __Pyx_RefNannyFinishContext();
5914  return __pyx_r;
5915  }
5916 
5917  /* Python wrapper */
5918  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5919  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 ";
5920  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5921  PyObject *__pyx_r = 0;
5922  __Pyx_RefNannyDeclarations
5923  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5924  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5925 
5926  /* function exit code */
5927  __Pyx_RefNannyFinishContext();
5928  return __pyx_r;
5929  }
5930 
5931  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5932  PyObject *__pyx_r = NULL;
5933  __Pyx_RefNannyDeclarations
5934  PyObject *__pyx_t_1 = NULL;
5935  __Pyx_RefNannySetupContext("max_pos", 0);
5936  __Pyx_XDECREF(__pyx_r);
5937  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5938  __Pyx_GOTREF(__pyx_t_1);
5939  __pyx_r = __pyx_t_1;
5940  __pyx_t_1 = 0;
5941  goto __pyx_L0;
5942 
5943  /* function exit code */
5944  __pyx_L1_error:;
5945  __Pyx_XDECREF(__pyx_t_1);
5946  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5947  __pyx_r = NULL;
5948  __pyx_L0:;
5949  __Pyx_XGIVEREF(__pyx_r);
5950  __Pyx_RefNannyFinishContext();
5951  return __pyx_r;
5952  }
5953 
5954  /* "PyClical.pyx":520
5955  * return glucat.max_pos( toIndexSet(obj) )
5956  *
5957  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5958  * """
5959  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5960  */
5961 
5962  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5963  std::vector<scalar_t> __pyx_v_v;
5964  PyObject *__pyx_v_s = NULL;
5965  std::vector<scalar_t> __pyx_r;
5966  __Pyx_RefNannyDeclarations
5967  PyObject *__pyx_t_1 = NULL;
5968  Py_ssize_t __pyx_t_2;
5969  PyObject *(*__pyx_t_3)(PyObject *);
5970  PyObject *__pyx_t_4 = NULL;
5971  scalar_t __pyx_t_5;
5972  __Pyx_RefNannySetupContext("list_to_vector", 0);
5973 
5974  /* "PyClical.pyx":525
5975  * """
5976  * cdef vector[scalar_t] v
5977  * for s in lst: # <<<<<<<<<<<<<<
5978  * v.push_back(<scalar_t>s)
5979  * return v
5980  */
5981  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5982  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5983  __pyx_t_3 = NULL;
5984  } else {
5985  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5986  __Pyx_GOTREF(__pyx_t_1);
5987  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5988  }
5989  for (;;) {
5990  if (likely(!__pyx_t_3)) {
5991  if (likely(PyList_CheckExact(__pyx_t_1))) {
5992  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5993  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5994  __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)
5995  #else
5996  __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)
5997  __Pyx_GOTREF(__pyx_t_4);
5998  #endif
5999  } else {
6000  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
6001  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6002  __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)
6003  #else
6004  __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)
6005  __Pyx_GOTREF(__pyx_t_4);
6006  #endif
6007  }
6008  } else {
6009  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6010  if (unlikely(!__pyx_t_4)) {
6011  PyObject* exc_type = PyErr_Occurred();
6012  if (exc_type) {
6013  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6014  else __PYX_ERR(0, 525, __pyx_L1_error)
6015  }
6016  break;
6017  }
6018  __Pyx_GOTREF(__pyx_t_4);
6019  }
6020  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6021  __pyx_t_4 = 0;
6022 
6023  /* "PyClical.pyx":526
6024  * cdef vector[scalar_t] v
6025  * for s in lst:
6026  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6027  * return v
6028  *
6029  */
6030  __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)
6031  try {
6032  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6033  } catch(...) {
6034  __Pyx_CppExn2PyErr();
6035  __PYX_ERR(0, 526, __pyx_L1_error)
6036  }
6037 
6038  /* "PyClical.pyx":525
6039  * """
6040  * cdef vector[scalar_t] v
6041  * for s in lst: # <<<<<<<<<<<<<<
6042  * v.push_back(<scalar_t>s)
6043  * return v
6044  */
6045  }
6046  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6047 
6048  /* "PyClical.pyx":527
6049  * for s in lst:
6050  * v.push_back(<scalar_t>s)
6051  * return v # <<<<<<<<<<<<<<
6052  *
6053  * # Forward reference.
6054  */
6055  __pyx_r = __pyx_v_v;
6056  goto __pyx_L0;
6057 
6058  /* "PyClical.pyx":520
6059  * return glucat.max_pos( toIndexSet(obj) )
6060  *
6061  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6062  * """
6063  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6064  */
6065 
6066  /* function exit code */
6067  __pyx_L1_error:;
6068  __Pyx_XDECREF(__pyx_t_1);
6069  __Pyx_XDECREF(__pyx_t_4);
6070  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6071  __Pyx_pretend_to_initialize(&__pyx_r);
6072  __pyx_L0:;
6073  __Pyx_XDECREF(__pyx_v_s);
6074  __Pyx_RefNannyFinishContext();
6075  return __pyx_r;
6076  }
6077 
6078  /* "PyClical.pyx":532
6079  * cdef class clifford
6080  *
6081  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6082  * return clifford(obj).instance[0]
6083  *
6084  */
6085 
6086  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6087  Clifford __pyx_r;
6088  __Pyx_RefNannyDeclarations
6089  PyObject *__pyx_t_1 = NULL;
6090  __Pyx_RefNannySetupContext("toClifford", 0);
6091 
6092  /* "PyClical.pyx":533
6093  *
6094  * cdef inline Clifford toClifford(obj):
6095  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6096  *
6097  * cdef class clifford:
6098  */
6099  __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)
6100  __Pyx_GOTREF(__pyx_t_1);
6101  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6102  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6103  goto __pyx_L0;
6104 
6105  /* "PyClical.pyx":532
6106  * cdef class clifford
6107  *
6108  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6109  * return clifford(obj).instance[0]
6110  *
6111  */
6112 
6113  /* function exit code */
6114  __pyx_L1_error:;
6115  __Pyx_XDECREF(__pyx_t_1);
6116  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6117  __Pyx_pretend_to_initialize(&__pyx_r);
6118  __pyx_L0:;
6119  __Pyx_RefNannyFinishContext();
6120  return __pyx_r;
6121  }
6122 
6123  /* "PyClical.pyx":541
6124  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6125  *
6126  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6127  * """
6128  * Wrap an instance of the C++ class Clifford.
6129  */
6130 
6131  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6132  PyObject *__pyx_r = NULL;
6133  __Pyx_RefNannyDeclarations
6134  __Pyx_RefNannySetupContext("wrap", 0);
6135 
6136  /* "PyClical.pyx":545
6137  * Wrap an instance of the C++ class Clifford.
6138  * """
6139  * self.instance[0] = other # <<<<<<<<<<<<<<
6140  * return self
6141  *
6142  */
6143  (__pyx_v_self->instance[0]) = __pyx_v_other;
6144 
6145  /* "PyClical.pyx":546
6146  * """
6147  * self.instance[0] = other
6148  * return self # <<<<<<<<<<<<<<
6149  *
6150  * cdef inline Clifford unwrap(clifford self):
6151  */
6152  __Pyx_XDECREF(__pyx_r);
6153  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6154  __pyx_r = ((PyObject *)__pyx_v_self);
6155  goto __pyx_L0;
6156 
6157  /* "PyClical.pyx":541
6158  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6159  *
6160  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6161  * """
6162  * Wrap an instance of the C++ class Clifford.
6163  */
6164 
6165  /* function exit code */
6166  __pyx_L0:;
6167  __Pyx_XGIVEREF(__pyx_r);
6168  __Pyx_RefNannyFinishContext();
6169  return __pyx_r;
6170  }
6171 
6172  /* "PyClical.pyx":548
6173  * return self
6174  *
6175  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6176  * """
6177  * Return the wrapped C++ Clifford instance.
6178  */
6179 
6180  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6181  Clifford __pyx_r;
6182  __Pyx_RefNannyDeclarations
6183  __Pyx_RefNannySetupContext("unwrap", 0);
6184 
6185  /* "PyClical.pyx":552
6186  * Return the wrapped C++ Clifford instance.
6187  * """
6188  * return self.instance[0] # <<<<<<<<<<<<<<
6189  *
6190  * cpdef copy(clifford self):
6191  */
6192  __pyx_r = (__pyx_v_self->instance[0]);
6193  goto __pyx_L0;
6194 
6195  /* "PyClical.pyx":548
6196  * return self
6197  *
6198  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6199  * """
6200  * Return the wrapped C++ Clifford instance.
6201  */
6202 
6203  /* function exit code */
6204  __pyx_L0:;
6205  __Pyx_RefNannyFinishContext();
6206  return __pyx_r;
6207  }
6208 
6209  /* "PyClical.pyx":554
6210  * return self.instance[0]
6211  *
6212  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6213  * """
6214  * Copy this clifford object.
6215  */
6216 
6217  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6218  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6219  PyObject *__pyx_r = NULL;
6220  __Pyx_RefNannyDeclarations
6221  PyObject *__pyx_t_1 = NULL;
6222  PyObject *__pyx_t_2 = NULL;
6223  PyObject *__pyx_t_3 = NULL;
6224  PyObject *__pyx_t_4 = NULL;
6225  __Pyx_RefNannySetupContext("copy", 0);
6226  /* Check if called by wrapper */
6227  if (unlikely(__pyx_skip_dispatch)) ;
6228  /* Check if overridden in Python */
6229  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)))) {
6230  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6231  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6232  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6233  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6234  #endif
6235  __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)
6236  __Pyx_GOTREF(__pyx_t_1);
6237  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6238  __Pyx_XDECREF(__pyx_r);
6239  __Pyx_INCREF(__pyx_t_1);
6240  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6241  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6242  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6243  if (likely(__pyx_t_4)) {
6244  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6245  __Pyx_INCREF(__pyx_t_4);
6246  __Pyx_INCREF(function);
6247  __Pyx_DECREF_SET(__pyx_t_3, function);
6248  }
6249  }
6250  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6251  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6252  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6253  __Pyx_GOTREF(__pyx_t_2);
6254  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6255  __pyx_r = __pyx_t_2;
6256  __pyx_t_2 = 0;
6257  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6258  goto __pyx_L0;
6259  }
6260  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6261  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6262  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6263  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6264  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6265  }
6266  #endif
6267  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6268  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6269  }
6270  #endif
6271  }
6272 
6273  /* "PyClical.pyx":561
6274  * {2}
6275  * """
6276  * return clifford(self) # <<<<<<<<<<<<<<
6277  *
6278  * def __cinit__(self, other = 0, ixt = None):
6279  */
6280  __Pyx_XDECREF(__pyx_r);
6281  __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)
6282  __Pyx_GOTREF(__pyx_t_1);
6283  __pyx_r = __pyx_t_1;
6284  __pyx_t_1 = 0;
6285  goto __pyx_L0;
6286 
6287  /* "PyClical.pyx":554
6288  * return self.instance[0]
6289  *
6290  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6291  * """
6292  * Copy this clifford object.
6293  */
6294 
6295  /* function exit code */
6296  __pyx_L1_error:;
6297  __Pyx_XDECREF(__pyx_t_1);
6298  __Pyx_XDECREF(__pyx_t_2);
6299  __Pyx_XDECREF(__pyx_t_3);
6300  __Pyx_XDECREF(__pyx_t_4);
6301  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6302  __pyx_r = 0;
6303  __pyx_L0:;
6304  __Pyx_XGIVEREF(__pyx_r);
6305  __Pyx_RefNannyFinishContext();
6306  return __pyx_r;
6307  }
6308 
6309  /* Python wrapper */
6310  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6311  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 ";
6312  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6313  PyObject *__pyx_r = 0;
6314  __Pyx_RefNannyDeclarations
6315  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6316  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6317 
6318  /* function exit code */
6319  __Pyx_RefNannyFinishContext();
6320  return __pyx_r;
6321  }
6322 
6323  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6324  PyObject *__pyx_r = NULL;
6325  __Pyx_RefNannyDeclarations
6326  PyObject *__pyx_t_1 = NULL;
6327  __Pyx_RefNannySetupContext("copy", 0);
6328  __Pyx_XDECREF(__pyx_r);
6329  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6330  __Pyx_GOTREF(__pyx_t_1);
6331  __pyx_r = __pyx_t_1;
6332  __pyx_t_1 = 0;
6333  goto __pyx_L0;
6334 
6335  /* function exit code */
6336  __pyx_L1_error:;
6337  __Pyx_XDECREF(__pyx_t_1);
6338  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6339  __pyx_r = NULL;
6340  __pyx_L0:;
6341  __Pyx_XGIVEREF(__pyx_r);
6342  __Pyx_RefNannyFinishContext();
6343  return __pyx_r;
6344  }
6345 
6346  /* "PyClical.pyx":563
6347  * return clifford(self)
6348  *
6349  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6350  * """
6351  * Construct an object of type clifford.
6352  */
6353 
6354  /* Python wrapper */
6355  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6356  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6357  PyObject *__pyx_v_other = 0;
6358  PyObject *__pyx_v_ixt = 0;
6359  int __pyx_r;
6360  __Pyx_RefNannyDeclarations
6361  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6362  {
6363  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6364  PyObject* values[2] = {0,0};
6365  values[0] = ((PyObject *)__pyx_int_0);
6366  values[1] = ((PyObject *)Py_None);
6367  if (unlikely(__pyx_kwds)) {
6368  Py_ssize_t kw_args;
6369  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6370  switch (pos_args) {
6371  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6372  CYTHON_FALLTHROUGH;
6373  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6374  CYTHON_FALLTHROUGH;
6375  case 0: break;
6376  default: goto __pyx_L5_argtuple_error;
6377  }
6378  kw_args = PyDict_Size(__pyx_kwds);
6379  switch (pos_args) {
6380  case 0:
6381  if (kw_args > 0) {
6382  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6383  if (value) { values[0] = value; kw_args--; }
6384  }
6385  CYTHON_FALLTHROUGH;
6386  case 1:
6387  if (kw_args > 0) {
6388  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6389  if (value) { values[1] = value; kw_args--; }
6390  }
6391  }
6392  if (unlikely(kw_args > 0)) {
6393  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6394  }
6395  } else {
6396  switch (PyTuple_GET_SIZE(__pyx_args)) {
6397  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6398  CYTHON_FALLTHROUGH;
6399  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6400  CYTHON_FALLTHROUGH;
6401  case 0: break;
6402  default: goto __pyx_L5_argtuple_error;
6403  }
6404  }
6405  __pyx_v_other = values[0];
6406  __pyx_v_ixt = values[1];
6407  }
6408  goto __pyx_L4_argument_unpacking_done;
6409  __pyx_L5_argtuple_error:;
6410  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6411  __pyx_L3_error:;
6412  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6413  __Pyx_RefNannyFinishContext();
6414  return -1;
6415  __pyx_L4_argument_unpacking_done:;
6416  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6417 
6418  /* function exit code */
6419  __Pyx_RefNannyFinishContext();
6420  return __pyx_r;
6421  }
6422 
6423  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6424  PyObject *__pyx_v_error_msg_prefix = NULL;
6425  PyObject *__pyx_v_err = NULL;
6426  int __pyx_r;
6427  __Pyx_RefNannyDeclarations
6428  int __pyx_t_1;
6429  int __pyx_t_2;
6430  PyObject *__pyx_t_3 = NULL;
6431  PyObject *__pyx_t_4 = NULL;
6432  PyObject *__pyx_t_5 = NULL;
6433  Clifford *__pyx_t_6;
6434  PyObject *__pyx_t_7 = NULL;
6435  PyObject *__pyx_t_8 = NULL;
6436  scalar_t __pyx_t_9;
6437  PyObject *__pyx_t_10 = NULL;
6438  PyObject *__pyx_t_11 = NULL;
6439  PyObject *__pyx_t_12 = NULL;
6440  char *__pyx_t_13;
6441  int __pyx_t_14;
6442  PyObject *__pyx_t_15 = NULL;
6443  PyObject *__pyx_t_16 = NULL;
6444  PyObject *__pyx_t_17 = NULL;
6445  PyObject *__pyx_t_18 = NULL;
6446  __Pyx_RefNannySetupContext("__cinit__", 0);
6447 
6448  /* "PyClical.pyx":588
6449  * 2{1}+3{2}
6450  * """
6451  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6452  * if ixt is None:
6453  * try:
6454  */
6455  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6456  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6457 
6458  /* "PyClical.pyx":589
6459  * """
6460  * error_msg_prefix = "Cannot initialize clifford object from"
6461  * if ixt is None: # <<<<<<<<<<<<<<
6462  * try:
6463  * if isinstance(other, clifford):
6464  */
6465  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6466  __pyx_t_2 = (__pyx_t_1 != 0);
6467  if (__pyx_t_2) {
6468 
6469  /* "PyClical.pyx":590
6470  * error_msg_prefix = "Cannot initialize clifford object from"
6471  * if ixt is None:
6472  * try: # <<<<<<<<<<<<<<
6473  * if isinstance(other, clifford):
6474  * self.instance = new Clifford((<clifford>other).unwrap())
6475  */
6476  {
6477  __Pyx_PyThreadState_declare
6478  __Pyx_PyThreadState_assign
6479  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6480  __Pyx_XGOTREF(__pyx_t_3);
6481  __Pyx_XGOTREF(__pyx_t_4);
6482  __Pyx_XGOTREF(__pyx_t_5);
6483  /*try:*/ {
6484 
6485  /* "PyClical.pyx":591
6486  * if ixt is None:
6487  * try:
6488  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6489  * self.instance = new Clifford((<clifford>other).unwrap())
6490  * elif isinstance(other, index_set):
6491  */
6492  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6493  __pyx_t_1 = (__pyx_t_2 != 0);
6494  if (__pyx_t_1) {
6495 
6496  /* "PyClical.pyx":592
6497  * try:
6498  * if isinstance(other, clifford):
6499  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6500  * elif isinstance(other, index_set):
6501  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6502  */
6503  try {
6504  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6505  } catch(...) {
6506  __Pyx_CppExn2PyErr();
6507  __PYX_ERR(0, 592, __pyx_L4_error)
6508  }
6509  __pyx_v_self->instance = __pyx_t_6;
6510 
6511  /* "PyClical.pyx":591
6512  * if ixt is None:
6513  * try:
6514  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6515  * self.instance = new Clifford((<clifford>other).unwrap())
6516  * elif isinstance(other, index_set):
6517  */
6518  goto __pyx_L10;
6519  }
6520 
6521  /* "PyClical.pyx":593
6522  * if isinstance(other, clifford):
6523  * self.instance = new Clifford((<clifford>other).unwrap())
6524  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6525  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6526  * elif isinstance(other, numbers.Real):
6527  */
6528  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6529  __pyx_t_2 = (__pyx_t_1 != 0);
6530  if (__pyx_t_2) {
6531 
6532  /* "PyClical.pyx":594
6533  * self.instance = new Clifford((<clifford>other).unwrap())
6534  * elif isinstance(other, index_set):
6535  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6536  * elif isinstance(other, numbers.Real):
6537  * self.instance = new Clifford(<scalar_t>other)
6538  */
6539  try {
6540  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6541  } catch(...) {
6542  __Pyx_CppExn2PyErr();
6543  __PYX_ERR(0, 594, __pyx_L4_error)
6544  }
6545  __pyx_v_self->instance = __pyx_t_6;
6546 
6547  /* "PyClical.pyx":593
6548  * if isinstance(other, clifford):
6549  * self.instance = new Clifford((<clifford>other).unwrap())
6550  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6551  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6552  * elif isinstance(other, numbers.Real):
6553  */
6554  goto __pyx_L10;
6555  }
6556 
6557  /* "PyClical.pyx":595
6558  * elif isinstance(other, index_set):
6559  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6560  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6561  * self.instance = new Clifford(<scalar_t>other)
6562  * elif isinstance(other, str):
6563  */
6564  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6565  __Pyx_GOTREF(__pyx_t_7);
6566  __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)
6567  __Pyx_GOTREF(__pyx_t_8);
6568  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6569  __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)
6570  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6571  __pyx_t_1 = (__pyx_t_2 != 0);
6572  if (__pyx_t_1) {
6573 
6574  /* "PyClical.pyx":596
6575  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6576  * elif isinstance(other, numbers.Real):
6577  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6578  * elif isinstance(other, str):
6579  * try:
6580  */
6581  __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)
6582  try {
6583  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6584  } catch(...) {
6585  __Pyx_CppExn2PyErr();
6586  __PYX_ERR(0, 596, __pyx_L4_error)
6587  }
6588  __pyx_v_self->instance = __pyx_t_6;
6589 
6590  /* "PyClical.pyx":595
6591  * elif isinstance(other, index_set):
6592  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6593  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6594  * self.instance = new Clifford(<scalar_t>other)
6595  * elif isinstance(other, str):
6596  */
6597  goto __pyx_L10;
6598  }
6599 
6600  /* "PyClical.pyx":597
6601  * elif isinstance(other, numbers.Real):
6602  * self.instance = new Clifford(<scalar_t>other)
6603  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6604  * try:
6605  * self.instance = new Clifford(<char *>other)
6606  */
6607  __pyx_t_1 = PyString_Check(__pyx_v_other);
6608  __pyx_t_2 = (__pyx_t_1 != 0);
6609  if (likely(__pyx_t_2)) {
6610 
6611  /* "PyClical.pyx":598
6612  * self.instance = new Clifford(<scalar_t>other)
6613  * elif isinstance(other, str):
6614  * try: # <<<<<<<<<<<<<<
6615  * self.instance = new Clifford(<char *>other)
6616  * except RuntimeError:
6617  */
6618  {
6619  __Pyx_PyThreadState_declare
6620  __Pyx_PyThreadState_assign
6621  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6622  __Pyx_XGOTREF(__pyx_t_10);
6623  __Pyx_XGOTREF(__pyx_t_11);
6624  __Pyx_XGOTREF(__pyx_t_12);
6625  /*try:*/ {
6626 
6627  /* "PyClical.pyx":599
6628  * elif isinstance(other, str):
6629  * try:
6630  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6631  * except RuntimeError:
6632  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6633  */
6634  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6635  try {
6636  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6637  } catch(...) {
6638  __Pyx_CppExn2PyErr();
6639  __PYX_ERR(0, 599, __pyx_L11_error)
6640  }
6641  __pyx_v_self->instance = __pyx_t_6;
6642 
6643  /* "PyClical.pyx":598
6644  * self.instance = new Clifford(<scalar_t>other)
6645  * elif isinstance(other, str):
6646  * try: # <<<<<<<<<<<<<<
6647  * self.instance = new Clifford(<char *>other)
6648  * except RuntimeError:
6649  */
6650  }
6651  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6652  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6653  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6654  goto __pyx_L16_try_end;
6655  __pyx_L11_error:;
6656  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6657  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6658 
6659  /* "PyClical.pyx":600
6660  * try:
6661  * self.instance = new Clifford(<char *>other)
6662  * except RuntimeError: # <<<<<<<<<<<<<<
6663  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6664  * else:
6665  */
6666  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6667  if (__pyx_t_14) {
6668  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6669  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6670  __Pyx_GOTREF(__pyx_t_8);
6671  __Pyx_GOTREF(__pyx_t_7);
6672  __Pyx_GOTREF(__pyx_t_15);
6673 
6674  /* "PyClical.pyx":601
6675  * self.instance = new Clifford(<char *>other)
6676  * except RuntimeError:
6677  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6678  * else:
6679  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6680  */
6681  __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)
6682  __Pyx_GOTREF(__pyx_t_16);
6683  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6684  __Pyx_GOTREF(__pyx_t_17);
6685  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6686  __Pyx_GOTREF(__pyx_t_18);
6687  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6688  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6689  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6690  __Pyx_GOTREF(__pyx_t_17);
6691  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6692  __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)
6693  __Pyx_GOTREF(__pyx_t_18);
6694  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6695  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6696  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6697  __PYX_ERR(0, 601, __pyx_L13_except_error)
6698  }
6699  goto __pyx_L13_except_error;
6700  __pyx_L13_except_error:;
6701 
6702  /* "PyClical.pyx":598
6703  * self.instance = new Clifford(<scalar_t>other)
6704  * elif isinstance(other, str):
6705  * try: # <<<<<<<<<<<<<<
6706  * self.instance = new Clifford(<char *>other)
6707  * except RuntimeError:
6708  */
6709  __Pyx_XGIVEREF(__pyx_t_10);
6710  __Pyx_XGIVEREF(__pyx_t_11);
6711  __Pyx_XGIVEREF(__pyx_t_12);
6712  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6713  goto __pyx_L4_error;
6714  __pyx_L16_try_end:;
6715  }
6716 
6717  /* "PyClical.pyx":597
6718  * elif isinstance(other, numbers.Real):
6719  * self.instance = new Clifford(<scalar_t>other)
6720  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6721  * try:
6722  * self.instance = new Clifford(<char *>other)
6723  */
6724  goto __pyx_L10;
6725  }
6726 
6727  /* "PyClical.pyx":603
6728  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6729  * else:
6730  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6731  * except RuntimeError as err:
6732  * raise ValueError(error_msg_prefix + " " + str(type(other))
6733  */
6734  /*else*/ {
6735  __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)
6736  __Pyx_GOTREF(__pyx_t_15);
6737  __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)
6738  __Pyx_GOTREF(__pyx_t_7);
6739  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6740  __Pyx_GOTREF(__pyx_t_8);
6741  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6742  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6743  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6744  __Pyx_GOTREF(__pyx_t_7);
6745  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6746  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6747  __Pyx_GOTREF(__pyx_t_8);
6748  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6749  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6750  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6751  __PYX_ERR(0, 603, __pyx_L4_error)
6752  }
6753  __pyx_L10:;
6754 
6755  /* "PyClical.pyx":590
6756  * error_msg_prefix = "Cannot initialize clifford object from"
6757  * if ixt is None:
6758  * try: # <<<<<<<<<<<<<<
6759  * if isinstance(other, clifford):
6760  * self.instance = new Clifford((<clifford>other).unwrap())
6761  */
6762  }
6763  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6764  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6765  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6766  goto __pyx_L9_try_end;
6767  __pyx_L4_error:;
6768  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6769  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6770  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6771  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6772  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6773  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6774 
6775  /* "PyClical.pyx":604
6776  * else:
6777  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6778  * except RuntimeError as err: # <<<<<<<<<<<<<<
6779  * raise ValueError(error_msg_prefix + " " + str(type(other))
6780  * + " value " + repr(other) + ":"
6781  */
6782  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6783  if (__pyx_t_14) {
6784  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6785  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6786  __Pyx_GOTREF(__pyx_t_8);
6787  __Pyx_GOTREF(__pyx_t_7);
6788  __Pyx_GOTREF(__pyx_t_15);
6789  __Pyx_INCREF(__pyx_t_7);
6790  __pyx_v_err = __pyx_t_7;
6791 
6792  /* "PyClical.pyx":605
6793  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6794  * except RuntimeError as err:
6795  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6796  * + " value " + repr(other) + ":"
6797  * + "\n\t" + str(err))
6798  */
6799  __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)
6800  __Pyx_GOTREF(__pyx_t_18);
6801  __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)
6802  __Pyx_GOTREF(__pyx_t_17);
6803  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6804  __Pyx_GOTREF(__pyx_t_16);
6805  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6806  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6807 
6808  /* "PyClical.pyx":606
6809  * except RuntimeError as err:
6810  * raise ValueError(error_msg_prefix + " " + str(type(other))
6811  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6812  * + "\n\t" + str(err))
6813  * elif isinstance(ixt, index_set):
6814  */
6815  __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)
6816  __Pyx_GOTREF(__pyx_t_17);
6817  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6818  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6819  __Pyx_GOTREF(__pyx_t_16);
6820  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6821  __Pyx_GOTREF(__pyx_t_18);
6822  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6823  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6824  __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)
6825  __Pyx_GOTREF(__pyx_t_16);
6826  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6827 
6828  /* "PyClical.pyx":607
6829  * raise ValueError(error_msg_prefix + " " + str(type(other))
6830  * + " value " + repr(other) + ":"
6831  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6832  * elif isinstance(ixt, index_set):
6833  * if isinstance(other, numbers.Real):
6834  */
6835  __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)
6836  __Pyx_GOTREF(__pyx_t_18);
6837  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6838  __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)
6839  __Pyx_GOTREF(__pyx_t_16);
6840  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6841  __Pyx_GOTREF(__pyx_t_17);
6842  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6843  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6844 
6845  /* "PyClical.pyx":605
6846  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6847  * except RuntimeError as err:
6848  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6849  * + " value " + repr(other) + ":"
6850  * + "\n\t" + str(err))
6851  */
6852  __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)
6853  __Pyx_GOTREF(__pyx_t_16);
6854  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6855  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6856  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6857  __PYX_ERR(0, 605, __pyx_L6_except_error)
6858  }
6859  goto __pyx_L6_except_error;
6860  __pyx_L6_except_error:;
6861 
6862  /* "PyClical.pyx":590
6863  * error_msg_prefix = "Cannot initialize clifford object from"
6864  * if ixt is None:
6865  * try: # <<<<<<<<<<<<<<
6866  * if isinstance(other, clifford):
6867  * self.instance = new Clifford((<clifford>other).unwrap())
6868  */
6869  __Pyx_XGIVEREF(__pyx_t_3);
6870  __Pyx_XGIVEREF(__pyx_t_4);
6871  __Pyx_XGIVEREF(__pyx_t_5);
6872  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6873  goto __pyx_L1_error;
6874  __pyx_L9_try_end:;
6875  }
6876 
6877  /* "PyClical.pyx":589
6878  * """
6879  * error_msg_prefix = "Cannot initialize clifford object from"
6880  * if ixt is None: # <<<<<<<<<<<<<<
6881  * try:
6882  * if isinstance(other, clifford):
6883  */
6884  goto __pyx_L3;
6885  }
6886 
6887  /* "PyClical.pyx":608
6888  * + " value " + repr(other) + ":"
6889  * + "\n\t" + str(err))
6890  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6891  * if isinstance(other, numbers.Real):
6892  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6893  */
6894  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6895  __pyx_t_1 = (__pyx_t_2 != 0);
6896  if (likely(__pyx_t_1)) {
6897 
6898  /* "PyClical.pyx":609
6899  * + "\n\t" + str(err))
6900  * elif isinstance(ixt, index_set):
6901  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6902  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6903  * elif isinstance(other, collections.Sequence):
6904  */
6905  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6906  __Pyx_GOTREF(__pyx_t_15);
6907  __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)
6908  __Pyx_GOTREF(__pyx_t_7);
6909  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6910  __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)
6911  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6912  __pyx_t_2 = (__pyx_t_1 != 0);
6913  if (__pyx_t_2) {
6914 
6915  /* "PyClical.pyx":610
6916  * elif isinstance(ixt, index_set):
6917  * if isinstance(other, numbers.Real):
6918  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6919  * elif isinstance(other, collections.Sequence):
6920  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6921  */
6922  __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)
6923  try {
6924  __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));
6925  } catch(...) {
6926  __Pyx_CppExn2PyErr();
6927  __PYX_ERR(0, 610, __pyx_L1_error)
6928  }
6929  __pyx_v_self->instance = __pyx_t_6;
6930 
6931  /* "PyClical.pyx":609
6932  * + "\n\t" + str(err))
6933  * elif isinstance(ixt, index_set):
6934  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6935  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6936  * elif isinstance(other, collections.Sequence):
6937  */
6938  goto __pyx_L21;
6939  }
6940 
6941  /* "PyClical.pyx":611
6942  * if isinstance(other, numbers.Real):
6943  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6944  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6945  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6946  * else:
6947  */
6948  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6949  __Pyx_GOTREF(__pyx_t_7);
6950  __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)
6951  __Pyx_GOTREF(__pyx_t_15);
6952  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6953  __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)
6954  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6955  __pyx_t_1 = (__pyx_t_2 != 0);
6956  if (likely(__pyx_t_1)) {
6957 
6958  /* "PyClical.pyx":612
6959  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6960  * elif isinstance(other, collections.Sequence):
6961  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6962  * else:
6963  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6964  */
6965  try {
6966  __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)));
6967  } catch(...) {
6968  __Pyx_CppExn2PyErr();
6969  __PYX_ERR(0, 612, __pyx_L1_error)
6970  }
6971  __pyx_v_self->instance = __pyx_t_6;
6972 
6973  /* "PyClical.pyx":611
6974  * if isinstance(other, numbers.Real):
6975  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6976  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6977  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6978  * else:
6979  */
6980  goto __pyx_L21;
6981  }
6982 
6983  /* "PyClical.pyx":614
6984  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6985  * else:
6986  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6987  * + ", " + repr(ixt) + ").")
6988  * else:
6989  */
6990  /*else*/ {
6991  __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)
6992  __Pyx_GOTREF(__pyx_t_15);
6993  __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)
6994  __Pyx_GOTREF(__pyx_t_7);
6995  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
6996  __Pyx_GOTREF(__pyx_t_8);
6997  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6998  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6999 
7000  /* "PyClical.pyx":615
7001  * else:
7002  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7003  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
7004  * else:
7005  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7006  */
7007  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7008  __Pyx_GOTREF(__pyx_t_7);
7009  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7010  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7011  __Pyx_GOTREF(__pyx_t_8);
7012  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
7013  __Pyx_GOTREF(__pyx_t_15);
7014  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7015  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7016  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7017  __Pyx_GOTREF(__pyx_t_8);
7018  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7019 
7020  /* "PyClical.pyx":614
7021  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7022  * else:
7023  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7024  * + ", " + repr(ixt) + ").")
7025  * else:
7026  */
7027  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
7028  __Pyx_GOTREF(__pyx_t_15);
7029  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7030  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7031  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7032  __PYX_ERR(0, 614, __pyx_L1_error)
7033  }
7034  __pyx_L21:;
7035 
7036  /* "PyClical.pyx":608
7037  * + " value " + repr(other) + ":"
7038  * + "\n\t" + str(err))
7039  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7040  * if isinstance(other, numbers.Real):
7041  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7042  */
7043  goto __pyx_L3;
7044  }
7045 
7046  /* "PyClical.pyx":617
7047  * + ", " + repr(ixt) + ").")
7048  * else:
7049  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7050  * + ", " + str(type(ixt)) + ").")
7051  *
7052  */
7053  /*else*/ {
7054  __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)
7055  __Pyx_GOTREF(__pyx_t_15);
7056  __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)
7057  __Pyx_GOTREF(__pyx_t_8);
7058  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
7059  __Pyx_GOTREF(__pyx_t_7);
7060  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7061  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7062 
7063  /* "PyClical.pyx":618
7064  * else:
7065  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7066  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7067  *
7068  * def __dealloc__(self):
7069  */
7070  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7071  __Pyx_GOTREF(__pyx_t_8);
7072  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7073  __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)
7074  __Pyx_GOTREF(__pyx_t_7);
7075  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7076  __Pyx_GOTREF(__pyx_t_15);
7077  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7078  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7079  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7080  __Pyx_GOTREF(__pyx_t_7);
7081  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7082 
7083  /* "PyClical.pyx":617
7084  * + ", " + repr(ixt) + ").")
7085  * else:
7086  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7087  * + ", " + str(type(ixt)) + ").")
7088  *
7089  */
7090  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7091  __Pyx_GOTREF(__pyx_t_15);
7092  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7093  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7094  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7095  __PYX_ERR(0, 617, __pyx_L1_error)
7096  }
7097  __pyx_L3:;
7098 
7099  /* "PyClical.pyx":563
7100  * return clifford(self)
7101  *
7102  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7103  * """
7104  * Construct an object of type clifford.
7105  */
7106 
7107  /* function exit code */
7108  __pyx_r = 0;
7109  goto __pyx_L0;
7110  __pyx_L1_error:;
7111  __Pyx_XDECREF(__pyx_t_7);
7112  __Pyx_XDECREF(__pyx_t_8);
7113  __Pyx_XDECREF(__pyx_t_15);
7114  __Pyx_XDECREF(__pyx_t_16);
7115  __Pyx_XDECREF(__pyx_t_17);
7116  __Pyx_XDECREF(__pyx_t_18);
7117  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7118  __pyx_r = -1;
7119  __pyx_L0:;
7120  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7121  __Pyx_XDECREF(__pyx_v_err);
7122  __Pyx_RefNannyFinishContext();
7123  return __pyx_r;
7124  }
7125 
7126  /* "PyClical.pyx":620
7127  * + ", " + str(type(ixt)) + ").")
7128  *
7129  * def __dealloc__(self): # <<<<<<<<<<<<<<
7130  * """
7131  * Clean up by deallocating the instance of C++ class Clifford.
7132  */
7133 
7134  /* Python wrapper */
7135  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7136  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7137  __Pyx_RefNannyDeclarations
7138  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7139  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7140 
7141  /* function exit code */
7142  __Pyx_RefNannyFinishContext();
7143  }
7144 
7145  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7146  __Pyx_RefNannyDeclarations
7147  __Pyx_RefNannySetupContext("__dealloc__", 0);
7148 
7149  /* "PyClical.pyx":624
7150  * Clean up by deallocating the instance of C++ class Clifford.
7151  * """
7152  * del self.instance # <<<<<<<<<<<<<<
7153  *
7154  * def __contains__(self, x):
7155  */
7156  delete __pyx_v_self->instance;
7157 
7158  /* "PyClical.pyx":620
7159  * + ", " + str(type(ixt)) + ").")
7160  *
7161  * def __dealloc__(self): # <<<<<<<<<<<<<<
7162  * """
7163  * Clean up by deallocating the instance of C++ class Clifford.
7164  */
7165 
7166  /* function exit code */
7167  __Pyx_RefNannyFinishContext();
7168  }
7169 
7170  /* "PyClical.pyx":626
7171  * del self.instance
7172  *
7173  * def __contains__(self, x): # <<<<<<<<<<<<<<
7174  * """
7175  * Not applicable.
7176  */
7177 
7178  /* Python wrapper */
7179  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7180  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 ";
7181  #if CYTHON_COMPILING_IN_CPYTHON
7182  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7183  #endif
7184  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7185  int __pyx_r;
7186  __Pyx_RefNannyDeclarations
7187  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7188  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7189 
7190  /* function exit code */
7191  __Pyx_RefNannyFinishContext();
7192  return __pyx_r;
7193  }
7194 
7195  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7196  int __pyx_r;
7197  __Pyx_RefNannyDeclarations
7198  PyObject *__pyx_t_1 = NULL;
7199  __Pyx_RefNannySetupContext("__contains__", 0);
7200 
7201  /* "PyClical.pyx":635
7202  * TypeError: Not applicable.
7203  * """
7204  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7205  *
7206  * def __iter__(self):
7207  */
7208  __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)
7209  __Pyx_GOTREF(__pyx_t_1);
7210  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7211  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7212  __PYX_ERR(0, 635, __pyx_L1_error)
7213 
7214  /* "PyClical.pyx":626
7215  * del self.instance
7216  *
7217  * def __contains__(self, x): # <<<<<<<<<<<<<<
7218  * """
7219  * Not applicable.
7220  */
7221 
7222  /* function exit code */
7223  __pyx_L1_error:;
7224  __Pyx_XDECREF(__pyx_t_1);
7225  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7226  __pyx_r = -1;
7227  __Pyx_RefNannyFinishContext();
7228  return __pyx_r;
7229  }
7230 
7231  /* "PyClical.pyx":637
7232  * raise TypeError("Not applicable.")
7233  *
7234  * def __iter__(self): # <<<<<<<<<<<<<<
7235  * """
7236  * Not applicable.
7237  */
7238 
7239  /* Python wrapper */
7240  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7241  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 ";
7242  #if CYTHON_COMPILING_IN_CPYTHON
7243  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7244  #endif
7245  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7246  PyObject *__pyx_r = 0;
7247  __Pyx_RefNannyDeclarations
7248  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7249  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7250 
7251  /* function exit code */
7252  __Pyx_RefNannyFinishContext();
7253  return __pyx_r;
7254  }
7255 
7256  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7257  PyObject *__pyx_r = NULL;
7258  __Pyx_RefNannyDeclarations
7259  PyObject *__pyx_t_1 = NULL;
7260  __Pyx_RefNannySetupContext("__iter__", 0);
7261 
7262  /* "PyClical.pyx":646
7263  * TypeError: Not applicable.
7264  * """
7265  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7266  *
7267  * def reframe(self, ixt):
7268  */
7269  __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)
7270  __Pyx_GOTREF(__pyx_t_1);
7271  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7272  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7273  __PYX_ERR(0, 646, __pyx_L1_error)
7274 
7275  /* "PyClical.pyx":637
7276  * raise TypeError("Not applicable.")
7277  *
7278  * def __iter__(self): # <<<<<<<<<<<<<<
7279  * """
7280  * Not applicable.
7281  */
7282 
7283  /* function exit code */
7284  __pyx_L1_error:;
7285  __Pyx_XDECREF(__pyx_t_1);
7286  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7287  __pyx_r = NULL;
7288  __Pyx_XGIVEREF(__pyx_r);
7289  __Pyx_RefNannyFinishContext();
7290  return __pyx_r;
7291  }
7292 
7293  /* "PyClical.pyx":648
7294  * raise TypeError("Not applicable.")
7295  *
7296  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7297  * """
7298  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7299  */
7300 
7301  /* Python wrapper */
7302  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7303  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 ";
7304  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7305  PyObject *__pyx_r = 0;
7306  __Pyx_RefNannyDeclarations
7307  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7308  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7309 
7310  /* function exit code */
7311  __Pyx_RefNannyFinishContext();
7312  return __pyx_r;
7313  }
7314 
7315  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7316  PyObject *__pyx_v_error_msg_prefix = NULL;
7317  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7318  PyObject *__pyx_v_err = NULL;
7319  PyObject *__pyx_r = NULL;
7320  __Pyx_RefNannyDeclarations
7321  int __pyx_t_1;
7322  int __pyx_t_2;
7323  PyObject *__pyx_t_3 = NULL;
7324  PyObject *__pyx_t_4 = NULL;
7325  PyObject *__pyx_t_5 = NULL;
7326  PyObject *__pyx_t_6 = NULL;
7327  Clifford *__pyx_t_7;
7328  int __pyx_t_8;
7329  PyObject *__pyx_t_9 = NULL;
7330  PyObject *__pyx_t_10 = NULL;
7331  PyObject *__pyx_t_11 = NULL;
7332  PyObject *__pyx_t_12 = NULL;
7333  PyObject *__pyx_t_13 = NULL;
7334  __Pyx_RefNannySetupContext("reframe", 0);
7335 
7336  /* "PyClical.pyx":658
7337  * True
7338  * """
7339  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7340  * if isinstance(ixt, index_set):
7341  * try:
7342  */
7343  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7344  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7345 
7346  /* "PyClical.pyx":659
7347  * """
7348  * error_msg_prefix = "Cannot reframe"
7349  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7350  * try:
7351  * result = clifford()
7352  */
7353  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7354  __pyx_t_2 = (__pyx_t_1 != 0);
7355  if (likely(__pyx_t_2)) {
7356 
7357  /* "PyClical.pyx":660
7358  * error_msg_prefix = "Cannot reframe"
7359  * if isinstance(ixt, index_set):
7360  * try: # <<<<<<<<<<<<<<
7361  * result = clifford()
7362  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7363  */
7364  {
7365  __Pyx_PyThreadState_declare
7366  __Pyx_PyThreadState_assign
7367  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7368  __Pyx_XGOTREF(__pyx_t_3);
7369  __Pyx_XGOTREF(__pyx_t_4);
7370  __Pyx_XGOTREF(__pyx_t_5);
7371  /*try:*/ {
7372 
7373  /* "PyClical.pyx":661
7374  * if isinstance(ixt, index_set):
7375  * try:
7376  * result = clifford() # <<<<<<<<<<<<<<
7377  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7378  * except RuntimeError as err:
7379  */
7380  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L4_error)
7381  __Pyx_GOTREF(__pyx_t_6);
7382  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7383  __pyx_t_6 = 0;
7384 
7385  /* "PyClical.pyx":662
7386  * try:
7387  * result = clifford()
7388  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7389  * except RuntimeError as err:
7390  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7391  */
7392  try {
7393  __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)));
7394  } catch(...) {
7395  __Pyx_CppExn2PyErr();
7396  __PYX_ERR(0, 662, __pyx_L4_error)
7397  }
7398  __pyx_v_result->instance = __pyx_t_7;
7399 
7400  /* "PyClical.pyx":660
7401  * error_msg_prefix = "Cannot reframe"
7402  * if isinstance(ixt, index_set):
7403  * try: # <<<<<<<<<<<<<<
7404  * result = clifford()
7405  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7406  */
7407  }
7408  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7409  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7410  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7411  goto __pyx_L9_try_end;
7412  __pyx_L4_error:;
7413  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7414 
7415  /* "PyClical.pyx":663
7416  * result = clifford()
7417  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7418  * except RuntimeError as err: # <<<<<<<<<<<<<<
7419  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7420  * + str(ixt) + ":"
7421  */
7422  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7423  if (__pyx_t_8) {
7424  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7425  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7426  __Pyx_GOTREF(__pyx_t_6);
7427  __Pyx_GOTREF(__pyx_t_9);
7428  __Pyx_GOTREF(__pyx_t_10);
7429  __Pyx_INCREF(__pyx_t_9);
7430  __pyx_v_err = __pyx_t_9;
7431 
7432  /* "PyClical.pyx":664
7433  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7434  * except RuntimeError as err:
7435  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7436  * + str(ixt) + ":"
7437  * + "\n\t" + str(err))
7438  */
7439  __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)
7440  __Pyx_GOTREF(__pyx_t_11);
7441  __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)
7442  __Pyx_GOTREF(__pyx_t_12);
7443  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7444  __Pyx_GOTREF(__pyx_t_13);
7445  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7446  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7447  __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)
7448  __Pyx_GOTREF(__pyx_t_12);
7449  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7450 
7451  /* "PyClical.pyx":665
7452  * except RuntimeError as err:
7453  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7454  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7455  * + "\n\t" + str(err))
7456  * else:
7457  */
7458  __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)
7459  __Pyx_GOTREF(__pyx_t_13);
7460  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7461  __Pyx_GOTREF(__pyx_t_11);
7462  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7463  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7464  __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)
7465  __Pyx_GOTREF(__pyx_t_13);
7466  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7467 
7468  /* "PyClical.pyx":666
7469  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7470  * + str(ixt) + ":"
7471  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7472  * else:
7473  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7474  */
7475  __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)
7476  __Pyx_GOTREF(__pyx_t_11);
7477  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7478  __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)
7479  __Pyx_GOTREF(__pyx_t_13);
7480  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7481  __Pyx_GOTREF(__pyx_t_12);
7482  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7483  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7484 
7485  /* "PyClical.pyx":664
7486  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7487  * except RuntimeError as err:
7488  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7489  * + str(ixt) + ":"
7490  * + "\n\t" + str(err))
7491  */
7492  __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)
7493  __Pyx_GOTREF(__pyx_t_13);
7494  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7495  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7496  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7497  __PYX_ERR(0, 664, __pyx_L6_except_error)
7498  }
7499  goto __pyx_L6_except_error;
7500  __pyx_L6_except_error:;
7501 
7502  /* "PyClical.pyx":660
7503  * error_msg_prefix = "Cannot reframe"
7504  * if isinstance(ixt, index_set):
7505  * try: # <<<<<<<<<<<<<<
7506  * result = clifford()
7507  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7508  */
7509  __Pyx_XGIVEREF(__pyx_t_3);
7510  __Pyx_XGIVEREF(__pyx_t_4);
7511  __Pyx_XGIVEREF(__pyx_t_5);
7512  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7513  goto __pyx_L1_error;
7514  __pyx_L9_try_end:;
7515  }
7516 
7517  /* "PyClical.pyx":659
7518  * """
7519  * error_msg_prefix = "Cannot reframe"
7520  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7521  * try:
7522  * result = clifford()
7523  */
7524  goto __pyx_L3;
7525  }
7526 
7527  /* "PyClical.pyx":668
7528  * + "\n\t" + str(err))
7529  * else:
7530  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7531  * return result
7532  *
7533  */
7534  /*else*/ {
7535  __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)
7536  __Pyx_GOTREF(__pyx_t_10);
7537  __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)
7538  __Pyx_GOTREF(__pyx_t_9);
7539  __pyx_t_6 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7540  __Pyx_GOTREF(__pyx_t_6);
7541  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7542  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7543  __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7544  __Pyx_GOTREF(__pyx_t_9);
7545  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7546  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7547  __Pyx_GOTREF(__pyx_t_6);
7548  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7549  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7550  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7551  __PYX_ERR(0, 668, __pyx_L1_error)
7552  }
7553  __pyx_L3:;
7554 
7555  /* "PyClical.pyx":669
7556  * else:
7557  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7558  * return result # <<<<<<<<<<<<<<
7559  *
7560  * def __richcmp__(lhs, rhs, int op):
7561  */
7562  __Pyx_XDECREF(__pyx_r);
7563  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7564  __pyx_r = ((PyObject *)__pyx_v_result);
7565  goto __pyx_L0;
7566 
7567  /* "PyClical.pyx":648
7568  * raise TypeError("Not applicable.")
7569  *
7570  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7571  * """
7572  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7573  */
7574 
7575  /* function exit code */
7576  __pyx_L1_error:;
7577  __Pyx_XDECREF(__pyx_t_6);
7578  __Pyx_XDECREF(__pyx_t_9);
7579  __Pyx_XDECREF(__pyx_t_10);
7580  __Pyx_XDECREF(__pyx_t_11);
7581  __Pyx_XDECREF(__pyx_t_12);
7582  __Pyx_XDECREF(__pyx_t_13);
7583  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7584  __pyx_r = NULL;
7585  __pyx_L0:;
7586  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7587  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7588  __Pyx_XDECREF(__pyx_v_err);
7589  __Pyx_XGIVEREF(__pyx_r);
7590  __Pyx_RefNannyFinishContext();
7591  return __pyx_r;
7592  }
7593 
7594  /* "PyClical.pyx":671
7595  * return result
7596  *
7597  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7598  * """
7599  * Compare objects of type clifford.
7600  */
7601 
7602  /* Python wrapper */
7603  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7604  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7605  PyObject *__pyx_r = 0;
7606  __Pyx_RefNannyDeclarations
7607  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7608  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7609 
7610  /* function exit code */
7611  __Pyx_RefNannyFinishContext();
7612  return __pyx_r;
7613  }
7614 
7615  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7616  PyObject *__pyx_r = NULL;
7617  __Pyx_RefNannyDeclarations
7618  int __pyx_t_1;
7619  int __pyx_t_2;
7620  int __pyx_t_3;
7621  PyObject *__pyx_t_4 = NULL;
7622  PyObject *__pyx_t_5 = NULL;
7623  PyObject *__pyx_t_6 = NULL;
7624  __Pyx_RefNannySetupContext("__richcmp__", 0);
7625 
7626  /* "PyClical.pyx":690
7627  * True
7628  * """
7629  * if op == 2: # == # <<<<<<<<<<<<<<
7630  * if (lhs is None) or (rhs is None):
7631  * return bool(lhs is rhs)
7632  */
7633  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7634  if (__pyx_t_1) {
7635 
7636  /* "PyClical.pyx":691
7637  * """
7638  * if op == 2: # ==
7639  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7640  * return bool(lhs is rhs)
7641  * else:
7642  */
7643  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7644  __pyx_t_3 = (__pyx_t_2 != 0);
7645  if (!__pyx_t_3) {
7646  } else {
7647  __pyx_t_1 = __pyx_t_3;
7648  goto __pyx_L5_bool_binop_done;
7649  }
7650  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7651  __pyx_t_2 = (__pyx_t_3 != 0);
7652  __pyx_t_1 = __pyx_t_2;
7653  __pyx_L5_bool_binop_done:;
7654  if (__pyx_t_1) {
7655 
7656  /* "PyClical.pyx":692
7657  * if op == 2: # ==
7658  * if (lhs is None) or (rhs is None):
7659  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7660  * else:
7661  * return bool( toClifford(lhs) == toClifford(rhs) )
7662  */
7663  __Pyx_XDECREF(__pyx_r);
7664  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7665  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7666  __Pyx_GOTREF(__pyx_t_4);
7667  __pyx_r = __pyx_t_4;
7668  __pyx_t_4 = 0;
7669  goto __pyx_L0;
7670 
7671  /* "PyClical.pyx":691
7672  * """
7673  * if op == 2: # ==
7674  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7675  * return bool(lhs is rhs)
7676  * else:
7677  */
7678  }
7679 
7680  /* "PyClical.pyx":694
7681  * return bool(lhs is rhs)
7682  * else:
7683  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7684  * elif op == 3: # !=
7685  * if (lhs is None) or (rhs is None):
7686  */
7687  /*else*/ {
7688  __Pyx_XDECREF(__pyx_r);
7689  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7690  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7691  __Pyx_GOTREF(__pyx_t_4);
7692  __pyx_r = __pyx_t_4;
7693  __pyx_t_4 = 0;
7694  goto __pyx_L0;
7695  }
7696 
7697  /* "PyClical.pyx":690
7698  * True
7699  * """
7700  * if op == 2: # == # <<<<<<<<<<<<<<
7701  * if (lhs is None) or (rhs is None):
7702  * return bool(lhs is rhs)
7703  */
7704  }
7705 
7706  /* "PyClical.pyx":695
7707  * else:
7708  * return bool( toClifford(lhs) == toClifford(rhs) )
7709  * elif op == 3: # != # <<<<<<<<<<<<<<
7710  * if (lhs is None) or (rhs is None):
7711  * return not bool(lhs is rhs)
7712  */
7713  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7714  if (__pyx_t_1) {
7715 
7716  /* "PyClical.pyx":696
7717  * return bool( toClifford(lhs) == toClifford(rhs) )
7718  * elif op == 3: # !=
7719  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7720  * return not bool(lhs is rhs)
7721  * else:
7722  */
7723  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7724  __pyx_t_3 = (__pyx_t_2 != 0);
7725  if (!__pyx_t_3) {
7726  } else {
7727  __pyx_t_1 = __pyx_t_3;
7728  goto __pyx_L8_bool_binop_done;
7729  }
7730  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7731  __pyx_t_2 = (__pyx_t_3 != 0);
7732  __pyx_t_1 = __pyx_t_2;
7733  __pyx_L8_bool_binop_done:;
7734  if (__pyx_t_1) {
7735 
7736  /* "PyClical.pyx":697
7737  * elif op == 3: # !=
7738  * if (lhs is None) or (rhs is None):
7739  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7740  * else:
7741  * return bool( toClifford(lhs) != toClifford(rhs) )
7742  */
7743  __Pyx_XDECREF(__pyx_r);
7744  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7745  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7746  __Pyx_GOTREF(__pyx_t_4);
7747  __pyx_r = __pyx_t_4;
7748  __pyx_t_4 = 0;
7749  goto __pyx_L0;
7750 
7751  /* "PyClical.pyx":696
7752  * return bool( toClifford(lhs) == toClifford(rhs) )
7753  * elif op == 3: # !=
7754  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7755  * return not bool(lhs is rhs)
7756  * else:
7757  */
7758  }
7759 
7760  /* "PyClical.pyx":699
7761  * return not bool(lhs is rhs)
7762  * else:
7763  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7764  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7765  * raise TypeError("This comparison operator is not implemented for "
7766  */
7767  /*else*/ {
7768  __Pyx_XDECREF(__pyx_r);
7769  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7770  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7771  __Pyx_GOTREF(__pyx_t_4);
7772  __pyx_r = __pyx_t_4;
7773  __pyx_t_4 = 0;
7774  goto __pyx_L0;
7775  }
7776 
7777  /* "PyClical.pyx":695
7778  * else:
7779  * return bool( toClifford(lhs) == toClifford(rhs) )
7780  * elif op == 3: # != # <<<<<<<<<<<<<<
7781  * if (lhs is None) or (rhs is None):
7782  * return not bool(lhs is rhs)
7783  */
7784  }
7785 
7786  /* "PyClical.pyx":700
7787  * else:
7788  * return bool( toClifford(lhs) != toClifford(rhs) )
7789  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7790  * raise TypeError("This comparison operator is not implemented for "
7791  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7792  */
7793  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
7794  __pyx_t_3 = (__pyx_t_2 != 0);
7795  if (!__pyx_t_3) {
7796  } else {
7797  __pyx_t_1 = __pyx_t_3;
7798  goto __pyx_L10_bool_binop_done;
7799  }
7800  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7801  __pyx_t_2 = (__pyx_t_3 != 0);
7802  __pyx_t_1 = __pyx_t_2;
7803  __pyx_L10_bool_binop_done:;
7804  if (unlikely(__pyx_t_1)) {
7805 
7806  /* "PyClical.pyx":702
7807  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7808  * raise TypeError("This comparison operator is not implemented for "
7809  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7810  * else:
7811  * return NotImplemented
7812  */
7813  __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)
7814  __Pyx_GOTREF(__pyx_t_4);
7815  __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)
7816  __Pyx_GOTREF(__pyx_t_5);
7817  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7818  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7819  __Pyx_GOTREF(__pyx_t_4);
7820  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7821  __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)
7822  __Pyx_GOTREF(__pyx_t_5);
7823  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7824  __Pyx_GOTREF(__pyx_t_6);
7825  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7826  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7827  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7828  __Pyx_GOTREF(__pyx_t_5);
7829  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7830 
7831  /* "PyClical.pyx":701
7832  * return bool( toClifford(lhs) != toClifford(rhs) )
7833  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7834  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7835  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7836  * else:
7837  */
7838  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
7839  __Pyx_GOTREF(__pyx_t_6);
7840  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7841  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7842  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7843  __PYX_ERR(0, 701, __pyx_L1_error)
7844 
7845  /* "PyClical.pyx":700
7846  * else:
7847  * return bool( toClifford(lhs) != toClifford(rhs) )
7848  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7849  * raise TypeError("This comparison operator is not implemented for "
7850  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7851  */
7852  }
7853 
7854  /* "PyClical.pyx":704
7855  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7856  * else:
7857  * return NotImplemented # <<<<<<<<<<<<<<
7858  *
7859  * def __getitem__(self, ixt):
7860  */
7861  /*else*/ {
7862  __Pyx_XDECREF(__pyx_r);
7863  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7864  __pyx_r = __pyx_builtin_NotImplemented;
7865  goto __pyx_L0;
7866  }
7867 
7868  /* "PyClical.pyx":671
7869  * return result
7870  *
7871  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7872  * """
7873  * Compare objects of type clifford.
7874  */
7875 
7876  /* function exit code */
7877  __pyx_L1_error:;
7878  __Pyx_XDECREF(__pyx_t_4);
7879  __Pyx_XDECREF(__pyx_t_5);
7880  __Pyx_XDECREF(__pyx_t_6);
7881  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7882  __pyx_r = NULL;
7883  __pyx_L0:;
7884  __Pyx_XGIVEREF(__pyx_r);
7885  __Pyx_RefNannyFinishContext();
7886  return __pyx_r;
7887  }
7888 
7889  /* "PyClical.pyx":706
7890  * return NotImplemented
7891  *
7892  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7893  * """
7894  * Subscripting: map from index set to scalar coordinate.
7895  */
7896 
7897  /* Python wrapper */
7898  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7899  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 ";
7900  #if CYTHON_COMPILING_IN_CPYTHON
7901  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7902  #endif
7903  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7904  PyObject *__pyx_r = 0;
7905  __Pyx_RefNannyDeclarations
7906  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7907  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7908 
7909  /* function exit code */
7910  __Pyx_RefNannyFinishContext();
7911  return __pyx_r;
7912  }
7913 
7914  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7915  PyObject *__pyx_r = NULL;
7916  __Pyx_RefNannyDeclarations
7917  PyObject *__pyx_t_1 = NULL;
7918  __Pyx_RefNannySetupContext("__getitem__", 0);
7919 
7920  /* "PyClical.pyx":719
7921  * 2.0
7922  * """
7923  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7924  *
7925  * def __neg__(self):
7926  */
7927  __Pyx_XDECREF(__pyx_r);
7928  __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)
7929  __Pyx_GOTREF(__pyx_t_1);
7930  __pyx_r = __pyx_t_1;
7931  __pyx_t_1 = 0;
7932  goto __pyx_L0;
7933 
7934  /* "PyClical.pyx":706
7935  * return NotImplemented
7936  *
7937  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7938  * """
7939  * Subscripting: map from index set to scalar coordinate.
7940  */
7941 
7942  /* function exit code */
7943  __pyx_L1_error:;
7944  __Pyx_XDECREF(__pyx_t_1);
7945  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7946  __pyx_r = NULL;
7947  __pyx_L0:;
7948  __Pyx_XGIVEREF(__pyx_r);
7949  __Pyx_RefNannyFinishContext();
7950  return __pyx_r;
7951  }
7952 
7953  /* "PyClical.pyx":721
7954  * return self.instance.getitem(toIndexSet(ixt))
7955  *
7956  * def __neg__(self): # <<<<<<<<<<<<<<
7957  * """
7958  * Unary -.
7959  */
7960 
7961  /* Python wrapper */
7962  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
7963  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7964  #if CYTHON_COMPILING_IN_CPYTHON
7965  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7966  #endif
7967  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7968  PyObject *__pyx_r = 0;
7969  __Pyx_RefNannyDeclarations
7970  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
7971  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7972 
7973  /* function exit code */
7974  __Pyx_RefNannyFinishContext();
7975  return __pyx_r;
7976  }
7977 
7978  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7979  PyObject *__pyx_r = NULL;
7980  __Pyx_RefNannyDeclarations
7981  PyObject *__pyx_t_1 = NULL;
7982  PyObject *__pyx_t_2 = NULL;
7983  __Pyx_RefNannySetupContext("__neg__", 0);
7984 
7985  /* "PyClical.pyx":728
7986  * -{1}
7987  * """
7988  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
7989  *
7990  * def __pos__(self):
7991  */
7992  __Pyx_XDECREF(__pyx_r);
7993  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
7994  __Pyx_GOTREF(__pyx_t_1);
7995  __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)
7996  __Pyx_GOTREF(__pyx_t_2);
7997  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7998  __pyx_r = __pyx_t_2;
7999  __pyx_t_2 = 0;
8000  goto __pyx_L0;
8001 
8002  /* "PyClical.pyx":721
8003  * return self.instance.getitem(toIndexSet(ixt))
8004  *
8005  * def __neg__(self): # <<<<<<<<<<<<<<
8006  * """
8007  * Unary -.
8008  */
8009 
8010  /* function exit code */
8011  __pyx_L1_error:;
8012  __Pyx_XDECREF(__pyx_t_1);
8013  __Pyx_XDECREF(__pyx_t_2);
8014  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8015  __pyx_r = NULL;
8016  __pyx_L0:;
8017  __Pyx_XGIVEREF(__pyx_r);
8018  __Pyx_RefNannyFinishContext();
8019  return __pyx_r;
8020  }
8021 
8022  /* "PyClical.pyx":730
8023  * return clifford().wrap( self.instance.neg() )
8024  *
8025  * def __pos__(self): # <<<<<<<<<<<<<<
8026  * """
8027  * Unary +.
8028  */
8029 
8030  /* Python wrapper */
8031  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8032  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
8033  #if CYTHON_COMPILING_IN_CPYTHON
8034  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8035  #endif
8036  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8037  PyObject *__pyx_r = 0;
8038  __Pyx_RefNannyDeclarations
8039  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8040  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8041 
8042  /* function exit code */
8043  __Pyx_RefNannyFinishContext();
8044  return __pyx_r;
8045  }
8046 
8047  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8048  PyObject *__pyx_r = NULL;
8049  __Pyx_RefNannyDeclarations
8050  PyObject *__pyx_t_1 = NULL;
8051  __Pyx_RefNannySetupContext("__pos__", 0);
8052 
8053  /* "PyClical.pyx":737
8054  * {1}
8055  * """
8056  * return clifford(self) # <<<<<<<<<<<<<<
8057  *
8058  * def __add__(lhs, rhs):
8059  */
8060  __Pyx_XDECREF(__pyx_r);
8061  __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)
8062  __Pyx_GOTREF(__pyx_t_1);
8063  __pyx_r = __pyx_t_1;
8064  __pyx_t_1 = 0;
8065  goto __pyx_L0;
8066 
8067  /* "PyClical.pyx":730
8068  * return clifford().wrap( self.instance.neg() )
8069  *
8070  * def __pos__(self): # <<<<<<<<<<<<<<
8071  * """
8072  * Unary +.
8073  */
8074 
8075  /* function exit code */
8076  __pyx_L1_error:;
8077  __Pyx_XDECREF(__pyx_t_1);
8078  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8079  __pyx_r = NULL;
8080  __pyx_L0:;
8081  __Pyx_XGIVEREF(__pyx_r);
8082  __Pyx_RefNannyFinishContext();
8083  return __pyx_r;
8084  }
8085 
8086  /* "PyClical.pyx":739
8087  * return clifford(self)
8088  *
8089  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8090  * """
8091  * Geometric sum.
8092  */
8093 
8094  /* Python wrapper */
8095  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8096  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 ";
8097  #if CYTHON_COMPILING_IN_CPYTHON
8098  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8099  #endif
8100  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8101  PyObject *__pyx_r = 0;
8102  __Pyx_RefNannyDeclarations
8103  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8104  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8105 
8106  /* function exit code */
8107  __Pyx_RefNannyFinishContext();
8108  return __pyx_r;
8109  }
8110 
8111  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8112  PyObject *__pyx_r = NULL;
8113  __Pyx_RefNannyDeclarations
8114  PyObject *__pyx_t_1 = NULL;
8115  PyObject *__pyx_t_2 = NULL;
8116  __Pyx_RefNannySetupContext("__add__", 0);
8117 
8118  /* "PyClical.pyx":748
8119  * {1}+{2}
8120  * """
8121  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8122  *
8123  * def __iadd__(self, rhs):
8124  */
8125  __Pyx_XDECREF(__pyx_r);
8126  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
8127  __Pyx_GOTREF(__pyx_t_1);
8128  __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)
8129  __Pyx_GOTREF(__pyx_t_2);
8130  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8131  __pyx_r = __pyx_t_2;
8132  __pyx_t_2 = 0;
8133  goto __pyx_L0;
8134 
8135  /* "PyClical.pyx":739
8136  * return clifford(self)
8137  *
8138  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8139  * """
8140  * Geometric sum.
8141  */
8142 
8143  /* function exit code */
8144  __pyx_L1_error:;
8145  __Pyx_XDECREF(__pyx_t_1);
8146  __Pyx_XDECREF(__pyx_t_2);
8147  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8148  __pyx_r = NULL;
8149  __pyx_L0:;
8150  __Pyx_XGIVEREF(__pyx_r);
8151  __Pyx_RefNannyFinishContext();
8152  return __pyx_r;
8153  }
8154 
8155  /* "PyClical.pyx":750
8156  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8157  *
8158  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8159  * """
8160  * Geometric sum.
8161  */
8162 
8163  /* Python wrapper */
8164  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8165  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 ";
8166  #if CYTHON_COMPILING_IN_CPYTHON
8167  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8168  #endif
8169  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8170  PyObject *__pyx_r = 0;
8171  __Pyx_RefNannyDeclarations
8172  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8173  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8174 
8175  /* function exit code */
8176  __Pyx_RefNannyFinishContext();
8177  return __pyx_r;
8178  }
8179 
8180  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8181  PyObject *__pyx_r = NULL;
8182  __Pyx_RefNannyDeclarations
8183  PyObject *__pyx_t_1 = NULL;
8184  __Pyx_RefNannySetupContext("__iadd__", 0);
8185 
8186  /* "PyClical.pyx":757
8187  * 1+{2}
8188  * """
8189  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8190  *
8191  * def __sub__(lhs, rhs):
8192  */
8193  __Pyx_XDECREF(__pyx_r);
8194  __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)
8195  __Pyx_GOTREF(__pyx_t_1);
8196  __pyx_r = __pyx_t_1;
8197  __pyx_t_1 = 0;
8198  goto __pyx_L0;
8199 
8200  /* "PyClical.pyx":750
8201  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8202  *
8203  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8204  * """
8205  * Geometric sum.
8206  */
8207 
8208  /* function exit code */
8209  __pyx_L1_error:;
8210  __Pyx_XDECREF(__pyx_t_1);
8211  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8212  __pyx_r = NULL;
8213  __pyx_L0:;
8214  __Pyx_XGIVEREF(__pyx_r);
8215  __Pyx_RefNannyFinishContext();
8216  return __pyx_r;
8217  }
8218 
8219  /* "PyClical.pyx":759
8220  * return self.wrap( self.unwrap() + toClifford(rhs) )
8221  *
8222  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8223  * """
8224  * Geometric difference.
8225  */
8226 
8227  /* Python wrapper */
8228  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8229  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 ";
8230  #if CYTHON_COMPILING_IN_CPYTHON
8231  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8232  #endif
8233  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8234  PyObject *__pyx_r = 0;
8235  __Pyx_RefNannyDeclarations
8236  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8237  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8238 
8239  /* function exit code */
8240  __Pyx_RefNannyFinishContext();
8241  return __pyx_r;
8242  }
8243 
8244  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8245  PyObject *__pyx_r = NULL;
8246  __Pyx_RefNannyDeclarations
8247  PyObject *__pyx_t_1 = NULL;
8248  PyObject *__pyx_t_2 = NULL;
8249  __Pyx_RefNannySetupContext("__sub__", 0);
8250 
8251  /* "PyClical.pyx":768
8252  * {1}-{2}
8253  * """
8254  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8255  *
8256  * def __isub__(self, rhs):
8257  */
8258  __Pyx_XDECREF(__pyx_r);
8259  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
8260  __Pyx_GOTREF(__pyx_t_1);
8261  __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)
8262  __Pyx_GOTREF(__pyx_t_2);
8263  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8264  __pyx_r = __pyx_t_2;
8265  __pyx_t_2 = 0;
8266  goto __pyx_L0;
8267 
8268  /* "PyClical.pyx":759
8269  * return self.wrap( self.unwrap() + toClifford(rhs) )
8270  *
8271  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8272  * """
8273  * Geometric difference.
8274  */
8275 
8276  /* function exit code */
8277  __pyx_L1_error:;
8278  __Pyx_XDECREF(__pyx_t_1);
8279  __Pyx_XDECREF(__pyx_t_2);
8280  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8281  __pyx_r = NULL;
8282  __pyx_L0:;
8283  __Pyx_XGIVEREF(__pyx_r);
8284  __Pyx_RefNannyFinishContext();
8285  return __pyx_r;
8286  }
8287 
8288  /* "PyClical.pyx":770
8289  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8290  *
8291  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8292  * """
8293  * Geometric difference.
8294  */
8295 
8296  /* Python wrapper */
8297  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8298  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 ";
8299  #if CYTHON_COMPILING_IN_CPYTHON
8300  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8301  #endif
8302  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8303  PyObject *__pyx_r = 0;
8304  __Pyx_RefNannyDeclarations
8305  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8306  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8307 
8308  /* function exit code */
8309  __Pyx_RefNannyFinishContext();
8310  return __pyx_r;
8311  }
8312 
8313  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8314  PyObject *__pyx_r = NULL;
8315  __Pyx_RefNannyDeclarations
8316  PyObject *__pyx_t_1 = NULL;
8317  __Pyx_RefNannySetupContext("__isub__", 0);
8318 
8319  /* "PyClical.pyx":777
8320  * 1-{2}
8321  * """
8322  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8323  *
8324  * def __mul__(lhs, rhs):
8325  */
8326  __Pyx_XDECREF(__pyx_r);
8327  __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)
8328  __Pyx_GOTREF(__pyx_t_1);
8329  __pyx_r = __pyx_t_1;
8330  __pyx_t_1 = 0;
8331  goto __pyx_L0;
8332 
8333  /* "PyClical.pyx":770
8334  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8335  *
8336  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8337  * """
8338  * Geometric difference.
8339  */
8340 
8341  /* function exit code */
8342  __pyx_L1_error:;
8343  __Pyx_XDECREF(__pyx_t_1);
8344  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8345  __pyx_r = NULL;
8346  __pyx_L0:;
8347  __Pyx_XGIVEREF(__pyx_r);
8348  __Pyx_RefNannyFinishContext();
8349  return __pyx_r;
8350  }
8351 
8352  /* "PyClical.pyx":779
8353  * return self.wrap( self.unwrap() - toClifford(rhs) )
8354  *
8355  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8356  * """
8357  * Geometric product.
8358  */
8359 
8360  /* Python wrapper */
8361  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8362  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 ";
8363  #if CYTHON_COMPILING_IN_CPYTHON
8364  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8365  #endif
8366  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8367  PyObject *__pyx_r = 0;
8368  __Pyx_RefNannyDeclarations
8369  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8370  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8371 
8372  /* function exit code */
8373  __Pyx_RefNannyFinishContext();
8374  return __pyx_r;
8375  }
8376 
8377  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8378  PyObject *__pyx_r = NULL;
8379  __Pyx_RefNannyDeclarations
8380  PyObject *__pyx_t_1 = NULL;
8381  PyObject *__pyx_t_2 = NULL;
8382  __Pyx_RefNannySetupContext("__mul__", 0);
8383 
8384  /* "PyClical.pyx":790
8385  * {2}
8386  * """
8387  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8388  *
8389  * def __imul__(self, rhs):
8390  */
8391  __Pyx_XDECREF(__pyx_r);
8392  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
8393  __Pyx_GOTREF(__pyx_t_1);
8394  __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)
8395  __Pyx_GOTREF(__pyx_t_2);
8396  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8397  __pyx_r = __pyx_t_2;
8398  __pyx_t_2 = 0;
8399  goto __pyx_L0;
8400 
8401  /* "PyClical.pyx":779
8402  * return self.wrap( self.unwrap() - toClifford(rhs) )
8403  *
8404  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8405  * """
8406  * Geometric product.
8407  */
8408 
8409  /* function exit code */
8410  __pyx_L1_error:;
8411  __Pyx_XDECREF(__pyx_t_1);
8412  __Pyx_XDECREF(__pyx_t_2);
8413  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8414  __pyx_r = NULL;
8415  __pyx_L0:;
8416  __Pyx_XGIVEREF(__pyx_r);
8417  __Pyx_RefNannyFinishContext();
8418  return __pyx_r;
8419  }
8420 
8421  /* "PyClical.pyx":792
8422  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8423  *
8424  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8425  * """
8426  * Geometric product.
8427  */
8428 
8429  /* Python wrapper */
8430  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8431  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 ";
8432  #if CYTHON_COMPILING_IN_CPYTHON
8433  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8434  #endif
8435  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8436  PyObject *__pyx_r = 0;
8437  __Pyx_RefNannyDeclarations
8438  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8439  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8440 
8441  /* function exit code */
8442  __Pyx_RefNannyFinishContext();
8443  return __pyx_r;
8444  }
8445 
8446  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8447  PyObject *__pyx_r = NULL;
8448  __Pyx_RefNannyDeclarations
8449  PyObject *__pyx_t_1 = NULL;
8450  __Pyx_RefNannySetupContext("__imul__", 0);
8451 
8452  /* "PyClical.pyx":803
8453  * {2}
8454  * """
8455  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8456  *
8457  * def __mod__(lhs, rhs):
8458  */
8459  __Pyx_XDECREF(__pyx_r);
8460  __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)
8461  __Pyx_GOTREF(__pyx_t_1);
8462  __pyx_r = __pyx_t_1;
8463  __pyx_t_1 = 0;
8464  goto __pyx_L0;
8465 
8466  /* "PyClical.pyx":792
8467  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8468  *
8469  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8470  * """
8471  * Geometric product.
8472  */
8473 
8474  /* function exit code */
8475  __pyx_L1_error:;
8476  __Pyx_XDECREF(__pyx_t_1);
8477  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8478  __pyx_r = NULL;
8479  __pyx_L0:;
8480  __Pyx_XGIVEREF(__pyx_r);
8481  __Pyx_RefNannyFinishContext();
8482  return __pyx_r;
8483  }
8484 
8485  /* "PyClical.pyx":805
8486  * return self.wrap( self.unwrap() * toClifford(rhs) )
8487  *
8488  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8489  * """
8490  * Contraction.
8491  */
8492 
8493  /* Python wrapper */
8494  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8495  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 ";
8496  #if CYTHON_COMPILING_IN_CPYTHON
8497  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8498  #endif
8499  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8500  PyObject *__pyx_r = 0;
8501  __Pyx_RefNannyDeclarations
8502  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8503  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8504 
8505  /* function exit code */
8506  __Pyx_RefNannyFinishContext();
8507  return __pyx_r;
8508  }
8509 
8510  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8511  PyObject *__pyx_r = NULL;
8512  __Pyx_RefNannyDeclarations
8513  PyObject *__pyx_t_1 = NULL;
8514  PyObject *__pyx_t_2 = NULL;
8515  __Pyx_RefNannySetupContext("__mod__", 0);
8516 
8517  /* "PyClical.pyx":818
8518  * {2}
8519  * """
8520  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8521  *
8522  * def __imod__(self, rhs):
8523  */
8524  __Pyx_XDECREF(__pyx_r);
8525  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
8526  __Pyx_GOTREF(__pyx_t_1);
8527  __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)
8528  __Pyx_GOTREF(__pyx_t_2);
8529  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8530  __pyx_r = __pyx_t_2;
8531  __pyx_t_2 = 0;
8532  goto __pyx_L0;
8533 
8534  /* "PyClical.pyx":805
8535  * return self.wrap( self.unwrap() * toClifford(rhs) )
8536  *
8537  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8538  * """
8539  * Contraction.
8540  */
8541 
8542  /* function exit code */
8543  __pyx_L1_error:;
8544  __Pyx_XDECREF(__pyx_t_1);
8545  __Pyx_XDECREF(__pyx_t_2);
8546  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8547  __pyx_r = NULL;
8548  __pyx_L0:;
8549  __Pyx_XGIVEREF(__pyx_r);
8550  __Pyx_RefNannyFinishContext();
8551  return __pyx_r;
8552  }
8553 
8554  /* "PyClical.pyx":820
8555  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8556  *
8557  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8558  * """
8559  * Contraction.
8560  */
8561 
8562  /* Python wrapper */
8563  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8564  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 ";
8565  #if CYTHON_COMPILING_IN_CPYTHON
8566  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8567  #endif
8568  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8569  PyObject *__pyx_r = 0;
8570  __Pyx_RefNannyDeclarations
8571  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8572  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8573 
8574  /* function exit code */
8575  __Pyx_RefNannyFinishContext();
8576  return __pyx_r;
8577  }
8578 
8579  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8580  PyObject *__pyx_r = NULL;
8581  __Pyx_RefNannyDeclarations
8582  PyObject *__pyx_t_1 = NULL;
8583  __Pyx_RefNannySetupContext("__imod__", 0);
8584 
8585  /* "PyClical.pyx":833
8586  * {2}
8587  * """
8588  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8589  *
8590  * def __and__(lhs, rhs):
8591  */
8592  __Pyx_XDECREF(__pyx_r);
8593  __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)
8594  __Pyx_GOTREF(__pyx_t_1);
8595  __pyx_r = __pyx_t_1;
8596  __pyx_t_1 = 0;
8597  goto __pyx_L0;
8598 
8599  /* "PyClical.pyx":820
8600  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8601  *
8602  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8603  * """
8604  * Contraction.
8605  */
8606 
8607  /* function exit code */
8608  __pyx_L1_error:;
8609  __Pyx_XDECREF(__pyx_t_1);
8610  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8611  __pyx_r = NULL;
8612  __pyx_L0:;
8613  __Pyx_XGIVEREF(__pyx_r);
8614  __Pyx_RefNannyFinishContext();
8615  return __pyx_r;
8616  }
8617 
8618  /* "PyClical.pyx":835
8619  * return self.wrap( self.unwrap() % toClifford(rhs) )
8620  *
8621  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8622  * """
8623  * Inner product.
8624  */
8625 
8626  /* Python wrapper */
8627  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8628  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 ";
8629  #if CYTHON_COMPILING_IN_CPYTHON
8630  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8631  #endif
8632  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8633  PyObject *__pyx_r = 0;
8634  __Pyx_RefNannyDeclarations
8635  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8636  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8637 
8638  /* function exit code */
8639  __Pyx_RefNannyFinishContext();
8640  return __pyx_r;
8641  }
8642 
8643  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8644  PyObject *__pyx_r = NULL;
8645  __Pyx_RefNannyDeclarations
8646  PyObject *__pyx_t_1 = NULL;
8647  PyObject *__pyx_t_2 = NULL;
8648  __Pyx_RefNannySetupContext("__and__", 0);
8649 
8650  /* "PyClical.pyx":848
8651  * {2}
8652  * """
8653  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8654  *
8655  * def __iand__(self, rhs):
8656  */
8657  __Pyx_XDECREF(__pyx_r);
8658  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
8659  __Pyx_GOTREF(__pyx_t_1);
8660  __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)
8661  __Pyx_GOTREF(__pyx_t_2);
8662  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8663  __pyx_r = __pyx_t_2;
8664  __pyx_t_2 = 0;
8665  goto __pyx_L0;
8666 
8667  /* "PyClical.pyx":835
8668  * return self.wrap( self.unwrap() % toClifford(rhs) )
8669  *
8670  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8671  * """
8672  * Inner product.
8673  */
8674 
8675  /* function exit code */
8676  __pyx_L1_error:;
8677  __Pyx_XDECREF(__pyx_t_1);
8678  __Pyx_XDECREF(__pyx_t_2);
8679  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8680  __pyx_r = NULL;
8681  __pyx_L0:;
8682  __Pyx_XGIVEREF(__pyx_r);
8683  __Pyx_RefNannyFinishContext();
8684  return __pyx_r;
8685  }
8686 
8687  /* "PyClical.pyx":850
8688  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8689  *
8690  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8691  * """
8692  * Inner product.
8693  */
8694 
8695  /* Python wrapper */
8696  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8697  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 ";
8698  #if CYTHON_COMPILING_IN_CPYTHON
8699  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8700  #endif
8701  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8702  PyObject *__pyx_r = 0;
8703  __Pyx_RefNannyDeclarations
8704  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8705  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8706 
8707  /* function exit code */
8708  __Pyx_RefNannyFinishContext();
8709  return __pyx_r;
8710  }
8711 
8712  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8713  PyObject *__pyx_r = NULL;
8714  __Pyx_RefNannyDeclarations
8715  PyObject *__pyx_t_1 = NULL;
8716  __Pyx_RefNannySetupContext("__iand__", 0);
8717 
8718  /* "PyClical.pyx":863
8719  * {2}
8720  * """
8721  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8722  *
8723  * def __xor__(lhs, rhs):
8724  */
8725  __Pyx_XDECREF(__pyx_r);
8726  __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)
8727  __Pyx_GOTREF(__pyx_t_1);
8728  __pyx_r = __pyx_t_1;
8729  __pyx_t_1 = 0;
8730  goto __pyx_L0;
8731 
8732  /* "PyClical.pyx":850
8733  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8734  *
8735  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8736  * """
8737  * Inner product.
8738  */
8739 
8740  /* function exit code */
8741  __pyx_L1_error:;
8742  __Pyx_XDECREF(__pyx_t_1);
8743  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8744  __pyx_r = NULL;
8745  __pyx_L0:;
8746  __Pyx_XGIVEREF(__pyx_r);
8747  __Pyx_RefNannyFinishContext();
8748  return __pyx_r;
8749  }
8750 
8751  /* "PyClical.pyx":865
8752  * return self.wrap( self.unwrap() & toClifford(rhs) )
8753  *
8754  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8755  * """
8756  * Outer product.
8757  */
8758 
8759  /* Python wrapper */
8760  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8761  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 ";
8762  #if CYTHON_COMPILING_IN_CPYTHON
8763  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8764  #endif
8765  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8766  PyObject *__pyx_r = 0;
8767  __Pyx_RefNannyDeclarations
8768  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8769  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8770 
8771  /* function exit code */
8772  __Pyx_RefNannyFinishContext();
8773  return __pyx_r;
8774  }
8775 
8776  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8777  PyObject *__pyx_r = NULL;
8778  __Pyx_RefNannyDeclarations
8779  PyObject *__pyx_t_1 = NULL;
8780  PyObject *__pyx_t_2 = NULL;
8781  __Pyx_RefNannySetupContext("__xor__", 0);
8782 
8783  /* "PyClical.pyx":878
8784  * 0
8785  * """
8786  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8787  *
8788  * def __ixor__(self, rhs):
8789  */
8790  __Pyx_XDECREF(__pyx_r);
8791  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
8792  __Pyx_GOTREF(__pyx_t_1);
8793  __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)
8794  __Pyx_GOTREF(__pyx_t_2);
8795  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8796  __pyx_r = __pyx_t_2;
8797  __pyx_t_2 = 0;
8798  goto __pyx_L0;
8799 
8800  /* "PyClical.pyx":865
8801  * return self.wrap( self.unwrap() & toClifford(rhs) )
8802  *
8803  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8804  * """
8805  * Outer product.
8806  */
8807 
8808  /* function exit code */
8809  __pyx_L1_error:;
8810  __Pyx_XDECREF(__pyx_t_1);
8811  __Pyx_XDECREF(__pyx_t_2);
8812  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8813  __pyx_r = NULL;
8814  __pyx_L0:;
8815  __Pyx_XGIVEREF(__pyx_r);
8816  __Pyx_RefNannyFinishContext();
8817  return __pyx_r;
8818  }
8819 
8820  /* "PyClical.pyx":880
8821  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8822  *
8823  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8824  * """
8825  * Outer product.
8826  */
8827 
8828  /* Python wrapper */
8829  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8830  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 ";
8831  #if CYTHON_COMPILING_IN_CPYTHON
8832  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8833  #endif
8834  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8835  PyObject *__pyx_r = 0;
8836  __Pyx_RefNannyDeclarations
8837  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8838  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8839 
8840  /* function exit code */
8841  __Pyx_RefNannyFinishContext();
8842  return __pyx_r;
8843  }
8844 
8845  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8846  PyObject *__pyx_r = NULL;
8847  __Pyx_RefNannyDeclarations
8848  PyObject *__pyx_t_1 = NULL;
8849  __Pyx_RefNannySetupContext("__ixor__", 0);
8850 
8851  /* "PyClical.pyx":893
8852  * 0
8853  * """
8854  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8855  *
8856  * def __div__(lhs, rhs):
8857  */
8858  __Pyx_XDECREF(__pyx_r);
8859  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) ^ __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
8860  __Pyx_GOTREF(__pyx_t_1);
8861  __pyx_r = __pyx_t_1;
8862  __pyx_t_1 = 0;
8863  goto __pyx_L0;
8864 
8865  /* "PyClical.pyx":880
8866  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8867  *
8868  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8869  * """
8870  * Outer product.
8871  */
8872 
8873  /* function exit code */
8874  __pyx_L1_error:;
8875  __Pyx_XDECREF(__pyx_t_1);
8876  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8877  __pyx_r = NULL;
8878  __pyx_L0:;
8879  __Pyx_XGIVEREF(__pyx_r);
8880  __Pyx_RefNannyFinishContext();
8881  return __pyx_r;
8882  }
8883 
8884  /* "PyClical.pyx":895
8885  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8886  *
8887  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8888  * """
8889  * Geometric quotient.
8890  */
8891 
8892  /* Python wrapper */
8893  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8894  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8895  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 ";
8896  #if CYTHON_COMPILING_IN_CPYTHON
8897  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8898  #endif
8899  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8900  PyObject *__pyx_r = 0;
8901  __Pyx_RefNannyDeclarations
8902  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8903  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8904 
8905  /* function exit code */
8906  __Pyx_RefNannyFinishContext();
8907  return __pyx_r;
8908  }
8909  #endif
8911  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8912  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8913  PyObject *__pyx_r = NULL;
8914  __Pyx_RefNannyDeclarations
8915  PyObject *__pyx_t_1 = NULL;
8916  PyObject *__pyx_t_2 = NULL;
8917  __Pyx_RefNannySetupContext("__div__", 0);
8918 
8919  /* "PyClical.pyx":908
8920  * -{2}
8921  * """
8922  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8923  *
8924  * def __idiv__(self, rhs):
8925  */
8926  __Pyx_XDECREF(__pyx_r);
8927  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
8928  __Pyx_GOTREF(__pyx_t_1);
8929  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) / __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
8930  __Pyx_GOTREF(__pyx_t_2);
8931  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8932  __pyx_r = __pyx_t_2;
8933  __pyx_t_2 = 0;
8934  goto __pyx_L0;
8935 
8936  /* "PyClical.pyx":895
8937  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8938  *
8939  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8940  * """
8941  * Geometric quotient.
8942  */
8943 
8944  /* function exit code */
8945  __pyx_L1_error:;
8946  __Pyx_XDECREF(__pyx_t_1);
8947  __Pyx_XDECREF(__pyx_t_2);
8948  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8949  __pyx_r = NULL;
8950  __pyx_L0:;
8951  __Pyx_XGIVEREF(__pyx_r);
8952  __Pyx_RefNannyFinishContext();
8953  return __pyx_r;
8954  }
8955  #endif
8957  /* "PyClical.pyx":910
8958  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8959  *
8960  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8961  * """
8962  * Geometric quotient.
8963  */
8964 
8965  /* Python wrapper */
8966  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8967  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8968  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 ";
8969  #if CYTHON_COMPILING_IN_CPYTHON
8970  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8971  #endif
8972  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8973  PyObject *__pyx_r = 0;
8974  __Pyx_RefNannyDeclarations
8975  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
8976  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8977 
8978  /* function exit code */
8979  __Pyx_RefNannyFinishContext();
8980  return __pyx_r;
8981  }
8982  #endif
8984  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8985  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8986  PyObject *__pyx_r = NULL;
8987  __Pyx_RefNannyDeclarations
8988  PyObject *__pyx_t_1 = NULL;
8989  __Pyx_RefNannySetupContext("__idiv__", 0);
8990 
8991  /* "PyClical.pyx":923
8992  * -{2}
8993  * """
8994  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
8995  *
8996  * def inv(self):
8997  */
8998  __Pyx_XDECREF(__pyx_r);
8999  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) / __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error)
9000  __Pyx_GOTREF(__pyx_t_1);
9001  __pyx_r = __pyx_t_1;
9002  __pyx_t_1 = 0;
9003  goto __pyx_L0;
9004 
9005  /* "PyClical.pyx":910
9006  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9007  *
9008  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9009  * """
9010  * Geometric quotient.
9011  */
9012 
9013  /* function exit code */
9014  __pyx_L1_error:;
9015  __Pyx_XDECREF(__pyx_t_1);
9016  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9017  __pyx_r = NULL;
9018  __pyx_L0:;
9019  __Pyx_XGIVEREF(__pyx_r);
9020  __Pyx_RefNannyFinishContext();
9021  return __pyx_r;
9022  }
9023  #endif
9025  /* "PyClical.pyx":925
9026  * return self.wrap( self.unwrap() / toClifford(rhs) )
9027  *
9028  * def inv(self): # <<<<<<<<<<<<<<
9029  * """
9030  * Geometric multiplicative inverse.
9031  */
9032 
9033  /* Python wrapper */
9034  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9035  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 ";
9036  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9037  PyObject *__pyx_r = 0;
9038  __Pyx_RefNannyDeclarations
9039  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9040  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9041 
9042  /* function exit code */
9043  __Pyx_RefNannyFinishContext();
9044  return __pyx_r;
9045  }
9046 
9047  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9048  PyObject *__pyx_r = NULL;
9049  __Pyx_RefNannyDeclarations
9050  PyObject *__pyx_t_1 = NULL;
9051  PyObject *__pyx_t_2 = NULL;
9052  __Pyx_RefNannySetupContext("inv", 0);
9053 
9054  /* "PyClical.pyx":936
9055  * -{1,2}
9056  * """
9057  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9058  *
9059  * def __or__(lhs, rhs):
9060  */
9061  __Pyx_XDECREF(__pyx_r);
9062  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
9063  __Pyx_GOTREF(__pyx_t_1);
9064  __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)
9065  __Pyx_GOTREF(__pyx_t_2);
9066  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9067  __pyx_r = __pyx_t_2;
9068  __pyx_t_2 = 0;
9069  goto __pyx_L0;
9070 
9071  /* "PyClical.pyx":925
9072  * return self.wrap( self.unwrap() / toClifford(rhs) )
9073  *
9074  * def inv(self): # <<<<<<<<<<<<<<
9075  * """
9076  * Geometric multiplicative inverse.
9077  */
9078 
9079  /* function exit code */
9080  __pyx_L1_error:;
9081  __Pyx_XDECREF(__pyx_t_1);
9082  __Pyx_XDECREF(__pyx_t_2);
9083  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9084  __pyx_r = NULL;
9085  __pyx_L0:;
9086  __Pyx_XGIVEREF(__pyx_r);
9087  __Pyx_RefNannyFinishContext();
9088  return __pyx_r;
9089  }
9090 
9091  /* "PyClical.pyx":938
9092  * return clifford().wrap( self.instance.inv() )
9093  *
9094  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9095  * """
9096  * Transform left hand side, using right hand side as a transformation.
9097  */
9098 
9099  /* Python wrapper */
9100  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9101  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 ";
9102  #if CYTHON_COMPILING_IN_CPYTHON
9103  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9104  #endif
9105  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9106  PyObject *__pyx_r = 0;
9107  __Pyx_RefNannyDeclarations
9108  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9109  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9110 
9111  /* function exit code */
9112  __Pyx_RefNannyFinishContext();
9113  return __pyx_r;
9114  }
9115 
9116  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9117  PyObject *__pyx_r = NULL;
9118  __Pyx_RefNannyDeclarations
9119  PyObject *__pyx_t_1 = NULL;
9120  PyObject *__pyx_t_2 = NULL;
9121  __Pyx_RefNannySetupContext("__or__", 0);
9122 
9123  /* "PyClical.pyx":947
9124  * -{1}
9125  * """
9126  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9127  *
9128  * def __ior__(self, rhs):
9129  */
9130  __Pyx_XDECREF(__pyx_r);
9131  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
9132  __Pyx_GOTREF(__pyx_t_1);
9133  __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)
9134  __Pyx_GOTREF(__pyx_t_2);
9135  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9136  __pyx_r = __pyx_t_2;
9137  __pyx_t_2 = 0;
9138  goto __pyx_L0;
9139 
9140  /* "PyClical.pyx":938
9141  * return clifford().wrap( self.instance.inv() )
9142  *
9143  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9144  * """
9145  * Transform left hand side, using right hand side as a transformation.
9146  */
9147 
9148  /* function exit code */
9149  __pyx_L1_error:;
9150  __Pyx_XDECREF(__pyx_t_1);
9151  __Pyx_XDECREF(__pyx_t_2);
9152  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9153  __pyx_r = NULL;
9154  __pyx_L0:;
9155  __Pyx_XGIVEREF(__pyx_r);
9156  __Pyx_RefNannyFinishContext();
9157  return __pyx_r;
9158  }
9159 
9160  /* "PyClical.pyx":949
9161  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9162  *
9163  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9164  * """
9165  * Transform left hand side, using right hand side as a transformation.
9166  */
9167 
9168  /* Python wrapper */
9169  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9170  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 ";
9171  #if CYTHON_COMPILING_IN_CPYTHON
9172  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9173  #endif
9174  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9175  PyObject *__pyx_r = 0;
9176  __Pyx_RefNannyDeclarations
9177  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9178  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9179 
9180  /* function exit code */
9181  __Pyx_RefNannyFinishContext();
9182  return __pyx_r;
9183  }
9184 
9185  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9186  PyObject *__pyx_r = NULL;
9187  __Pyx_RefNannyDeclarations
9188  PyObject *__pyx_t_1 = NULL;
9189  __Pyx_RefNannySetupContext("__ior__", 0);
9190 
9191  /* "PyClical.pyx":958
9192  * -{1}
9193  * """
9194  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9195  *
9196  * def __pow__(self, m, dummy):
9197  */
9198  __Pyx_XDECREF(__pyx_r);
9199  __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)
9200  __Pyx_GOTREF(__pyx_t_1);
9201  __pyx_r = __pyx_t_1;
9202  __pyx_t_1 = 0;
9203  goto __pyx_L0;
9204 
9205  /* "PyClical.pyx":949
9206  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9207  *
9208  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9209  * """
9210  * Transform left hand side, using right hand side as a transformation.
9211  */
9212 
9213  /* function exit code */
9214  __pyx_L1_error:;
9215  __Pyx_XDECREF(__pyx_t_1);
9216  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9217  __pyx_r = NULL;
9218  __pyx_L0:;
9219  __Pyx_XGIVEREF(__pyx_r);
9220  __Pyx_RefNannyFinishContext();
9221  return __pyx_r;
9222  }
9223 
9224  /* "PyClical.pyx":960
9225  * return self.wrap( self.unwrap() | toClifford(rhs) )
9226  *
9227  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9228  * """
9229  * Power: self to the m.
9230  */
9231 
9232  /* Python wrapper */
9233  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9234  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 ";
9235  #if CYTHON_COMPILING_IN_CPYTHON
9236  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9237  #endif
9238  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9239  PyObject *__pyx_r = 0;
9240  __Pyx_RefNannyDeclarations
9241  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9242  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9243 
9244  /* function exit code */
9245  __Pyx_RefNannyFinishContext();
9246  return __pyx_r;
9247  }
9248 
9249  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9250  PyObject *__pyx_r = NULL;
9251  __Pyx_RefNannyDeclarations
9252  PyObject *__pyx_t_1 = NULL;
9253  __Pyx_RefNannySetupContext("__pow__", 0);
9254 
9255  /* "PyClical.pyx":977
9256  * 1
9257  * """
9258  * return pow(self, m) # <<<<<<<<<<<<<<
9259  *
9260  * def pow(self, m):
9261  */
9262  __Pyx_XDECREF(__pyx_r);
9263  __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)
9264  __Pyx_GOTREF(__pyx_t_1);
9265  __pyx_r = __pyx_t_1;
9266  __pyx_t_1 = 0;
9267  goto __pyx_L0;
9268 
9269  /* "PyClical.pyx":960
9270  * return self.wrap( self.unwrap() | toClifford(rhs) )
9271  *
9272  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9273  * """
9274  * Power: self to the m.
9275  */
9276 
9277  /* function exit code */
9278  __pyx_L1_error:;
9279  __Pyx_XDECREF(__pyx_t_1);
9280  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9281  __pyx_r = NULL;
9282  __pyx_L0:;
9283  __Pyx_XGIVEREF(__pyx_r);
9284  __Pyx_RefNannyFinishContext();
9285  return __pyx_r;
9286  }
9287 
9288  /* "PyClical.pyx":979
9289  * return pow(self, m)
9290  *
9291  * def pow(self, m): # <<<<<<<<<<<<<<
9292  * """
9293  * Power: self to the m.
9294  */
9295 
9296  /* Python wrapper */
9297  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9298  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 ";
9299  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9300  PyObject *__pyx_r = 0;
9301  __Pyx_RefNannyDeclarations
9302  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9303  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9304 
9305  /* function exit code */
9306  __Pyx_RefNannyFinishContext();
9307  return __pyx_r;
9308  }
9309 
9310  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9311  PyObject *__pyx_r = NULL;
9312  __Pyx_RefNannyDeclarations
9313  PyObject *__pyx_t_1 = NULL;
9314  PyObject *__pyx_t_2 = NULL;
9315  int __pyx_t_3;
9316  int __pyx_t_4;
9317  int __pyx_t_5;
9318  __Pyx_RefNannySetupContext("pow", 0);
9319 
9320  /* "PyClical.pyx":998
9321  * 1
9322  * """
9323  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9324  * return clifford().wrap( self.instance.pow(m) )
9325  * else:
9326  */
9327  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9328  __Pyx_GOTREF(__pyx_t_1);
9329  __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)
9330  __Pyx_GOTREF(__pyx_t_2);
9331  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9332  __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)
9333  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9334  __pyx_t_4 = (__pyx_t_3 != 0);
9335  if (__pyx_t_4) {
9336 
9337  /* "PyClical.pyx":999
9338  * """
9339  * if isinstance(m, numbers.Integral):
9340  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9341  * else:
9342  * return exp(m * log(self))
9343  */
9344  __Pyx_XDECREF(__pyx_r);
9345  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9346  __Pyx_GOTREF(__pyx_t_2);
9347  __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)
9348  __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)
9349  __Pyx_GOTREF(__pyx_t_1);
9350  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9351  __pyx_r = __pyx_t_1;
9352  __pyx_t_1 = 0;
9353  goto __pyx_L0;
9354 
9355  /* "PyClical.pyx":998
9356  * 1
9357  * """
9358  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9359  * return clifford().wrap( self.instance.pow(m) )
9360  * else:
9361  */
9362  }
9363 
9364  /* "PyClical.pyx":1001
9365  * return clifford().wrap( self.instance.pow(m) )
9366  * else:
9367  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9368  *
9369  * def outer_pow(self, m):
9370  */
9371  /*else*/ {
9372  __Pyx_XDECREF(__pyx_r);
9373  __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)
9374  __Pyx_GOTREF(__pyx_t_1);
9375  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9376  __Pyx_GOTREF(__pyx_t_2);
9377  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9378  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9379  __Pyx_GOTREF(__pyx_t_1);
9380  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9381  __pyx_r = __pyx_t_1;
9382  __pyx_t_1 = 0;
9383  goto __pyx_L0;
9384  }
9385 
9386  /* "PyClical.pyx":979
9387  * return pow(self, m)
9388  *
9389  * def pow(self, m): # <<<<<<<<<<<<<<
9390  * """
9391  * Power: self to the m.
9392  */
9393 
9394  /* function exit code */
9395  __pyx_L1_error:;
9396  __Pyx_XDECREF(__pyx_t_1);
9397  __Pyx_XDECREF(__pyx_t_2);
9398  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9399  __pyx_r = NULL;
9400  __pyx_L0:;
9401  __Pyx_XGIVEREF(__pyx_r);
9402  __Pyx_RefNannyFinishContext();
9403  return __pyx_r;
9404  }
9405 
9406  /* "PyClical.pyx":1003
9407  * return exp(m * log(self))
9408  *
9409  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9410  * """
9411  * Outer product power.
9412  */
9413 
9414  /* Python wrapper */
9415  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9416  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 ";
9417  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9418  PyObject *__pyx_r = 0;
9419  __Pyx_RefNannyDeclarations
9420  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9421  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9422 
9423  /* function exit code */
9424  __Pyx_RefNannyFinishContext();
9425  return __pyx_r;
9426  }
9427 
9428  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9429  PyObject *__pyx_r = NULL;
9430  __Pyx_RefNannyDeclarations
9431  PyObject *__pyx_t_1 = NULL;
9432  int __pyx_t_2;
9433  PyObject *__pyx_t_3 = NULL;
9434  __Pyx_RefNannySetupContext("outer_pow", 0);
9435 
9436  /* "PyClical.pyx":1017
9437  *
9438  * """
9439  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9440  *
9441  * def __call__(self, grade):
9442  */
9443  __Pyx_XDECREF(__pyx_r);
9444  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
9445  __Pyx_GOTREF(__pyx_t_1);
9446  __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)
9447  __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)
9448  __Pyx_GOTREF(__pyx_t_3);
9449  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9450  __pyx_r = __pyx_t_3;
9451  __pyx_t_3 = 0;
9452  goto __pyx_L0;
9453 
9454  /* "PyClical.pyx":1003
9455  * return exp(m * log(self))
9456  *
9457  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9458  * """
9459  * Outer product power.
9460  */
9461 
9462  /* function exit code */
9463  __pyx_L1_error:;
9464  __Pyx_XDECREF(__pyx_t_1);
9465  __Pyx_XDECREF(__pyx_t_3);
9466  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9467  __pyx_r = NULL;
9468  __pyx_L0:;
9469  __Pyx_XGIVEREF(__pyx_r);
9470  __Pyx_RefNannyFinishContext();
9471  return __pyx_r;
9472  }
9473 
9474  /* "PyClical.pyx":1019
9475  * return clifford().wrap( self.instance.outer_pow(m) )
9476  *
9477  * def __call__(self, grade): # <<<<<<<<<<<<<<
9478  * """
9479  * Pure grade-vector part.
9480  */
9481 
9482  /* Python wrapper */
9483  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9484  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 ";
9485  #if CYTHON_COMPILING_IN_CPYTHON
9486  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9487  #endif
9488  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9489  PyObject *__pyx_v_grade = 0;
9490  PyObject *__pyx_r = 0;
9491  __Pyx_RefNannyDeclarations
9492  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9493  {
9494  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9495  PyObject* values[1] = {0};
9496  if (unlikely(__pyx_kwds)) {
9497  Py_ssize_t kw_args;
9498  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9499  switch (pos_args) {
9500  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9501  CYTHON_FALLTHROUGH;
9502  case 0: break;
9503  default: goto __pyx_L5_argtuple_error;
9504  }
9505  kw_args = PyDict_Size(__pyx_kwds);
9506  switch (pos_args) {
9507  case 0:
9508  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9509  else goto __pyx_L5_argtuple_error;
9510  }
9511  if (unlikely(kw_args > 0)) {
9512  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9513  }
9514  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9515  goto __pyx_L5_argtuple_error;
9516  } else {
9517  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9518  }
9519  __pyx_v_grade = values[0];
9520  }
9521  goto __pyx_L4_argument_unpacking_done;
9522  __pyx_L5_argtuple_error:;
9523  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9524  __pyx_L3_error:;
9525  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9526  __Pyx_RefNannyFinishContext();
9527  return NULL;
9528  __pyx_L4_argument_unpacking_done:;
9529  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9530 
9531  /* function exit code */
9532  __Pyx_RefNannyFinishContext();
9533  return __pyx_r;
9534  }
9535 
9536  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9537  PyObject *__pyx_r = NULL;
9538  __Pyx_RefNannyDeclarations
9539  PyObject *__pyx_t_1 = NULL;
9540  int __pyx_t_2;
9541  PyObject *__pyx_t_3 = NULL;
9542  __Pyx_RefNannySetupContext("__call__", 0);
9543 
9544  /* "PyClical.pyx":1036
9545  * 0
9546  * """
9547  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9548  *
9549  * def scalar(self):
9550  */
9551  __Pyx_XDECREF(__pyx_r);
9552  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
9553  __Pyx_GOTREF(__pyx_t_1);
9554  __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)
9555  __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)
9556  __Pyx_GOTREF(__pyx_t_3);
9557  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9558  __pyx_r = __pyx_t_3;
9559  __pyx_t_3 = 0;
9560  goto __pyx_L0;
9561 
9562  /* "PyClical.pyx":1019
9563  * return clifford().wrap( self.instance.outer_pow(m) )
9564  *
9565  * def __call__(self, grade): # <<<<<<<<<<<<<<
9566  * """
9567  * Pure grade-vector part.
9568  */
9569 
9570  /* function exit code */
9571  __pyx_L1_error:;
9572  __Pyx_XDECREF(__pyx_t_1);
9573  __Pyx_XDECREF(__pyx_t_3);
9574  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9575  __pyx_r = NULL;
9576  __pyx_L0:;
9577  __Pyx_XGIVEREF(__pyx_r);
9578  __Pyx_RefNannyFinishContext();
9579  return __pyx_r;
9580  }
9581 
9582  /* "PyClical.pyx":1038
9583  * return clifford().wrap( self.instance.call(grade) )
9584  *
9585  * def scalar(self): # <<<<<<<<<<<<<<
9586  * """
9587  * Scalar part.
9588  */
9589 
9590  /* Python wrapper */
9591  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9592  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 ";
9593  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9594  PyObject *__pyx_r = 0;
9595  __Pyx_RefNannyDeclarations
9596  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9597  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9598 
9599  /* function exit code */
9600  __Pyx_RefNannyFinishContext();
9601  return __pyx_r;
9602  }
9603 
9604  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9605  PyObject *__pyx_r = NULL;
9606  __Pyx_RefNannyDeclarations
9607  PyObject *__pyx_t_1 = NULL;
9608  __Pyx_RefNannySetupContext("scalar", 0);
9609 
9610  /* "PyClical.pyx":1047
9611  * 0.0
9612  * """
9613  * return self.instance.scalar() # <<<<<<<<<<<<<<
9614  *
9615  * def pure(self):
9616  */
9617  __Pyx_XDECREF(__pyx_r);
9618  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9619  __Pyx_GOTREF(__pyx_t_1);
9620  __pyx_r = __pyx_t_1;
9621  __pyx_t_1 = 0;
9622  goto __pyx_L0;
9623 
9624  /* "PyClical.pyx":1038
9625  * return clifford().wrap( self.instance.call(grade) )
9626  *
9627  * def scalar(self): # <<<<<<<<<<<<<<
9628  * """
9629  * Scalar part.
9630  */
9631 
9632  /* function exit code */
9633  __pyx_L1_error:;
9634  __Pyx_XDECREF(__pyx_t_1);
9635  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9636  __pyx_r = NULL;
9637  __pyx_L0:;
9638  __Pyx_XGIVEREF(__pyx_r);
9639  __Pyx_RefNannyFinishContext();
9640  return __pyx_r;
9641  }
9642 
9643  /* "PyClical.pyx":1049
9644  * return self.instance.scalar()
9645  *
9646  * def pure(self): # <<<<<<<<<<<<<<
9647  * """
9648  * Pure part.
9649  */
9650 
9651  /* Python wrapper */
9652  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9653  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 ";
9654  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9655  PyObject *__pyx_r = 0;
9656  __Pyx_RefNannyDeclarations
9657  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9658  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9659 
9660  /* function exit code */
9661  __Pyx_RefNannyFinishContext();
9662  return __pyx_r;
9663  }
9664 
9665  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9666  PyObject *__pyx_r = NULL;
9667  __Pyx_RefNannyDeclarations
9668  PyObject *__pyx_t_1 = NULL;
9669  PyObject *__pyx_t_2 = NULL;
9670  __Pyx_RefNannySetupContext("pure", 0);
9671 
9672  /* "PyClical.pyx":1058
9673  * {1,2}
9674  * """
9675  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9676  *
9677  * def even(self):
9678  */
9679  __Pyx_XDECREF(__pyx_r);
9680  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
9681  __Pyx_GOTREF(__pyx_t_1);
9682  __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)
9683  __Pyx_GOTREF(__pyx_t_2);
9684  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9685  __pyx_r = __pyx_t_2;
9686  __pyx_t_2 = 0;
9687  goto __pyx_L0;
9688 
9689  /* "PyClical.pyx":1049
9690  * return self.instance.scalar()
9691  *
9692  * def pure(self): # <<<<<<<<<<<<<<
9693  * """
9694  * Pure part.
9695  */
9696 
9697  /* function exit code */
9698  __pyx_L1_error:;
9699  __Pyx_XDECREF(__pyx_t_1);
9700  __Pyx_XDECREF(__pyx_t_2);
9701  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9702  __pyx_r = NULL;
9703  __pyx_L0:;
9704  __Pyx_XGIVEREF(__pyx_r);
9705  __Pyx_RefNannyFinishContext();
9706  return __pyx_r;
9707  }
9708 
9709  /* "PyClical.pyx":1060
9710  * return clifford().wrap( self.instance.pure() )
9711  *
9712  * def even(self): # <<<<<<<<<<<<<<
9713  * """
9714  * Even part of multivector, sum of even grade terms.
9715  */
9716 
9717  /* Python wrapper */
9718  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9719  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 ";
9720  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9721  PyObject *__pyx_r = 0;
9722  __Pyx_RefNannyDeclarations
9723  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9724  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9725 
9726  /* function exit code */
9727  __Pyx_RefNannyFinishContext();
9728  return __pyx_r;
9729  }
9730 
9731  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9732  PyObject *__pyx_r = NULL;
9733  __Pyx_RefNannyDeclarations
9734  PyObject *__pyx_t_1 = NULL;
9735  PyObject *__pyx_t_2 = NULL;
9736  __Pyx_RefNannySetupContext("even", 0);
9737 
9738  /* "PyClical.pyx":1067
9739  * 1+{1,2}
9740  * """
9741  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9742  *
9743  * def odd(self):
9744  */
9745  __Pyx_XDECREF(__pyx_r);
9746  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
9747  __Pyx_GOTREF(__pyx_t_1);
9748  __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)
9749  __Pyx_GOTREF(__pyx_t_2);
9750  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9751  __pyx_r = __pyx_t_2;
9752  __pyx_t_2 = 0;
9753  goto __pyx_L0;
9754 
9755  /* "PyClical.pyx":1060
9756  * return clifford().wrap( self.instance.pure() )
9757  *
9758  * def even(self): # <<<<<<<<<<<<<<
9759  * """
9760  * Even part of multivector, sum of even grade terms.
9761  */
9762 
9763  /* function exit code */
9764  __pyx_L1_error:;
9765  __Pyx_XDECREF(__pyx_t_1);
9766  __Pyx_XDECREF(__pyx_t_2);
9767  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9768  __pyx_r = NULL;
9769  __pyx_L0:;
9770  __Pyx_XGIVEREF(__pyx_r);
9771  __Pyx_RefNannyFinishContext();
9772  return __pyx_r;
9773  }
9774 
9775  /* "PyClical.pyx":1069
9776  * return clifford().wrap( self.instance.even() )
9777  *
9778  * def odd(self): # <<<<<<<<<<<<<<
9779  * """
9780  * Odd part of multivector, sum of odd grade terms.
9781  */
9782 
9783  /* Python wrapper */
9784  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9785  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 ";
9786  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9787  PyObject *__pyx_r = 0;
9788  __Pyx_RefNannyDeclarations
9789  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9790  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9791 
9792  /* function exit code */
9793  __Pyx_RefNannyFinishContext();
9794  return __pyx_r;
9795  }
9796 
9797  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9798  PyObject *__pyx_r = NULL;
9799  __Pyx_RefNannyDeclarations
9800  PyObject *__pyx_t_1 = NULL;
9801  PyObject *__pyx_t_2 = NULL;
9802  __Pyx_RefNannySetupContext("odd", 0);
9803 
9804  /* "PyClical.pyx":1076
9805  * {1}
9806  * """
9807  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9808  *
9809  * def vector_part(self, frm = None):
9810  */
9811  __Pyx_XDECREF(__pyx_r);
9812  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
9813  __Pyx_GOTREF(__pyx_t_1);
9814  __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)
9815  __Pyx_GOTREF(__pyx_t_2);
9816  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9817  __pyx_r = __pyx_t_2;
9818  __pyx_t_2 = 0;
9819  goto __pyx_L0;
9820 
9821  /* "PyClical.pyx":1069
9822  * return clifford().wrap( self.instance.even() )
9823  *
9824  * def odd(self): # <<<<<<<<<<<<<<
9825  * """
9826  * Odd part of multivector, sum of odd grade terms.
9827  */
9828 
9829  /* function exit code */
9830  __pyx_L1_error:;
9831  __Pyx_XDECREF(__pyx_t_1);
9832  __Pyx_XDECREF(__pyx_t_2);
9833  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9834  __pyx_r = NULL;
9835  __pyx_L0:;
9836  __Pyx_XGIVEREF(__pyx_r);
9837  __Pyx_RefNannyFinishContext();
9838  return __pyx_r;
9839  }
9840 
9841  /* "PyClical.pyx":1078
9842  * return clifford().wrap( self.instance.odd() )
9843  *
9844  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9845  * """
9846  * Vector part of multivector, as a Python list, with respect to frm.
9847  */
9848 
9849  /* Python wrapper */
9850  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9851  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 ";
9852  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9853  PyObject *__pyx_v_frm = 0;
9854  PyObject *__pyx_r = 0;
9855  __Pyx_RefNannyDeclarations
9856  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9857  {
9858  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9859  PyObject* values[1] = {0};
9860  values[0] = ((PyObject *)Py_None);
9861  if (unlikely(__pyx_kwds)) {
9862  Py_ssize_t kw_args;
9863  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9864  switch (pos_args) {
9865  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9866  CYTHON_FALLTHROUGH;
9867  case 0: break;
9868  default: goto __pyx_L5_argtuple_error;
9869  }
9870  kw_args = PyDict_Size(__pyx_kwds);
9871  switch (pos_args) {
9872  case 0:
9873  if (kw_args > 0) {
9874  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
9875  if (value) { values[0] = value; kw_args--; }
9876  }
9877  }
9878  if (unlikely(kw_args > 0)) {
9879  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9880  }
9881  } else {
9882  switch (PyTuple_GET_SIZE(__pyx_args)) {
9883  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9884  CYTHON_FALLTHROUGH;
9885  case 0: break;
9886  default: goto __pyx_L5_argtuple_error;
9887  }
9888  }
9889  __pyx_v_frm = values[0];
9890  }
9891  goto __pyx_L4_argument_unpacking_done;
9892  __pyx_L5_argtuple_error:;
9893  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9894  __pyx_L3_error:;
9895  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9896  __Pyx_RefNannyFinishContext();
9897  return NULL;
9898  __pyx_L4_argument_unpacking_done:;
9899  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9900 
9901  /* function exit code */
9902  __Pyx_RefNannyFinishContext();
9903  return __pyx_r;
9904  }
9905 
9906  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9907  PyObject *__pyx_v_error_msg_prefix = NULL;
9908  std::vector<scalar_t> __pyx_v_vec;
9909  int __pyx_v_n;
9910  int __pyx_v_i;
9911  PyObject *__pyx_v_lst = NULL;
9912  PyObject *__pyx_v_err = NULL;
9913  PyObject *__pyx_r = NULL;
9914  __Pyx_RefNannyDeclarations
9915  PyObject *__pyx_t_1 = NULL;
9916  PyObject *__pyx_t_2 = NULL;
9917  PyObject *__pyx_t_3 = NULL;
9918  int __pyx_t_4;
9919  int __pyx_t_5;
9920  std::vector<scalar_t> __pyx_t_6;
9921  PyObject *__pyx_t_7 = NULL;
9922  int __pyx_t_8;
9923  int __pyx_t_9;
9924  int __pyx_t_10;
9925  PyObject *__pyx_t_11 = NULL;
9926  PyObject *__pyx_t_12 = NULL;
9927  PyObject *__pyx_t_13 = NULL;
9928  PyObject *__pyx_t_14 = NULL;
9929  PyObject *__pyx_t_15 = NULL;
9930  __Pyx_RefNannySetupContext("vector_part", 0);
9931 
9932  /* "PyClical.pyx":1087
9933  * [0.0, 2.0, 3.0]
9934  * """
9935  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9936  * cdef vector[scalar_t] vec
9937  * cdef int n
9938  */
9939  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9940  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9941 
9942  /* "PyClical.pyx":1091
9943  * cdef int n
9944  * cdef int i
9945  * try: # <<<<<<<<<<<<<<
9946  * if frm is None:
9947  * vec = self.instance.vector_part()
9948  */
9949  {
9950  __Pyx_PyThreadState_declare
9951  __Pyx_PyThreadState_assign
9952  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9953  __Pyx_XGOTREF(__pyx_t_1);
9954  __Pyx_XGOTREF(__pyx_t_2);
9955  __Pyx_XGOTREF(__pyx_t_3);
9956  /*try:*/ {
9957 
9958  /* "PyClical.pyx":1092
9959  * cdef int i
9960  * try:
9961  * if frm is None: # <<<<<<<<<<<<<<
9962  * vec = self.instance.vector_part()
9963  * else:
9964  */
9965  __pyx_t_4 = (__pyx_v_frm == Py_None);
9966  __pyx_t_5 = (__pyx_t_4 != 0);
9967  if (__pyx_t_5) {
9968 
9969  /* "PyClical.pyx":1093
9970  * try:
9971  * if frm is None:
9972  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
9973  * else:
9974  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9975  */
9976  __pyx_t_6 = __pyx_v_self->instance->vector_part();
9977  __pyx_v_vec = __pyx_t_6;
9978 
9979  /* "PyClical.pyx":1092
9980  * cdef int i
9981  * try:
9982  * if frm is None: # <<<<<<<<<<<<<<
9983  * vec = self.instance.vector_part()
9984  * else:
9985  */
9986  goto __pyx_L9;
9987  }
9988 
9989  /* "PyClical.pyx":1095
9990  * vec = self.instance.vector_part()
9991  * else:
9992  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
9993  * n = vec.size()
9994  * lst = [0.0]*n
9995  */
9996  /*else*/ {
9997  try {
9998  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9999  } catch(...) {
10000  __Pyx_CppExn2PyErr();
10001  __PYX_ERR(0, 1095, __pyx_L3_error)
10002  }
10003  __pyx_v_vec = __pyx_t_6;
10004  }
10005  __pyx_L9:;
10006 
10007  /* "PyClical.pyx":1096
10008  * else:
10009  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10010  * n = vec.size() # <<<<<<<<<<<<<<
10011  * lst = [0.0]*n
10012  * for i in xrange(n):
10013  */
10014  __pyx_v_n = __pyx_v_vec.size();
10015 
10016  /* "PyClical.pyx":1097
10017  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10018  * n = vec.size()
10019  * lst = [0.0]*n # <<<<<<<<<<<<<<
10020  * for i in xrange(n):
10021  * lst[i] = vec[i]
10022  */
10023  __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)
10024  __Pyx_GOTREF(__pyx_t_7);
10025  { Py_ssize_t __pyx_temp;
10026  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10027  __Pyx_INCREF(__pyx_float_0_0);
10028  __Pyx_GIVEREF(__pyx_float_0_0);
10029  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10030  }
10031  }
10032  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10033  __pyx_t_7 = 0;
10034 
10035  /* "PyClical.pyx":1098
10036  * n = vec.size()
10037  * lst = [0.0]*n
10038  * for i in xrange(n): # <<<<<<<<<<<<<<
10039  * lst[i] = vec[i]
10040  * return lst
10041  */
10042  __pyx_t_8 = __pyx_v_n;
10043  __pyx_t_9 = __pyx_t_8;
10044  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10045  __pyx_v_i = __pyx_t_10;
10046 
10047  /* "PyClical.pyx":1099
10048  * lst = [0.0]*n
10049  * for i in xrange(n):
10050  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10051  * return lst
10052  * except RuntimeError as err:
10053  */
10054  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
10055  __Pyx_GOTREF(__pyx_t_7);
10056  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)
10057  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10058  }
10059 
10060  /* "PyClical.pyx":1100
10061  * for i in xrange(n):
10062  * lst[i] = vec[i]
10063  * return lst # <<<<<<<<<<<<<<
10064  * except RuntimeError as err:
10065  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10066  */
10067  __Pyx_XDECREF(__pyx_r);
10068  __Pyx_INCREF(__pyx_v_lst);
10069  __pyx_r = __pyx_v_lst;
10070  goto __pyx_L7_try_return;
10071 
10072  /* "PyClical.pyx":1091
10073  * cdef int n
10074  * cdef int i
10075  * try: # <<<<<<<<<<<<<<
10076  * if frm is None:
10077  * vec = self.instance.vector_part()
10078  */
10079  }
10080  __pyx_L3_error:;
10081  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10082 
10083  /* "PyClical.pyx":1101
10084  * lst[i] = vec[i]
10085  * return lst
10086  * except RuntimeError as err: # <<<<<<<<<<<<<<
10087  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10088  * + repr(frm) + " as frame:\n\t"
10089  */
10090  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10091  if (__pyx_t_8) {
10092  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10093  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10094  __Pyx_GOTREF(__pyx_t_7);
10095  __Pyx_GOTREF(__pyx_t_11);
10096  __Pyx_GOTREF(__pyx_t_12);
10097  __Pyx_INCREF(__pyx_t_11);
10098  __pyx_v_err = __pyx_t_11;
10099 
10100  /* "PyClical.pyx":1102
10101  * return lst
10102  * except RuntimeError as err:
10103  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10104  * + repr(frm) + " as frame:\n\t"
10105  * + str(err))
10106  */
10107  __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)
10108  __Pyx_GOTREF(__pyx_t_13);
10109  __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)
10110  __Pyx_GOTREF(__pyx_t_14);
10111  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10112  __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)
10113  __Pyx_GOTREF(__pyx_t_13);
10114  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10115 
10116  /* "PyClical.pyx":1103
10117  * except RuntimeError as err:
10118  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10119  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10120  * + str(err))
10121  *
10122  */
10123  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10124  __Pyx_GOTREF(__pyx_t_14);
10125  __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10126  __Pyx_GOTREF(__pyx_t_15);
10127  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10128  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10129  __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)
10130  __Pyx_GOTREF(__pyx_t_14);
10131  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10132 
10133  /* "PyClical.pyx":1104
10134  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10135  * + repr(frm) + " as frame:\n\t"
10136  * + str(err)) # <<<<<<<<<<<<<<
10137  *
10138  * def involute(self):
10139  */
10140  __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)
10141  __Pyx_GOTREF(__pyx_t_15);
10142  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10143  __Pyx_GOTREF(__pyx_t_13);
10144  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10145  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10146 
10147  /* "PyClical.pyx":1102
10148  * return lst
10149  * except RuntimeError as err:
10150  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10151  * + repr(frm) + " as frame:\n\t"
10152  * + str(err))
10153  */
10154  __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)
10155  __Pyx_GOTREF(__pyx_t_15);
10156  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10157  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10158  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10159  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10160  }
10161  goto __pyx_L5_except_error;
10162  __pyx_L5_except_error:;
10163 
10164  /* "PyClical.pyx":1091
10165  * cdef int n
10166  * cdef int i
10167  * try: # <<<<<<<<<<<<<<
10168  * if frm is None:
10169  * vec = self.instance.vector_part()
10170  */
10171  __Pyx_XGIVEREF(__pyx_t_1);
10172  __Pyx_XGIVEREF(__pyx_t_2);
10173  __Pyx_XGIVEREF(__pyx_t_3);
10174  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10175  goto __pyx_L1_error;
10176  __pyx_L7_try_return:;
10177  __Pyx_XGIVEREF(__pyx_t_1);
10178  __Pyx_XGIVEREF(__pyx_t_2);
10179  __Pyx_XGIVEREF(__pyx_t_3);
10180  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10181  goto __pyx_L0;
10182  }
10183 
10184  /* "PyClical.pyx":1078
10185  * return clifford().wrap( self.instance.odd() )
10186  *
10187  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10188  * """
10189  * Vector part of multivector, as a Python list, with respect to frm.
10190  */
10191 
10192  /* function exit code */
10193  __pyx_L1_error:;
10194  __Pyx_XDECREF(__pyx_t_7);
10195  __Pyx_XDECREF(__pyx_t_11);
10196  __Pyx_XDECREF(__pyx_t_12);
10197  __Pyx_XDECREF(__pyx_t_13);
10198  __Pyx_XDECREF(__pyx_t_14);
10199  __Pyx_XDECREF(__pyx_t_15);
10200  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10201  __pyx_r = NULL;
10202  __pyx_L0:;
10203  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10204  __Pyx_XDECREF(__pyx_v_lst);
10205  __Pyx_XDECREF(__pyx_v_err);
10206  __Pyx_XGIVEREF(__pyx_r);
10207  __Pyx_RefNannyFinishContext();
10208  return __pyx_r;
10209  }
10210 
10211  /* "PyClical.pyx":1106
10212  * + str(err))
10213  *
10214  * def involute(self): # <<<<<<<<<<<<<<
10215  * """
10216  * Main involution, each {i} is replaced by -{i} in each term,
10217  */
10218 
10219  /* Python wrapper */
10220  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10221  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 ";
10222  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10223  PyObject *__pyx_r = 0;
10224  __Pyx_RefNannyDeclarations
10225  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10226  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10227 
10228  /* function exit code */
10229  __Pyx_RefNannyFinishContext();
10230  return __pyx_r;
10231  }
10232 
10233  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10234  PyObject *__pyx_r = NULL;
10235  __Pyx_RefNannyDeclarations
10236  PyObject *__pyx_t_1 = NULL;
10237  PyObject *__pyx_t_2 = NULL;
10238  __Pyx_RefNannySetupContext("involute", 0);
10239 
10240  /* "PyClical.pyx":1120
10241  * 1-{1}+{1,2}
10242  * """
10243  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10244  *
10245  * def reverse(self):
10246  */
10247  __Pyx_XDECREF(__pyx_r);
10248  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
10249  __Pyx_GOTREF(__pyx_t_1);
10250  __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)
10251  __Pyx_GOTREF(__pyx_t_2);
10252  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10253  __pyx_r = __pyx_t_2;
10254  __pyx_t_2 = 0;
10255  goto __pyx_L0;
10256 
10257  /* "PyClical.pyx":1106
10258  * + str(err))
10259  *
10260  * def involute(self): # <<<<<<<<<<<<<<
10261  * """
10262  * Main involution, each {i} is replaced by -{i} in each term,
10263  */
10264 
10265  /* function exit code */
10266  __pyx_L1_error:;
10267  __Pyx_XDECREF(__pyx_t_1);
10268  __Pyx_XDECREF(__pyx_t_2);
10269  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10270  __pyx_r = NULL;
10271  __pyx_L0:;
10272  __Pyx_XGIVEREF(__pyx_r);
10273  __Pyx_RefNannyFinishContext();
10274  return __pyx_r;
10275  }
10276 
10277  /* "PyClical.pyx":1122
10278  * return clifford().wrap( self.instance.involute() )
10279  *
10280  * def reverse(self): # <<<<<<<<<<<<<<
10281  * """
10282  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10283  */
10284 
10285  /* Python wrapper */
10286  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10287  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 ";
10288  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10289  PyObject *__pyx_r = 0;
10290  __Pyx_RefNannyDeclarations
10291  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10292  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10293 
10294  /* function exit code */
10295  __Pyx_RefNannyFinishContext();
10296  return __pyx_r;
10297  }
10298 
10299  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10300  PyObject *__pyx_r = NULL;
10301  __Pyx_RefNannyDeclarations
10302  PyObject *__pyx_t_1 = NULL;
10303  PyObject *__pyx_t_2 = NULL;
10304  __Pyx_RefNannySetupContext("reverse", 0);
10305 
10306  /* "PyClical.pyx":1135
10307  * 1+{1}-{1,2}
10308  * """
10309  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10310  *
10311  * def conj(self):
10312  */
10313  __Pyx_XDECREF(__pyx_r);
10314  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
10315  __Pyx_GOTREF(__pyx_t_1);
10316  __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)
10317  __Pyx_GOTREF(__pyx_t_2);
10318  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10319  __pyx_r = __pyx_t_2;
10320  __pyx_t_2 = 0;
10321  goto __pyx_L0;
10322 
10323  /* "PyClical.pyx":1122
10324  * return clifford().wrap( self.instance.involute() )
10325  *
10326  * def reverse(self): # <<<<<<<<<<<<<<
10327  * """
10328  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10329  */
10330 
10331  /* function exit code */
10332  __pyx_L1_error:;
10333  __Pyx_XDECREF(__pyx_t_1);
10334  __Pyx_XDECREF(__pyx_t_2);
10335  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10336  __pyx_r = NULL;
10337  __pyx_L0:;
10338  __Pyx_XGIVEREF(__pyx_r);
10339  __Pyx_RefNannyFinishContext();
10340  return __pyx_r;
10341  }
10342 
10343  /* "PyClical.pyx":1137
10344  * return clifford().wrap( self.instance.reverse() )
10345  *
10346  * def conj(self): # <<<<<<<<<<<<<<
10347  * """
10348  * Conjugation, reverse o involute == involute o reverse.
10349  */
10350 
10351  /* Python wrapper */
10352  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10353  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 ";
10354  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10355  PyObject *__pyx_r = 0;
10356  __Pyx_RefNannyDeclarations
10357  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10358  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10359 
10360  /* function exit code */
10361  __Pyx_RefNannyFinishContext();
10362  return __pyx_r;
10363  }
10364 
10365  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10366  PyObject *__pyx_r = NULL;
10367  __Pyx_RefNannyDeclarations
10368  PyObject *__pyx_t_1 = NULL;
10369  PyObject *__pyx_t_2 = NULL;
10370  __Pyx_RefNannySetupContext("conj", 0);
10371 
10372  /* "PyClical.pyx":1150
10373  * 1-{1}-{1,2}
10374  * """
10375  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10376  *
10377  * def quad(self):
10378  */
10379  __Pyx_XDECREF(__pyx_r);
10380  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
10381  __Pyx_GOTREF(__pyx_t_1);
10382  __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)
10383  __Pyx_GOTREF(__pyx_t_2);
10384  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10385  __pyx_r = __pyx_t_2;
10386  __pyx_t_2 = 0;
10387  goto __pyx_L0;
10388 
10389  /* "PyClical.pyx":1137
10390  * return clifford().wrap( self.instance.reverse() )
10391  *
10392  * def conj(self): # <<<<<<<<<<<<<<
10393  * """
10394  * Conjugation, reverse o involute == involute o reverse.
10395  */
10396 
10397  /* function exit code */
10398  __pyx_L1_error:;
10399  __Pyx_XDECREF(__pyx_t_1);
10400  __Pyx_XDECREF(__pyx_t_2);
10401  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10402  __pyx_r = NULL;
10403  __pyx_L0:;
10404  __Pyx_XGIVEREF(__pyx_r);
10405  __Pyx_RefNannyFinishContext();
10406  return __pyx_r;
10407  }
10408 
10409  /* "PyClical.pyx":1152
10410  * return clifford().wrap( self.instance.conj() )
10411  *
10412  * def quad(self): # <<<<<<<<<<<<<<
10413  * """
10414  * Quadratic form == (rev(x)*x)(0).
10415  */
10416 
10417  /* Python wrapper */
10418  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10419  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 ";
10420  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10421  PyObject *__pyx_r = 0;
10422  __Pyx_RefNannyDeclarations
10423  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10424  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10425 
10426  /* function exit code */
10427  __Pyx_RefNannyFinishContext();
10428  return __pyx_r;
10429  }
10430 
10431  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10432  PyObject *__pyx_r = NULL;
10433  __Pyx_RefNannyDeclarations
10434  PyObject *__pyx_t_1 = NULL;
10435  __Pyx_RefNannySetupContext("quad", 0);
10436 
10437  /* "PyClical.pyx":1161
10438  * 2.0
10439  * """
10440  * return self.instance.quad() # <<<<<<<<<<<<<<
10441  *
10442  * def norm(self):
10443  */
10444  __Pyx_XDECREF(__pyx_r);
10445  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10446  __Pyx_GOTREF(__pyx_t_1);
10447  __pyx_r = __pyx_t_1;
10448  __pyx_t_1 = 0;
10449  goto __pyx_L0;
10450 
10451  /* "PyClical.pyx":1152
10452  * return clifford().wrap( self.instance.conj() )
10453  *
10454  * def quad(self): # <<<<<<<<<<<<<<
10455  * """
10456  * Quadratic form == (rev(x)*x)(0).
10457  */
10458 
10459  /* function exit code */
10460  __pyx_L1_error:;
10461  __Pyx_XDECREF(__pyx_t_1);
10462  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10463  __pyx_r = NULL;
10464  __pyx_L0:;
10465  __Pyx_XGIVEREF(__pyx_r);
10466  __Pyx_RefNannyFinishContext();
10467  return __pyx_r;
10468  }
10469 
10470  /* "PyClical.pyx":1163
10471  * return self.instance.quad()
10472  *
10473  * def norm(self): # <<<<<<<<<<<<<<
10474  * """
10475  * Norm == sum of squares of coordinates.
10476  */
10477 
10478  /* Python wrapper */
10479  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10480  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 ";
10481  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10482  PyObject *__pyx_r = 0;
10483  __Pyx_RefNannyDeclarations
10484  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10485  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10486 
10487  /* function exit code */
10488  __Pyx_RefNannyFinishContext();
10489  return __pyx_r;
10490  }
10491 
10492  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10493  PyObject *__pyx_r = NULL;
10494  __Pyx_RefNannyDeclarations
10495  PyObject *__pyx_t_1 = NULL;
10496  __Pyx_RefNannySetupContext("norm", 0);
10497 
10498  /* "PyClical.pyx":1172
10499  * 4.0
10500  * """
10501  * return self.instance.norm() # <<<<<<<<<<<<<<
10502  *
10503  * def abs(self):
10504  */
10505  __Pyx_XDECREF(__pyx_r);
10506  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10507  __Pyx_GOTREF(__pyx_t_1);
10508  __pyx_r = __pyx_t_1;
10509  __pyx_t_1 = 0;
10510  goto __pyx_L0;
10511 
10512  /* "PyClical.pyx":1163
10513  * return self.instance.quad()
10514  *
10515  * def norm(self): # <<<<<<<<<<<<<<
10516  * """
10517  * Norm == sum of squares of coordinates.
10518  */
10519 
10520  /* function exit code */
10521  __pyx_L1_error:;
10522  __Pyx_XDECREF(__pyx_t_1);
10523  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10524  __pyx_r = NULL;
10525  __pyx_L0:;
10526  __Pyx_XGIVEREF(__pyx_r);
10527  __Pyx_RefNannyFinishContext();
10528  return __pyx_r;
10529  }
10530 
10531  /* "PyClical.pyx":1174
10532  * return self.instance.norm()
10533  *
10534  * def abs(self): # <<<<<<<<<<<<<<
10535  * """
10536  * Absolute value: square root of norm.
10537  */
10538 
10539  /* Python wrapper */
10540  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10541  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 ";
10542  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10543  PyObject *__pyx_r = 0;
10544  __Pyx_RefNannyDeclarations
10545  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10546  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10547 
10548  /* function exit code */
10549  __Pyx_RefNannyFinishContext();
10550  return __pyx_r;
10551  }
10552 
10553  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10554  PyObject *__pyx_r = NULL;
10555  __Pyx_RefNannyDeclarations
10556  PyObject *__pyx_t_1 = NULL;
10557  __Pyx_RefNannySetupContext("abs", 0);
10558 
10559  /* "PyClical.pyx":1181
10560  * 2.0
10561  * """
10562  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10563  *
10564  * def max_abs(self):
10565  */
10566  __Pyx_XDECREF(__pyx_r);
10567  __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)
10568  __Pyx_GOTREF(__pyx_t_1);
10569  __pyx_r = __pyx_t_1;
10570  __pyx_t_1 = 0;
10571  goto __pyx_L0;
10572 
10573  /* "PyClical.pyx":1174
10574  * return self.instance.norm()
10575  *
10576  * def abs(self): # <<<<<<<<<<<<<<
10577  * """
10578  * Absolute value: square root of norm.
10579  */
10580 
10581  /* function exit code */
10582  __pyx_L1_error:;
10583  __Pyx_XDECREF(__pyx_t_1);
10584  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10585  __pyx_r = NULL;
10586  __pyx_L0:;
10587  __Pyx_XGIVEREF(__pyx_r);
10588  __Pyx_RefNannyFinishContext();
10589  return __pyx_r;
10590  }
10591 
10592  /* "PyClical.pyx":1183
10593  * return glucat.abs( self.unwrap() )
10594  *
10595  * def max_abs(self): # <<<<<<<<<<<<<<
10596  * """
10597  * Maximum of absolute values of components of multivector: multivector infinity norm.
10598  */
10599 
10600  /* Python wrapper */
10601  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10602  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 ";
10603  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10604  PyObject *__pyx_r = 0;
10605  __Pyx_RefNannyDeclarations
10606  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10607  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10608 
10609  /* function exit code */
10610  __Pyx_RefNannyFinishContext();
10611  return __pyx_r;
10612  }
10613 
10614  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10615  PyObject *__pyx_r = NULL;
10616  __Pyx_RefNannyDeclarations
10617  PyObject *__pyx_t_1 = NULL;
10618  __Pyx_RefNannySetupContext("max_abs", 0);
10619 
10620  /* "PyClical.pyx":1192
10621  * 3.0
10622  * """
10623  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10624  *
10625  * def truncated(self, limit):
10626  */
10627  __Pyx_XDECREF(__pyx_r);
10628  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10629  __Pyx_GOTREF(__pyx_t_1);
10630  __pyx_r = __pyx_t_1;
10631  __pyx_t_1 = 0;
10632  goto __pyx_L0;
10633 
10634  /* "PyClical.pyx":1183
10635  * return glucat.abs( self.unwrap() )
10636  *
10637  * def max_abs(self): # <<<<<<<<<<<<<<
10638  * """
10639  * Maximum of absolute values of components of multivector: multivector infinity norm.
10640  */
10641 
10642  /* function exit code */
10643  __pyx_L1_error:;
10644  __Pyx_XDECREF(__pyx_t_1);
10645  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10646  __pyx_r = NULL;
10647  __pyx_L0:;
10648  __Pyx_XGIVEREF(__pyx_r);
10649  __Pyx_RefNannyFinishContext();
10650  return __pyx_r;
10651  }
10652 
10653  /* "PyClical.pyx":1194
10654  * return self.instance.max_abs()
10655  *
10656  * def truncated(self, limit): # <<<<<<<<<<<<<<
10657  * """
10658  * Remove all terms of self with relative size smaller than limit.
10659  */
10660 
10661  /* Python wrapper */
10662  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10663  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 ";
10664  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10665  PyObject *__pyx_r = 0;
10666  __Pyx_RefNannyDeclarations
10667  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10668  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10669 
10670  /* function exit code */
10671  __Pyx_RefNannyFinishContext();
10672  return __pyx_r;
10673  }
10674 
10675  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10676  PyObject *__pyx_r = NULL;
10677  __Pyx_RefNannyDeclarations
10678  PyObject *__pyx_t_1 = NULL;
10679  scalar_t __pyx_t_2;
10680  PyObject *__pyx_t_3 = NULL;
10681  __Pyx_RefNannySetupContext("truncated", 0);
10682 
10683  /* "PyClical.pyx":1203
10684  * clifford("10000+{1}")
10685  * """
10686  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10687  *
10688  * def isnan(self):
10689  */
10690  __Pyx_XDECREF(__pyx_r);
10691  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
10692  __Pyx_GOTREF(__pyx_t_1);
10693  __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)
10694  __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)
10695  __Pyx_GOTREF(__pyx_t_3);
10696  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10697  __pyx_r = __pyx_t_3;
10698  __pyx_t_3 = 0;
10699  goto __pyx_L0;
10700 
10701  /* "PyClical.pyx":1194
10702  * return self.instance.max_abs()
10703  *
10704  * def truncated(self, limit): # <<<<<<<<<<<<<<
10705  * """
10706  * Remove all terms of self with relative size smaller than limit.
10707  */
10708 
10709  /* function exit code */
10710  __pyx_L1_error:;
10711  __Pyx_XDECREF(__pyx_t_1);
10712  __Pyx_XDECREF(__pyx_t_3);
10713  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10714  __pyx_r = NULL;
10715  __pyx_L0:;
10716  __Pyx_XGIVEREF(__pyx_r);
10717  __Pyx_RefNannyFinishContext();
10718  return __pyx_r;
10719  }
10720 
10721  /* "PyClical.pyx":1205
10722  * return clifford().wrap( self.instance.truncated(limit) )
10723  *
10724  * def isnan(self): # <<<<<<<<<<<<<<
10725  * """
10726  * Check if a multivector contains any IEEE NaN values.
10727  */
10728 
10729  /* Python wrapper */
10730  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10731  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10732  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10733  PyObject *__pyx_r = 0;
10734  __Pyx_RefNannyDeclarations
10735  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10736  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10737 
10738  /* function exit code */
10739  __Pyx_RefNannyFinishContext();
10740  return __pyx_r;
10741  }
10742 
10743  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10744  PyObject *__pyx_r = NULL;
10745  __Pyx_RefNannyDeclarations
10746  PyObject *__pyx_t_1 = NULL;
10747  __Pyx_RefNannySetupContext("isnan", 0);
10748 
10749  /* "PyClical.pyx":1212
10750  * False
10751  * """
10752  * return self.instance.isnan() # <<<<<<<<<<<<<<
10753  *
10754  * def frame(self):
10755  */
10756  __Pyx_XDECREF(__pyx_r);
10757  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10758  __Pyx_GOTREF(__pyx_t_1);
10759  __pyx_r = __pyx_t_1;
10760  __pyx_t_1 = 0;
10761  goto __pyx_L0;
10762 
10763  /* "PyClical.pyx":1205
10764  * return clifford().wrap( self.instance.truncated(limit) )
10765  *
10766  * def isnan(self): # <<<<<<<<<<<<<<
10767  * """
10768  * Check if a multivector contains any IEEE NaN values.
10769  */
10770 
10771  /* function exit code */
10772  __pyx_L1_error:;
10773  __Pyx_XDECREF(__pyx_t_1);
10774  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10775  __pyx_r = NULL;
10776  __pyx_L0:;
10777  __Pyx_XGIVEREF(__pyx_r);
10778  __Pyx_RefNannyFinishContext();
10779  return __pyx_r;
10780  }
10781 
10782  /* "PyClical.pyx":1214
10783  * return self.instance.isnan()
10784  *
10785  * def frame(self): # <<<<<<<<<<<<<<
10786  * """
10787  * Subalgebra generated by all generators of terms of given multivector.
10788  */
10789 
10790  /* Python wrapper */
10791  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10792  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 ";
10793  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10794  PyObject *__pyx_r = 0;
10795  __Pyx_RefNannyDeclarations
10796  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10797  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10798 
10799  /* function exit code */
10800  __Pyx_RefNannyFinishContext();
10801  return __pyx_r;
10802  }
10803 
10804  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10805  PyObject *__pyx_r = NULL;
10806  __Pyx_RefNannyDeclarations
10807  PyObject *__pyx_t_1 = NULL;
10808  PyObject *__pyx_t_2 = NULL;
10809  __Pyx_RefNannySetupContext("frame", 0);
10810 
10811  /* "PyClical.pyx":1223
10812  * <type 'PyClical.index_set'>
10813  * """
10814  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10815  *
10816  * def __repr__(self):
10817  */
10818  __Pyx_XDECREF(__pyx_r);
10819  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
10820  __Pyx_GOTREF(__pyx_t_1);
10821  __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)
10822  __Pyx_GOTREF(__pyx_t_2);
10823  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10824  __pyx_r = __pyx_t_2;
10825  __pyx_t_2 = 0;
10826  goto __pyx_L0;
10827 
10828  /* "PyClical.pyx":1214
10829  * return self.instance.isnan()
10830  *
10831  * def frame(self): # <<<<<<<<<<<<<<
10832  * """
10833  * Subalgebra generated by all generators of terms of given multivector.
10834  */
10835 
10836  /* function exit code */
10837  __pyx_L1_error:;
10838  __Pyx_XDECREF(__pyx_t_1);
10839  __Pyx_XDECREF(__pyx_t_2);
10840  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10841  __pyx_r = NULL;
10842  __pyx_L0:;
10843  __Pyx_XGIVEREF(__pyx_r);
10844  __Pyx_RefNannyFinishContext();
10845  return __pyx_r;
10846  }
10847 
10848  /* "PyClical.pyx":1225
10849  * return index_set().wrap( self.instance.frame() )
10850  *
10851  * def __repr__(self): # <<<<<<<<<<<<<<
10852  * """
10853  * The official string representation of self.
10854  */
10855 
10856  /* Python wrapper */
10857  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10858  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 ";
10859  #if CYTHON_COMPILING_IN_CPYTHON
10860  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10861  #endif
10862  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10863  PyObject *__pyx_r = 0;
10864  __Pyx_RefNannyDeclarations
10865  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10866  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10867 
10868  /* function exit code */
10869  __Pyx_RefNannyFinishContext();
10870  return __pyx_r;
10871  }
10872 
10873  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10874  PyObject *__pyx_r = NULL;
10875  __Pyx_RefNannyDeclarations
10876  PyObject *__pyx_t_1 = NULL;
10877  __Pyx_RefNannySetupContext("__repr__", 0);
10878 
10879  /* "PyClical.pyx":1232
10880  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10881  * """
10882  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10883  *
10884  * def __str__(self):
10885  */
10886  __Pyx_XDECREF(__pyx_r);
10887  __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)
10888  __Pyx_GOTREF(__pyx_t_1);
10889  __pyx_r = __pyx_t_1;
10890  __pyx_t_1 = 0;
10891  goto __pyx_L0;
10892 
10893  /* "PyClical.pyx":1225
10894  * return index_set().wrap( self.instance.frame() )
10895  *
10896  * def __repr__(self): # <<<<<<<<<<<<<<
10897  * """
10898  * The official string representation of self.
10899  */
10900 
10901  /* function exit code */
10902  __pyx_L1_error:;
10903  __Pyx_XDECREF(__pyx_t_1);
10904  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10905  __pyx_r = NULL;
10906  __pyx_L0:;
10907  __Pyx_XGIVEREF(__pyx_r);
10908  __Pyx_RefNannyFinishContext();
10909  return __pyx_r;
10910  }
10911 
10912  /* "PyClical.pyx":1234
10913  * return clifford_to_repr( self.unwrap() ).c_str()
10914  *
10915  * def __str__(self): # <<<<<<<<<<<<<<
10916  * """
10917  * The informal string representation of self.
10918  */
10919 
10920  /* Python wrapper */
10921  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10922  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 ";
10923  #if CYTHON_COMPILING_IN_CPYTHON
10924  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10925  #endif
10926  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10927  PyObject *__pyx_r = 0;
10928  __Pyx_RefNannyDeclarations
10929  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10930  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10931 
10932  /* function exit code */
10933  __Pyx_RefNannyFinishContext();
10934  return __pyx_r;
10935  }
10936 
10937  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10938  PyObject *__pyx_r = NULL;
10939  __Pyx_RefNannyDeclarations
10940  PyObject *__pyx_t_1 = NULL;
10941  __Pyx_RefNannySetupContext("__str__", 0);
10942 
10943  /* "PyClical.pyx":1241
10944  * '1+3{-1}+2{1,2}+4{-2,7}'
10945  * """
10946  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10947  *
10948  * def clifford_hidden_doctests():
10949  */
10950  __Pyx_XDECREF(__pyx_r);
10951  __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)
10952  __Pyx_GOTREF(__pyx_t_1);
10953  __pyx_r = __pyx_t_1;
10954  __pyx_t_1 = 0;
10955  goto __pyx_L0;
10956 
10957  /* "PyClical.pyx":1234
10958  * return clifford_to_repr( self.unwrap() ).c_str()
10959  *
10960  * def __str__(self): # <<<<<<<<<<<<<<
10961  * """
10962  * The informal string representation of self.
10963  */
10964 
10965  /* function exit code */
10966  __pyx_L1_error:;
10967  __Pyx_XDECREF(__pyx_t_1);
10968  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10969  __pyx_r = NULL;
10970  __pyx_L0:;
10971  __Pyx_XGIVEREF(__pyx_r);
10972  __Pyx_RefNannyFinishContext();
10973  return __pyx_r;
10974  }
10975 
10976  /* "(tree fragment)":1
10977  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10978  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10979  * def __setstate_cython__(self, __pyx_state):
10980  */
10981 
10982  /* Python wrapper */
10983  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10984  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10985  PyObject *__pyx_r = 0;
10986  __Pyx_RefNannyDeclarations
10987  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10988  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10989 
10990  /* function exit code */
10991  __Pyx_RefNannyFinishContext();
10992  return __pyx_r;
10993  }
10994 
10995  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10996  PyObject *__pyx_r = NULL;
10997  __Pyx_RefNannyDeclarations
10998  PyObject *__pyx_t_1 = NULL;
10999  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11000 
11001  /* "(tree fragment)":2
11002  * def __reduce_cython__(self):
11003  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11004  * def __setstate_cython__(self, __pyx_state):
11005  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11006  */
11007  __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)
11008  __Pyx_GOTREF(__pyx_t_1);
11009  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11010  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11011  __PYX_ERR(1, 2, __pyx_L1_error)
11012 
11013  /* "(tree fragment)":1
11014  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11015  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11016  * def __setstate_cython__(self, __pyx_state):
11017  */
11018 
11019  /* function exit code */
11020  __pyx_L1_error:;
11021  __Pyx_XDECREF(__pyx_t_1);
11022  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11023  __pyx_r = NULL;
11024  __Pyx_XGIVEREF(__pyx_r);
11025  __Pyx_RefNannyFinishContext();
11026  return __pyx_r;
11027  }
11028 
11029  /* "(tree fragment)":3
11030  * def __reduce_cython__(self):
11031  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11032  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11033  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11034  */
11035 
11036  /* Python wrapper */
11037  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11038  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11039  PyObject *__pyx_r = 0;
11040  __Pyx_RefNannyDeclarations
11041  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11042  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11043 
11044  /* function exit code */
11045  __Pyx_RefNannyFinishContext();
11046  return __pyx_r;
11047  }
11048 
11049  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) {
11050  PyObject *__pyx_r = NULL;
11051  __Pyx_RefNannyDeclarations
11052  PyObject *__pyx_t_1 = NULL;
11053  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11054 
11055  /* "(tree fragment)":4
11056  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11057  * def __setstate_cython__(self, __pyx_state):
11058  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11059  */
11060  __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)
11061  __Pyx_GOTREF(__pyx_t_1);
11062  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11063  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11064  __PYX_ERR(1, 4, __pyx_L1_error)
11065 
11066  /* "(tree fragment)":3
11067  * def __reduce_cython__(self):
11068  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11069  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11070  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11071  */
11072 
11073  /* function exit code */
11074  __pyx_L1_error:;
11075  __Pyx_XDECREF(__pyx_t_1);
11076  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11077  __pyx_r = NULL;
11078  __Pyx_XGIVEREF(__pyx_r);
11079  __Pyx_RefNannyFinishContext();
11080  return __pyx_r;
11081  }
11082 
11083  /* "PyClical.pyx":1243
11084  * return clifford_to_str( self.unwrap() ).c_str()
11085  *
11086  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11087  * """
11088  * Tests for functions that Doctest cannot see.
11089  */
11090 
11091  /* Python wrapper */
11092  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11093  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 ";
11094  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};
11095  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11096  PyObject *__pyx_r = 0;
11097  __Pyx_RefNannyDeclarations
11098  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11099  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11100 
11101  /* function exit code */
11102  __Pyx_RefNannyFinishContext();
11103  return __pyx_r;
11104  }
11105 
11106  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11107  PyObject *__pyx_r = NULL;
11108  __Pyx_RefNannyDeclarations
11109  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11110 
11111  /* "PyClical.pyx":1327
11112  * True
11113  * """
11114  * return # <<<<<<<<<<<<<<
11115  *
11116  * cpdef inline inv(obj):
11117  */
11118  __Pyx_XDECREF(__pyx_r);
11119  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11120  goto __pyx_L0;
11121 
11122  /* "PyClical.pyx":1243
11123  * return clifford_to_str( self.unwrap() ).c_str()
11124  *
11125  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11126  * """
11127  * Tests for functions that Doctest cannot see.
11128  */
11129 
11130  /* function exit code */
11131  __pyx_L0:;
11132  __Pyx_XGIVEREF(__pyx_r);
11133  __Pyx_RefNannyFinishContext();
11134  return __pyx_r;
11135  }
11136 
11137  /* "PyClical.pyx":1329
11138  * return
11139  *
11140  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11141  * """
11142  * Geometric multiplicative inverse.
11143  */
11144 
11145  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11146  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11147  PyObject *__pyx_r = NULL;
11148  __Pyx_RefNannyDeclarations
11149  PyObject *__pyx_t_1 = NULL;
11150  PyObject *__pyx_t_2 = NULL;
11151  PyObject *__pyx_t_3 = NULL;
11152  __Pyx_RefNannySetupContext("inv", 0);
11153 
11154  /* "PyClical.pyx":1342
11155  * nan
11156  * """
11157  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11158  *
11159  * cpdef inline scalar(obj):
11160  */
11161  __Pyx_XDECREF(__pyx_r);
11162  __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)
11163  __Pyx_GOTREF(__pyx_t_2);
11164  __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)
11165  __Pyx_GOTREF(__pyx_t_3);
11166  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11167  __pyx_t_2 = NULL;
11168  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11169  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11170  if (likely(__pyx_t_2)) {
11171  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11172  __Pyx_INCREF(__pyx_t_2);
11173  __Pyx_INCREF(function);
11174  __Pyx_DECREF_SET(__pyx_t_3, function);
11175  }
11176  }
11177  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11178  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11179  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11180  __Pyx_GOTREF(__pyx_t_1);
11181  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11182  __pyx_r = __pyx_t_1;
11183  __pyx_t_1 = 0;
11184  goto __pyx_L0;
11185 
11186  /* "PyClical.pyx":1329
11187  * return
11188  *
11189  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11190  * """
11191  * Geometric multiplicative inverse.
11192  */
11193 
11194  /* function exit code */
11195  __pyx_L1_error:;
11196  __Pyx_XDECREF(__pyx_t_1);
11197  __Pyx_XDECREF(__pyx_t_2);
11198  __Pyx_XDECREF(__pyx_t_3);
11199  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11200  __pyx_r = 0;
11201  __pyx_L0:;
11202  __Pyx_XGIVEREF(__pyx_r);
11203  __Pyx_RefNannyFinishContext();
11204  return __pyx_r;
11205  }
11206 
11207  /* Python wrapper */
11208  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11209  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 ";
11210  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11211  PyObject *__pyx_r = 0;
11212  __Pyx_RefNannyDeclarations
11213  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11214  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11215 
11216  /* function exit code */
11217  __Pyx_RefNannyFinishContext();
11218  return __pyx_r;
11219  }
11220 
11221  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11222  PyObject *__pyx_r = NULL;
11223  __Pyx_RefNannyDeclarations
11224  PyObject *__pyx_t_1 = NULL;
11225  __Pyx_RefNannySetupContext("inv", 0);
11226  __Pyx_XDECREF(__pyx_r);
11227  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11228  __Pyx_GOTREF(__pyx_t_1);
11229  __pyx_r = __pyx_t_1;
11230  __pyx_t_1 = 0;
11231  goto __pyx_L0;
11232 
11233  /* function exit code */
11234  __pyx_L1_error:;
11235  __Pyx_XDECREF(__pyx_t_1);
11236  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11237  __pyx_r = NULL;
11238  __pyx_L0:;
11239  __Pyx_XGIVEREF(__pyx_r);
11240  __Pyx_RefNannyFinishContext();
11241  return __pyx_r;
11242  }
11243 
11244  /* "PyClical.pyx":1344
11245  * return clifford(obj).inv()
11246  *
11247  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11248  * """
11249  * Scalar part.
11250  */
11251 
11252  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11253  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11254  PyObject *__pyx_r = NULL;
11255  __Pyx_RefNannyDeclarations
11256  PyObject *__pyx_t_1 = NULL;
11257  PyObject *__pyx_t_2 = NULL;
11258  PyObject *__pyx_t_3 = NULL;
11259  __Pyx_RefNannySetupContext("scalar", 0);
11260 
11261  /* "PyClical.pyx":1353
11262  * 0.0
11263  * """
11264  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11265  *
11266  * cpdef inline real(obj):
11267  */
11268  __Pyx_XDECREF(__pyx_r);
11269  __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)
11270  __Pyx_GOTREF(__pyx_t_2);
11271  __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)
11272  __Pyx_GOTREF(__pyx_t_3);
11273  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11274  __pyx_t_2 = NULL;
11275  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11276  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11277  if (likely(__pyx_t_2)) {
11278  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11279  __Pyx_INCREF(__pyx_t_2);
11280  __Pyx_INCREF(function);
11281  __Pyx_DECREF_SET(__pyx_t_3, function);
11282  }
11283  }
11284  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11285  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11286  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11287  __Pyx_GOTREF(__pyx_t_1);
11288  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11289  __pyx_r = __pyx_t_1;
11290  __pyx_t_1 = 0;
11291  goto __pyx_L0;
11292 
11293  /* "PyClical.pyx":1344
11294  * return clifford(obj).inv()
11295  *
11296  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11297  * """
11298  * Scalar part.
11299  */
11300 
11301  /* function exit code */
11302  __pyx_L1_error:;
11303  __Pyx_XDECREF(__pyx_t_1);
11304  __Pyx_XDECREF(__pyx_t_2);
11305  __Pyx_XDECREF(__pyx_t_3);
11306  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11307  __pyx_r = 0;
11308  __pyx_L0:;
11309  __Pyx_XGIVEREF(__pyx_r);
11310  __Pyx_RefNannyFinishContext();
11311  return __pyx_r;
11312  }
11313 
11314  /* Python wrapper */
11315  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11316  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 ";
11317  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11318  PyObject *__pyx_r = 0;
11319  __Pyx_RefNannyDeclarations
11320  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11321  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11322 
11323  /* function exit code */
11324  __Pyx_RefNannyFinishContext();
11325  return __pyx_r;
11326  }
11327 
11328  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11329  PyObject *__pyx_r = NULL;
11330  __Pyx_RefNannyDeclarations
11331  PyObject *__pyx_t_1 = NULL;
11332  __Pyx_RefNannySetupContext("scalar", 0);
11333  __Pyx_XDECREF(__pyx_r);
11334  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11335  __Pyx_GOTREF(__pyx_t_1);
11336  __pyx_r = __pyx_t_1;
11337  __pyx_t_1 = 0;
11338  goto __pyx_L0;
11339 
11340  /* function exit code */
11341  __pyx_L1_error:;
11342  __Pyx_XDECREF(__pyx_t_1);
11343  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11344  __pyx_r = NULL;
11345  __pyx_L0:;
11346  __Pyx_XGIVEREF(__pyx_r);
11347  __Pyx_RefNannyFinishContext();
11348  return __pyx_r;
11349  }
11350 
11351  /* "PyClical.pyx":1355
11352  * return clifford(obj).scalar()
11353  *
11354  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11355  * """
11356  * Real part: synonym for scalar part.
11357  */
11358 
11359  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11360  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11361  PyObject *__pyx_r = NULL;
11362  __Pyx_RefNannyDeclarations
11363  PyObject *__pyx_t_1 = NULL;
11364  PyObject *__pyx_t_2 = NULL;
11365  PyObject *__pyx_t_3 = NULL;
11366  __Pyx_RefNannySetupContext("real", 0);
11367 
11368  /* "PyClical.pyx":1364
11369  * 0.0
11370  * """
11371  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11372  *
11373  * cpdef inline imag(obj):
11374  */
11375  __Pyx_XDECREF(__pyx_r);
11376  __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)
11377  __Pyx_GOTREF(__pyx_t_2);
11378  __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)
11379  __Pyx_GOTREF(__pyx_t_3);
11380  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11381  __pyx_t_2 = NULL;
11382  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11383  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11384  if (likely(__pyx_t_2)) {
11385  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11386  __Pyx_INCREF(__pyx_t_2);
11387  __Pyx_INCREF(function);
11388  __Pyx_DECREF_SET(__pyx_t_3, function);
11389  }
11390  }
11391  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11392  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11393  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11394  __Pyx_GOTREF(__pyx_t_1);
11395  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11396  __pyx_r = __pyx_t_1;
11397  __pyx_t_1 = 0;
11398  goto __pyx_L0;
11399 
11400  /* "PyClical.pyx":1355
11401  * return clifford(obj).scalar()
11402  *
11403  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11404  * """
11405  * Real part: synonym for scalar part.
11406  */
11407 
11408  /* function exit code */
11409  __pyx_L1_error:;
11410  __Pyx_XDECREF(__pyx_t_1);
11411  __Pyx_XDECREF(__pyx_t_2);
11412  __Pyx_XDECREF(__pyx_t_3);
11413  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11414  __pyx_r = 0;
11415  __pyx_L0:;
11416  __Pyx_XGIVEREF(__pyx_r);
11417  __Pyx_RefNannyFinishContext();
11418  return __pyx_r;
11419  }
11420 
11421  /* Python wrapper */
11422  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11423  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 ";
11424  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11425  PyObject *__pyx_r = 0;
11426  __Pyx_RefNannyDeclarations
11427  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11428  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11429 
11430  /* function exit code */
11431  __Pyx_RefNannyFinishContext();
11432  return __pyx_r;
11433  }
11434 
11435  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11436  PyObject *__pyx_r = NULL;
11437  __Pyx_RefNannyDeclarations
11438  PyObject *__pyx_t_1 = NULL;
11439  __Pyx_RefNannySetupContext("real", 0);
11440  __Pyx_XDECREF(__pyx_r);
11441  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11442  __Pyx_GOTREF(__pyx_t_1);
11443  __pyx_r = __pyx_t_1;
11444  __pyx_t_1 = 0;
11445  goto __pyx_L0;
11446 
11447  /* function exit code */
11448  __pyx_L1_error:;
11449  __Pyx_XDECREF(__pyx_t_1);
11450  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11451  __pyx_r = NULL;
11452  __pyx_L0:;
11453  __Pyx_XGIVEREF(__pyx_r);
11454  __Pyx_RefNannyFinishContext();
11455  return __pyx_r;
11456  }
11457 
11458  /* "PyClical.pyx":1366
11459  * return clifford(obj).scalar()
11460  *
11461  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11462  * """
11463  * Imaginary part: deprecated (always 0).
11464  */
11465 
11466  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11467  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11468  PyObject *__pyx_r = NULL;
11469  __Pyx_RefNannyDeclarations
11470  __Pyx_RefNannySetupContext("imag", 0);
11471 
11472  /* "PyClical.pyx":1375
11473  * 0.0
11474  * """
11475  * return 0.0 # <<<<<<<<<<<<<<
11476  *
11477  * cpdef inline pure(obj):
11478  */
11479  __Pyx_XDECREF(__pyx_r);
11480  __Pyx_INCREF(__pyx_float_0_0);
11481  __pyx_r = __pyx_float_0_0;
11482  goto __pyx_L0;
11483 
11484  /* "PyClical.pyx":1366
11485  * return clifford(obj).scalar()
11486  *
11487  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11488  * """
11489  * Imaginary part: deprecated (always 0).
11490  */
11491 
11492  /* function exit code */
11493  __pyx_L0:;
11494  __Pyx_XGIVEREF(__pyx_r);
11495  __Pyx_RefNannyFinishContext();
11496  return __pyx_r;
11497  }
11498 
11499  /* Python wrapper */
11500  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11501  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 ";
11502  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11503  PyObject *__pyx_r = 0;
11504  __Pyx_RefNannyDeclarations
11505  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11506  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11507 
11508  /* function exit code */
11509  __Pyx_RefNannyFinishContext();
11510  return __pyx_r;
11511  }
11512 
11513  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11514  PyObject *__pyx_r = NULL;
11515  __Pyx_RefNannyDeclarations
11516  PyObject *__pyx_t_1 = NULL;
11517  __Pyx_RefNannySetupContext("imag", 0);
11518  __Pyx_XDECREF(__pyx_r);
11519  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11520  __Pyx_GOTREF(__pyx_t_1);
11521  __pyx_r = __pyx_t_1;
11522  __pyx_t_1 = 0;
11523  goto __pyx_L0;
11524 
11525  /* function exit code */
11526  __pyx_L1_error:;
11527  __Pyx_XDECREF(__pyx_t_1);
11528  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11529  __pyx_r = NULL;
11530  __pyx_L0:;
11531  __Pyx_XGIVEREF(__pyx_r);
11532  __Pyx_RefNannyFinishContext();
11533  return __pyx_r;
11534  }
11535 
11536  /* "PyClical.pyx":1377
11537  * return 0.0
11538  *
11539  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11540  * """
11541  * Pure part
11542  */
11543 
11544  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11545  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11546  PyObject *__pyx_r = NULL;
11547  __Pyx_RefNannyDeclarations
11548  PyObject *__pyx_t_1 = NULL;
11549  PyObject *__pyx_t_2 = NULL;
11550  PyObject *__pyx_t_3 = NULL;
11551  __Pyx_RefNannySetupContext("pure", 0);
11552 
11553  /* "PyClical.pyx":1386
11554  * {1,2}
11555  * """
11556  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11557  *
11558  * cpdef inline even(obj):
11559  */
11560  __Pyx_XDECREF(__pyx_r);
11561  __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)
11562  __Pyx_GOTREF(__pyx_t_2);
11563  __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)
11564  __Pyx_GOTREF(__pyx_t_3);
11565  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11566  __pyx_t_2 = NULL;
11567  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11568  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11569  if (likely(__pyx_t_2)) {
11570  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11571  __Pyx_INCREF(__pyx_t_2);
11572  __Pyx_INCREF(function);
11573  __Pyx_DECREF_SET(__pyx_t_3, function);
11574  }
11575  }
11576  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11577  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11578  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11579  __Pyx_GOTREF(__pyx_t_1);
11580  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11581  __pyx_r = __pyx_t_1;
11582  __pyx_t_1 = 0;
11583  goto __pyx_L0;
11584 
11585  /* "PyClical.pyx":1377
11586  * return 0.0
11587  *
11588  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11589  * """
11590  * Pure part
11591  */
11592 
11593  /* function exit code */
11594  __pyx_L1_error:;
11595  __Pyx_XDECREF(__pyx_t_1);
11596  __Pyx_XDECREF(__pyx_t_2);
11597  __Pyx_XDECREF(__pyx_t_3);
11598  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11599  __pyx_r = 0;
11600  __pyx_L0:;
11601  __Pyx_XGIVEREF(__pyx_r);
11602  __Pyx_RefNannyFinishContext();
11603  return __pyx_r;
11604  }
11605 
11606  /* Python wrapper */
11607  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11608  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 ";
11609  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11610  PyObject *__pyx_r = 0;
11611  __Pyx_RefNannyDeclarations
11612  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11613  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11614 
11615  /* function exit code */
11616  __Pyx_RefNannyFinishContext();
11617  return __pyx_r;
11618  }
11619 
11620  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11621  PyObject *__pyx_r = NULL;
11622  __Pyx_RefNannyDeclarations
11623  PyObject *__pyx_t_1 = NULL;
11624  __Pyx_RefNannySetupContext("pure", 0);
11625  __Pyx_XDECREF(__pyx_r);
11626  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11627  __Pyx_GOTREF(__pyx_t_1);
11628  __pyx_r = __pyx_t_1;
11629  __pyx_t_1 = 0;
11630  goto __pyx_L0;
11631 
11632  /* function exit code */
11633  __pyx_L1_error:;
11634  __Pyx_XDECREF(__pyx_t_1);
11635  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11636  __pyx_r = NULL;
11637  __pyx_L0:;
11638  __Pyx_XGIVEREF(__pyx_r);
11639  __Pyx_RefNannyFinishContext();
11640  return __pyx_r;
11641  }
11642 
11643  /* "PyClical.pyx":1388
11644  * return clifford(obj).pure()
11645  *
11646  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11647  * """
11648  * Even part of multivector, sum of even grade terms.
11649  */
11650 
11651  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11652  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11653  PyObject *__pyx_r = NULL;
11654  __Pyx_RefNannyDeclarations
11655  PyObject *__pyx_t_1 = NULL;
11656  PyObject *__pyx_t_2 = NULL;
11657  PyObject *__pyx_t_3 = NULL;
11658  __Pyx_RefNannySetupContext("even", 0);
11659 
11660  /* "PyClical.pyx":1395
11661  * 1+{1,2}
11662  * """
11663  * return clifford(obj).even() # <<<<<<<<<<<<<<
11664  *
11665  * cpdef inline odd(obj):
11666  */
11667  __Pyx_XDECREF(__pyx_r);
11668  __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)
11669  __Pyx_GOTREF(__pyx_t_2);
11670  __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)
11671  __Pyx_GOTREF(__pyx_t_3);
11672  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11673  __pyx_t_2 = NULL;
11674  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11675  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11676  if (likely(__pyx_t_2)) {
11677  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11678  __Pyx_INCREF(__pyx_t_2);
11679  __Pyx_INCREF(function);
11680  __Pyx_DECREF_SET(__pyx_t_3, function);
11681  }
11682  }
11683  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11684  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11685  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11686  __Pyx_GOTREF(__pyx_t_1);
11687  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11688  __pyx_r = __pyx_t_1;
11689  __pyx_t_1 = 0;
11690  goto __pyx_L0;
11691 
11692  /* "PyClical.pyx":1388
11693  * return clifford(obj).pure()
11694  *
11695  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11696  * """
11697  * Even part of multivector, sum of even grade terms.
11698  */
11699 
11700  /* function exit code */
11701  __pyx_L1_error:;
11702  __Pyx_XDECREF(__pyx_t_1);
11703  __Pyx_XDECREF(__pyx_t_2);
11704  __Pyx_XDECREF(__pyx_t_3);
11705  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11706  __pyx_r = 0;
11707  __pyx_L0:;
11708  __Pyx_XGIVEREF(__pyx_r);
11709  __Pyx_RefNannyFinishContext();
11710  return __pyx_r;
11711  }
11712 
11713  /* Python wrapper */
11714  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11715  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 ";
11716  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11717  PyObject *__pyx_r = 0;
11718  __Pyx_RefNannyDeclarations
11719  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11720  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11721 
11722  /* function exit code */
11723  __Pyx_RefNannyFinishContext();
11724  return __pyx_r;
11725  }
11726 
11727  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11728  PyObject *__pyx_r = NULL;
11729  __Pyx_RefNannyDeclarations
11730  PyObject *__pyx_t_1 = NULL;
11731  __Pyx_RefNannySetupContext("even", 0);
11732  __Pyx_XDECREF(__pyx_r);
11733  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11734  __Pyx_GOTREF(__pyx_t_1);
11735  __pyx_r = __pyx_t_1;
11736  __pyx_t_1 = 0;
11737  goto __pyx_L0;
11738 
11739  /* function exit code */
11740  __pyx_L1_error:;
11741  __Pyx_XDECREF(__pyx_t_1);
11742  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11743  __pyx_r = NULL;
11744  __pyx_L0:;
11745  __Pyx_XGIVEREF(__pyx_r);
11746  __Pyx_RefNannyFinishContext();
11747  return __pyx_r;
11748  }
11749 
11750  /* "PyClical.pyx":1397
11751  * return clifford(obj).even()
11752  *
11753  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11754  * """
11755  * Odd part of multivector, sum of odd grade terms.
11756  */
11757 
11758  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11759  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11760  PyObject *__pyx_r = NULL;
11761  __Pyx_RefNannyDeclarations
11762  PyObject *__pyx_t_1 = NULL;
11763  PyObject *__pyx_t_2 = NULL;
11764  PyObject *__pyx_t_3 = NULL;
11765  __Pyx_RefNannySetupContext("odd", 0);
11766 
11767  /* "PyClical.pyx":1404
11768  * {1}
11769  * """
11770  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11771  *
11772  * cpdef inline involute(obj):
11773  */
11774  __Pyx_XDECREF(__pyx_r);
11775  __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)
11776  __Pyx_GOTREF(__pyx_t_2);
11777  __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)
11778  __Pyx_GOTREF(__pyx_t_3);
11779  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11780  __pyx_t_2 = NULL;
11781  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11782  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11783  if (likely(__pyx_t_2)) {
11784  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11785  __Pyx_INCREF(__pyx_t_2);
11786  __Pyx_INCREF(function);
11787  __Pyx_DECREF_SET(__pyx_t_3, function);
11788  }
11789  }
11790  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11791  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11792  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11793  __Pyx_GOTREF(__pyx_t_1);
11794  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11795  __pyx_r = __pyx_t_1;
11796  __pyx_t_1 = 0;
11797  goto __pyx_L0;
11798 
11799  /* "PyClical.pyx":1397
11800  * return clifford(obj).even()
11801  *
11802  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11803  * """
11804  * Odd part of multivector, sum of odd grade terms.
11805  */
11806 
11807  /* function exit code */
11808  __pyx_L1_error:;
11809  __Pyx_XDECREF(__pyx_t_1);
11810  __Pyx_XDECREF(__pyx_t_2);
11811  __Pyx_XDECREF(__pyx_t_3);
11812  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11813  __pyx_r = 0;
11814  __pyx_L0:;
11815  __Pyx_XGIVEREF(__pyx_r);
11816  __Pyx_RefNannyFinishContext();
11817  return __pyx_r;
11818  }
11819 
11820  /* Python wrapper */
11821  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11822  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 ";
11823  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11824  PyObject *__pyx_r = 0;
11825  __Pyx_RefNannyDeclarations
11826  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11827  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11828 
11829  /* function exit code */
11830  __Pyx_RefNannyFinishContext();
11831  return __pyx_r;
11832  }
11833 
11834  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11835  PyObject *__pyx_r = NULL;
11836  __Pyx_RefNannyDeclarations
11837  PyObject *__pyx_t_1 = NULL;
11838  __Pyx_RefNannySetupContext("odd", 0);
11839  __Pyx_XDECREF(__pyx_r);
11840  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11841  __Pyx_GOTREF(__pyx_t_1);
11842  __pyx_r = __pyx_t_1;
11843  __pyx_t_1 = 0;
11844  goto __pyx_L0;
11845 
11846  /* function exit code */
11847  __pyx_L1_error:;
11848  __Pyx_XDECREF(__pyx_t_1);
11849  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11850  __pyx_r = NULL;
11851  __pyx_L0:;
11852  __Pyx_XGIVEREF(__pyx_r);
11853  __Pyx_RefNannyFinishContext();
11854  return __pyx_r;
11855  }
11856 
11857  /* "PyClical.pyx":1406
11858  * return clifford(obj).odd()
11859  *
11860  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11861  * """
11862  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11863  */
11864 
11865  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11866  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11867  PyObject *__pyx_r = NULL;
11868  __Pyx_RefNannyDeclarations
11869  PyObject *__pyx_t_1 = NULL;
11870  PyObject *__pyx_t_2 = NULL;
11871  PyObject *__pyx_t_3 = NULL;
11872  __Pyx_RefNannySetupContext("involute", 0);
11873 
11874  /* "PyClical.pyx":1419
11875  * 1-{1}+{1,2}
11876  * """
11877  * return clifford(obj).involute() # <<<<<<<<<<<<<<
11878  *
11879  * cpdef inline reverse(obj):
11880  */
11881  __Pyx_XDECREF(__pyx_r);
11882  __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)
11883  __Pyx_GOTREF(__pyx_t_2);
11884  __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)
11885  __Pyx_GOTREF(__pyx_t_3);
11886  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11887  __pyx_t_2 = NULL;
11888  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11889  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11890  if (likely(__pyx_t_2)) {
11891  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11892  __Pyx_INCREF(__pyx_t_2);
11893  __Pyx_INCREF(function);
11894  __Pyx_DECREF_SET(__pyx_t_3, function);
11895  }
11896  }
11897  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11898  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11899  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11900  __Pyx_GOTREF(__pyx_t_1);
11901  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11902  __pyx_r = __pyx_t_1;
11903  __pyx_t_1 = 0;
11904  goto __pyx_L0;
11905 
11906  /* "PyClical.pyx":1406
11907  * return clifford(obj).odd()
11908  *
11909  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11910  * """
11911  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11912  */
11913 
11914  /* function exit code */
11915  __pyx_L1_error:;
11916  __Pyx_XDECREF(__pyx_t_1);
11917  __Pyx_XDECREF(__pyx_t_2);
11918  __Pyx_XDECREF(__pyx_t_3);
11919  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11920  __pyx_r = 0;
11921  __pyx_L0:;
11922  __Pyx_XGIVEREF(__pyx_r);
11923  __Pyx_RefNannyFinishContext();
11924  return __pyx_r;
11925  }
11926 
11927  /* Python wrapper */
11928  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11929  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 ";
11930  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11931  PyObject *__pyx_r = 0;
11932  __Pyx_RefNannyDeclarations
11933  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
11934  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11935 
11936  /* function exit code */
11937  __Pyx_RefNannyFinishContext();
11938  return __pyx_r;
11939  }
11940 
11941  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11942  PyObject *__pyx_r = NULL;
11943  __Pyx_RefNannyDeclarations
11944  PyObject *__pyx_t_1 = NULL;
11945  __Pyx_RefNannySetupContext("involute", 0);
11946  __Pyx_XDECREF(__pyx_r);
11947  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
11948  __Pyx_GOTREF(__pyx_t_1);
11949  __pyx_r = __pyx_t_1;
11950  __pyx_t_1 = 0;
11951  goto __pyx_L0;
11952 
11953  /* function exit code */
11954  __pyx_L1_error:;
11955  __Pyx_XDECREF(__pyx_t_1);
11956  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11957  __pyx_r = NULL;
11958  __pyx_L0:;
11959  __Pyx_XGIVEREF(__pyx_r);
11960  __Pyx_RefNannyFinishContext();
11961  return __pyx_r;
11962  }
11963 
11964  /* "PyClical.pyx":1421
11965  * return clifford(obj).involute()
11966  *
11967  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11968  * """
11969  * Reversion, eg. {1}*{2} -> {2}*{1}
11970  */
11971 
11972  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11973  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11974  PyObject *__pyx_r = NULL;
11975  __Pyx_RefNannyDeclarations
11976  PyObject *__pyx_t_1 = NULL;
11977  PyObject *__pyx_t_2 = NULL;
11978  PyObject *__pyx_t_3 = NULL;
11979  __Pyx_RefNannySetupContext("reverse", 0);
11980 
11981  /* "PyClical.pyx":1434
11982  * 1+{1}-{1,2}
11983  * """
11984  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
11985  *
11986  * cpdef inline conj(obj):
11987  */
11988  __Pyx_XDECREF(__pyx_r);
11989  __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)
11990  __Pyx_GOTREF(__pyx_t_2);
11991  __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)
11992  __Pyx_GOTREF(__pyx_t_3);
11993  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11994  __pyx_t_2 = NULL;
11995  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11996  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11997  if (likely(__pyx_t_2)) {
11998  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11999  __Pyx_INCREF(__pyx_t_2);
12000  __Pyx_INCREF(function);
12001  __Pyx_DECREF_SET(__pyx_t_3, function);
12002  }
12003  }
12004  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12005  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12006  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12007  __Pyx_GOTREF(__pyx_t_1);
12008  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12009  __pyx_r = __pyx_t_1;
12010  __pyx_t_1 = 0;
12011  goto __pyx_L0;
12012 
12013  /* "PyClical.pyx":1421
12014  * return clifford(obj).involute()
12015  *
12016  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12017  * """
12018  * Reversion, eg. {1}*{2} -> {2}*{1}
12019  */
12020 
12021  /* function exit code */
12022  __pyx_L1_error:;
12023  __Pyx_XDECREF(__pyx_t_1);
12024  __Pyx_XDECREF(__pyx_t_2);
12025  __Pyx_XDECREF(__pyx_t_3);
12026  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12027  __pyx_r = 0;
12028  __pyx_L0:;
12029  __Pyx_XGIVEREF(__pyx_r);
12030  __Pyx_RefNannyFinishContext();
12031  return __pyx_r;
12032  }
12033 
12034  /* Python wrapper */
12035  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12036  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 ";
12037  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12038  PyObject *__pyx_r = 0;
12039  __Pyx_RefNannyDeclarations
12040  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12041  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12042 
12043  /* function exit code */
12044  __Pyx_RefNannyFinishContext();
12045  return __pyx_r;
12046  }
12047 
12048  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12049  PyObject *__pyx_r = NULL;
12050  __Pyx_RefNannyDeclarations
12051  PyObject *__pyx_t_1 = NULL;
12052  __Pyx_RefNannySetupContext("reverse", 0);
12053  __Pyx_XDECREF(__pyx_r);
12054  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12055  __Pyx_GOTREF(__pyx_t_1);
12056  __pyx_r = __pyx_t_1;
12057  __pyx_t_1 = 0;
12058  goto __pyx_L0;
12059 
12060  /* function exit code */
12061  __pyx_L1_error:;
12062  __Pyx_XDECREF(__pyx_t_1);
12063  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12064  __pyx_r = NULL;
12065  __pyx_L0:;
12066  __Pyx_XGIVEREF(__pyx_r);
12067  __Pyx_RefNannyFinishContext();
12068  return __pyx_r;
12069  }
12070 
12071  /* "PyClical.pyx":1436
12072  * return clifford(obj).reverse()
12073  *
12074  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12075  * """
12076  * Conjugation, reverse o involute == involute o reverse.
12077  */
12078 
12079  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12080  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12081  PyObject *__pyx_r = NULL;
12082  __Pyx_RefNannyDeclarations
12083  PyObject *__pyx_t_1 = NULL;
12084  PyObject *__pyx_t_2 = NULL;
12085  PyObject *__pyx_t_3 = NULL;
12086  __Pyx_RefNannySetupContext("conj", 0);
12087 
12088  /* "PyClical.pyx":1449
12089  * 1-{1}-{1,2}
12090  * """
12091  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12092  *
12093  * cpdef inline quad(obj):
12094  */
12095  __Pyx_XDECREF(__pyx_r);
12096  __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)
12097  __Pyx_GOTREF(__pyx_t_2);
12098  __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)
12099  __Pyx_GOTREF(__pyx_t_3);
12100  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12101  __pyx_t_2 = NULL;
12102  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12103  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12104  if (likely(__pyx_t_2)) {
12105  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12106  __Pyx_INCREF(__pyx_t_2);
12107  __Pyx_INCREF(function);
12108  __Pyx_DECREF_SET(__pyx_t_3, function);
12109  }
12110  }
12111  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12112  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12113  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12114  __Pyx_GOTREF(__pyx_t_1);
12115  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12116  __pyx_r = __pyx_t_1;
12117  __pyx_t_1 = 0;
12118  goto __pyx_L0;
12119 
12120  /* "PyClical.pyx":1436
12121  * return clifford(obj).reverse()
12122  *
12123  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12124  * """
12125  * Conjugation, reverse o involute == involute o reverse.
12126  */
12127 
12128  /* function exit code */
12129  __pyx_L1_error:;
12130  __Pyx_XDECREF(__pyx_t_1);
12131  __Pyx_XDECREF(__pyx_t_2);
12132  __Pyx_XDECREF(__pyx_t_3);
12133  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12134  __pyx_r = 0;
12135  __pyx_L0:;
12136  __Pyx_XGIVEREF(__pyx_r);
12137  __Pyx_RefNannyFinishContext();
12138  return __pyx_r;
12139  }
12140 
12141  /* Python wrapper */
12142  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12143  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 ";
12144  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12145  PyObject *__pyx_r = 0;
12146  __Pyx_RefNannyDeclarations
12147  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12148  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12149 
12150  /* function exit code */
12151  __Pyx_RefNannyFinishContext();
12152  return __pyx_r;
12153  }
12154 
12155  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12156  PyObject *__pyx_r = NULL;
12157  __Pyx_RefNannyDeclarations
12158  PyObject *__pyx_t_1 = NULL;
12159  __Pyx_RefNannySetupContext("conj", 0);
12160  __Pyx_XDECREF(__pyx_r);
12161  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12162  __Pyx_GOTREF(__pyx_t_1);
12163  __pyx_r = __pyx_t_1;
12164  __pyx_t_1 = 0;
12165  goto __pyx_L0;
12166 
12167  /* function exit code */
12168  __pyx_L1_error:;
12169  __Pyx_XDECREF(__pyx_t_1);
12170  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12171  __pyx_r = NULL;
12172  __pyx_L0:;
12173  __Pyx_XGIVEREF(__pyx_r);
12174  __Pyx_RefNannyFinishContext();
12175  return __pyx_r;
12176  }
12177 
12178  /* "PyClical.pyx":1451
12179  * return clifford(obj).conj()
12180  *
12181  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12182  * """
12183  * Quadratic form == (rev(x)*x)(0).
12184  */
12185 
12186  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12187  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12188  PyObject *__pyx_r = NULL;
12189  __Pyx_RefNannyDeclarations
12190  PyObject *__pyx_t_1 = NULL;
12191  PyObject *__pyx_t_2 = NULL;
12192  PyObject *__pyx_t_3 = NULL;
12193  __Pyx_RefNannySetupContext("quad", 0);
12194 
12195  /* "PyClical.pyx":1460
12196  * 2.0
12197  * """
12198  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12199  *
12200  * cpdef inline norm(obj):
12201  */
12202  __Pyx_XDECREF(__pyx_r);
12203  __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)
12204  __Pyx_GOTREF(__pyx_t_2);
12205  __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)
12206  __Pyx_GOTREF(__pyx_t_3);
12207  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12208  __pyx_t_2 = NULL;
12209  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12210  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12211  if (likely(__pyx_t_2)) {
12212  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12213  __Pyx_INCREF(__pyx_t_2);
12214  __Pyx_INCREF(function);
12215  __Pyx_DECREF_SET(__pyx_t_3, function);
12216  }
12217  }
12218  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12219  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12220  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12221  __Pyx_GOTREF(__pyx_t_1);
12222  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12223  __pyx_r = __pyx_t_1;
12224  __pyx_t_1 = 0;
12225  goto __pyx_L0;
12226 
12227  /* "PyClical.pyx":1451
12228  * return clifford(obj).conj()
12229  *
12230  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12231  * """
12232  * Quadratic form == (rev(x)*x)(0).
12233  */
12234 
12235  /* function exit code */
12236  __pyx_L1_error:;
12237  __Pyx_XDECREF(__pyx_t_1);
12238  __Pyx_XDECREF(__pyx_t_2);
12239  __Pyx_XDECREF(__pyx_t_3);
12240  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12241  __pyx_r = 0;
12242  __pyx_L0:;
12243  __Pyx_XGIVEREF(__pyx_r);
12244  __Pyx_RefNannyFinishContext();
12245  return __pyx_r;
12246  }
12247 
12248  /* Python wrapper */
12249  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12250  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 ";
12251  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12252  PyObject *__pyx_r = 0;
12253  __Pyx_RefNannyDeclarations
12254  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12255  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12256 
12257  /* function exit code */
12258  __Pyx_RefNannyFinishContext();
12259  return __pyx_r;
12260  }
12261 
12262  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12263  PyObject *__pyx_r = NULL;
12264  __Pyx_RefNannyDeclarations
12265  PyObject *__pyx_t_1 = NULL;
12266  __Pyx_RefNannySetupContext("quad", 0);
12267  __Pyx_XDECREF(__pyx_r);
12268  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12269  __Pyx_GOTREF(__pyx_t_1);
12270  __pyx_r = __pyx_t_1;
12271  __pyx_t_1 = 0;
12272  goto __pyx_L0;
12273 
12274  /* function exit code */
12275  __pyx_L1_error:;
12276  __Pyx_XDECREF(__pyx_t_1);
12277  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12278  __pyx_r = NULL;
12279  __pyx_L0:;
12280  __Pyx_XGIVEREF(__pyx_r);
12281  __Pyx_RefNannyFinishContext();
12282  return __pyx_r;
12283  }
12284 
12285  /* "PyClical.pyx":1462
12286  * return clifford(obj).quad()
12287  *
12288  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12289  * """
12290  * norm == sum of squares of coordinates.
12291  */
12292 
12293  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12294  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12295  PyObject *__pyx_r = NULL;
12296  __Pyx_RefNannyDeclarations
12297  PyObject *__pyx_t_1 = NULL;
12298  PyObject *__pyx_t_2 = NULL;
12299  PyObject *__pyx_t_3 = NULL;
12300  __Pyx_RefNannySetupContext("norm", 0);
12301 
12302  /* "PyClical.pyx":1471
12303  * 4.0
12304  * """
12305  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12306  *
12307  * cpdef inline abs(obj):
12308  */
12309  __Pyx_XDECREF(__pyx_r);
12310  __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)
12311  __Pyx_GOTREF(__pyx_t_2);
12312  __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)
12313  __Pyx_GOTREF(__pyx_t_3);
12314  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12315  __pyx_t_2 = NULL;
12316  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12317  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12318  if (likely(__pyx_t_2)) {
12319  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12320  __Pyx_INCREF(__pyx_t_2);
12321  __Pyx_INCREF(function);
12322  __Pyx_DECREF_SET(__pyx_t_3, function);
12323  }
12324  }
12325  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12326  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12327  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12328  __Pyx_GOTREF(__pyx_t_1);
12329  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12330  __pyx_r = __pyx_t_1;
12331  __pyx_t_1 = 0;
12332  goto __pyx_L0;
12333 
12334  /* "PyClical.pyx":1462
12335  * return clifford(obj).quad()
12336  *
12337  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12338  * """
12339  * norm == sum of squares of coordinates.
12340  */
12341 
12342  /* function exit code */
12343  __pyx_L1_error:;
12344  __Pyx_XDECREF(__pyx_t_1);
12345  __Pyx_XDECREF(__pyx_t_2);
12346  __Pyx_XDECREF(__pyx_t_3);
12347  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12348  __pyx_r = 0;
12349  __pyx_L0:;
12350  __Pyx_XGIVEREF(__pyx_r);
12351  __Pyx_RefNannyFinishContext();
12352  return __pyx_r;
12353  }
12354 
12355  /* Python wrapper */
12356  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12357  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 ";
12358  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12359  PyObject *__pyx_r = 0;
12360  __Pyx_RefNannyDeclarations
12361  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12362  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12363 
12364  /* function exit code */
12365  __Pyx_RefNannyFinishContext();
12366  return __pyx_r;
12367  }
12368 
12369  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12370  PyObject *__pyx_r = NULL;
12371  __Pyx_RefNannyDeclarations
12372  PyObject *__pyx_t_1 = NULL;
12373  __Pyx_RefNannySetupContext("norm", 0);
12374  __Pyx_XDECREF(__pyx_r);
12375  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12376  __Pyx_GOTREF(__pyx_t_1);
12377  __pyx_r = __pyx_t_1;
12378  __pyx_t_1 = 0;
12379  goto __pyx_L0;
12380 
12381  /* function exit code */
12382  __pyx_L1_error:;
12383  __Pyx_XDECREF(__pyx_t_1);
12384  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12385  __pyx_r = NULL;
12386  __pyx_L0:;
12387  __Pyx_XGIVEREF(__pyx_r);
12388  __Pyx_RefNannyFinishContext();
12389  return __pyx_r;
12390  }
12391 
12392  /* "PyClical.pyx":1473
12393  * return clifford(obj).norm()
12394  *
12395  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12396  * """
12397  * Absolute value of multivector: multivector 2-norm.
12398  */
12399 
12400  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12401  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12402  PyObject *__pyx_r = NULL;
12403  __Pyx_RefNannyDeclarations
12404  PyObject *__pyx_t_1 = NULL;
12405  __Pyx_RefNannySetupContext("abs", 0);
12406 
12407  /* "PyClical.pyx":1480
12408  * 2.0
12409  * """
12410  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12411  *
12412  * cpdef inline max_abs(obj):
12413  */
12414  __Pyx_XDECREF(__pyx_r);
12415  __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)
12416  __Pyx_GOTREF(__pyx_t_1);
12417  __pyx_r = __pyx_t_1;
12418  __pyx_t_1 = 0;
12419  goto __pyx_L0;
12420 
12421  /* "PyClical.pyx":1473
12422  * return clifford(obj).norm()
12423  *
12424  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12425  * """
12426  * Absolute value of multivector: multivector 2-norm.
12427  */
12428 
12429  /* function exit code */
12430  __pyx_L1_error:;
12431  __Pyx_XDECREF(__pyx_t_1);
12432  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12433  __pyx_r = 0;
12434  __pyx_L0:;
12435  __Pyx_XGIVEREF(__pyx_r);
12436  __Pyx_RefNannyFinishContext();
12437  return __pyx_r;
12438  }
12439 
12440  /* Python wrapper */
12441  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12442  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 ";
12443  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12444  PyObject *__pyx_r = 0;
12445  __Pyx_RefNannyDeclarations
12446  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12447  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12448 
12449  /* function exit code */
12450  __Pyx_RefNannyFinishContext();
12451  return __pyx_r;
12452  }
12453 
12454  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12455  PyObject *__pyx_r = NULL;
12456  __Pyx_RefNannyDeclarations
12457  PyObject *__pyx_t_1 = NULL;
12458  __Pyx_RefNannySetupContext("abs", 0);
12459  __Pyx_XDECREF(__pyx_r);
12460  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12461  __Pyx_GOTREF(__pyx_t_1);
12462  __pyx_r = __pyx_t_1;
12463  __pyx_t_1 = 0;
12464  goto __pyx_L0;
12465 
12466  /* function exit code */
12467  __pyx_L1_error:;
12468  __Pyx_XDECREF(__pyx_t_1);
12469  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12470  __pyx_r = NULL;
12471  __pyx_L0:;
12472  __Pyx_XGIVEREF(__pyx_r);
12473  __Pyx_RefNannyFinishContext();
12474  return __pyx_r;
12475  }
12476 
12477  /* "PyClical.pyx":1482
12478  * return glucat.abs(toClifford(obj))
12479  *
12480  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12481  * """
12482  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12483  */
12484 
12485  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12486  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12487  PyObject *__pyx_r = NULL;
12488  __Pyx_RefNannyDeclarations
12489  PyObject *__pyx_t_1 = NULL;
12490  __Pyx_RefNannySetupContext("max_abs", 0);
12491 
12492  /* "PyClical.pyx":1492
12493  *
12494  * """
12495  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12496  *
12497  * cpdef inline pow(obj, m):
12498  */
12499  __Pyx_XDECREF(__pyx_r);
12500  __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)
12501  __Pyx_GOTREF(__pyx_t_1);
12502  __pyx_r = __pyx_t_1;
12503  __pyx_t_1 = 0;
12504  goto __pyx_L0;
12505 
12506  /* "PyClical.pyx":1482
12507  * return glucat.abs(toClifford(obj))
12508  *
12509  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12510  * """
12511  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12512  */
12513 
12514  /* function exit code */
12515  __pyx_L1_error:;
12516  __Pyx_XDECREF(__pyx_t_1);
12517  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12518  __pyx_r = 0;
12519  __pyx_L0:;
12520  __Pyx_XGIVEREF(__pyx_r);
12521  __Pyx_RefNannyFinishContext();
12522  return __pyx_r;
12523  }
12524 
12525  /* Python wrapper */
12526  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12527  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 ";
12528  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12529  PyObject *__pyx_r = 0;
12530  __Pyx_RefNannyDeclarations
12531  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12532  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12533 
12534  /* function exit code */
12535  __Pyx_RefNannyFinishContext();
12536  return __pyx_r;
12537  }
12538 
12539  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12540  PyObject *__pyx_r = NULL;
12541  __Pyx_RefNannyDeclarations
12542  PyObject *__pyx_t_1 = NULL;
12543  __Pyx_RefNannySetupContext("max_abs", 0);
12544  __Pyx_XDECREF(__pyx_r);
12545  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12546  __Pyx_GOTREF(__pyx_t_1);
12547  __pyx_r = __pyx_t_1;
12548  __pyx_t_1 = 0;
12549  goto __pyx_L0;
12550 
12551  /* function exit code */
12552  __pyx_L1_error:;
12553  __Pyx_XDECREF(__pyx_t_1);
12554  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12555  __pyx_r = NULL;
12556  __pyx_L0:;
12557  __Pyx_XGIVEREF(__pyx_r);
12558  __Pyx_RefNannyFinishContext();
12559  return __pyx_r;
12560  }
12561 
12562  /* "PyClical.pyx":1494
12563  * return glucat.max_abs(toClifford(obj))
12564  *
12565  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12566  * """
12567  * Integer power of multivector: obj to the m.
12568  */
12569 
12570  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12571  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12572  PyObject *__pyx_r = NULL;
12573  __Pyx_RefNannyDeclarations
12574  PyObject *__pyx_t_1 = NULL;
12575  PyObject *__pyx_t_2 = NULL;
12576  PyObject *__pyx_t_3 = NULL;
12577  PyObject *__pyx_t_4 = NULL;
12578  PyObject *__pyx_t_5 = NULL;
12579  PyObject *__pyx_t_6 = NULL;
12580  int __pyx_t_7;
12581  PyObject *__pyx_t_8 = NULL;
12582  PyObject *__pyx_t_9 = NULL;
12583  PyObject *__pyx_t_10 = NULL;
12584  __Pyx_RefNannySetupContext("pow", 0);
12585 
12586  /* "PyClical.pyx":1513
12587  * 1
12588  * """
12589  * try: # <<<<<<<<<<<<<<
12590  * math.pow(obj, m)
12591  * except:
12592  */
12593  {
12594  __Pyx_PyThreadState_declare
12595  __Pyx_PyThreadState_assign
12596  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12597  __Pyx_XGOTREF(__pyx_t_1);
12598  __Pyx_XGOTREF(__pyx_t_2);
12599  __Pyx_XGOTREF(__pyx_t_3);
12600  /*try:*/ {
12601 
12602  /* "PyClical.pyx":1514
12603  * """
12604  * try:
12605  * math.pow(obj, m) # <<<<<<<<<<<<<<
12606  * except:
12607  * return clifford(obj).pow(m)
12608  */
12609  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12610  __Pyx_GOTREF(__pyx_t_5);
12611  __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)
12612  __Pyx_GOTREF(__pyx_t_6);
12613  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12614  __pyx_t_5 = NULL;
12615  __pyx_t_7 = 0;
12616  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12617  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12618  if (likely(__pyx_t_5)) {
12619  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12620  __Pyx_INCREF(__pyx_t_5);
12621  __Pyx_INCREF(function);
12622  __Pyx_DECREF_SET(__pyx_t_6, function);
12623  __pyx_t_7 = 1;
12624  }
12625  }
12626  #if CYTHON_FAST_PYCALL
12627  if (PyFunction_Check(__pyx_t_6)) {
12628  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12629  __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)
12630  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12631  __Pyx_GOTREF(__pyx_t_4);
12632  } else
12633  #endif
12634  #if CYTHON_FAST_PYCCALL
12635  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12636  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12637  __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)
12638  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12639  __Pyx_GOTREF(__pyx_t_4);
12640  } else
12641  #endif
12642  {
12643  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12644  __Pyx_GOTREF(__pyx_t_8);
12645  if (__pyx_t_5) {
12646  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12647  }
12648  __Pyx_INCREF(__pyx_v_obj);
12649  __Pyx_GIVEREF(__pyx_v_obj);
12650  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12651  __Pyx_INCREF(__pyx_v_m);
12652  __Pyx_GIVEREF(__pyx_v_m);
12653  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12654  __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)
12655  __Pyx_GOTREF(__pyx_t_4);
12656  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12657  }
12658  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12659  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12660 
12661  /* "PyClical.pyx":1513
12662  * 1
12663  * """
12664  * try: # <<<<<<<<<<<<<<
12665  * math.pow(obj, m)
12666  * except:
12667  */
12668  }
12669  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12670  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12671  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12672  goto __pyx_L8_try_end;
12673  __pyx_L3_error:;
12674  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12675  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12676  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12677  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12678 
12679  /* "PyClical.pyx":1515
12680  * try:
12681  * math.pow(obj, m)
12682  * except: # <<<<<<<<<<<<<<
12683  * return clifford(obj).pow(m)
12684  *
12685  */
12686  /*except:*/ {
12687  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12688  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12689  __Pyx_GOTREF(__pyx_t_4);
12690  __Pyx_GOTREF(__pyx_t_6);
12691  __Pyx_GOTREF(__pyx_t_8);
12692 
12693  /* "PyClical.pyx":1516
12694  * math.pow(obj, m)
12695  * except:
12696  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12697  *
12698  * cpdef inline outer_pow(obj, m):
12699  */
12700  __Pyx_XDECREF(__pyx_r);
12701  __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)
12702  __Pyx_GOTREF(__pyx_t_9);
12703  __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)
12704  __Pyx_GOTREF(__pyx_t_10);
12705  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12706  __pyx_t_9 = NULL;
12707  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
12708  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
12709  if (likely(__pyx_t_9)) {
12710  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
12711  __Pyx_INCREF(__pyx_t_9);
12712  __Pyx_INCREF(function);
12713  __Pyx_DECREF_SET(__pyx_t_10, function);
12714  }
12715  }
12716  __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);
12717  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12718  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12719  __Pyx_GOTREF(__pyx_t_5);
12720  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12721  __pyx_r = __pyx_t_5;
12722  __pyx_t_5 = 0;
12723  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12724  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12725  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12726  goto __pyx_L6_except_return;
12727  }
12728  __pyx_L5_except_error:;
12729 
12730  /* "PyClical.pyx":1513
12731  * 1
12732  * """
12733  * try: # <<<<<<<<<<<<<<
12734  * math.pow(obj, m)
12735  * except:
12736  */
12737  __Pyx_XGIVEREF(__pyx_t_1);
12738  __Pyx_XGIVEREF(__pyx_t_2);
12739  __Pyx_XGIVEREF(__pyx_t_3);
12740  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12741  goto __pyx_L1_error;
12742  __pyx_L6_except_return:;
12743  __Pyx_XGIVEREF(__pyx_t_1);
12744  __Pyx_XGIVEREF(__pyx_t_2);
12745  __Pyx_XGIVEREF(__pyx_t_3);
12746  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12747  goto __pyx_L0;
12748  __pyx_L8_try_end:;
12749  }
12750 
12751  /* "PyClical.pyx":1494
12752  * return glucat.max_abs(toClifford(obj))
12753  *
12754  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12755  * """
12756  * Integer power of multivector: obj to the m.
12757  */
12758 
12759  /* function exit code */
12760  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12761  goto __pyx_L0;
12762  __pyx_L1_error:;
12763  __Pyx_XDECREF(__pyx_t_4);
12764  __Pyx_XDECREF(__pyx_t_5);
12765  __Pyx_XDECREF(__pyx_t_6);
12766  __Pyx_XDECREF(__pyx_t_8);
12767  __Pyx_XDECREF(__pyx_t_9);
12768  __Pyx_XDECREF(__pyx_t_10);
12769  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12770  __pyx_r = 0;
12771  __pyx_L0:;
12772  __Pyx_XGIVEREF(__pyx_r);
12773  __Pyx_RefNannyFinishContext();
12774  return __pyx_r;
12775  }
12776 
12777  /* Python wrapper */
12778  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12779  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 ";
12780  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12781  PyObject *__pyx_v_obj = 0;
12782  PyObject *__pyx_v_m = 0;
12783  PyObject *__pyx_r = 0;
12784  __Pyx_RefNannyDeclarations
12785  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12786  {
12787  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12788  PyObject* values[2] = {0,0};
12789  if (unlikely(__pyx_kwds)) {
12790  Py_ssize_t kw_args;
12791  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12792  switch (pos_args) {
12793  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12794  CYTHON_FALLTHROUGH;
12795  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12796  CYTHON_FALLTHROUGH;
12797  case 0: break;
12798  default: goto __pyx_L5_argtuple_error;
12799  }
12800  kw_args = PyDict_Size(__pyx_kwds);
12801  switch (pos_args) {
12802  case 0:
12803  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12804  else goto __pyx_L5_argtuple_error;
12805  CYTHON_FALLTHROUGH;
12806  case 1:
12807  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12808  else {
12809  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
12810  }
12811  }
12812  if (unlikely(kw_args > 0)) {
12813  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
12814  }
12815  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12816  goto __pyx_L5_argtuple_error;
12817  } else {
12818  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12819  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12820  }
12821  __pyx_v_obj = values[0];
12822  __pyx_v_m = values[1];
12823  }
12824  goto __pyx_L4_argument_unpacking_done;
12825  __pyx_L5_argtuple_error:;
12826  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
12827  __pyx_L3_error:;
12828  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12829  __Pyx_RefNannyFinishContext();
12830  return NULL;
12831  __pyx_L4_argument_unpacking_done:;
12832  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12833 
12834  /* function exit code */
12835  __Pyx_RefNannyFinishContext();
12836  return __pyx_r;
12837  }
12838 
12839  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12840  PyObject *__pyx_r = NULL;
12841  __Pyx_RefNannyDeclarations
12842  PyObject *__pyx_t_1 = NULL;
12843  __Pyx_RefNannySetupContext("pow", 0);
12844  __Pyx_XDECREF(__pyx_r);
12845  __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)
12846  __Pyx_GOTREF(__pyx_t_1);
12847  __pyx_r = __pyx_t_1;
12848  __pyx_t_1 = 0;
12849  goto __pyx_L0;
12850 
12851  /* function exit code */
12852  __pyx_L1_error:;
12853  __Pyx_XDECREF(__pyx_t_1);
12854  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12855  __pyx_r = NULL;
12856  __pyx_L0:;
12857  __Pyx_XGIVEREF(__pyx_r);
12858  __Pyx_RefNannyFinishContext();
12859  return __pyx_r;
12860  }
12861 
12862  /* "PyClical.pyx":1518
12863  * return clifford(obj).pow(m)
12864  *
12865  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12866  * """
12867  * Outer product power of multivector.
12868  */
12869 
12870  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12871  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12872  PyObject *__pyx_r = NULL;
12873  __Pyx_RefNannyDeclarations
12874  PyObject *__pyx_t_1 = NULL;
12875  PyObject *__pyx_t_2 = NULL;
12876  PyObject *__pyx_t_3 = NULL;
12877  __Pyx_RefNannySetupContext("outer_pow", 0);
12878 
12879  /* "PyClical.pyx":1525
12880  * 1+3{1}+3{1,2}
12881  * """
12882  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
12883  *
12884  * cpdef inline complexifier(obj):
12885  */
12886  __Pyx_XDECREF(__pyx_r);
12887  __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)
12888  __Pyx_GOTREF(__pyx_t_2);
12889  __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)
12890  __Pyx_GOTREF(__pyx_t_3);
12891  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12892  __pyx_t_2 = NULL;
12893  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12894  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12895  if (likely(__pyx_t_2)) {
12896  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12897  __Pyx_INCREF(__pyx_t_2);
12898  __Pyx_INCREF(function);
12899  __Pyx_DECREF_SET(__pyx_t_3, function);
12900  }
12901  }
12902  __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);
12903  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12904  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12905  __Pyx_GOTREF(__pyx_t_1);
12906  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12907  __pyx_r = __pyx_t_1;
12908  __pyx_t_1 = 0;
12909  goto __pyx_L0;
12910 
12911  /* "PyClical.pyx":1518
12912  * return clifford(obj).pow(m)
12913  *
12914  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12915  * """
12916  * Outer product power of multivector.
12917  */
12918 
12919  /* function exit code */
12920  __pyx_L1_error:;
12921  __Pyx_XDECREF(__pyx_t_1);
12922  __Pyx_XDECREF(__pyx_t_2);
12923  __Pyx_XDECREF(__pyx_t_3);
12924  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12925  __pyx_r = 0;
12926  __pyx_L0:;
12927  __Pyx_XGIVEREF(__pyx_r);
12928  __Pyx_RefNannyFinishContext();
12929  return __pyx_r;
12930  }
12931 
12932  /* Python wrapper */
12933  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12934  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 ";
12935  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12936  PyObject *__pyx_v_obj = 0;
12937  PyObject *__pyx_v_m = 0;
12938  PyObject *__pyx_r = 0;
12939  __Pyx_RefNannyDeclarations
12940  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
12941  {
12942  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12943  PyObject* values[2] = {0,0};
12944  if (unlikely(__pyx_kwds)) {
12945  Py_ssize_t kw_args;
12946  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12947  switch (pos_args) {
12948  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12949  CYTHON_FALLTHROUGH;
12950  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12951  CYTHON_FALLTHROUGH;
12952  case 0: break;
12953  default: goto __pyx_L5_argtuple_error;
12954  }
12955  kw_args = PyDict_Size(__pyx_kwds);
12956  switch (pos_args) {
12957  case 0:
12958  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12959  else goto __pyx_L5_argtuple_error;
12960  CYTHON_FALLTHROUGH;
12961  case 1:
12962  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12963  else {
12964  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
12965  }
12966  }
12967  if (unlikely(kw_args > 0)) {
12968  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
12969  }
12970  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12971  goto __pyx_L5_argtuple_error;
12972  } else {
12973  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12974  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12975  }
12976  __pyx_v_obj = values[0];
12977  __pyx_v_m = values[1];
12978  }
12979  goto __pyx_L4_argument_unpacking_done;
12980  __pyx_L5_argtuple_error:;
12981  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
12982  __pyx_L3_error:;
12983  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12984  __Pyx_RefNannyFinishContext();
12985  return NULL;
12986  __pyx_L4_argument_unpacking_done:;
12987  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12988 
12989  /* function exit code */
12990  __Pyx_RefNannyFinishContext();
12991  return __pyx_r;
12992  }
12993 
12994  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12995  PyObject *__pyx_r = NULL;
12996  __Pyx_RefNannyDeclarations
12997  PyObject *__pyx_t_1 = NULL;
12998  __Pyx_RefNannySetupContext("outer_pow", 0);
12999  __Pyx_XDECREF(__pyx_r);
13000  __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)
13001  __Pyx_GOTREF(__pyx_t_1);
13002  __pyx_r = __pyx_t_1;
13003  __pyx_t_1 = 0;
13004  goto __pyx_L0;
13005 
13006  /* function exit code */
13007  __pyx_L1_error:;
13008  __Pyx_XDECREF(__pyx_t_1);
13009  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13010  __pyx_r = NULL;
13011  __pyx_L0:;
13012  __Pyx_XGIVEREF(__pyx_r);
13013  __Pyx_RefNannyFinishContext();
13014  return __pyx_r;
13015  }
13016 
13017  /* "PyClical.pyx":1527
13018  * return clifford(obj).outer_pow(m)
13019  *
13020  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13021  * """
13022  * Square root of -1 which commutes with all members of the frame of the given multivector.
13023  */
13024 
13025  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13026  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13027  PyObject *__pyx_r = NULL;
13028  __Pyx_RefNannyDeclarations
13029  PyObject *__pyx_t_1 = NULL;
13030  PyObject *__pyx_t_2 = NULL;
13031  __Pyx_RefNannySetupContext("complexifier", 0);
13032 
13033  /* "PyClical.pyx":1540
13034  * {-1}
13035  * """
13036  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13037  *
13038  * cpdef inline sqrt(obj, i = None):
13039  */
13040  __Pyx_XDECREF(__pyx_r);
13041  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
13042  __Pyx_GOTREF(__pyx_t_1);
13043  __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)
13044  __Pyx_GOTREF(__pyx_t_2);
13045  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13046  __pyx_r = __pyx_t_2;
13047  __pyx_t_2 = 0;
13048  goto __pyx_L0;
13049 
13050  /* "PyClical.pyx":1527
13051  * return clifford(obj).outer_pow(m)
13052  *
13053  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13054  * """
13055  * Square root of -1 which commutes with all members of the frame of the given multivector.
13056  */
13057 
13058  /* function exit code */
13059  __pyx_L1_error:;
13060  __Pyx_XDECREF(__pyx_t_1);
13061  __Pyx_XDECREF(__pyx_t_2);
13062  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13063  __pyx_r = 0;
13064  __pyx_L0:;
13065  __Pyx_XGIVEREF(__pyx_r);
13066  __Pyx_RefNannyFinishContext();
13067  return __pyx_r;
13068  }
13069 
13070  /* Python wrapper */
13071  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13072  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 ";
13073  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13074  PyObject *__pyx_r = 0;
13075  __Pyx_RefNannyDeclarations
13076  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13077  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13078 
13079  /* function exit code */
13080  __Pyx_RefNannyFinishContext();
13081  return __pyx_r;
13082  }
13083 
13084  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13085  PyObject *__pyx_r = NULL;
13086  __Pyx_RefNannyDeclarations
13087  PyObject *__pyx_t_1 = NULL;
13088  __Pyx_RefNannySetupContext("complexifier", 0);
13089  __Pyx_XDECREF(__pyx_r);
13090  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13091  __Pyx_GOTREF(__pyx_t_1);
13092  __pyx_r = __pyx_t_1;
13093  __pyx_t_1 = 0;
13094  goto __pyx_L0;
13095 
13096  /* function exit code */
13097  __pyx_L1_error:;
13098  __Pyx_XDECREF(__pyx_t_1);
13099  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13100  __pyx_r = NULL;
13101  __pyx_L0:;
13102  __Pyx_XGIVEREF(__pyx_r);
13103  __Pyx_RefNannyFinishContext();
13104  return __pyx_r;
13105  }
13106 
13107  /* "PyClical.pyx":1542
13108  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13109  *
13110  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13111  * """
13112  * Square root of multivector with optional complexifier.
13113  */
13114 
13115  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13116  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) {
13117  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13118  PyObject *__pyx_r = NULL;
13119  __Pyx_RefNannyDeclarations
13120  int __pyx_t_1;
13121  int __pyx_t_2;
13122  PyObject *__pyx_t_3 = NULL;
13123  Clifford __pyx_t_4;
13124  PyObject *__pyx_t_5 = NULL;
13125  PyObject *__pyx_t_6 = NULL;
13126  PyObject *__pyx_t_7 = NULL;
13127  PyObject *__pyx_t_8 = NULL;
13128  PyObject *__pyx_t_9 = NULL;
13129  PyObject *__pyx_t_10 = NULL;
13130  PyObject *__pyx_t_11 = NULL;
13131  __Pyx_RefNannySetupContext("sqrt", 0);
13132  if (__pyx_optional_args) {
13133  if (__pyx_optional_args->__pyx_n > 0) {
13134  __pyx_v_i = __pyx_optional_args->i;
13135  }
13136  }
13137 
13138  /* "PyClical.pyx":1557
13139  * -1
13140  * """
13141  * if not (i is None): # <<<<<<<<<<<<<<
13142  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13143  * else:
13144  */
13145  __pyx_t_1 = (__pyx_v_i != Py_None);
13146  __pyx_t_2 = (__pyx_t_1 != 0);
13147  if (__pyx_t_2) {
13148 
13149  /* "PyClical.pyx":1558
13150  * """
13151  * if not (i is None):
13152  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13153  * else:
13154  * try:
13155  */
13156  __Pyx_XDECREF(__pyx_r);
13157  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
13158  __Pyx_GOTREF(__pyx_t_3);
13159  try {
13160  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13161  } catch(...) {
13162  __Pyx_CppExn2PyErr();
13163  __PYX_ERR(0, 1558, __pyx_L1_error)
13164  }
13165  __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)
13166  __Pyx_GOTREF(__pyx_t_5);
13167  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13168  __pyx_r = __pyx_t_5;
13169  __pyx_t_5 = 0;
13170  goto __pyx_L0;
13171 
13172  /* "PyClical.pyx":1557
13173  * -1
13174  * """
13175  * if not (i is None): # <<<<<<<<<<<<<<
13176  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13177  * else:
13178  */
13179  }
13180 
13181  /* "PyClical.pyx":1560
13182  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13183  * else:
13184  * try: # <<<<<<<<<<<<<<
13185  * return math.sqrt(obj)
13186  * except:
13187  */
13188  /*else*/ {
13189  {
13190  __Pyx_PyThreadState_declare
13191  __Pyx_PyThreadState_assign
13192  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13193  __Pyx_XGOTREF(__pyx_t_6);
13194  __Pyx_XGOTREF(__pyx_t_7);
13195  __Pyx_XGOTREF(__pyx_t_8);
13196  /*try:*/ {
13197 
13198  /* "PyClical.pyx":1561
13199  * else:
13200  * try:
13201  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13202  * except:
13203  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13204  */
13205  __Pyx_XDECREF(__pyx_r);
13206  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13207  __Pyx_GOTREF(__pyx_t_3);
13208  __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)
13209  __Pyx_GOTREF(__pyx_t_9);
13210  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13211  __pyx_t_3 = NULL;
13212  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13213  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13214  if (likely(__pyx_t_3)) {
13215  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13216  __Pyx_INCREF(__pyx_t_3);
13217  __Pyx_INCREF(function);
13218  __Pyx_DECREF_SET(__pyx_t_9, function);
13219  }
13220  }
13221  __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);
13222  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13223  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13224  __Pyx_GOTREF(__pyx_t_5);
13225  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13226  __pyx_r = __pyx_t_5;
13227  __pyx_t_5 = 0;
13228  goto __pyx_L8_try_return;
13229 
13230  /* "PyClical.pyx":1560
13231  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13232  * else:
13233  * try: # <<<<<<<<<<<<<<
13234  * return math.sqrt(obj)
13235  * except:
13236  */
13237  }
13238  __pyx_L4_error:;
13239  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13240  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13241  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13242 
13243  /* "PyClical.pyx":1562
13244  * try:
13245  * return math.sqrt(obj)
13246  * except: # <<<<<<<<<<<<<<
13247  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13248  *
13249  */
13250  /*except:*/ {
13251  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13252  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13253  __Pyx_GOTREF(__pyx_t_5);
13254  __Pyx_GOTREF(__pyx_t_9);
13255  __Pyx_GOTREF(__pyx_t_3);
13256 
13257  /* "PyClical.pyx":1563
13258  * return math.sqrt(obj)
13259  * except:
13260  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13261  *
13262  * cpdef inline exp(obj):
13263  */
13264  __Pyx_XDECREF(__pyx_r);
13265  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13266  __Pyx_GOTREF(__pyx_t_10);
13267  __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)
13268  __Pyx_GOTREF(__pyx_t_11);
13269  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13270  __pyx_r = __pyx_t_11;
13271  __pyx_t_11 = 0;
13272  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13273  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13274  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13275  goto __pyx_L7_except_return;
13276  }
13277  __pyx_L6_except_error:;
13278 
13279  /* "PyClical.pyx":1560
13280  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13281  * else:
13282  * try: # <<<<<<<<<<<<<<
13283  * return math.sqrt(obj)
13284  * except:
13285  */
13286  __Pyx_XGIVEREF(__pyx_t_6);
13287  __Pyx_XGIVEREF(__pyx_t_7);
13288  __Pyx_XGIVEREF(__pyx_t_8);
13289  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13290  goto __pyx_L1_error;
13291  __pyx_L8_try_return:;
13292  __Pyx_XGIVEREF(__pyx_t_6);
13293  __Pyx_XGIVEREF(__pyx_t_7);
13294  __Pyx_XGIVEREF(__pyx_t_8);
13295  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13296  goto __pyx_L0;
13297  __pyx_L7_except_return:;
13298  __Pyx_XGIVEREF(__pyx_t_6);
13299  __Pyx_XGIVEREF(__pyx_t_7);
13300  __Pyx_XGIVEREF(__pyx_t_8);
13301  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13302  goto __pyx_L0;
13303  }
13304  }
13305 
13306  /* "PyClical.pyx":1542
13307  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13308  *
13309  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13310  * """
13311  * Square root of multivector with optional complexifier.
13312  */
13313 
13314  /* function exit code */
13315  __pyx_L1_error:;
13316  __Pyx_XDECREF(__pyx_t_3);
13317  __Pyx_XDECREF(__pyx_t_5);
13318  __Pyx_XDECREF(__pyx_t_9);
13319  __Pyx_XDECREF(__pyx_t_10);
13320  __Pyx_XDECREF(__pyx_t_11);
13321  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13322  __pyx_r = 0;
13323  __pyx_L0:;
13324  __Pyx_XGIVEREF(__pyx_r);
13325  __Pyx_RefNannyFinishContext();
13326  return __pyx_r;
13327  }
13328 
13329  /* Python wrapper */
13330  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13331  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 ";
13332  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13333  PyObject *__pyx_v_obj = 0;
13334  PyObject *__pyx_v_i = 0;
13335  PyObject *__pyx_r = 0;
13336  __Pyx_RefNannyDeclarations
13337  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13338  {
13339  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13340  PyObject* values[2] = {0,0};
13341  values[1] = ((PyObject *)Py_None);
13342  if (unlikely(__pyx_kwds)) {
13343  Py_ssize_t kw_args;
13344  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13345  switch (pos_args) {
13346  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13347  CYTHON_FALLTHROUGH;
13348  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13349  CYTHON_FALLTHROUGH;
13350  case 0: break;
13351  default: goto __pyx_L5_argtuple_error;
13352  }
13353  kw_args = PyDict_Size(__pyx_kwds);
13354  switch (pos_args) {
13355  case 0:
13356  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13357  else goto __pyx_L5_argtuple_error;
13358  CYTHON_FALLTHROUGH;
13359  case 1:
13360  if (kw_args > 0) {
13361  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13362  if (value) { values[1] = value; kw_args--; }
13363  }
13364  }
13365  if (unlikely(kw_args > 0)) {
13366  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13367  }
13368  } else {
13369  switch (PyTuple_GET_SIZE(__pyx_args)) {
13370  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13371  CYTHON_FALLTHROUGH;
13372  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13373  break;
13374  default: goto __pyx_L5_argtuple_error;
13375  }
13376  }
13377  __pyx_v_obj = values[0];
13378  __pyx_v_i = values[1];
13379  }
13380  goto __pyx_L4_argument_unpacking_done;
13381  __pyx_L5_argtuple_error:;
13382  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13383  __pyx_L3_error:;
13384  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13385  __Pyx_RefNannyFinishContext();
13386  return NULL;
13387  __pyx_L4_argument_unpacking_done:;
13388  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13389 
13390  /* function exit code */
13391  __Pyx_RefNannyFinishContext();
13392  return __pyx_r;
13393  }
13394 
13395  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13396  PyObject *__pyx_r = NULL;
13397  __Pyx_RefNannyDeclarations
13398  PyObject *__pyx_t_1 = NULL;
13399  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13400  __Pyx_RefNannySetupContext("sqrt", 0);
13401  __Pyx_XDECREF(__pyx_r);
13402  __pyx_t_2.__pyx_n = 1;
13403  __pyx_t_2.i = __pyx_v_i;
13404  __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)
13405  __Pyx_GOTREF(__pyx_t_1);
13406  __pyx_r = __pyx_t_1;
13407  __pyx_t_1 = 0;
13408  goto __pyx_L0;
13409 
13410  /* function exit code */
13411  __pyx_L1_error:;
13412  __Pyx_XDECREF(__pyx_t_1);
13413  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13414  __pyx_r = NULL;
13415  __pyx_L0:;
13416  __Pyx_XGIVEREF(__pyx_r);
13417  __Pyx_RefNannyFinishContext();
13418  return __pyx_r;
13419  }
13420 
13421  /* "PyClical.pyx":1565
13422  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13423  *
13424  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13425  * """
13426  * Exponential of multivector.
13427  */
13428 
13429  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13430  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13431  PyObject *__pyx_r = NULL;
13432  __Pyx_RefNannyDeclarations
13433  PyObject *__pyx_t_1 = NULL;
13434  PyObject *__pyx_t_2 = NULL;
13435  PyObject *__pyx_t_3 = NULL;
13436  PyObject *__pyx_t_4 = NULL;
13437  PyObject *__pyx_t_5 = NULL;
13438  PyObject *__pyx_t_6 = NULL;
13439  PyObject *__pyx_t_7 = NULL;
13440  PyObject *__pyx_t_8 = NULL;
13441  __Pyx_RefNannySetupContext("exp", 0);
13442 
13443  /* "PyClical.pyx":1574
13444  * {1,2}
13445  * """
13446  * try: # <<<<<<<<<<<<<<
13447  * return math.exp(obj)
13448  * except:
13449  */
13450  {
13451  __Pyx_PyThreadState_declare
13452  __Pyx_PyThreadState_assign
13453  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13454  __Pyx_XGOTREF(__pyx_t_1);
13455  __Pyx_XGOTREF(__pyx_t_2);
13456  __Pyx_XGOTREF(__pyx_t_3);
13457  /*try:*/ {
13458 
13459  /* "PyClical.pyx":1575
13460  * """
13461  * try:
13462  * return math.exp(obj) # <<<<<<<<<<<<<<
13463  * except:
13464  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13465  */
13466  __Pyx_XDECREF(__pyx_r);
13467  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13468  __Pyx_GOTREF(__pyx_t_5);
13469  __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)
13470  __Pyx_GOTREF(__pyx_t_6);
13471  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13472  __pyx_t_5 = NULL;
13473  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13474  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13475  if (likely(__pyx_t_5)) {
13476  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13477  __Pyx_INCREF(__pyx_t_5);
13478  __Pyx_INCREF(function);
13479  __Pyx_DECREF_SET(__pyx_t_6, function);
13480  }
13481  }
13482  __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);
13483  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13484  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13485  __Pyx_GOTREF(__pyx_t_4);
13486  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13487  __pyx_r = __pyx_t_4;
13488  __pyx_t_4 = 0;
13489  goto __pyx_L7_try_return;
13490 
13491  /* "PyClical.pyx":1574
13492  * {1,2}
13493  * """
13494  * try: # <<<<<<<<<<<<<<
13495  * return math.exp(obj)
13496  * except:
13497  */
13498  }
13499  __pyx_L3_error:;
13500  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13501  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13502  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13503 
13504  /* "PyClical.pyx":1576
13505  * try:
13506  * return math.exp(obj)
13507  * except: # <<<<<<<<<<<<<<
13508  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13509  *
13510  */
13511  /*except:*/ {
13512  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13513  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13514  __Pyx_GOTREF(__pyx_t_4);
13515  __Pyx_GOTREF(__pyx_t_6);
13516  __Pyx_GOTREF(__pyx_t_5);
13517 
13518  /* "PyClical.pyx":1577
13519  * return math.exp(obj)
13520  * except:
13521  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13522  *
13523  * cpdef inline log(obj,i = None):
13524  */
13525  __Pyx_XDECREF(__pyx_r);
13526  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13527  __Pyx_GOTREF(__pyx_t_7);
13528  __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)
13529  __Pyx_GOTREF(__pyx_t_8);
13530  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13531  __pyx_r = __pyx_t_8;
13532  __pyx_t_8 = 0;
13533  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13534  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13535  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13536  goto __pyx_L6_except_return;
13537  }
13538  __pyx_L5_except_error:;
13539 
13540  /* "PyClical.pyx":1574
13541  * {1,2}
13542  * """
13543  * try: # <<<<<<<<<<<<<<
13544  * return math.exp(obj)
13545  * except:
13546  */
13547  __Pyx_XGIVEREF(__pyx_t_1);
13548  __Pyx_XGIVEREF(__pyx_t_2);
13549  __Pyx_XGIVEREF(__pyx_t_3);
13550  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13551  goto __pyx_L1_error;
13552  __pyx_L7_try_return:;
13553  __Pyx_XGIVEREF(__pyx_t_1);
13554  __Pyx_XGIVEREF(__pyx_t_2);
13555  __Pyx_XGIVEREF(__pyx_t_3);
13556  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13557  goto __pyx_L0;
13558  __pyx_L6_except_return:;
13559  __Pyx_XGIVEREF(__pyx_t_1);
13560  __Pyx_XGIVEREF(__pyx_t_2);
13561  __Pyx_XGIVEREF(__pyx_t_3);
13562  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13563  goto __pyx_L0;
13564  }
13565 
13566  /* "PyClical.pyx":1565
13567  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13568  *
13569  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13570  * """
13571  * Exponential of multivector.
13572  */
13573 
13574  /* function exit code */
13575  __pyx_L1_error:;
13576  __Pyx_XDECREF(__pyx_t_4);
13577  __Pyx_XDECREF(__pyx_t_5);
13578  __Pyx_XDECREF(__pyx_t_6);
13579  __Pyx_XDECREF(__pyx_t_7);
13580  __Pyx_XDECREF(__pyx_t_8);
13581  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13582  __pyx_r = 0;
13583  __pyx_L0:;
13584  __Pyx_XGIVEREF(__pyx_r);
13585  __Pyx_RefNannyFinishContext();
13586  return __pyx_r;
13587  }
13588 
13589  /* Python wrapper */
13590  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13591  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 ";
13592  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13593  PyObject *__pyx_r = 0;
13594  __Pyx_RefNannyDeclarations
13595  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13596  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13597 
13598  /* function exit code */
13599  __Pyx_RefNannyFinishContext();
13600  return __pyx_r;
13601  }
13602 
13603  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13604  PyObject *__pyx_r = NULL;
13605  __Pyx_RefNannyDeclarations
13606  PyObject *__pyx_t_1 = NULL;
13607  __Pyx_RefNannySetupContext("exp", 0);
13608  __Pyx_XDECREF(__pyx_r);
13609  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13610  __Pyx_GOTREF(__pyx_t_1);
13611  __pyx_r = __pyx_t_1;
13612  __pyx_t_1 = 0;
13613  goto __pyx_L0;
13614 
13615  /* function exit code */
13616  __pyx_L1_error:;
13617  __Pyx_XDECREF(__pyx_t_1);
13618  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13619  __pyx_r = NULL;
13620  __pyx_L0:;
13621  __Pyx_XGIVEREF(__pyx_r);
13622  __Pyx_RefNannyFinishContext();
13623  return __pyx_r;
13624  }
13625 
13626  /* "PyClical.pyx":1579
13627  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13628  *
13629  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13630  * """
13631  * Natural logarithm of multivector with optional complexifier.
13632  */
13633 
13634  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13635  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) {
13636  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13637  PyObject *__pyx_r = NULL;
13638  __Pyx_RefNannyDeclarations
13639  int __pyx_t_1;
13640  int __pyx_t_2;
13641  PyObject *__pyx_t_3 = NULL;
13642  Clifford __pyx_t_4;
13643  PyObject *__pyx_t_5 = NULL;
13644  PyObject *__pyx_t_6 = NULL;
13645  PyObject *__pyx_t_7 = NULL;
13646  PyObject *__pyx_t_8 = NULL;
13647  PyObject *__pyx_t_9 = NULL;
13648  PyObject *__pyx_t_10 = NULL;
13649  PyObject *__pyx_t_11 = NULL;
13650  __Pyx_RefNannySetupContext("log", 0);
13651  if (__pyx_optional_args) {
13652  if (__pyx_optional_args->__pyx_n > 0) {
13653  __pyx_v_i = __pyx_optional_args->i;
13654  }
13655  }
13656 
13657  /* "PyClical.pyx":1594
13658  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13659  * """
13660  * if not (i is None): # <<<<<<<<<<<<<<
13661  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13662  * else:
13663  */
13664  __pyx_t_1 = (__pyx_v_i != Py_None);
13665  __pyx_t_2 = (__pyx_t_1 != 0);
13666  if (__pyx_t_2) {
13667 
13668  /* "PyClical.pyx":1595
13669  * """
13670  * if not (i is None):
13671  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13672  * else:
13673  * try:
13674  */
13675  __Pyx_XDECREF(__pyx_r);
13676  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
13677  __Pyx_GOTREF(__pyx_t_3);
13678  try {
13679  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13680  } catch(...) {
13681  __Pyx_CppExn2PyErr();
13682  __PYX_ERR(0, 1595, __pyx_L1_error)
13683  }
13684  __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)
13685  __Pyx_GOTREF(__pyx_t_5);
13686  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13687  __pyx_r = __pyx_t_5;
13688  __pyx_t_5 = 0;
13689  goto __pyx_L0;
13690 
13691  /* "PyClical.pyx":1594
13692  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13693  * """
13694  * if not (i is None): # <<<<<<<<<<<<<<
13695  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13696  * else:
13697  */
13698  }
13699 
13700  /* "PyClical.pyx":1597
13701  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13702  * else:
13703  * try: # <<<<<<<<<<<<<<
13704  * return math.log(obj)
13705  * except:
13706  */
13707  /*else*/ {
13708  {
13709  __Pyx_PyThreadState_declare
13710  __Pyx_PyThreadState_assign
13711  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13712  __Pyx_XGOTREF(__pyx_t_6);
13713  __Pyx_XGOTREF(__pyx_t_7);
13714  __Pyx_XGOTREF(__pyx_t_8);
13715  /*try:*/ {
13716 
13717  /* "PyClical.pyx":1598
13718  * else:
13719  * try:
13720  * return math.log(obj) # <<<<<<<<<<<<<<
13721  * except:
13722  * return clifford().wrap( glucat.log(toClifford(obj)) )
13723  */
13724  __Pyx_XDECREF(__pyx_r);
13725  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
13726  __Pyx_GOTREF(__pyx_t_3);
13727  __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)
13728  __Pyx_GOTREF(__pyx_t_9);
13729  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13730  __pyx_t_3 = NULL;
13731  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13732  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13733  if (likely(__pyx_t_3)) {
13734  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13735  __Pyx_INCREF(__pyx_t_3);
13736  __Pyx_INCREF(function);
13737  __Pyx_DECREF_SET(__pyx_t_9, function);
13738  }
13739  }
13740  __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);
13741  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13742  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13743  __Pyx_GOTREF(__pyx_t_5);
13744  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13745  __pyx_r = __pyx_t_5;
13746  __pyx_t_5 = 0;
13747  goto __pyx_L8_try_return;
13748 
13749  /* "PyClical.pyx":1597
13750  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13751  * else:
13752  * try: # <<<<<<<<<<<<<<
13753  * return math.log(obj)
13754  * except:
13755  */
13756  }
13757  __pyx_L4_error:;
13758  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13759  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13760  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13761 
13762  /* "PyClical.pyx":1599
13763  * try:
13764  * return math.log(obj)
13765  * except: # <<<<<<<<<<<<<<
13766  * return clifford().wrap( glucat.log(toClifford(obj)) )
13767  *
13768  */
13769  /*except:*/ {
13770  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13771  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
13772  __Pyx_GOTREF(__pyx_t_5);
13773  __Pyx_GOTREF(__pyx_t_9);
13774  __Pyx_GOTREF(__pyx_t_3);
13775 
13776  /* "PyClical.pyx":1600
13777  * return math.log(obj)
13778  * except:
13779  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
13780  *
13781  * cpdef inline cos(obj,i = None):
13782  */
13783  __Pyx_XDECREF(__pyx_r);
13784  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13785  __Pyx_GOTREF(__pyx_t_10);
13786  __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)
13787  __Pyx_GOTREF(__pyx_t_11);
13788  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13789  __pyx_r = __pyx_t_11;
13790  __pyx_t_11 = 0;
13791  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13792  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13793  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13794  goto __pyx_L7_except_return;
13795  }
13796  __pyx_L6_except_error:;
13797 
13798  /* "PyClical.pyx":1597
13799  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13800  * else:
13801  * try: # <<<<<<<<<<<<<<
13802  * return math.log(obj)
13803  * except:
13804  */
13805  __Pyx_XGIVEREF(__pyx_t_6);
13806  __Pyx_XGIVEREF(__pyx_t_7);
13807  __Pyx_XGIVEREF(__pyx_t_8);
13808  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13809  goto __pyx_L1_error;
13810  __pyx_L8_try_return:;
13811  __Pyx_XGIVEREF(__pyx_t_6);
13812  __Pyx_XGIVEREF(__pyx_t_7);
13813  __Pyx_XGIVEREF(__pyx_t_8);
13814  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13815  goto __pyx_L0;
13816  __pyx_L7_except_return:;
13817  __Pyx_XGIVEREF(__pyx_t_6);
13818  __Pyx_XGIVEREF(__pyx_t_7);
13819  __Pyx_XGIVEREF(__pyx_t_8);
13820  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13821  goto __pyx_L0;
13822  }
13823  }
13824 
13825  /* "PyClical.pyx":1579
13826  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13827  *
13828  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13829  * """
13830  * Natural logarithm of multivector with optional complexifier.
13831  */
13832 
13833  /* function exit code */
13834  __pyx_L1_error:;
13835  __Pyx_XDECREF(__pyx_t_3);
13836  __Pyx_XDECREF(__pyx_t_5);
13837  __Pyx_XDECREF(__pyx_t_9);
13838  __Pyx_XDECREF(__pyx_t_10);
13839  __Pyx_XDECREF(__pyx_t_11);
13840  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13841  __pyx_r = 0;
13842  __pyx_L0:;
13843  __Pyx_XGIVEREF(__pyx_r);
13844  __Pyx_RefNannyFinishContext();
13845  return __pyx_r;
13846  }
13847 
13848  /* Python wrapper */
13849  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13850  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 ";
13851  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13852  PyObject *__pyx_v_obj = 0;
13853  PyObject *__pyx_v_i = 0;
13854  PyObject *__pyx_r = 0;
13855  __Pyx_RefNannyDeclarations
13856  __Pyx_RefNannySetupContext("log (wrapper)", 0);
13857  {
13858  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13859  PyObject* values[2] = {0,0};
13860  values[1] = ((PyObject *)Py_None);
13861  if (unlikely(__pyx_kwds)) {
13862  Py_ssize_t kw_args;
13863  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13864  switch (pos_args) {
13865  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13866  CYTHON_FALLTHROUGH;
13867  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13868  CYTHON_FALLTHROUGH;
13869  case 0: break;
13870  default: goto __pyx_L5_argtuple_error;
13871  }
13872  kw_args = PyDict_Size(__pyx_kwds);
13873  switch (pos_args) {
13874  case 0:
13875  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13876  else goto __pyx_L5_argtuple_error;
13877  CYTHON_FALLTHROUGH;
13878  case 1:
13879  if (kw_args > 0) {
13880  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13881  if (value) { values[1] = value; kw_args--; }
13882  }
13883  }
13884  if (unlikely(kw_args > 0)) {
13885  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
13886  }
13887  } else {
13888  switch (PyTuple_GET_SIZE(__pyx_args)) {
13889  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13890  CYTHON_FALLTHROUGH;
13891  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13892  break;
13893  default: goto __pyx_L5_argtuple_error;
13894  }
13895  }
13896  __pyx_v_obj = values[0];
13897  __pyx_v_i = values[1];
13898  }
13899  goto __pyx_L4_argument_unpacking_done;
13900  __pyx_L5_argtuple_error:;
13901  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
13902  __pyx_L3_error:;
13903  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13904  __Pyx_RefNannyFinishContext();
13905  return NULL;
13906  __pyx_L4_argument_unpacking_done:;
13907  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13908 
13909  /* function exit code */
13910  __Pyx_RefNannyFinishContext();
13911  return __pyx_r;
13912  }
13913 
13914  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13915  PyObject *__pyx_r = NULL;
13916  __Pyx_RefNannyDeclarations
13917  PyObject *__pyx_t_1 = NULL;
13918  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13919  __Pyx_RefNannySetupContext("log", 0);
13920  __Pyx_XDECREF(__pyx_r);
13921  __pyx_t_2.__pyx_n = 1;
13922  __pyx_t_2.i = __pyx_v_i;
13923  __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)
13924  __Pyx_GOTREF(__pyx_t_1);
13925  __pyx_r = __pyx_t_1;
13926  __pyx_t_1 = 0;
13927  goto __pyx_L0;
13928 
13929  /* function exit code */
13930  __pyx_L1_error:;
13931  __Pyx_XDECREF(__pyx_t_1);
13932  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13933  __pyx_r = NULL;
13934  __pyx_L0:;
13935  __Pyx_XGIVEREF(__pyx_r);
13936  __Pyx_RefNannyFinishContext();
13937  return __pyx_r;
13938  }
13939 
13940  /* "PyClical.pyx":1602
13941  * return clifford().wrap( glucat.log(toClifford(obj)) )
13942  *
13943  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
13944  * """
13945  * Cosine of multivector with optional complexifier.
13946  */
13947 
13948  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13949  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) {
13950  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13951  PyObject *__pyx_r = NULL;
13952  __Pyx_RefNannyDeclarations
13953  int __pyx_t_1;
13954  int __pyx_t_2;
13955  PyObject *__pyx_t_3 = NULL;
13956  Clifford __pyx_t_4;
13957  PyObject *__pyx_t_5 = NULL;
13958  PyObject *__pyx_t_6 = NULL;
13959  PyObject *__pyx_t_7 = NULL;
13960  PyObject *__pyx_t_8 = NULL;
13961  PyObject *__pyx_t_9 = NULL;
13962  PyObject *__pyx_t_10 = NULL;
13963  PyObject *__pyx_t_11 = NULL;
13964  __Pyx_RefNannySetupContext("cos", 0);
13965  if (__pyx_optional_args) {
13966  if (__pyx_optional_args->__pyx_n > 0) {
13967  __pyx_v_i = __pyx_optional_args->i;
13968  }
13969  }
13970 
13971  /* "PyClical.pyx":1611
13972  * {1,2}
13973  * """
13974  * if not (i is None): # <<<<<<<<<<<<<<
13975  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
13976  * else:
13977  */
13978  __pyx_t_1 = (__pyx_v_i != Py_None);
13979  __pyx_t_2 = (__pyx_t_1 != 0);
13980  if (__pyx_t_2) {
13981 
13982  /* "PyClical.pyx":1612
13983  * """
13984  * if not (i is None):
13985  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13986  * else:
13987  * try:
13988  */
13989  __Pyx_XDECREF(__pyx_r);
13990  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
13991  __Pyx_GOTREF(__pyx_t_3);
13992  try {
13993  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13994  } catch(...) {
13995  __Pyx_CppExn2PyErr();
13996  __PYX_ERR(0, 1612, __pyx_L1_error)
13997  }
13998  __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)
13999  __Pyx_GOTREF(__pyx_t_5);
14000  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14001  __pyx_r = __pyx_t_5;
14002  __pyx_t_5 = 0;
14003  goto __pyx_L0;
14004 
14005  /* "PyClical.pyx":1611
14006  * {1,2}
14007  * """
14008  * if not (i is None): # <<<<<<<<<<<<<<
14009  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14010  * else:
14011  */
14012  }
14013 
14014  /* "PyClical.pyx":1614
14015  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14016  * else:
14017  * try: # <<<<<<<<<<<<<<
14018  * return math.cos(obj)
14019  * except:
14020  */
14021  /*else*/ {
14022  {
14023  __Pyx_PyThreadState_declare
14024  __Pyx_PyThreadState_assign
14025  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14026  __Pyx_XGOTREF(__pyx_t_6);
14027  __Pyx_XGOTREF(__pyx_t_7);
14028  __Pyx_XGOTREF(__pyx_t_8);
14029  /*try:*/ {
14030 
14031  /* "PyClical.pyx":1615
14032  * else:
14033  * try:
14034  * return math.cos(obj) # <<<<<<<<<<<<<<
14035  * except:
14036  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14037  */
14038  __Pyx_XDECREF(__pyx_r);
14039  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14040  __Pyx_GOTREF(__pyx_t_3);
14041  __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)
14042  __Pyx_GOTREF(__pyx_t_9);
14043  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14044  __pyx_t_3 = NULL;
14045  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14046  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14047  if (likely(__pyx_t_3)) {
14048  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14049  __Pyx_INCREF(__pyx_t_3);
14050  __Pyx_INCREF(function);
14051  __Pyx_DECREF_SET(__pyx_t_9, function);
14052  }
14053  }
14054  __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);
14055  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14056  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14057  __Pyx_GOTREF(__pyx_t_5);
14058  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14059  __pyx_r = __pyx_t_5;
14060  __pyx_t_5 = 0;
14061  goto __pyx_L8_try_return;
14062 
14063  /* "PyClical.pyx":1614
14064  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14065  * else:
14066  * try: # <<<<<<<<<<<<<<
14067  * return math.cos(obj)
14068  * except:
14069  */
14070  }
14071  __pyx_L4_error:;
14072  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14073  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14074  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14075 
14076  /* "PyClical.pyx":1616
14077  * try:
14078  * return math.cos(obj)
14079  * except: # <<<<<<<<<<<<<<
14080  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14081  *
14082  */
14083  /*except:*/ {
14084  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14085  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14086  __Pyx_GOTREF(__pyx_t_5);
14087  __Pyx_GOTREF(__pyx_t_9);
14088  __Pyx_GOTREF(__pyx_t_3);
14089 
14090  /* "PyClical.pyx":1617
14091  * return math.cos(obj)
14092  * except:
14093  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14094  *
14095  * cpdef inline acos(obj,i = None):
14096  */
14097  __Pyx_XDECREF(__pyx_r);
14098  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14099  __Pyx_GOTREF(__pyx_t_10);
14100  __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)
14101  __Pyx_GOTREF(__pyx_t_11);
14102  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14103  __pyx_r = __pyx_t_11;
14104  __pyx_t_11 = 0;
14105  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14106  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14107  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14108  goto __pyx_L7_except_return;
14109  }
14110  __pyx_L6_except_error:;
14111 
14112  /* "PyClical.pyx":1614
14113  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14114  * else:
14115  * try: # <<<<<<<<<<<<<<
14116  * return math.cos(obj)
14117  * except:
14118  */
14119  __Pyx_XGIVEREF(__pyx_t_6);
14120  __Pyx_XGIVEREF(__pyx_t_7);
14121  __Pyx_XGIVEREF(__pyx_t_8);
14122  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14123  goto __pyx_L1_error;
14124  __pyx_L8_try_return:;
14125  __Pyx_XGIVEREF(__pyx_t_6);
14126  __Pyx_XGIVEREF(__pyx_t_7);
14127  __Pyx_XGIVEREF(__pyx_t_8);
14128  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14129  goto __pyx_L0;
14130  __pyx_L7_except_return:;
14131  __Pyx_XGIVEREF(__pyx_t_6);
14132  __Pyx_XGIVEREF(__pyx_t_7);
14133  __Pyx_XGIVEREF(__pyx_t_8);
14134  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14135  goto __pyx_L0;
14136  }
14137  }
14138 
14139  /* "PyClical.pyx":1602
14140  * return clifford().wrap( glucat.log(toClifford(obj)) )
14141  *
14142  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14143  * """
14144  * Cosine of multivector with optional complexifier.
14145  */
14146 
14147  /* function exit code */
14148  __pyx_L1_error:;
14149  __Pyx_XDECREF(__pyx_t_3);
14150  __Pyx_XDECREF(__pyx_t_5);
14151  __Pyx_XDECREF(__pyx_t_9);
14152  __Pyx_XDECREF(__pyx_t_10);
14153  __Pyx_XDECREF(__pyx_t_11);
14154  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14155  __pyx_r = 0;
14156  __pyx_L0:;
14157  __Pyx_XGIVEREF(__pyx_r);
14158  __Pyx_RefNannyFinishContext();
14159  return __pyx_r;
14160  }
14161 
14162  /* Python wrapper */
14163  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14164  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 ";
14165  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14166  PyObject *__pyx_v_obj = 0;
14167  PyObject *__pyx_v_i = 0;
14168  PyObject *__pyx_r = 0;
14169  __Pyx_RefNannyDeclarations
14170  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14171  {
14172  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14173  PyObject* values[2] = {0,0};
14174  values[1] = ((PyObject *)Py_None);
14175  if (unlikely(__pyx_kwds)) {
14176  Py_ssize_t kw_args;
14177  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14178  switch (pos_args) {
14179  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14180  CYTHON_FALLTHROUGH;
14181  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14182  CYTHON_FALLTHROUGH;
14183  case 0: break;
14184  default: goto __pyx_L5_argtuple_error;
14185  }
14186  kw_args = PyDict_Size(__pyx_kwds);
14187  switch (pos_args) {
14188  case 0:
14189  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14190  else goto __pyx_L5_argtuple_error;
14191  CYTHON_FALLTHROUGH;
14192  case 1:
14193  if (kw_args > 0) {
14194  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14195  if (value) { values[1] = value; kw_args--; }
14196  }
14197  }
14198  if (unlikely(kw_args > 0)) {
14199  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14200  }
14201  } else {
14202  switch (PyTuple_GET_SIZE(__pyx_args)) {
14203  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14204  CYTHON_FALLTHROUGH;
14205  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14206  break;
14207  default: goto __pyx_L5_argtuple_error;
14208  }
14209  }
14210  __pyx_v_obj = values[0];
14211  __pyx_v_i = values[1];
14212  }
14213  goto __pyx_L4_argument_unpacking_done;
14214  __pyx_L5_argtuple_error:;
14215  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14216  __pyx_L3_error:;
14217  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14218  __Pyx_RefNannyFinishContext();
14219  return NULL;
14220  __pyx_L4_argument_unpacking_done:;
14221  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14222 
14223  /* function exit code */
14224  __Pyx_RefNannyFinishContext();
14225  return __pyx_r;
14226  }
14227 
14228  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14229  PyObject *__pyx_r = NULL;
14230  __Pyx_RefNannyDeclarations
14231  PyObject *__pyx_t_1 = NULL;
14232  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14233  __Pyx_RefNannySetupContext("cos", 0);
14234  __Pyx_XDECREF(__pyx_r);
14235  __pyx_t_2.__pyx_n = 1;
14236  __pyx_t_2.i = __pyx_v_i;
14237  __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)
14238  __Pyx_GOTREF(__pyx_t_1);
14239  __pyx_r = __pyx_t_1;
14240  __pyx_t_1 = 0;
14241  goto __pyx_L0;
14242 
14243  /* function exit code */
14244  __pyx_L1_error:;
14245  __Pyx_XDECREF(__pyx_t_1);
14246  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14247  __pyx_r = NULL;
14248  __pyx_L0:;
14249  __Pyx_XGIVEREF(__pyx_r);
14250  __Pyx_RefNannyFinishContext();
14251  return __pyx_r;
14252  }
14253 
14254  /* "PyClical.pyx":1619
14255  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14256  *
14257  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14258  * """
14259  * Inverse cosine of multivector with optional complexifier.
14260  */
14261 
14262  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14263  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) {
14264  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14265  PyObject *__pyx_r = NULL;
14266  __Pyx_RefNannyDeclarations
14267  int __pyx_t_1;
14268  int __pyx_t_2;
14269  PyObject *__pyx_t_3 = NULL;
14270  Clifford __pyx_t_4;
14271  PyObject *__pyx_t_5 = NULL;
14272  PyObject *__pyx_t_6 = NULL;
14273  PyObject *__pyx_t_7 = NULL;
14274  PyObject *__pyx_t_8 = NULL;
14275  PyObject *__pyx_t_9 = NULL;
14276  PyObject *__pyx_t_10 = NULL;
14277  PyObject *__pyx_t_11 = NULL;
14278  __Pyx_RefNannySetupContext("acos", 0);
14279  if (__pyx_optional_args) {
14280  if (__pyx_optional_args->__pyx_n > 0) {
14281  __pyx_v_i = __pyx_optional_args->i;
14282  }
14283  }
14284 
14285  /* "PyClical.pyx":1632
14286  * {1,2}
14287  * """
14288  * if not (i is None): # <<<<<<<<<<<<<<
14289  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14290  * else:
14291  */
14292  __pyx_t_1 = (__pyx_v_i != Py_None);
14293  __pyx_t_2 = (__pyx_t_1 != 0);
14294  if (__pyx_t_2) {
14295 
14296  /* "PyClical.pyx":1633
14297  * """
14298  * if not (i is None):
14299  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14300  * else:
14301  * try:
14302  */
14303  __Pyx_XDECREF(__pyx_r);
14304  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
14305  __Pyx_GOTREF(__pyx_t_3);
14306  try {
14307  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14308  } catch(...) {
14309  __Pyx_CppExn2PyErr();
14310  __PYX_ERR(0, 1633, __pyx_L1_error)
14311  }
14312  __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)
14313  __Pyx_GOTREF(__pyx_t_5);
14314  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14315  __pyx_r = __pyx_t_5;
14316  __pyx_t_5 = 0;
14317  goto __pyx_L0;
14318 
14319  /* "PyClical.pyx":1632
14320  * {1,2}
14321  * """
14322  * if not (i is None): # <<<<<<<<<<<<<<
14323  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14324  * else:
14325  */
14326  }
14327 
14328  /* "PyClical.pyx":1635
14329  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14330  * else:
14331  * try: # <<<<<<<<<<<<<<
14332  * return math.acos(obj)
14333  * except:
14334  */
14335  /*else*/ {
14336  {
14337  __Pyx_PyThreadState_declare
14338  __Pyx_PyThreadState_assign
14339  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14340  __Pyx_XGOTREF(__pyx_t_6);
14341  __Pyx_XGOTREF(__pyx_t_7);
14342  __Pyx_XGOTREF(__pyx_t_8);
14343  /*try:*/ {
14344 
14345  /* "PyClical.pyx":1636
14346  * else:
14347  * try:
14348  * return math.acos(obj) # <<<<<<<<<<<<<<
14349  * except:
14350  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14351  */
14352  __Pyx_XDECREF(__pyx_r);
14353  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14354  __Pyx_GOTREF(__pyx_t_3);
14355  __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)
14356  __Pyx_GOTREF(__pyx_t_9);
14357  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14358  __pyx_t_3 = NULL;
14359  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14360  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14361  if (likely(__pyx_t_3)) {
14362  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14363  __Pyx_INCREF(__pyx_t_3);
14364  __Pyx_INCREF(function);
14365  __Pyx_DECREF_SET(__pyx_t_9, function);
14366  }
14367  }
14368  __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);
14369  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14370  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14371  __Pyx_GOTREF(__pyx_t_5);
14372  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14373  __pyx_r = __pyx_t_5;
14374  __pyx_t_5 = 0;
14375  goto __pyx_L8_try_return;
14376 
14377  /* "PyClical.pyx":1635
14378  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14379  * else:
14380  * try: # <<<<<<<<<<<<<<
14381  * return math.acos(obj)
14382  * except:
14383  */
14384  }
14385  __pyx_L4_error:;
14386  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14387  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14388  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14389 
14390  /* "PyClical.pyx":1637
14391  * try:
14392  * return math.acos(obj)
14393  * except: # <<<<<<<<<<<<<<
14394  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14395  *
14396  */
14397  /*except:*/ {
14398  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14399  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14400  __Pyx_GOTREF(__pyx_t_5);
14401  __Pyx_GOTREF(__pyx_t_9);
14402  __Pyx_GOTREF(__pyx_t_3);
14403 
14404  /* "PyClical.pyx":1638
14405  * return math.acos(obj)
14406  * except:
14407  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14408  *
14409  * cpdef inline cosh(obj):
14410  */
14411  __Pyx_XDECREF(__pyx_r);
14412  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14413  __Pyx_GOTREF(__pyx_t_10);
14414  __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)
14415  __Pyx_GOTREF(__pyx_t_11);
14416  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14417  __pyx_r = __pyx_t_11;
14418  __pyx_t_11 = 0;
14419  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14420  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14421  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14422  goto __pyx_L7_except_return;
14423  }
14424  __pyx_L6_except_error:;
14425 
14426  /* "PyClical.pyx":1635
14427  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14428  * else:
14429  * try: # <<<<<<<<<<<<<<
14430  * return math.acos(obj)
14431  * except:
14432  */
14433  __Pyx_XGIVEREF(__pyx_t_6);
14434  __Pyx_XGIVEREF(__pyx_t_7);
14435  __Pyx_XGIVEREF(__pyx_t_8);
14436  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14437  goto __pyx_L1_error;
14438  __pyx_L8_try_return:;
14439  __Pyx_XGIVEREF(__pyx_t_6);
14440  __Pyx_XGIVEREF(__pyx_t_7);
14441  __Pyx_XGIVEREF(__pyx_t_8);
14442  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14443  goto __pyx_L0;
14444  __pyx_L7_except_return:;
14445  __Pyx_XGIVEREF(__pyx_t_6);
14446  __Pyx_XGIVEREF(__pyx_t_7);
14447  __Pyx_XGIVEREF(__pyx_t_8);
14448  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14449  goto __pyx_L0;
14450  }
14451  }
14452 
14453  /* "PyClical.pyx":1619
14454  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14455  *
14456  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14457  * """
14458  * Inverse cosine of multivector with optional complexifier.
14459  */
14460 
14461  /* function exit code */
14462  __pyx_L1_error:;
14463  __Pyx_XDECREF(__pyx_t_3);
14464  __Pyx_XDECREF(__pyx_t_5);
14465  __Pyx_XDECREF(__pyx_t_9);
14466  __Pyx_XDECREF(__pyx_t_10);
14467  __Pyx_XDECREF(__pyx_t_11);
14468  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14469  __pyx_r = 0;
14470  __pyx_L0:;
14471  __Pyx_XGIVEREF(__pyx_r);
14472  __Pyx_RefNannyFinishContext();
14473  return __pyx_r;
14474  }
14475 
14476  /* Python wrapper */
14477  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14478  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 ";
14479  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14480  PyObject *__pyx_v_obj = 0;
14481  PyObject *__pyx_v_i = 0;
14482  PyObject *__pyx_r = 0;
14483  __Pyx_RefNannyDeclarations
14484  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14485  {
14486  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14487  PyObject* values[2] = {0,0};
14488  values[1] = ((PyObject *)Py_None);
14489  if (unlikely(__pyx_kwds)) {
14490  Py_ssize_t kw_args;
14491  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14492  switch (pos_args) {
14493  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14494  CYTHON_FALLTHROUGH;
14495  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14496  CYTHON_FALLTHROUGH;
14497  case 0: break;
14498  default: goto __pyx_L5_argtuple_error;
14499  }
14500  kw_args = PyDict_Size(__pyx_kwds);
14501  switch (pos_args) {
14502  case 0:
14503  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14504  else goto __pyx_L5_argtuple_error;
14505  CYTHON_FALLTHROUGH;
14506  case 1:
14507  if (kw_args > 0) {
14508  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14509  if (value) { values[1] = value; kw_args--; }
14510  }
14511  }
14512  if (unlikely(kw_args > 0)) {
14513  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14514  }
14515  } else {
14516  switch (PyTuple_GET_SIZE(__pyx_args)) {
14517  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14518  CYTHON_FALLTHROUGH;
14519  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14520  break;
14521  default: goto __pyx_L5_argtuple_error;
14522  }
14523  }
14524  __pyx_v_obj = values[0];
14525  __pyx_v_i = values[1];
14526  }
14527  goto __pyx_L4_argument_unpacking_done;
14528  __pyx_L5_argtuple_error:;
14529  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14530  __pyx_L3_error:;
14531  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14532  __Pyx_RefNannyFinishContext();
14533  return NULL;
14534  __pyx_L4_argument_unpacking_done:;
14535  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14536 
14537  /* function exit code */
14538  __Pyx_RefNannyFinishContext();
14539  return __pyx_r;
14540  }
14541 
14542  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14543  PyObject *__pyx_r = NULL;
14544  __Pyx_RefNannyDeclarations
14545  PyObject *__pyx_t_1 = NULL;
14546  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14547  __Pyx_RefNannySetupContext("acos", 0);
14548  __Pyx_XDECREF(__pyx_r);
14549  __pyx_t_2.__pyx_n = 1;
14550  __pyx_t_2.i = __pyx_v_i;
14551  __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)
14552  __Pyx_GOTREF(__pyx_t_1);
14553  __pyx_r = __pyx_t_1;
14554  __pyx_t_1 = 0;
14555  goto __pyx_L0;
14556 
14557  /* function exit code */
14558  __pyx_L1_error:;
14559  __Pyx_XDECREF(__pyx_t_1);
14560  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14561  __pyx_r = NULL;
14562  __pyx_L0:;
14563  __Pyx_XGIVEREF(__pyx_r);
14564  __Pyx_RefNannyFinishContext();
14565  return __pyx_r;
14566  }
14567 
14568  /* "PyClical.pyx":1640
14569  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14570  *
14571  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14572  * """
14573  * Hyperbolic cosine of multivector.
14574  */
14575 
14576  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14577  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14578  PyObject *__pyx_r = NULL;
14579  __Pyx_RefNannyDeclarations
14580  PyObject *__pyx_t_1 = NULL;
14581  PyObject *__pyx_t_2 = NULL;
14582  PyObject *__pyx_t_3 = NULL;
14583  PyObject *__pyx_t_4 = NULL;
14584  PyObject *__pyx_t_5 = NULL;
14585  PyObject *__pyx_t_6 = NULL;
14586  PyObject *__pyx_t_7 = NULL;
14587  PyObject *__pyx_t_8 = NULL;
14588  __Pyx_RefNannySetupContext("cosh", 0);
14589 
14590  /* "PyClical.pyx":1651
14591  * {1,2}
14592  * """
14593  * try: # <<<<<<<<<<<<<<
14594  * return math.cosh(obj)
14595  * except:
14596  */
14597  {
14598  __Pyx_PyThreadState_declare
14599  __Pyx_PyThreadState_assign
14600  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14601  __Pyx_XGOTREF(__pyx_t_1);
14602  __Pyx_XGOTREF(__pyx_t_2);
14603  __Pyx_XGOTREF(__pyx_t_3);
14604  /*try:*/ {
14605 
14606  /* "PyClical.pyx":1652
14607  * """
14608  * try:
14609  * return math.cosh(obj) # <<<<<<<<<<<<<<
14610  * except:
14611  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14612  */
14613  __Pyx_XDECREF(__pyx_r);
14614  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
14615  __Pyx_GOTREF(__pyx_t_5);
14616  __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)
14617  __Pyx_GOTREF(__pyx_t_6);
14618  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14619  __pyx_t_5 = NULL;
14620  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14621  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14622  if (likely(__pyx_t_5)) {
14623  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14624  __Pyx_INCREF(__pyx_t_5);
14625  __Pyx_INCREF(function);
14626  __Pyx_DECREF_SET(__pyx_t_6, function);
14627  }
14628  }
14629  __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);
14630  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14631  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14632  __Pyx_GOTREF(__pyx_t_4);
14633  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14634  __pyx_r = __pyx_t_4;
14635  __pyx_t_4 = 0;
14636  goto __pyx_L7_try_return;
14637 
14638  /* "PyClical.pyx":1651
14639  * {1,2}
14640  * """
14641  * try: # <<<<<<<<<<<<<<
14642  * return math.cosh(obj)
14643  * except:
14644  */
14645  }
14646  __pyx_L3_error:;
14647  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14648  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14649  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14650 
14651  /* "PyClical.pyx":1653
14652  * try:
14653  * return math.cosh(obj)
14654  * except: # <<<<<<<<<<<<<<
14655  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14656  *
14657  */
14658  /*except:*/ {
14659  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14660  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
14661  __Pyx_GOTREF(__pyx_t_4);
14662  __Pyx_GOTREF(__pyx_t_6);
14663  __Pyx_GOTREF(__pyx_t_5);
14664 
14665  /* "PyClical.pyx":1654
14666  * return math.cosh(obj)
14667  * except:
14668  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14669  *
14670  * cpdef inline acosh(obj,i = None):
14671  */
14672  __Pyx_XDECREF(__pyx_r);
14673  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14674  __Pyx_GOTREF(__pyx_t_7);
14675  __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)
14676  __Pyx_GOTREF(__pyx_t_8);
14677  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14678  __pyx_r = __pyx_t_8;
14679  __pyx_t_8 = 0;
14680  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14681  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14682  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14683  goto __pyx_L6_except_return;
14684  }
14685  __pyx_L5_except_error:;
14686 
14687  /* "PyClical.pyx":1651
14688  * {1,2}
14689  * """
14690  * try: # <<<<<<<<<<<<<<
14691  * return math.cosh(obj)
14692  * except:
14693  */
14694  __Pyx_XGIVEREF(__pyx_t_1);
14695  __Pyx_XGIVEREF(__pyx_t_2);
14696  __Pyx_XGIVEREF(__pyx_t_3);
14697  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14698  goto __pyx_L1_error;
14699  __pyx_L7_try_return:;
14700  __Pyx_XGIVEREF(__pyx_t_1);
14701  __Pyx_XGIVEREF(__pyx_t_2);
14702  __Pyx_XGIVEREF(__pyx_t_3);
14703  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14704  goto __pyx_L0;
14705  __pyx_L6_except_return:;
14706  __Pyx_XGIVEREF(__pyx_t_1);
14707  __Pyx_XGIVEREF(__pyx_t_2);
14708  __Pyx_XGIVEREF(__pyx_t_3);
14709  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14710  goto __pyx_L0;
14711  }
14712 
14713  /* "PyClical.pyx":1640
14714  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14715  *
14716  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14717  * """
14718  * Hyperbolic cosine of multivector.
14719  */
14720 
14721  /* function exit code */
14722  __pyx_L1_error:;
14723  __Pyx_XDECREF(__pyx_t_4);
14724  __Pyx_XDECREF(__pyx_t_5);
14725  __Pyx_XDECREF(__pyx_t_6);
14726  __Pyx_XDECREF(__pyx_t_7);
14727  __Pyx_XDECREF(__pyx_t_8);
14728  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14729  __pyx_r = 0;
14730  __pyx_L0:;
14731  __Pyx_XGIVEREF(__pyx_r);
14732  __Pyx_RefNannyFinishContext();
14733  return __pyx_r;
14734  }
14735 
14736  /* Python wrapper */
14737  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14738  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 ";
14739  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14740  PyObject *__pyx_r = 0;
14741  __Pyx_RefNannyDeclarations
14742  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
14743  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14744 
14745  /* function exit code */
14746  __Pyx_RefNannyFinishContext();
14747  return __pyx_r;
14748  }
14749 
14750  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14751  PyObject *__pyx_r = NULL;
14752  __Pyx_RefNannyDeclarations
14753  PyObject *__pyx_t_1 = NULL;
14754  __Pyx_RefNannySetupContext("cosh", 0);
14755  __Pyx_XDECREF(__pyx_r);
14756  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
14757  __Pyx_GOTREF(__pyx_t_1);
14758  __pyx_r = __pyx_t_1;
14759  __pyx_t_1 = 0;
14760  goto __pyx_L0;
14761 
14762  /* function exit code */
14763  __pyx_L1_error:;
14764  __Pyx_XDECREF(__pyx_t_1);
14765  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14766  __pyx_r = NULL;
14767  __pyx_L0:;
14768  __Pyx_XGIVEREF(__pyx_r);
14769  __Pyx_RefNannyFinishContext();
14770  return __pyx_r;
14771  }
14772 
14773  /* "PyClical.pyx":1656
14774  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14775  *
14776  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14777  * """
14778  * Inverse hyperbolic cosine of multivector with optional complexifier.
14779  */
14780 
14781  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14782  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) {
14783  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14784  PyObject *__pyx_r = NULL;
14785  __Pyx_RefNannyDeclarations
14786  int __pyx_t_1;
14787  int __pyx_t_2;
14788  PyObject *__pyx_t_3 = NULL;
14789  Clifford __pyx_t_4;
14790  PyObject *__pyx_t_5 = NULL;
14791  PyObject *__pyx_t_6 = NULL;
14792  PyObject *__pyx_t_7 = NULL;
14793  PyObject *__pyx_t_8 = NULL;
14794  PyObject *__pyx_t_9 = NULL;
14795  PyObject *__pyx_t_10 = NULL;
14796  PyObject *__pyx_t_11 = NULL;
14797  __Pyx_RefNannySetupContext("acosh", 0);
14798  if (__pyx_optional_args) {
14799  if (__pyx_optional_args->__pyx_n > 0) {
14800  __pyx_v_i = __pyx_optional_args->i;
14801  }
14802  }
14803 
14804  /* "PyClical.pyx":1671
14805  * {1,2}
14806  * """
14807  * if not (i is None): # <<<<<<<<<<<<<<
14808  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14809  * else:
14810  */
14811  __pyx_t_1 = (__pyx_v_i != Py_None);
14812  __pyx_t_2 = (__pyx_t_1 != 0);
14813  if (__pyx_t_2) {
14814 
14815  /* "PyClical.pyx":1672
14816  * """
14817  * if not (i is None):
14818  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14819  * else:
14820  * try:
14821  */
14822  __Pyx_XDECREF(__pyx_r);
14823  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
14824  __Pyx_GOTREF(__pyx_t_3);
14825  try {
14826  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14827  } catch(...) {
14828  __Pyx_CppExn2PyErr();
14829  __PYX_ERR(0, 1672, __pyx_L1_error)
14830  }
14831  __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)
14832  __Pyx_GOTREF(__pyx_t_5);
14833  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14834  __pyx_r = __pyx_t_5;
14835  __pyx_t_5 = 0;
14836  goto __pyx_L0;
14837 
14838  /* "PyClical.pyx":1671
14839  * {1,2}
14840  * """
14841  * if not (i is None): # <<<<<<<<<<<<<<
14842  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14843  * else:
14844  */
14845  }
14846 
14847  /* "PyClical.pyx":1674
14848  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14849  * else:
14850  * try: # <<<<<<<<<<<<<<
14851  * return math.acosh(obj)
14852  * except:
14853  */
14854  /*else*/ {
14855  {
14856  __Pyx_PyThreadState_declare
14857  __Pyx_PyThreadState_assign
14858  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14859  __Pyx_XGOTREF(__pyx_t_6);
14860  __Pyx_XGOTREF(__pyx_t_7);
14861  __Pyx_XGOTREF(__pyx_t_8);
14862  /*try:*/ {
14863 
14864  /* "PyClical.pyx":1675
14865  * else:
14866  * try:
14867  * return math.acosh(obj) # <<<<<<<<<<<<<<
14868  * except:
14869  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14870  */
14871  __Pyx_XDECREF(__pyx_r);
14872  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
14873  __Pyx_GOTREF(__pyx_t_3);
14874  __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)
14875  __Pyx_GOTREF(__pyx_t_9);
14876  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14877  __pyx_t_3 = NULL;
14878  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14879  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14880  if (likely(__pyx_t_3)) {
14881  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14882  __Pyx_INCREF(__pyx_t_3);
14883  __Pyx_INCREF(function);
14884  __Pyx_DECREF_SET(__pyx_t_9, function);
14885  }
14886  }
14887  __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);
14888  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14889  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
14890  __Pyx_GOTREF(__pyx_t_5);
14891  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14892  __pyx_r = __pyx_t_5;
14893  __pyx_t_5 = 0;
14894  goto __pyx_L8_try_return;
14895 
14896  /* "PyClical.pyx":1674
14897  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14898  * else:
14899  * try: # <<<<<<<<<<<<<<
14900  * return math.acosh(obj)
14901  * except:
14902  */
14903  }
14904  __pyx_L4_error:;
14905  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14906  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14907  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14908 
14909  /* "PyClical.pyx":1676
14910  * try:
14911  * return math.acosh(obj)
14912  * except: # <<<<<<<<<<<<<<
14913  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14914  *
14915  */
14916  /*except:*/ {
14917  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14918  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
14919  __Pyx_GOTREF(__pyx_t_5);
14920  __Pyx_GOTREF(__pyx_t_9);
14921  __Pyx_GOTREF(__pyx_t_3);
14922 
14923  /* "PyClical.pyx":1677
14924  * return math.acosh(obj)
14925  * except:
14926  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14927  *
14928  * cpdef inline sin(obj,i = None):
14929  */
14930  __Pyx_XDECREF(__pyx_r);
14931  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
14932  __Pyx_GOTREF(__pyx_t_10);
14933  __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)
14934  __Pyx_GOTREF(__pyx_t_11);
14935  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14936  __pyx_r = __pyx_t_11;
14937  __pyx_t_11 = 0;
14938  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14939  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14940  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14941  goto __pyx_L7_except_return;
14942  }
14943  __pyx_L6_except_error:;
14944 
14945  /* "PyClical.pyx":1674
14946  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14947  * else:
14948  * try: # <<<<<<<<<<<<<<
14949  * return math.acosh(obj)
14950  * except:
14951  */
14952  __Pyx_XGIVEREF(__pyx_t_6);
14953  __Pyx_XGIVEREF(__pyx_t_7);
14954  __Pyx_XGIVEREF(__pyx_t_8);
14955  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14956  goto __pyx_L1_error;
14957  __pyx_L8_try_return:;
14958  __Pyx_XGIVEREF(__pyx_t_6);
14959  __Pyx_XGIVEREF(__pyx_t_7);
14960  __Pyx_XGIVEREF(__pyx_t_8);
14961  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14962  goto __pyx_L0;
14963  __pyx_L7_except_return:;
14964  __Pyx_XGIVEREF(__pyx_t_6);
14965  __Pyx_XGIVEREF(__pyx_t_7);
14966  __Pyx_XGIVEREF(__pyx_t_8);
14967  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14968  goto __pyx_L0;
14969  }
14970  }
14971 
14972  /* "PyClical.pyx":1656
14973  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14974  *
14975  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14976  * """
14977  * Inverse hyperbolic cosine of multivector with optional complexifier.
14978  */
14979 
14980  /* function exit code */
14981  __pyx_L1_error:;
14982  __Pyx_XDECREF(__pyx_t_3);
14983  __Pyx_XDECREF(__pyx_t_5);
14984  __Pyx_XDECREF(__pyx_t_9);
14985  __Pyx_XDECREF(__pyx_t_10);
14986  __Pyx_XDECREF(__pyx_t_11);
14987  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14988  __pyx_r = 0;
14989  __pyx_L0:;
14990  __Pyx_XGIVEREF(__pyx_r);
14991  __Pyx_RefNannyFinishContext();
14992  return __pyx_r;
14993  }
14994 
14995  /* Python wrapper */
14996  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14997  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 ";
14998  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14999  PyObject *__pyx_v_obj = 0;
15000  PyObject *__pyx_v_i = 0;
15001  PyObject *__pyx_r = 0;
15002  __Pyx_RefNannyDeclarations
15003  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15004  {
15005  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15006  PyObject* values[2] = {0,0};
15007  values[1] = ((PyObject *)Py_None);
15008  if (unlikely(__pyx_kwds)) {
15009  Py_ssize_t kw_args;
15010  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15011  switch (pos_args) {
15012  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15013  CYTHON_FALLTHROUGH;
15014  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15015  CYTHON_FALLTHROUGH;
15016  case 0: break;
15017  default: goto __pyx_L5_argtuple_error;
15018  }
15019  kw_args = PyDict_Size(__pyx_kwds);
15020  switch (pos_args) {
15021  case 0:
15022  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15023  else goto __pyx_L5_argtuple_error;
15024  CYTHON_FALLTHROUGH;
15025  case 1:
15026  if (kw_args > 0) {
15027  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15028  if (value) { values[1] = value; kw_args--; }
15029  }
15030  }
15031  if (unlikely(kw_args > 0)) {
15032  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15033  }
15034  } else {
15035  switch (PyTuple_GET_SIZE(__pyx_args)) {
15036  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15037  CYTHON_FALLTHROUGH;
15038  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15039  break;
15040  default: goto __pyx_L5_argtuple_error;
15041  }
15042  }
15043  __pyx_v_obj = values[0];
15044  __pyx_v_i = values[1];
15045  }
15046  goto __pyx_L4_argument_unpacking_done;
15047  __pyx_L5_argtuple_error:;
15048  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15049  __pyx_L3_error:;
15050  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15051  __Pyx_RefNannyFinishContext();
15052  return NULL;
15053  __pyx_L4_argument_unpacking_done:;
15054  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15055 
15056  /* function exit code */
15057  __Pyx_RefNannyFinishContext();
15058  return __pyx_r;
15059  }
15060 
15061  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15062  PyObject *__pyx_r = NULL;
15063  __Pyx_RefNannyDeclarations
15064  PyObject *__pyx_t_1 = NULL;
15065  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15066  __Pyx_RefNannySetupContext("acosh", 0);
15067  __Pyx_XDECREF(__pyx_r);
15068  __pyx_t_2.__pyx_n = 1;
15069  __pyx_t_2.i = __pyx_v_i;
15070  __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)
15071  __Pyx_GOTREF(__pyx_t_1);
15072  __pyx_r = __pyx_t_1;
15073  __pyx_t_1 = 0;
15074  goto __pyx_L0;
15075 
15076  /* function exit code */
15077  __pyx_L1_error:;
15078  __Pyx_XDECREF(__pyx_t_1);
15079  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15080  __pyx_r = NULL;
15081  __pyx_L0:;
15082  __Pyx_XGIVEREF(__pyx_r);
15083  __Pyx_RefNannyFinishContext();
15084  return __pyx_r;
15085  }
15086 
15087  /* "PyClical.pyx":1679
15088  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15089  *
15090  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15091  * """
15092  * Sine of multivector with optional complexifier.
15093  */
15094 
15095  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15096  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) {
15097  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15098  PyObject *__pyx_r = NULL;
15099  __Pyx_RefNannyDeclarations
15100  int __pyx_t_1;
15101  int __pyx_t_2;
15102  PyObject *__pyx_t_3 = NULL;
15103  Clifford __pyx_t_4;
15104  PyObject *__pyx_t_5 = NULL;
15105  PyObject *__pyx_t_6 = NULL;
15106  PyObject *__pyx_t_7 = NULL;
15107  PyObject *__pyx_t_8 = NULL;
15108  PyObject *__pyx_t_9 = NULL;
15109  PyObject *__pyx_t_10 = NULL;
15110  PyObject *__pyx_t_11 = NULL;
15111  __Pyx_RefNannySetupContext("sin", 0);
15112  if (__pyx_optional_args) {
15113  if (__pyx_optional_args->__pyx_n > 0) {
15114  __pyx_v_i = __pyx_optional_args->i;
15115  }
15116  }
15117 
15118  /* "PyClical.pyx":1690
15119  * {1,2,3}
15120  * """
15121  * if not (i is None): # <<<<<<<<<<<<<<
15122  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15123  * else:
15124  */
15125  __pyx_t_1 = (__pyx_v_i != Py_None);
15126  __pyx_t_2 = (__pyx_t_1 != 0);
15127  if (__pyx_t_2) {
15128 
15129  /* "PyClical.pyx":1691
15130  * """
15131  * if not (i is None):
15132  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15133  * else:
15134  * try:
15135  */
15136  __Pyx_XDECREF(__pyx_r);
15137  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
15138  __Pyx_GOTREF(__pyx_t_3);
15139  try {
15140  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15141  } catch(...) {
15142  __Pyx_CppExn2PyErr();
15143  __PYX_ERR(0, 1691, __pyx_L1_error)
15144  }
15145  __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)
15146  __Pyx_GOTREF(__pyx_t_5);
15147  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15148  __pyx_r = __pyx_t_5;
15149  __pyx_t_5 = 0;
15150  goto __pyx_L0;
15151 
15152  /* "PyClical.pyx":1690
15153  * {1,2,3}
15154  * """
15155  * if not (i is None): # <<<<<<<<<<<<<<
15156  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15157  * else:
15158  */
15159  }
15160 
15161  /* "PyClical.pyx":1693
15162  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15163  * else:
15164  * try: # <<<<<<<<<<<<<<
15165  * return math.sin(obj)
15166  * except:
15167  */
15168  /*else*/ {
15169  {
15170  __Pyx_PyThreadState_declare
15171  __Pyx_PyThreadState_assign
15172  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15173  __Pyx_XGOTREF(__pyx_t_6);
15174  __Pyx_XGOTREF(__pyx_t_7);
15175  __Pyx_XGOTREF(__pyx_t_8);
15176  /*try:*/ {
15177 
15178  /* "PyClical.pyx":1694
15179  * else:
15180  * try:
15181  * return math.sin(obj) # <<<<<<<<<<<<<<
15182  * except:
15183  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15184  */
15185  __Pyx_XDECREF(__pyx_r);
15186  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15187  __Pyx_GOTREF(__pyx_t_3);
15188  __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)
15189  __Pyx_GOTREF(__pyx_t_9);
15190  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15191  __pyx_t_3 = NULL;
15192  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15193  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15194  if (likely(__pyx_t_3)) {
15195  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15196  __Pyx_INCREF(__pyx_t_3);
15197  __Pyx_INCREF(function);
15198  __Pyx_DECREF_SET(__pyx_t_9, function);
15199  }
15200  }
15201  __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);
15202  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15203  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15204  __Pyx_GOTREF(__pyx_t_5);
15205  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15206  __pyx_r = __pyx_t_5;
15207  __pyx_t_5 = 0;
15208  goto __pyx_L8_try_return;
15209 
15210  /* "PyClical.pyx":1693
15211  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15212  * else:
15213  * try: # <<<<<<<<<<<<<<
15214  * return math.sin(obj)
15215  * except:
15216  */
15217  }
15218  __pyx_L4_error:;
15219  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15220  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15221  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15222 
15223  /* "PyClical.pyx":1695
15224  * try:
15225  * return math.sin(obj)
15226  * except: # <<<<<<<<<<<<<<
15227  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15228  *
15229  */
15230  /*except:*/ {
15231  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15232  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15233  __Pyx_GOTREF(__pyx_t_5);
15234  __Pyx_GOTREF(__pyx_t_9);
15235  __Pyx_GOTREF(__pyx_t_3);
15236 
15237  /* "PyClical.pyx":1696
15238  * return math.sin(obj)
15239  * except:
15240  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15241  *
15242  * cpdef inline asin(obj,i = None):
15243  */
15244  __Pyx_XDECREF(__pyx_r);
15245  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15246  __Pyx_GOTREF(__pyx_t_10);
15247  __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)
15248  __Pyx_GOTREF(__pyx_t_11);
15249  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15250  __pyx_r = __pyx_t_11;
15251  __pyx_t_11 = 0;
15252  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15253  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15254  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15255  goto __pyx_L7_except_return;
15256  }
15257  __pyx_L6_except_error:;
15258 
15259  /* "PyClical.pyx":1693
15260  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15261  * else:
15262  * try: # <<<<<<<<<<<<<<
15263  * return math.sin(obj)
15264  * except:
15265  */
15266  __Pyx_XGIVEREF(__pyx_t_6);
15267  __Pyx_XGIVEREF(__pyx_t_7);
15268  __Pyx_XGIVEREF(__pyx_t_8);
15269  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15270  goto __pyx_L1_error;
15271  __pyx_L8_try_return:;
15272  __Pyx_XGIVEREF(__pyx_t_6);
15273  __Pyx_XGIVEREF(__pyx_t_7);
15274  __Pyx_XGIVEREF(__pyx_t_8);
15275  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15276  goto __pyx_L0;
15277  __pyx_L7_except_return:;
15278  __Pyx_XGIVEREF(__pyx_t_6);
15279  __Pyx_XGIVEREF(__pyx_t_7);
15280  __Pyx_XGIVEREF(__pyx_t_8);
15281  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15282  goto __pyx_L0;
15283  }
15284  }
15285 
15286  /* "PyClical.pyx":1679
15287  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15288  *
15289  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15290  * """
15291  * Sine of multivector with optional complexifier.
15292  */
15293 
15294  /* function exit code */
15295  __pyx_L1_error:;
15296  __Pyx_XDECREF(__pyx_t_3);
15297  __Pyx_XDECREF(__pyx_t_5);
15298  __Pyx_XDECREF(__pyx_t_9);
15299  __Pyx_XDECREF(__pyx_t_10);
15300  __Pyx_XDECREF(__pyx_t_11);
15301  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15302  __pyx_r = 0;
15303  __pyx_L0:;
15304  __Pyx_XGIVEREF(__pyx_r);
15305  __Pyx_RefNannyFinishContext();
15306  return __pyx_r;
15307  }
15308 
15309  /* Python wrapper */
15310  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15311  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 ";
15312  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15313  PyObject *__pyx_v_obj = 0;
15314  PyObject *__pyx_v_i = 0;
15315  PyObject *__pyx_r = 0;
15316  __Pyx_RefNannyDeclarations
15317  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15318  {
15319  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15320  PyObject* values[2] = {0,0};
15321  values[1] = ((PyObject *)Py_None);
15322  if (unlikely(__pyx_kwds)) {
15323  Py_ssize_t kw_args;
15324  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15325  switch (pos_args) {
15326  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15327  CYTHON_FALLTHROUGH;
15328  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15329  CYTHON_FALLTHROUGH;
15330  case 0: break;
15331  default: goto __pyx_L5_argtuple_error;
15332  }
15333  kw_args = PyDict_Size(__pyx_kwds);
15334  switch (pos_args) {
15335  case 0:
15336  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15337  else goto __pyx_L5_argtuple_error;
15338  CYTHON_FALLTHROUGH;
15339  case 1:
15340  if (kw_args > 0) {
15341  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15342  if (value) { values[1] = value; kw_args--; }
15343  }
15344  }
15345  if (unlikely(kw_args > 0)) {
15346  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15347  }
15348  } else {
15349  switch (PyTuple_GET_SIZE(__pyx_args)) {
15350  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15351  CYTHON_FALLTHROUGH;
15352  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15353  break;
15354  default: goto __pyx_L5_argtuple_error;
15355  }
15356  }
15357  __pyx_v_obj = values[0];
15358  __pyx_v_i = values[1];
15359  }
15360  goto __pyx_L4_argument_unpacking_done;
15361  __pyx_L5_argtuple_error:;
15362  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15363  __pyx_L3_error:;
15364  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15365  __Pyx_RefNannyFinishContext();
15366  return NULL;
15367  __pyx_L4_argument_unpacking_done:;
15368  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15369 
15370  /* function exit code */
15371  __Pyx_RefNannyFinishContext();
15372  return __pyx_r;
15373  }
15374 
15375  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15376  PyObject *__pyx_r = NULL;
15377  __Pyx_RefNannyDeclarations
15378  PyObject *__pyx_t_1 = NULL;
15379  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15380  __Pyx_RefNannySetupContext("sin", 0);
15381  __Pyx_XDECREF(__pyx_r);
15382  __pyx_t_2.__pyx_n = 1;
15383  __pyx_t_2.i = __pyx_v_i;
15384  __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)
15385  __Pyx_GOTREF(__pyx_t_1);
15386  __pyx_r = __pyx_t_1;
15387  __pyx_t_1 = 0;
15388  goto __pyx_L0;
15389 
15390  /* function exit code */
15391  __pyx_L1_error:;
15392  __Pyx_XDECREF(__pyx_t_1);
15393  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15394  __pyx_r = NULL;
15395  __pyx_L0:;
15396  __Pyx_XGIVEREF(__pyx_r);
15397  __Pyx_RefNannyFinishContext();
15398  return __pyx_r;
15399  }
15400 
15401  /* "PyClical.pyx":1698
15402  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15403  *
15404  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15405  * """
15406  * Inverse sine of multivector with optional complexifier.
15407  */
15408 
15409  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15410  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) {
15411  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15412  PyObject *__pyx_r = NULL;
15413  __Pyx_RefNannyDeclarations
15414  int __pyx_t_1;
15415  int __pyx_t_2;
15416  PyObject *__pyx_t_3 = NULL;
15417  Clifford __pyx_t_4;
15418  PyObject *__pyx_t_5 = NULL;
15419  PyObject *__pyx_t_6 = NULL;
15420  PyObject *__pyx_t_7 = NULL;
15421  PyObject *__pyx_t_8 = NULL;
15422  PyObject *__pyx_t_9 = NULL;
15423  PyObject *__pyx_t_10 = NULL;
15424  PyObject *__pyx_t_11 = NULL;
15425  __Pyx_RefNannySetupContext("asin", 0);
15426  if (__pyx_optional_args) {
15427  if (__pyx_optional_args->__pyx_n > 0) {
15428  __pyx_v_i = __pyx_optional_args->i;
15429  }
15430  }
15431 
15432  /* "PyClical.pyx":1711
15433  * {1,2,3}
15434  * """
15435  * if not (i is None): # <<<<<<<<<<<<<<
15436  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15437  * else:
15438  */
15439  __pyx_t_1 = (__pyx_v_i != Py_None);
15440  __pyx_t_2 = (__pyx_t_1 != 0);
15441  if (__pyx_t_2) {
15442 
15443  /* "PyClical.pyx":1712
15444  * """
15445  * if not (i is None):
15446  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15447  * else:
15448  * try:
15449  */
15450  __Pyx_XDECREF(__pyx_r);
15451  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
15452  __Pyx_GOTREF(__pyx_t_3);
15453  try {
15454  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15455  } catch(...) {
15456  __Pyx_CppExn2PyErr();
15457  __PYX_ERR(0, 1712, __pyx_L1_error)
15458  }
15459  __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)
15460  __Pyx_GOTREF(__pyx_t_5);
15461  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15462  __pyx_r = __pyx_t_5;
15463  __pyx_t_5 = 0;
15464  goto __pyx_L0;
15465 
15466  /* "PyClical.pyx":1711
15467  * {1,2,3}
15468  * """
15469  * if not (i is None): # <<<<<<<<<<<<<<
15470  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15471  * else:
15472  */
15473  }
15474 
15475  /* "PyClical.pyx":1714
15476  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15477  * else:
15478  * try: # <<<<<<<<<<<<<<
15479  * return math.asin(obj)
15480  * except:
15481  */
15482  /*else*/ {
15483  {
15484  __Pyx_PyThreadState_declare
15485  __Pyx_PyThreadState_assign
15486  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15487  __Pyx_XGOTREF(__pyx_t_6);
15488  __Pyx_XGOTREF(__pyx_t_7);
15489  __Pyx_XGOTREF(__pyx_t_8);
15490  /*try:*/ {
15491 
15492  /* "PyClical.pyx":1715
15493  * else:
15494  * try:
15495  * return math.asin(obj) # <<<<<<<<<<<<<<
15496  * except:
15497  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15498  */
15499  __Pyx_XDECREF(__pyx_r);
15500  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15501  __Pyx_GOTREF(__pyx_t_3);
15502  __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)
15503  __Pyx_GOTREF(__pyx_t_9);
15504  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15505  __pyx_t_3 = NULL;
15506  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15507  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15508  if (likely(__pyx_t_3)) {
15509  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15510  __Pyx_INCREF(__pyx_t_3);
15511  __Pyx_INCREF(function);
15512  __Pyx_DECREF_SET(__pyx_t_9, function);
15513  }
15514  }
15515  __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);
15516  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15517  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15518  __Pyx_GOTREF(__pyx_t_5);
15519  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15520  __pyx_r = __pyx_t_5;
15521  __pyx_t_5 = 0;
15522  goto __pyx_L8_try_return;
15523 
15524  /* "PyClical.pyx":1714
15525  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15526  * else:
15527  * try: # <<<<<<<<<<<<<<
15528  * return math.asin(obj)
15529  * except:
15530  */
15531  }
15532  __pyx_L4_error:;
15533  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15534  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15535  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15536 
15537  /* "PyClical.pyx":1716
15538  * try:
15539  * return math.asin(obj)
15540  * except: # <<<<<<<<<<<<<<
15541  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15542  *
15543  */
15544  /*except:*/ {
15545  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15546  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
15547  __Pyx_GOTREF(__pyx_t_5);
15548  __Pyx_GOTREF(__pyx_t_9);
15549  __Pyx_GOTREF(__pyx_t_3);
15550 
15551  /* "PyClical.pyx":1717
15552  * return math.asin(obj)
15553  * except:
15554  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15555  *
15556  * cpdef inline sinh(obj):
15557  */
15558  __Pyx_XDECREF(__pyx_r);
15559  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15560  __Pyx_GOTREF(__pyx_t_10);
15561  __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)
15562  __Pyx_GOTREF(__pyx_t_11);
15563  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15564  __pyx_r = __pyx_t_11;
15565  __pyx_t_11 = 0;
15566  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15567  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15568  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15569  goto __pyx_L7_except_return;
15570  }
15571  __pyx_L6_except_error:;
15572 
15573  /* "PyClical.pyx":1714
15574  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15575  * else:
15576  * try: # <<<<<<<<<<<<<<
15577  * return math.asin(obj)
15578  * except:
15579  */
15580  __Pyx_XGIVEREF(__pyx_t_6);
15581  __Pyx_XGIVEREF(__pyx_t_7);
15582  __Pyx_XGIVEREF(__pyx_t_8);
15583  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15584  goto __pyx_L1_error;
15585  __pyx_L8_try_return:;
15586  __Pyx_XGIVEREF(__pyx_t_6);
15587  __Pyx_XGIVEREF(__pyx_t_7);
15588  __Pyx_XGIVEREF(__pyx_t_8);
15589  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15590  goto __pyx_L0;
15591  __pyx_L7_except_return:;
15592  __Pyx_XGIVEREF(__pyx_t_6);
15593  __Pyx_XGIVEREF(__pyx_t_7);
15594  __Pyx_XGIVEREF(__pyx_t_8);
15595  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15596  goto __pyx_L0;
15597  }
15598  }
15599 
15600  /* "PyClical.pyx":1698
15601  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15602  *
15603  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15604  * """
15605  * Inverse sine of multivector with optional complexifier.
15606  */
15607 
15608  /* function exit code */
15609  __pyx_L1_error:;
15610  __Pyx_XDECREF(__pyx_t_3);
15611  __Pyx_XDECREF(__pyx_t_5);
15612  __Pyx_XDECREF(__pyx_t_9);
15613  __Pyx_XDECREF(__pyx_t_10);
15614  __Pyx_XDECREF(__pyx_t_11);
15615  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15616  __pyx_r = 0;
15617  __pyx_L0:;
15618  __Pyx_XGIVEREF(__pyx_r);
15619  __Pyx_RefNannyFinishContext();
15620  return __pyx_r;
15621  }
15622 
15623  /* Python wrapper */
15624  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15625  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 ";
15626  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15627  PyObject *__pyx_v_obj = 0;
15628  PyObject *__pyx_v_i = 0;
15629  PyObject *__pyx_r = 0;
15630  __Pyx_RefNannyDeclarations
15631  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
15632  {
15633  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15634  PyObject* values[2] = {0,0};
15635  values[1] = ((PyObject *)Py_None);
15636  if (unlikely(__pyx_kwds)) {
15637  Py_ssize_t kw_args;
15638  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15639  switch (pos_args) {
15640  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15641  CYTHON_FALLTHROUGH;
15642  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15643  CYTHON_FALLTHROUGH;
15644  case 0: break;
15645  default: goto __pyx_L5_argtuple_error;
15646  }
15647  kw_args = PyDict_Size(__pyx_kwds);
15648  switch (pos_args) {
15649  case 0:
15650  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15651  else goto __pyx_L5_argtuple_error;
15652  CYTHON_FALLTHROUGH;
15653  case 1:
15654  if (kw_args > 0) {
15655  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15656  if (value) { values[1] = value; kw_args--; }
15657  }
15658  }
15659  if (unlikely(kw_args > 0)) {
15660  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
15661  }
15662  } else {
15663  switch (PyTuple_GET_SIZE(__pyx_args)) {
15664  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15665  CYTHON_FALLTHROUGH;
15666  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15667  break;
15668  default: goto __pyx_L5_argtuple_error;
15669  }
15670  }
15671  __pyx_v_obj = values[0];
15672  __pyx_v_i = values[1];
15673  }
15674  goto __pyx_L4_argument_unpacking_done;
15675  __pyx_L5_argtuple_error:;
15676  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
15677  __pyx_L3_error:;
15678  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15679  __Pyx_RefNannyFinishContext();
15680  return NULL;
15681  __pyx_L4_argument_unpacking_done:;
15682  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15683 
15684  /* function exit code */
15685  __Pyx_RefNannyFinishContext();
15686  return __pyx_r;
15687  }
15688 
15689  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15690  PyObject *__pyx_r = NULL;
15691  __Pyx_RefNannyDeclarations
15692  PyObject *__pyx_t_1 = NULL;
15693  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15694  __Pyx_RefNannySetupContext("asin", 0);
15695  __Pyx_XDECREF(__pyx_r);
15696  __pyx_t_2.__pyx_n = 1;
15697  __pyx_t_2.i = __pyx_v_i;
15698  __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)
15699  __Pyx_GOTREF(__pyx_t_1);
15700  __pyx_r = __pyx_t_1;
15701  __pyx_t_1 = 0;
15702  goto __pyx_L0;
15703 
15704  /* function exit code */
15705  __pyx_L1_error:;
15706  __Pyx_XDECREF(__pyx_t_1);
15707  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15708  __pyx_r = NULL;
15709  __pyx_L0:;
15710  __Pyx_XGIVEREF(__pyx_r);
15711  __Pyx_RefNannyFinishContext();
15712  return __pyx_r;
15713  }
15714 
15715  /* "PyClical.pyx":1719
15716  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15717  *
15718  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15719  * """
15720  * Hyperbolic sine of multivector.
15721  */
15722 
15723  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15724  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15725  PyObject *__pyx_r = NULL;
15726  __Pyx_RefNannyDeclarations
15727  PyObject *__pyx_t_1 = NULL;
15728  PyObject *__pyx_t_2 = NULL;
15729  PyObject *__pyx_t_3 = NULL;
15730  PyObject *__pyx_t_4 = NULL;
15731  PyObject *__pyx_t_5 = NULL;
15732  PyObject *__pyx_t_6 = NULL;
15733  PyObject *__pyx_t_7 = NULL;
15734  PyObject *__pyx_t_8 = NULL;
15735  __Pyx_RefNannySetupContext("sinh", 0);
15736 
15737  /* "PyClical.pyx":1728
15738  * 0.5{1,2}
15739  * """
15740  * try: # <<<<<<<<<<<<<<
15741  * return math.sinh(obj)
15742  * except:
15743  */
15744  {
15745  __Pyx_PyThreadState_declare
15746  __Pyx_PyThreadState_assign
15747  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15748  __Pyx_XGOTREF(__pyx_t_1);
15749  __Pyx_XGOTREF(__pyx_t_2);
15750  __Pyx_XGOTREF(__pyx_t_3);
15751  /*try:*/ {
15752 
15753  /* "PyClical.pyx":1729
15754  * """
15755  * try:
15756  * return math.sinh(obj) # <<<<<<<<<<<<<<
15757  * except:
15758  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15759  */
15760  __Pyx_XDECREF(__pyx_r);
15761  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
15762  __Pyx_GOTREF(__pyx_t_5);
15763  __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)
15764  __Pyx_GOTREF(__pyx_t_6);
15765  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15766  __pyx_t_5 = NULL;
15767  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15768  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15769  if (likely(__pyx_t_5)) {
15770  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15771  __Pyx_INCREF(__pyx_t_5);
15772  __Pyx_INCREF(function);
15773  __Pyx_DECREF_SET(__pyx_t_6, function);
15774  }
15775  }
15776  __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);
15777  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15778  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
15779  __Pyx_GOTREF(__pyx_t_4);
15780  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15781  __pyx_r = __pyx_t_4;
15782  __pyx_t_4 = 0;
15783  goto __pyx_L7_try_return;
15784 
15785  /* "PyClical.pyx":1728
15786  * 0.5{1,2}
15787  * """
15788  * try: # <<<<<<<<<<<<<<
15789  * return math.sinh(obj)
15790  * except:
15791  */
15792  }
15793  __pyx_L3_error:;
15794  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15795  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15796  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15797 
15798  /* "PyClical.pyx":1730
15799  * try:
15800  * return math.sinh(obj)
15801  * except: # <<<<<<<<<<<<<<
15802  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15803  *
15804  */
15805  /*except:*/ {
15806  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15807  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
15808  __Pyx_GOTREF(__pyx_t_4);
15809  __Pyx_GOTREF(__pyx_t_6);
15810  __Pyx_GOTREF(__pyx_t_5);
15811 
15812  /* "PyClical.pyx":1731
15813  * return math.sinh(obj)
15814  * except:
15815  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15816  *
15817  * cpdef inline asinh(obj,i = None):
15818  */
15819  __Pyx_XDECREF(__pyx_r);
15820  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
15821  __Pyx_GOTREF(__pyx_t_7);
15822  __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)
15823  __Pyx_GOTREF(__pyx_t_8);
15824  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15825  __pyx_r = __pyx_t_8;
15826  __pyx_t_8 = 0;
15827  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15828  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15829  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15830  goto __pyx_L6_except_return;
15831  }
15832  __pyx_L5_except_error:;
15833 
15834  /* "PyClical.pyx":1728
15835  * 0.5{1,2}
15836  * """
15837  * try: # <<<<<<<<<<<<<<
15838  * return math.sinh(obj)
15839  * except:
15840  */
15841  __Pyx_XGIVEREF(__pyx_t_1);
15842  __Pyx_XGIVEREF(__pyx_t_2);
15843  __Pyx_XGIVEREF(__pyx_t_3);
15844  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15845  goto __pyx_L1_error;
15846  __pyx_L7_try_return:;
15847  __Pyx_XGIVEREF(__pyx_t_1);
15848  __Pyx_XGIVEREF(__pyx_t_2);
15849  __Pyx_XGIVEREF(__pyx_t_3);
15850  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15851  goto __pyx_L0;
15852  __pyx_L6_except_return:;
15853  __Pyx_XGIVEREF(__pyx_t_1);
15854  __Pyx_XGIVEREF(__pyx_t_2);
15855  __Pyx_XGIVEREF(__pyx_t_3);
15856  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15857  goto __pyx_L0;
15858  }
15859 
15860  /* "PyClical.pyx":1719
15861  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15862  *
15863  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15864  * """
15865  * Hyperbolic sine of multivector.
15866  */
15867 
15868  /* function exit code */
15869  __pyx_L1_error:;
15870  __Pyx_XDECREF(__pyx_t_4);
15871  __Pyx_XDECREF(__pyx_t_5);
15872  __Pyx_XDECREF(__pyx_t_6);
15873  __Pyx_XDECREF(__pyx_t_7);
15874  __Pyx_XDECREF(__pyx_t_8);
15875  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15876  __pyx_r = 0;
15877  __pyx_L0:;
15878  __Pyx_XGIVEREF(__pyx_r);
15879  __Pyx_RefNannyFinishContext();
15880  return __pyx_r;
15881  }
15882 
15883  /* Python wrapper */
15884  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15885  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 ";
15886  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15887  PyObject *__pyx_r = 0;
15888  __Pyx_RefNannyDeclarations
15889  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
15890  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15891 
15892  /* function exit code */
15893  __Pyx_RefNannyFinishContext();
15894  return __pyx_r;
15895  }
15896 
15897  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15898  PyObject *__pyx_r = NULL;
15899  __Pyx_RefNannyDeclarations
15900  PyObject *__pyx_t_1 = NULL;
15901  __Pyx_RefNannySetupContext("sinh", 0);
15902  __Pyx_XDECREF(__pyx_r);
15903  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
15904  __Pyx_GOTREF(__pyx_t_1);
15905  __pyx_r = __pyx_t_1;
15906  __pyx_t_1 = 0;
15907  goto __pyx_L0;
15908 
15909  /* function exit code */
15910  __pyx_L1_error:;
15911  __Pyx_XDECREF(__pyx_t_1);
15912  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15913  __pyx_r = NULL;
15914  __pyx_L0:;
15915  __Pyx_XGIVEREF(__pyx_r);
15916  __Pyx_RefNannyFinishContext();
15917  return __pyx_r;
15918  }
15919 
15920  /* "PyClical.pyx":1733
15921  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15922  *
15923  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
15924  * """
15925  * Inverse hyperbolic sine of multivector with optional complexifier.
15926  */
15927 
15928  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15929  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) {
15930  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15931  PyObject *__pyx_r = NULL;
15932  __Pyx_RefNannyDeclarations
15933  int __pyx_t_1;
15934  int __pyx_t_2;
15935  PyObject *__pyx_t_3 = NULL;
15936  Clifford __pyx_t_4;
15937  PyObject *__pyx_t_5 = NULL;
15938  PyObject *__pyx_t_6 = NULL;
15939  PyObject *__pyx_t_7 = NULL;
15940  PyObject *__pyx_t_8 = NULL;
15941  PyObject *__pyx_t_9 = NULL;
15942  PyObject *__pyx_t_10 = NULL;
15943  PyObject *__pyx_t_11 = NULL;
15944  __Pyx_RefNannySetupContext("asinh", 0);
15945  if (__pyx_optional_args) {
15946  if (__pyx_optional_args->__pyx_n > 0) {
15947  __pyx_v_i = __pyx_optional_args->i;
15948  }
15949  }
15950 
15951  /* "PyClical.pyx":1744
15952  * {1,2}
15953  * """
15954  * if not (i is None): # <<<<<<<<<<<<<<
15955  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15956  * else:
15957  */
15958  __pyx_t_1 = (__pyx_v_i != Py_None);
15959  __pyx_t_2 = (__pyx_t_1 != 0);
15960  if (__pyx_t_2) {
15961 
15962  /* "PyClical.pyx":1745
15963  * """
15964  * if not (i is None):
15965  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15966  * else:
15967  * try:
15968  */
15969  __Pyx_XDECREF(__pyx_r);
15970  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
15971  __Pyx_GOTREF(__pyx_t_3);
15972  try {
15973  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15974  } catch(...) {
15975  __Pyx_CppExn2PyErr();
15976  __PYX_ERR(0, 1745, __pyx_L1_error)
15977  }
15978  __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)
15979  __Pyx_GOTREF(__pyx_t_5);
15980  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15981  __pyx_r = __pyx_t_5;
15982  __pyx_t_5 = 0;
15983  goto __pyx_L0;
15984 
15985  /* "PyClical.pyx":1744
15986  * {1,2}
15987  * """
15988  * if not (i is None): # <<<<<<<<<<<<<<
15989  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15990  * else:
15991  */
15992  }
15993 
15994  /* "PyClical.pyx":1747
15995  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15996  * else:
15997  * try: # <<<<<<<<<<<<<<
15998  * return math.asinh(obj)
15999  * except:
16000  */
16001  /*else*/ {
16002  {
16003  __Pyx_PyThreadState_declare
16004  __Pyx_PyThreadState_assign
16005  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16006  __Pyx_XGOTREF(__pyx_t_6);
16007  __Pyx_XGOTREF(__pyx_t_7);
16008  __Pyx_XGOTREF(__pyx_t_8);
16009  /*try:*/ {
16010 
16011  /* "PyClical.pyx":1748
16012  * else:
16013  * try:
16014  * return math.asinh(obj) # <<<<<<<<<<<<<<
16015  * except:
16016  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16017  */
16018  __Pyx_XDECREF(__pyx_r);
16019  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16020  __Pyx_GOTREF(__pyx_t_3);
16021  __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)
16022  __Pyx_GOTREF(__pyx_t_9);
16023  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16024  __pyx_t_3 = NULL;
16025  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16026  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16027  if (likely(__pyx_t_3)) {
16028  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16029  __Pyx_INCREF(__pyx_t_3);
16030  __Pyx_INCREF(function);
16031  __Pyx_DECREF_SET(__pyx_t_9, function);
16032  }
16033  }
16034  __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);
16035  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16036  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16037  __Pyx_GOTREF(__pyx_t_5);
16038  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16039  __pyx_r = __pyx_t_5;
16040  __pyx_t_5 = 0;
16041  goto __pyx_L8_try_return;
16042 
16043  /* "PyClical.pyx":1747
16044  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16045  * else:
16046  * try: # <<<<<<<<<<<<<<
16047  * return math.asinh(obj)
16048  * except:
16049  */
16050  }
16051  __pyx_L4_error:;
16052  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16053  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16054  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16055 
16056  /* "PyClical.pyx":1749
16057  * try:
16058  * return math.asinh(obj)
16059  * except: # <<<<<<<<<<<<<<
16060  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16061  *
16062  */
16063  /*except:*/ {
16064  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16065  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16066  __Pyx_GOTREF(__pyx_t_5);
16067  __Pyx_GOTREF(__pyx_t_9);
16068  __Pyx_GOTREF(__pyx_t_3);
16069 
16070  /* "PyClical.pyx":1750
16071  * return math.asinh(obj)
16072  * except:
16073  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16074  *
16075  * cpdef inline tan(obj,i = None):
16076  */
16077  __Pyx_XDECREF(__pyx_r);
16078  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16079  __Pyx_GOTREF(__pyx_t_10);
16080  __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)
16081  __Pyx_GOTREF(__pyx_t_11);
16082  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16083  __pyx_r = __pyx_t_11;
16084  __pyx_t_11 = 0;
16085  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16086  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16087  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16088  goto __pyx_L7_except_return;
16089  }
16090  __pyx_L6_except_error:;
16091 
16092  /* "PyClical.pyx":1747
16093  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16094  * else:
16095  * try: # <<<<<<<<<<<<<<
16096  * return math.asinh(obj)
16097  * except:
16098  */
16099  __Pyx_XGIVEREF(__pyx_t_6);
16100  __Pyx_XGIVEREF(__pyx_t_7);
16101  __Pyx_XGIVEREF(__pyx_t_8);
16102  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16103  goto __pyx_L1_error;
16104  __pyx_L8_try_return:;
16105  __Pyx_XGIVEREF(__pyx_t_6);
16106  __Pyx_XGIVEREF(__pyx_t_7);
16107  __Pyx_XGIVEREF(__pyx_t_8);
16108  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16109  goto __pyx_L0;
16110  __pyx_L7_except_return:;
16111  __Pyx_XGIVEREF(__pyx_t_6);
16112  __Pyx_XGIVEREF(__pyx_t_7);
16113  __Pyx_XGIVEREF(__pyx_t_8);
16114  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16115  goto __pyx_L0;
16116  }
16117  }
16118 
16119  /* "PyClical.pyx":1733
16120  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16121  *
16122  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16123  * """
16124  * Inverse hyperbolic sine of multivector with optional complexifier.
16125  */
16126 
16127  /* function exit code */
16128  __pyx_L1_error:;
16129  __Pyx_XDECREF(__pyx_t_3);
16130  __Pyx_XDECREF(__pyx_t_5);
16131  __Pyx_XDECREF(__pyx_t_9);
16132  __Pyx_XDECREF(__pyx_t_10);
16133  __Pyx_XDECREF(__pyx_t_11);
16134  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16135  __pyx_r = 0;
16136  __pyx_L0:;
16137  __Pyx_XGIVEREF(__pyx_r);
16138  __Pyx_RefNannyFinishContext();
16139  return __pyx_r;
16140  }
16141 
16142  /* Python wrapper */
16143  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16144  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 ";
16145  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16146  PyObject *__pyx_v_obj = 0;
16147  PyObject *__pyx_v_i = 0;
16148  PyObject *__pyx_r = 0;
16149  __Pyx_RefNannyDeclarations
16150  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16151  {
16152  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16153  PyObject* values[2] = {0,0};
16154  values[1] = ((PyObject *)Py_None);
16155  if (unlikely(__pyx_kwds)) {
16156  Py_ssize_t kw_args;
16157  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16158  switch (pos_args) {
16159  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16160  CYTHON_FALLTHROUGH;
16161  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16162  CYTHON_FALLTHROUGH;
16163  case 0: break;
16164  default: goto __pyx_L5_argtuple_error;
16165  }
16166  kw_args = PyDict_Size(__pyx_kwds);
16167  switch (pos_args) {
16168  case 0:
16169  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16170  else goto __pyx_L5_argtuple_error;
16171  CYTHON_FALLTHROUGH;
16172  case 1:
16173  if (kw_args > 0) {
16174  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16175  if (value) { values[1] = value; kw_args--; }
16176  }
16177  }
16178  if (unlikely(kw_args > 0)) {
16179  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16180  }
16181  } else {
16182  switch (PyTuple_GET_SIZE(__pyx_args)) {
16183  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16184  CYTHON_FALLTHROUGH;
16185  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16186  break;
16187  default: goto __pyx_L5_argtuple_error;
16188  }
16189  }
16190  __pyx_v_obj = values[0];
16191  __pyx_v_i = values[1];
16192  }
16193  goto __pyx_L4_argument_unpacking_done;
16194  __pyx_L5_argtuple_error:;
16195  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16196  __pyx_L3_error:;
16197  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16198  __Pyx_RefNannyFinishContext();
16199  return NULL;
16200  __pyx_L4_argument_unpacking_done:;
16201  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16202 
16203  /* function exit code */
16204  __Pyx_RefNannyFinishContext();
16205  return __pyx_r;
16206  }
16207 
16208  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16209  PyObject *__pyx_r = NULL;
16210  __Pyx_RefNannyDeclarations
16211  PyObject *__pyx_t_1 = NULL;
16212  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16213  __Pyx_RefNannySetupContext("asinh", 0);
16214  __Pyx_XDECREF(__pyx_r);
16215  __pyx_t_2.__pyx_n = 1;
16216  __pyx_t_2.i = __pyx_v_i;
16217  __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)
16218  __Pyx_GOTREF(__pyx_t_1);
16219  __pyx_r = __pyx_t_1;
16220  __pyx_t_1 = 0;
16221  goto __pyx_L0;
16222 
16223  /* function exit code */
16224  __pyx_L1_error:;
16225  __Pyx_XDECREF(__pyx_t_1);
16226  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16227  __pyx_r = NULL;
16228  __pyx_L0:;
16229  __Pyx_XGIVEREF(__pyx_r);
16230  __Pyx_RefNannyFinishContext();
16231  return __pyx_r;
16232  }
16233 
16234  /* "PyClical.pyx":1752
16235  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16236  *
16237  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16238  * """
16239  * Tangent of multivector with optional complexifier.
16240  */
16241 
16242  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16243  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) {
16244  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16245  PyObject *__pyx_r = NULL;
16246  __Pyx_RefNannyDeclarations
16247  int __pyx_t_1;
16248  int __pyx_t_2;
16249  PyObject *__pyx_t_3 = NULL;
16250  Clifford __pyx_t_4;
16251  PyObject *__pyx_t_5 = NULL;
16252  PyObject *__pyx_t_6 = NULL;
16253  PyObject *__pyx_t_7 = NULL;
16254  PyObject *__pyx_t_8 = NULL;
16255  PyObject *__pyx_t_9 = NULL;
16256  PyObject *__pyx_t_10 = NULL;
16257  PyObject *__pyx_t_11 = NULL;
16258  __Pyx_RefNannySetupContext("tan", 0);
16259  if (__pyx_optional_args) {
16260  if (__pyx_optional_args->__pyx_n > 0) {
16261  __pyx_v_i = __pyx_optional_args->i;
16262  }
16263  }
16264 
16265  /* "PyClical.pyx":1761
16266  * 0.7616{1,2}
16267  * """
16268  * if not (i is None): # <<<<<<<<<<<<<<
16269  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16270  * else:
16271  */
16272  __pyx_t_1 = (__pyx_v_i != Py_None);
16273  __pyx_t_2 = (__pyx_t_1 != 0);
16274  if (__pyx_t_2) {
16275 
16276  /* "PyClical.pyx":1762
16277  * """
16278  * if not (i is None):
16279  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16280  * else:
16281  * try:
16282  */
16283  __Pyx_XDECREF(__pyx_r);
16284  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
16285  __Pyx_GOTREF(__pyx_t_3);
16286  try {
16287  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16288  } catch(...) {
16289  __Pyx_CppExn2PyErr();
16290  __PYX_ERR(0, 1762, __pyx_L1_error)
16291  }
16292  __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)
16293  __Pyx_GOTREF(__pyx_t_5);
16294  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16295  __pyx_r = __pyx_t_5;
16296  __pyx_t_5 = 0;
16297  goto __pyx_L0;
16298 
16299  /* "PyClical.pyx":1761
16300  * 0.7616{1,2}
16301  * """
16302  * if not (i is None): # <<<<<<<<<<<<<<
16303  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16304  * else:
16305  */
16306  }
16307 
16308  /* "PyClical.pyx":1764
16309  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16310  * else:
16311  * try: # <<<<<<<<<<<<<<
16312  * return math.tan(obj)
16313  * except:
16314  */
16315  /*else*/ {
16316  {
16317  __Pyx_PyThreadState_declare
16318  __Pyx_PyThreadState_assign
16319  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16320  __Pyx_XGOTREF(__pyx_t_6);
16321  __Pyx_XGOTREF(__pyx_t_7);
16322  __Pyx_XGOTREF(__pyx_t_8);
16323  /*try:*/ {
16324 
16325  /* "PyClical.pyx":1765
16326  * else:
16327  * try:
16328  * return math.tan(obj) # <<<<<<<<<<<<<<
16329  * except:
16330  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16331  */
16332  __Pyx_XDECREF(__pyx_r);
16333  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16334  __Pyx_GOTREF(__pyx_t_3);
16335  __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)
16336  __Pyx_GOTREF(__pyx_t_9);
16337  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16338  __pyx_t_3 = NULL;
16339  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16340  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16341  if (likely(__pyx_t_3)) {
16342  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16343  __Pyx_INCREF(__pyx_t_3);
16344  __Pyx_INCREF(function);
16345  __Pyx_DECREF_SET(__pyx_t_9, function);
16346  }
16347  }
16348  __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);
16349  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16350  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16351  __Pyx_GOTREF(__pyx_t_5);
16352  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16353  __pyx_r = __pyx_t_5;
16354  __pyx_t_5 = 0;
16355  goto __pyx_L8_try_return;
16356 
16357  /* "PyClical.pyx":1764
16358  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16359  * else:
16360  * try: # <<<<<<<<<<<<<<
16361  * return math.tan(obj)
16362  * except:
16363  */
16364  }
16365  __pyx_L4_error:;
16366  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16367  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16368  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16369 
16370  /* "PyClical.pyx":1766
16371  * try:
16372  * return math.tan(obj)
16373  * except: # <<<<<<<<<<<<<<
16374  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16375  *
16376  */
16377  /*except:*/ {
16378  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16379  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16380  __Pyx_GOTREF(__pyx_t_5);
16381  __Pyx_GOTREF(__pyx_t_9);
16382  __Pyx_GOTREF(__pyx_t_3);
16383 
16384  /* "PyClical.pyx":1767
16385  * return math.tan(obj)
16386  * except:
16387  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16388  *
16389  * cpdef inline atan(obj,i = None):
16390  */
16391  __Pyx_XDECREF(__pyx_r);
16392  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16393  __Pyx_GOTREF(__pyx_t_10);
16394  __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)
16395  __Pyx_GOTREF(__pyx_t_11);
16396  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16397  __pyx_r = __pyx_t_11;
16398  __pyx_t_11 = 0;
16399  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16400  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16401  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16402  goto __pyx_L7_except_return;
16403  }
16404  __pyx_L6_except_error:;
16405 
16406  /* "PyClical.pyx":1764
16407  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16408  * else:
16409  * try: # <<<<<<<<<<<<<<
16410  * return math.tan(obj)
16411  * except:
16412  */
16413  __Pyx_XGIVEREF(__pyx_t_6);
16414  __Pyx_XGIVEREF(__pyx_t_7);
16415  __Pyx_XGIVEREF(__pyx_t_8);
16416  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16417  goto __pyx_L1_error;
16418  __pyx_L8_try_return:;
16419  __Pyx_XGIVEREF(__pyx_t_6);
16420  __Pyx_XGIVEREF(__pyx_t_7);
16421  __Pyx_XGIVEREF(__pyx_t_8);
16422  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16423  goto __pyx_L0;
16424  __pyx_L7_except_return:;
16425  __Pyx_XGIVEREF(__pyx_t_6);
16426  __Pyx_XGIVEREF(__pyx_t_7);
16427  __Pyx_XGIVEREF(__pyx_t_8);
16428  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16429  goto __pyx_L0;
16430  }
16431  }
16432 
16433  /* "PyClical.pyx":1752
16434  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16435  *
16436  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16437  * """
16438  * Tangent of multivector with optional complexifier.
16439  */
16440 
16441  /* function exit code */
16442  __pyx_L1_error:;
16443  __Pyx_XDECREF(__pyx_t_3);
16444  __Pyx_XDECREF(__pyx_t_5);
16445  __Pyx_XDECREF(__pyx_t_9);
16446  __Pyx_XDECREF(__pyx_t_10);
16447  __Pyx_XDECREF(__pyx_t_11);
16448  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16449  __pyx_r = 0;
16450  __pyx_L0:;
16451  __Pyx_XGIVEREF(__pyx_r);
16452  __Pyx_RefNannyFinishContext();
16453  return __pyx_r;
16454  }
16455 
16456  /* Python wrapper */
16457  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16458  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 ";
16459  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16460  PyObject *__pyx_v_obj = 0;
16461  PyObject *__pyx_v_i = 0;
16462  PyObject *__pyx_r = 0;
16463  __Pyx_RefNannyDeclarations
16464  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
16465  {
16466  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16467  PyObject* values[2] = {0,0};
16468  values[1] = ((PyObject *)Py_None);
16469  if (unlikely(__pyx_kwds)) {
16470  Py_ssize_t kw_args;
16471  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16472  switch (pos_args) {
16473  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16474  CYTHON_FALLTHROUGH;
16475  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16476  CYTHON_FALLTHROUGH;
16477  case 0: break;
16478  default: goto __pyx_L5_argtuple_error;
16479  }
16480  kw_args = PyDict_Size(__pyx_kwds);
16481  switch (pos_args) {
16482  case 0:
16483  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16484  else goto __pyx_L5_argtuple_error;
16485  CYTHON_FALLTHROUGH;
16486  case 1:
16487  if (kw_args > 0) {
16488  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16489  if (value) { values[1] = value; kw_args--; }
16490  }
16491  }
16492  if (unlikely(kw_args > 0)) {
16493  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
16494  }
16495  } else {
16496  switch (PyTuple_GET_SIZE(__pyx_args)) {
16497  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16498  CYTHON_FALLTHROUGH;
16499  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16500  break;
16501  default: goto __pyx_L5_argtuple_error;
16502  }
16503  }
16504  __pyx_v_obj = values[0];
16505  __pyx_v_i = values[1];
16506  }
16507  goto __pyx_L4_argument_unpacking_done;
16508  __pyx_L5_argtuple_error:;
16509  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
16510  __pyx_L3_error:;
16511  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16512  __Pyx_RefNannyFinishContext();
16513  return NULL;
16514  __pyx_L4_argument_unpacking_done:;
16515  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16516 
16517  /* function exit code */
16518  __Pyx_RefNannyFinishContext();
16519  return __pyx_r;
16520  }
16521 
16522  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16523  PyObject *__pyx_r = NULL;
16524  __Pyx_RefNannyDeclarations
16525  PyObject *__pyx_t_1 = NULL;
16526  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16527  __Pyx_RefNannySetupContext("tan", 0);
16528  __Pyx_XDECREF(__pyx_r);
16529  __pyx_t_2.__pyx_n = 1;
16530  __pyx_t_2.i = __pyx_v_i;
16531  __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)
16532  __Pyx_GOTREF(__pyx_t_1);
16533  __pyx_r = __pyx_t_1;
16534  __pyx_t_1 = 0;
16535  goto __pyx_L0;
16536 
16537  /* function exit code */
16538  __pyx_L1_error:;
16539  __Pyx_XDECREF(__pyx_t_1);
16540  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16541  __pyx_r = NULL;
16542  __pyx_L0:;
16543  __Pyx_XGIVEREF(__pyx_r);
16544  __Pyx_RefNannyFinishContext();
16545  return __pyx_r;
16546  }
16547 
16548  /* "PyClical.pyx":1769
16549  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16550  *
16551  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16552  * """
16553  * Inverse tangent of multivector with optional complexifier.
16554  */
16555 
16556  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16557  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) {
16558  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16559  PyObject *__pyx_r = NULL;
16560  __Pyx_RefNannyDeclarations
16561  int __pyx_t_1;
16562  int __pyx_t_2;
16563  PyObject *__pyx_t_3 = NULL;
16564  Clifford __pyx_t_4;
16565  PyObject *__pyx_t_5 = NULL;
16566  PyObject *__pyx_t_6 = NULL;
16567  PyObject *__pyx_t_7 = NULL;
16568  PyObject *__pyx_t_8 = NULL;
16569  PyObject *__pyx_t_9 = NULL;
16570  PyObject *__pyx_t_10 = NULL;
16571  PyObject *__pyx_t_11 = NULL;
16572  __Pyx_RefNannySetupContext("atan", 0);
16573  if (__pyx_optional_args) {
16574  if (__pyx_optional_args->__pyx_n > 0) {
16575  __pyx_v_i = __pyx_optional_args->i;
16576  }
16577  }
16578 
16579  /* "PyClical.pyx":1778
16580  * {1}
16581  * """
16582  * if not (i is None): # <<<<<<<<<<<<<<
16583  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16584  * else:
16585  */
16586  __pyx_t_1 = (__pyx_v_i != Py_None);
16587  __pyx_t_2 = (__pyx_t_1 != 0);
16588  if (__pyx_t_2) {
16589 
16590  /* "PyClical.pyx":1779
16591  * """
16592  * if not (i is None):
16593  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16594  * else:
16595  * try:
16596  */
16597  __Pyx_XDECREF(__pyx_r);
16598  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
16599  __Pyx_GOTREF(__pyx_t_3);
16600  try {
16601  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16602  } catch(...) {
16603  __Pyx_CppExn2PyErr();
16604  __PYX_ERR(0, 1779, __pyx_L1_error)
16605  }
16606  __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)
16607  __Pyx_GOTREF(__pyx_t_5);
16608  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16609  __pyx_r = __pyx_t_5;
16610  __pyx_t_5 = 0;
16611  goto __pyx_L0;
16612 
16613  /* "PyClical.pyx":1778
16614  * {1}
16615  * """
16616  * if not (i is None): # <<<<<<<<<<<<<<
16617  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16618  * else:
16619  */
16620  }
16621 
16622  /* "PyClical.pyx":1781
16623  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16624  * else:
16625  * try: # <<<<<<<<<<<<<<
16626  * return math.atan(obj)
16627  * except:
16628  */
16629  /*else*/ {
16630  {
16631  __Pyx_PyThreadState_declare
16632  __Pyx_PyThreadState_assign
16633  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16634  __Pyx_XGOTREF(__pyx_t_6);
16635  __Pyx_XGOTREF(__pyx_t_7);
16636  __Pyx_XGOTREF(__pyx_t_8);
16637  /*try:*/ {
16638 
16639  /* "PyClical.pyx":1782
16640  * else:
16641  * try:
16642  * return math.atan(obj) # <<<<<<<<<<<<<<
16643  * except:
16644  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16645  */
16646  __Pyx_XDECREF(__pyx_r);
16647  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
16648  __Pyx_GOTREF(__pyx_t_3);
16649  __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)
16650  __Pyx_GOTREF(__pyx_t_9);
16651  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16652  __pyx_t_3 = NULL;
16653  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16654  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16655  if (likely(__pyx_t_3)) {
16656  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16657  __Pyx_INCREF(__pyx_t_3);
16658  __Pyx_INCREF(function);
16659  __Pyx_DECREF_SET(__pyx_t_9, function);
16660  }
16661  }
16662  __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);
16663  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16664  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
16665  __Pyx_GOTREF(__pyx_t_5);
16666  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16667  __pyx_r = __pyx_t_5;
16668  __pyx_t_5 = 0;
16669  goto __pyx_L8_try_return;
16670 
16671  /* "PyClical.pyx":1781
16672  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16673  * else:
16674  * try: # <<<<<<<<<<<<<<
16675  * return math.atan(obj)
16676  * except:
16677  */
16678  }
16679  __pyx_L4_error:;
16680  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16681  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16682  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16683 
16684  /* "PyClical.pyx":1783
16685  * try:
16686  * return math.atan(obj)
16687  * except: # <<<<<<<<<<<<<<
16688  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16689  *
16690  */
16691  /*except:*/ {
16692  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16693  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
16694  __Pyx_GOTREF(__pyx_t_5);
16695  __Pyx_GOTREF(__pyx_t_9);
16696  __Pyx_GOTREF(__pyx_t_3);
16697 
16698  /* "PyClical.pyx":1784
16699  * return math.atan(obj)
16700  * except:
16701  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16702  *
16703  * cpdef inline tanh(obj):
16704  */
16705  __Pyx_XDECREF(__pyx_r);
16706  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
16707  __Pyx_GOTREF(__pyx_t_10);
16708  __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)
16709  __Pyx_GOTREF(__pyx_t_11);
16710  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16711  __pyx_r = __pyx_t_11;
16712  __pyx_t_11 = 0;
16713  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16714  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16715  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16716  goto __pyx_L7_except_return;
16717  }
16718  __pyx_L6_except_error:;
16719 
16720  /* "PyClical.pyx":1781
16721  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16722  * else:
16723  * try: # <<<<<<<<<<<<<<
16724  * return math.atan(obj)
16725  * except:
16726  */
16727  __Pyx_XGIVEREF(__pyx_t_6);
16728  __Pyx_XGIVEREF(__pyx_t_7);
16729  __Pyx_XGIVEREF(__pyx_t_8);
16730  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16731  goto __pyx_L1_error;
16732  __pyx_L8_try_return:;
16733  __Pyx_XGIVEREF(__pyx_t_6);
16734  __Pyx_XGIVEREF(__pyx_t_7);
16735  __Pyx_XGIVEREF(__pyx_t_8);
16736  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16737  goto __pyx_L0;
16738  __pyx_L7_except_return:;
16739  __Pyx_XGIVEREF(__pyx_t_6);
16740  __Pyx_XGIVEREF(__pyx_t_7);
16741  __Pyx_XGIVEREF(__pyx_t_8);
16742  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16743  goto __pyx_L0;
16744  }
16745  }
16746 
16747  /* "PyClical.pyx":1769
16748  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16749  *
16750  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16751  * """
16752  * Inverse tangent of multivector with optional complexifier.
16753  */
16754 
16755  /* function exit code */
16756  __pyx_L1_error:;
16757  __Pyx_XDECREF(__pyx_t_3);
16758  __Pyx_XDECREF(__pyx_t_5);
16759  __Pyx_XDECREF(__pyx_t_9);
16760  __Pyx_XDECREF(__pyx_t_10);
16761  __Pyx_XDECREF(__pyx_t_11);
16762  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16763  __pyx_r = 0;
16764  __pyx_L0:;
16765  __Pyx_XGIVEREF(__pyx_r);
16766  __Pyx_RefNannyFinishContext();
16767  return __pyx_r;
16768  }
16769 
16770  /* Python wrapper */
16771  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16772  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 ";
16773  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16774  PyObject *__pyx_v_obj = 0;
16775  PyObject *__pyx_v_i = 0;
16776  PyObject *__pyx_r = 0;
16777  __Pyx_RefNannyDeclarations
16778  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
16779  {
16780  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16781  PyObject* values[2] = {0,0};
16782  values[1] = ((PyObject *)Py_None);
16783  if (unlikely(__pyx_kwds)) {
16784  Py_ssize_t kw_args;
16785  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16786  switch (pos_args) {
16787  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16788  CYTHON_FALLTHROUGH;
16789  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16790  CYTHON_FALLTHROUGH;
16791  case 0: break;
16792  default: goto __pyx_L5_argtuple_error;
16793  }
16794  kw_args = PyDict_Size(__pyx_kwds);
16795  switch (pos_args) {
16796  case 0:
16797  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16798  else goto __pyx_L5_argtuple_error;
16799  CYTHON_FALLTHROUGH;
16800  case 1:
16801  if (kw_args > 0) {
16802  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16803  if (value) { values[1] = value; kw_args--; }
16804  }
16805  }
16806  if (unlikely(kw_args > 0)) {
16807  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
16808  }
16809  } else {
16810  switch (PyTuple_GET_SIZE(__pyx_args)) {
16811  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16812  CYTHON_FALLTHROUGH;
16813  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16814  break;
16815  default: goto __pyx_L5_argtuple_error;
16816  }
16817  }
16818  __pyx_v_obj = values[0];
16819  __pyx_v_i = values[1];
16820  }
16821  goto __pyx_L4_argument_unpacking_done;
16822  __pyx_L5_argtuple_error:;
16823  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
16824  __pyx_L3_error:;
16825  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16826  __Pyx_RefNannyFinishContext();
16827  return NULL;
16828  __pyx_L4_argument_unpacking_done:;
16829  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16830 
16831  /* function exit code */
16832  __Pyx_RefNannyFinishContext();
16833  return __pyx_r;
16834  }
16835 
16836  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16837  PyObject *__pyx_r = NULL;
16838  __Pyx_RefNannyDeclarations
16839  PyObject *__pyx_t_1 = NULL;
16840  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16841  __Pyx_RefNannySetupContext("atan", 0);
16842  __Pyx_XDECREF(__pyx_r);
16843  __pyx_t_2.__pyx_n = 1;
16844  __pyx_t_2.i = __pyx_v_i;
16845  __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)
16846  __Pyx_GOTREF(__pyx_t_1);
16847  __pyx_r = __pyx_t_1;
16848  __pyx_t_1 = 0;
16849  goto __pyx_L0;
16850 
16851  /* function exit code */
16852  __pyx_L1_error:;
16853  __Pyx_XDECREF(__pyx_t_1);
16854  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16855  __pyx_r = NULL;
16856  __pyx_L0:;
16857  __Pyx_XGIVEREF(__pyx_r);
16858  __Pyx_RefNannyFinishContext();
16859  return __pyx_r;
16860  }
16861 
16862  /* "PyClical.pyx":1786
16863  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16864  *
16865  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
16866  * """
16867  * Hyperbolic tangent of multivector.
16868  */
16869 
16870  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16871  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16872  PyObject *__pyx_r = NULL;
16873  __Pyx_RefNannyDeclarations
16874  PyObject *__pyx_t_1 = NULL;
16875  PyObject *__pyx_t_2 = NULL;
16876  PyObject *__pyx_t_3 = NULL;
16877  PyObject *__pyx_t_4 = NULL;
16878  PyObject *__pyx_t_5 = NULL;
16879  PyObject *__pyx_t_6 = NULL;
16880  PyObject *__pyx_t_7 = NULL;
16881  PyObject *__pyx_t_8 = NULL;
16882  __Pyx_RefNannySetupContext("tanh", 0);
16883 
16884  /* "PyClical.pyx":1793
16885  * {1,2}
16886  * """
16887  * try: # <<<<<<<<<<<<<<
16888  * return math.tanh(obj)
16889  * except:
16890  */
16891  {
16892  __Pyx_PyThreadState_declare
16893  __Pyx_PyThreadState_assign
16894  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16895  __Pyx_XGOTREF(__pyx_t_1);
16896  __Pyx_XGOTREF(__pyx_t_2);
16897  __Pyx_XGOTREF(__pyx_t_3);
16898  /*try:*/ {
16899 
16900  /* "PyClical.pyx":1794
16901  * """
16902  * try:
16903  * return math.tanh(obj) # <<<<<<<<<<<<<<
16904  * except:
16905  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16906  */
16907  __Pyx_XDECREF(__pyx_r);
16908  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
16909  __Pyx_GOTREF(__pyx_t_5);
16910  __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)
16911  __Pyx_GOTREF(__pyx_t_6);
16912  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16913  __pyx_t_5 = NULL;
16914  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16915  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16916  if (likely(__pyx_t_5)) {
16917  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16918  __Pyx_INCREF(__pyx_t_5);
16919  __Pyx_INCREF(function);
16920  __Pyx_DECREF_SET(__pyx_t_6, function);
16921  }
16922  }
16923  __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);
16924  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16925  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
16926  __Pyx_GOTREF(__pyx_t_4);
16927  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16928  __pyx_r = __pyx_t_4;
16929  __pyx_t_4 = 0;
16930  goto __pyx_L7_try_return;
16931 
16932  /* "PyClical.pyx":1793
16933  * {1,2}
16934  * """
16935  * try: # <<<<<<<<<<<<<<
16936  * return math.tanh(obj)
16937  * except:
16938  */
16939  }
16940  __pyx_L3_error:;
16941  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16942  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16943  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16944 
16945  /* "PyClical.pyx":1795
16946  * try:
16947  * return math.tanh(obj)
16948  * except: # <<<<<<<<<<<<<<
16949  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16950  *
16951  */
16952  /*except:*/ {
16953  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16954  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
16955  __Pyx_GOTREF(__pyx_t_4);
16956  __Pyx_GOTREF(__pyx_t_6);
16957  __Pyx_GOTREF(__pyx_t_5);
16958 
16959  /* "PyClical.pyx":1796
16960  * return math.tanh(obj)
16961  * except:
16962  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16963  *
16964  * cpdef inline atanh(obj,i = None):
16965  */
16966  __Pyx_XDECREF(__pyx_r);
16967  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
16968  __Pyx_GOTREF(__pyx_t_7);
16969  __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)
16970  __Pyx_GOTREF(__pyx_t_8);
16971  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16972  __pyx_r = __pyx_t_8;
16973  __pyx_t_8 = 0;
16974  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16975  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16976  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16977  goto __pyx_L6_except_return;
16978  }
16979  __pyx_L5_except_error:;
16980 
16981  /* "PyClical.pyx":1793
16982  * {1,2}
16983  * """
16984  * try: # <<<<<<<<<<<<<<
16985  * return math.tanh(obj)
16986  * except:
16987  */
16988  __Pyx_XGIVEREF(__pyx_t_1);
16989  __Pyx_XGIVEREF(__pyx_t_2);
16990  __Pyx_XGIVEREF(__pyx_t_3);
16991  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16992  goto __pyx_L1_error;
16993  __pyx_L7_try_return:;
16994  __Pyx_XGIVEREF(__pyx_t_1);
16995  __Pyx_XGIVEREF(__pyx_t_2);
16996  __Pyx_XGIVEREF(__pyx_t_3);
16997  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16998  goto __pyx_L0;
16999  __pyx_L6_except_return:;
17000  __Pyx_XGIVEREF(__pyx_t_1);
17001  __Pyx_XGIVEREF(__pyx_t_2);
17002  __Pyx_XGIVEREF(__pyx_t_3);
17003  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17004  goto __pyx_L0;
17005  }
17006 
17007  /* "PyClical.pyx":1786
17008  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17009  *
17010  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17011  * """
17012  * Hyperbolic tangent of multivector.
17013  */
17014 
17015  /* function exit code */
17016  __pyx_L1_error:;
17017  __Pyx_XDECREF(__pyx_t_4);
17018  __Pyx_XDECREF(__pyx_t_5);
17019  __Pyx_XDECREF(__pyx_t_6);
17020  __Pyx_XDECREF(__pyx_t_7);
17021  __Pyx_XDECREF(__pyx_t_8);
17022  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17023  __pyx_r = 0;
17024  __pyx_L0:;
17025  __Pyx_XGIVEREF(__pyx_r);
17026  __Pyx_RefNannyFinishContext();
17027  return __pyx_r;
17028  }
17029 
17030  /* Python wrapper */
17031  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17032  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 ";
17033  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17034  PyObject *__pyx_r = 0;
17035  __Pyx_RefNannyDeclarations
17036  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17037  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17038 
17039  /* function exit code */
17040  __Pyx_RefNannyFinishContext();
17041  return __pyx_r;
17042  }
17043 
17044  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17045  PyObject *__pyx_r = NULL;
17046  __Pyx_RefNannyDeclarations
17047  PyObject *__pyx_t_1 = NULL;
17048  __Pyx_RefNannySetupContext("tanh", 0);
17049  __Pyx_XDECREF(__pyx_r);
17050  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17051  __Pyx_GOTREF(__pyx_t_1);
17052  __pyx_r = __pyx_t_1;
17053  __pyx_t_1 = 0;
17054  goto __pyx_L0;
17055 
17056  /* function exit code */
17057  __pyx_L1_error:;
17058  __Pyx_XDECREF(__pyx_t_1);
17059  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17060  __pyx_r = NULL;
17061  __pyx_L0:;
17062  __Pyx_XGIVEREF(__pyx_r);
17063  __Pyx_RefNannyFinishContext();
17064  return __pyx_r;
17065  }
17066 
17067  /* "PyClical.pyx":1798
17068  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17069  *
17070  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17071  * """
17072  * Inverse hyperbolic tangent of multivector with optional complexifier.
17073  */
17074 
17075  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17076  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) {
17077  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17078  PyObject *__pyx_r = NULL;
17079  __Pyx_RefNannyDeclarations
17080  int __pyx_t_1;
17081  int __pyx_t_2;
17082  PyObject *__pyx_t_3 = NULL;
17083  Clifford __pyx_t_4;
17084  PyObject *__pyx_t_5 = NULL;
17085  PyObject *__pyx_t_6 = NULL;
17086  PyObject *__pyx_t_7 = NULL;
17087  PyObject *__pyx_t_8 = NULL;
17088  PyObject *__pyx_t_9 = NULL;
17089  PyObject *__pyx_t_10 = NULL;
17090  PyObject *__pyx_t_11 = NULL;
17091  __Pyx_RefNannySetupContext("atanh", 0);
17092  if (__pyx_optional_args) {
17093  if (__pyx_optional_args->__pyx_n > 0) {
17094  __pyx_v_i = __pyx_optional_args->i;
17095  }
17096  }
17097 
17098  /* "PyClical.pyx":1807
17099  * {1,2}
17100  * """
17101  * if not (i is None): # <<<<<<<<<<<<<<
17102  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17103  * else:
17104  */
17105  __pyx_t_1 = (__pyx_v_i != Py_None);
17106  __pyx_t_2 = (__pyx_t_1 != 0);
17107  if (__pyx_t_2) {
17108 
17109  /* "PyClical.pyx":1808
17110  * """
17111  * if not (i is None):
17112  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17113  * else:
17114  * try:
17115  */
17116  __Pyx_XDECREF(__pyx_r);
17117  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
17118  __Pyx_GOTREF(__pyx_t_3);
17119  try {
17120  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17121  } catch(...) {
17122  __Pyx_CppExn2PyErr();
17123  __PYX_ERR(0, 1808, __pyx_L1_error)
17124  }
17125  __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)
17126  __Pyx_GOTREF(__pyx_t_5);
17127  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17128  __pyx_r = __pyx_t_5;
17129  __pyx_t_5 = 0;
17130  goto __pyx_L0;
17131 
17132  /* "PyClical.pyx":1807
17133  * {1,2}
17134  * """
17135  * if not (i is None): # <<<<<<<<<<<<<<
17136  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17137  * else:
17138  */
17139  }
17140 
17141  /* "PyClical.pyx":1810
17142  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17143  * else:
17144  * try: # <<<<<<<<<<<<<<
17145  * return math.atanh(obj)
17146  * except:
17147  */
17148  /*else*/ {
17149  {
17150  __Pyx_PyThreadState_declare
17151  __Pyx_PyThreadState_assign
17152  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17153  __Pyx_XGOTREF(__pyx_t_6);
17154  __Pyx_XGOTREF(__pyx_t_7);
17155  __Pyx_XGOTREF(__pyx_t_8);
17156  /*try:*/ {
17157 
17158  /* "PyClical.pyx":1811
17159  * else:
17160  * try:
17161  * return math.atanh(obj) # <<<<<<<<<<<<<<
17162  * except:
17163  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17164  */
17165  __Pyx_XDECREF(__pyx_r);
17166  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17167  __Pyx_GOTREF(__pyx_t_3);
17168  __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)
17169  __Pyx_GOTREF(__pyx_t_9);
17170  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17171  __pyx_t_3 = NULL;
17172  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17173  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17174  if (likely(__pyx_t_3)) {
17175  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17176  __Pyx_INCREF(__pyx_t_3);
17177  __Pyx_INCREF(function);
17178  __Pyx_DECREF_SET(__pyx_t_9, function);
17179  }
17180  }
17181  __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);
17182  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17183  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17184  __Pyx_GOTREF(__pyx_t_5);
17185  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17186  __pyx_r = __pyx_t_5;
17187  __pyx_t_5 = 0;
17188  goto __pyx_L8_try_return;
17189 
17190  /* "PyClical.pyx":1810
17191  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17192  * else:
17193  * try: # <<<<<<<<<<<<<<
17194  * return math.atanh(obj)
17195  * except:
17196  */
17197  }
17198  __pyx_L4_error:;
17199  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17200  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17201  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17202 
17203  /* "PyClical.pyx":1812
17204  * try:
17205  * return math.atanh(obj)
17206  * except: # <<<<<<<<<<<<<<
17207  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17208  *
17209  */
17210  /*except:*/ {
17211  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17212  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17213  __Pyx_GOTREF(__pyx_t_5);
17214  __Pyx_GOTREF(__pyx_t_9);
17215  __Pyx_GOTREF(__pyx_t_3);
17216 
17217  /* "PyClical.pyx":1813
17218  * return math.atanh(obj)
17219  * except:
17220  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17221  *
17222  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17223  */
17224  __Pyx_XDECREF(__pyx_r);
17225  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17226  __Pyx_GOTREF(__pyx_t_10);
17227  __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)
17228  __Pyx_GOTREF(__pyx_t_11);
17229  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17230  __pyx_r = __pyx_t_11;
17231  __pyx_t_11 = 0;
17232  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17233  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17234  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17235  goto __pyx_L7_except_return;
17236  }
17237  __pyx_L6_except_error:;
17238 
17239  /* "PyClical.pyx":1810
17240  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17241  * else:
17242  * try: # <<<<<<<<<<<<<<
17243  * return math.atanh(obj)
17244  * except:
17245  */
17246  __Pyx_XGIVEREF(__pyx_t_6);
17247  __Pyx_XGIVEREF(__pyx_t_7);
17248  __Pyx_XGIVEREF(__pyx_t_8);
17249  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17250  goto __pyx_L1_error;
17251  __pyx_L8_try_return:;
17252  __Pyx_XGIVEREF(__pyx_t_6);
17253  __Pyx_XGIVEREF(__pyx_t_7);
17254  __Pyx_XGIVEREF(__pyx_t_8);
17255  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17256  goto __pyx_L0;
17257  __pyx_L7_except_return:;
17258  __Pyx_XGIVEREF(__pyx_t_6);
17259  __Pyx_XGIVEREF(__pyx_t_7);
17260  __Pyx_XGIVEREF(__pyx_t_8);
17261  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17262  goto __pyx_L0;
17263  }
17264  }
17265 
17266  /* "PyClical.pyx":1798
17267  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17268  *
17269  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17270  * """
17271  * Inverse hyperbolic tangent of multivector with optional complexifier.
17272  */
17273 
17274  /* function exit code */
17275  __pyx_L1_error:;
17276  __Pyx_XDECREF(__pyx_t_3);
17277  __Pyx_XDECREF(__pyx_t_5);
17278  __Pyx_XDECREF(__pyx_t_9);
17279  __Pyx_XDECREF(__pyx_t_10);
17280  __Pyx_XDECREF(__pyx_t_11);
17281  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17282  __pyx_r = 0;
17283  __pyx_L0:;
17284  __Pyx_XGIVEREF(__pyx_r);
17285  __Pyx_RefNannyFinishContext();
17286  return __pyx_r;
17287  }
17288 
17289  /* Python wrapper */
17290  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17291  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 ";
17292  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17293  PyObject *__pyx_v_obj = 0;
17294  PyObject *__pyx_v_i = 0;
17295  PyObject *__pyx_r = 0;
17296  __Pyx_RefNannyDeclarations
17297  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17298  {
17299  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17300  PyObject* values[2] = {0,0};
17301  values[1] = ((PyObject *)Py_None);
17302  if (unlikely(__pyx_kwds)) {
17303  Py_ssize_t kw_args;
17304  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17305  switch (pos_args) {
17306  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17307  CYTHON_FALLTHROUGH;
17308  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17309  CYTHON_FALLTHROUGH;
17310  case 0: break;
17311  default: goto __pyx_L5_argtuple_error;
17312  }
17313  kw_args = PyDict_Size(__pyx_kwds);
17314  switch (pos_args) {
17315  case 0:
17316  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17317  else goto __pyx_L5_argtuple_error;
17318  CYTHON_FALLTHROUGH;
17319  case 1:
17320  if (kw_args > 0) {
17321  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17322  if (value) { values[1] = value; kw_args--; }
17323  }
17324  }
17325  if (unlikely(kw_args > 0)) {
17326  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
17327  }
17328  } else {
17329  switch (PyTuple_GET_SIZE(__pyx_args)) {
17330  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17331  CYTHON_FALLTHROUGH;
17332  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17333  break;
17334  default: goto __pyx_L5_argtuple_error;
17335  }
17336  }
17337  __pyx_v_obj = values[0];
17338  __pyx_v_i = values[1];
17339  }
17340  goto __pyx_L4_argument_unpacking_done;
17341  __pyx_L5_argtuple_error:;
17342  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
17343  __pyx_L3_error:;
17344  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17345  __Pyx_RefNannyFinishContext();
17346  return NULL;
17347  __pyx_L4_argument_unpacking_done:;
17348  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17349 
17350  /* function exit code */
17351  __Pyx_RefNannyFinishContext();
17352  return __pyx_r;
17353  }
17354 
17355  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17356  PyObject *__pyx_r = NULL;
17357  __Pyx_RefNannyDeclarations
17358  PyObject *__pyx_t_1 = NULL;
17359  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17360  __Pyx_RefNannySetupContext("atanh", 0);
17361  __Pyx_XDECREF(__pyx_r);
17362  __pyx_t_2.__pyx_n = 1;
17363  __pyx_t_2.i = __pyx_v_i;
17364  __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)
17365  __Pyx_GOTREF(__pyx_t_1);
17366  __pyx_r = __pyx_t_1;
17367  __pyx_t_1 = 0;
17368  goto __pyx_L0;
17369 
17370  /* function exit code */
17371  __pyx_L1_error:;
17372  __Pyx_XDECREF(__pyx_t_1);
17373  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17374  __pyx_r = NULL;
17375  __pyx_L0:;
17376  __Pyx_XGIVEREF(__pyx_r);
17377  __Pyx_RefNannyFinishContext();
17378  return __pyx_r;
17379  }
17380 
17381  /* "PyClical.pyx":1815
17382  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17383  *
17384  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17385  * """
17386  * Random multivector within a frame.
17387  */
17388 
17389  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17390  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) {
17391  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17392  PyObject *__pyx_r = NULL;
17393  __Pyx_RefNannyDeclarations
17394  PyObject *__pyx_t_1 = NULL;
17395  PyObject *__pyx_t_2 = NULL;
17396  scalar_t __pyx_t_3;
17397  PyObject *__pyx_t_4 = NULL;
17398  __Pyx_RefNannySetupContext("random_clifford", 0);
17399  if (__pyx_optional_args) {
17400  if (__pyx_optional_args->__pyx_n > 0) {
17401  __pyx_v_fill = __pyx_optional_args->fill;
17402  }
17403  }
17404 
17405  /* "PyClical.pyx":1822
17406  * {-3,-1,2}
17407  * """
17408  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
17409  *
17410  * cpdef inline cga3(obj):
17411  */
17412  __Pyx_XDECREF(__pyx_r);
17413  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
17414  __Pyx_GOTREF(__pyx_t_1);
17415  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
17416  __Pyx_GOTREF(__pyx_t_2);
17417  __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)
17418  __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)
17419  __Pyx_GOTREF(__pyx_t_4);
17420  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17421  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17422  __pyx_r = __pyx_t_4;
17423  __pyx_t_4 = 0;
17424  goto __pyx_L0;
17425 
17426  /* "PyClical.pyx":1815
17427  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17428  *
17429  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17430  * """
17431  * Random multivector within a frame.
17432  */
17433 
17434  /* function exit code */
17435  __pyx_L1_error:;
17436  __Pyx_XDECREF(__pyx_t_1);
17437  __Pyx_XDECREF(__pyx_t_2);
17438  __Pyx_XDECREF(__pyx_t_4);
17439  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17440  __pyx_r = 0;
17441  __pyx_L0:;
17442  __Pyx_XGIVEREF(__pyx_r);
17443  __Pyx_RefNannyFinishContext();
17444  return __pyx_r;
17445  }
17446 
17447  /* Python wrapper */
17448  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17449  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 ";
17450  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17451  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17452  PyObject *__pyx_v_fill = 0;
17453  PyObject *__pyx_r = 0;
17454  __Pyx_RefNannyDeclarations
17455  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
17456  {
17457  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17458  PyObject* values[2] = {0,0};
17459  values[1] = ((PyObject *)__pyx_float_1_0);
17460  if (unlikely(__pyx_kwds)) {
17461  Py_ssize_t kw_args;
17462  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17463  switch (pos_args) {
17464  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17465  CYTHON_FALLTHROUGH;
17466  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17467  CYTHON_FALLTHROUGH;
17468  case 0: break;
17469  default: goto __pyx_L5_argtuple_error;
17470  }
17471  kw_args = PyDict_Size(__pyx_kwds);
17472  switch (pos_args) {
17473  case 0:
17474  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17475  else goto __pyx_L5_argtuple_error;
17476  CYTHON_FALLTHROUGH;
17477  case 1:
17478  if (kw_args > 0) {
17479  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
17480  if (value) { values[1] = value; kw_args--; }
17481  }
17482  }
17483  if (unlikely(kw_args > 0)) {
17484  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
17485  }
17486  } else {
17487  switch (PyTuple_GET_SIZE(__pyx_args)) {
17488  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17489  CYTHON_FALLTHROUGH;
17490  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17491  break;
17492  default: goto __pyx_L5_argtuple_error;
17493  }
17494  }
17495  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
17496  __pyx_v_fill = values[1];
17497  }
17498  goto __pyx_L4_argument_unpacking_done;
17499  __pyx_L5_argtuple_error:;
17500  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
17501  __pyx_L3_error:;
17502  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17503  __Pyx_RefNannyFinishContext();
17504  return NULL;
17505  __pyx_L4_argument_unpacking_done:;
17506  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
17507  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17508 
17509  /* function exit code */
17510  goto __pyx_L0;
17511  __pyx_L1_error:;
17512  __pyx_r = NULL;
17513  __pyx_L0:;
17514  __Pyx_RefNannyFinishContext();
17515  return __pyx_r;
17516  }
17517 
17518  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) {
17519  PyObject *__pyx_r = NULL;
17520  __Pyx_RefNannyDeclarations
17521  PyObject *__pyx_t_1 = NULL;
17522  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17523  __Pyx_RefNannySetupContext("random_clifford", 0);
17524  __Pyx_XDECREF(__pyx_r);
17525  __pyx_t_2.__pyx_n = 1;
17526  __pyx_t_2.fill = __pyx_v_fill;
17527  __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)
17528  __Pyx_GOTREF(__pyx_t_1);
17529  __pyx_r = __pyx_t_1;
17530  __pyx_t_1 = 0;
17531  goto __pyx_L0;
17532 
17533  /* function exit code */
17534  __pyx_L1_error:;
17535  __Pyx_XDECREF(__pyx_t_1);
17536  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17537  __pyx_r = NULL;
17538  __pyx_L0:;
17539  __Pyx_XGIVEREF(__pyx_r);
17540  __Pyx_RefNannyFinishContext();
17541  return __pyx_r;
17542  }
17543 
17544  /* "PyClical.pyx":1824
17545  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17546  *
17547  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17548  * """
17549  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17550  */
17551 
17552  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17553  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17554  PyObject *__pyx_r = NULL;
17555  __Pyx_RefNannyDeclarations
17556  PyObject *__pyx_t_1 = NULL;
17557  PyObject *__pyx_t_2 = NULL;
17558  __Pyx_RefNannySetupContext("cga3", 0);
17559 
17560  /* "PyClical.pyx":1831
17561  * 87{-1}+4{1}+18{2}+2{3}+85{4}
17562  * """
17563  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17564  *
17565  * cpdef inline cga3std(obj):
17566  */
17567  __Pyx_XDECREF(__pyx_r);
17568  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
17569  __Pyx_GOTREF(__pyx_t_1);
17570  __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)
17571  __Pyx_GOTREF(__pyx_t_2);
17572  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17573  __pyx_r = __pyx_t_2;
17574  __pyx_t_2 = 0;
17575  goto __pyx_L0;
17576 
17577  /* "PyClical.pyx":1824
17578  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17579  *
17580  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17581  * """
17582  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17583  */
17584 
17585  /* function exit code */
17586  __pyx_L1_error:;
17587  __Pyx_XDECREF(__pyx_t_1);
17588  __Pyx_XDECREF(__pyx_t_2);
17589  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17590  __pyx_r = 0;
17591  __pyx_L0:;
17592  __Pyx_XGIVEREF(__pyx_r);
17593  __Pyx_RefNannyFinishContext();
17594  return __pyx_r;
17595  }
17596 
17597  /* Python wrapper */
17598  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17599  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 ";
17600  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17601  PyObject *__pyx_r = 0;
17602  __Pyx_RefNannyDeclarations
17603  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
17604  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
17605 
17606  /* function exit code */
17607  __Pyx_RefNannyFinishContext();
17608  return __pyx_r;
17609  }
17610 
17611  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17612  PyObject *__pyx_r = NULL;
17613  __Pyx_RefNannyDeclarations
17614  PyObject *__pyx_t_1 = NULL;
17615  __Pyx_RefNannySetupContext("cga3", 0);
17616  __Pyx_XDECREF(__pyx_r);
17617  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
17618  __Pyx_GOTREF(__pyx_t_1);
17619  __pyx_r = __pyx_t_1;
17620  __pyx_t_1 = 0;
17621  goto __pyx_L0;
17622 
17623  /* function exit code */
17624  __pyx_L1_error:;
17625  __Pyx_XDECREF(__pyx_t_1);
17626  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17627  __pyx_r = NULL;
17628  __pyx_L0:;
17629  __Pyx_XGIVEREF(__pyx_r);
17630  __Pyx_RefNannyFinishContext();
17631  return __pyx_r;
17632  }
17633 
17634  /* "PyClical.pyx":1833
17635  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17636  *
17637  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17638  * """
17639  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17640  */
17641 
17642  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17643  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17644  PyObject *__pyx_r = NULL;
17645  __Pyx_RefNannyDeclarations
17646  PyObject *__pyx_t_1 = NULL;
17647  PyObject *__pyx_t_2 = NULL;
17648  __Pyx_RefNannySetupContext("cga3std", 0);
17649 
17650  /* "PyClical.pyx":1842
17651  * 0
17652  * """
17653  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
17654  *
17655  * cpdef inline agc3(obj):
17656  */
17657  __Pyx_XDECREF(__pyx_r);
17658  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
17659  __Pyx_GOTREF(__pyx_t_1);
17660  __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)
17661  __Pyx_GOTREF(__pyx_t_2);
17662  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17663  __pyx_r = __pyx_t_2;
17664  __pyx_t_2 = 0;
17665  goto __pyx_L0;
17666 
17667  /* "PyClical.pyx":1833
17668  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17669  *
17670  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17671  * """
17672  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17673  */
17674 
17675  /* function exit code */
17676  __pyx_L1_error:;
17677  __Pyx_XDECREF(__pyx_t_1);
17678  __Pyx_XDECREF(__pyx_t_2);
17679  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17680  __pyx_r = 0;
17681  __pyx_L0:;
17682  __Pyx_XGIVEREF(__pyx_r);
17683  __Pyx_RefNannyFinishContext();
17684  return __pyx_r;
17685  }
17686 
17687  /* Python wrapper */
17688  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17689  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 ";
17690  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17691  PyObject *__pyx_r = 0;
17692  __Pyx_RefNannyDeclarations
17693  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
17694  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
17695 
17696  /* function exit code */
17697  __Pyx_RefNannyFinishContext();
17698  return __pyx_r;
17699  }
17700 
17701  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17702  PyObject *__pyx_r = NULL;
17703  __Pyx_RefNannyDeclarations
17704  PyObject *__pyx_t_1 = NULL;
17705  __Pyx_RefNannySetupContext("cga3std", 0);
17706  __Pyx_XDECREF(__pyx_r);
17707  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
17708  __Pyx_GOTREF(__pyx_t_1);
17709  __pyx_r = __pyx_t_1;
17710  __pyx_t_1 = 0;
17711  goto __pyx_L0;
17712 
17713  /* function exit code */
17714  __pyx_L1_error:;
17715  __Pyx_XDECREF(__pyx_t_1);
17716  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17717  __pyx_r = NULL;
17718  __pyx_L0:;
17719  __Pyx_XGIVEREF(__pyx_r);
17720  __Pyx_RefNannyFinishContext();
17721  return __pyx_r;
17722  }
17723 
17724  /* "PyClical.pyx":1844
17725  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17726  *
17727  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17728  * """
17729  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17730  */
17731 
17732  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17733  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17734  PyObject *__pyx_r = NULL;
17735  __Pyx_RefNannyDeclarations
17736  PyObject *__pyx_t_1 = NULL;
17737  PyObject *__pyx_t_2 = NULL;
17738  __Pyx_RefNannySetupContext("agc3", 0);
17739 
17740  /* "PyClical.pyx":1853
17741  * 0
17742  * """
17743  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17744  *
17745  * # Some abbreviations.
17746  */
17747  __Pyx_XDECREF(__pyx_r);
17748  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
17749  __Pyx_GOTREF(__pyx_t_1);
17750  __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)
17751  __Pyx_GOTREF(__pyx_t_2);
17752  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17753  __pyx_r = __pyx_t_2;
17754  __pyx_t_2 = 0;
17755  goto __pyx_L0;
17756 
17757  /* "PyClical.pyx":1844
17758  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17759  *
17760  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17761  * """
17762  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17763  */
17764 
17765  /* function exit code */
17766  __pyx_L1_error:;
17767  __Pyx_XDECREF(__pyx_t_1);
17768  __Pyx_XDECREF(__pyx_t_2);
17769  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17770  __pyx_r = 0;
17771  __pyx_L0:;
17772  __Pyx_XGIVEREF(__pyx_r);
17773  __Pyx_RefNannyFinishContext();
17774  return __pyx_r;
17775  }
17776 
17777  /* Python wrapper */
17778  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17779  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 ";
17780  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17781  PyObject *__pyx_r = 0;
17782  __Pyx_RefNannyDeclarations
17783  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
17784  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17785 
17786  /* function exit code */
17787  __Pyx_RefNannyFinishContext();
17788  return __pyx_r;
17789  }
17790 
17791  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17792  PyObject *__pyx_r = NULL;
17793  __Pyx_RefNannyDeclarations
17794  PyObject *__pyx_t_1 = NULL;
17795  __Pyx_RefNannySetupContext("agc3", 0);
17796  __Pyx_XDECREF(__pyx_r);
17797  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
17798  __Pyx_GOTREF(__pyx_t_1);
17799  __pyx_r = __pyx_t_1;
17800  __pyx_t_1 = 0;
17801  goto __pyx_L0;
17802 
17803  /* function exit code */
17804  __pyx_L1_error:;
17805  __Pyx_XDECREF(__pyx_t_1);
17806  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17807  __pyx_r = NULL;
17808  __pyx_L0:;
17809  __Pyx_XGIVEREF(__pyx_r);
17810  __Pyx_RefNannyFinishContext();
17811  return __pyx_r;
17812  }
17813 
17814  /* "PyClical.pyx":1887
17815  * """
17816  *
17817  * def e(obj): # <<<<<<<<<<<<<<
17818  * """
17819  * Abbreviation for clifford(index_set(obj)).
17820  */
17821 
17822  /* Python wrapper */
17823  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17824  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 ";
17825  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17826  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17827  PyObject *__pyx_r = 0;
17828  __Pyx_RefNannyDeclarations
17829  __Pyx_RefNannySetupContext("e (wrapper)", 0);
17830  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17831 
17832  /* function exit code */
17833  __Pyx_RefNannyFinishContext();
17834  return __pyx_r;
17835  }
17836 
17837  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17838  PyObject *__pyx_r = NULL;
17839  __Pyx_RefNannyDeclarations
17840  PyObject *__pyx_t_1 = NULL;
17841  PyObject *__pyx_t_2 = NULL;
17842  __Pyx_RefNannySetupContext("e", 0);
17843 
17844  /* "PyClical.pyx":1898
17845  * 1
17846  * """
17847  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
17848  *
17849  * def istpq(p, q):
17850  */
17851  __Pyx_XDECREF(__pyx_r);
17852  __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)
17853  __Pyx_GOTREF(__pyx_t_1);
17854  __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)
17855  __Pyx_GOTREF(__pyx_t_2);
17856  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17857  __pyx_r = __pyx_t_2;
17858  __pyx_t_2 = 0;
17859  goto __pyx_L0;
17860 
17861  /* "PyClical.pyx":1887
17862  * """
17863  *
17864  * def e(obj): # <<<<<<<<<<<<<<
17865  * """
17866  * Abbreviation for clifford(index_set(obj)).
17867  */
17868 
17869  /* function exit code */
17870  __pyx_L1_error:;
17871  __Pyx_XDECREF(__pyx_t_1);
17872  __Pyx_XDECREF(__pyx_t_2);
17873  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17874  __pyx_r = NULL;
17875  __pyx_L0:;
17876  __Pyx_XGIVEREF(__pyx_r);
17877  __Pyx_RefNannyFinishContext();
17878  return __pyx_r;
17879  }
17880 
17881  /* "PyClical.pyx":1900
17882  * return clifford(index_set(obj))
17883  *
17884  * def istpq(p, q): # <<<<<<<<<<<<<<
17885  * """
17886  * Abbreviation for index_set({-q,...p}).
17887  */
17888 
17889  /* Python wrapper */
17890  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17891  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 ";
17892  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17893  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17894  PyObject *__pyx_v_p = 0;
17895  PyObject *__pyx_v_q = 0;
17896  PyObject *__pyx_r = 0;
17897  __Pyx_RefNannyDeclarations
17898  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
17899  {
17900  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17901  PyObject* values[2] = {0,0};
17902  if (unlikely(__pyx_kwds)) {
17903  Py_ssize_t kw_args;
17904  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17905  switch (pos_args) {
17906  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17907  CYTHON_FALLTHROUGH;
17908  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17909  CYTHON_FALLTHROUGH;
17910  case 0: break;
17911  default: goto __pyx_L5_argtuple_error;
17912  }
17913  kw_args = PyDict_Size(__pyx_kwds);
17914  switch (pos_args) {
17915  case 0:
17916  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17917  else goto __pyx_L5_argtuple_error;
17918  CYTHON_FALLTHROUGH;
17919  case 1:
17920  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17921  else {
17922  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
17923  }
17924  }
17925  if (unlikely(kw_args > 0)) {
17926  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
17927  }
17928  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
17929  goto __pyx_L5_argtuple_error;
17930  } else {
17931  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17932  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17933  }
17934  __pyx_v_p = values[0];
17935  __pyx_v_q = values[1];
17936  }
17937  goto __pyx_L4_argument_unpacking_done;
17938  __pyx_L5_argtuple_error:;
17939  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
17940  __pyx_L3_error:;
17941  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17942  __Pyx_RefNannyFinishContext();
17943  return NULL;
17944  __pyx_L4_argument_unpacking_done:;
17945  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
17946 
17947  /* function exit code */
17948  __Pyx_RefNannyFinishContext();
17949  return __pyx_r;
17950  }
17951 
17952  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
17953  PyObject *__pyx_r = NULL;
17954  __Pyx_RefNannyDeclarations
17955  PyObject *__pyx_t_1 = NULL;
17956  PyObject *__pyx_t_2 = NULL;
17957  PyObject *__pyx_t_3 = NULL;
17958  __Pyx_RefNannySetupContext("istpq", 0);
17959 
17960  /* "PyClical.pyx":1907
17961  * {-3,-2,-1,1,2}
17962  * """
17963  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
17964  *
17965  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
17966  */
17967  __Pyx_XDECREF(__pyx_r);
17968  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
17969  __Pyx_GOTREF(__pyx_t_1);
17970  __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)
17971  __Pyx_GOTREF(__pyx_t_2);
17972  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17973  __Pyx_GOTREF(__pyx_t_3);
17974  __Pyx_GIVEREF(__pyx_t_1);
17975  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17976  __Pyx_GIVEREF(__pyx_t_2);
17977  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
17978  __pyx_t_1 = 0;
17979  __pyx_t_2 = 0;
17980  __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)
17981  __Pyx_GOTREF(__pyx_t_2);
17982  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17983  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17984  __Pyx_GOTREF(__pyx_t_3);
17985  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17986  __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)
17987  __Pyx_GOTREF(__pyx_t_2);
17988  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17989  __pyx_r = __pyx_t_2;
17990  __pyx_t_2 = 0;
17991  goto __pyx_L0;
17992 
17993  /* "PyClical.pyx":1900
17994  * return clifford(index_set(obj))
17995  *
17996  * def istpq(p, q): # <<<<<<<<<<<<<<
17997  * """
17998  * Abbreviation for index_set({-q,...p}).
17999  */
18000 
18001  /* function exit code */
18002  __pyx_L1_error:;
18003  __Pyx_XDECREF(__pyx_t_1);
18004  __Pyx_XDECREF(__pyx_t_2);
18005  __Pyx_XDECREF(__pyx_t_3);
18006  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18007  __pyx_r = NULL;
18008  __pyx_L0:;
18009  __Pyx_XGIVEREF(__pyx_r);
18010  __Pyx_RefNannyFinishContext();
18011  return __pyx_r;
18012  }
18013 
18014  /* "PyClical.pyx":1913
18015  *
18016  * # Doctest interface.
18017  * def _test(): # <<<<<<<<<<<<<<
18018  * import PyClical, doctest
18019  * return doctest.testmod(PyClical)
18020  */
18021 
18022  /* Python wrapper */
18023  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18024  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18025  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18026  PyObject *__pyx_r = 0;
18027  __Pyx_RefNannyDeclarations
18028  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18029  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18030 
18031  /* function exit code */
18032  __Pyx_RefNannyFinishContext();
18033  return __pyx_r;
18034  }
18035 
18036  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18037  PyObject *__pyx_v_PyClical = NULL;
18038  PyObject *__pyx_v_doctest = NULL;
18039  PyObject *__pyx_r = NULL;
18040  __Pyx_RefNannyDeclarations
18041  PyObject *__pyx_t_1 = NULL;
18042  PyObject *__pyx_t_2 = NULL;
18043  PyObject *__pyx_t_3 = NULL;
18044  __Pyx_RefNannySetupContext("_test", 0);
18045 
18046  /* "PyClical.pyx":1914
18047  * # Doctest interface.
18048  * def _test():
18049  * import PyClical, doctest # <<<<<<<<<<<<<<
18050  * return doctest.testmod(PyClical)
18051  *
18052  */
18053  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18054  __Pyx_GOTREF(__pyx_t_1);
18055  __pyx_v_PyClical = __pyx_t_1;
18056  __pyx_t_1 = 0;
18057  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18058  __Pyx_GOTREF(__pyx_t_1);
18059  __pyx_v_doctest = __pyx_t_1;
18060  __pyx_t_1 = 0;
18061 
18062  /* "PyClical.pyx":1915
18063  * def _test():
18064  * import PyClical, doctest
18065  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18066  *
18067  * if __name__ == "__main__":
18068  */
18069  __Pyx_XDECREF(__pyx_r);
18070  __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)
18071  __Pyx_GOTREF(__pyx_t_2);
18072  __pyx_t_3 = NULL;
18073  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18074  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18075  if (likely(__pyx_t_3)) {
18076  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18077  __Pyx_INCREF(__pyx_t_3);
18078  __Pyx_INCREF(function);
18079  __Pyx_DECREF_SET(__pyx_t_2, function);
18080  }
18081  }
18082  __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);
18083  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18084  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18085  __Pyx_GOTREF(__pyx_t_1);
18086  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18087  __pyx_r = __pyx_t_1;
18088  __pyx_t_1 = 0;
18089  goto __pyx_L0;
18090 
18091  /* "PyClical.pyx":1913
18092  *
18093  * # Doctest interface.
18094  * def _test(): # <<<<<<<<<<<<<<
18095  * import PyClical, doctest
18096  * return doctest.testmod(PyClical)
18097  */
18098 
18099  /* function exit code */
18100  __pyx_L1_error:;
18101  __Pyx_XDECREF(__pyx_t_1);
18102  __Pyx_XDECREF(__pyx_t_2);
18103  __Pyx_XDECREF(__pyx_t_3);
18104  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18105  __pyx_r = NULL;
18106  __pyx_L0:;
18107  __Pyx_XDECREF(__pyx_v_PyClical);
18108  __Pyx_XDECREF(__pyx_v_doctest);
18109  __Pyx_XGIVEREF(__pyx_r);
18110  __Pyx_RefNannyFinishContext();
18111  return __pyx_r;
18112  }
18113  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18114 
18115  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18116  struct __pyx_obj_8PyClical_index_set *p;
18117  PyObject *o;
18118  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18119  o = (*t->tp_alloc)(t, 0);
18120  } else {
18121  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18122  }
18123  if (unlikely(!o)) return 0;
18124  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18125  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18126  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18127  return o;
18128  bad:
18129  Py_DECREF(o); o = 0;
18130  return NULL;
18131  }
18132 
18133  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18134  #if CYTHON_USE_TP_FINALIZE
18135  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))) {
18136  if (PyObject_CallFinalizerFromDealloc(o)) return;
18137  }
18138  #endif
18139  {
18140  PyObject *etype, *eval, *etb;
18141  PyErr_Fetch(&etype, &eval, &etb);
18142  ++Py_REFCNT(o);
18143  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18144  --Py_REFCNT(o);
18145  PyErr_Restore(etype, eval, etb);
18146  }
18147  (*Py_TYPE(o)->tp_free)(o);
18148  }
18149  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18150  PyObject *r;
18151  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18152  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18153  Py_DECREF(x);
18154  return r;
18155  }
18156 
18157  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18158  if (v) {
18159  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18160  }
18161  else {
18162  PyErr_Format(PyExc_NotImplementedError,
18163  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18164  return -1;
18165  }
18166  }
18167 
18168  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18169  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18170  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18171  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18172  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18173  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18174  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18175  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18176  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18177  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18178  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18179  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18180  {0, 0, 0, 0}
18181  };
18182 
18183  static PyNumberMethods __pyx_tp_as_number_index_set = {
18184  0, /*nb_add*/
18185  0, /*nb_subtract*/
18186  0, /*nb_multiply*/
18187  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18188  0, /*nb_divide*/
18189  #endif
18190  0, /*nb_remainder*/
18191  0, /*nb_divmod*/
18192  0, /*nb_power*/
18193  0, /*nb_negative*/
18194  0, /*nb_positive*/
18195  0, /*nb_absolute*/
18196  0, /*nb_nonzero*/
18197  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18198  0, /*nb_lshift*/
18199  0, /*nb_rshift*/
18200  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18201  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18202  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18203  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18204  0, /*nb_coerce*/
18205  #endif
18206  0, /*nb_int*/
18207  #if PY_MAJOR_VERSION < 3
18208  0, /*nb_long*/
18209  #else
18210  0, /*reserved*/
18211  #endif
18212  0, /*nb_float*/
18213  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18214  0, /*nb_oct*/
18215  #endif
18216  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18217  0, /*nb_hex*/
18218  #endif
18219  0, /*nb_inplace_add*/
18220  0, /*nb_inplace_subtract*/
18221  0, /*nb_inplace_multiply*/
18222  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18223  0, /*nb_inplace_divide*/
18224  #endif
18225  0, /*nb_inplace_remainder*/
18226  0, /*nb_inplace_power*/
18227  0, /*nb_inplace_lshift*/
18228  0, /*nb_inplace_rshift*/
18229  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18230  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18231  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18232  0, /*nb_floor_divide*/
18233  0, /*nb_true_divide*/
18234  0, /*nb_inplace_floor_divide*/
18235  0, /*nb_inplace_true_divide*/
18236  0, /*nb_index*/
18237  #if PY_VERSION_HEX >= 0x03050000
18238  0, /*nb_matrix_multiply*/
18239  #endif
18240  #if PY_VERSION_HEX >= 0x03050000
18241  0, /*nb_inplace_matrix_multiply*/
18242  #endif
18243  };
18244 
18245  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18246  0, /*sq_length*/
18247  0, /*sq_concat*/
18248  0, /*sq_repeat*/
18249  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18250  0, /*sq_slice*/
18251  0, /*sq_ass_item*/
18252  0, /*sq_ass_slice*/
18253  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18254  0, /*sq_inplace_concat*/
18255  0, /*sq_inplace_repeat*/
18256  };
18257 
18258  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18259  0, /*mp_length*/
18260  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18261  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18262  };
18263 
18264  static PyTypeObject __pyx_type_8PyClical_index_set = {
18265  PyVarObject_HEAD_INIT(0, 0)
18266  "PyClical.index_set", /*tp_name*/
18267  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18268  0, /*tp_itemsize*/
18269  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18270  #if PY_VERSION_HEX < 0x030800b4
18271  0, /*tp_print*/
18272  #endif
18273  #if PY_VERSION_HEX >= 0x030800b4
18274  0, /*tp_vectorcall_offset*/
18275  #endif
18276  0, /*tp_getattr*/
18277  0, /*tp_setattr*/
18278  #if PY_MAJOR_VERSION < 3
18279  0, /*tp_compare*/
18280  #endif
18281  #if PY_MAJOR_VERSION >= 3
18282  0, /*tp_as_async*/
18283  #endif
18284  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
18285  &__pyx_tp_as_number_index_set, /*tp_as_number*/
18286  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
18287  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
18288  0, /*tp_hash*/
18289  0, /*tp_call*/
18290  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
18291  0, /*tp_getattro*/
18292  0, /*tp_setattro*/
18293  0, /*tp_as_buffer*/
18294  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18295  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
18296  0, /*tp_traverse*/
18297  0, /*tp_clear*/
18298  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
18299  0, /*tp_weaklistoffset*/
18300  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
18301  0, /*tp_iternext*/
18302  __pyx_methods_8PyClical_index_set, /*tp_methods*/
18303  0, /*tp_members*/
18304  0, /*tp_getset*/
18305  0, /*tp_base*/
18306  0, /*tp_dict*/
18307  0, /*tp_descr_get*/
18308  0, /*tp_descr_set*/
18309  0, /*tp_dictoffset*/
18310  0, /*tp_init*/
18311  0, /*tp_alloc*/
18312  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
18313  0, /*tp_free*/
18314  0, /*tp_is_gc*/
18315  0, /*tp_bases*/
18316  0, /*tp_mro*/
18317  0, /*tp_cache*/
18318  0, /*tp_subclasses*/
18319  0, /*tp_weaklist*/
18320  0, /*tp_del*/
18321  0, /*tp_version_tag*/
18322  #if PY_VERSION_HEX >= 0x030400a1
18323  0, /*tp_finalize*/
18324  #endif
18325  #if PY_VERSION_HEX >= 0x030800b1
18326  0, /*tp_vectorcall*/
18327  #endif
18328  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
18329  0, /*tp_print*/
18330  #endif
18331  };
18332  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18333 
18334  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18335  struct __pyx_obj_8PyClical_clifford *p;
18336  PyObject *o;
18337  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18338  o = (*t->tp_alloc)(t, 0);
18339  } else {
18340  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18341  }
18342  if (unlikely(!o)) return 0;
18343  p = ((struct __pyx_obj_8PyClical_clifford *)o);
18344  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18345  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
18346  return o;
18347  bad:
18348  Py_DECREF(o); o = 0;
18349  return NULL;
18350  }
18351 
18352  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18353  #if CYTHON_USE_TP_FINALIZE
18354  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))) {
18355  if (PyObject_CallFinalizerFromDealloc(o)) return;
18356  }
18357  #endif
18358  {
18359  PyObject *etype, *eval, *etb;
18360  PyErr_Fetch(&etype, &eval, &etb);
18361  ++Py_REFCNT(o);
18362  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18363  --Py_REFCNT(o);
18364  PyErr_Restore(etype, eval, etb);
18365  }
18366  (*Py_TYPE(o)->tp_free)(o);
18367  }
18368  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
18369  PyObject *r;
18370  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18371  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18372  Py_DECREF(x);
18373  return r;
18374  }
18375 
18376  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18377  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18378  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18379  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18380  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18381  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18382  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18383  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18384  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18385  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18386  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18387  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18388  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18389  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18390  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18391  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18392  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18393  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18394  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18395  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18396  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18397  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
18398  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
18399  {0, 0, 0, 0}
18400  };
18401 
18402  static PyNumberMethods __pyx_tp_as_number_clifford = {
18403  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
18404  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
18405  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
18406  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18407  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
18408  #endif
18409  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
18410  0, /*nb_divmod*/
18411  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
18412  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
18413  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
18414  0, /*nb_absolute*/
18415  0, /*nb_nonzero*/
18416  0, /*nb_invert*/
18417  0, /*nb_lshift*/
18418  0, /*nb_rshift*/
18419  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
18420  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
18421  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
18422  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18423  0, /*nb_coerce*/
18424  #endif
18425  0, /*nb_int*/
18426  #if PY_MAJOR_VERSION < 3
18427  0, /*nb_long*/
18428  #else
18429  0, /*reserved*/
18430  #endif
18431  0, /*nb_float*/
18432  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18433  0, /*nb_oct*/
18434  #endif
18435  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18436  0, /*nb_hex*/
18437  #endif
18438  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
18439  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
18440  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
18441  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18442  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
18443  #endif
18444  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
18445  0, /*nb_inplace_power*/
18446  0, /*nb_inplace_lshift*/
18447  0, /*nb_inplace_rshift*/
18448  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
18449  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
18450  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
18451  0, /*nb_floor_divide*/
18452  0, /*nb_true_divide*/
18453  0, /*nb_inplace_floor_divide*/
18454  0, /*nb_inplace_true_divide*/
18455  0, /*nb_index*/
18456  #if PY_VERSION_HEX >= 0x03050000
18457  0, /*nb_matrix_multiply*/
18458  #endif
18459  #if PY_VERSION_HEX >= 0x03050000
18460  0, /*nb_inplace_matrix_multiply*/
18461  #endif
18462  };
18463 
18464  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18465  0, /*sq_length*/
18466  0, /*sq_concat*/
18467  0, /*sq_repeat*/
18468  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
18469  0, /*sq_slice*/
18470  0, /*sq_ass_item*/
18471  0, /*sq_ass_slice*/
18472  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
18473  0, /*sq_inplace_concat*/
18474  0, /*sq_inplace_repeat*/
18475  };
18476 
18477  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18478  0, /*mp_length*/
18479  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
18480  0, /*mp_ass_subscript*/
18481  };
18482 
18483  static PyTypeObject __pyx_type_8PyClical_clifford = {
18484  PyVarObject_HEAD_INIT(0, 0)
18485  "PyClical.clifford", /*tp_name*/
18486  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
18487  0, /*tp_itemsize*/
18488  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
18489  #if PY_VERSION_HEX < 0x030800b4
18490  0, /*tp_print*/
18491  #endif
18492  #if PY_VERSION_HEX >= 0x030800b4
18493  0, /*tp_vectorcall_offset*/
18494  #endif
18495  0, /*tp_getattr*/
18496  0, /*tp_setattr*/
18497  #if PY_MAJOR_VERSION < 3
18498  0, /*tp_compare*/
18499  #endif
18500  #if PY_MAJOR_VERSION >= 3
18501  0, /*tp_as_async*/
18502  #endif
18503  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
18504  &__pyx_tp_as_number_clifford, /*tp_as_number*/
18505  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
18506  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
18507  0, /*tp_hash*/
18508  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
18509  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
18510  0, /*tp_getattro*/
18511  0, /*tp_setattro*/
18512  0, /*tp_as_buffer*/
18513  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18514  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
18515  0, /*tp_traverse*/
18516  0, /*tp_clear*/
18517  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
18518  0, /*tp_weaklistoffset*/
18519  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
18520  0, /*tp_iternext*/
18521  __pyx_methods_8PyClical_clifford, /*tp_methods*/
18522  0, /*tp_members*/
18523  0, /*tp_getset*/
18524  0, /*tp_base*/
18525  0, /*tp_dict*/
18526  0, /*tp_descr_get*/
18527  0, /*tp_descr_set*/
18528  0, /*tp_dictoffset*/
18529  0, /*tp_init*/
18530  0, /*tp_alloc*/
18531  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
18532  0, /*tp_free*/
18533  0, /*tp_is_gc*/
18534  0, /*tp_bases*/
18535  0, /*tp_mro*/
18536  0, /*tp_cache*/
18537  0, /*tp_subclasses*/
18538  0, /*tp_weaklist*/
18539  0, /*tp_del*/
18540  0, /*tp_version_tag*/
18541  #if PY_VERSION_HEX >= 0x030400a1
18542  0, /*tp_finalize*/
18543  #endif
18544  #if PY_VERSION_HEX >= 0x030800b1
18545  0, /*tp_vectorcall*/
18546  #endif
18547  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
18548  0, /*tp_print*/
18549  #endif
18550  };
18551 
18552  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
18553  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
18554 
18555  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
18556  PyObject *o;
18557  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__)))) {
18558  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
18559  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
18560  (void) PyObject_INIT(o, t);
18561  PyObject_GC_Track(o);
18562  } else {
18563  o = (*t->tp_alloc)(t, 0);
18564  if (unlikely(!o)) return 0;
18565  }
18566  return o;
18567  }
18568 
18569  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18570  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18571  PyObject_GC_UnTrack(o);
18572  Py_CLEAR(p->__pyx_v_idx);
18573  Py_CLEAR(p->__pyx_v_self);
18574  Py_CLEAR(p->__pyx_t_0);
18575  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__)))) {
18576  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
18577  } else {
18578  (*Py_TYPE(o)->tp_free)(o);
18579  }
18580  }
18581 
18582  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
18583  int e;
18584  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18585  if (p->__pyx_v_idx) {
18586  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
18587  }
18588  if (p->__pyx_v_self) {
18589  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
18590  }
18591  if (p->__pyx_t_0) {
18592  e = (*v)(p->__pyx_t_0, a); if (e) return e;
18593  }
18594  return 0;
18595  }
18596 
18597  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
18598  PyVarObject_HEAD_INIT(0, 0)
18599  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
18600  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
18601  0, /*tp_itemsize*/
18602  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
18603  #if PY_VERSION_HEX < 0x030800b4
18604  0, /*tp_print*/
18605  #endif
18606  #if PY_VERSION_HEX >= 0x030800b4
18607  0, /*tp_vectorcall_offset*/
18608  #endif
18609  0, /*tp_getattr*/
18610  0, /*tp_setattr*/
18611  #if PY_MAJOR_VERSION < 3
18612  0, /*tp_compare*/
18613  #endif
18614  #if PY_MAJOR_VERSION >= 3
18615  0, /*tp_as_async*/
18616  #endif
18617  0, /*tp_repr*/
18618  0, /*tp_as_number*/
18619  0, /*tp_as_sequence*/
18620  0, /*tp_as_mapping*/
18621  0, /*tp_hash*/
18622  0, /*tp_call*/
18623  0, /*tp_str*/
18624  0, /*tp_getattro*/
18625  0, /*tp_setattro*/
18626  0, /*tp_as_buffer*/
18627  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
18628  0, /*tp_doc*/
18629  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
18630  0, /*tp_clear*/
18631  0, /*tp_richcompare*/
18632  0, /*tp_weaklistoffset*/
18633  0, /*tp_iter*/
18634  0, /*tp_iternext*/
18635  0, /*tp_methods*/
18636  0, /*tp_members*/
18637  0, /*tp_getset*/
18638  0, /*tp_base*/
18639  0, /*tp_dict*/
18640  0, /*tp_descr_get*/
18641  0, /*tp_descr_set*/
18642  0, /*tp_dictoffset*/
18643  0, /*tp_init*/
18644  0, /*tp_alloc*/
18645  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
18646  0, /*tp_free*/
18647  0, /*tp_is_gc*/
18648  0, /*tp_bases*/
18649  0, /*tp_mro*/
18650  0, /*tp_cache*/
18651  0, /*tp_subclasses*/
18652  0, /*tp_weaklist*/
18653  0, /*tp_del*/
18654  0, /*tp_version_tag*/
18655  #if PY_VERSION_HEX >= 0x030400a1
18656  0, /*tp_finalize*/
18657  #endif
18658  #if PY_VERSION_HEX >= 0x030800b1
18659  0, /*tp_vectorcall*/
18660  #endif
18661  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
18662  0, /*tp_print*/
18663  #endif
18664  };
18665 
18666  static PyMethodDef __pyx_methods[] = {
18667  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
18668  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
18669  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
18670  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
18671  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
18672  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
18673  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
18674  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
18675  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
18676  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
18677  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
18678  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
18679  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
18680  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
18681  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
18682  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
18683  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
18684  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
18685  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
18686  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
18687  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
18688  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
18689  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
18690  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
18691  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
18692  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
18693  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
18694  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
18695  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
18696  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
18697  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
18698  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
18699  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
18700  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
18701  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
18702  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
18703  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
18704  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
18705  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
18706  {0, 0, 0, 0}
18707  };
18708 
18709  #if PY_MAJOR_VERSION >= 3
18710  #if CYTHON_PEP489_MULTI_PHASE_INIT
18711  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
18712  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
18713  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
18714  {Py_mod_create, (void*)__pyx_pymod_create},
18715  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
18716  {0, NULL}
18717  };
18718  #endif
18719 
18720  static struct PyModuleDef __pyx_moduledef = {
18721  PyModuleDef_HEAD_INIT,
18722  "PyClical",
18723  0, /* m_doc */
18724  #if CYTHON_PEP489_MULTI_PHASE_INIT
18725  0, /* m_size */
18726  #else
18727  -1, /* m_size */
18728  #endif
18729  __pyx_methods /* m_methods */,
18730  #if CYTHON_PEP489_MULTI_PHASE_INIT
18731  __pyx_moduledef_slots, /* m_slots */
18732  #else
18733  NULL, /* m_reload */
18734  #endif
18735  NULL, /* m_traverse */
18736  NULL, /* m_clear */
18737  NULL /* m_free */
18738  };
18739  #endif
18740  #ifndef CYTHON_SMALL_CODE
18741 #if defined(__clang__)
18742  #define CYTHON_SMALL_CODE
18743 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
18744  #define CYTHON_SMALL_CODE __attribute__((cold))
18745 #else
18746  #define CYTHON_SMALL_CODE
18747 #endif
18748 #endif
18749 
18750 static __Pyx_StringTabEntry __pyx_string_tab[] = {
18751  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
18752  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
18753  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
18754  {&__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},
18755  {&__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},
18756  {&__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},
18757  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
18758  {&__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},
18759  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
18760  {&__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},
18761  {&__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},
18762  {&__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},
18763  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18764  {&__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},
18765  {&__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},
18766  {&__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},
18767  {&__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},
18768  {&__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},
18769  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18770  {&__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},
18771  {&__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},
18772  {&__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},
18773  {&__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},
18774  {&__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},
18775  {&__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},
18776  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18777  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18778  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18779  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18780  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18781  {&__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},
18782  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18783  {&__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},
18784  {&__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},
18785  {&__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},
18786  {&__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},
18787  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18788  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18789  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18790  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18791  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18792  {&__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},
18793  {&__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},
18794  {&__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},
18795  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18796  {&__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},
18797  {&__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},
18798  {&__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},
18799  {&__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},
18800  {&__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},
18801  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18802  {&__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},
18803  {&__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},
18804  {&__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},
18805  {&__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},
18806  {&__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},
18807  {&__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},
18808  {&__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},
18809  {&__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},
18810  {&__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},
18811  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18812  {&__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},
18813  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18814  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18815  {&__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},
18816  {&__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},
18817  {&__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},
18818  {&__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},
18819  {&__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},
18820  {&__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},
18821  {&__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},
18822  {&__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},
18823  {&__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},
18824  {&__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},
18825  {&__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},
18826  {&__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},
18827  {&__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},
18828  {&__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},
18829  {&__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},
18830  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18831  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
18832  {&__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},
18833  {&__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},
18834  {&__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},
18835  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
18836  {&__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},
18837  {&__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},
18838  {&__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},
18839  {&__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},
18840  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18841  {&__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},
18842  {&__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},
18843  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18844  {&__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},
18845  {&__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},
18846  {&__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},
18847  {&__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},
18848  {&__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},
18849  {&__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},
18850  {&__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},
18851  {&__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},
18852  {&__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},
18853  {&__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},
18854  {&__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},
18855  {&__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},
18856  {&__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},
18857  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18858  {&__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},
18859  {&__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},
18860  {&__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},
18861  {&__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},
18862  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18863  {&__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},
18864  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18865  {&__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},
18866  {&__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},
18867  {&__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},
18868  {&__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},
18869  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18870  {&__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},
18871  {&__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},
18872  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18873  {&__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},
18874  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
18875  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
18876  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
18877  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
18878  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
18879  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
18880  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18881  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
18882  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18883  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18884  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18885  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18886  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
18887  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18888  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
18889  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18890  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18891  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18892  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
18893  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18894  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18895  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18896  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18897  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18898  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
18899  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
18900  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18901  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18902  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18903  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18904  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18905  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18906  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18907  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18908  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18909  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18910  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18911  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18912  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18913  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18914  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18915  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18916  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18917  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18918  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18919  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18920  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18921  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18922  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18923  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18924  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18925  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18926  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18927  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18928  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18929  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18930  {&__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},
18931  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18932  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18933  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18934  {&__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},
18935  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18936  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18937  {&__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},
18938  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18939  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18940  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18941  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18942  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18943  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18944  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18945  {&__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},
18946  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
18947  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
18948  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
18949  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18950  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18951  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
18952  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18953  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
18954  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
18955  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
18956  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
18957  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
18958  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
18959  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
18960  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
18961  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
18962  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
18963  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
18964  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
18965  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
18966  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
18967  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
18968  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
18969  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
18970  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
18971  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
18972  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
18973  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
18974  {&__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},
18975  {&__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},
18976  {&__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},
18977  {&__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},
18978  {&__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},
18979  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
18980  {&__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},
18981  {&__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},
18982  {&__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},
18983  {&__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},
18984  {&__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},
18985  {&__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},
18986  {&__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},
18987  {&__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},
18988  {&__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},
18989  {&__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},
18990  {&__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},
18991  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
18992  {&__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},
18993  {&__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},
18994  {&__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},
18995  {&__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},
18996  {&__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},
18997  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
18998  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
18999  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19000  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19001  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
19002  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19003  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
19004  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19005  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19006  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
19007  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19008  {&__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},
19009  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19010  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
19011  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19012  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
19013  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19014  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
19015  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
19016  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19017  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19018  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
19019  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19020  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
19021  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19022  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19023  {&__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},
19024  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
19025  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19026  {&__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},
19027  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19028  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
19029  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
19030  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19031  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
19032  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19033  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19034  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
19035  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19036  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19037  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19038  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19039  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19040  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19041  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19042  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19043  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19044  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19045  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19046  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19047  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19048  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19049  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19050  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19051  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19052  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19053  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19054  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19055  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19056  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19057  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19058  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19059  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19060  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19061  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19062  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19063  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19064  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19065  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19066  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19067  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19068  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19069  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19070  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19071  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19072  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19073  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19074  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19075  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19076  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19077  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19078  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19079  {0, 0, 0, 0, 0, 0, 0}
19080 };
19081 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
19082  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19083  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19084  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19085  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19086  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19087  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19088  #if PY_MAJOR_VERSION >= 3
19089  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19090  #else
19091  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19092  #endif
19093  return 0;
19094  __pyx_L1_error:;
19095  return -1;
19096 }
19097 
19098 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
19099  __Pyx_RefNannyDeclarations
19100  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19101 
19102  /* "(tree fragment)":2
19103  * def __reduce_cython__(self):
19104  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19105  * def __setstate_cython__(self, __pyx_state):
19106  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19107  */
19108  __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)
19109  __Pyx_GOTREF(__pyx_tuple__3);
19110  __Pyx_GIVEREF(__pyx_tuple__3);
19111 
19112  /* "(tree fragment)":4
19113  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19114  * def __setstate_cython__(self, __pyx_state):
19115  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19116  */
19117  __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)
19118  __Pyx_GOTREF(__pyx_tuple__4);
19119  __Pyx_GIVEREF(__pyx_tuple__4);
19120 
19121  /* "PyClical.pyx":635
19122  * TypeError: Not applicable.
19123  * """
19124  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19125  *
19126  * def __iter__(self):
19127  */
19128  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19129  __Pyx_GOTREF(__pyx_tuple__10);
19130  __Pyx_GIVEREF(__pyx_tuple__10);
19131 
19132  /* "(tree fragment)":2
19133  * def __reduce_cython__(self):
19134  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19135  * def __setstate_cython__(self, __pyx_state):
19136  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19137  */
19138  __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)
19139  __Pyx_GOTREF(__pyx_tuple__11);
19140  __Pyx_GIVEREF(__pyx_tuple__11);
19141 
19142  /* "(tree fragment)":4
19143  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19144  * def __setstate_cython__(self, __pyx_state):
19145  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19146  */
19147  __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)
19148  __Pyx_GOTREF(__pyx_tuple__12);
19149  __Pyx_GIVEREF(__pyx_tuple__12);
19150 
19151  /* "PyClical.pyx":404
19152  * return index_set_to_str( self.unwrap() ).c_str()
19153  *
19154  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19155  * """
19156  * Tests for functions that Doctest cannot see.
19157  */
19158  __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)
19159 
19160  /* "PyClical.pyx":1243
19161  * return clifford_to_str( self.unwrap() ).c_str()
19162  *
19163  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19164  * """
19165  * Tests for functions that Doctest cannot see.
19166  */
19167  __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)
19168 
19169  /* "PyClical.pyx":1856
19170  *
19171  * # Some abbreviations.
19172  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19173  * pi = tau / 2.0
19174  *
19175  */
19176  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1856, __pyx_L1_error)
19177  __Pyx_GOTREF(__pyx_tuple__15);
19178  __Pyx_GIVEREF(__pyx_tuple__15);
19179 
19180  /* "PyClical.pyx":1887
19181  * """
19182  *
19183  * def e(obj): # <<<<<<<<<<<<<<
19184  * """
19185  * Abbreviation for clifford(index_set(obj)).
19186  */
19187  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1887, __pyx_L1_error)
19188  __Pyx_GOTREF(__pyx_tuple__16);
19189  __Pyx_GIVEREF(__pyx_tuple__16);
19190  __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)
19191 
19192  /* "PyClical.pyx":1900
19193  * return clifford(index_set(obj))
19194  *
19195  * def istpq(p, q): # <<<<<<<<<<<<<<
19196  * """
19197  * Abbreviation for index_set({-q,...p}).
19198  */
19199  __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)
19200  __Pyx_GOTREF(__pyx_tuple__18);
19201  __Pyx_GIVEREF(__pyx_tuple__18);
19202  __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)
19203 
19204  /* "PyClical.pyx":1909
19205  * return index_set(set(range(-q,p+1)))
19206  *
19207  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19208  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19209  *
19210  */
19211  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1909, __pyx_L1_error)
19212  __Pyx_GOTREF(__pyx_tuple__20);
19213  __Pyx_GIVEREF(__pyx_tuple__20);
19214  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19215  __Pyx_GOTREF(__pyx_tuple__21);
19216  __Pyx_GIVEREF(__pyx_tuple__21);
19217 
19218  /* "PyClical.pyx":1913
19219  *
19220  * # Doctest interface.
19221  * def _test(): # <<<<<<<<<<<<<<
19222  * import PyClical, doctest
19223  * return doctest.testmod(PyClical)
19224  */
19225  __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)
19226  __Pyx_GOTREF(__pyx_tuple__22);
19227  __Pyx_GIVEREF(__pyx_tuple__22);
19228  __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)
19229  __Pyx_RefNannyFinishContext();
19230  return 0;
19231  __pyx_L1_error:;
19232  __Pyx_RefNannyFinishContext();
19233  return -1;
19234 }
19235 
19236 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
19237  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19238  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19239  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19240  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19241  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19242  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19243  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19244  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19245  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19246  return 0;
19247  __pyx_L1_error:;
19248  return -1;
19249 }
19250 
19251 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
19252 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
19253 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
19254 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
19255 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
19256 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
19257 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
19258 
19259 static int __Pyx_modinit_global_init_code(void) {
19260  __Pyx_RefNannyDeclarations
19261  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
19262  /*--- Global init code ---*/
19263  __Pyx_RefNannyFinishContext();
19264  return 0;
19265 }
19266 
19267 static int __Pyx_modinit_variable_export_code(void) {
19268  __Pyx_RefNannyDeclarations
19269  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
19270  /*--- Variable export code ---*/
19271  __Pyx_RefNannyFinishContext();
19272  return 0;
19273 }
19274 
19275 static int __Pyx_modinit_function_export_code(void) {
19276  __Pyx_RefNannyDeclarations
19277  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
19278  /*--- Function export code ---*/
19279  __Pyx_RefNannyFinishContext();
19280  return 0;
19281 }
19282 
19283 static int __Pyx_modinit_type_init_code(void) {
19284  __Pyx_RefNannyDeclarations
19285  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
19286  /*--- Type init code ---*/
19287  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19288  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19289  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19290  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19291  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19292  #if PY_VERSION_HEX < 0x030800B1
19293  __pyx_type_8PyClical_index_set.tp_print = 0;
19294  #endif
19295  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)) {
19296  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19297  }
19298  #if CYTHON_COMPILING_IN_CPYTHON
19299  {
19300  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19301  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19302  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19303  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19304  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19305  }
19306  }
19307  #endif
19308  #if CYTHON_COMPILING_IN_CPYTHON
19309  {
19310  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19311  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19312  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19313  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19314  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19315  }
19316  }
19317  #endif
19318  #if CYTHON_COMPILING_IN_CPYTHON
19319  {
19320  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19321  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19322  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19323  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19324  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19325  }
19326  }
19327  #endif
19328  #if CYTHON_COMPILING_IN_CPYTHON
19329  {
19330  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19331  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19332  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19333  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19334  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19335  }
19336  }
19337  #endif
19338  #if CYTHON_COMPILING_IN_CPYTHON
19339  {
19340  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19341  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19342  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19343  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19344  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19345  }
19346  }
19347  #endif
19348  #if CYTHON_COMPILING_IN_CPYTHON
19349  {
19350  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19351  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19352  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19353  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19354  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19355  }
19356  }
19357  #endif
19358  #if CYTHON_COMPILING_IN_CPYTHON
19359  {
19360  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19361  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19362  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19363  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19364  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19365  }
19366  }
19367  #endif
19368  #if CYTHON_COMPILING_IN_CPYTHON
19369  {
19370  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19371  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19372  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19373  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19374  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19375  }
19376  }
19377  #endif
19378  #if CYTHON_COMPILING_IN_CPYTHON
19379  {
19380  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19381  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19382  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19383  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19384  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19385  }
19386  }
19387  #endif
19388  #if CYTHON_COMPILING_IN_CPYTHON
19389  {
19390  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19391  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19392  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19393  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19394  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19395  }
19396  }
19397  #endif
19398  #if CYTHON_COMPILING_IN_CPYTHON
19399  {
19400  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19401  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19402  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19403  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19404  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19405  }
19406  }
19407  #endif
19408  #if CYTHON_COMPILING_IN_CPYTHON
19409  {
19410  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19411  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19412  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19413  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19414  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19415  }
19416  }
19417  #endif
19418  #if CYTHON_COMPILING_IN_CPYTHON
19419  {
19420  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19421  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19422  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19423  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19424  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19425  }
19426  }
19427  #endif
19428  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19429  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19430  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19431  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19432  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19433  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
19434  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19435  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19436  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19437  #if PY_VERSION_HEX < 0x030800B1
19438  __pyx_type_8PyClical_clifford.tp_print = 0;
19439  #endif
19440  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
19441  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19442  }
19443  #if CYTHON_COMPILING_IN_CPYTHON
19444  {
19445  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19446  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19447  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19448  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19449  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19450  }
19451  }
19452  #endif
19453  #if CYTHON_COMPILING_IN_CPYTHON
19454  {
19455  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19456  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19457  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19458  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19459  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19460  }
19461  }
19462  #endif
19463  #if CYTHON_COMPILING_IN_CPYTHON
19464  {
19465  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19466  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19467  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19468  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19469  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19470  }
19471  }
19472  #endif
19473  #if CYTHON_COMPILING_IN_CPYTHON
19474  {
19475  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19476  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19477  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19478  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19479  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19480  }
19481  }
19482  #endif
19483  #if CYTHON_COMPILING_IN_CPYTHON
19484  {
19485  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19486  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19487  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19488  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19489  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19490  }
19491  }
19492  #endif
19493  #if CYTHON_COMPILING_IN_CPYTHON
19494  {
19495  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19496  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19497  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19498  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19499  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19500  }
19501  }
19502  #endif
19503  #if CYTHON_COMPILING_IN_CPYTHON
19504  {
19505  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19506  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19507  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19508  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19509  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19510  }
19511  }
19512  #endif
19513  #if CYTHON_COMPILING_IN_CPYTHON
19514  {
19515  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19516  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19517  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19518  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19519  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19520  }
19521  }
19522  #endif
19523  #if CYTHON_COMPILING_IN_CPYTHON
19524  {
19525  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19526  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19527  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19528  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19529  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19530  }
19531  }
19532  #endif
19533  #if CYTHON_COMPILING_IN_CPYTHON
19534  {
19535  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19536  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19537  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19538  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
19539  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
19540  }
19541  }
19542  #endif
19543  #if CYTHON_COMPILING_IN_CPYTHON
19544  {
19545  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19546  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19547  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19548  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
19549  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
19550  }
19551  }
19552  #endif
19553  #if CYTHON_COMPILING_IN_CPYTHON
19554  {
19555  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19556  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19557  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19558  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
19559  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
19560  }
19561  }
19562  #endif
19563  #if CYTHON_COMPILING_IN_CPYTHON
19564  {
19565  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19566  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19567  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19568  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
19569  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
19570  }
19571  }
19572  #endif
19573  #if CYTHON_COMPILING_IN_CPYTHON
19574  {
19575  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19576  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19577  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19578  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
19579  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
19580  }
19581  }
19582  #endif
19583  #if CYTHON_COMPILING_IN_CPYTHON
19584  {
19585  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19586  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19587  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19588  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
19589  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
19590  }
19591  }
19592  #endif
19593  #if CYTHON_COMPILING_IN_CPYTHON
19594  {
19595  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19596  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19597  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19598  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
19599  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
19600  }
19601  }
19602  #endif
19603  #if CYTHON_COMPILING_IN_CPYTHON
19604  {
19605  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19606  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19607  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19608  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
19609  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
19610  }
19611  }
19612  #endif
19613  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19614  #if CYTHON_COMPILING_IN_CPYTHON
19615  {
19616  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19617  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19618  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19619  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
19620  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
19621  }
19622  }
19623  #endif
19624  #endif
19625  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19626  #if CYTHON_COMPILING_IN_CPYTHON
19627  {
19628  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19629  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19630  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19631  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
19632  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
19633  }
19634  }
19635  #endif
19636  #endif
19637  #if CYTHON_COMPILING_IN_CPYTHON
19638  {
19639  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19640  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19641  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19642  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
19643  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
19644  }
19645  }
19646  #endif
19647  #if CYTHON_COMPILING_IN_CPYTHON
19648  {
19649  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19650  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19651  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19652  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
19653  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
19654  }
19655  }
19656  #endif
19657  #if CYTHON_COMPILING_IN_CPYTHON
19658  {
19659  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19660  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19661  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19662  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
19663  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
19664  }
19665  }
19666  #endif
19667  #if CYTHON_COMPILING_IN_CPYTHON
19668  {
19669  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19670  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19671  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19672  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
19673  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
19674  }
19675  }
19676  #endif
19677  #if CYTHON_COMPILING_IN_CPYTHON
19678  {
19679  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19680  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19681  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19682  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
19683  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
19684  }
19685  }
19686  #endif
19687  #if CYTHON_COMPILING_IN_CPYTHON
19688  {
19689  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19690  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19691  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19692  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
19693  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
19694  }
19695  }
19696  #endif
19697  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19698  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19699  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19700  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
19701  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
19702  #if PY_VERSION_HEX < 0x030800B1
19703  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
19704  #endif
19705  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)) {
19706  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
19707  }
19708  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
19709  __Pyx_RefNannyFinishContext();
19710  return 0;
19711  __pyx_L1_error:;
19712  __Pyx_RefNannyFinishContext();
19713  return -1;
19714 }
19715 
19716 static int __Pyx_modinit_type_import_code(void) {
19717  __Pyx_RefNannyDeclarations
19718  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
19719  /*--- Type import code ---*/
19720  __Pyx_RefNannyFinishContext();
19721  return 0;
19722 }
19723 
19724 static int __Pyx_modinit_variable_import_code(void) {
19725  __Pyx_RefNannyDeclarations
19726  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
19727  /*--- Variable import code ---*/
19728  __Pyx_RefNannyFinishContext();
19729  return 0;
19730 }
19731 
19732 static int __Pyx_modinit_function_import_code(void) {
19733  __Pyx_RefNannyDeclarations
19734  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
19735  /*--- Function import code ---*/
19736  __Pyx_RefNannyFinishContext();
19737  return 0;
19738 }
19739 
19740 
19741 #if PY_MAJOR_VERSION < 3
19742 #ifdef CYTHON_NO_PYINIT_EXPORT
19743 #define __Pyx_PyMODINIT_FUNC void
19744 #else
19745 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19746 #endif
19747 #else
19748 #ifdef CYTHON_NO_PYINIT_EXPORT
19749 #define __Pyx_PyMODINIT_FUNC PyObject *
19750 #else
19751 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19752 #endif
19753 #endif
19754 
19755 
19756 #if PY_MAJOR_VERSION < 3
19757 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
19758 __Pyx_PyMODINIT_FUNC initPyClical(void)
19759 #else
19760 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
19761 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
19762 #if CYTHON_PEP489_MULTI_PHASE_INIT
19763 {
19764  return PyModuleDef_Init(&__pyx_moduledef);
19765 }
19766 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
19767  #if PY_VERSION_HEX >= 0x030700A1
19768  static PY_INT64_T main_interpreter_id = -1;
19769  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
19770  if (main_interpreter_id == -1) {
19771  main_interpreter_id = current_id;
19772  return (unlikely(current_id == -1)) ? -1 : 0;
19773  } else if (unlikely(main_interpreter_id != current_id))
19774  #else
19775  static PyInterpreterState *main_interpreter = NULL;
19776  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
19777  if (!main_interpreter) {
19778  main_interpreter = current_interpreter;
19779  } else if (unlikely(main_interpreter != current_interpreter))
19780  #endif
19781  {
19782  PyErr_SetString(
19783  PyExc_ImportError,
19784  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
19785  return -1;
19786  }
19787  return 0;
19788 }
19789 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) {
19790  PyObject *value = PyObject_GetAttrString(spec, from_name);
19791  int result = 0;
19792  if (likely(value)) {
19793  if (allow_none || value != Py_None) {
19794  result = PyDict_SetItemString(moddict, to_name, value);
19795  }
19796  Py_DECREF(value);
19797  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19798  PyErr_Clear();
19799  } else {
19800  result = -1;
19801  }
19802  return result;
19803 }
19804 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
19805  PyObject *module = NULL, *moddict, *modname;
19806  if (__Pyx_check_single_interpreter())
19807  return NULL;
19808  if (__pyx_m)
19809  return __Pyx_NewRef(__pyx_m);
19810  modname = PyObject_GetAttrString(spec, "name");
19811  if (unlikely(!modname)) goto bad;
19812  module = PyModule_NewObject(modname);
19813  Py_DECREF(modname);
19814  if (unlikely(!module)) goto bad;
19815  moddict = PyModule_GetDict(module);
19816  if (unlikely(!moddict)) goto bad;
19817  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
19818  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
19819  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
19820  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
19821  return module;
19822 bad:
19823  Py_XDECREF(module);
19824  return NULL;
19825 }
19826 
19827 
19828 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
19829 #endif
19830 #endif
19831 {
19832  PyObject *__pyx_t_1 = NULL;
19833  PyObject *__pyx_t_2 = NULL;
19834  PyObject *__pyx_t_3 = NULL;
19835  int __pyx_t_4;
19836  __Pyx_RefNannyDeclarations
19837  #if CYTHON_PEP489_MULTI_PHASE_INIT
19838  if (__pyx_m) {
19839  if (__pyx_m == __pyx_pyinit_module) return 0;
19840  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
19841  return -1;
19842  }
19843  #elif PY_MAJOR_VERSION >= 3
19844  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
19845  #endif
19846  #if CYTHON_REFNANNY
19847 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
19848 if (!__Pyx_RefNanny) {
19849  PyErr_Clear();
19850  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
19851  if (!__Pyx_RefNanny)
19852  Py_FatalError("failed to import 'refnanny' module");
19853 }
19854 #endif
19855  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
19856  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19857  #ifdef __Pxy_PyFrame_Initialize_Offsets
19858  __Pxy_PyFrame_Initialize_Offsets();
19859  #endif
19860  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
19861  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
19862  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
19863  #ifdef __Pyx_CyFunction_USED
19864  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19865  #endif
19866  #ifdef __Pyx_FusedFunction_USED
19867  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19868  #endif
19869  #ifdef __Pyx_Coroutine_USED
19870  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19871  #endif
19872  #ifdef __Pyx_Generator_USED
19873  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19874  #endif
19875  #ifdef __Pyx_AsyncGen_USED
19876  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19877  #endif
19878  #ifdef __Pyx_StopAsyncIteration_USED
19879  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19880  #endif
19881  /*--- Library function declarations ---*/
19882  /*--- Threads initialization code ---*/
19883  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
19884  #ifdef WITH_THREAD /* Python build with threading support? */
19885  PyEval_InitThreads();
19886  #endif
19887  #endif
19888  /*--- Module creation code ---*/
19889  #if CYTHON_PEP489_MULTI_PHASE_INIT
19890  __pyx_m = __pyx_pyinit_module;
19891  Py_INCREF(__pyx_m);
19892  #else
19893  #if PY_MAJOR_VERSION < 3
19894  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
19895  #else
19896  __pyx_m = PyModule_Create(&__pyx_moduledef);
19897  #endif
19898  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
19899  #endif
19900  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
19901  Py_INCREF(__pyx_d);
19902  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
19903  Py_INCREF(__pyx_b);
19904  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
19905  Py_INCREF(__pyx_cython_runtime);
19906  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19907  /*--- Initialize various global constants etc. ---*/
19908  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19909  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
19910  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19911  #endif
19912  if (__pyx_module_is_main_PyClical) {
19913  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19914  }
19915  #if PY_MAJOR_VERSION >= 3
19916  {
19917  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
19918  if (!PyDict_GetItemString(modules, "PyClical")) {
19919  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
19920  }
19921  }
19922  #endif
19923  /*--- Builtin init code ---*/
19924  if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
19925  /*--- Constants init code ---*/
19926  if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
19927  /*--- Global type/function init code ---*/
19928  (void)__Pyx_modinit_global_init_code();
19929  (void)__Pyx_modinit_variable_export_code();
19930  (void)__Pyx_modinit_function_export_code();
19931  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
19932  (void)__Pyx_modinit_type_import_code();
19933  (void)__Pyx_modinit_variable_import_code();
19934  (void)__Pyx_modinit_function_import_code();
19935  /*--- Execution code ---*/
19936  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
19937  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19938  #endif
19939 
19940  /* "PyClical.pyx":28
19941  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
19942  *
19943  * import math # <<<<<<<<<<<<<<
19944  * import numbers
19945  * import collections
19946  */
19947  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
19948  __Pyx_GOTREF(__pyx_t_1);
19949  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
19950  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19951 
19952  /* "PyClical.pyx":29
19953  *
19954  * import math
19955  * import numbers # <<<<<<<<<<<<<<
19956  * import collections
19957  *
19958  */
19959  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
19960  __Pyx_GOTREF(__pyx_t_1);
19961  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
19962  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19963 
19964  /* "PyClical.pyx":30
19965  * import math
19966  * import numbers
19967  * import collections # <<<<<<<<<<<<<<
19968  *
19969  * __version__ = "0.8.2"
19970  */
19971  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
19972  __Pyx_GOTREF(__pyx_t_1);
19973  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
19974  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19975 
19976  /* "PyClical.pyx":32
19977  * import collections
19978  *
19979  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
19980  *
19981  * from PyClical cimport *
19982  */
19983  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
19984 
19985  /* "PyClical.pyx":404
19986  * return index_set_to_str( self.unwrap() ).c_str()
19987  *
19988  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19989  * """
19990  * Tests for functions that Doctest cannot see.
19991  */
19992  __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)
19993  __Pyx_GOTREF(__pyx_t_1);
19994  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
19995  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19996 
19997  /* "PyClical.pyx":1243
19998  * return clifford_to_str( self.unwrap() ).c_str()
19999  *
20000  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20001  * """
20002  * Tests for functions that Doctest cannot see.
20003  */
20004  __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)
20005  __Pyx_GOTREF(__pyx_t_1);
20006  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
20007  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20008 
20009  /* "PyClical.pyx":1856
20010  *
20011  * # Some abbreviations.
20012  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
20013  * pi = tau / 2.0
20014  *
20015  */
20016  __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)
20017  __Pyx_GOTREF(__pyx_t_1);
20018  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
20019  __Pyx_GOTREF(__pyx_t_2);
20020  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20021  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20022  __Pyx_GOTREF(__pyx_t_1);
20023  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20024  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
20025  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20026 
20027  /* "PyClical.pyx":1857
20028  * # Some abbreviations.
20029  * tau = atan(clifford(1.0)) * 8.0
20030  * pi = tau / 2.0 # <<<<<<<<<<<<<<
20031  *
20032  * cl = clifford
20033  */
20034  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20035  __Pyx_GOTREF(__pyx_t_1);
20036  __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)
20037  __Pyx_GOTREF(__pyx_t_2);
20038  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20039  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
20040  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20041 
20042  /* "PyClical.pyx":1859
20043  * pi = tau / 2.0
20044  *
20045  * cl = clifford # <<<<<<<<<<<<<<
20046  * """
20047  * Abbreviation for clifford.
20048  */
20049  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20050 
20051  /* "PyClical.pyx":1879
20052  * """
20053  *
20054  * ist = index_set # <<<<<<<<<<<<<<
20055  * """
20056  * Abbreviation for index_set.
20057  */
20058  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20059 
20060  /* "PyClical.pyx":1887
20061  * """
20062  *
20063  * def e(obj): # <<<<<<<<<<<<<<
20064  * """
20065  * Abbreviation for clifford(index_set(obj)).
20066  */
20067  __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)
20068  __Pyx_GOTREF(__pyx_t_2);
20069  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20070  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20071 
20072  /* "PyClical.pyx":1900
20073  * return clifford(index_set(obj))
20074  *
20075  * def istpq(p, q): # <<<<<<<<<<<<<<
20076  * """
20077  * Abbreviation for index_set({-q,...p}).
20078  */
20079  __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)
20080  __Pyx_GOTREF(__pyx_t_2);
20081  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20082  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20083 
20084  /* "PyClical.pyx":1909
20085  * return index_set(set(range(-q,p+1)))
20086  *
20087  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20088  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20089  *
20090  */
20091  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20092  __Pyx_GOTREF(__pyx_t_2);
20093  __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)
20094  __Pyx_GOTREF(__pyx_t_1);
20095  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20096  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20097  __Pyx_GOTREF(__pyx_t_2);
20098  __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)
20099  __Pyx_GOTREF(__pyx_t_3);
20100  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20101  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20102  __Pyx_GOTREF(__pyx_t_2);
20103  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20104  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20105  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20106  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20107 
20108  /* "PyClical.pyx":1910
20109  *
20110  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20111  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20112  *
20113  * # Doctest interface.
20114  */
20115  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20116  __Pyx_GOTREF(__pyx_t_2);
20117  __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)
20118  __Pyx_GOTREF(__pyx_t_3);
20119  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20120  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20121  __Pyx_GOTREF(__pyx_t_2);
20122  __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)
20123  __Pyx_GOTREF(__pyx_t_1);
20124  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20125  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20126  __Pyx_GOTREF(__pyx_t_2);
20127  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20128  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20129  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20130  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20131 
20132  /* "PyClical.pyx":1913
20133  *
20134  * # Doctest interface.
20135  * def _test(): # <<<<<<<<<<<<<<
20136  * import PyClical, doctest
20137  * return doctest.testmod(PyClical)
20138  */
20139  __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)
20140  __Pyx_GOTREF(__pyx_t_2);
20141  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20142  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20143 
20144  /* "PyClical.pyx":1917
20145  * return doctest.testmod(PyClical)
20146  *
20147  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20148  * _test()
20149  */
20150  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20151  __Pyx_GOTREF(__pyx_t_2);
20152  __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)
20153  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20154  if (__pyx_t_4) {
20155 
20156  /* "PyClical.pyx":1918
20157  *
20158  * if __name__ == "__main__":
20159  * _test() # <<<<<<<<<<<<<<
20160  */
20161  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20162  __Pyx_GOTREF(__pyx_t_2);
20163  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20164  __Pyx_GOTREF(__pyx_t_1);
20165  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20166  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20167 
20168  /* "PyClical.pyx":1917
20169  * return doctest.testmod(PyClical)
20170  *
20171  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20172  * _test()
20173  */
20174  }
20175 
20176  /* "PyClical.pyx":1
20177  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20178  * # distutils: language = c++
20179  * #
20180  */
20181  __pyx_t_1 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20182  __Pyx_GOTREF(__pyx_t_1);
20183  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)
20184  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)
20185  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)
20186  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)
20187  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)
20188  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)
20189  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)
20190  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)
20191  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)
20192  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)
20193  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)
20194  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)
20195  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)
20196  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)
20197  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)
20198  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)
20199  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)
20200  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)
20201  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)
20202  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)
20203  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)
20204  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)
20205  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)
20206  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)
20207  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)
20208  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)
20209  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)
20210  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)
20211  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)
20212  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)
20213  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)
20214  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)
20215  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)
20216  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)
20217  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)
20218  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)
20219  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)
20220  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)
20221  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)
20222  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)
20223  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)
20224  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)
20225  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)
20226  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)
20227  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)
20228  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)
20229  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)
20230  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)
20231  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)
20232  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)
20233  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)
20234  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)
20235  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)
20236  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)
20237  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)
20238  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)
20239  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)
20240  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)
20241  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)
20242  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)
20243  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)
20244  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)
20245  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)
20246  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)
20247  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)
20248  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)
20249  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)
20250  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)
20251  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)
20252  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)
20253  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)
20254  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)
20255  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)
20256  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)
20257  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)
20258  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)
20259  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)
20260  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)
20261  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)
20262  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)
20263  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)
20264  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)
20265  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)
20266  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)
20267  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)
20268  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)
20269  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)
20270  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)
20271  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)
20272  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)
20273  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)
20274  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)
20275  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)
20276  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)
20277  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)
20278  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)
20279  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)
20280  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)
20281  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)
20282  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)
20283  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)
20284  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)
20285  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)
20286  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)
20287  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)
20288  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)
20289  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)
20290  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20291  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20292 
20293  /*--- Wrapped vars code ---*/
20294 
20295  goto __pyx_L0;
20296  __pyx_L1_error:;
20297  __Pyx_XDECREF(__pyx_t_1);
20298  __Pyx_XDECREF(__pyx_t_2);
20299  __Pyx_XDECREF(__pyx_t_3);
20300  if (__pyx_m) {
20301  if (__pyx_d) {
20302  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
20303  }
20304  Py_CLEAR(__pyx_m);
20305  } else if (!PyErr_Occurred()) {
20306  PyErr_SetString(PyExc_ImportError, "init PyClical");
20307  }
20308  __pyx_L0:;
20309  __Pyx_RefNannyFinishContext();
20310  #if CYTHON_PEP489_MULTI_PHASE_INIT
20311  return (__pyx_m != NULL) ? 0 : -1;
20312  #elif PY_MAJOR_VERSION >= 3
20313  return __pyx_m;
20314  #else
20315  return;
20316  #endif
20317 }
20318 
20319 /* --- Runtime support code --- */
20320 /* Refnanny */
20321 #if CYTHON_REFNANNY
20322 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20323  PyObject *m = NULL, *p = NULL;
20324  void *r = NULL;
20325  m = PyImport_ImportModule(modname);
20326  if (!m) goto end;
20327  p = PyObject_GetAttrString(m, "RefNannyAPI");
20328  if (!p) goto end;
20329  r = PyLong_AsVoidPtr(p);
20330 end:
20331  Py_XDECREF(p);
20332  Py_XDECREF(m);
20333  return (__Pyx_RefNannyAPIStruct *)r;
20334 }
20335 #endif
20336 
20337 /* PyObjectGetAttrStr */
20338 #if CYTHON_USE_TYPE_SLOTS
20339 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20340  PyTypeObject* tp = Py_TYPE(obj);
20341  if (likely(tp->tp_getattro))
20342  return tp->tp_getattro(obj, attr_name);
20343 #if PY_MAJOR_VERSION < 3
20344  if (likely(tp->tp_getattr))
20345  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
20346 #endif
20347  return PyObject_GetAttr(obj, attr_name);
20348 }
20349 #endif
20350 
20351 /* GetBuiltinName */
20352 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20353  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20354  if (unlikely(!result)) {
20355  PyErr_Format(PyExc_NameError,
20356 #if PY_MAJOR_VERSION >= 3
20357  "name '%U' is not defined", name);
20358 #else
20359  "name '%.200s' is not defined", PyString_AS_STRING(name));
20360 #endif
20361  }
20362  return result;
20363 }
20364 
20365 /* PyCFunctionFastCall */
20366 #if CYTHON_FAST_PYCCALL
20367 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
20368  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
20369  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
20370  PyObject *self = PyCFunction_GET_SELF(func);
20371  int flags = PyCFunction_GET_FLAGS(func);
20372  assert(PyCFunction_Check(func));
20373  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
20374  assert(nargs >= 0);
20375  assert(nargs == 0 || args != NULL);
20376  /* _PyCFunction_FastCallDict() must not be called with an exception set,
20377  because it may clear it (directly or indirectly) and so the
20378  caller loses its exception */
20379  assert(!PyErr_Occurred());
20380  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
20381  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
20382  } else {
20383  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
20384  }
20385 }
20386 #endif
20387 
20388 /* PyFunctionFastCall */
20389 #if CYTHON_FAST_PYCALL
20390 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
20391  PyObject *globals) {
20392  PyFrameObject *f;
20393  PyThreadState *tstate = __Pyx_PyThreadState_Current;
20394  PyObject **fastlocals;
20395  Py_ssize_t i;
20396  PyObject *result;
20397  assert(globals != NULL);
20398  /* XXX Perhaps we should create a specialized
20399  PyFrame_New() that doesn't take locals, but does
20400  take builtins without sanity checking them.
20401  */
20402  assert(tstate != NULL);
20403  f = PyFrame_New(tstate, co, globals, NULL);
20404  if (f == NULL) {
20405  return NULL;
20406  }
20407  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
20408  for (i = 0; i < na; i++) {
20409  Py_INCREF(*args);
20410  fastlocals[i] = *args++;
20411  }
20412  result = PyEval_EvalFrameEx(f,0);
20413  ++tstate->recursion_depth;
20414  Py_DECREF(f);
20415  --tstate->recursion_depth;
20416  return result;
20417 }
20418 #if 1 || PY_VERSION_HEX < 0x030600B1
20419 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
20420  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
20421  PyObject *globals = PyFunction_GET_GLOBALS(func);
20422  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
20423  PyObject *closure;
20424 #if PY_MAJOR_VERSION >= 3
20425  PyObject *kwdefs;
20426 #endif
20427  PyObject *kwtuple, **k;
20428  PyObject **d;
20429  Py_ssize_t nd;
20430  Py_ssize_t nk;
20431  PyObject *result;
20432  assert(kwargs == NULL || PyDict_Check(kwargs));
20433  nk = kwargs ? PyDict_Size(kwargs) : 0;
20434  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
20435  return NULL;
20436  }
20437  if (
20438 #if PY_MAJOR_VERSION >= 3
20439  co->co_kwonlyargcount == 0 &&
20440 #endif
20441  likely(kwargs == NULL || nk == 0) &&
20442  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
20443  if (argdefs == NULL && co->co_argcount == nargs) {
20444  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
20445  goto done;
20446  }
20447  else if (nargs == 0 && argdefs != NULL
20448  && co->co_argcount == Py_SIZE(argdefs)) {
20449  /* function called with no arguments, but all parameters have
20450  a default value: use default values as arguments .*/
20451  args = &PyTuple_GET_ITEM(argdefs, 0);
20452  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
20453  goto done;
20454  }
20455  }
20456  if (kwargs != NULL) {
20457  Py_ssize_t pos, i;
20458  kwtuple = PyTuple_New(2 * nk);
20459  if (kwtuple == NULL) {
20460  result = NULL;
20461  goto done;
20462  }
20463  k = &PyTuple_GET_ITEM(kwtuple, 0);
20464  pos = i = 0;
20465  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
20466  Py_INCREF(k[i]);
20467  Py_INCREF(k[i+1]);
20468  i += 2;
20469  }
20470  nk = i / 2;
20471  }
20472  else {
20473  kwtuple = NULL;
20474  k = NULL;
20475  }
20476  closure = PyFunction_GET_CLOSURE(func);
20477 #if PY_MAJOR_VERSION >= 3
20478  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
20479 #endif
20480  if (argdefs != NULL) {
20481  d = &PyTuple_GET_ITEM(argdefs, 0);
20482  nd = Py_SIZE(argdefs);
20483  }
20484  else {
20485  d = NULL;
20486  nd = 0;
20487  }
20488 #if PY_MAJOR_VERSION >= 3
20489  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
20490  args, (int)nargs,
20491  k, (int)nk,
20492  d, (int)nd, kwdefs, closure);
20493 #else
20494  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
20495  args, (int)nargs,
20496  k, (int)nk,
20497  d, (int)nd, closure);
20498 #endif
20499  Py_XDECREF(kwtuple);
20500 done:
20501  Py_LeaveRecursiveCall();
20502  return result;
20503 }
20504 #endif
20505 #endif
20506 
20507 /* PyObjectCall */
20508 #if CYTHON_COMPILING_IN_CPYTHON
20509 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20510  PyObject *result;
20511  ternaryfunc call = func->ob_type->tp_call;
20512  if (unlikely(!call))
20513  return PyObject_Call(func, arg, kw);
20514  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20515  return NULL;
20516  result = (*call)(func, arg, kw);
20517  Py_LeaveRecursiveCall();
20518  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20519  PyErr_SetString(
20520  PyExc_SystemError,
20521  "NULL result without error in PyObject_Call");
20522  }
20523  return result;
20524 }
20525 #endif
20526 
20527 /* PyObjectCallMethO */
20528 #if CYTHON_COMPILING_IN_CPYTHON
20529 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20530  PyObject *self, *result;
20531  PyCFunction cfunc;
20532  cfunc = PyCFunction_GET_FUNCTION(func);
20533  self = PyCFunction_GET_SELF(func);
20534  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20535  return NULL;
20536  result = cfunc(self, arg);
20537  Py_LeaveRecursiveCall();
20538  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20539  PyErr_SetString(
20540  PyExc_SystemError,
20541  "NULL result without error in PyObject_Call");
20542  }
20543  return result;
20544 }
20545 #endif
20546 
20547 /* PyObjectCallOneArg */
20548 #if CYTHON_COMPILING_IN_CPYTHON
20549 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20550  PyObject *result;
20551  PyObject *args = PyTuple_New(1);
20552  if (unlikely(!args)) return NULL;
20553  Py_INCREF(arg);
20554  PyTuple_SET_ITEM(args, 0, arg);
20555  result = __Pyx_PyObject_Call(func, args, NULL);
20556  Py_DECREF(args);
20557  return result;
20558 }
20559 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20560 #if CYTHON_FAST_PYCALL
20561  if (PyFunction_Check(func)) {
20562  return __Pyx_PyFunction_FastCall(func, &arg, 1);
20563  }
20564 #endif
20565  if (likely(PyCFunction_Check(func))) {
20566  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
20567  return __Pyx_PyObject_CallMethO(func, arg);
20568 #if CYTHON_FAST_PYCCALL
20569  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
20570  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
20571 #endif
20572  }
20573  }
20574  return __Pyx__PyObject_CallOneArg(func, arg);
20575 }
20576 #else
20577 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20578  PyObject *result;
20579  PyObject *args = PyTuple_Pack(1, arg);
20580  if (unlikely(!args)) return NULL;
20581  result = __Pyx_PyObject_Call(func, args, NULL);
20582  Py_DECREF(args);
20583  return result;
20584 }
20585 #endif
20586 
20587 /* PyErrFetchRestore */
20588 #if CYTHON_FAST_THREAD_STATE
20589 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20590  PyObject *tmp_type, *tmp_value, *tmp_tb;
20591  tmp_type = tstate->curexc_type;
20592  tmp_value = tstate->curexc_value;
20593  tmp_tb = tstate->curexc_traceback;
20594  tstate->curexc_type = type;
20595  tstate->curexc_value = value;
20596  tstate->curexc_traceback = tb;
20597  Py_XDECREF(tmp_type);
20598  Py_XDECREF(tmp_value);
20599  Py_XDECREF(tmp_tb);
20600 }
20601 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20602  *type = tstate->curexc_type;
20603  *value = tstate->curexc_value;
20604  *tb = tstate->curexc_traceback;
20605  tstate->curexc_type = 0;
20606  tstate->curexc_value = 0;
20607  tstate->curexc_traceback = 0;
20608 }
20609 #endif
20610 
20611 /* WriteUnraisableException */
20612 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
20613  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
20614  int full_traceback, CYTHON_UNUSED int nogil) {
20615  PyObject *old_exc, *old_val, *old_tb;
20616  PyObject *ctx;
20617  __Pyx_PyThreadState_declare
20618 #ifdef WITH_THREAD
20619  PyGILState_STATE state;
20620  if (nogil)
20621  state = PyGILState_Ensure();
20622 #ifdef _MSC_VER
20623  else state = (PyGILState_STATE)-1;
20624 #endif
20625 #endif
20626  __Pyx_PyThreadState_assign
20627  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20628  if (full_traceback) {
20629  Py_XINCREF(old_exc);
20630  Py_XINCREF(old_val);
20631  Py_XINCREF(old_tb);
20632  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20633  PyErr_PrintEx(1);
20634  }
20635  #if PY_MAJOR_VERSION < 3
20636  ctx = PyString_FromString(name);
20637  #else
20638  ctx = PyUnicode_FromString(name);
20639  #endif
20640  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20641  if (!ctx) {
20642  PyErr_WriteUnraisable(Py_None);
20643  } else {
20644  PyErr_WriteUnraisable(ctx);
20645  Py_DECREF(ctx);
20646  }
20647 #ifdef WITH_THREAD
20648  if (nogil)
20649  PyGILState_Release(state);
20650 #endif
20651 }
20652 
20653 /* PyDictVersioning */
20654 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
20655 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
20656  PyObject *dict = Py_TYPE(obj)->tp_dict;
20657  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
20658 }
20659 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
20660  PyObject **dictptr = NULL;
20661  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
20662  if (offset) {
20663 #if CYTHON_COMPILING_IN_CPYTHON
20664  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
20665 #else
20666  dictptr = _PyObject_GetDictPtr(obj);
20667 #endif
20668  }
20669  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
20670 }
20671 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
20672  PyObject *dict = Py_TYPE(obj)->tp_dict;
20673  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
20674  return 0;
20675  return obj_dict_version == __Pyx_get_object_dict_version(obj);
20676 }
20677 #endif
20678 
20679 /* PyObjectCallNoArg */
20680 #if CYTHON_COMPILING_IN_CPYTHON
20681 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
20682 #if CYTHON_FAST_PYCALL
20683  if (PyFunction_Check(func)) {
20684  return __Pyx_PyFunction_FastCall(func, NULL, 0);
20685  }
20686 #endif
20687 #ifdef __Pyx_CyFunction_USED
20688  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
20689 #else
20690  if (likely(PyCFunction_Check(func)))
20691 #endif
20692  {
20693  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
20694  return __Pyx_PyObject_CallMethO(func, NULL);
20695  }
20696  }
20697  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
20698 }
20699 #endif
20700 
20701 /* RaiseDoubleKeywords */
20702 static void __Pyx_RaiseDoubleKeywordsError(
20703  const char* func_name,
20704  PyObject* kw_name)
20705 {
20706  PyErr_Format(PyExc_TypeError,
20707  #if PY_MAJOR_VERSION >= 3
20708  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
20709  #else
20710  "%s() got multiple values for keyword argument '%s'", func_name,
20711  PyString_AsString(kw_name));
20712  #endif
20713 }
20714 
20715 /* ParseKeywords */
20716 static int __Pyx_ParseOptionalKeywords(
20717  PyObject *kwds,
20718  PyObject **argnames[],
20719  PyObject *kwds2,
20720  PyObject *values[],
20721  Py_ssize_t num_pos_args,
20722  const char* function_name)
20723 {
20724  PyObject *key = 0, *value = 0;
20725  Py_ssize_t pos = 0;
20726  PyObject*** name;
20727  PyObject*** first_kw_arg = argnames + num_pos_args;
20728  while (PyDict_Next(kwds, &pos, &key, &value)) {
20729  name = first_kw_arg;
20730  while (*name && (**name != key)) name++;
20731  if (*name) {
20732  values[name-argnames] = value;
20733  continue;
20734  }
20735  name = first_kw_arg;
20736  #if PY_MAJOR_VERSION < 3
20737  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
20738  while (*name) {
20739  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
20740  && _PyString_Eq(**name, key)) {
20741  values[name-argnames] = value;
20742  break;
20743  }
20744  name++;
20745  }
20746  if (*name) continue;
20747  else {
20748  PyObject*** argname = argnames;
20749  while (argname != first_kw_arg) {
20750  if ((**argname == key) || (
20751  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
20752  && _PyString_Eq(**argname, key))) {
20753  goto arg_passed_twice;
20754  }
20755  argname++;
20756  }
20757  }
20758  } else
20759  #endif
20760  if (likely(PyUnicode_Check(key))) {
20761  while (*name) {
20762  int cmp = (**name == key) ? 0 :
20763  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20764  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
20765  #endif
20766  PyUnicode_Compare(**name, key);
20767  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20768  if (cmp == 0) {
20769  values[name-argnames] = value;
20770  break;
20771  }
20772  name++;
20773  }
20774  if (*name) continue;
20775  else {
20776  PyObject*** argname = argnames;
20777  while (argname != first_kw_arg) {
20778  int cmp = (**argname == key) ? 0 :
20779  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20780  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
20781  #endif
20782  PyUnicode_Compare(**argname, key);
20783  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20784  if (cmp == 0) goto arg_passed_twice;
20785  argname++;
20786  }
20787  }
20788  } else
20789  goto invalid_keyword_type;
20790  if (kwds2) {
20791  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
20792  } else {
20793  goto invalid_keyword;
20794  }
20795  }
20796  return 0;
20797 arg_passed_twice:
20798  __Pyx_RaiseDoubleKeywordsError(function_name, key);
20799  goto bad;
20800 invalid_keyword_type:
20801  PyErr_Format(PyExc_TypeError,
20802  "%.200s() keywords must be strings", function_name);
20803  goto bad;
20804 invalid_keyword:
20805  PyErr_Format(PyExc_TypeError,
20806  #if PY_MAJOR_VERSION < 3
20807  "%.200s() got an unexpected keyword argument '%.200s'",
20808  function_name, PyString_AsString(key));
20809  #else
20810  "%s() got an unexpected keyword argument '%U'",
20811  function_name, key);
20812  #endif
20813 bad:
20814  return -1;
20815 }
20816 
20817 /* RaiseArgTupleInvalid */
20818 static void __Pyx_RaiseArgtupleInvalid(
20819  const char* func_name,
20820  int exact,
20821  Py_ssize_t num_min,
20822  Py_ssize_t num_max,
20823  Py_ssize_t num_found)
20824 {
20825  Py_ssize_t num_expected;
20826  const char *more_or_less;
20827  if (num_found < num_min) {
20828  num_expected = num_min;
20829  more_or_less = "at least";
20830  } else {
20831  num_expected = num_max;
20832  more_or_less = "at most";
20833  }
20834  if (exact) {
20835  more_or_less = "exactly";
20836  }
20837  PyErr_Format(PyExc_TypeError,
20838  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
20839  func_name, more_or_less, num_expected,
20840  (num_expected == 1) ? "" : "s", num_found);
20841 }
20842 
20843 /* GetModuleGlobalName */
20844 #if CYTHON_USE_DICT_VERSIONS
20845 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
20846 #else
20847 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
20848 #endif
20849 {
20850  PyObject *result;
20851 #if !CYTHON_AVOID_BORROWED_REFS
20852 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
20853  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
20854  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20855  if (likely(result)) {
20856  return __Pyx_NewRef(result);
20857  } else if (unlikely(PyErr_Occurred())) {
20858  return NULL;
20859  }
20860 #else
20861  result = PyDict_GetItem(__pyx_d, name);
20862  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20863  if (likely(result)) {
20864  return __Pyx_NewRef(result);
20865  }
20866 #endif
20867 #else
20868  result = PyObject_GetItem(__pyx_d, name);
20869  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20870  if (likely(result)) {
20871  return __Pyx_NewRef(result);
20872  }
20873  PyErr_Clear();
20874 #endif
20875  return __Pyx_GetBuiltinName(name);
20876 }
20877 
20878 /* GetTopmostException */
20879 #if CYTHON_USE_EXC_INFO_STACK
20880 static _PyErr_StackItem *
20881 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
20882 {
20883  _PyErr_StackItem *exc_info = tstate->exc_info;
20884  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
20885  exc_info->previous_item != NULL)
20886  {
20887  exc_info = exc_info->previous_item;
20888  }
20889  return exc_info;
20890 }
20891 #endif
20892 
20893 /* SaveResetException */
20894 #if CYTHON_FAST_THREAD_STATE
20895 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20896  #if CYTHON_USE_EXC_INFO_STACK
20897  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
20898  *type = exc_info->exc_type;
20899  *value = exc_info->exc_value;
20900  *tb = exc_info->exc_traceback;
20901  #else
20902  *type = tstate->exc_type;
20903  *value = tstate->exc_value;
20904  *tb = tstate->exc_traceback;
20905  #endif
20906  Py_XINCREF(*type);
20907  Py_XINCREF(*value);
20908  Py_XINCREF(*tb);
20909 }
20910 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20911  PyObject *tmp_type, *tmp_value, *tmp_tb;
20912  #if CYTHON_USE_EXC_INFO_STACK
20913  _PyErr_StackItem *exc_info = tstate->exc_info;
20914  tmp_type = exc_info->exc_type;
20915  tmp_value = exc_info->exc_value;
20916  tmp_tb = exc_info->exc_traceback;
20917  exc_info->exc_type = type;
20918  exc_info->exc_value = value;
20919  exc_info->exc_traceback = tb;
20920  #else
20921  tmp_type = tstate->exc_type;
20922  tmp_value = tstate->exc_value;
20923  tmp_tb = tstate->exc_traceback;
20924  tstate->exc_type = type;
20925  tstate->exc_value = value;
20926  tstate->exc_traceback = tb;
20927  #endif
20928  Py_XDECREF(tmp_type);
20929  Py_XDECREF(tmp_value);
20930  Py_XDECREF(tmp_tb);
20931 }
20932 #endif
20933 
20934 /* PyErrExceptionMatches */
20935 #if CYTHON_FAST_THREAD_STATE
20936 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
20937  Py_ssize_t i, n;
20938  n = PyTuple_GET_SIZE(tuple);
20939 #if PY_MAJOR_VERSION >= 3
20940  for (i=0; i<n; i++) {
20941  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
20942  }
20943 #endif
20944  for (i=0; i<n; i++) {
20945  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
20946  }
20947  return 0;
20948 }
20949 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
20950  PyObject *exc_type = tstate->curexc_type;
20951  if (exc_type == err) return 1;
20952  if (unlikely(!exc_type)) return 0;
20953  if (unlikely(PyTuple_Check(err)))
20954  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
20955  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
20956 }
20957 #endif
20958 
20959 /* GetException */
20960 #if CYTHON_FAST_THREAD_STATE
20961 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
20962 #else
20963 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
20964 #endif
20965 {
20966  PyObject *local_type, *local_value, *local_tb;
20967 #if CYTHON_FAST_THREAD_STATE
20968  PyObject *tmp_type, *tmp_value, *tmp_tb;
20969  local_type = tstate->curexc_type;
20970  local_value = tstate->curexc_value;
20971  local_tb = tstate->curexc_traceback;
20972  tstate->curexc_type = 0;
20973  tstate->curexc_value = 0;
20974  tstate->curexc_traceback = 0;
20975 #else
20976  PyErr_Fetch(&local_type, &local_value, &local_tb);
20977 #endif
20978  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
20979 #if CYTHON_FAST_THREAD_STATE
20980  if (unlikely(tstate->curexc_type))
20981 #else
20982  if (unlikely(PyErr_Occurred()))
20983 #endif
20984  goto bad;
20985  #if PY_MAJOR_VERSION >= 3
20986  if (local_tb) {
20987  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
20988  goto bad;
20989  }
20990  #endif
20991  Py_XINCREF(local_tb);
20992  Py_XINCREF(local_type);
20993  Py_XINCREF(local_value);
20994  *type = local_type;
20995  *value = local_value;
20996  *tb = local_tb;
20997 #if CYTHON_FAST_THREAD_STATE
20998  #if CYTHON_USE_EXC_INFO_STACK
20999  {
21000  _PyErr_StackItem *exc_info = tstate->exc_info;
21001  tmp_type = exc_info->exc_type;
21002  tmp_value = exc_info->exc_value;
21003  tmp_tb = exc_info->exc_traceback;
21004  exc_info->exc_type = local_type;
21005  exc_info->exc_value = local_value;
21006  exc_info->exc_traceback = local_tb;
21007  }
21008  #else
21009  tmp_type = tstate->exc_type;
21010  tmp_value = tstate->exc_value;
21011  tmp_tb = tstate->exc_traceback;
21012  tstate->exc_type = local_type;
21013  tstate->exc_value = local_value;
21014  tstate->exc_traceback = local_tb;
21015  #endif
21016  Py_XDECREF(tmp_type);
21017  Py_XDECREF(tmp_value);
21018  Py_XDECREF(tmp_tb);
21019 #else
21020  PyErr_SetExcInfo(local_type, local_value, local_tb);
21021 #endif
21022  return 0;
21023 bad:
21024  *type = 0;
21025  *value = 0;
21026  *tb = 0;
21027  Py_XDECREF(local_type);
21028  Py_XDECREF(local_value);
21029  Py_XDECREF(local_tb);
21030  return -1;
21031 }
21032 
21033 /* RaiseException */
21034 #if PY_MAJOR_VERSION < 3
21035 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21036  CYTHON_UNUSED PyObject *cause) {
21037  __Pyx_PyThreadState_declare
21038  Py_XINCREF(type);
21039  if (!value || value == Py_None)
21040  value = NULL;
21041  else
21042  Py_INCREF(value);
21043  if (!tb || tb == Py_None)
21044  tb = NULL;
21045  else {
21046  Py_INCREF(tb);
21047  if (!PyTraceBack_Check(tb)) {
21048  PyErr_SetString(PyExc_TypeError,
21049  "raise: arg 3 must be a traceback or None");
21050  goto raise_error;
21051  }
21052  }
21053  if (PyType_Check(type)) {
21054 #if CYTHON_COMPILING_IN_PYPY
21055  if (!value) {
21056  Py_INCREF(Py_None);
21057  value = Py_None;
21058  }
21059 #endif
21060  PyErr_NormalizeException(&type, &value, &tb);
21061  } else {
21062  if (value) {
21063  PyErr_SetString(PyExc_TypeError,
21064  "instance exception may not have a separate value");
21065  goto raise_error;
21066  }
21067  value = type;
21068  type = (PyObject*) Py_TYPE(type);
21069  Py_INCREF(type);
21070  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21071  PyErr_SetString(PyExc_TypeError,
21072  "raise: exception class must be a subclass of BaseException");
21073  goto raise_error;
21074  }
21075  }
21076  __Pyx_PyThreadState_assign
21077  __Pyx_ErrRestore(type, value, tb);
21078  return;
21079 raise_error:
21080  Py_XDECREF(value);
21081  Py_XDECREF(type);
21082  Py_XDECREF(tb);
21083  return;
21084 }
21085 #else
21086 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21087  PyObject* owned_instance = NULL;
21088  if (tb == Py_None) {
21089  tb = 0;
21090  } else if (tb && !PyTraceBack_Check(tb)) {
21091  PyErr_SetString(PyExc_TypeError,
21092  "raise: arg 3 must be a traceback or None");
21093  goto bad;
21094  }
21095  if (value == Py_None)
21096  value = 0;
21097  if (PyExceptionInstance_Check(type)) {
21098  if (value) {
21099  PyErr_SetString(PyExc_TypeError,
21100  "instance exception may not have a separate value");
21101  goto bad;
21102  }
21103  value = type;
21104  type = (PyObject*) Py_TYPE(value);
21105  } else if (PyExceptionClass_Check(type)) {
21106  PyObject *instance_class = NULL;
21107  if (value && PyExceptionInstance_Check(value)) {
21108  instance_class = (PyObject*) Py_TYPE(value);
21109  if (instance_class != type) {
21110  int is_subclass = PyObject_IsSubclass(instance_class, type);
21111  if (!is_subclass) {
21112  instance_class = NULL;
21113  } else if (unlikely(is_subclass == -1)) {
21114  goto bad;
21115  } else {
21116  type = instance_class;
21117  }
21118  }
21119  }
21120  if (!instance_class) {
21121  PyObject *args;
21122  if (!value)
21123  args = PyTuple_New(0);
21124  else if (PyTuple_Check(value)) {
21125  Py_INCREF(value);
21126  args = value;
21127  } else
21128  args = PyTuple_Pack(1, value);
21129  if (!args)
21130  goto bad;
21131  owned_instance = PyObject_Call(type, args, NULL);
21132  Py_DECREF(args);
21133  if (!owned_instance)
21134  goto bad;
21135  value = owned_instance;
21136  if (!PyExceptionInstance_Check(value)) {
21137  PyErr_Format(PyExc_TypeError,
21138  "calling %R should have returned an instance of "
21139  "BaseException, not %R",
21140  type, Py_TYPE(value));
21141  goto bad;
21142  }
21143  }
21144  } else {
21145  PyErr_SetString(PyExc_TypeError,
21146  "raise: exception class must be a subclass of BaseException");
21147  goto bad;
21148  }
21149  if (cause) {
21150  PyObject *fixed_cause;
21151  if (cause == Py_None) {
21152  fixed_cause = NULL;
21153  } else if (PyExceptionClass_Check(cause)) {
21154  fixed_cause = PyObject_CallObject(cause, NULL);
21155  if (fixed_cause == NULL)
21156  goto bad;
21157  } else if (PyExceptionInstance_Check(cause)) {
21158  fixed_cause = cause;
21159  Py_INCREF(fixed_cause);
21160  } else {
21161  PyErr_SetString(PyExc_TypeError,
21162  "exception causes must derive from "
21163  "BaseException");
21164  goto bad;
21165  }
21166  PyException_SetCause(value, fixed_cause);
21167  }
21168  PyErr_SetObject(type, value);
21169  if (tb) {
21170 #if CYTHON_COMPILING_IN_PYPY
21171  PyObject *tmp_type, *tmp_value, *tmp_tb;
21172  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21173  Py_INCREF(tb);
21174  PyErr_Restore(tmp_type, tmp_value, tb);
21175  Py_XDECREF(tmp_tb);
21176 #else
21177  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21178  PyObject* tmp_tb = tstate->curexc_traceback;
21179  if (tb != tmp_tb) {
21180  Py_INCREF(tb);
21181  tstate->curexc_traceback = tb;
21182  Py_XDECREF(tmp_tb);
21183  }
21184 #endif
21185  }
21186 bad:
21187  Py_XDECREF(owned_instance);
21188  return;
21189 }
21190 #endif
21191 
21192 /* PyIntBinop */
21193 #if !CYTHON_COMPILING_IN_PYPY
21194 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
21195  (void)inplace;
21196  (void)zerodivision_check;
21197  #if PY_MAJOR_VERSION < 3
21198  if (likely(PyInt_CheckExact(op1))) {
21199  const long b = intval;
21200  long x;
21201  long a = PyInt_AS_LONG(op1);
21202  x = (long)((unsigned long)a + b);
21203  if (likely((x^a) >= 0 || (x^b) >= 0))
21204  return PyInt_FromLong(x);
21205  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21206  }
21207  #endif
21208  #if CYTHON_USE_PYLONG_INTERNALS
21209  if (likely(PyLong_CheckExact(op1))) {
21210  const long b = intval;
21211  long a, x;
21212 #ifdef HAVE_LONG_LONG
21213  const PY_LONG_LONG llb = intval;
21214  PY_LONG_LONG lla, llx;
21215 #endif
21216  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21217  const Py_ssize_t size = Py_SIZE(op1);
21218  if (likely(__Pyx_sst_abs(size) <= 1)) {
21219  a = likely(size) ? digits[0] : 0;
21220  if (size == -1) a = -a;
21221  } else {
21222  switch (size) {
21223  case -2:
21224  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21225  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21226  break;
21227 #ifdef HAVE_LONG_LONG
21228  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21229  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21230  goto long_long;
21231 #endif
21232  }
21233  CYTHON_FALLTHROUGH;
21234  case 2:
21235  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21236  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21237  break;
21238 #ifdef HAVE_LONG_LONG
21239  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21240  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21241  goto long_long;
21242 #endif
21243  }
21244  CYTHON_FALLTHROUGH;
21245  case -3:
21246  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21247  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21248  break;
21249 #ifdef HAVE_LONG_LONG
21250  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21251  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]));
21252  goto long_long;
21253 #endif
21254  }
21255  CYTHON_FALLTHROUGH;
21256  case 3:
21257  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21258  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21259  break;
21260 #ifdef HAVE_LONG_LONG
21261  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21262  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]));
21263  goto long_long;
21264 #endif
21265  }
21266  CYTHON_FALLTHROUGH;
21267  case -4:
21268  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21269  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21270  break;
21271 #ifdef HAVE_LONG_LONG
21272  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21273  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]));
21274  goto long_long;
21275 #endif
21276  }
21277  CYTHON_FALLTHROUGH;
21278  case 4:
21279  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21280  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21281  break;
21282 #ifdef HAVE_LONG_LONG
21283  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21284  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]));
21285  goto long_long;
21286 #endif
21287  }
21288  CYTHON_FALLTHROUGH;
21289  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21290  }
21291  }
21292  x = a + b;
21293  return PyLong_FromLong(x);
21294 #ifdef HAVE_LONG_LONG
21295  long_long:
21296  llx = lla + llb;
21297  return PyLong_FromLongLong(llx);
21298 #endif
21299 
21300 
21301  }
21302  #endif
21303  if (PyFloat_CheckExact(op1)) {
21304  const long b = intval;
21305  double a = PyFloat_AS_DOUBLE(op1);
21306  double result;
21307  PyFPE_START_PROTECT("add", return NULL)
21308  result = ((double)a) + (double)b;
21309  PyFPE_END_PROTECT(result)
21310  return PyFloat_FromDouble(result);
21311  }
21312  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21313 }
21314 #endif
21315 
21316 /* SetItemInt */
21317 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21318  int r;
21319  if (!j) return -1;
21320  r = PyObject_SetItem(o, j, v);
21321  Py_DECREF(j);
21322  return r;
21323 }
21324 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21325  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21326 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21327  if (is_list || PyList_CheckExact(o)) {
21328  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21329  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
21330  PyObject* old = PyList_GET_ITEM(o, n);
21331  Py_INCREF(v);
21332  PyList_SET_ITEM(o, n, v);
21333  Py_DECREF(old);
21334  return 1;
21335  }
21336  } else {
21337  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21338  if (likely(m && m->sq_ass_item)) {
21339  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21340  Py_ssize_t l = m->sq_length(o);
21341  if (likely(l >= 0)) {
21342  i += l;
21343  } else {
21344  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21345  return -1;
21346  PyErr_Clear();
21347  }
21348  }
21349  return m->sq_ass_item(o, i, v);
21350  }
21351  }
21352 #else
21353 #if CYTHON_COMPILING_IN_PYPY
21354  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
21355 #else
21356  if (is_list || PySequence_Check(o))
21357 #endif
21358  {
21359  return PySequence_SetItem(o, i, v);
21360  }
21361 #endif
21362  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21363 }
21364 
21365 /* PyObjectCall2Args */
21366 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
21367  PyObject *args, *result = NULL;
21368  #if CYTHON_FAST_PYCALL
21369  if (PyFunction_Check(function)) {
21370  PyObject *args[2] = {arg1, arg2};
21371  return __Pyx_PyFunction_FastCall(function, args, 2);
21372  }
21373  #endif
21374  #if CYTHON_FAST_PYCCALL
21375  if (__Pyx_PyFastCFunction_Check(function)) {
21376  PyObject *args[2] = {arg1, arg2};
21377  return __Pyx_PyCFunction_FastCall(function, args, 2);
21378  }
21379  #endif
21380  args = PyTuple_New(2);
21381  if (unlikely(!args)) goto done;
21382  Py_INCREF(arg1);
21383  PyTuple_SET_ITEM(args, 0, arg1);
21384  Py_INCREF(arg2);
21385  PyTuple_SET_ITEM(args, 1, arg2);
21386  Py_INCREF(function);
21387  result = __Pyx_PyObject_Call(function, args, NULL);
21388  Py_DECREF(args);
21389  Py_DECREF(function);
21390 done:
21391  return result;
21392 }
21393 
21394 /* ArgTypeTest */
21395 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21396 {
21397  if (unlikely(!type)) {
21398  PyErr_SetString(PyExc_SystemError, "Missing type object");
21399  return 0;
21400  }
21401  else if (exact) {
21402  #if PY_MAJOR_VERSION == 2
21403  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21404  #endif
21405  }
21406  else {
21407  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21408  }
21409  PyErr_Format(PyExc_TypeError,
21410  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21411  name, type->tp_name, Py_TYPE(obj)->tp_name);
21412  return 0;
21413 }
21414 
21415 /* Import */
21416 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21417  PyObject *empty_list = 0;
21418  PyObject *module = 0;
21419  PyObject *global_dict = 0;
21420  PyObject *empty_dict = 0;
21421  PyObject *list;
21422  #if PY_MAJOR_VERSION < 3
21423  PyObject *py_import;
21424  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21425  if (!py_import)
21426  goto bad;
21427  #endif
21428  if (from_list)
21429  list = from_list;
21430  else {
21431  empty_list = PyList_New(0);
21432  if (!empty_list)
21433  goto bad;
21434  list = empty_list;
21435  }
21436  global_dict = PyModule_GetDict(__pyx_m);
21437  if (!global_dict)
21438  goto bad;
21439  empty_dict = PyDict_New();
21440  if (!empty_dict)
21441  goto bad;
21442  {
21443  #if PY_MAJOR_VERSION >= 3
21444  if (level == -1) {
21445  if (strchr(__Pyx_MODULE_NAME, '.')) {
21446  module = PyImport_ImportModuleLevelObject(
21447  name, global_dict, empty_dict, list, 1);
21448  if (!module) {
21449  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21450  goto bad;
21451  PyErr_Clear();
21452  }
21453  }
21454  level = 0;
21455  }
21456  #endif
21457  if (!module) {
21458  #if PY_MAJOR_VERSION < 3
21459  PyObject *py_level = PyInt_FromLong(level);
21460  if (!py_level)
21461  goto bad;
21462  module = PyObject_CallFunctionObjArgs(py_import,
21463  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
21464  Py_DECREF(py_level);
21465  #else
21466  module = PyImport_ImportModuleLevelObject(
21467  name, global_dict, empty_dict, list, level);
21468  #endif
21469  }
21470  }
21471 bad:
21472  #if PY_MAJOR_VERSION < 3
21473  Py_XDECREF(py_import);
21474  #endif
21475  Py_XDECREF(empty_list);
21476  Py_XDECREF(empty_dict);
21477  return module;
21478 }
21479 
21480 /* PyObject_GenericGetAttrNoDict */
21481 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21482 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
21483  PyErr_Format(PyExc_AttributeError,
21484 #if PY_MAJOR_VERSION >= 3
21485  "'%.50s' object has no attribute '%U'",
21486  tp->tp_name, attr_name);
21487 #else
21488  "'%.50s' object has no attribute '%.400s'",
21489  tp->tp_name, PyString_AS_STRING(attr_name));
21490 #endif
21491  return NULL;
21492 }
21493 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
21494  PyObject *descr;
21495  PyTypeObject *tp = Py_TYPE(obj);
21496  if (unlikely(!PyString_Check(attr_name))) {
21497  return PyObject_GenericGetAttr(obj, attr_name);
21498  }
21499  assert(!tp->tp_dictoffset);
21500  descr = _PyType_Lookup(tp, attr_name);
21501  if (unlikely(!descr)) {
21502  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
21503  }
21504  Py_INCREF(descr);
21505  #if PY_MAJOR_VERSION < 3
21506  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
21507  #endif
21508  {
21509  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
21510  if (unlikely(f)) {
21511  PyObject *res = f(descr, obj, (PyObject *)tp);
21512  Py_DECREF(descr);
21513  return res;
21514  }
21515  }
21516  return descr;
21517 }
21518 #endif
21519 
21520 /* PyObject_GenericGetAttr */
21521 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21522 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
21523  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
21524  return PyObject_GenericGetAttr(obj, attr_name);
21525  }
21526  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
21527 }
21528 #endif
21529 
21530 /* SetVTable */
21531 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21532 #if PY_VERSION_HEX >= 0x02070000
21533  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21534 #else
21535  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21536 #endif
21537  if (!ob)
21538  goto bad;
21539  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21540  goto bad;
21541  Py_DECREF(ob);
21542  return 0;
21543 bad:
21544  Py_XDECREF(ob);
21545  return -1;
21546 }
21547 
21548 /* SetupReduce */
21549 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21550  int ret;
21551  PyObject *name_attr;
21552  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21553  if (likely(name_attr)) {
21554  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21555  } else {
21556  ret = -1;
21557  }
21558  if (unlikely(ret < 0)) {
21559  PyErr_Clear();
21560  ret = 0;
21561  }
21562  Py_XDECREF(name_attr);
21563  return ret;
21564 }
21565 static int __Pyx_setup_reduce(PyObject* type_obj) {
21566  int ret = 0;
21567  PyObject *object_reduce = NULL;
21568  PyObject *object_reduce_ex = NULL;
21569  PyObject *reduce = NULL;
21570  PyObject *reduce_ex = NULL;
21571  PyObject *reduce_cython = NULL;
21572  PyObject *setstate = NULL;
21573  PyObject *setstate_cython = NULL;
21574 #if CYTHON_USE_PYTYPE_LOOKUP
21575  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21576 #else
21577  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21578 #endif
21579 #if CYTHON_USE_PYTYPE_LOOKUP
21580  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21581 #else
21582  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21583 #endif
21584  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
21585  if (reduce_ex == object_reduce_ex) {
21586 #if CYTHON_USE_PYTYPE_LOOKUP
21587  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21588 #else
21589  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21590 #endif
21591  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
21592  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
21593  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
21594  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
21595  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
21596  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
21597  if (!setstate) PyErr_Clear();
21598  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
21599  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
21600  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
21601  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
21602  }
21603  PyType_Modified((PyTypeObject*)type_obj);
21604  }
21605  }
21606  goto GOOD;
21607 BAD:
21608  if (!PyErr_Occurred())
21609  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
21610  ret = -1;
21611 GOOD:
21612 #if !CYTHON_USE_PYTYPE_LOOKUP
21613  Py_XDECREF(object_reduce);
21614  Py_XDECREF(object_reduce_ex);
21615 #endif
21616  Py_XDECREF(reduce);
21617  Py_XDECREF(reduce_ex);
21618  Py_XDECREF(reduce_cython);
21619  Py_XDECREF(setstate);
21620  Py_XDECREF(setstate_cython);
21621  return ret;
21622 }
21623 
21624 /* PyFloatBinop */
21625 #if !CYTHON_COMPILING_IN_PYPY
21626 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
21627  const double b = floatval;
21628  double a, result;
21629  (void)inplace;
21630  (void)zerodivision_check;
21631  if (likely(PyFloat_CheckExact(op1))) {
21632  a = PyFloat_AS_DOUBLE(op1);
21633 
21634  } else
21635  #if PY_MAJOR_VERSION < 3
21636  if (likely(PyInt_CheckExact(op1))) {
21637  a = (double) PyInt_AS_LONG(op1);
21638 
21639  } else
21640  #endif
21641  if (likely(PyLong_CheckExact(op1))) {
21642  #if CYTHON_USE_PYLONG_INTERNALS
21643  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21644  const Py_ssize_t size = Py_SIZE(op1);
21645  switch (size) {
21646  case 0: a = 0.0; break;
21647  case -1: a = -(double) digits[0]; break;
21648  case 1: a = (double) digits[0]; break;
21649  case -2:
21650  case 2:
21651  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
21652  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21653  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21654  if (size == -2)
21655  a = -a;
21656  break;
21657  }
21658  }
21659  CYTHON_FALLTHROUGH;
21660  case -3:
21661  case 3:
21662  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
21663  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21664  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21665  if (size == -3)
21666  a = -a;
21667  break;
21668  }
21669  }
21670  CYTHON_FALLTHROUGH;
21671  case -4:
21672  case 4:
21673  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
21674  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21675  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21676  if (size == -4)
21677  a = -a;
21678  break;
21679  }
21680  }
21681  CYTHON_FALLTHROUGH;
21682  default:
21683  #else
21684  {
21685  #endif
21686  a = PyLong_AsDouble(op1);
21687  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
21688 
21689  }
21690  } else {
21691  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
21692  }
21693 
21694  PyFPE_START_PROTECT("divide", return NULL)
21695  result = a / b;
21696  PyFPE_END_PROTECT(result)
21697  return PyFloat_FromDouble(result);
21698 }
21699 #endif
21700 
21701 /* BytesEquals */
21702  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
21703 #if CYTHON_COMPILING_IN_PYPY
21704  return PyObject_RichCompareBool(s1, s2, equals);
21705 #else
21706  if (s1 == s2) {
21707  return (equals == Py_EQ);
21708  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
21709  const char *ps1, *ps2;
21710  Py_ssize_t length = PyBytes_GET_SIZE(s1);
21711  if (length != PyBytes_GET_SIZE(s2))
21712  return (equals == Py_NE);
21713  ps1 = PyBytes_AS_STRING(s1);
21714  ps2 = PyBytes_AS_STRING(s2);
21715  if (ps1[0] != ps2[0]) {
21716  return (equals == Py_NE);
21717  } else if (length == 1) {
21718  return (equals == Py_EQ);
21719  } else {
21720  int result;
21721 #if CYTHON_USE_UNICODE_INTERNALS
21722  Py_hash_t hash1, hash2;
21723  hash1 = ((PyBytesObject*)s1)->ob_shash;
21724  hash2 = ((PyBytesObject*)s2)->ob_shash;
21725  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21726  return (equals == Py_NE);
21727  }
21728 #endif
21729  result = memcmp(ps1, ps2, (size_t)length);
21730  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21731  }
21732  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
21733  return (equals == Py_NE);
21734  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
21735  return (equals == Py_NE);
21736  } else {
21737  int result;
21738  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21739  if (!py_result)
21740  return -1;
21741  result = __Pyx_PyObject_IsTrue(py_result);
21742  Py_DECREF(py_result);
21743  return result;
21744  }
21745 #endif
21746 }
21747 
21748 /* UnicodeEquals */
21749  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
21750 #if CYTHON_COMPILING_IN_PYPY
21751  return PyObject_RichCompareBool(s1, s2, equals);
21752 #else
21753 #if PY_MAJOR_VERSION < 3
21754  PyObject* owned_ref = NULL;
21755 #endif
21756  int s1_is_unicode, s2_is_unicode;
21757  if (s1 == s2) {
21758  goto return_eq;
21759  }
21760  s1_is_unicode = PyUnicode_CheckExact(s1);
21761  s2_is_unicode = PyUnicode_CheckExact(s2);
21762 #if PY_MAJOR_VERSION < 3
21763  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
21764  owned_ref = PyUnicode_FromObject(s2);
21765  if (unlikely(!owned_ref))
21766  return -1;
21767  s2 = owned_ref;
21768  s2_is_unicode = 1;
21769  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
21770  owned_ref = PyUnicode_FromObject(s1);
21771  if (unlikely(!owned_ref))
21772  return -1;
21773  s1 = owned_ref;
21774  s1_is_unicode = 1;
21775  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
21776  return __Pyx_PyBytes_Equals(s1, s2, equals);
21777  }
21778 #endif
21779  if (s1_is_unicode & s2_is_unicode) {
21780  Py_ssize_t length;
21781  int kind;
21782  void *data1, *data2;
21783  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
21784  return -1;
21785  length = __Pyx_PyUnicode_GET_LENGTH(s1);
21786  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
21787  goto return_ne;
21788  }
21789 #if CYTHON_USE_UNICODE_INTERNALS
21790  {
21791  Py_hash_t hash1, hash2;
21792  #if CYTHON_PEP393_ENABLED
21793  hash1 = ((PyASCIIObject*)s1)->hash;
21794  hash2 = ((PyASCIIObject*)s2)->hash;
21795  #else
21796  hash1 = ((PyUnicodeObject*)s1)->hash;
21797  hash2 = ((PyUnicodeObject*)s2)->hash;
21798  #endif
21799  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21800  goto return_ne;
21801  }
21802  }
21803 #endif
21804  kind = __Pyx_PyUnicode_KIND(s1);
21805  if (kind != __Pyx_PyUnicode_KIND(s2)) {
21806  goto return_ne;
21807  }
21808  data1 = __Pyx_PyUnicode_DATA(s1);
21809  data2 = __Pyx_PyUnicode_DATA(s2);
21810  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
21811  goto return_ne;
21812  } else if (length == 1) {
21813  goto return_eq;
21814  } else {
21815  int result = memcmp(data1, data2, (size_t)(length * kind));
21816  #if PY_MAJOR_VERSION < 3
21817  Py_XDECREF(owned_ref);
21818  #endif
21819  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21820  }
21821  } else if ((s1 == Py_None) & s2_is_unicode) {
21822  goto return_ne;
21823  } else if ((s2 == Py_None) & s1_is_unicode) {
21824  goto return_ne;
21825  } else {
21826  int result;
21827  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21828  #if PY_MAJOR_VERSION < 3
21829  Py_XDECREF(owned_ref);
21830  #endif
21831  if (!py_result)
21832  return -1;
21833  result = __Pyx_PyObject_IsTrue(py_result);
21834  Py_DECREF(py_result);
21835  return result;
21836  }
21837 return_eq:
21838  #if PY_MAJOR_VERSION < 3
21839  Py_XDECREF(owned_ref);
21840  #endif
21841  return (equals == Py_EQ);
21842 return_ne:
21843  #if PY_MAJOR_VERSION < 3
21844  Py_XDECREF(owned_ref);
21845  #endif
21846  return (equals == Py_NE);
21847 #endif
21848 }
21849 
21850 /* CLineInTraceback */
21851  #ifndef CYTHON_CLINE_IN_TRACEBACK
21852 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
21853  PyObject *use_cline;
21854  PyObject *ptype, *pvalue, *ptraceback;
21855 #if CYTHON_COMPILING_IN_CPYTHON
21856  PyObject **cython_runtime_dict;
21857 #endif
21858  if (unlikely(!__pyx_cython_runtime)) {
21859  return c_line;
21860  }
21861  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
21862 #if CYTHON_COMPILING_IN_CPYTHON
21863  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
21864  if (likely(cython_runtime_dict)) {
21865  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
21866  use_cline, *cython_runtime_dict,
21867  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
21868  } else
21869 #endif
21870  {
21871  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
21872  if (use_cline_obj) {
21873  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
21874  Py_DECREF(use_cline_obj);
21875  } else {
21876  PyErr_Clear();
21877  use_cline = NULL;
21878  }
21879  }
21880  if (!use_cline) {
21881  c_line = 0;
21882  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
21883  }
21884  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
21885  c_line = 0;
21886  }
21887  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
21888  return c_line;
21889 }
21890 #endif
21891 
21892 /* CodeObjectCache */
21893  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
21894  int start = 0, mid = 0, end = count - 1;
21895  if (end >= 0 && code_line > entries[end].code_line) {
21896  return count;
21897  }
21898  while (start < end) {
21899  mid = start + (end - start) / 2;
21900  if (code_line < entries[mid].code_line) {
21901  end = mid;
21902  } else if (code_line > entries[mid].code_line) {
21903  start = mid + 1;
21904  } else {
21905  return mid;
21906  }
21907  }
21908  if (code_line <= entries[mid].code_line) {
21909  return mid;
21910  } else {
21911  return mid + 1;
21912  }
21913 }
21914 static PyCodeObject *__pyx_find_code_object(int code_line) {
21915  PyCodeObject* code_object;
21916  int pos;
21917  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
21918  return NULL;
21919  }
21920  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21921  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
21922  return NULL;
21923  }
21924  code_object = __pyx_code_cache.entries[pos].code_object;
21925  Py_INCREF(code_object);
21926  return code_object;
21927 }
21928 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
21929  int pos, i;
21930  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
21931  if (unlikely(!code_line)) {
21932  return;
21933  }
21934  if (unlikely(!entries)) {
21935  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
21936  if (likely(entries)) {
21937  __pyx_code_cache.entries = entries;
21938  __pyx_code_cache.max_count = 64;
21939  __pyx_code_cache.count = 1;
21940  entries[0].code_line = code_line;
21941  entries[0].code_object = code_object;
21942  Py_INCREF(code_object);
21943  }
21944  return;
21945  }
21946  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21947  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
21948  PyCodeObject* tmp = entries[pos].code_object;
21949  entries[pos].code_object = code_object;
21950  Py_DECREF(tmp);
21951  return;
21952  }
21953  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
21954  int new_max = __pyx_code_cache.max_count + 64;
21955  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
21956  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
21957  if (unlikely(!entries)) {
21958  return;
21959  }
21960  __pyx_code_cache.entries = entries;
21961  __pyx_code_cache.max_count = new_max;
21962  }
21963  for (i=__pyx_code_cache.count; i>pos; i--) {
21964  entries[i] = entries[i-1];
21965  }
21966  entries[pos].code_line = code_line;
21967  entries[pos].code_object = code_object;
21968  __pyx_code_cache.count++;
21969  Py_INCREF(code_object);
21970 }
21971 
21972 /* AddTraceback */
21973  #include "compile.h"
21974 #include "frameobject.h"
21975 #include "traceback.h"
21976 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
21977  const char *funcname, int c_line,
21978  int py_line, const char *filename) {
21979  PyCodeObject *py_code = 0;
21980  PyObject *py_srcfile = 0;
21981  PyObject *py_funcname = 0;
21982  #if PY_MAJOR_VERSION < 3
21983  py_srcfile = PyString_FromString(filename);
21984  #else
21985  py_srcfile = PyUnicode_FromString(filename);
21986  #endif
21987  if (!py_srcfile) goto bad;
21988  if (c_line) {
21989  #if PY_MAJOR_VERSION < 3
21990  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21991  #else
21992  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21993  #endif
21994  }
21995  else {
21996  #if PY_MAJOR_VERSION < 3
21997  py_funcname = PyString_FromString(funcname);
21998  #else
21999  py_funcname = PyUnicode_FromString(funcname);
22000  #endif
22001  }
22002  if (!py_funcname) goto bad;
22003  py_code = __Pyx_PyCode_New(
22004  0,
22005  0,
22006  0,
22007  0,
22008  0,
22009  __pyx_empty_bytes, /*PyObject *code,*/
22010  __pyx_empty_tuple, /*PyObject *consts,*/
22011  __pyx_empty_tuple, /*PyObject *names,*/
22012  __pyx_empty_tuple, /*PyObject *varnames,*/
22013  __pyx_empty_tuple, /*PyObject *freevars,*/
22014  __pyx_empty_tuple, /*PyObject *cellvars,*/
22015  py_srcfile, /*PyObject *filename,*/
22016  py_funcname, /*PyObject *name,*/
22017  py_line,
22018  __pyx_empty_bytes /*PyObject *lnotab*/
22019  );
22020  Py_DECREF(py_srcfile);
22021  Py_DECREF(py_funcname);
22022  return py_code;
22023 bad:
22024  Py_XDECREF(py_srcfile);
22025  Py_XDECREF(py_funcname);
22026  return NULL;
22027 }
22028 static void __Pyx_AddTraceback(const char *funcname, int c_line,
22029  int py_line, const char *filename) {
22030  PyCodeObject *py_code = 0;
22031  PyFrameObject *py_frame = 0;
22032  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22033  if (c_line) {
22034  c_line = __Pyx_CLineForTraceback(tstate, c_line);
22035  }
22036  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
22037  if (!py_code) {
22038  py_code = __Pyx_CreateCodeObjectForTraceback(
22039  funcname, c_line, py_line, filename);
22040  if (!py_code) goto bad;
22041  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22042  }
22043  py_frame = PyFrame_New(
22044  tstate, /*PyThreadState *tstate,*/
22045  py_code, /*PyCodeObject *code,*/
22046  __pyx_d, /*PyObject *globals,*/
22047  0 /*PyObject *locals*/
22048  );
22049  if (!py_frame) goto bad;
22050  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22051  PyTraceBack_Here(py_frame);
22052 bad:
22053  Py_XDECREF(py_code);
22054  Py_XDECREF(py_frame);
22055 }
22056 
22057 /* CIntFromPyVerify */
22058  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22059  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22060 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22061  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22062 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22063  {\
22064  func_type value = func_value;\
22065  if (sizeof(target_type) < sizeof(func_type)) {\
22066  if (unlikely(value != (func_type) (target_type) value)) {\
22067  func_type zero = 0;\
22068  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22069  return (target_type) -1;\
22070  if (is_unsigned && unlikely(value < zero))\
22071  goto raise_neg_overflow;\
22072  else\
22073  goto raise_overflow;\
22074  }\
22075  }\
22076  return (target_type) value;\
22077  }
22078 
22079 /* CIntToPy */
22080  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22081  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22082  const int is_unsigned = neg_one > const_zero;
22083  if (is_unsigned) {
22084  if (sizeof(int) < sizeof(long)) {
22085  return PyInt_FromLong((long) value);
22086  } else if (sizeof(int) <= sizeof(unsigned long)) {
22087  return PyLong_FromUnsignedLong((unsigned long) value);
22088 #ifdef HAVE_LONG_LONG
22089  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22090  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22091 #endif
22092  }
22093  } else {
22094  if (sizeof(int) <= sizeof(long)) {
22095  return PyInt_FromLong((long) value);
22096 #ifdef HAVE_LONG_LONG
22097  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22098  return PyLong_FromLongLong((PY_LONG_LONG) value);
22099 #endif
22100  }
22101  }
22102  {
22103  int one = 1; int little = (int)*(unsigned char *)&one;
22104  unsigned char *bytes = (unsigned char *)&value;
22105  return _PyLong_FromByteArray(bytes, sizeof(int),
22106  little, !is_unsigned);
22107  }
22108 }
22109 
22110 /* CIntFromPy */
22111  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22112  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22113  const int is_unsigned = neg_one > const_zero;
22114 #if PY_MAJOR_VERSION < 3
22115  if (likely(PyInt_Check(x))) {
22116  if (sizeof(int) < sizeof(long)) {
22117  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22118  } else {
22119  long val = PyInt_AS_LONG(x);
22120  if (is_unsigned && unlikely(val < 0)) {
22121  goto raise_neg_overflow;
22122  }
22123  return (int) val;
22124  }
22125  } else
22126 #endif
22127  if (likely(PyLong_Check(x))) {
22128  if (is_unsigned) {
22129 #if CYTHON_USE_PYLONG_INTERNALS
22130  const digit* digits = ((PyLongObject*)x)->ob_digit;
22131  switch (Py_SIZE(x)) {
22132  case 0: return (int) 0;
22133  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22134  case 2:
22135  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22136  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22137  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22138  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22139  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22140  }
22141  }
22142  break;
22143  case 3:
22144  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22145  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22146  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22147  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22148  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22149  }
22150  }
22151  break;
22152  case 4:
22153  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22154  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22155  __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])))
22156  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22157  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22158  }
22159  }
22160  break;
22161  }
22162 #endif
22163 #if CYTHON_COMPILING_IN_CPYTHON
22164  if (unlikely(Py_SIZE(x) < 0)) {
22165  goto raise_neg_overflow;
22166  }
22167 #else
22168  {
22169  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22170  if (unlikely(result < 0))
22171  return (int) -1;
22172  if (unlikely(result == 1))
22173  goto raise_neg_overflow;
22174  }
22175 #endif
22176  if (sizeof(int) <= sizeof(unsigned long)) {
22177  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22178 #ifdef HAVE_LONG_LONG
22179  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22180  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22181 #endif
22182  }
22183  } else {
22184 #if CYTHON_USE_PYLONG_INTERNALS
22185  const digit* digits = ((PyLongObject*)x)->ob_digit;
22186  switch (Py_SIZE(x)) {
22187  case 0: return (int) 0;
22188  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22189  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22190  case -2:
22191  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22192  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22193  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22194  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22195  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22196  }
22197  }
22198  break;
22199  case 2:
22200  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22201  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22202  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22203  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22204  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22205  }
22206  }
22207  break;
22208  case -3:
22209  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22210  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22211  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22212  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22213  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22214  }
22215  }
22216  break;
22217  case 3:
22218  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22219  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22220  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22221  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22222  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22223  }
22224  }
22225  break;
22226  case -4:
22227  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22228  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22229  __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])))
22230  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22231  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22232  }
22233  }
22234  break;
22235  case 4:
22236  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22237  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22238  __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])))
22239  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22240  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22241  }
22242  }
22243  break;
22244  }
22245 #endif
22246  if (sizeof(int) <= sizeof(long)) {
22247  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22248 #ifdef HAVE_LONG_LONG
22249  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22250  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22251 #endif
22252  }
22253  }
22254  {
22255 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22256  PyErr_SetString(PyExc_RuntimeError,
22257  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22258 #else
22259  int val;
22260  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22261  #if PY_MAJOR_VERSION < 3
22262  if (likely(v) && !PyLong_Check(v)) {
22263  PyObject *tmp = v;
22264  v = PyNumber_Long(tmp);
22265  Py_DECREF(tmp);
22266  }
22267  #endif
22268  if (likely(v)) {
22269  int one = 1; int is_little = (int)*(unsigned char *)&one;
22270  unsigned char *bytes = (unsigned char *)&val;
22271  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22272  bytes, sizeof(val),
22273  is_little, !is_unsigned);
22274  Py_DECREF(v);
22275  if (likely(!ret))
22276  return val;
22277  }
22278 #endif
22279  return (int) -1;
22280  }
22281  } else {
22282  int val;
22283  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22284  if (!tmp) return (int) -1;
22285  val = __Pyx_PyInt_As_int(tmp);
22286  Py_DECREF(tmp);
22287  return val;
22288  }
22289 raise_overflow:
22290  PyErr_SetString(PyExc_OverflowError,
22291  "value too large to convert to int");
22292  return (int) -1;
22293 raise_neg_overflow:
22294  PyErr_SetString(PyExc_OverflowError,
22295  "can't convert negative value to int");
22296  return (int) -1;
22297 }
22298 
22299 /* CIntToPy */
22300  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22301  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22302  const int is_unsigned = neg_one > const_zero;
22303  if (is_unsigned) {
22304  if (sizeof(long) < sizeof(long)) {
22305  return PyInt_FromLong((long) value);
22306  } else if (sizeof(long) <= sizeof(unsigned long)) {
22307  return PyLong_FromUnsignedLong((unsigned long) value);
22308 #ifdef HAVE_LONG_LONG
22309  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22310  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22311 #endif
22312  }
22313  } else {
22314  if (sizeof(long) <= sizeof(long)) {
22315  return PyInt_FromLong((long) value);
22316 #ifdef HAVE_LONG_LONG
22317  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22318  return PyLong_FromLongLong((PY_LONG_LONG) value);
22319 #endif
22320  }
22321  }
22322  {
22323  int one = 1; int little = (int)*(unsigned char *)&one;
22324  unsigned char *bytes = (unsigned char *)&value;
22325  return _PyLong_FromByteArray(bytes, sizeof(long),
22326  little, !is_unsigned);
22327  }
22328 }
22329 
22330 /* CIntFromPy */
22331  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22332  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22333  const int is_unsigned = neg_one > const_zero;
22334 #if PY_MAJOR_VERSION < 3
22335  if (likely(PyInt_Check(x))) {
22336  if (sizeof(long) < sizeof(long)) {
22337  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22338  } else {
22339  long val = PyInt_AS_LONG(x);
22340  if (is_unsigned && unlikely(val < 0)) {
22341  goto raise_neg_overflow;
22342  }
22343  return (long) val;
22344  }
22345  } else
22346 #endif
22347  if (likely(PyLong_Check(x))) {
22348  if (is_unsigned) {
22349 #if CYTHON_USE_PYLONG_INTERNALS
22350  const digit* digits = ((PyLongObject*)x)->ob_digit;
22351  switch (Py_SIZE(x)) {
22352  case 0: return (long) 0;
22353  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22354  case 2:
22355  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22356  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22357  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22358  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22359  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22360  }
22361  }
22362  break;
22363  case 3:
22364  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22365  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22366  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22367  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22368  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22369  }
22370  }
22371  break;
22372  case 4:
22373  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22374  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22375  __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])))
22376  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22377  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22378  }
22379  }
22380  break;
22381  }
22382 #endif
22383 #if CYTHON_COMPILING_IN_CPYTHON
22384  if (unlikely(Py_SIZE(x) < 0)) {
22385  goto raise_neg_overflow;
22386  }
22387 #else
22388  {
22389  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22390  if (unlikely(result < 0))
22391  return (long) -1;
22392  if (unlikely(result == 1))
22393  goto raise_neg_overflow;
22394  }
22395 #endif
22396  if (sizeof(long) <= sizeof(unsigned long)) {
22397  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22398 #ifdef HAVE_LONG_LONG
22399  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22400  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22401 #endif
22402  }
22403  } else {
22404 #if CYTHON_USE_PYLONG_INTERNALS
22405  const digit* digits = ((PyLongObject*)x)->ob_digit;
22406  switch (Py_SIZE(x)) {
22407  case 0: return (long) 0;
22408  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22409  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22410  case -2:
22411  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22412  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22413  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22414  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22415  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22416  }
22417  }
22418  break;
22419  case 2:
22420  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22421  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22422  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22423  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22424  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22425  }
22426  }
22427  break;
22428  case -3:
22429  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22430  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22431  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22432  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22433  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22434  }
22435  }
22436  break;
22437  case 3:
22438  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22439  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22440  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22441  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22442  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22443  }
22444  }
22445  break;
22446  case -4:
22447  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22448  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22449  __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])))
22450  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22451  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22452  }
22453  }
22454  break;
22455  case 4:
22456  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22457  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22458  __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])))
22459  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22460  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22461  }
22462  }
22463  break;
22464  }
22465 #endif
22466  if (sizeof(long) <= sizeof(long)) {
22467  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22468 #ifdef HAVE_LONG_LONG
22469  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22470  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22471 #endif
22472  }
22473  }
22474  {
22475 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22476  PyErr_SetString(PyExc_RuntimeError,
22477  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22478 #else
22479  long val;
22480  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22481  #if PY_MAJOR_VERSION < 3
22482  if (likely(v) && !PyLong_Check(v)) {
22483  PyObject *tmp = v;
22484  v = PyNumber_Long(tmp);
22485  Py_DECREF(tmp);
22486  }
22487  #endif
22488  if (likely(v)) {
22489  int one = 1; int is_little = (int)*(unsigned char *)&one;
22490  unsigned char *bytes = (unsigned char *)&val;
22491  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22492  bytes, sizeof(val),
22493  is_little, !is_unsigned);
22494  Py_DECREF(v);
22495  if (likely(!ret))
22496  return val;
22497  }
22498 #endif
22499  return (long) -1;
22500  }
22501  } else {
22502  long val;
22503  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22504  if (!tmp) return (long) -1;
22505  val = __Pyx_PyInt_As_long(tmp);
22506  Py_DECREF(tmp);
22507  return val;
22508  }
22509 raise_overflow:
22510  PyErr_SetString(PyExc_OverflowError,
22511  "value too large to convert to long");
22512  return (long) -1;
22513 raise_neg_overflow:
22514  PyErr_SetString(PyExc_OverflowError,
22515  "can't convert negative value to long");
22516  return (long) -1;
22517 }
22518 
22519 /* FastTypeChecks */
22520  #if CYTHON_COMPILING_IN_CPYTHON
22521 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22522  while (a) {
22523  a = a->tp_base;
22524  if (a == b)
22525  return 1;
22526  }
22527  return b == &PyBaseObject_Type;
22528 }
22529 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22530  PyObject *mro;
22531  if (a == b) return 1;
22532  mro = a->tp_mro;
22533  if (likely(mro)) {
22534  Py_ssize_t i, n;
22535  n = PyTuple_GET_SIZE(mro);
22536  for (i = 0; i < n; i++) {
22537  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22538  return 1;
22539  }
22540  return 0;
22541  }
22542  return __Pyx_InBases(a, b);
22543 }
22544 #if PY_MAJOR_VERSION == 2
22545 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22546  PyObject *exception, *value, *tb;
22547  int res;
22548  __Pyx_PyThreadState_declare
22549  __Pyx_PyThreadState_assign
22550  __Pyx_ErrFetch(&exception, &value, &tb);
22551  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22552  if (unlikely(res == -1)) {
22553  PyErr_WriteUnraisable(err);
22554  res = 0;
22555  }
22556  if (!res) {
22557  res = PyObject_IsSubclass(err, exc_type2);
22558  if (unlikely(res == -1)) {
22559  PyErr_WriteUnraisable(err);
22560  res = 0;
22561  }
22562  }
22563  __Pyx_ErrRestore(exception, value, tb);
22564  return res;
22565 }
22566 #else
22567 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22568  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22569  if (!res) {
22570  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22571  }
22572  return res;
22573 }
22574 #endif
22575 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22576  Py_ssize_t i, n;
22577  assert(PyExceptionClass_Check(exc_type));
22578  n = PyTuple_GET_SIZE(tuple);
22579 #if PY_MAJOR_VERSION >= 3
22580  for (i=0; i<n; i++) {
22581  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22582  }
22583 #endif
22584  for (i=0; i<n; i++) {
22585  PyObject *t = PyTuple_GET_ITEM(tuple, i);
22586  #if PY_MAJOR_VERSION < 3
22587  if (likely(exc_type == t)) return 1;
22588  #endif
22589  if (likely(PyExceptionClass_Check(t))) {
22590  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
22591  } else {
22592  }
22593  }
22594  return 0;
22595 }
22596 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22597  if (likely(err == exc_type)) return 1;
22598  if (likely(PyExceptionClass_Check(err))) {
22599  if (likely(PyExceptionClass_Check(exc_type))) {
22600  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22601  } else if (likely(PyTuple_Check(exc_type))) {
22602  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
22603  } else {
22604  }
22605  }
22606  return PyErr_GivenExceptionMatches(err, exc_type);
22607 }
22608 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22609  assert(PyExceptionClass_Check(exc_type1));
22610  assert(PyExceptionClass_Check(exc_type2));
22611  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22612  if (likely(PyExceptionClass_Check(err))) {
22613  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22614  }
22615  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22616 }
22617 #endif
22618 
22619 /* FetchCommonType */
22620  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22621  PyObject* fake_module;
22622  PyTypeObject* cached_type = NULL;
22623  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
22624  if (!fake_module) return NULL;
22625  Py_INCREF(fake_module);
22626  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
22627  if (cached_type) {
22628  if (!PyType_Check((PyObject*)cached_type)) {
22629  PyErr_Format(PyExc_TypeError,
22630  "Shared Cython type %.200s is not a type object",
22631  type->tp_name);
22632  goto bad;
22633  }
22634  if (cached_type->tp_basicsize != type->tp_basicsize) {
22635  PyErr_Format(PyExc_TypeError,
22636  "Shared Cython type %.200s has the wrong size, try recompiling",
22637  type->tp_name);
22638  goto bad;
22639  }
22640  } else {
22641  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
22642  PyErr_Clear();
22643  if (PyType_Ready(type) < 0) goto bad;
22644  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
22645  goto bad;
22646  Py_INCREF(type);
22647  cached_type = type;
22648  }
22649 done:
22650  Py_DECREF(fake_module);
22651  return cached_type;
22652 bad:
22653  Py_XDECREF(cached_type);
22654  cached_type = NULL;
22655  goto done;
22656 }
22657 
22658 /* SwapException */
22659  #if CYTHON_FAST_THREAD_STATE
22660 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22661  PyObject *tmp_type, *tmp_value, *tmp_tb;
22662  #if CYTHON_USE_EXC_INFO_STACK
22663  _PyErr_StackItem *exc_info = tstate->exc_info;
22664  tmp_type = exc_info->exc_type;
22665  tmp_value = exc_info->exc_value;
22666  tmp_tb = exc_info->exc_traceback;
22667  exc_info->exc_type = *type;
22668  exc_info->exc_value = *value;
22669  exc_info->exc_traceback = *tb;
22670  #else
22671  tmp_type = tstate->exc_type;
22672  tmp_value = tstate->exc_value;
22673  tmp_tb = tstate->exc_traceback;
22674  tstate->exc_type = *type;
22675  tstate->exc_value = *value;
22676  tstate->exc_traceback = *tb;
22677  #endif
22678  *type = tmp_type;
22679  *value = tmp_value;
22680  *tb = tmp_tb;
22681 }
22682 #else
22683 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22684  PyObject *tmp_type, *tmp_value, *tmp_tb;
22685  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22686  PyErr_SetExcInfo(*type, *value, *tb);
22687  *type = tmp_type;
22688  *value = tmp_value;
22689  *tb = tmp_tb;
22690 }
22691 #endif
22692 
22693 /* PyObjectGetMethod */
22694  static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
22695  PyObject *attr;
22696 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
22697  PyTypeObject *tp = Py_TYPE(obj);
22698  PyObject *descr;
22699  descrgetfunc f = NULL;
22700  PyObject **dictptr, *dict;
22701  int meth_found = 0;
22702  assert (*method == NULL);
22703  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
22704  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22705  goto try_unpack;
22706  }
22707  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
22708  return 0;
22709  }
22710  descr = _PyType_Lookup(tp, name);
22711  if (likely(descr != NULL)) {
22712  Py_INCREF(descr);
22713 #if PY_MAJOR_VERSION >= 3
22714  #ifdef __Pyx_CyFunction_USED
22715  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
22716  #else
22717  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
22718  #endif
22719 #else
22720  #ifdef __Pyx_CyFunction_USED
22721  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
22722  #else
22723  if (likely(PyFunction_Check(descr)))
22724  #endif
22725 #endif
22726  {
22727  meth_found = 1;
22728  } else {
22729  f = Py_TYPE(descr)->tp_descr_get;
22730  if (f != NULL && PyDescr_IsData(descr)) {
22731  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22732  Py_DECREF(descr);
22733  goto try_unpack;
22734  }
22735  }
22736  }
22737  dictptr = _PyObject_GetDictPtr(obj);
22738  if (dictptr != NULL && (dict = *dictptr) != NULL) {
22739  Py_INCREF(dict);
22740  attr = __Pyx_PyDict_GetItemStr(dict, name);
22741  if (attr != NULL) {
22742  Py_INCREF(attr);
22743  Py_DECREF(dict);
22744  Py_XDECREF(descr);
22745  goto try_unpack;
22746  }
22747  Py_DECREF(dict);
22748  }
22749  if (meth_found) {
22750  *method = descr;
22751  return 1;
22752  }
22753  if (f != NULL) {
22754  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22755  Py_DECREF(descr);
22756  goto try_unpack;
22757  }
22758  if (descr != NULL) {
22759  *method = descr;
22760  return 0;
22761  }
22762  PyErr_Format(PyExc_AttributeError,
22763 #if PY_MAJOR_VERSION >= 3
22764  "'%.50s' object has no attribute '%U'",
22765  tp->tp_name, name);
22766 #else
22767  "'%.50s' object has no attribute '%.400s'",
22768  tp->tp_name, PyString_AS_STRING(name));
22769 #endif
22770  return 0;
22771 #else
22772  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22773  goto try_unpack;
22774 #endif
22775 try_unpack:
22776 #if CYTHON_UNPACK_METHODS
22777  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
22778  PyObject *function = PyMethod_GET_FUNCTION(attr);
22779  Py_INCREF(function);
22780  Py_DECREF(attr);
22781  *method = function;
22782  return 1;
22783  }
22784 #endif
22785  *method = attr;
22786  return 0;
22787 }
22788 
22789 /* PyObjectCallMethod1 */
22790  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
22791  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
22792  Py_DECREF(method);
22793  return result;
22794 }
22795 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
22796  PyObject *method = NULL, *result;
22797  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
22798  if (likely(is_method)) {
22799  result = __Pyx_PyObject_Call2Args(method, obj, arg);
22800  Py_DECREF(method);
22801  return result;
22802  }
22803  if (unlikely(!method)) return NULL;
22804  return __Pyx__PyObject_CallMethod1(method, arg);
22805 }
22806 
22807 /* CoroutineBase */
22808  #include <structmember.h>
22809 #include <frameobject.h>
22810 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
22811 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
22812  PyObject *et, *ev, *tb;
22813  PyObject *value = NULL;
22814  __Pyx_ErrFetch(&et, &ev, &tb);
22815  if (!et) {
22816  Py_XDECREF(tb);
22817  Py_XDECREF(ev);
22818  Py_INCREF(Py_None);
22819  *pvalue = Py_None;
22820  return 0;
22821  }
22822  if (likely(et == PyExc_StopIteration)) {
22823  if (!ev) {
22824  Py_INCREF(Py_None);
22825  value = Py_None;
22826  }
22827 #if PY_VERSION_HEX >= 0x030300A0
22828  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
22829  value = ((PyStopIterationObject *)ev)->value;
22830  Py_INCREF(value);
22831  Py_DECREF(ev);
22832  }
22833 #endif
22834  else if (unlikely(PyTuple_Check(ev))) {
22835  if (PyTuple_GET_SIZE(ev) >= 1) {
22836 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22837  value = PyTuple_GET_ITEM(ev, 0);
22838  Py_INCREF(value);
22839 #else
22840  value = PySequence_ITEM(ev, 0);
22841 #endif
22842  } else {
22843  Py_INCREF(Py_None);
22844  value = Py_None;
22845  }
22846  Py_DECREF(ev);
22847  }
22848  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
22849  value = ev;
22850  }
22851  if (likely(value)) {
22852  Py_XDECREF(tb);
22853  Py_DECREF(et);
22854  *pvalue = value;
22855  return 0;
22856  }
22857  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
22858  __Pyx_ErrRestore(et, ev, tb);
22859  return -1;
22860  }
22861  PyErr_NormalizeException(&et, &ev, &tb);
22862  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
22863  __Pyx_ErrRestore(et, ev, tb);
22864  return -1;
22865  }
22866  Py_XDECREF(tb);
22867  Py_DECREF(et);
22868 #if PY_VERSION_HEX >= 0x030300A0
22869  value = ((PyStopIterationObject *)ev)->value;
22870  Py_INCREF(value);
22871  Py_DECREF(ev);
22872 #else
22873  {
22874  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
22875  Py_DECREF(ev);
22876  if (likely(args)) {
22877  value = PySequence_GetItem(args, 0);
22878  Py_DECREF(args);
22879  }
22880  if (unlikely(!value)) {
22881  __Pyx_ErrRestore(NULL, NULL, NULL);
22882  Py_INCREF(Py_None);
22883  value = Py_None;
22884  }
22885  }
22886 #endif
22887  *pvalue = value;
22888  return 0;
22889 }
22890 static CYTHON_INLINE
22891 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
22892  PyObject *t, *v, *tb;
22893  t = exc_state->exc_type;
22894  v = exc_state->exc_value;
22895  tb = exc_state->exc_traceback;
22896  exc_state->exc_type = NULL;
22897  exc_state->exc_value = NULL;
22898  exc_state->exc_traceback = NULL;
22899  Py_XDECREF(t);
22900  Py_XDECREF(v);
22901  Py_XDECREF(tb);
22902 }
22903 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
22904 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
22905  const char *msg;
22906  if ((0)) {
22907  #ifdef __Pyx_Coroutine_USED
22908  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
22909  msg = "coroutine already executing";
22910  #endif
22911  #ifdef __Pyx_AsyncGen_USED
22912  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
22913  msg = "async generator already executing";
22914  #endif
22915  } else {
22916  msg = "generator already executing";
22917  }
22918  PyErr_SetString(PyExc_ValueError, msg);
22919 }
22920 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
22921 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
22922  const char *msg;
22923  if ((0)) {
22924  #ifdef __Pyx_Coroutine_USED
22925  } else if (__Pyx_Coroutine_Check(gen)) {
22926  msg = "can't send non-None value to a just-started coroutine";
22927  #endif
22928  #ifdef __Pyx_AsyncGen_USED
22929  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
22930  msg = "can't send non-None value to a just-started async generator";
22931  #endif
22932  } else {
22933  msg = "can't send non-None value to a just-started generator";
22934  }
22935  PyErr_SetString(PyExc_TypeError, msg);
22936 }
22937 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
22938 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
22939  #ifdef __Pyx_Coroutine_USED
22940  if (!closing && __Pyx_Coroutine_Check(gen)) {
22941  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
22942  } else
22943  #endif
22944  if (value) {
22945  #ifdef __Pyx_AsyncGen_USED
22946  if (__Pyx_AsyncGen_CheckExact(gen))
22947  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
22948  else
22949  #endif
22950  PyErr_SetNone(PyExc_StopIteration);
22951  }
22952 }
22953 static
22954 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
22955  __Pyx_PyThreadState_declare
22956  PyThreadState *tstate;
22957  __Pyx_ExcInfoStruct *exc_state;
22958  PyObject *retval;
22959  assert(!self->is_running);
22960  if (unlikely(self->resume_label == 0)) {
22961  if (unlikely(value && value != Py_None)) {
22962  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
22963  }
22964  }
22965  if (unlikely(self->resume_label == -1)) {
22966  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
22967  }
22968 #if CYTHON_FAST_THREAD_STATE
22969  __Pyx_PyThreadState_assign
22970  tstate = __pyx_tstate;
22971 #else
22972  tstate = __Pyx_PyThreadState_Current;
22973 #endif
22974  exc_state = &self->gi_exc_state;
22975  if (exc_state->exc_type) {
22976  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
22977  #else
22978  if (exc_state->exc_traceback) {
22979  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
22980  PyFrameObject *f = tb->tb_frame;
22981  Py_XINCREF(tstate->frame);
22982  assert(f->f_back == NULL);
22983  f->f_back = tstate->frame;
22984  }
22985  #endif
22986  }
22987 #if CYTHON_USE_EXC_INFO_STACK
22988  exc_state->previous_item = tstate->exc_info;
22989  tstate->exc_info = exc_state;
22990 #else
22991  if (exc_state->exc_type) {
22992  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22993  } else {
22994  __Pyx_Coroutine_ExceptionClear(exc_state);
22995  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22996  }
22997 #endif
22998  self->is_running = 1;
22999  retval = self->body((PyObject *) self, tstate, value);
23000  self->is_running = 0;
23001 #if CYTHON_USE_EXC_INFO_STACK
23002  exc_state = &self->gi_exc_state;
23003  tstate->exc_info = exc_state->previous_item;
23004  exc_state->previous_item = NULL;
23005  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
23006 #endif
23007  return retval;
23008 }
23009 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
23010  PyObject *exc_tb = exc_state->exc_traceback;
23011  if (likely(exc_tb)) {
23012 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23013 #else
23014  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
23015  PyFrameObject *f = tb->tb_frame;
23016  Py_CLEAR(f->f_back);
23017 #endif
23018  }
23019 }
23020 static CYTHON_INLINE
23021 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
23022  if (unlikely(!retval)) {
23023  __Pyx_PyThreadState_declare
23024  __Pyx_PyThreadState_assign
23025  if (!__Pyx_PyErr_Occurred()) {
23026  PyObject *exc = PyExc_StopIteration;
23027  #ifdef __Pyx_AsyncGen_USED
23028  if (__Pyx_AsyncGen_CheckExact(gen))
23029  exc = __Pyx_PyExc_StopAsyncIteration;
23030  #endif
23031  __Pyx_PyErr_SetNone(exc);
23032  }
23033  }
23034  return retval;
23035 }
23036 static CYTHON_INLINE
23037 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
23038  PyObject *ret;
23039  PyObject *val = NULL;
23040  __Pyx_Coroutine_Undelegate(gen);
23041  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23042  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23043  Py_XDECREF(val);
23044  return ret;
23045 }
23046 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23047  PyObject *retval;
23048  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23049  PyObject *yf = gen->yieldfrom;
23050  if (unlikely(gen->is_running))
23051  return __Pyx_Coroutine_AlreadyRunningError(gen);
23052  if (yf) {
23053  PyObject *ret;
23054  gen->is_running = 1;
23055  #ifdef __Pyx_Generator_USED
23056  if (__Pyx_Generator_CheckExact(yf)) {
23057  ret = __Pyx_Coroutine_Send(yf, value);
23058  } else
23059  #endif
23060  #ifdef __Pyx_Coroutine_USED
23061  if (__Pyx_Coroutine_Check(yf)) {
23062  ret = __Pyx_Coroutine_Send(yf, value);
23063  } else
23064  #endif
23065  #ifdef __Pyx_AsyncGen_USED
23066  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23067  ret = __Pyx_async_gen_asend_send(yf, value);
23068  } else
23069  #endif
23070  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23071  if (PyGen_CheckExact(yf)) {
23072  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23073  } else
23074  #endif
23075  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23076  if (PyCoro_CheckExact(yf)) {
23077  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23078  } else
23079  #endif
23080  {
23081  if (value == Py_None)
23082  ret = Py_TYPE(yf)->tp_iternext(yf);
23083  else
23084  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23085  }
23086  gen->is_running = 0;
23087  if (likely(ret)) {
23088  return ret;
23089  }
23090  retval = __Pyx_Coroutine_FinishDelegation(gen);
23091  } else {
23092  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23093  }
23094  return __Pyx_Coroutine_MethodReturn(self, retval);
23095 }
23096 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23097  PyObject *retval = NULL;
23098  int err = 0;
23099  #ifdef __Pyx_Generator_USED
23100  if (__Pyx_Generator_CheckExact(yf)) {
23101  retval = __Pyx_Coroutine_Close(yf);
23102  if (!retval)
23103  return -1;
23104  } else
23105  #endif
23106  #ifdef __Pyx_Coroutine_USED
23107  if (__Pyx_Coroutine_Check(yf)) {
23108  retval = __Pyx_Coroutine_Close(yf);
23109  if (!retval)
23110  return -1;
23111  } else
23112  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23113  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
23114  if (!retval)
23115  return -1;
23116  } else
23117  #endif
23118  #ifdef __Pyx_AsyncGen_USED
23119  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23120  retval = __Pyx_async_gen_asend_close(yf, NULL);
23121  } else
23122  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23123  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23124  } else
23125  #endif
23126  {
23127  PyObject *meth;
23128  gen->is_running = 1;
23129  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23130  if (unlikely(!meth)) {
23131  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23132  PyErr_WriteUnraisable(yf);
23133  }
23134  PyErr_Clear();
23135  } else {
23136  retval = PyObject_CallFunction(meth, NULL);
23137  Py_DECREF(meth);
23138  if (!retval)
23139  err = -1;
23140  }
23141  gen->is_running = 0;
23142  }
23143  Py_XDECREF(retval);
23144  return err;
23145 }
23146 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23147  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23148  PyObject *yf = gen->yieldfrom;
23149  if (unlikely(gen->is_running))
23150  return __Pyx_Coroutine_AlreadyRunningError(gen);
23151  if (yf) {
23152  PyObject *ret;
23153  gen->is_running = 1;
23154  #ifdef __Pyx_Generator_USED
23155  if (__Pyx_Generator_CheckExact(yf)) {
23156  ret = __Pyx_Generator_Next(yf);
23157  } else
23158  #endif
23159  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23160  if (PyGen_CheckExact(yf)) {
23161  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23162  } else
23163  #endif
23164  #ifdef __Pyx_Coroutine_USED
23165  if (__Pyx_Coroutine_Check(yf)) {
23166  ret = __Pyx_Coroutine_Send(yf, Py_None);
23167  } else
23168  #endif
23169  ret = Py_TYPE(yf)->tp_iternext(yf);
23170  gen->is_running = 0;
23171  if (likely(ret)) {
23172  return ret;
23173  }
23174  return __Pyx_Coroutine_FinishDelegation(gen);
23175  }
23176  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23177 }
23178 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
23179  return __Pyx_Coroutine_Close(self);
23180 }
23181 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23182  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23183  PyObject *retval, *raised_exception;
23184  PyObject *yf = gen->yieldfrom;
23185  int err = 0;
23186  if (unlikely(gen->is_running))
23187  return __Pyx_Coroutine_AlreadyRunningError(gen);
23188  if (yf) {
23189  Py_INCREF(yf);
23190  err = __Pyx_Coroutine_CloseIter(gen, yf);
23191  __Pyx_Coroutine_Undelegate(gen);
23192  Py_DECREF(yf);
23193  }
23194  if (err == 0)
23195  PyErr_SetNone(PyExc_GeneratorExit);
23196  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23197  if (unlikely(retval)) {
23198  const char *msg;
23199  Py_DECREF(retval);
23200  if ((0)) {
23201  #ifdef __Pyx_Coroutine_USED
23202  } else if (__Pyx_Coroutine_Check(self)) {
23203  msg = "coroutine ignored GeneratorExit";
23204  #endif
23205  #ifdef __Pyx_AsyncGen_USED
23206  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23207 #if PY_VERSION_HEX < 0x03060000
23208  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23209 #else
23210  msg = "async generator ignored GeneratorExit";
23211 #endif
23212  #endif
23213  } else {
23214  msg = "generator ignored GeneratorExit";
23215  }
23216  PyErr_SetString(PyExc_RuntimeError, msg);
23217  return NULL;
23218  }
23219  raised_exception = PyErr_Occurred();
23220  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23221  if (raised_exception) PyErr_Clear();
23222  Py_INCREF(Py_None);
23223  return Py_None;
23224  }
23225  return NULL;
23226 }
23227 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23228  PyObject *args, int close_on_genexit) {
23229  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23230  PyObject *yf = gen->yieldfrom;
23231  if (unlikely(gen->is_running))
23232  return __Pyx_Coroutine_AlreadyRunningError(gen);
23233  if (yf) {
23234  PyObject *ret;
23235  Py_INCREF(yf);
23236  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23237  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23238  Py_DECREF(yf);
23239  __Pyx_Coroutine_Undelegate(gen);
23240  if (err < 0)
23241  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23242  goto throw_here;
23243  }
23244  gen->is_running = 1;
23245  if (0
23246  #ifdef __Pyx_Generator_USED
23247  || __Pyx_Generator_CheckExact(yf)
23248  #endif
23249  #ifdef __Pyx_Coroutine_USED
23250  || __Pyx_Coroutine_Check(yf)
23251  #endif
23252  ) {
23253  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23254  #ifdef __Pyx_Coroutine_USED
23255  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23256  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23257  #endif
23258  } else {
23259  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23260  if (unlikely(!meth)) {
23261  Py_DECREF(yf);
23262  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23263  gen->is_running = 0;
23264  return NULL;
23265  }
23266  PyErr_Clear();
23267  __Pyx_Coroutine_Undelegate(gen);
23268  gen->is_running = 0;
23269  goto throw_here;
23270  }
23271  if (likely(args)) {
23272  ret = PyObject_CallObject(meth, args);
23273  } else {
23274  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23275  }
23276  Py_DECREF(meth);
23277  }
23278  gen->is_running = 0;
23279  Py_DECREF(yf);
23280  if (!ret) {
23281  ret = __Pyx_Coroutine_FinishDelegation(gen);
23282  }
23283  return __Pyx_Coroutine_MethodReturn(self, ret);
23284  }
23285 throw_here:
23286  __Pyx_Raise(typ, val, tb, NULL);
23287  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23288 }
23289 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23290  PyObject *typ;
23291  PyObject *val = NULL;
23292  PyObject *tb = NULL;
23293  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23294  return NULL;
23295  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23296 }
23297 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
23298  Py_VISIT(exc_state->exc_type);
23299  Py_VISIT(exc_state->exc_value);
23300  Py_VISIT(exc_state->exc_traceback);
23301  return 0;
23302 }
23303 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23304  Py_VISIT(gen->closure);
23305  Py_VISIT(gen->classobj);
23306  Py_VISIT(gen->yieldfrom);
23307  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
23308 }
23309 static int __Pyx_Coroutine_clear(PyObject *self) {
23310  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23311  Py_CLEAR(gen->closure);
23312  Py_CLEAR(gen->classobj);
23313  Py_CLEAR(gen->yieldfrom);
23314  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
23315 #ifdef __Pyx_AsyncGen_USED
23316  if (__Pyx_AsyncGen_CheckExact(self)) {
23317  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23318  }
23319 #endif
23320  Py_CLEAR(gen->gi_code);
23321  Py_CLEAR(gen->gi_name);
23322  Py_CLEAR(gen->gi_qualname);
23323  Py_CLEAR(gen->gi_modulename);
23324  return 0;
23325 }
23326 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23327  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23328  PyObject_GC_UnTrack(gen);
23329  if (gen->gi_weakreflist != NULL)
23330  PyObject_ClearWeakRefs(self);
23331  if (gen->resume_label >= 0) {
23332  PyObject_GC_Track(self);
23333 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23334  if (PyObject_CallFinalizerFromDealloc(self))
23335 #else
23336  Py_TYPE(gen)->tp_del(self);
23337  if (self->ob_refcnt > 0)
23338 #endif
23339  {
23340  return;
23341  }
23342  PyObject_GC_UnTrack(self);
23343  }
23344 #ifdef __Pyx_AsyncGen_USED
23345  if (__Pyx_AsyncGen_CheckExact(self)) {
23346  /* We have to handle this case for asynchronous generators
23347  right here, because this code has to be between UNTRACK
23348  and GC_Del. */
23349  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23350  }
23351 #endif
23352  __Pyx_Coroutine_clear(self);
23353  PyObject_GC_Del(gen);
23354 }
23355 static void __Pyx_Coroutine_del(PyObject *self) {
23356  PyObject *error_type, *error_value, *error_traceback;
23357  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23358  __Pyx_PyThreadState_declare
23359  if (gen->resume_label < 0) {
23360  return;
23361  }
23362 #if !CYTHON_USE_TP_FINALIZE
23363  assert(self->ob_refcnt == 0);
23364  self->ob_refcnt = 1;
23365 #endif
23366  __Pyx_PyThreadState_assign
23367  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23368 #ifdef __Pyx_AsyncGen_USED
23369  if (__Pyx_AsyncGen_CheckExact(self)) {
23370  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23371  PyObject *finalizer = agen->ag_finalizer;
23372  if (finalizer && !agen->ag_closed) {
23373  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23374  if (unlikely(!res)) {
23375  PyErr_WriteUnraisable(self);
23376  } else {
23377  Py_DECREF(res);
23378  }
23379  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23380  return;
23381  }
23382  }
23383 #endif
23384  if (unlikely(gen->resume_label == 0 && !error_value)) {
23385 #ifdef __Pyx_Coroutine_USED
23386 #ifdef __Pyx_Generator_USED
23387  if (!__Pyx_Generator_CheckExact(self))
23388 #endif
23389  {
23390  PyObject_GC_UnTrack(self);
23391 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23392  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23393  PyErr_WriteUnraisable(self);
23394 #else
23395  {PyObject *msg;
23396  char *cmsg;
23397  #if CYTHON_COMPILING_IN_PYPY
23398  msg = NULL;
23399  cmsg = (char*) "coroutine was never awaited";
23400  #else
23401  char *cname;
23402  PyObject *qualname;
23403  qualname = gen->gi_qualname;
23404  cname = PyString_AS_STRING(qualname);
23405  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23406  if (unlikely(!msg)) {
23407  PyErr_Clear();
23408  cmsg = (char*) "coroutine was never awaited";
23409  } else {
23410  cmsg = PyString_AS_STRING(msg);
23411  }
23412  #endif
23413  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23414  PyErr_WriteUnraisable(self);
23415  Py_XDECREF(msg);}
23416 #endif
23417  PyObject_GC_Track(self);
23418  }
23419 #endif
23420  } else {
23421  PyObject *res = __Pyx_Coroutine_Close(self);
23422  if (unlikely(!res)) {
23423  if (PyErr_Occurred())
23424  PyErr_WriteUnraisable(self);
23425  } else {
23426  Py_DECREF(res);
23427  }
23428  }
23429  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23430 #if !CYTHON_USE_TP_FINALIZE
23431  assert(self->ob_refcnt > 0);
23432  if (--self->ob_refcnt == 0) {
23433  return;
23434  }
23435  {
23436  Py_ssize_t refcnt = self->ob_refcnt;
23437  _Py_NewReference(self);
23438  self->ob_refcnt = refcnt;
23439  }
23440 #if CYTHON_COMPILING_IN_CPYTHON
23441  assert(PyType_IS_GC(self->ob_type) &&
23442  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23443  _Py_DEC_REFTOTAL;
23444 #endif
23445 #ifdef COUNT_ALLOCS
23446  --Py_TYPE(self)->tp_frees;
23447  --Py_TYPE(self)->tp_allocs;
23448 #endif
23449 #endif
23450 }
23451 static PyObject *
23452 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23453 {
23454  PyObject *name = self->gi_name;
23455  if (unlikely(!name)) name = Py_None;
23456  Py_INCREF(name);
23457  return name;
23458 }
23459 static int
23460 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23461 {
23462  PyObject *tmp;
23463 #if PY_MAJOR_VERSION >= 3
23464  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23465 #else
23466  if (unlikely(value == NULL || !PyString_Check(value)))
23467 #endif
23468  {
23469  PyErr_SetString(PyExc_TypeError,
23470  "__name__ must be set to a string object");
23471  return -1;
23472  }
23473  tmp = self->gi_name;
23474  Py_INCREF(value);
23475  self->gi_name = value;
23476  Py_XDECREF(tmp);
23477  return 0;
23478 }
23479 static PyObject *
23480 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23481 {
23482  PyObject *name = self->gi_qualname;
23483  if (unlikely(!name)) name = Py_None;
23484  Py_INCREF(name);
23485  return name;
23486 }
23487 static int
23488 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23489 {
23490  PyObject *tmp;
23491 #if PY_MAJOR_VERSION >= 3
23492  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23493 #else
23494  if (unlikely(value == NULL || !PyString_Check(value)))
23495 #endif
23496  {
23497  PyErr_SetString(PyExc_TypeError,
23498  "__qualname__ must be set to a string object");
23499  return -1;
23500  }
23501  tmp = self->gi_qualname;
23502  Py_INCREF(value);
23503  self->gi_qualname = value;
23504  Py_XDECREF(tmp);
23505  return 0;
23506 }
23507 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23508  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23509  PyObject *name, PyObject *qualname, PyObject *module_name) {
23510  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23511  if (unlikely(!gen))
23512  return NULL;
23513  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
23514 }
23515 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23516  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23517  PyObject *name, PyObject *qualname, PyObject *module_name) {
23518  gen->body = body;
23519  gen->closure = closure;
23520  Py_XINCREF(closure);
23521  gen->is_running = 0;
23522  gen->resume_label = 0;
23523  gen->classobj = NULL;
23524  gen->yieldfrom = NULL;
23525  gen->gi_exc_state.exc_type = NULL;
23526  gen->gi_exc_state.exc_value = NULL;
23527  gen->gi_exc_state.exc_traceback = NULL;
23528 #if CYTHON_USE_EXC_INFO_STACK
23529  gen->gi_exc_state.previous_item = NULL;
23530 #endif
23531  gen->gi_weakreflist = NULL;
23532  Py_XINCREF(qualname);
23533  gen->gi_qualname = qualname;
23534  Py_XINCREF(name);
23535  gen->gi_name = name;
23536  Py_XINCREF(module_name);
23537  gen->gi_modulename = module_name;
23538  Py_XINCREF(code);
23539  gen->gi_code = code;
23540  PyObject_GC_Track(gen);
23541  return gen;
23542 }
23543 
23544 /* PatchModuleWithCoroutine */
23545  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23546 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23547  int result;
23548  PyObject *globals, *result_obj;
23549  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23550  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23551  #ifdef __Pyx_Coroutine_USED
23552  (PyObject*)__pyx_CoroutineType);
23553  #else
23554  Py_None);
23555  #endif
23556  if (unlikely(result < 0)) goto ignore;
23557  result = PyDict_SetItemString(globals, "_cython_generator_type",
23558  #ifdef __Pyx_Generator_USED
23559  (PyObject*)__pyx_GeneratorType);
23560  #else
23561  Py_None);
23562  #endif
23563  if (unlikely(result < 0)) goto ignore;
23564  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23565  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23566  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23567  if (unlikely(!result_obj)) goto ignore;
23568  Py_DECREF(result_obj);
23569  Py_DECREF(globals);
23570  return module;
23571 ignore:
23572  Py_XDECREF(globals);
23573  PyErr_WriteUnraisable(module);
23574  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23575  Py_DECREF(module);
23576  module = NULL;
23577  }
23578 #else
23579  py_code++;
23580 #endif
23581  return module;
23582 }
23583 
23584 /* PatchGeneratorABC */
23585  #ifndef CYTHON_REGISTER_ABCS
23586 #define CYTHON_REGISTER_ABCS 1
23587 #endif
23588 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23589 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23590 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23591  module = __Pyx_Coroutine_patch_module(
23592  module, ""
23593 "if _cython_generator_type is not None:\n"
23594 " try: Generator = _module.Generator\n"
23595 " except AttributeError: pass\n"
23596 " else: Generator.register(_cython_generator_type)\n"
23597 "if _cython_coroutine_type is not None:\n"
23598 " try: Coroutine = _module.Coroutine\n"
23599 " except AttributeError: pass\n"
23600 " else: Coroutine.register(_cython_coroutine_type)\n"
23601  );
23602  return module;
23603 }
23604 #endif
23605 static int __Pyx_patch_abc(void) {
23606 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23607  static int abc_patched = 0;
23608  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23609  PyObject *module;
23610  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23611  if (!module) {
23612  PyErr_WriteUnraisable(NULL);
23613  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23614  ((PY_MAJOR_VERSION >= 3) ?
23615  "Cython module failed to register with collections.abc module" :
23616  "Cython module failed to register with collections module"), 1) < 0)) {
23617  return -1;
23618  }
23619  } else {
23620  module = __Pyx_patch_abc_module(module);
23621  abc_patched = 1;
23622  if (unlikely(!module))
23623  return -1;
23624  Py_DECREF(module);
23625  }
23626  module = PyImport_ImportModule("backports_abc");
23627  if (module) {
23628  module = __Pyx_patch_abc_module(module);
23629  Py_XDECREF(module);
23630  }
23631  if (!module) {
23632  PyErr_Clear();
23633  }
23634  }
23635 #else
23636  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23637 #endif
23638  return 0;
23639 }
23640 
23641 /* Generator */
23642  static PyMethodDef __pyx_Generator_methods[] = {
23643  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23644  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23645  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23646  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23647  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
23648  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23649  {0, 0, 0, 0}
23650 };
23651 static PyMemberDef __pyx_Generator_memberlist[] = {
23652  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23653  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23654  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23655  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
23656  {0, 0, 0, 0, 0}
23657 };
23658 static PyGetSetDef __pyx_Generator_getsets[] = {
23659  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23660  (char*) PyDoc_STR("name of the generator"), 0},
23661  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23662  (char*) PyDoc_STR("qualified name of the generator"), 0},
23663  {0, 0, 0, 0, 0}
23664 };
23665 static PyTypeObject __pyx_GeneratorType_type = {
23666  PyVarObject_HEAD_INIT(0, 0)
23667  "generator",
23668  sizeof(__pyx_CoroutineObject),
23669  0,
23670  (destructor) __Pyx_Coroutine_dealloc,
23671  0,
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  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23686  0,
23687  (traverseproc) __Pyx_Coroutine_traverse,
23688  0,
23689  0,
23690  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23691  0,
23692  (iternextfunc) __Pyx_Generator_Next,
23693  __pyx_Generator_methods,
23694  __pyx_Generator_memberlist,
23695  __pyx_Generator_getsets,
23696  0,
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 #if CYTHON_USE_TP_FINALIZE
23712  0,
23713 #else
23714  __Pyx_Coroutine_del,
23715 #endif
23716  0,
23717 #if CYTHON_USE_TP_FINALIZE
23718  __Pyx_Coroutine_del,
23719 #elif PY_VERSION_HEX >= 0x030400a1
23720  0,
23721 #endif
23722 #if PY_VERSION_HEX >= 0x030800b1
23723  0,
23724 #endif
23725 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
23726  0,
23727 #endif
23728 };
23729 static int __pyx_Generator_init(void) {
23730  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
23731  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
23732  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
23733  if (unlikely(!__pyx_GeneratorType)) {
23734  return -1;
23735  }
23736  return 0;
23737 }
23738 
23739 /* CheckBinaryVersion */
23740  static int __Pyx_check_binary_version(void) {
23741  char ctversion[4], rtversion[4];
23742  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
23743  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
23744  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
23745  char message[200];
23746  PyOS_snprintf(message, sizeof(message),
23747  "compiletime version %s of module '%.100s' "
23748  "does not match runtime version %s",
23749  ctversion, __Pyx_MODULE_NAME, rtversion);
23750  return PyErr_WarnEx(NULL, message, 1);
23751  }
23752  return 0;
23753 }
23754 
23755 /* InitStrings */
23756  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
23757  while (t->p) {
23758  #if PY_MAJOR_VERSION < 3
23759  if (t->is_unicode) {
23760  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
23761  } else if (t->intern) {
23762  *t->p = PyString_InternFromString(t->s);
23763  } else {
23764  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
23765  }
23766  #else
23767  if (t->is_unicode | t->is_str) {
23768  if (t->intern) {
23769  *t->p = PyUnicode_InternFromString(t->s);
23770  } else if (t->encoding) {
23771  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
23772  } else {
23773  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
23774  }
23775  } else {
23776  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
23777  }
23778  #endif
23779  if (!*t->p)
23780  return -1;
23781  if (PyObject_Hash(*t->p) == -1)
23782  return -1;
23783  ++t;
23784  }
23785  return 0;
23786 }
23787 
23788 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
23789  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
23790 }
23791 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
23792  Py_ssize_t ignore;
23793  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
23794 }
23795 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23796 #if !CYTHON_PEP393_ENABLED
23797 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23798  char* defenc_c;
23799  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
23800  if (!defenc) return NULL;
23801  defenc_c = PyBytes_AS_STRING(defenc);
23802 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23803  {
23804  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
23805  char* c;
23806  for (c = defenc_c; c < end; c++) {
23807  if ((unsigned char) (*c) >= 128) {
23808  PyUnicode_AsASCIIString(o);
23809  return NULL;
23810  }
23811  }
23812  }
23813 #endif
23814  *length = PyBytes_GET_SIZE(defenc);
23815  return defenc_c;
23816 }
23817 #else
23818 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23819  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
23820 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23821  if (likely(PyUnicode_IS_ASCII(o))) {
23822  *length = PyUnicode_GET_LENGTH(o);
23823  return PyUnicode_AsUTF8(o);
23824  } else {
23825  PyUnicode_AsASCIIString(o);
23826  return NULL;
23827  }
23828 #else
23829  return PyUnicode_AsUTF8AndSize(o, length);
23830 #endif
23831 }
23832 #endif
23833 #endif
23834 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23835 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23836  if (
23837 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23838  __Pyx_sys_getdefaultencoding_not_ascii &&
23839 #endif
23840  PyUnicode_Check(o)) {
23841  return __Pyx_PyUnicode_AsStringAndSize(o, length);
23842  } else
23843 #endif
23844 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
23845  if (PyByteArray_Check(o)) {
23846  *length = PyByteArray_GET_SIZE(o);
23847  return PyByteArray_AS_STRING(o);
23848  } else
23849 #endif
23850  {
23851  char* result;
23852  int r = PyBytes_AsStringAndSize(o, &result, length);
23853  if (unlikely(r < 0)) {
23854  return NULL;
23855  } else {
23856  return result;
23857  }
23858  }
23859 }
23860 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
23861  int is_true = x == Py_True;
23862  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
23863  else return PyObject_IsTrue(x);
23864 }
23865 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
23866  int retval;
23867  if (unlikely(!x)) return -1;
23868  retval = __Pyx_PyObject_IsTrue(x);
23869  Py_DECREF(x);
23870  return retval;
23871 }
23872 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
23873 #if PY_MAJOR_VERSION >= 3
23874  if (PyLong_Check(result)) {
23875  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
23876  "__int__ returned non-int (type %.200s). "
23877  "The ability to return an instance of a strict subclass of int "
23878  "is deprecated, and may be removed in a future version of Python.",
23879  Py_TYPE(result)->tp_name)) {
23880  Py_DECREF(result);
23881  return NULL;
23882  }
23883  return result;
23884  }
23885 #endif
23886  PyErr_Format(PyExc_TypeError,
23887  "__%.4s__ returned non-%.4s (type %.200s)",
23888  type_name, type_name, Py_TYPE(result)->tp_name);
23889  Py_DECREF(result);
23890  return NULL;
23891 }
23892 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
23893 #if CYTHON_USE_TYPE_SLOTS
23894  PyNumberMethods *m;
23895 #endif
23896  const char *name = NULL;
23897  PyObject *res = NULL;
23898 #if PY_MAJOR_VERSION < 3
23899  if (likely(PyInt_Check(x) || PyLong_Check(x)))
23900 #else
23901  if (likely(PyLong_Check(x)))
23902 #endif
23903  return __Pyx_NewRef(x);
23904 #if CYTHON_USE_TYPE_SLOTS
23905  m = Py_TYPE(x)->tp_as_number;
23906  #if PY_MAJOR_VERSION < 3
23907  if (m && m->nb_int) {
23908  name = "int";
23909  res = m->nb_int(x);
23910  }
23911  else if (m && m->nb_long) {
23912  name = "long";
23913  res = m->nb_long(x);
23914  }
23915  #else
23916  if (likely(m && m->nb_int)) {
23917  name = "int";
23918  res = m->nb_int(x);
23919  }
23920  #endif
23921 #else
23922  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
23923  res = PyNumber_Int(x);
23924  }
23925 #endif
23926  if (likely(res)) {
23927 #if PY_MAJOR_VERSION < 3
23928  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
23929 #else
23930  if (unlikely(!PyLong_CheckExact(res))) {
23931 #endif
23932  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
23933  }
23934  }
23935  else if (!PyErr_Occurred()) {
23936  PyErr_SetString(PyExc_TypeError,
23937  "an integer is required");
23938  }
23939  return res;
23940 }
23941 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
23942  Py_ssize_t ival;
23943  PyObject *x;
23944 #if PY_MAJOR_VERSION < 3
23945  if (likely(PyInt_CheckExact(b))) {
23946  if (sizeof(Py_ssize_t) >= sizeof(long))
23947  return PyInt_AS_LONG(b);
23948  else
23949  return PyInt_AsSsize_t(b);
23950  }
23951 #endif
23952  if (likely(PyLong_CheckExact(b))) {
23953  #if CYTHON_USE_PYLONG_INTERNALS
23954  const digit* digits = ((PyLongObject*)b)->ob_digit;
23955  const Py_ssize_t size = Py_SIZE(b);
23956  if (likely(__Pyx_sst_abs(size) <= 1)) {
23957  ival = likely(size) ? digits[0] : 0;
23958  if (size == -1) ival = -ival;
23959  return ival;
23960  } else {
23961  switch (size) {
23962  case 2:
23963  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23964  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23965  }
23966  break;
23967  case -2:
23968  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23969  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23970  }
23971  break;
23972  case 3:
23973  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23974  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23975  }
23976  break;
23977  case -3:
23978  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23979  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23980  }
23981  break;
23982  case 4:
23983  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23984  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]));
23985  }
23986  break;
23987  case -4:
23988  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23989  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]));
23990  }
23991  break;
23992  }
23993  }
23994  #endif
23995  return PyLong_AsSsize_t(b);
23996  }
23997  x = PyNumber_Index(b);
23998  if (!x) return -1;
23999  ival = PyInt_AsSsize_t(x);
24000  Py_DECREF(x);
24001  return ival;
24002 }
24003 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
24004  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
24005 }
24006 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24007  return PyInt_FromSize_t(ival);
24008 }
24009 
24010 
24011 #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