ITM AMNS: User Interface  \$Id: Doxyfile 502 2015-10-15 12:23:45Z dpc $
amns.c
Go to the documentation of this file.
1 /* Generated by Cython 0.25.2 */
2 
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6  #error Python headers needed to compile C extensions, please install development version of Python.
7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
8  #error Cython requires Python 2.6+ or Python 3.2+.
9 #else
10 #define CYTHON_ABI "0_25_2"
11 #include <stddef.h>
12 #ifndef offsetof
13  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
14 #endif
15 #if !defined(WIN32) && !defined(MS_WINDOWS)
16  #ifndef __stdcall
17  #define __stdcall
18  #endif
19  #ifndef __cdecl
20  #define __cdecl
21  #endif
22  #ifndef __fastcall
23  #define __fastcall
24  #endif
25 #endif
26 #ifndef DL_IMPORT
27  #define DL_IMPORT(t) t
28 #endif
29 #ifndef DL_EXPORT
30  #define DL_EXPORT(t) t
31 #endif
32 #ifndef HAVE_LONG_LONG
33  #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
34  #define HAVE_LONG_LONG
35  #endif
36 #endif
37 #ifndef PY_LONG_LONG
38  #define PY_LONG_LONG LONG_LONG
39 #endif
40 #ifndef Py_HUGE_VAL
41  #define Py_HUGE_VAL HUGE_VAL
42 #endif
43 #ifdef PYPY_VERSION
44  #define CYTHON_COMPILING_IN_PYPY 1
45  #define CYTHON_COMPILING_IN_PYSTON 0
46  #define CYTHON_COMPILING_IN_CPYTHON 0
47  #undef CYTHON_USE_TYPE_SLOTS
48  #define CYTHON_USE_TYPE_SLOTS 0
49  #undef CYTHON_USE_ASYNC_SLOTS
50  #define CYTHON_USE_ASYNC_SLOTS 0
51  #undef CYTHON_USE_PYLIST_INTERNALS
52  #define CYTHON_USE_PYLIST_INTERNALS 0
53  #undef CYTHON_USE_UNICODE_INTERNALS
54  #define CYTHON_USE_UNICODE_INTERNALS 0
55  #undef CYTHON_USE_UNICODE_WRITER
56  #define CYTHON_USE_UNICODE_WRITER 0
57  #undef CYTHON_USE_PYLONG_INTERNALS
58  #define CYTHON_USE_PYLONG_INTERNALS 0
59  #undef CYTHON_AVOID_BORROWED_REFS
60  #define CYTHON_AVOID_BORROWED_REFS 1
61  #undef CYTHON_ASSUME_SAFE_MACROS
62  #define CYTHON_ASSUME_SAFE_MACROS 0
63  #undef CYTHON_UNPACK_METHODS
64  #define CYTHON_UNPACK_METHODS 0
65  #undef CYTHON_FAST_THREAD_STATE
66  #define CYTHON_FAST_THREAD_STATE 0
67  #undef CYTHON_FAST_PYCALL
68  #define CYTHON_FAST_PYCALL 0
69 #elif defined(PYSTON_VERSION)
70  #define CYTHON_COMPILING_IN_PYPY 0
71  #define CYTHON_COMPILING_IN_PYSTON 1
72  #define CYTHON_COMPILING_IN_CPYTHON 0
73  #ifndef CYTHON_USE_TYPE_SLOTS
74  #define CYTHON_USE_TYPE_SLOTS 1
75  #endif
76  #undef CYTHON_USE_ASYNC_SLOTS
77  #define CYTHON_USE_ASYNC_SLOTS 0
78  #undef CYTHON_USE_PYLIST_INTERNALS
79  #define CYTHON_USE_PYLIST_INTERNALS 0
80  #ifndef CYTHON_USE_UNICODE_INTERNALS
81  #define CYTHON_USE_UNICODE_INTERNALS 1
82  #endif
83  #undef CYTHON_USE_UNICODE_WRITER
84  #define CYTHON_USE_UNICODE_WRITER 0
85  #undef CYTHON_USE_PYLONG_INTERNALS
86  #define CYTHON_USE_PYLONG_INTERNALS 0
87  #ifndef CYTHON_AVOID_BORROWED_REFS
88  #define CYTHON_AVOID_BORROWED_REFS 0
89  #endif
90  #ifndef CYTHON_ASSUME_SAFE_MACROS
91  #define CYTHON_ASSUME_SAFE_MACROS 1
92  #endif
93  #ifndef CYTHON_UNPACK_METHODS
94  #define CYTHON_UNPACK_METHODS 1
95  #endif
96  #undef CYTHON_FAST_THREAD_STATE
97  #define CYTHON_FAST_THREAD_STATE 0
98  #undef CYTHON_FAST_PYCALL
99  #define CYTHON_FAST_PYCALL 0
100 #else
101  #define CYTHON_COMPILING_IN_PYPY 0
102  #define CYTHON_COMPILING_IN_PYSTON 0
103  #define CYTHON_COMPILING_IN_CPYTHON 1
104  #ifndef CYTHON_USE_TYPE_SLOTS
105  #define CYTHON_USE_TYPE_SLOTS 1
106  #endif
107  #if PY_MAJOR_VERSION < 3
108  #undef CYTHON_USE_ASYNC_SLOTS
109  #define CYTHON_USE_ASYNC_SLOTS 0
110  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
111  #define CYTHON_USE_ASYNC_SLOTS 1
112  #endif
113  #if PY_VERSION_HEX < 0x02070000
114  #undef CYTHON_USE_PYLONG_INTERNALS
115  #define CYTHON_USE_PYLONG_INTERNALS 0
116  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
117  #define CYTHON_USE_PYLONG_INTERNALS 1
118  #endif
119  #ifndef CYTHON_USE_PYLIST_INTERNALS
120  #define CYTHON_USE_PYLIST_INTERNALS 1
121  #endif
122  #ifndef CYTHON_USE_UNICODE_INTERNALS
123  #define CYTHON_USE_UNICODE_INTERNALS 1
124  #endif
125  #if PY_VERSION_HEX < 0x030300F0
126  #undef CYTHON_USE_UNICODE_WRITER
127  #define CYTHON_USE_UNICODE_WRITER 0
128  #elif !defined(CYTHON_USE_UNICODE_WRITER)
129  #define CYTHON_USE_UNICODE_WRITER 1
130  #endif
131  #ifndef CYTHON_AVOID_BORROWED_REFS
132  #define CYTHON_AVOID_BORROWED_REFS 0
133  #endif
134  #ifndef CYTHON_ASSUME_SAFE_MACROS
135  #define CYTHON_ASSUME_SAFE_MACROS 1
136  #endif
137  #ifndef CYTHON_UNPACK_METHODS
138  #define CYTHON_UNPACK_METHODS 1
139  #endif
140  #ifndef CYTHON_FAST_THREAD_STATE
141  #define CYTHON_FAST_THREAD_STATE 1
142  #endif
143  #ifndef CYTHON_FAST_PYCALL
144  #define CYTHON_FAST_PYCALL 1
145  #endif
146 #endif
147 #if !defined(CYTHON_FAST_PYCCALL)
148 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
149 #endif
150 #if CYTHON_USE_PYLONG_INTERNALS
151  #include "longintrepr.h"
152  #undef SHIFT
153  #undef BASE
154  #undef MASK
155 #endif
156 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
157  #define Py_OptimizeFlag 0
158 #endif
159 #define __PYX_BUILD_PY_SSIZE_T "n"
160 #define CYTHON_FORMAT_SSIZE_T "z"
161 #if PY_MAJOR_VERSION < 3
162  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
163  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
164  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
165  #define __Pyx_DefaultClassType PyClass_Type
166 #else
167  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
168  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
169  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
170  #define __Pyx_DefaultClassType PyType_Type
171 #endif
172 #ifndef Py_TPFLAGS_CHECKTYPES
173  #define Py_TPFLAGS_CHECKTYPES 0
174 #endif
175 #ifndef Py_TPFLAGS_HAVE_INDEX
176  #define Py_TPFLAGS_HAVE_INDEX 0
177 #endif
178 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
179  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
180 #endif
181 #ifndef Py_TPFLAGS_HAVE_FINALIZE
182  #define Py_TPFLAGS_HAVE_FINALIZE 0
183 #endif
184 #ifndef METH_FASTCALL
185  #define METH_FASTCALL 0x80
186  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
187  Py_ssize_t nargs, PyObject *kwnames);
188 #else
189  #define __Pyx_PyCFunctionFast _PyCFunctionFast
190 #endif
191 #if CYTHON_FAST_PYCCALL
192 #define __Pyx_PyFastCFunction_Check(func)\
193  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
194 #else
195 #define __Pyx_PyFastCFunction_Check(func) 0
196 #endif
197 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
198  #define CYTHON_PEP393_ENABLED 1
199  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
200  0 : _PyUnicode_Ready((PyObject *)(op)))
201  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
202  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
203  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
204  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
205  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
206  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
207  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
208  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
209 #else
210  #define CYTHON_PEP393_ENABLED 0
211  #define PyUnicode_1BYTE_KIND 1
212  #define PyUnicode_2BYTE_KIND 2
213  #define PyUnicode_4BYTE_KIND 4
214  #define __Pyx_PyUnicode_READY(op) (0)
215  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
216  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
217  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
218  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
219  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
220  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
221  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
222  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
223 #endif
224 #if CYTHON_COMPILING_IN_PYPY
225  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
226  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
227 #else
228  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
229  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
230  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
231 #endif
232 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
233  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
234 #endif
235 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
236  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
237 #endif
238 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
239  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
240 #endif
241 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
242  #define PyObject_Malloc(s) PyMem_Malloc(s)
243  #define PyObject_Free(p) PyMem_Free(p)
244  #define PyObject_Realloc(p) PyMem_Realloc(p)
245 #endif
246 #if CYTHON_COMPILING_IN_PYSTON
247  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
248  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
249 #else
250  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
251  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
252 #endif
253 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
254 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
255 #if PY_MAJOR_VERSION >= 3
256  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
257 #else
258  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
259 #endif
260 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
261  #define PyObject_ASCII(o) PyObject_Repr(o)
262 #endif
263 #if PY_MAJOR_VERSION >= 3
264  #define PyBaseString_Type PyUnicode_Type
265  #define PyStringObject PyUnicodeObject
266  #define PyString_Type PyUnicode_Type
267  #define PyString_Check PyUnicode_Check
268  #define PyString_CheckExact PyUnicode_CheckExact
269 #endif
270 #if PY_MAJOR_VERSION >= 3
271  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
272  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
273 #else
274  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
275  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
276 #endif
277 #ifndef PySet_CheckExact
278  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
279 #endif
280 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
281 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
282 #if PY_MAJOR_VERSION >= 3
283  #define PyIntObject PyLongObject
284  #define PyInt_Type PyLong_Type
285  #define PyInt_Check(op) PyLong_Check(op)
286  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
287  #define PyInt_FromString PyLong_FromString
288  #define PyInt_FromUnicode PyLong_FromUnicode
289  #define PyInt_FromLong PyLong_FromLong
290  #define PyInt_FromSize_t PyLong_FromSize_t
291  #define PyInt_FromSsize_t PyLong_FromSsize_t
292  #define PyInt_AsLong PyLong_AsLong
293  #define PyInt_AS_LONG PyLong_AS_LONG
294  #define PyInt_AsSsize_t PyLong_AsSsize_t
295  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
296  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
297  #define PyNumber_Int PyNumber_Long
298 #endif
299 #if PY_MAJOR_VERSION >= 3
300  #define PyBoolObject PyLongObject
301 #endif
302 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
303  #ifndef PyUnicode_InternFromString
304  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
305  #endif
306 #endif
307 #if PY_VERSION_HEX < 0x030200A4
308  typedef long Py_hash_t;
309  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
310  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
311 #else
312  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
313  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
314 #endif
315 #if PY_MAJOR_VERSION >= 3
316  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
317 #else
318  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
319 #endif
320 #if CYTHON_USE_ASYNC_SLOTS
321  #if PY_VERSION_HEX >= 0x030500B1
322  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
323  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
324  #else
325  typedef struct {
326  unaryfunc am_await;
327  unaryfunc am_aiter;
328  unaryfunc am_anext;
329  } __Pyx_PyAsyncMethodsStruct;
330  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
331  #endif
332 #else
333  #define __Pyx_PyType_AsAsync(obj) NULL
334 #endif
335 #ifndef CYTHON_RESTRICT
336  #if defined(__GNUC__)
337  #define CYTHON_RESTRICT __restrict__
338  #elif defined(_MSC_VER) && _MSC_VER >= 1400
339  #define CYTHON_RESTRICT __restrict
340  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
341  #define CYTHON_RESTRICT restrict
342  #else
343  #define CYTHON_RESTRICT
344  #endif
345 #endif
346 #ifndef CYTHON_UNUSED
347 # if defined(__GNUC__)
348 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
349 # define CYTHON_UNUSED __attribute__ ((__unused__))
350 # else
351 # define CYTHON_UNUSED
352 # endif
353 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
354 # define CYTHON_UNUSED __attribute__ ((__unused__))
355 # else
356 # define CYTHON_UNUSED
357 # endif
358 #endif
359 #ifndef CYTHON_MAYBE_UNUSED_VAR
360 # if defined(__cplusplus)
361  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
362 # else
363 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
364 # endif
365 #endif
366 #ifndef CYTHON_NCP_UNUSED
367 # if CYTHON_COMPILING_IN_CPYTHON
368 # define CYTHON_NCP_UNUSED
369 # else
370 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
371 # endif
372 #endif
373 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
374 
375 #ifndef CYTHON_INLINE
376  #if defined(__clang__)
377  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
378  #elif defined(__GNUC__)
379  #define CYTHON_INLINE __inline__
380  #elif defined(_MSC_VER)
381  #define CYTHON_INLINE __inline
382  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
383  #define CYTHON_INLINE inline
384  #else
385  #define CYTHON_INLINE
386  #endif
387 #endif
388 
389 #if defined(WIN32) || defined(MS_WINDOWS)
390  #define _USE_MATH_DEFINES
391 #endif
392 #include <math.h>
393 #ifdef NAN
394 #define __PYX_NAN() ((float) NAN)
395 #else
396 static CYTHON_INLINE float __PYX_NAN() {
397  float value;
398  memset(&value, 0xFF, sizeof(value));
399  return value;
400 }
401 #endif
402 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
403 #define __Pyx_truncl trunc
404 #else
405 #define __Pyx_truncl truncl
406 #endif
407 
408 
409 #define __PYX_ERR(f_index, lineno, Ln_error) \
410 { \
411  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
412 }
413 
414 #if PY_MAJOR_VERSION >= 3
415  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
416  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
417 #else
418  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
419  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
420 #endif
421 
422 #ifndef __PYX_EXTERN_C
423  #ifdef __cplusplus
424  #define __PYX_EXTERN_C extern "C"
425  #else
426  #define __PYX_EXTERN_C extern
427  #endif
428 #endif
429 
430 #define __PYX_HAVE__amns
431 #define __PYX_HAVE_API__amns
432 #include "amns_interface.h"
433 #include <string.h>
434 #include <stdio.h>
435 #include <stdlib.h>
436 #include "numpy/arrayobject.h"
437 #include "numpy/ufuncobject.h"
438 #ifdef _OPENMP
439 #include <omp.h>
440 #endif /* _OPENMP */
441 
442 #ifdef PYREX_WITHOUT_ASSERTIONS
443 #define CYTHON_WITHOUT_ASSERTIONS
444 #endif
445 
446 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
447  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
448 
449 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
450 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
451 #define __PYX_DEFAULT_STRING_ENCODING ""
452 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
453 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
454 #define __Pyx_uchar_cast(c) ((unsigned char)c)
455 #define __Pyx_long_cast(x) ((long)x)
456 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
457  (sizeof(type) < sizeof(Py_ssize_t)) ||\
458  (sizeof(type) > sizeof(Py_ssize_t) &&\
459  likely(v < (type)PY_SSIZE_T_MAX ||\
460  v == (type)PY_SSIZE_T_MAX) &&\
461  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
462  v == (type)PY_SSIZE_T_MIN))) ||\
463  (sizeof(type) == sizeof(Py_ssize_t) &&\
464  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
465  v == (type)PY_SSIZE_T_MAX))) )
466 #if defined (__cplusplus) && __cplusplus >= 201103L
467  #include <cstdlib>
468  #define __Pyx_sst_abs(value) std::abs(value)
469 #elif SIZEOF_INT >= SIZEOF_SIZE_T
470  #define __Pyx_sst_abs(value) abs(value)
471 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
472  #define __Pyx_sst_abs(value) labs(value)
473 #elif defined (_MSC_VER) && defined (_M_X64)
474  #define __Pyx_sst_abs(value) _abs64(value)
475 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
476  #define __Pyx_sst_abs(value) llabs(value)
477 #elif defined (__GNUC__)
478  #define __Pyx_sst_abs(value) __builtin_llabs(value)
479 #else
480  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
481 #endif
482 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
483 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
484 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
485 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
486 #define __Pyx_PyBytes_FromString PyBytes_FromString
487 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
488 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
489 #if PY_MAJOR_VERSION < 3
490  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
491  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
492 #else
493  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
494  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
495 #endif
496 #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
497 #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
498 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
499 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
500 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
501 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
502 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
503 #if PY_MAJOR_VERSION < 3
504 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
505 {
506  const Py_UNICODE *u_end = u;
507  while (*u_end++) ;
508  return (size_t)(u_end - u - 1);
509 }
510 #else
511 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
512 #endif
513 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
514 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
515 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
516 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
517 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
518 #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
519 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
520 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
521 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
522 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
523 #if CYTHON_ASSUME_SAFE_MACROS
524 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
525 #else
526 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
527 #endif
528 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
529 #if PY_MAJOR_VERSION >= 3
530 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
531 #else
532 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
533 #endif
534 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
535 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
536 static int __Pyx_sys_getdefaultencoding_not_ascii;
537 static int __Pyx_init_sys_getdefaultencoding_params(void) {
538  PyObject* sys;
539  PyObject* default_encoding = NULL;
540  PyObject* ascii_chars_u = NULL;
541  PyObject* ascii_chars_b = NULL;
542  const char* default_encoding_c;
543  sys = PyImport_ImportModule("sys");
544  if (!sys) goto bad;
545  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
546  Py_DECREF(sys);
547  if (!default_encoding) goto bad;
548  default_encoding_c = PyBytes_AsString(default_encoding);
549  if (!default_encoding_c) goto bad;
550  if (strcmp(default_encoding_c, "ascii") == 0) {
551  __Pyx_sys_getdefaultencoding_not_ascii = 0;
552  } else {
553  char ascii_chars[128];
554  int c;
555  for (c = 0; c < 128; c++) {
556  ascii_chars[c] = c;
557  }
558  __Pyx_sys_getdefaultencoding_not_ascii = 1;
559  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
560  if (!ascii_chars_u) goto bad;
561  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
562  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
563  PyErr_Format(
564  PyExc_ValueError,
565  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
566  default_encoding_c);
567  goto bad;
568  }
569  Py_DECREF(ascii_chars_u);
570  Py_DECREF(ascii_chars_b);
571  }
572  Py_DECREF(default_encoding);
573  return 0;
574 bad:
575  Py_XDECREF(default_encoding);
576  Py_XDECREF(ascii_chars_u);
577  Py_XDECREF(ascii_chars_b);
578  return -1;
579 }
580 #endif
581 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
582 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
583 #else
584 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
585 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
586 static char* __PYX_DEFAULT_STRING_ENCODING;
587 static int __Pyx_init_sys_getdefaultencoding_params(void) {
588  PyObject* sys;
589  PyObject* default_encoding = NULL;
590  char* default_encoding_c;
591  sys = PyImport_ImportModule("sys");
592  if (!sys) goto bad;
593  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
594  Py_DECREF(sys);
595  if (!default_encoding) goto bad;
596  default_encoding_c = PyBytes_AsString(default_encoding);
597  if (!default_encoding_c) goto bad;
598  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
599  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
600  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
601  Py_DECREF(default_encoding);
602  return 0;
603 bad:
604  Py_XDECREF(default_encoding);
605  return -1;
606 }
607 #endif
608 #endif
609 
610 
611 /* Test for GCC > 2.95 */
612 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
613  #define likely(x) __builtin_expect(!!(x), 1)
614  #define unlikely(x) __builtin_expect(!!(x), 0)
615 #else /* !__GNUC__ or GCC < 2.95 */
616  #define likely(x) (x)
617  #define unlikely(x) (x)
618 #endif /* __GNUC__ */
619 
620 static PyObject *__pyx_m;
621 static PyObject *__pyx_d;
622 static PyObject *__pyx_b;
623 static PyObject *__pyx_empty_tuple;
624 static PyObject *__pyx_empty_bytes;
625 static PyObject *__pyx_empty_unicode;
626 static int __pyx_lineno;
627 static int __pyx_clineno = 0;
628 static const char * __pyx_cfilenm= __FILE__;
629 static const char *__pyx_filename;
630 
631 /* Header.proto */
632 #if !defined(CYTHON_CCOMPLEX)
633  #if defined(__cplusplus)
634  #define CYTHON_CCOMPLEX 1
635  #elif defined(_Complex_I)
636  #define CYTHON_CCOMPLEX 1
637  #else
638  #define CYTHON_CCOMPLEX 0
639  #endif
640 #endif
641 #if CYTHON_CCOMPLEX
642  #ifdef __cplusplus
643  #include <complex>
644  #else
645  #include <complex.h>
646  #endif
647 #endif
648 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
649  #undef _Complex_I
650  #define _Complex_I 1.0fj
651 #endif
652 
653 
654 static const char *__pyx_f[] = {
655  "amns.pyx",
656  "__init__.pxd",
657  "stringsource",
658  "type.pxd",
659 };
660 /* BufferFormatStructs.proto */
661 #define IS_UNSIGNED(type) (((type) -1) > 0)
662 struct __Pyx_StructField_;
663 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
664 typedef struct {
665  const char* name;
666  struct __Pyx_StructField_* fields;
667  size_t size;
668  size_t arraysize[8];
669  int ndim;
670  char typegroup;
671  char is_unsigned;
672  int flags;
673 } __Pyx_TypeInfo;
674 typedef struct __Pyx_StructField_ {
675  __Pyx_TypeInfo* type;
676  const char* name;
677  size_t offset;
678 } __Pyx_StructField;
679 typedef struct {
680  __Pyx_StructField* field;
681  size_t parent_offset;
682 } __Pyx_BufFmt_StackElem;
683 typedef struct {
684  __Pyx_StructField root;
685  __Pyx_BufFmt_StackElem* head;
686  size_t fmt_offset;
687  size_t new_count, enc_count;
688  size_t struct_alignment;
689  int is_complex;
690  char enc_type;
691  char new_packmode;
692  char enc_packmode;
693  char is_valid_array;
694 } __Pyx_BufFmt_Context;
695 
696 
697 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725
698  * # in Cython to enable them only on the right systems.
699  *
700  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
701  * ctypedef npy_int16 int16_t
702  * ctypedef npy_int32 int32_t
703  */
704 typedef npy_int8 __pyx_t_5numpy_int8_t;
705 
706 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726
707  *
708  * ctypedef npy_int8 int8_t
709  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
710  * ctypedef npy_int32 int32_t
711  * ctypedef npy_int64 int64_t
712  */
713 typedef npy_int16 __pyx_t_5numpy_int16_t;
714 
715 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":727
716  * ctypedef npy_int8 int8_t
717  * ctypedef npy_int16 int16_t
718  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
719  * ctypedef npy_int64 int64_t
720  * #ctypedef npy_int96 int96_t
721  */
722 typedef npy_int32 __pyx_t_5numpy_int32_t;
723 
724 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":728
725  * ctypedef npy_int16 int16_t
726  * ctypedef npy_int32 int32_t
727  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
728  * #ctypedef npy_int96 int96_t
729  * #ctypedef npy_int128 int128_t
730  */
731 typedef npy_int64 __pyx_t_5numpy_int64_t;
732 
733 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732
734  * #ctypedef npy_int128 int128_t
735  *
736  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
737  * ctypedef npy_uint16 uint16_t
738  * ctypedef npy_uint32 uint32_t
739  */
740 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
741 
742 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733
743  *
744  * ctypedef npy_uint8 uint8_t
745  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
746  * ctypedef npy_uint32 uint32_t
747  * ctypedef npy_uint64 uint64_t
748  */
749 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
750 
751 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":734
752  * ctypedef npy_uint8 uint8_t
753  * ctypedef npy_uint16 uint16_t
754  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
755  * ctypedef npy_uint64 uint64_t
756  * #ctypedef npy_uint96 uint96_t
757  */
758 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
759 
760 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":735
761  * ctypedef npy_uint16 uint16_t
762  * ctypedef npy_uint32 uint32_t
763  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
764  * #ctypedef npy_uint96 uint96_t
765  * #ctypedef npy_uint128 uint128_t
766  */
767 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
768 
769 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":739
770  * #ctypedef npy_uint128 uint128_t
771  *
772  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
773  * ctypedef npy_float64 float64_t
774  * #ctypedef npy_float80 float80_t
775  */
776 typedef npy_float32 __pyx_t_5numpy_float32_t;
777 
778 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":740
779  *
780  * ctypedef npy_float32 float32_t
781  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
782  * #ctypedef npy_float80 float80_t
783  * #ctypedef npy_float128 float128_t
784  */
785 typedef npy_float64 __pyx_t_5numpy_float64_t;
786 
787 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749
788  * # The int types are mapped a bit surprising --
789  * # numpy.int corresponds to 'l' and numpy.long to 'q'
790  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
791  * ctypedef npy_longlong long_t
792  * ctypedef npy_longlong longlong_t
793  */
794 typedef npy_long __pyx_t_5numpy_int_t;
795 
796 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":750
797  * # numpy.int corresponds to 'l' and numpy.long to 'q'
798  * ctypedef npy_long int_t
799  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
800  * ctypedef npy_longlong longlong_t
801  *
802  */
803 typedef npy_longlong __pyx_t_5numpy_long_t;
804 
805 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751
806  * ctypedef npy_long int_t
807  * ctypedef npy_longlong long_t
808  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
809  *
810  * ctypedef npy_ulong uint_t
811  */
812 typedef npy_longlong __pyx_t_5numpy_longlong_t;
813 
814 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753
815  * ctypedef npy_longlong longlong_t
816  *
817  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
818  * ctypedef npy_ulonglong ulong_t
819  * ctypedef npy_ulonglong ulonglong_t
820  */
821 typedef npy_ulong __pyx_t_5numpy_uint_t;
822 
823 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":754
824  *
825  * ctypedef npy_ulong uint_t
826  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
827  * ctypedef npy_ulonglong ulonglong_t
828  *
829  */
830 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
831 
832 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755
833  * ctypedef npy_ulong uint_t
834  * ctypedef npy_ulonglong ulong_t
835  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
836  *
837  * ctypedef npy_intp intp_t
838  */
839 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
840 
841 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":757
842  * ctypedef npy_ulonglong ulonglong_t
843  *
844  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
845  * ctypedef npy_uintp uintp_t
846  *
847  */
848 typedef npy_intp __pyx_t_5numpy_intp_t;
849 
850 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758
851  *
852  * ctypedef npy_intp intp_t
853  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
854  *
855  * ctypedef npy_double float_t
856  */
857 typedef npy_uintp __pyx_t_5numpy_uintp_t;
858 
859 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760
860  * ctypedef npy_uintp uintp_t
861  *
862  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
863  * ctypedef npy_double double_t
864  * ctypedef npy_longdouble longdouble_t
865  */
866 typedef npy_double __pyx_t_5numpy_float_t;
867 
868 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":761
869  *
870  * ctypedef npy_double float_t
871  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
872  * ctypedef npy_longdouble longdouble_t
873  *
874  */
875 typedef npy_double __pyx_t_5numpy_double_t;
876 
877 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762
878  * ctypedef npy_double float_t
879  * ctypedef npy_double double_t
880  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
881  *
882  * ctypedef npy_cfloat cfloat_t
883  */
884 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
885 /* Declarations.proto */
886 #if CYTHON_CCOMPLEX
887  #ifdef __cplusplus
888  typedef ::std::complex< float > __pyx_t_float_complex;
889  #else
890  typedef float _Complex __pyx_t_float_complex;
891  #endif
892 #else
893  typedef struct { float real, imag; } __pyx_t_float_complex;
894 #endif
895 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
896 
897 /* Declarations.proto */
898 #if CYTHON_CCOMPLEX
899  #ifdef __cplusplus
900  typedef ::std::complex< double > __pyx_t_double_complex;
901  #else
902  typedef double _Complex __pyx_t_double_complex;
903  #endif
904 #else
905  typedef struct { double real, imag; } __pyx_t_double_complex;
906 #endif
907 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
908 
909 
910 /*--- Type declarations ---*/
911 struct __pyx_obj_4amns_Amns;
912 struct __pyx_obj_4amns_Table;
913 struct __pyx_obj_4amns_Reactants;
914 
915 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764
916  * ctypedef npy_longdouble longdouble_t
917  *
918  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
919  * ctypedef npy_cdouble cdouble_t
920  * ctypedef npy_clongdouble clongdouble_t
921  */
922 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
923 
924 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":765
925  *
926  * ctypedef npy_cfloat cfloat_t
927  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
928  * ctypedef npy_clongdouble clongdouble_t
929  *
930  */
931 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
932 
933 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766
934  * ctypedef npy_cfloat cfloat_t
935  * ctypedef npy_cdouble cdouble_t
936  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
937  *
938  * ctypedef npy_cdouble complex_t
939  */
940 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
941 
942 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768
943  * ctypedef npy_clongdouble clongdouble_t
944  *
945  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
946  *
947  * cdef inline object PyArray_MultiIterNew1(a):
948  */
949 typedef npy_cdouble __pyx_t_5numpy_complex_t;
950 
951 /* "amns.pyx":11
952  * # http://stackoverflow.com/questions/8366095/have-pointer-to-data-need-numpy-array-in-fortran-order-want-to-use-cython
953  *
954  * cdef class Amns: # <<<<<<<<<<<<<<
955  * # """Class for interfacing to the AMNS library"""
956  *
957  */
958 struct __pyx_obj_4amns_Amns {
959  PyObject_HEAD
960  struct __pyx_vtabstruct_4amns_Amns *__pyx_vtab;
961  void *_handle;
962 };
963 
964 
965 /* "amns.pyx":92
966  *
967  *
968  * cdef class Table: # <<<<<<<<<<<<<<
969  * # """Class for interfacing to Tables in the the AMNS library"""
970  *
971  */
972 struct __pyx_obj_4amns_Table {
973  PyObject_HEAD
974  struct __pyx_vtabstruct_4amns_Table *__pyx_vtab;
975  void *_handle;
976  struct __pyx_obj_4amns_Amns *_parentAmns;
977 };
978 
979 
980 /* "amns.pyx":354
981  *
982  *
983  * cdef class Reactants: # <<<<<<<<<<<<<<
984  * # """Class providing the machanism for indicating reactants and products"""
985  * cdef void* _handle
986  */
987 struct __pyx_obj_4amns_Reactants {
988  PyObject_HEAD
989  struct __pyx_vtabstruct_4amns_Reactants *__pyx_vtab;
990  void *_handle;
991  PyObject *_reactants;
992 };
993 
994 
995 
996 /* "amns.pyx":11
997  * # http://stackoverflow.com/questions/8366095/have-pointer-to-data-need-numpy-array-in-fortran-order-want-to-use-cython
998  *
999  * cdef class Amns: # <<<<<<<<<<<<<<
1000  * # """Class for interfacing to the AMNS library"""
1001  *
1002  */
1003 
1004 struct __pyx_vtabstruct_4amns_Amns {
1005  void *(*handle)(struct __pyx_obj_4amns_Amns *);
1006  amns_c_answer_type (*lquery)(struct __pyx_obj_4amns_Amns *, PyObject *);
1007 };
1008 static struct __pyx_vtabstruct_4amns_Amns *__pyx_vtabptr_4amns_Amns;
1009 
1010 
1011 /* "amns.pyx":92
1012  *
1013  *
1014  * cdef class Table: # <<<<<<<<<<<<<<
1015  * # """Class for interfacing to Tables in the the AMNS library"""
1016  *
1017  */
1018 
1019 struct __pyx_vtabstruct_4amns_Table {
1020  amns_c_answer_type (*lquery)(struct __pyx_obj_4amns_Table *, PyObject *);
1021 };
1022 static struct __pyx_vtabstruct_4amns_Table *__pyx_vtabptr_4amns_Table;
1023 
1024 
1025 /* "amns.pyx":354
1026  *
1027  *
1028  * cdef class Reactants: # <<<<<<<<<<<<<<
1029  * # """Class providing the machanism for indicating reactants and products"""
1030  * cdef void* _handle
1031  */
1032 
1033 struct __pyx_vtabstruct_4amns_Reactants {
1034  void *(*handle)(struct __pyx_obj_4amns_Reactants *);
1035 };
1036 static struct __pyx_vtabstruct_4amns_Reactants *__pyx_vtabptr_4amns_Reactants;
1037 
1038 /* --- Runtime support code (head) --- */
1039 /* Refnanny.proto */
1040 #ifndef CYTHON_REFNANNY
1041  #define CYTHON_REFNANNY 0
1042 #endif
1043 #if CYTHON_REFNANNY
1044  typedef struct {
1045  void (*INCREF)(void*, PyObject*, int);
1046  void (*DECREF)(void*, PyObject*, int);
1047  void (*GOTREF)(void*, PyObject*, int);
1048  void (*GIVEREF)(void*, PyObject*, int);
1049  void* (*SetupContext)(const char*, int, const char*);
1050  void (*FinishContext)(void**);
1051  } __Pyx_RefNannyAPIStruct;
1052  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1053  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1054  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1055 #ifdef WITH_THREAD
1056  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1057  if (acquire_gil) {\
1058  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1059  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1060  PyGILState_Release(__pyx_gilstate_save);\
1061  } else {\
1062  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1063  }
1064 #else
1065  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1066  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1067 #endif
1068  #define __Pyx_RefNannyFinishContext()\
1069  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1070  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1071  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1072  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1073  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1074  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1075  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1076  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1077  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1078 #else
1079  #define __Pyx_RefNannyDeclarations
1080  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1081  #define __Pyx_RefNannyFinishContext()
1082  #define __Pyx_INCREF(r) Py_INCREF(r)
1083  #define __Pyx_DECREF(r) Py_DECREF(r)
1084  #define __Pyx_GOTREF(r)
1085  #define __Pyx_GIVEREF(r)
1086  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1087  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1088  #define __Pyx_XGOTREF(r)
1089  #define __Pyx_XGIVEREF(r)
1090 #endif
1091 #define __Pyx_XDECREF_SET(r, v) do {\
1092  PyObject *tmp = (PyObject *) r;\
1093  r = v; __Pyx_XDECREF(tmp);\
1094  } while (0)
1095 #define __Pyx_DECREF_SET(r, v) do {\
1096  PyObject *tmp = (PyObject *) r;\
1097  r = v; __Pyx_DECREF(tmp);\
1098  } while (0)
1099 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1100 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1101 
1102 /* PyObjectGetAttrStr.proto */
1103 #if CYTHON_USE_TYPE_SLOTS
1104 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
1105  PyTypeObject* tp = Py_TYPE(obj);
1106  if (likely(tp->tp_getattro))
1107  return tp->tp_getattro(obj, attr_name);
1108 #if PY_MAJOR_VERSION < 3
1109  if (likely(tp->tp_getattr))
1110  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
1111 #endif
1112  return PyObject_GetAttr(obj, attr_name);
1113 }
1114 #else
1115 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1116 #endif
1117 
1118 /* GetBuiltinName.proto */
1119 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1120 
1121 /* RaiseDoubleKeywords.proto */
1122 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1123 
1124 /* ParseKeywords.proto */
1125 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1126  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1127  const char* function_name);
1128 
1129 /* RaiseArgTupleInvalid.proto */
1130 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1131  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1132 
1133 /* PyObjectCall.proto */
1134 #if CYTHON_COMPILING_IN_CPYTHON
1135 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1136 #else
1137 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1138 #endif
1139 
1140 /* GetModuleGlobalName.proto */
1141 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1142 
1143 /* PyCFunctionFastCall.proto */
1144 #if CYTHON_FAST_PYCCALL
1145 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1146 #else
1147 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1148 #endif
1149 
1150 /* PyFunctionFastCall.proto */
1151 #if CYTHON_FAST_PYCALL
1152 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1153  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1154 #if 1 || PY_VERSION_HEX < 0x030600B1
1155 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1156 #else
1157 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1158 #endif
1159 #endif
1160 
1161 /* PyObjectCallMethO.proto */
1162 #if CYTHON_COMPILING_IN_CPYTHON
1163 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1164 #endif
1165 
1166 /* PyObjectCallOneArg.proto */
1167 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1168 
1169 /* PyThreadStateGet.proto */
1170 #if CYTHON_FAST_THREAD_STATE
1171 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1172 #define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
1173 #else
1174 #define __Pyx_PyThreadState_declare
1175 #define __Pyx_PyThreadState_assign
1176 #endif
1177 
1178 /* PyErrFetchRestore.proto */
1179 #if CYTHON_FAST_THREAD_STATE
1180 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1181 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1182 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1183 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1184 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1185 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1186 #else
1187 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1188 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1189 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1190 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1191 #endif
1192 
1193 /* RaiseException.proto */
1194 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1195 
1196 /* WriteUnraisableException.proto */
1197 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1198  int lineno, const char *filename,
1199  int full_traceback, int nogil);
1200 
1201 /* ArgTypeTest.proto */
1202 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
1203  const char *name, int exact);
1204 
1205 /* PyIntBinop.proto */
1206 #if !CYTHON_COMPILING_IN_PYPY
1207 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1208 #else
1209 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1210  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1211 #endif
1212 
1213 /* BufferFormatCheck.proto */
1214 static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
1215  __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
1216 static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
1217 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
1218 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
1219  __Pyx_BufFmt_StackElem* stack,
1220  __Pyx_TypeInfo* type); // PROTO
1221 
1222 /* ExtTypeTest.proto */
1223 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1224 
1225 /* BufferFallbackError.proto */
1226 static void __Pyx_RaiseBufferFallbackError(void);
1227 
1228 /* PyIntBinop.proto */
1229 #if !CYTHON_COMPILING_IN_PYPY
1230 static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1231 #else
1232 #define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
1233  PyObject_RichCompare(op1, op2, Py_EQ)
1234  #endif
1235 
1236 /* KeywordStringCheck.proto */
1237 static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1238 
1239 /* PyObjectCallNoArg.proto */
1240 #if CYTHON_COMPILING_IN_CPYTHON
1241 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1242 #else
1243 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1244 #endif
1245 
1246 /* ListAppend.proto */
1247 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1248 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1249  PyListObject* L = (PyListObject*) list;
1250  Py_ssize_t len = Py_SIZE(list);
1251  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1252  Py_INCREF(x);
1253  PyList_SET_ITEM(list, len, x);
1254  Py_SIZE(list) = len+1;
1255  return 0;
1256  }
1257  return PyList_Append(list, x);
1258 }
1259 #else
1260 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1261 #endif
1262 
1263 /* PyObjectCallMethod1.proto */
1264 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1265 
1266 /* append.proto */
1267 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
1268 
1269 /* DictGetItem.proto */
1270 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1271 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
1272  PyObject *value;
1273  value = PyDict_GetItemWithError(d, key);
1274  if (unlikely(!value)) {
1275  if (!PyErr_Occurred()) {
1276  PyObject* args = PyTuple_Pack(1, key);
1277  if (likely(args))
1278  PyErr_SetObject(PyExc_KeyError, args);
1279  Py_XDECREF(args);
1280  }
1281  return NULL;
1282  }
1283  Py_INCREF(value);
1284  return value;
1285 }
1286 #else
1287  #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1288 #endif
1289 
1290 /* RaiseTooManyValuesToUnpack.proto */
1291 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1292 
1293 /* RaiseNeedMoreValuesToUnpack.proto */
1294 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1295 
1296 /* RaiseNoneIterError.proto */
1297 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1298 
1299 /* SaveResetException.proto */
1300 #if CYTHON_FAST_THREAD_STATE
1301 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1302 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1303 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1304 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1305 #else
1306 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1307 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1308 #endif
1309 
1310 /* PyErrExceptionMatches.proto */
1311 #if CYTHON_FAST_THREAD_STATE
1312 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1313 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1314 #else
1315 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1316 #endif
1317 
1318 /* GetException.proto */
1319 #if CYTHON_FAST_THREAD_STATE
1320 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1321 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1322 #else
1323 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1324 #endif
1325 
1326 /* SetVTable.proto */
1327 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1328 
1329 /* Import.proto */
1330 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1331 
1332 /* CalculateMetaclass.proto */
1333 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
1334 
1335 /* Py3ClassCreate.proto */
1336 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
1337  PyObject *mkw, PyObject *modname, PyObject *doc);
1338 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
1339  PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
1340 
1341 /* CodeObjectCache.proto */
1342 typedef struct {
1343  PyCodeObject* code_object;
1344  int code_line;
1345 } __Pyx_CodeObjectCacheEntry;
1346 struct __Pyx_CodeObjectCache {
1347  int count;
1348  int max_count;
1349  __Pyx_CodeObjectCacheEntry* entries;
1350 };
1351 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1352 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1353 static PyCodeObject *__pyx_find_code_object(int code_line);
1354 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1355 
1356 /* AddTraceback.proto */
1357 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1358  int py_line, const char *filename);
1359 
1360 /* BufferStructDeclare.proto */
1361 typedef struct {
1362  Py_ssize_t shape, strides, suboffsets;
1363 } __Pyx_Buf_DimInfo;
1364 typedef struct {
1365  size_t refcount;
1366  Py_buffer pybuffer;
1367 } __Pyx_Buffer;
1368 typedef struct {
1369  __Pyx_Buffer *rcbuffer;
1370  char *data;
1371  __Pyx_Buf_DimInfo diminfo[8];
1372 } __Pyx_LocalBuf_ND;
1373 
1374 #if PY_MAJOR_VERSION < 3
1375  static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
1376  static void __Pyx_ReleaseBuffer(Py_buffer *view);
1377 #else
1378  #define __Pyx_GetBuffer PyObject_GetBuffer
1379  #define __Pyx_ReleaseBuffer PyBuffer_Release
1380 #endif
1381 
1382 
1383 /* None.proto */
1384 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
1385 static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1};
1386 
1387 /* CIntToPy.proto */
1388 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1389 
1390 static PyObject* __pyx_convert__to_py_amns_c_version_type(amns_c_version_type s);
1391 /* Print.proto */
1392 static int __Pyx_Print(PyObject*, PyObject *, int);
1393 #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
1394 static PyObject* __pyx_print = 0;
1395 static PyObject* __pyx_print_kwargs = 0;
1396 #endif
1397 
1398 static PyObject* __pyx_convert__to_py_amns_c_reactant_type(amns_c_reactant_type s);
1399 /* RealImag.proto */
1400 #if CYTHON_CCOMPLEX
1401  #ifdef __cplusplus
1402  #define __Pyx_CREAL(z) ((z).real())
1403  #define __Pyx_CIMAG(z) ((z).imag())
1404  #else
1405  #define __Pyx_CREAL(z) (__real__(z))
1406  #define __Pyx_CIMAG(z) (__imag__(z))
1407  #endif
1408 #else
1409  #define __Pyx_CREAL(z) ((z).real)
1410  #define __Pyx_CIMAG(z) ((z).imag)
1411 #endif
1412 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1413  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1414  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1415  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1416 #else
1417  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1418  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1419 #endif
1420 
1421 /* Arithmetic.proto */
1422 #if CYTHON_CCOMPLEX
1423  #define __Pyx_c_eq_float(a, b) ((a)==(b))
1424  #define __Pyx_c_sum_float(a, b) ((a)+(b))
1425  #define __Pyx_c_diff_float(a, b) ((a)-(b))
1426  #define __Pyx_c_prod_float(a, b) ((a)*(b))
1427  #define __Pyx_c_quot_float(a, b) ((a)/(b))
1428  #define __Pyx_c_neg_float(a) (-(a))
1429  #ifdef __cplusplus
1430  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1431  #define __Pyx_c_conj_float(z) (::std::conj(z))
1432  #if 1
1433  #define __Pyx_c_abs_float(z) (::std::abs(z))
1434  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1435  #endif
1436  #else
1437  #define __Pyx_c_is_zero_float(z) ((z)==0)
1438  #define __Pyx_c_conj_float(z) (conjf(z))
1439  #if 1
1440  #define __Pyx_c_abs_float(z) (cabsf(z))
1441  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
1442  #endif
1443  #endif
1444 #else
1445  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1446  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1447  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1448  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1449  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1450  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1451  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1452  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1453  #if 1
1454  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
1455  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1456  #endif
1457 #endif
1458 
1459 /* Arithmetic.proto */
1460 #if CYTHON_CCOMPLEX
1461  #define __Pyx_c_eq_double(a, b) ((a)==(b))
1462  #define __Pyx_c_sum_double(a, b) ((a)+(b))
1463  #define __Pyx_c_diff_double(a, b) ((a)-(b))
1464  #define __Pyx_c_prod_double(a, b) ((a)*(b))
1465  #define __Pyx_c_quot_double(a, b) ((a)/(b))
1466  #define __Pyx_c_neg_double(a) (-(a))
1467  #ifdef __cplusplus
1468  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1469  #define __Pyx_c_conj_double(z) (::std::conj(z))
1470  #if 1
1471  #define __Pyx_c_abs_double(z) (::std::abs(z))
1472  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1473  #endif
1474  #else
1475  #define __Pyx_c_is_zero_double(z) ((z)==0)
1476  #define __Pyx_c_conj_double(z) (conj(z))
1477  #if 1
1478  #define __Pyx_c_abs_double(z) (cabs(z))
1479  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
1480  #endif
1481  #endif
1482 #else
1483  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1484  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1485  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1486  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1487  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1488  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1489  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1490  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1491  #if 1
1492  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
1493  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1494  #endif
1495 #endif
1496 
1497 /* CIntToPy.proto */
1498 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
1499 
1500 /* PrintOne.proto */
1501 static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
1502 
1503 /* CIntFromPy.proto */
1504 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1505 
1506 /* CIntToPy.proto */
1507 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1508 
1509 /* CIntFromPy.proto */
1510 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1511 
1512 /* CheckBinaryVersion.proto */
1513 static int __Pyx_check_binary_version(void);
1514 
1515 /* PyIdentifierFromString.proto */
1516 #if !defined(__Pyx_PyIdentifier_FromString)
1517 #if PY_MAJOR_VERSION < 3
1518  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
1519 #else
1520  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
1521 #endif
1522 #endif
1523 
1524 /* ModuleImport.proto */
1525 static PyObject *__Pyx_ImportModule(const char *name);
1526 
1527 /* TypeImport.proto */
1528 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
1529 
1530 /* InitStrings.proto */
1531 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1532 
1533 static void *__pyx_f_4amns_4Amns_handle(struct __pyx_obj_4amns_Amns *__pyx_v_self); /* proto*/
1534 static amns_c_answer_type __pyx_f_4amns_4Amns_lquery(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_queryString); /* proto*/
1535 static amns_c_answer_type __pyx_f_4amns_5Table_lquery(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_queryString); /* proto*/
1536 static void *__pyx_f_4amns_9Reactants_handle(struct __pyx_obj_4amns_Reactants *__pyx_v_self); /* proto*/
1537 
1538 /* Module declarations from 'libcpp' */
1539 
1540 /* Module declarations from 'camns_interface' */
1541 
1542 /* Module declarations from 'cpython.buffer' */
1543 
1544 /* Module declarations from 'libc.string' */
1545 
1546 /* Module declarations from 'libc.stdio' */
1547 
1548 /* Module declarations from '__builtin__' */
1549 
1550 /* Module declarations from 'cpython.type' */
1551 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1552 
1553 /* Module declarations from 'cpython' */
1554 
1555 /* Module declarations from 'cpython.object' */
1556 
1557 /* Module declarations from 'cpython.ref' */
1558 
1559 /* Module declarations from 'libc.stdlib' */
1560 
1561 /* Module declarations from 'numpy' */
1562 
1563 /* Module declarations from 'numpy' */
1564 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1565 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1566 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1567 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1568 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1569 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
1570 
1571 /* Module declarations from 'amns' */
1572 static PyTypeObject *__pyx_ptype_4amns_Amns = 0;
1573 static PyTypeObject *__pyx_ptype_4amns_Table = 0;
1574 static PyTypeObject *__pyx_ptype_4amns_Reactants = 0;
1575 static amns_c_reactant_type __pyx_convert__from_py_amns_c_reactant_type(PyObject *); /*proto*/
1576 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_double_t = { "double_t", NULL, sizeof(__pyx_t_5numpy_double_t), { 0 }, 0, 'R', 0, 0 };
1577 #define __Pyx_MODULE_NAME "amns"
1578 int __pyx_module_is_main_amns = 0;
1579 
1580 /* Implementation of 'amns' */
1581 static PyObject *__pyx_builtin_enumerate;
1582 static PyObject *__pyx_builtin_ValueError;
1583 static PyObject *__pyx_builtin_range;
1584 static PyObject *__pyx_builtin_RuntimeError;
1585 static PyObject *__pyx_builtin_ImportError;
1586 static PyObject *__pyx_builtin_TypeError;
1587 static PyObject *__pyx_builtin_KeyError;
1588 static const char __pyx_k_F[] = "F";
1589 static const char __pyx_k_LR[] = "LR";
1590 static const char __pyx_k_MI[] = "MI";
1591 static const char __pyx_k_ZA[] = "ZA";
1592 static const char __pyx_k_ZN[] = "ZN";
1593 static const char __pyx_k__2[] = ")";
1594 static const char __pyx_k_lr[] = "lr";
1595 static const char __pyx_k_mi[] = "mi";
1596 static const char __pyx_k_np[] = "np";
1597 static const char __pyx_k_p1[] = "p1";
1598 static const char __pyx_k_p2[] = "p2";
1599 static const char __pyx_k_p3[] = "p3";
1600 static const char __pyx_k_za[] = "za";
1601 static const char __pyx_k_zn[] = "zn";
1602 static const char __pyx_k_doc[] = "__doc__";
1603 static const char __pyx_k_end[] = "end";
1604 static const char __pyx_k_set[] = "set";
1605 static const char __pyx_k_amns[] = "amns";
1606 static const char __pyx_k_file[] = "file";
1607 static const char __pyx_k_main[] = "__main__";
1608 static const char __pyx_k_ndim[] = "ndim";
1609 static const char __pyx_k_test[] = "__test__";
1610 static const char __pyx_k_user[] = "user";
1611 static const char __pyx_k_numpy[] = "numpy";
1612 static const char __pyx_k_order[] = "order";
1613 static const char __pyx_k_print[] = "print";
1614 static const char __pyx_k_range[] = "range";
1615 static const char __pyx_k_setup[] = "_setup";
1616 static const char __pyx_k_shape[] = "shape";
1617 static const char __pyx_k_append[] = "append";
1618 static const char __pyx_k_filled[] = "filled";
1619 static const char __pyx_k_import[] = "__import__";
1620 static const char __pyx_k_module[] = "__module__";
1621 static const char __pyx_k_nowarn[] = "nowarn";
1622 static const char __pyx_k_number[] = "number";
1623 static const char __pyx_k_source[] = "source";
1624 static const char __pyx_k_string[] = "string";
1625 static const char __pyx_k_backend[] = "backend";
1626 static const char __pyx_k_data_1d[] = "_data_1d";
1627 static const char __pyx_k_data_2d[] = "_data_2d";
1628 static const char __pyx_k_data_3d[] = "_data_3d";
1629 static const char __pyx_k_prepare[] = "__prepare__";
1630 static const char __pyx_k_version[] = "version";
1631 static const char __pyx_k_KeyError[] = "KeyError";
1632 static const char __pyx_k_qualname[] = "__qualname__";
1633 static const char __pyx_k_TypeError[] = "TypeError";
1634 static const char __pyx_k_enumerate[] = "enumerate";
1635 static const char __pyx_k_metaclass[] = "__metaclass__";
1636 static const char __pyx_k_reactants[] = "reactants";
1637 static const char __pyx_k_ValueError[] = "ValueError";
1638 static const char __pyx_k_empty_like[] = "empty_like";
1639 static const char __pyx_k_interp_fun[] = "interp_fun";
1640 static const char __pyx_k_parentAmns[] = "parentAmns";
1641 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1642 static const char __pyx_k_ImportError[] = "ImportError";
1643 static const char __pyx_k_result_unit[] = "result_unit";
1644 static const char __pyx_k_state_label[] = "state_label";
1645 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1646 static const char __pyx_k_result_label[] = "result_label";
1647 static const char __pyx_k_version_user[] = "version_user";
1648 static const char __pyx_k_AmnsException[] = "AmnsException";
1649 static const char __pyx_k_int_specifier[] = "int_specifier";
1650 static const char __pyx_k_reaction_type[] = "reaction_type";
1651 static const char __pyx_k_reactionString[] = "reactionString";
1652 static const char __pyx_k_real_specifier[] = "real_specifier";
1653 static const char __pyx_k_version_number[] = "version_number";
1654 static const char __pyx_k_version_string[] = "version_string";
1655 static const char __pyx_k_no_of_reactants[] = "no_of_reactants";
1656 static const char __pyx_k_version_backend[] = "version_backend";
1657 static const char __pyx_k_isotope_resolved[] = "isotope_resolved";
1658 static const char __pyx_k_invalidate_handle[] = "_invalidate_handle";
1659 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
1660 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
1661 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
1662 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
1663 static const char __pyx_k_No_value_specified_for_struct_at[] = "No value specified for struct attribute 'ZN'";
1664 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
1665 static const char __pyx_k_Number_of_parameters_does_not_ma[] = "Number of parameters does not match table dimensions (ndim=";
1666 static const char __pyx_k_Shape_of_parameter_2_inconsisten[] = "Shape of parameter 2 inconsistent to shape of parameter 1";
1667 static const char __pyx_k_Shape_of_parameter_3_inconsisten[] = "Shape of parameter 3 inconsistent to shape of parameter 1";
1668 static const char __pyx_k_Unsupported_rank_of_input_argume[] = "Unsupported rank of input arguments: %s";
1669 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
1670 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
1671 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
1672 static const char __pyx_k_No_value_specified_for_struct_at_2[] = "No value specified for struct attribute 'ZA'";
1673 static const char __pyx_k_No_value_specified_for_struct_at_3[] = "No value specified for struct attribute 'MI'";
1674 static const char __pyx_k_No_value_specified_for_struct_at_4[] = "No value specified for struct attribute 'LR'";
1675 static const char __pyx_k_No_value_specified_for_struct_at_5[] = "No value specified for struct attribute 'real_specifier'";
1676 static const char __pyx_k_No_value_specified_for_struct_at_6[] = "No value specified for struct attribute 'int_specifier'";
1677 static PyObject *__pyx_n_s_AmnsException;
1678 static PyObject *__pyx_n_s_F;
1679 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
1680 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
1681 static PyObject *__pyx_n_s_ImportError;
1682 static PyObject *__pyx_n_s_KeyError;
1683 static PyObject *__pyx_n_s_LR;
1684 static PyObject *__pyx_n_s_MI;
1685 static PyObject *__pyx_kp_s_No_value_specified_for_struct_at;
1686 static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_2;
1687 static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_3;
1688 static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_4;
1689 static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_5;
1690 static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_6;
1691 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
1692 static PyObject *__pyx_kp_s_Number_of_parameters_does_not_ma;
1693 static PyObject *__pyx_n_s_RuntimeError;
1694 static PyObject *__pyx_kp_s_Shape_of_parameter_2_inconsisten;
1695 static PyObject *__pyx_kp_s_Shape_of_parameter_3_inconsisten;
1696 static PyObject *__pyx_n_s_TypeError;
1697 static PyObject *__pyx_kp_s_Unsupported_rank_of_input_argume;
1698 static PyObject *__pyx_n_s_ValueError;
1699 static PyObject *__pyx_n_s_ZA;
1700 static PyObject *__pyx_n_s_ZN;
1701 static PyObject *__pyx_kp_s__2;
1702 static PyObject *__pyx_n_s_amns;
1703 static PyObject *__pyx_n_s_append;
1704 static PyObject *__pyx_n_s_backend;
1705 static PyObject *__pyx_n_s_data_1d;
1706 static PyObject *__pyx_n_s_data_2d;
1707 static PyObject *__pyx_n_s_data_3d;
1708 static PyObject *__pyx_n_s_doc;
1709 static PyObject *__pyx_n_s_empty_like;
1710 static PyObject *__pyx_n_s_end;
1711 static PyObject *__pyx_n_s_enumerate;
1712 static PyObject *__pyx_n_s_file;
1713 static PyObject *__pyx_n_s_filled;
1714 static PyObject *__pyx_n_s_import;
1715 static PyObject *__pyx_n_s_int_specifier;
1716 static PyObject *__pyx_n_s_interp_fun;
1717 static PyObject *__pyx_n_s_invalidate_handle;
1718 static PyObject *__pyx_n_s_isotope_resolved;
1719 static PyObject *__pyx_n_s_lr;
1720 static PyObject *__pyx_n_s_main;
1721 static PyObject *__pyx_n_s_metaclass;
1722 static PyObject *__pyx_n_s_mi;
1723 static PyObject *__pyx_n_s_module;
1724 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
1725 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
1726 static PyObject *__pyx_n_s_ndim;
1727 static PyObject *__pyx_n_s_no_of_reactants;
1728 static PyObject *__pyx_n_s_nowarn;
1729 static PyObject *__pyx_n_s_np;
1730 static PyObject *__pyx_n_s_number;
1731 static PyObject *__pyx_n_s_numpy;
1732 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
1733 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
1734 static PyObject *__pyx_n_s_order;
1735 static PyObject *__pyx_n_s_p1;
1736 static PyObject *__pyx_n_s_p2;
1737 static PyObject *__pyx_n_s_p3;
1738 static PyObject *__pyx_n_s_parentAmns;
1739 static PyObject *__pyx_n_s_prepare;
1740 static PyObject *__pyx_n_s_print;
1741 static PyObject *__pyx_n_s_pyx_vtable;
1742 static PyObject *__pyx_n_s_qualname;
1743 static PyObject *__pyx_n_s_range;
1744 static PyObject *__pyx_n_s_reactants;
1745 static PyObject *__pyx_n_s_reactionString;
1746 static PyObject *__pyx_n_s_reaction_type;
1747 static PyObject *__pyx_n_s_real_specifier;
1748 static PyObject *__pyx_n_s_result_label;
1749 static PyObject *__pyx_n_s_result_unit;
1750 static PyObject *__pyx_n_s_set;
1751 static PyObject *__pyx_n_s_setup;
1752 static PyObject *__pyx_n_s_shape;
1753 static PyObject *__pyx_n_s_source;
1754 static PyObject *__pyx_n_s_state_label;
1755 static PyObject *__pyx_n_s_string;
1756 static PyObject *__pyx_n_s_test;
1757 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
1758 static PyObject *__pyx_n_s_user;
1759 static PyObject *__pyx_n_s_version;
1760 static PyObject *__pyx_n_s_version_backend;
1761 static PyObject *__pyx_n_s_version_number;
1762 static PyObject *__pyx_n_s_version_string;
1763 static PyObject *__pyx_n_s_version_user;
1764 static PyObject *__pyx_n_s_za;
1765 static PyObject *__pyx_n_s_zn;
1766 static int __pyx_pf_4amns_4Amns___init__(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_version_string, PyObject *__pyx_v_version_number, PyObject *__pyx_v_version_backend, PyObject *__pyx_v_version_user); /* proto */
1767 static PyObject *__pyx_pf_4amns_4Amns_2_setup(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_version_string, PyObject *__pyx_v_version_number, PyObject *__pyx_v_version_backend, PyObject *__pyx_v_version_user); /* proto */
1768 static PyObject *__pyx_pf_4amns_4Amns_4query(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_queryString); /* proto */
1769 static PyObject *__pyx_pf_4amns_4Amns_7version___get__(struct __pyx_obj_4amns_Amns *__pyx_v_self); /* proto */
1770 static PyObject *__pyx_pf_4amns_4Amns_6set(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_setString); /* proto */
1771 static PyObject *__pyx_pf_4amns_4Amns_8finalize(struct __pyx_obj_4amns_Amns *__pyx_v_self); /* proto */
1772 static PyObject *__pyx_pf_4amns_4Amns_10get_table(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_reactionString, struct __pyx_obj_4amns_Reactants *__pyx_v_reactants, PyObject *__pyx_v_isotope_resolved); /* proto */
1773 static int __pyx_pf_4amns_5Table___init__(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_reactionString, struct __pyx_obj_4amns_Reactants *__pyx_v_reactants, struct __pyx_obj_4amns_Amns *__pyx_v_parentAmns, PyObject *__pyx_v_isotope_resolved); /* proto */
1774 static PyObject *__pyx_pf_4amns_5Table_2query(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_queryString); /* proto */
1775 static PyObject *__pyx_pf_4amns_5Table_4set(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_setString); /* proto */
1776 static PyObject *__pyx_pf_4amns_5Table_6finalize(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1777 static PyObject *__pyx_pf_4amns_5Table_15no_of_reactants___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1778 static PyObject *__pyx_pf_4amns_5Table_4ndim___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1779 static PyObject *__pyx_pf_4amns_5Table_6source___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1780 static PyObject *__pyx_pf_4amns_5Table_6filled___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1781 static PyObject *__pyx_pf_4amns_5Table_13reaction_type___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1782 static PyObject *__pyx_pf_4amns_5Table_9reactants___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1783 static PyObject *__pyx_pf_4amns_5Table_7version___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1784 static PyObject *__pyx_pf_4amns_5Table_11state_label___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1785 static PyObject *__pyx_pf_4amns_5Table_11result_unit___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1786 static PyObject *__pyx_pf_4amns_5Table_12result_label___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1787 static PyObject *__pyx_pf_4amns_5Table_10interp_fun___get__(struct __pyx_obj_4amns_Table *__pyx_v_self); /* proto */
1788 static PyObject *__pyx_pf_4amns_5Table_8data(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_p1, PyObject *__pyx_v_p2, PyObject *__pyx_v_p3); /* proto */
1789 static PyObject *__pyx_pf_4amns_5Table_10_data_1d(struct __pyx_obj_4amns_Table *__pyx_v_self, PyArrayObject *__pyx_v_p1, PyArrayObject *__pyx_v_p2, PyArrayObject *__pyx_v_p3); /* proto */
1790 static PyObject *__pyx_pf_4amns_5Table_12_data_2d(struct __pyx_obj_4amns_Table *__pyx_v_self, PyArrayObject *__pyx_v_p1, PyArrayObject *__pyx_v_p2, PyArrayObject *__pyx_v_p3); /* proto */
1791 static PyObject *__pyx_pf_4amns_5Table_14_data_3d(struct __pyx_obj_4amns_Table *__pyx_v_self, PyArrayObject *__pyx_v_p1, PyArrayObject *__pyx_v_p2, PyArrayObject *__pyx_v_p3); /* proto */
1792 static int __pyx_pf_4amns_9Reactants___cinit__(CYTHON_UNUSED struct __pyx_obj_4amns_Reactants *__pyx_v_self); /* proto */
1793 static int __pyx_pf_4amns_9Reactants_2__init__(struct __pyx_obj_4amns_Reactants *__pyx_v_self); /* proto */
1794 static PyObject *__pyx_pf_4amns_9Reactants_4_invalidate_handle(struct __pyx_obj_4amns_Reactants *__pyx_v_self); /* proto */
1795 static PyObject *__pyx_pf_4amns_9Reactants_6add(struct __pyx_obj_4amns_Reactants *__pyx_v_self, PyObject *__pyx_v_zn, PyObject *__pyx_v_za, PyObject *__pyx_v_mi, PyObject *__pyx_v_lr, PyObject *__pyx_v_real_specifier, PyObject *__pyx_v_int_specifier); /* proto */
1796 static Py_ssize_t __pyx_pf_4amns_9Reactants_8__len__(struct __pyx_obj_4amns_Reactants *__pyx_v_self); /* proto */
1797 static PyObject *__pyx_pf_4amns_9Reactants_10__str__(struct __pyx_obj_4amns_Reactants *__pyx_v_self); /* proto */
1798 static PyObject *__pyx_pf_4amns_9Reactants_12test(struct __pyx_obj_4amns_Reactants *__pyx_v_self); /* proto */
1799 static PyObject *__pyx_pf_4amns_9Reactants_14value(struct __pyx_obj_4amns_Reactants *__pyx_v_self); /* proto */
1800 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
1801 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
1802 static PyObject *__pyx_tp_new_4amns_Amns(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1803 static PyObject *__pyx_tp_new_4amns_Table(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1804 static PyObject *__pyx_tp_new_4amns_Reactants(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1805 static PyObject *__pyx_int_0;
1806 static PyObject *__pyx_int_1;
1807 static PyObject *__pyx_int_2;
1808 static PyObject *__pyx_int_3;
1809 static PyObject *__pyx_tuple_;
1810 static PyObject *__pyx_tuple__3;
1811 static PyObject *__pyx_tuple__4;
1812 static PyObject *__pyx_tuple__5;
1813 static PyObject *__pyx_tuple__6;
1814 static PyObject *__pyx_tuple__7;
1815 static PyObject *__pyx_tuple__8;
1816 static PyObject *__pyx_tuple__9;
1817 static PyObject *__pyx_tuple__10;
1818 static PyObject *__pyx_tuple__11;
1819 static PyObject *__pyx_tuple__12;
1820 static PyObject *__pyx_tuple__13;
1821 static PyObject *__pyx_tuple__14;
1822 static PyObject *__pyx_tuple__15;
1823 static PyObject *__pyx_tuple__16;
1824 static PyObject *__pyx_tuple__17;
1825 static PyObject *__pyx_tuple__18;
1826 static PyObject *__pyx_tuple__19;
1827 
1828 /* "amns.pyx":17
1829  * # """AMNS handle (opaque)"""
1830  *
1831  * def __init__(self, version_string=None, version_number=None, version_backend=None, version_user=None): # <<<<<<<<<<<<<<
1832  * """Use to initialize the Amns class"""
1833  * self._handle = NULL
1834  */
1835 
1836 /* Python wrapper */
1837 static int __pyx_pw_4amns_4Amns_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1838 static char __pyx_doc_4amns_4Amns___init__[] = "Use to initialize the Amns class";
1839 #if CYTHON_COMPILING_IN_CPYTHON
1840 struct wrapperbase __pyx_wrapperbase_4amns_4Amns___init__;
1841 #endif
1842 static int __pyx_pw_4amns_4Amns_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1843  PyObject *__pyx_v_version_string = 0;
1844  PyObject *__pyx_v_version_number = 0;
1845  PyObject *__pyx_v_version_backend = 0;
1846  PyObject *__pyx_v_version_user = 0;
1847  int __pyx_r;
1848  __Pyx_RefNannyDeclarations
1849  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
1850  {
1851  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_version_string,&__pyx_n_s_version_number,&__pyx_n_s_version_backend,&__pyx_n_s_version_user,0};
1852  PyObject* values[4] = {0,0,0,0};
1853  values[0] = ((PyObject *)Py_None);
1854  values[1] = ((PyObject *)Py_None);
1855  values[2] = ((PyObject *)Py_None);
1856  values[3] = ((PyObject *)Py_None);
1857  if (unlikely(__pyx_kwds)) {
1858  Py_ssize_t kw_args;
1859  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1860  switch (pos_args) {
1861  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1862  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1863  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1864  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1865  case 0: break;
1866  default: goto __pyx_L5_argtuple_error;
1867  }
1868  kw_args = PyDict_Size(__pyx_kwds);
1869  switch (pos_args) {
1870  case 0:
1871  if (kw_args > 0) {
1872  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_version_string);
1873  if (value) { values[0] = value; kw_args--; }
1874  }
1875  case 1:
1876  if (kw_args > 0) {
1877  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_version_number);
1878  if (value) { values[1] = value; kw_args--; }
1879  }
1880  case 2:
1881  if (kw_args > 0) {
1882  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_version_backend);
1883  if (value) { values[2] = value; kw_args--; }
1884  }
1885  case 3:
1886  if (kw_args > 0) {
1887  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_version_user);
1888  if (value) { values[3] = value; kw_args--; }
1889  }
1890  }
1891  if (unlikely(kw_args > 0)) {
1892  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 17, __pyx_L3_error)
1893  }
1894  } else {
1895  switch (PyTuple_GET_SIZE(__pyx_args)) {
1896  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1897  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1898  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1899  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1900  case 0: break;
1901  default: goto __pyx_L5_argtuple_error;
1902  }
1903  }
1904  __pyx_v_version_string = values[0];
1905  __pyx_v_version_number = values[1];
1906  __pyx_v_version_backend = values[2];
1907  __pyx_v_version_user = values[3];
1908  }
1909  goto __pyx_L4_argument_unpacking_done;
1910  __pyx_L5_argtuple_error:;
1911  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17, __pyx_L3_error)
1912  __pyx_L3_error:;
1913  __Pyx_AddTraceback("amns.Amns.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
1914  __Pyx_RefNannyFinishContext();
1915  return -1;
1916  __pyx_L4_argument_unpacking_done:;
1917  __pyx_r = __pyx_pf_4amns_4Amns___init__(((struct __pyx_obj_4amns_Amns *)__pyx_v_self), __pyx_v_version_string, __pyx_v_version_number, __pyx_v_version_backend, __pyx_v_version_user);
1918 
1919  /* function exit code */
1920  __Pyx_RefNannyFinishContext();
1921  return __pyx_r;
1922 }
1923 
1924 static int __pyx_pf_4amns_4Amns___init__(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_version_string, PyObject *__pyx_v_version_number, PyObject *__pyx_v_version_backend, PyObject *__pyx_v_version_user) {
1925  int __pyx_r;
1926  __Pyx_RefNannyDeclarations
1927  PyObject *__pyx_t_1 = NULL;
1928  PyObject *__pyx_t_2 = NULL;
1929  PyObject *__pyx_t_3 = NULL;
1930  __Pyx_RefNannySetupContext("__init__", 0);
1931 
1932  /* "amns.pyx":19
1933  * def __init__(self, version_string=None, version_number=None, version_backend=None, version_user=None):
1934  * """Use to initialize the Amns class"""
1935  * self._handle = NULL # <<<<<<<<<<<<<<
1936  * self._setup(version_string=version_string, version_number=version_number, version_backend=version_backend, version_user=version_user)
1937  *
1938  */
1939  __pyx_v_self->_handle = NULL;
1940 
1941  /* "amns.pyx":20
1942  * """Use to initialize the Amns class"""
1943  * self._handle = NULL
1944  * self._setup(version_string=version_string, version_number=version_number, version_backend=version_backend, version_user=version_user) # <<<<<<<<<<<<<<
1945  *
1946  * cdef void* handle(self):
1947  */
1948  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
1949  __Pyx_GOTREF(__pyx_t_1);
1950  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
1951  __Pyx_GOTREF(__pyx_t_2);
1952  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_version_string, __pyx_v_version_string) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
1953  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_version_number, __pyx_v_version_number) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
1954  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_version_backend, __pyx_v_version_backend) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
1955  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_version_user, __pyx_v_version_user) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
1956  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
1957  __Pyx_GOTREF(__pyx_t_3);
1958  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1959  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1960  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1961 
1962  /* "amns.pyx":17
1963  * # """AMNS handle (opaque)"""
1964  *
1965  * def __init__(self, version_string=None, version_number=None, version_backend=None, version_user=None): # <<<<<<<<<<<<<<
1966  * """Use to initialize the Amns class"""
1967  * self._handle = NULL
1968  */
1969 
1970  /* function exit code */
1971  __pyx_r = 0;
1972  goto __pyx_L0;
1973  __pyx_L1_error:;
1974  __Pyx_XDECREF(__pyx_t_1);
1975  __Pyx_XDECREF(__pyx_t_2);
1976  __Pyx_XDECREF(__pyx_t_3);
1977  __Pyx_AddTraceback("amns.Amns.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
1978  __pyx_r = -1;
1979  __pyx_L0:;
1980  __Pyx_RefNannyFinishContext();
1981  return __pyx_r;
1982 }
1983 
1984 /* "amns.pyx":22
1985  * self._setup(version_string=version_string, version_number=version_number, version_backend=version_backend, version_user=version_user)
1986  *
1987  * cdef void* handle(self): # <<<<<<<<<<<<<<
1988  * return self._handle
1989  *
1990  */
1991 
1992 static void *__pyx_f_4amns_4Amns_handle(struct __pyx_obj_4amns_Amns *__pyx_v_self) {
1993  void *__pyx_r;
1994  __Pyx_RefNannyDeclarations
1995  __Pyx_RefNannySetupContext("handle", 0);
1996 
1997  /* "amns.pyx":23
1998  *
1999  * cdef void* handle(self):
2000  * return self._handle # <<<<<<<<<<<<<<
2001  *
2002  * def _setup(self, version_string=None, version_number=None, version_backend=None, version_user=None):
2003  */
2004  __pyx_r = __pyx_v_self->_handle;
2005  goto __pyx_L0;
2006 
2007  /* "amns.pyx":22
2008  * self._setup(version_string=version_string, version_number=version_number, version_backend=version_backend, version_user=version_user)
2009  *
2010  * cdef void* handle(self): # <<<<<<<<<<<<<<
2011  * return self._handle
2012  *
2013  */
2014 
2015  /* function exit code */
2016  __pyx_L0:;
2017  __Pyx_RefNannyFinishContext();
2018  return __pyx_r;
2019 }
2020 
2021 /* "amns.pyx":25
2022  * return self._handle
2023  *
2024  * def _setup(self, version_string=None, version_number=None, version_backend=None, version_user=None): # <<<<<<<<<<<<<<
2025  * """Perform the actual call to the C interface to the original primary Fortran SETUP routine"""
2026  * cdef camns_interface.amns_c_error_type error_status
2027  */
2028 
2029 /* Python wrapper */
2030 static PyObject *__pyx_pw_4amns_4Amns_3_setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2031 static char __pyx_doc_4amns_4Amns_2_setup[] = "Perform the actual call to the C interface to the original primary Fortran SETUP routine";
2032 static PyObject *__pyx_pw_4amns_4Amns_3_setup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2033  PyObject *__pyx_v_version_string = 0;
2034  PyObject *__pyx_v_version_number = 0;
2035  PyObject *__pyx_v_version_backend = 0;
2036  PyObject *__pyx_v_version_user = 0;
2037  PyObject *__pyx_r = 0;
2038  __Pyx_RefNannyDeclarations
2039  __Pyx_RefNannySetupContext("_setup (wrapper)", 0);
2040  {
2041  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_version_string,&__pyx_n_s_version_number,&__pyx_n_s_version_backend,&__pyx_n_s_version_user,0};
2042  PyObject* values[4] = {0,0,0,0};
2043  values[0] = ((PyObject *)Py_None);
2044  values[1] = ((PyObject *)Py_None);
2045  values[2] = ((PyObject *)Py_None);
2046  values[3] = ((PyObject *)Py_None);
2047  if (unlikely(__pyx_kwds)) {
2048  Py_ssize_t kw_args;
2049  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2050  switch (pos_args) {
2051  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2052  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2053  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2054  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2055  case 0: break;
2056  default: goto __pyx_L5_argtuple_error;
2057  }
2058  kw_args = PyDict_Size(__pyx_kwds);
2059  switch (pos_args) {
2060  case 0:
2061  if (kw_args > 0) {
2062  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_version_string);
2063  if (value) { values[0] = value; kw_args--; }
2064  }
2065  case 1:
2066  if (kw_args > 0) {
2067  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_version_number);
2068  if (value) { values[1] = value; kw_args--; }
2069  }
2070  case 2:
2071  if (kw_args > 0) {
2072  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_version_backend);
2073  if (value) { values[2] = value; kw_args--; }
2074  }
2075  case 3:
2076  if (kw_args > 0) {
2077  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_version_user);
2078  if (value) { values[3] = value; kw_args--; }
2079  }
2080  }
2081  if (unlikely(kw_args > 0)) {
2082  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_setup") < 0)) __PYX_ERR(0, 25, __pyx_L3_error)
2083  }
2084  } else {
2085  switch (PyTuple_GET_SIZE(__pyx_args)) {
2086  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2087  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2088  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2089  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2090  case 0: break;
2091  default: goto __pyx_L5_argtuple_error;
2092  }
2093  }
2094  __pyx_v_version_string = values[0];
2095  __pyx_v_version_number = values[1];
2096  __pyx_v_version_backend = values[2];
2097  __pyx_v_version_user = values[3];
2098  }
2099  goto __pyx_L4_argument_unpacking_done;
2100  __pyx_L5_argtuple_error:;
2101  __Pyx_RaiseArgtupleInvalid("_setup", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25, __pyx_L3_error)
2102  __pyx_L3_error:;
2103  __Pyx_AddTraceback("amns.Amns._setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
2104  __Pyx_RefNannyFinishContext();
2105  return NULL;
2106  __pyx_L4_argument_unpacking_done:;
2107  __pyx_r = __pyx_pf_4amns_4Amns_2_setup(((struct __pyx_obj_4amns_Amns *)__pyx_v_self), __pyx_v_version_string, __pyx_v_version_number, __pyx_v_version_backend, __pyx_v_version_user);
2108 
2109  /* function exit code */
2110  __Pyx_RefNannyFinishContext();
2111  return __pyx_r;
2112 }
2113 
2114 static PyObject *__pyx_pf_4amns_4Amns_2_setup(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_version_string, PyObject *__pyx_v_version_number, PyObject *__pyx_v_version_backend, PyObject *__pyx_v_version_user) {
2115  amns_c_error_type __pyx_v_error_status;
2116  amns_c_version_type __pyx_v_version;
2117  PyObject *__pyx_r = NULL;
2118  __Pyx_RefNannyDeclarations
2119  PyObject *__pyx_t_1 = NULL;
2120  PyObject *__pyx_t_2 = NULL;
2121  PyObject *__pyx_t_3 = NULL;
2122  int __pyx_t_4;
2123  char *__pyx_t_5;
2124  int __pyx_t_6;
2125  PyObject *__pyx_t_7 = NULL;
2126  PyObject *__pyx_t_8 = NULL;
2127  __Pyx_RefNannySetupContext("_setup", 0);
2128 
2129  /* "amns.pyx":29
2130  * cdef camns_interface.amns_c_error_type error_status
2131  * cdef camns_interface.amns_c_version_type version
2132  * version = camns_interface.get_default_amns_c_version_type() # <<<<<<<<<<<<<<
2133  * if (version_string == None) & ( version_number == None) & (version_backend == None) & (version_user == None):
2134  * camns_interface.ITM_AMNS_CC_SETUP(&self._handle, &error_status)
2135  */
2136  __pyx_v_version = get_default_amns_c_version_type();
2137 
2138  /* "amns.pyx":30
2139  * cdef camns_interface.amns_c_version_type version
2140  * version = camns_interface.get_default_amns_c_version_type()
2141  * if (version_string == None) & ( version_number == None) & (version_backend == None) & (version_user == None): # <<<<<<<<<<<<<<
2142  * camns_interface.ITM_AMNS_CC_SETUP(&self._handle, &error_status)
2143  * else:
2144  */
2145  __pyx_t_1 = PyObject_RichCompare(__pyx_v_version_string, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
2146  __pyx_t_2 = PyObject_RichCompare(__pyx_v_version_number, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
2147  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
2148  __Pyx_GOTREF(__pyx_t_3);
2149  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2150  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2151  __pyx_t_2 = PyObject_RichCompare(__pyx_v_version_backend, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
2152  __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
2153  __Pyx_GOTREF(__pyx_t_1);
2154  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2155  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2156  __pyx_t_2 = PyObject_RichCompare(__pyx_v_version_user, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
2157  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
2158  __Pyx_GOTREF(__pyx_t_3);
2159  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2160  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2161  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 30, __pyx_L1_error)
2162  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2163  if (__pyx_t_4) {
2164 
2165  /* "amns.pyx":31
2166  * version = camns_interface.get_default_amns_c_version_type()
2167  * if (version_string == None) & ( version_number == None) & (version_backend == None) & (version_user == None):
2168  * camns_interface.ITM_AMNS_CC_SETUP(&self._handle, &error_status) # <<<<<<<<<<<<<<
2169  * else:
2170  * print version
2171  */
2172  ITM_AMNS_CC_SETUP((&__pyx_v_self->_handle), (&__pyx_v_error_status));
2173 
2174  /* "amns.pyx":30
2175  * cdef camns_interface.amns_c_version_type version
2176  * version = camns_interface.get_default_amns_c_version_type()
2177  * if (version_string == None) & ( version_number == None) & (version_backend == None) & (version_user == None): # <<<<<<<<<<<<<<
2178  * camns_interface.ITM_AMNS_CC_SETUP(&self._handle, &error_status)
2179  * else:
2180  */
2181  goto __pyx_L3;
2182  }
2183 
2184  /* "amns.pyx":33
2185  * camns_interface.ITM_AMNS_CC_SETUP(&self._handle, &error_status)
2186  * else:
2187  * print version # <<<<<<<<<<<<<<
2188  * if version_string != None: version.string = version_string
2189  * if version_number != None: version.number = version_number
2190  */
2191  /*else*/ {
2192  __pyx_t_3 = __pyx_convert__to_py_amns_c_version_type(__pyx_v_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)
2193  __Pyx_GOTREF(__pyx_t_3);
2194  if (__Pyx_PrintOne(0, __pyx_t_3) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
2195  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2196 
2197  /* "amns.pyx":34
2198  * else:
2199  * print version
2200  * if version_string != None: version.string = version_string # <<<<<<<<<<<<<<
2201  * if version_number != None: version.number = version_number
2202  * if version_backend != None: version.backend = version_backend
2203  */
2204  __pyx_t_3 = PyObject_RichCompare(__pyx_v_version_string, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
2205  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 34, __pyx_L1_error)
2206  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2207  if (__pyx_t_4) {
2208  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_version_string); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 34, __pyx_L1_error)
2209  __pyx_v_version.string = __pyx_t_5;
2210  }
2211 
2212  /* "amns.pyx":35
2213  * print version
2214  * if version_string != None: version.string = version_string
2215  * if version_number != None: version.number = version_number # <<<<<<<<<<<<<<
2216  * if version_backend != None: version.backend = version_backend
2217  * if version_user != None: version.user = version_user
2218  */
2219  __pyx_t_3 = PyObject_RichCompare(__pyx_v_version_number, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
2220  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 35, __pyx_L1_error)
2221  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2222  if (__pyx_t_4) {
2223  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_version_number); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 35, __pyx_L1_error)
2224  __pyx_v_version.number = __pyx_t_6;
2225  }
2226 
2227  /* "amns.pyx":36
2228  * if version_string != None: version.string = version_string
2229  * if version_number != None: version.number = version_number
2230  * if version_backend != None: version.backend = version_backend # <<<<<<<<<<<<<<
2231  * if version_user != None: version.user = version_user
2232  * print version
2233  */
2234  __pyx_t_3 = PyObject_RichCompare(__pyx_v_version_backend, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)
2235  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 36, __pyx_L1_error)
2236  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2237  if (__pyx_t_4) {
2238  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_version_backend); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 36, __pyx_L1_error)
2239  __pyx_v_version.backend = __pyx_t_5;
2240  }
2241 
2242  /* "amns.pyx":37
2243  * if version_number != None: version.number = version_number
2244  * if version_backend != None: version.backend = version_backend
2245  * if version_user != None: version.user = version_user # <<<<<<<<<<<<<<
2246  * print version
2247  * camns_interface.ITM_AMNS_CC_SETUP_VERSION(&self._handle, &version, &error_status)
2248  */
2249  __pyx_t_3 = PyObject_RichCompare(__pyx_v_version_user, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error)
2250  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 37, __pyx_L1_error)
2251  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2252  if (__pyx_t_4) {
2253  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_version_user); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 37, __pyx_L1_error)
2254  __pyx_v_version.user = __pyx_t_5;
2255  }
2256 
2257  /* "amns.pyx":38
2258  * if version_backend != None: version.backend = version_backend
2259  * if version_user != None: version.user = version_user
2260  * print version # <<<<<<<<<<<<<<
2261  * camns_interface.ITM_AMNS_CC_SETUP_VERSION(&self._handle, &version, &error_status)
2262  * if error_status.flag:
2263  */
2264  __pyx_t_3 = __pyx_convert__to_py_amns_c_version_type(__pyx_v_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
2265  __Pyx_GOTREF(__pyx_t_3);
2266  if (__Pyx_PrintOne(0, __pyx_t_3) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
2267  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2268 
2269  /* "amns.pyx":39
2270  * if version_user != None: version.user = version_user
2271  * print version
2272  * camns_interface.ITM_AMNS_CC_SETUP_VERSION(&self._handle, &version, &error_status) # <<<<<<<<<<<<<<
2273  * if error_status.flag:
2274  * raise AmnsException(error_status.string)
2275  */
2276  ITM_AMNS_CC_SETUP_VERSION((&__pyx_v_self->_handle), (&__pyx_v_version), (&__pyx_v_error_status));
2277  }
2278  __pyx_L3:;
2279 
2280  /* "amns.pyx":40
2281  * print version
2282  * camns_interface.ITM_AMNS_CC_SETUP_VERSION(&self._handle, &version, &error_status)
2283  * if error_status.flag: # <<<<<<<<<<<<<<
2284  * raise AmnsException(error_status.string)
2285  *
2286  */
2287  __pyx_t_4 = (__pyx_v_error_status.flag != 0);
2288  if (__pyx_t_4) {
2289 
2290  /* "amns.pyx":41
2291  * camns_interface.ITM_AMNS_CC_SETUP_VERSION(&self._handle, &version, &error_status)
2292  * if error_status.flag:
2293  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
2294  *
2295  * cdef camns_interface.amns_c_answer_type lquery(self, queryString):
2296  */
2297  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
2298  __Pyx_GOTREF(__pyx_t_2);
2299  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
2300  __Pyx_GOTREF(__pyx_t_1);
2301  __pyx_t_7 = NULL;
2302  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
2303  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
2304  if (likely(__pyx_t_7)) {
2305  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
2306  __Pyx_INCREF(__pyx_t_7);
2307  __Pyx_INCREF(function);
2308  __Pyx_DECREF_SET(__pyx_t_2, function);
2309  }
2310  }
2311  if (!__pyx_t_7) {
2312  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
2313  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2314  __Pyx_GOTREF(__pyx_t_3);
2315  } else {
2316  #if CYTHON_FAST_PYCALL
2317  if (PyFunction_Check(__pyx_t_2)) {
2318  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_1};
2319  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
2320  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
2321  __Pyx_GOTREF(__pyx_t_3);
2322  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2323  } else
2324  #endif
2325  #if CYTHON_FAST_PYCCALL
2326  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
2327  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_1};
2328  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
2329  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
2330  __Pyx_GOTREF(__pyx_t_3);
2331  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2332  } else
2333  #endif
2334  {
2335  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 41, __pyx_L1_error)
2336  __Pyx_GOTREF(__pyx_t_8);
2337  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
2338  __Pyx_GIVEREF(__pyx_t_1);
2339  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_1);
2340  __pyx_t_1 = 0;
2341  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
2342  __Pyx_GOTREF(__pyx_t_3);
2343  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2344  }
2345  }
2346  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2347  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
2348  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2349  __PYX_ERR(0, 41, __pyx_L1_error)
2350 
2351  /* "amns.pyx":40
2352  * print version
2353  * camns_interface.ITM_AMNS_CC_SETUP_VERSION(&self._handle, &version, &error_status)
2354  * if error_status.flag: # <<<<<<<<<<<<<<
2355  * raise AmnsException(error_status.string)
2356  *
2357  */
2358  }
2359 
2360  /* "amns.pyx":25
2361  * return self._handle
2362  *
2363  * def _setup(self, version_string=None, version_number=None, version_backend=None, version_user=None): # <<<<<<<<<<<<<<
2364  * """Perform the actual call to the C interface to the original primary Fortran SETUP routine"""
2365  * cdef camns_interface.amns_c_error_type error_status
2366  */
2367 
2368  /* function exit code */
2369  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2370  goto __pyx_L0;
2371  __pyx_L1_error:;
2372  __Pyx_XDECREF(__pyx_t_1);
2373  __Pyx_XDECREF(__pyx_t_2);
2374  __Pyx_XDECREF(__pyx_t_3);
2375  __Pyx_XDECREF(__pyx_t_7);
2376  __Pyx_XDECREF(__pyx_t_8);
2377  __Pyx_AddTraceback("amns.Amns._setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
2378  __pyx_r = NULL;
2379  __pyx_L0:;
2380  __Pyx_XGIVEREF(__pyx_r);
2381  __Pyx_RefNannyFinishContext();
2382  return __pyx_r;
2383 }
2384 
2385 /* "amns.pyx":43
2386  * raise AmnsException(error_status.string)
2387  *
2388  * cdef camns_interface.amns_c_answer_type lquery(self, queryString): # <<<<<<<<<<<<<<
2389  * cdef camns_interface.amns_c_query_type query
2390  * cdef camns_interface.amns_c_answer_type answer
2391  */
2392 
2393 static amns_c_answer_type __pyx_f_4amns_4Amns_lquery(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_queryString) {
2394  amns_c_query_type __pyx_v_query;
2395  amns_c_answer_type __pyx_v_answer;
2396  amns_c_error_type __pyx_v_error_status;
2397  amns_c_answer_type __pyx_r;
2398  __Pyx_RefNannyDeclarations
2399  char *__pyx_t_1;
2400  int __pyx_t_2;
2401  PyObject *__pyx_t_3 = NULL;
2402  PyObject *__pyx_t_4 = NULL;
2403  PyObject *__pyx_t_5 = NULL;
2404  PyObject *__pyx_t_6 = NULL;
2405  PyObject *__pyx_t_7 = NULL;
2406  __Pyx_RefNannySetupContext("lquery", 0);
2407 
2408  /* "amns.pyx":47
2409  * cdef camns_interface.amns_c_answer_type answer
2410  * cdef camns_interface.amns_c_error_type error_status
2411  * query.string = queryString # <<<<<<<<<<<<<<
2412  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status);
2413  * if error_status.flag:
2414  */
2415  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_queryString); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L1_error)
2416  __pyx_v_query.string = __pyx_t_1;
2417 
2418  /* "amns.pyx":48
2419  * cdef camns_interface.amns_c_error_type error_status
2420  * query.string = queryString
2421  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status); # <<<<<<<<<<<<<<
2422  * if error_status.flag:
2423  * raise AmnsException(error_status.string)
2424  */
2425  ITM_AMNS_CC_QUERY(__pyx_v_self->_handle, (&__pyx_v_query), (&__pyx_v_answer), (&__pyx_v_error_status));
2426 
2427  /* "amns.pyx":49
2428  * query.string = queryString
2429  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status);
2430  * if error_status.flag: # <<<<<<<<<<<<<<
2431  * raise AmnsException(error_status.string)
2432  * return answer
2433  */
2434  __pyx_t_2 = (__pyx_v_error_status.flag != 0);
2435  if (__pyx_t_2) {
2436 
2437  /* "amns.pyx":50
2438  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status);
2439  * if error_status.flag:
2440  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
2441  * return answer
2442  *
2443  */
2444  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
2445  __Pyx_GOTREF(__pyx_t_4);
2446  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L1_error)
2447  __Pyx_GOTREF(__pyx_t_5);
2448  __pyx_t_6 = NULL;
2449  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
2450  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
2451  if (likely(__pyx_t_6)) {
2452  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
2453  __Pyx_INCREF(__pyx_t_6);
2454  __Pyx_INCREF(function);
2455  __Pyx_DECREF_SET(__pyx_t_4, function);
2456  }
2457  }
2458  if (!__pyx_t_6) {
2459  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
2460  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2461  __Pyx_GOTREF(__pyx_t_3);
2462  } else {
2463  #if CYTHON_FAST_PYCALL
2464  if (PyFunction_Check(__pyx_t_4)) {
2465  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
2466  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
2467  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2468  __Pyx_GOTREF(__pyx_t_3);
2469  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2470  } else
2471  #endif
2472  #if CYTHON_FAST_PYCCALL
2473  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
2474  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
2475  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
2476  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2477  __Pyx_GOTREF(__pyx_t_3);
2478  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2479  } else
2480  #endif
2481  {
2482  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 50, __pyx_L1_error)
2483  __Pyx_GOTREF(__pyx_t_7);
2484  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
2485  __Pyx_GIVEREF(__pyx_t_5);
2486  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
2487  __pyx_t_5 = 0;
2488  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
2489  __Pyx_GOTREF(__pyx_t_3);
2490  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2491  }
2492  }
2493  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2494  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
2495  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2496  __PYX_ERR(0, 50, __pyx_L1_error)
2497 
2498  /* "amns.pyx":49
2499  * query.string = queryString
2500  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status);
2501  * if error_status.flag: # <<<<<<<<<<<<<<
2502  * raise AmnsException(error_status.string)
2503  * return answer
2504  */
2505  }
2506 
2507  /* "amns.pyx":51
2508  * if error_status.flag:
2509  * raise AmnsException(error_status.string)
2510  * return answer # <<<<<<<<<<<<<<
2511  *
2512  * def query(self, queryString):
2513  */
2514  __pyx_r = __pyx_v_answer;
2515  goto __pyx_L0;
2516 
2517  /* "amns.pyx":43
2518  * raise AmnsException(error_status.string)
2519  *
2520  * cdef camns_interface.amns_c_answer_type lquery(self, queryString): # <<<<<<<<<<<<<<
2521  * cdef camns_interface.amns_c_query_type query
2522  * cdef camns_interface.amns_c_answer_type answer
2523  */
2524 
2525  /* function exit code */
2526  __pyx_L1_error:;
2527  __Pyx_XDECREF(__pyx_t_3);
2528  __Pyx_XDECREF(__pyx_t_4);
2529  __Pyx_XDECREF(__pyx_t_5);
2530  __Pyx_XDECREF(__pyx_t_6);
2531  __Pyx_XDECREF(__pyx_t_7);
2532  __Pyx_WriteUnraisable("amns.Amns.lquery", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
2533  __pyx_L0:;
2534  __Pyx_RefNannyFinishContext();
2535  return __pyx_r;
2536 }
2537 
2538 /* "amns.pyx":53
2539  * return answer
2540  *
2541  * def query(self, queryString): # <<<<<<<<<<<<<<
2542  * """Provide the interface to ITM_AMNS_QUERY"""
2543  * cdef camns_interface.amns_c_query_type query
2544  */
2545 
2546 /* Python wrapper */
2547 static PyObject *__pyx_pw_4amns_4Amns_5query(PyObject *__pyx_v_self, PyObject *__pyx_v_queryString); /*proto*/
2548 static char __pyx_doc_4amns_4Amns_4query[] = "Provide the interface to ITM_AMNS_QUERY";
2549 static PyObject *__pyx_pw_4amns_4Amns_5query(PyObject *__pyx_v_self, PyObject *__pyx_v_queryString) {
2550  PyObject *__pyx_r = 0;
2551  __Pyx_RefNannyDeclarations
2552  __Pyx_RefNannySetupContext("query (wrapper)", 0);
2553  __pyx_r = __pyx_pf_4amns_4Amns_4query(((struct __pyx_obj_4amns_Amns *)__pyx_v_self), ((PyObject *)__pyx_v_queryString));
2554 
2555  /* function exit code */
2556  __Pyx_RefNannyFinishContext();
2557  return __pyx_r;
2558 }
2559 
2560 static PyObject *__pyx_pf_4amns_4Amns_4query(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_queryString) {
2561  amns_c_query_type __pyx_v_query;
2562  amns_c_answer_type __pyx_v_answer;
2563  amns_c_error_type __pyx_v_error_status;
2564  PyObject *__pyx_r = NULL;
2565  __Pyx_RefNannyDeclarations
2566  char *__pyx_t_1;
2567  int __pyx_t_2;
2568  PyObject *__pyx_t_3 = NULL;
2569  PyObject *__pyx_t_4 = NULL;
2570  PyObject *__pyx_t_5 = NULL;
2571  PyObject *__pyx_t_6 = NULL;
2572  PyObject *__pyx_t_7 = NULL;
2573  __Pyx_RefNannySetupContext("query", 0);
2574 
2575  /* "amns.pyx":58
2576  * cdef camns_interface.amns_c_answer_type answer
2577  * cdef camns_interface.amns_c_error_type error_status
2578  * query.string = queryString # <<<<<<<<<<<<<<
2579  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status);
2580  * if error_status.flag:
2581  */
2582  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_queryString); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L1_error)
2583  __pyx_v_query.string = __pyx_t_1;
2584 
2585  /* "amns.pyx":59
2586  * cdef camns_interface.amns_c_error_type error_status
2587  * query.string = queryString
2588  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status); # <<<<<<<<<<<<<<
2589  * if error_status.flag:
2590  * raise AmnsException(error_status.string)
2591  */
2592  ITM_AMNS_CC_QUERY(__pyx_v_self->_handle, (&__pyx_v_query), (&__pyx_v_answer), (&__pyx_v_error_status));
2593 
2594  /* "amns.pyx":60
2595  * query.string = queryString
2596  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status);
2597  * if error_status.flag: # <<<<<<<<<<<<<<
2598  * raise AmnsException(error_status.string)
2599  * return answer.string, answer.number
2600  */
2601  __pyx_t_2 = (__pyx_v_error_status.flag != 0);
2602  if (__pyx_t_2) {
2603 
2604  /* "amns.pyx":61
2605  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status);
2606  * if error_status.flag:
2607  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
2608  * return answer.string, answer.number
2609  *
2610  */
2611  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error)
2612  __Pyx_GOTREF(__pyx_t_4);
2613  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
2614  __Pyx_GOTREF(__pyx_t_5);
2615  __pyx_t_6 = NULL;
2616  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
2617  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
2618  if (likely(__pyx_t_6)) {
2619  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
2620  __Pyx_INCREF(__pyx_t_6);
2621  __Pyx_INCREF(function);
2622  __Pyx_DECREF_SET(__pyx_t_4, function);
2623  }
2624  }
2625  if (!__pyx_t_6) {
2626  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
2627  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2628  __Pyx_GOTREF(__pyx_t_3);
2629  } else {
2630  #if CYTHON_FAST_PYCALL
2631  if (PyFunction_Check(__pyx_t_4)) {
2632  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
2633  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
2634  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2635  __Pyx_GOTREF(__pyx_t_3);
2636  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2637  } else
2638  #endif
2639  #if CYTHON_FAST_PYCCALL
2640  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
2641  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
2642  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
2643  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2644  __Pyx_GOTREF(__pyx_t_3);
2645  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2646  } else
2647  #endif
2648  {
2649  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 61, __pyx_L1_error)
2650  __Pyx_GOTREF(__pyx_t_7);
2651  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
2652  __Pyx_GIVEREF(__pyx_t_5);
2653  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
2654  __pyx_t_5 = 0;
2655  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
2656  __Pyx_GOTREF(__pyx_t_3);
2657  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2658  }
2659  }
2660  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2661  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
2662  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2663  __PYX_ERR(0, 61, __pyx_L1_error)
2664 
2665  /* "amns.pyx":60
2666  * query.string = queryString
2667  * camns_interface.ITM_AMNS_CC_QUERY(self._handle, &query, &answer, &error_status);
2668  * if error_status.flag: # <<<<<<<<<<<<<<
2669  * raise AmnsException(error_status.string)
2670  * return answer.string, answer.number
2671  */
2672  }
2673 
2674  /* "amns.pyx":62
2675  * if error_status.flag:
2676  * raise AmnsException(error_status.string)
2677  * return answer.string, answer.number # <<<<<<<<<<<<<<
2678  *
2679  * @property
2680  */
2681  __Pyx_XDECREF(__pyx_r);
2682  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error)
2683  __Pyx_GOTREF(__pyx_t_3);
2684  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_answer.number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error)
2685  __Pyx_GOTREF(__pyx_t_4);
2686  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 62, __pyx_L1_error)
2687  __Pyx_GOTREF(__pyx_t_7);
2688  __Pyx_GIVEREF(__pyx_t_3);
2689  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
2690  __Pyx_GIVEREF(__pyx_t_4);
2691  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
2692  __pyx_t_3 = 0;
2693  __pyx_t_4 = 0;
2694  __pyx_r = __pyx_t_7;
2695  __pyx_t_7 = 0;
2696  goto __pyx_L0;
2697 
2698  /* "amns.pyx":53
2699  * return answer
2700  *
2701  * def query(self, queryString): # <<<<<<<<<<<<<<
2702  * """Provide the interface to ITM_AMNS_QUERY"""
2703  * cdef camns_interface.amns_c_query_type query
2704  */
2705 
2706  /* function exit code */
2707  __pyx_L1_error:;
2708  __Pyx_XDECREF(__pyx_t_3);
2709  __Pyx_XDECREF(__pyx_t_4);
2710  __Pyx_XDECREF(__pyx_t_5);
2711  __Pyx_XDECREF(__pyx_t_6);
2712  __Pyx_XDECREF(__pyx_t_7);
2713  __Pyx_AddTraceback("amns.Amns.query", __pyx_clineno, __pyx_lineno, __pyx_filename);
2714  __pyx_r = NULL;
2715  __pyx_L0:;
2716  __Pyx_XGIVEREF(__pyx_r);
2717  __Pyx_RefNannyFinishContext();
2718  return __pyx_r;
2719 }
2720 
2721 /* "amns.pyx":65
2722  *
2723  * @property
2724  * def version(self): # <<<<<<<<<<<<<<
2725  * """Query for version of the AMNS data"""
2726  * cdef camns_interface.amns_c_answer_type answer
2727  */
2728 
2729 /* Python wrapper */
2730 static PyObject *__pyx_pw_4amns_4Amns_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
2731 static PyObject *__pyx_pw_4amns_4Amns_7version_1__get__(PyObject *__pyx_v_self) {
2732  PyObject *__pyx_r = 0;
2733  __Pyx_RefNannyDeclarations
2734  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
2735  __pyx_r = __pyx_pf_4amns_4Amns_7version___get__(((struct __pyx_obj_4amns_Amns *)__pyx_v_self));
2736 
2737  /* function exit code */
2738  __Pyx_RefNannyFinishContext();
2739  return __pyx_r;
2740 }
2741 
2742 static PyObject *__pyx_pf_4amns_4Amns_7version___get__(struct __pyx_obj_4amns_Amns *__pyx_v_self) {
2743  amns_c_answer_type __pyx_v_answer;
2744  PyObject *__pyx_r = NULL;
2745  __Pyx_RefNannyDeclarations
2746  PyObject *__pyx_t_1 = NULL;
2747  PyObject *__pyx_t_2 = NULL;
2748  PyObject *__pyx_t_3 = NULL;
2749  __Pyx_RefNannySetupContext("__get__", 0);
2750 
2751  /* "amns.pyx":68
2752  * """Query for version of the AMNS data"""
2753  * cdef camns_interface.amns_c_answer_type answer
2754  * answer = self.lquery("version") # <<<<<<<<<<<<<<
2755  * return answer.number, answer.string
2756  *
2757  */
2758  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Amns *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_version);
2759 
2760  /* "amns.pyx":69
2761  * cdef camns_interface.amns_c_answer_type answer
2762  * answer = self.lquery("version")
2763  * return answer.number, answer.string # <<<<<<<<<<<<<<
2764  *
2765  * def set(self, setString):
2766  */
2767  __Pyx_XDECREF(__pyx_r);
2768  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_answer.number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
2769  __Pyx_GOTREF(__pyx_t_1);
2770  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
2771  __Pyx_GOTREF(__pyx_t_2);
2772  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
2773  __Pyx_GOTREF(__pyx_t_3);
2774  __Pyx_GIVEREF(__pyx_t_1);
2775  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
2776  __Pyx_GIVEREF(__pyx_t_2);
2777  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
2778  __pyx_t_1 = 0;
2779  __pyx_t_2 = 0;
2780  __pyx_r = __pyx_t_3;
2781  __pyx_t_3 = 0;
2782  goto __pyx_L0;
2783 
2784  /* "amns.pyx":65
2785  *
2786  * @property
2787  * def version(self): # <<<<<<<<<<<<<<
2788  * """Query for version of the AMNS data"""
2789  * cdef camns_interface.amns_c_answer_type answer
2790  */
2791 
2792  /* function exit code */
2793  __pyx_L1_error:;
2794  __Pyx_XDECREF(__pyx_t_1);
2795  __Pyx_XDECREF(__pyx_t_2);
2796  __Pyx_XDECREF(__pyx_t_3);
2797  __Pyx_AddTraceback("amns.Amns.version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2798  __pyx_r = NULL;
2799  __pyx_L0:;
2800  __Pyx_XGIVEREF(__pyx_r);
2801  __Pyx_RefNannyFinishContext();
2802  return __pyx_r;
2803 }
2804 
2805 /* "amns.pyx":71
2806  * return answer.number, answer.string
2807  *
2808  * def set(self, setString): # <<<<<<<<<<<<<<
2809  * """Provide the interface to ITM_AMNS_SET"""
2810  * cdef camns_interface.amns_c_set_type set
2811  */
2812 
2813 /* Python wrapper */
2814 static PyObject *__pyx_pw_4amns_4Amns_7set(PyObject *__pyx_v_self, PyObject *__pyx_v_setString); /*proto*/
2815 static char __pyx_doc_4amns_4Amns_6set[] = "Provide the interface to ITM_AMNS_SET";
2816 static PyObject *__pyx_pw_4amns_4Amns_7set(PyObject *__pyx_v_self, PyObject *__pyx_v_setString) {
2817  PyObject *__pyx_r = 0;
2818  __Pyx_RefNannyDeclarations
2819  __Pyx_RefNannySetupContext("set (wrapper)", 0);
2820  __pyx_r = __pyx_pf_4amns_4Amns_6set(((struct __pyx_obj_4amns_Amns *)__pyx_v_self), ((PyObject *)__pyx_v_setString));
2821 
2822  /* function exit code */
2823  __Pyx_RefNannyFinishContext();
2824  return __pyx_r;
2825 }
2826 
2827 static PyObject *__pyx_pf_4amns_4Amns_6set(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_setString) {
2828  amns_c_set_type __pyx_v_set;
2829  amns_c_error_type __pyx_v_error_status;
2830  PyObject *__pyx_r = NULL;
2831  __Pyx_RefNannyDeclarations
2832  char *__pyx_t_1;
2833  int __pyx_t_2;
2834  PyObject *__pyx_t_3 = NULL;
2835  PyObject *__pyx_t_4 = NULL;
2836  PyObject *__pyx_t_5 = NULL;
2837  PyObject *__pyx_t_6 = NULL;
2838  PyObject *__pyx_t_7 = NULL;
2839  __Pyx_RefNannySetupContext("set", 0);
2840 
2841  /* "amns.pyx":75
2842  * cdef camns_interface.amns_c_set_type set
2843  * cdef camns_interface.amns_c_error_type error_status
2844  * set.string = setString # <<<<<<<<<<<<<<
2845  * camns_interface.ITM_AMNS_CC_SET(self._handle, &set, &error_status);
2846  * if error_status.flag:
2847  */
2848  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_setString); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L1_error)
2849  __pyx_v_set.string = __pyx_t_1;
2850 
2851  /* "amns.pyx":76
2852  * cdef camns_interface.amns_c_error_type error_status
2853  * set.string = setString
2854  * camns_interface.ITM_AMNS_CC_SET(self._handle, &set, &error_status); # <<<<<<<<<<<<<<
2855  * if error_status.flag:
2856  * raise AmnsException(error_status.string)
2857  */
2858  ITM_AMNS_CC_SET(__pyx_v_self->_handle, (&__pyx_v_set), (&__pyx_v_error_status));
2859 
2860  /* "amns.pyx":77
2861  * set.string = setString
2862  * camns_interface.ITM_AMNS_CC_SET(self._handle, &set, &error_status);
2863  * if error_status.flag: # <<<<<<<<<<<<<<
2864  * raise AmnsException(error_status.string)
2865  *
2866  */
2867  __pyx_t_2 = (__pyx_v_error_status.flag != 0);
2868  if (__pyx_t_2) {
2869 
2870  /* "amns.pyx":78
2871  * camns_interface.ITM_AMNS_CC_SET(self._handle, &set, &error_status);
2872  * if error_status.flag:
2873  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
2874  *
2875  * def finalize(self):
2876  */
2877  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error)
2878  __Pyx_GOTREF(__pyx_t_4);
2879  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error)
2880  __Pyx_GOTREF(__pyx_t_5);
2881  __pyx_t_6 = NULL;
2882  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
2883  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
2884  if (likely(__pyx_t_6)) {
2885  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
2886  __Pyx_INCREF(__pyx_t_6);
2887  __Pyx_INCREF(function);
2888  __Pyx_DECREF_SET(__pyx_t_4, function);
2889  }
2890  }
2891  if (!__pyx_t_6) {
2892  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
2893  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2894  __Pyx_GOTREF(__pyx_t_3);
2895  } else {
2896  #if CYTHON_FAST_PYCALL
2897  if (PyFunction_Check(__pyx_t_4)) {
2898  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
2899  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
2900  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2901  __Pyx_GOTREF(__pyx_t_3);
2902  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2903  } else
2904  #endif
2905  #if CYTHON_FAST_PYCCALL
2906  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
2907  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
2908  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
2909  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2910  __Pyx_GOTREF(__pyx_t_3);
2911  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2912  } else
2913  #endif
2914  {
2915  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error)
2916  __Pyx_GOTREF(__pyx_t_7);
2917  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
2918  __Pyx_GIVEREF(__pyx_t_5);
2919  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
2920  __pyx_t_5 = 0;
2921  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
2922  __Pyx_GOTREF(__pyx_t_3);
2923  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2924  }
2925  }
2926  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2927  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
2928  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2929  __PYX_ERR(0, 78, __pyx_L1_error)
2930 
2931  /* "amns.pyx":77
2932  * set.string = setString
2933  * camns_interface.ITM_AMNS_CC_SET(self._handle, &set, &error_status);
2934  * if error_status.flag: # <<<<<<<<<<<<<<
2935  * raise AmnsException(error_status.string)
2936  *
2937  */
2938  }
2939 
2940  /* "amns.pyx":71
2941  * return answer.number, answer.string
2942  *
2943  * def set(self, setString): # <<<<<<<<<<<<<<
2944  * """Provide the interface to ITM_AMNS_SET"""
2945  * cdef camns_interface.amns_c_set_type set
2946  */
2947 
2948  /* function exit code */
2949  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2950  goto __pyx_L0;
2951  __pyx_L1_error:;
2952  __Pyx_XDECREF(__pyx_t_3);
2953  __Pyx_XDECREF(__pyx_t_4);
2954  __Pyx_XDECREF(__pyx_t_5);
2955  __Pyx_XDECREF(__pyx_t_6);
2956  __Pyx_XDECREF(__pyx_t_7);
2957  __Pyx_AddTraceback("amns.Amns.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
2958  __pyx_r = NULL;
2959  __pyx_L0:;
2960  __Pyx_XGIVEREF(__pyx_r);
2961  __Pyx_RefNannyFinishContext();
2962  return __pyx_r;
2963 }
2964 
2965 /* "amns.pyx":80
2966  * raise AmnsException(error_status.string)
2967  *
2968  * def finalize(self): # <<<<<<<<<<<<<<
2969  * """Provide the interface to ITM_AMNS_FINISH"""
2970  * cdef camns_interface.amns_c_error_type error_status
2971  */
2972 
2973 /* Python wrapper */
2974 static PyObject *__pyx_pw_4amns_4Amns_9finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2975 static char __pyx_doc_4amns_4Amns_8finalize[] = "Provide the interface to ITM_AMNS_FINISH";
2976 static PyObject *__pyx_pw_4amns_4Amns_9finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2977  PyObject *__pyx_r = 0;
2978  __Pyx_RefNannyDeclarations
2979  __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
2980  __pyx_r = __pyx_pf_4amns_4Amns_8finalize(((struct __pyx_obj_4amns_Amns *)__pyx_v_self));
2981 
2982  /* function exit code */
2983  __Pyx_RefNannyFinishContext();
2984  return __pyx_r;
2985 }
2986 
2987 static PyObject *__pyx_pf_4amns_4Amns_8finalize(struct __pyx_obj_4amns_Amns *__pyx_v_self) {
2988  amns_c_error_type __pyx_v_error_status;
2989  PyObject *__pyx_r = NULL;
2990  __Pyx_RefNannyDeclarations
2991  int __pyx_t_1;
2992  PyObject *__pyx_t_2 = NULL;
2993  PyObject *__pyx_t_3 = NULL;
2994  PyObject *__pyx_t_4 = NULL;
2995  PyObject *__pyx_t_5 = NULL;
2996  PyObject *__pyx_t_6 = NULL;
2997  __Pyx_RefNannySetupContext("finalize", 0);
2998 
2999  /* "amns.pyx":83
3000  * """Provide the interface to ITM_AMNS_FINISH"""
3001  * cdef camns_interface.amns_c_error_type error_status
3002  * camns_interface.ITM_AMNS_CC_FINISH(&self._handle, &error_status) # <<<<<<<<<<<<<<
3003  * if error_status.flag:
3004  * raise AmnsException(error_status.string)
3005  */
3006  ITM_AMNS_CC_FINISH((&__pyx_v_self->_handle), (&__pyx_v_error_status));
3007 
3008  /* "amns.pyx":84
3009  * cdef camns_interface.amns_c_error_type error_status
3010  * camns_interface.ITM_AMNS_CC_FINISH(&self._handle, &error_status)
3011  * if error_status.flag: # <<<<<<<<<<<<<<
3012  * raise AmnsException(error_status.string)
3013  *
3014  */
3015  __pyx_t_1 = (__pyx_v_error_status.flag != 0);
3016  if (__pyx_t_1) {
3017 
3018  /* "amns.pyx":85
3019  * camns_interface.ITM_AMNS_CC_FINISH(&self._handle, &error_status)
3020  * if error_status.flag:
3021  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
3022  *
3023  * def get_table(self, reactionString, Reactants reactants, isotope_resolved=None):
3024  */
3025  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
3026  __Pyx_GOTREF(__pyx_t_3);
3027  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
3028  __Pyx_GOTREF(__pyx_t_4);
3029  __pyx_t_5 = NULL;
3030  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3031  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
3032  if (likely(__pyx_t_5)) {
3033  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3034  __Pyx_INCREF(__pyx_t_5);
3035  __Pyx_INCREF(function);
3036  __Pyx_DECREF_SET(__pyx_t_3, function);
3037  }
3038  }
3039  if (!__pyx_t_5) {
3040  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
3041  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3042  __Pyx_GOTREF(__pyx_t_2);
3043  } else {
3044  #if CYTHON_FAST_PYCALL
3045  if (PyFunction_Check(__pyx_t_3)) {
3046  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
3047  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
3048  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3049  __Pyx_GOTREF(__pyx_t_2);
3050  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3051  } else
3052  #endif
3053  #if CYTHON_FAST_PYCCALL
3054  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
3055  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
3056  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
3057  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3058  __Pyx_GOTREF(__pyx_t_2);
3059  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3060  } else
3061  #endif
3062  {
3063  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
3064  __Pyx_GOTREF(__pyx_t_6);
3065  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
3066  __Pyx_GIVEREF(__pyx_t_4);
3067  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
3068  __pyx_t_4 = 0;
3069  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
3070  __Pyx_GOTREF(__pyx_t_2);
3071  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3072  }
3073  }
3074  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3075  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3076  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3077  __PYX_ERR(0, 85, __pyx_L1_error)
3078 
3079  /* "amns.pyx":84
3080  * cdef camns_interface.amns_c_error_type error_status
3081  * camns_interface.ITM_AMNS_CC_FINISH(&self._handle, &error_status)
3082  * if error_status.flag: # <<<<<<<<<<<<<<
3083  * raise AmnsException(error_status.string)
3084  *
3085  */
3086  }
3087 
3088  /* "amns.pyx":80
3089  * raise AmnsException(error_status.string)
3090  *
3091  * def finalize(self): # <<<<<<<<<<<<<<
3092  * """Provide the interface to ITM_AMNS_FINISH"""
3093  * cdef camns_interface.amns_c_error_type error_status
3094  */
3095 
3096  /* function exit code */
3097  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3098  goto __pyx_L0;
3099  __pyx_L1_error:;
3100  __Pyx_XDECREF(__pyx_t_2);
3101  __Pyx_XDECREF(__pyx_t_3);
3102  __Pyx_XDECREF(__pyx_t_4);
3103  __Pyx_XDECREF(__pyx_t_5);
3104  __Pyx_XDECREF(__pyx_t_6);
3105  __Pyx_AddTraceback("amns.Amns.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
3106  __pyx_r = NULL;
3107  __pyx_L0:;
3108  __Pyx_XGIVEREF(__pyx_r);
3109  __Pyx_RefNannyFinishContext();
3110  return __pyx_r;
3111 }
3112 
3113 /* "amns.pyx":87
3114  * raise AmnsException(error_status.string)
3115  *
3116  * def get_table(self, reactionString, Reactants reactants, isotope_resolved=None): # <<<<<<<<<<<<<<
3117  * """Provide the interface to the Table class used for tables"""
3118  * return Table(reactionString, reactants, self, isotope_resolved)
3119  */
3120 
3121 /* Python wrapper */
3122 static PyObject *__pyx_pw_4amns_4Amns_11get_table(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3123 static char __pyx_doc_4amns_4Amns_10get_table[] = "Provide the interface to the Table class used for tables";
3124 static PyObject *__pyx_pw_4amns_4Amns_11get_table(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3125  PyObject *__pyx_v_reactionString = 0;
3126  struct __pyx_obj_4amns_Reactants *__pyx_v_reactants = 0;
3127  PyObject *__pyx_v_isotope_resolved = 0;
3128  PyObject *__pyx_r = 0;
3129  __Pyx_RefNannyDeclarations
3130  __Pyx_RefNannySetupContext("get_table (wrapper)", 0);
3131  {
3132  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reactionString,&__pyx_n_s_reactants,&__pyx_n_s_isotope_resolved,0};
3133  PyObject* values[3] = {0,0,0};
3134  values[2] = ((PyObject *)Py_None);
3135  if (unlikely(__pyx_kwds)) {
3136  Py_ssize_t kw_args;
3137  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3138  switch (pos_args) {
3139  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3140  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3141  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3142  case 0: break;
3143  default: goto __pyx_L5_argtuple_error;
3144  }
3145  kw_args = PyDict_Size(__pyx_kwds);
3146  switch (pos_args) {
3147  case 0:
3148  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reactionString)) != 0)) kw_args--;
3149  else goto __pyx_L5_argtuple_error;
3150  case 1:
3151  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reactants)) != 0)) kw_args--;
3152  else {
3153  __Pyx_RaiseArgtupleInvalid("get_table", 0, 2, 3, 1); __PYX_ERR(0, 87, __pyx_L3_error)
3154  }
3155  case 2:
3156  if (kw_args > 0) {
3157  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isotope_resolved);
3158  if (value) { values[2] = value; kw_args--; }
3159  }
3160  }
3161  if (unlikely(kw_args > 0)) {
3162  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_table") < 0)) __PYX_ERR(0, 87, __pyx_L3_error)
3163  }
3164  } else {
3165  switch (PyTuple_GET_SIZE(__pyx_args)) {
3166  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3167  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3168  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3169  break;
3170  default: goto __pyx_L5_argtuple_error;
3171  }
3172  }
3173  __pyx_v_reactionString = values[0];
3174  __pyx_v_reactants = ((struct __pyx_obj_4amns_Reactants *)values[1]);
3175  __pyx_v_isotope_resolved = values[2];
3176  }
3177  goto __pyx_L4_argument_unpacking_done;
3178  __pyx_L5_argtuple_error:;
3179  __Pyx_RaiseArgtupleInvalid("get_table", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 87, __pyx_L3_error)
3180  __pyx_L3_error:;
3181  __Pyx_AddTraceback("amns.Amns.get_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
3182  __Pyx_RefNannyFinishContext();
3183  return NULL;
3184  __pyx_L4_argument_unpacking_done:;
3185  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reactants), __pyx_ptype_4amns_Reactants, 1, "reactants", 0))) __PYX_ERR(0, 87, __pyx_L1_error)
3186  __pyx_r = __pyx_pf_4amns_4Amns_10get_table(((struct __pyx_obj_4amns_Amns *)__pyx_v_self), __pyx_v_reactionString, __pyx_v_reactants, __pyx_v_isotope_resolved);
3187 
3188  /* function exit code */
3189  goto __pyx_L0;
3190  __pyx_L1_error:;
3191  __pyx_r = NULL;
3192  __pyx_L0:;
3193  __Pyx_RefNannyFinishContext();
3194  return __pyx_r;
3195 }
3196 
3197 static PyObject *__pyx_pf_4amns_4Amns_10get_table(struct __pyx_obj_4amns_Amns *__pyx_v_self, PyObject *__pyx_v_reactionString, struct __pyx_obj_4amns_Reactants *__pyx_v_reactants, PyObject *__pyx_v_isotope_resolved) {
3198  PyObject *__pyx_r = NULL;
3199  __Pyx_RefNannyDeclarations
3200  PyObject *__pyx_t_1 = NULL;
3201  PyObject *__pyx_t_2 = NULL;
3202  __Pyx_RefNannySetupContext("get_table", 0);
3203 
3204  /* "amns.pyx":89
3205  * def get_table(self, reactionString, Reactants reactants, isotope_resolved=None):
3206  * """Provide the interface to the Table class used for tables"""
3207  * return Table(reactionString, reactants, self, isotope_resolved) # <<<<<<<<<<<<<<
3208  *
3209  *
3210  */
3211  __Pyx_XDECREF(__pyx_r);
3212  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
3213  __Pyx_GOTREF(__pyx_t_1);
3214  __Pyx_INCREF(__pyx_v_reactionString);
3215  __Pyx_GIVEREF(__pyx_v_reactionString);
3216  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reactionString);
3217  __Pyx_INCREF(((PyObject *)__pyx_v_reactants));
3218  __Pyx_GIVEREF(((PyObject *)__pyx_v_reactants));
3219  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_reactants));
3220  __Pyx_INCREF(((PyObject *)__pyx_v_self));
3221  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
3222  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self));
3223  __Pyx_INCREF(__pyx_v_isotope_resolved);
3224  __Pyx_GIVEREF(__pyx_v_isotope_resolved);
3225  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_isotope_resolved);
3226  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4amns_Table), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
3227  __Pyx_GOTREF(__pyx_t_2);
3228  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3229  __pyx_r = __pyx_t_2;
3230  __pyx_t_2 = 0;
3231  goto __pyx_L0;
3232 
3233  /* "amns.pyx":87
3234  * raise AmnsException(error_status.string)
3235  *
3236  * def get_table(self, reactionString, Reactants reactants, isotope_resolved=None): # <<<<<<<<<<<<<<
3237  * """Provide the interface to the Table class used for tables"""
3238  * return Table(reactionString, reactants, self, isotope_resolved)
3239  */
3240 
3241  /* function exit code */
3242  __pyx_L1_error:;
3243  __Pyx_XDECREF(__pyx_t_1);
3244  __Pyx_XDECREF(__pyx_t_2);
3245  __Pyx_AddTraceback("amns.Amns.get_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
3246  __pyx_r = NULL;
3247  __pyx_L0:;
3248  __Pyx_XGIVEREF(__pyx_r);
3249  __Pyx_RefNannyFinishContext();
3250  return __pyx_r;
3251 }
3252 
3253 /* "amns.pyx":98
3254  * cdef Amns _parentAmns
3255  *
3256  * def __init__(self, reactionString, Reactants reactants, Amns parentAmns, isotope_resolved=None): # <<<<<<<<<<<<<<
3257  * """Create a new table"""
3258  * cdef camns_interface.amns_c_error_type error_status
3259  */
3260 
3261 /* Python wrapper */
3262 static int __pyx_pw_4amns_5Table_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3263 static char __pyx_doc_4amns_5Table___init__[] = "Create a new table";
3264 #if CYTHON_COMPILING_IN_CPYTHON
3265 struct wrapperbase __pyx_wrapperbase_4amns_5Table___init__;
3266 #endif
3267 static int __pyx_pw_4amns_5Table_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3268  PyObject *__pyx_v_reactionString = 0;
3269  struct __pyx_obj_4amns_Reactants *__pyx_v_reactants = 0;
3270  struct __pyx_obj_4amns_Amns *__pyx_v_parentAmns = 0;
3271  PyObject *__pyx_v_isotope_resolved = 0;
3272  int __pyx_r;
3273  __Pyx_RefNannyDeclarations
3274  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
3275  {
3276  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reactionString,&__pyx_n_s_reactants,&__pyx_n_s_parentAmns,&__pyx_n_s_isotope_resolved,0};
3277  PyObject* values[4] = {0,0,0,0};
3278  values[3] = ((PyObject *)Py_None);
3279  if (unlikely(__pyx_kwds)) {
3280  Py_ssize_t kw_args;
3281  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3282  switch (pos_args) {
3283  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3284  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3285  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3286  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3287  case 0: break;
3288  default: goto __pyx_L5_argtuple_error;
3289  }
3290  kw_args = PyDict_Size(__pyx_kwds);
3291  switch (pos_args) {
3292  case 0:
3293  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reactionString)) != 0)) kw_args--;
3294  else goto __pyx_L5_argtuple_error;
3295  case 1:
3296  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reactants)) != 0)) kw_args--;
3297  else {
3298  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 98, __pyx_L3_error)
3299  }
3300  case 2:
3301  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parentAmns)) != 0)) kw_args--;
3302  else {
3303  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 98, __pyx_L3_error)
3304  }
3305  case 3:
3306  if (kw_args > 0) {
3307  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isotope_resolved);
3308  if (value) { values[3] = value; kw_args--; }
3309  }
3310  }
3311  if (unlikely(kw_args > 0)) {
3312  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 98, __pyx_L3_error)
3313  }
3314  } else {
3315  switch (PyTuple_GET_SIZE(__pyx_args)) {
3316  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3317  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3318  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3319  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3320  break;
3321  default: goto __pyx_L5_argtuple_error;
3322  }
3323  }
3324  __pyx_v_reactionString = values[0];
3325  __pyx_v_reactants = ((struct __pyx_obj_4amns_Reactants *)values[1]);
3326  __pyx_v_parentAmns = ((struct __pyx_obj_4amns_Amns *)values[2]);
3327  __pyx_v_isotope_resolved = values[3];
3328  }
3329  goto __pyx_L4_argument_unpacking_done;
3330  __pyx_L5_argtuple_error:;
3331  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 98, __pyx_L3_error)
3332  __pyx_L3_error:;
3333  __Pyx_AddTraceback("amns.Table.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3334  __Pyx_RefNannyFinishContext();
3335  return -1;
3336  __pyx_L4_argument_unpacking_done:;
3337  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reactants), __pyx_ptype_4amns_Reactants, 1, "reactants", 0))) __PYX_ERR(0, 98, __pyx_L1_error)
3338  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parentAmns), __pyx_ptype_4amns_Amns, 1, "parentAmns", 0))) __PYX_ERR(0, 98, __pyx_L1_error)
3339  __pyx_r = __pyx_pf_4amns_5Table___init__(((struct __pyx_obj_4amns_Table *)__pyx_v_self), __pyx_v_reactionString, __pyx_v_reactants, __pyx_v_parentAmns, __pyx_v_isotope_resolved);
3340 
3341  /* function exit code */
3342  goto __pyx_L0;
3343  __pyx_L1_error:;
3344  __pyx_r = -1;
3345  __pyx_L0:;
3346  __Pyx_RefNannyFinishContext();
3347  return __pyx_r;
3348 }
3349 
3350 static int __pyx_pf_4amns_5Table___init__(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_reactionString, struct __pyx_obj_4amns_Reactants *__pyx_v_reactants, struct __pyx_obj_4amns_Amns *__pyx_v_parentAmns, PyObject *__pyx_v_isotope_resolved) {
3351  amns_c_error_type __pyx_v_error_status;
3352  amns_c_reaction_type __pyx_v_reaction;
3353  int __pyx_r;
3354  __Pyx_RefNannyDeclarations
3355  char *__pyx_t_1;
3356  int __pyx_t_2;
3357  int __pyx_t_3;
3358  PyObject *__pyx_t_4 = NULL;
3359  PyObject *__pyx_t_5 = NULL;
3360  PyObject *__pyx_t_6 = NULL;
3361  PyObject *__pyx_t_7 = NULL;
3362  PyObject *__pyx_t_8 = NULL;
3363  __Pyx_RefNannySetupContext("__init__", 0);
3364 
3365  /* "amns.pyx":102
3366  * cdef camns_interface.amns_c_error_type error_status
3367  * cdef camns_interface.amns_c_reaction_type reaction
3368  * reaction = camns_interface.get_default_amns_c_reaction_type() # <<<<<<<<<<<<<<
3369  * self._parentAmns = parentAmns
3370  * reaction.string = reactionString
3371  */
3372  __pyx_v_reaction = get_default_amns_c_reaction_type();
3373 
3374  /* "amns.pyx":103
3375  * cdef camns_interface.amns_c_reaction_type reaction
3376  * reaction = camns_interface.get_default_amns_c_reaction_type()
3377  * self._parentAmns = parentAmns # <<<<<<<<<<<<<<
3378  * reaction.string = reactionString
3379  * if isotope_resolved : reaction.isotope_resolved = isotope_resolved
3380  */
3381  __Pyx_INCREF(((PyObject *)__pyx_v_parentAmns));
3382  __Pyx_GIVEREF(((PyObject *)__pyx_v_parentAmns));
3383  __Pyx_GOTREF(__pyx_v_self->_parentAmns);
3384  __Pyx_DECREF(((PyObject *)__pyx_v_self->_parentAmns));
3385  __pyx_v_self->_parentAmns = __pyx_v_parentAmns;
3386 
3387  /* "amns.pyx":104
3388  * reaction = camns_interface.get_default_amns_c_reaction_type()
3389  * self._parentAmns = parentAmns
3390  * reaction.string = reactionString # <<<<<<<<<<<<<<
3391  * if isotope_resolved : reaction.isotope_resolved = isotope_resolved
3392  * camns_interface.ITM_AMNS_CC_SETUP_TABLE(self._parentAmns.handle(),
3393  */
3394  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_reactionString); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L1_error)
3395  __pyx_v_reaction.string = __pyx_t_1;
3396 
3397  /* "amns.pyx":105
3398  * self._parentAmns = parentAmns
3399  * reaction.string = reactionString
3400  * if isotope_resolved : reaction.isotope_resolved = isotope_resolved # <<<<<<<<<<<<<<
3401  * camns_interface.ITM_AMNS_CC_SETUP_TABLE(self._parentAmns.handle(),
3402  * &reaction,
3403  */
3404  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_isotope_resolved); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 105, __pyx_L1_error)
3405  if (__pyx_t_2) {
3406  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_isotope_resolved); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L1_error)
3407  __pyx_v_reaction.isotope_resolved = __pyx_t_3;
3408  }
3409 
3410  /* "amns.pyx":106
3411  * reaction.string = reactionString
3412  * if isotope_resolved : reaction.isotope_resolved = isotope_resolved
3413  * camns_interface.ITM_AMNS_CC_SETUP_TABLE(self._parentAmns.handle(), # <<<<<<<<<<<<<<
3414  * &reaction,
3415  * reactants.handle(), &self._handle,
3416  */
3417  ITM_AMNS_CC_SETUP_TABLE(((struct __pyx_vtabstruct_4amns_Amns *)__pyx_v_self->_parentAmns->__pyx_vtab)->handle(__pyx_v_self->_parentAmns), (&__pyx_v_reaction), ((struct __pyx_vtabstruct_4amns_Reactants *)__pyx_v_reactants->__pyx_vtab)->handle(__pyx_v_reactants), (&__pyx_v_self->_handle), (&__pyx_v_error_status));
3418 
3419  /* "amns.pyx":110
3420  * reactants.handle(), &self._handle,
3421  * &error_status)
3422  * if error_status.flag: # <<<<<<<<<<<<<<
3423  * raise AmnsException(error_status.string)
3424  *
3425  */
3426  __pyx_t_2 = (__pyx_v_error_status.flag != 0);
3427  if (__pyx_t_2) {
3428 
3429  /* "amns.pyx":111
3430  * &error_status)
3431  * if error_status.flag:
3432  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
3433  *
3434  * self.set("nowarn")
3435  */
3436  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error)
3437  __Pyx_GOTREF(__pyx_t_5);
3438  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
3439  __Pyx_GOTREF(__pyx_t_6);
3440  __pyx_t_7 = NULL;
3441  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
3442  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
3443  if (likely(__pyx_t_7)) {
3444  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
3445  __Pyx_INCREF(__pyx_t_7);
3446  __Pyx_INCREF(function);
3447  __Pyx_DECREF_SET(__pyx_t_5, function);
3448  }
3449  }
3450  if (!__pyx_t_7) {
3451  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
3452  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3453  __Pyx_GOTREF(__pyx_t_4);
3454  } else {
3455  #if CYTHON_FAST_PYCALL
3456  if (PyFunction_Check(__pyx_t_5)) {
3457  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
3458  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
3459  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3460  __Pyx_GOTREF(__pyx_t_4);
3461  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3462  } else
3463  #endif
3464  #if CYTHON_FAST_PYCCALL
3465  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
3466  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
3467  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
3468  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3469  __Pyx_GOTREF(__pyx_t_4);
3470  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3471  } else
3472  #endif
3473  {
3474  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 111, __pyx_L1_error)
3475  __Pyx_GOTREF(__pyx_t_8);
3476  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
3477  __Pyx_GIVEREF(__pyx_t_6);
3478  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
3479  __pyx_t_6 = 0;
3480  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
3481  __Pyx_GOTREF(__pyx_t_4);
3482  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3483  }
3484  }
3485  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3486  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
3487  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3488  __PYX_ERR(0, 111, __pyx_L1_error)
3489 
3490  /* "amns.pyx":110
3491  * reactants.handle(), &self._handle,
3492  * &error_status)
3493  * if error_status.flag: # <<<<<<<<<<<<<<
3494  * raise AmnsException(error_status.string)
3495  *
3496  */
3497  }
3498 
3499  /* "amns.pyx":113
3500  * raise AmnsException(error_status.string)
3501  *
3502  * self.set("nowarn") # <<<<<<<<<<<<<<
3503  *
3504  *
3505  */
3506  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
3507  __Pyx_GOTREF(__pyx_t_4);
3508  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
3509  __Pyx_GOTREF(__pyx_t_5);
3510  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3511  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3512 
3513  /* "amns.pyx":98
3514  * cdef Amns _parentAmns
3515  *
3516  * def __init__(self, reactionString, Reactants reactants, Amns parentAmns, isotope_resolved=None): # <<<<<<<<<<<<<<
3517  * """Create a new table"""
3518  * cdef camns_interface.amns_c_error_type error_status
3519  */
3520 
3521  /* function exit code */
3522  __pyx_r = 0;
3523  goto __pyx_L0;
3524  __pyx_L1_error:;
3525  __Pyx_XDECREF(__pyx_t_4);
3526  __Pyx_XDECREF(__pyx_t_5);
3527  __Pyx_XDECREF(__pyx_t_6);
3528  __Pyx_XDECREF(__pyx_t_7);
3529  __Pyx_XDECREF(__pyx_t_8);
3530  __Pyx_AddTraceback("amns.Table.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3531  __pyx_r = -1;
3532  __pyx_L0:;
3533  __Pyx_RefNannyFinishContext();
3534  return __pyx_r;
3535 }
3536 
3537 /* "amns.pyx":116
3538  *
3539  *
3540  * cdef camns_interface.amns_c_answer_type lquery(self, queryString): # <<<<<<<<<<<<<<
3541  * cdef camns_interface.amns_c_query_type query
3542  * cdef camns_interface.amns_c_answer_type answer
3543  */
3544 
3545 static amns_c_answer_type __pyx_f_4amns_5Table_lquery(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_queryString) {
3546  amns_c_query_type __pyx_v_query;
3547  amns_c_answer_type __pyx_v_answer;
3548  amns_c_error_type __pyx_v_error_status;
3549  amns_c_answer_type __pyx_r;
3550  __Pyx_RefNannyDeclarations
3551  char *__pyx_t_1;
3552  int __pyx_t_2;
3553  PyObject *__pyx_t_3 = NULL;
3554  PyObject *__pyx_t_4 = NULL;
3555  PyObject *__pyx_t_5 = NULL;
3556  PyObject *__pyx_t_6 = NULL;
3557  PyObject *__pyx_t_7 = NULL;
3558  __Pyx_RefNannySetupContext("lquery", 0);
3559 
3560  /* "amns.pyx":120
3561  * cdef camns_interface.amns_c_answer_type answer
3562  * cdef camns_interface.amns_c_error_type error_status
3563  * query.string = queryString # <<<<<<<<<<<<<<
3564  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status);
3565  * if error_status.flag:
3566  */
3567  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_queryString); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error)
3568  __pyx_v_query.string = __pyx_t_1;
3569 
3570  /* "amns.pyx":121
3571  * cdef camns_interface.amns_c_error_type error_status
3572  * query.string = queryString
3573  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status); # <<<<<<<<<<<<<<
3574  * if error_status.flag:
3575  * raise AmnsException(error_status.string)
3576  */
3577  ITM_AMNS_CC_QUERY_TABLE(__pyx_v_self->_handle, (&__pyx_v_query), (&__pyx_v_answer), (&__pyx_v_error_status));
3578 
3579  /* "amns.pyx":122
3580  * query.string = queryString
3581  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status);
3582  * if error_status.flag: # <<<<<<<<<<<<<<
3583  * raise AmnsException(error_status.string)
3584  * return answer
3585  */
3586  __pyx_t_2 = (__pyx_v_error_status.flag != 0);
3587  if (__pyx_t_2) {
3588 
3589  /* "amns.pyx":123
3590  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status);
3591  * if error_status.flag:
3592  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
3593  * return answer
3594  *
3595  */
3596  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error)
3597  __Pyx_GOTREF(__pyx_t_4);
3598  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
3599  __Pyx_GOTREF(__pyx_t_5);
3600  __pyx_t_6 = NULL;
3601  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
3602  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
3603  if (likely(__pyx_t_6)) {
3604  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3605  __Pyx_INCREF(__pyx_t_6);
3606  __Pyx_INCREF(function);
3607  __Pyx_DECREF_SET(__pyx_t_4, function);
3608  }
3609  }
3610  if (!__pyx_t_6) {
3611  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
3612  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3613  __Pyx_GOTREF(__pyx_t_3);
3614  } else {
3615  #if CYTHON_FAST_PYCALL
3616  if (PyFunction_Check(__pyx_t_4)) {
3617  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
3618  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
3619  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3620  __Pyx_GOTREF(__pyx_t_3);
3621  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3622  } else
3623  #endif
3624  #if CYTHON_FAST_PYCCALL
3625  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
3626  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
3627  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
3628  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3629  __Pyx_GOTREF(__pyx_t_3);
3630  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3631  } else
3632  #endif
3633  {
3634  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 123, __pyx_L1_error)
3635  __Pyx_GOTREF(__pyx_t_7);
3636  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
3637  __Pyx_GIVEREF(__pyx_t_5);
3638  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
3639  __pyx_t_5 = 0;
3640  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
3641  __Pyx_GOTREF(__pyx_t_3);
3642  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3643  }
3644  }
3645  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3646  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
3647  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3648  __PYX_ERR(0, 123, __pyx_L1_error)
3649 
3650  /* "amns.pyx":122
3651  * query.string = queryString
3652  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status);
3653  * if error_status.flag: # <<<<<<<<<<<<<<
3654  * raise AmnsException(error_status.string)
3655  * return answer
3656  */
3657  }
3658 
3659  /* "amns.pyx":124
3660  * if error_status.flag:
3661  * raise AmnsException(error_status.string)
3662  * return answer # <<<<<<<<<<<<<<
3663  *
3664  * def query(self, queryString):
3665  */
3666  __pyx_r = __pyx_v_answer;
3667  goto __pyx_L0;
3668 
3669  /* "amns.pyx":116
3670  *
3671  *
3672  * cdef camns_interface.amns_c_answer_type lquery(self, queryString): # <<<<<<<<<<<<<<
3673  * cdef camns_interface.amns_c_query_type query
3674  * cdef camns_interface.amns_c_answer_type answer
3675  */
3676 
3677  /* function exit code */
3678  __pyx_L1_error:;
3679  __Pyx_XDECREF(__pyx_t_3);
3680  __Pyx_XDECREF(__pyx_t_4);
3681  __Pyx_XDECREF(__pyx_t_5);
3682  __Pyx_XDECREF(__pyx_t_6);
3683  __Pyx_XDECREF(__pyx_t_7);
3684  __Pyx_WriteUnraisable("amns.Table.lquery", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
3685  __pyx_L0:;
3686  __Pyx_RefNannyFinishContext();
3687  return __pyx_r;
3688 }
3689 
3690 /* "amns.pyx":126
3691  * return answer
3692  *
3693  * def query(self, queryString): # <<<<<<<<<<<<<<
3694  * """Provide the interface to ITM_AMNS_QUERY_TABLE"""
3695  * cdef camns_interface.amns_c_query_type query
3696  */
3697 
3698 /* Python wrapper */
3699 static PyObject *__pyx_pw_4amns_5Table_3query(PyObject *__pyx_v_self, PyObject *__pyx_v_queryString); /*proto*/
3700 static char __pyx_doc_4amns_5Table_2query[] = "Provide the interface to ITM_AMNS_QUERY_TABLE";
3701 static PyObject *__pyx_pw_4amns_5Table_3query(PyObject *__pyx_v_self, PyObject *__pyx_v_queryString) {
3702  PyObject *__pyx_r = 0;
3703  __Pyx_RefNannyDeclarations
3704  __Pyx_RefNannySetupContext("query (wrapper)", 0);
3705  __pyx_r = __pyx_pf_4amns_5Table_2query(((struct __pyx_obj_4amns_Table *)__pyx_v_self), ((PyObject *)__pyx_v_queryString));
3706 
3707  /* function exit code */
3708  __Pyx_RefNannyFinishContext();
3709  return __pyx_r;
3710 }
3711 
3712 static PyObject *__pyx_pf_4amns_5Table_2query(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_queryString) {
3713  amns_c_query_type __pyx_v_query;
3714  amns_c_answer_type __pyx_v_answer;
3715  amns_c_error_type __pyx_v_error_status;
3716  PyObject *__pyx_r = NULL;
3717  __Pyx_RefNannyDeclarations
3718  char *__pyx_t_1;
3719  int __pyx_t_2;
3720  PyObject *__pyx_t_3 = NULL;
3721  PyObject *__pyx_t_4 = NULL;
3722  PyObject *__pyx_t_5 = NULL;
3723  PyObject *__pyx_t_6 = NULL;
3724  PyObject *__pyx_t_7 = NULL;
3725  __Pyx_RefNannySetupContext("query", 0);
3726 
3727  /* "amns.pyx":131
3728  * cdef camns_interface.amns_c_answer_type answer
3729  * cdef camns_interface.amns_c_error_type error_status
3730  * query.string = queryString # <<<<<<<<<<<<<<
3731  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status);
3732  * if error_status.flag:
3733  */
3734  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_queryString); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error)
3735  __pyx_v_query.string = __pyx_t_1;
3736 
3737  /* "amns.pyx":132
3738  * cdef camns_interface.amns_c_error_type error_status
3739  * query.string = queryString
3740  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status); # <<<<<<<<<<<<<<
3741  * if error_status.flag:
3742  * raise AmnsException(error_status.string)
3743  */
3744  ITM_AMNS_CC_QUERY_TABLE(__pyx_v_self->_handle, (&__pyx_v_query), (&__pyx_v_answer), (&__pyx_v_error_status));
3745 
3746  /* "amns.pyx":133
3747  * query.string = queryString
3748  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status);
3749  * if error_status.flag: # <<<<<<<<<<<<<<
3750  * raise AmnsException(error_status.string)
3751  * return answer.string, answer.number
3752  */
3753  __pyx_t_2 = (__pyx_v_error_status.flag != 0);
3754  if (__pyx_t_2) {
3755 
3756  /* "amns.pyx":134
3757  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status);
3758  * if error_status.flag:
3759  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
3760  * return answer.string, answer.number
3761  *
3762  */
3763  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error)
3764  __Pyx_GOTREF(__pyx_t_4);
3765  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)
3766  __Pyx_GOTREF(__pyx_t_5);
3767  __pyx_t_6 = NULL;
3768  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
3769  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
3770  if (likely(__pyx_t_6)) {
3771  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3772  __Pyx_INCREF(__pyx_t_6);
3773  __Pyx_INCREF(function);
3774  __Pyx_DECREF_SET(__pyx_t_4, function);
3775  }
3776  }
3777  if (!__pyx_t_6) {
3778  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
3779  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3780  __Pyx_GOTREF(__pyx_t_3);
3781  } else {
3782  #if CYTHON_FAST_PYCALL
3783  if (PyFunction_Check(__pyx_t_4)) {
3784  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
3785  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
3786  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3787  __Pyx_GOTREF(__pyx_t_3);
3788  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3789  } else
3790  #endif
3791  #if CYTHON_FAST_PYCCALL
3792  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
3793  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
3794  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
3795  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3796  __Pyx_GOTREF(__pyx_t_3);
3797  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3798  } else
3799  #endif
3800  {
3801  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
3802  __Pyx_GOTREF(__pyx_t_7);
3803  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
3804  __Pyx_GIVEREF(__pyx_t_5);
3805  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
3806  __pyx_t_5 = 0;
3807  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
3808  __Pyx_GOTREF(__pyx_t_3);
3809  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3810  }
3811  }
3812  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3813  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
3814  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3815  __PYX_ERR(0, 134, __pyx_L1_error)
3816 
3817  /* "amns.pyx":133
3818  * query.string = queryString
3819  * camns_interface.ITM_AMNS_CC_QUERY_TABLE(self._handle, &query, &answer, &error_status);
3820  * if error_status.flag: # <<<<<<<<<<<<<<
3821  * raise AmnsException(error_status.string)
3822  * return answer.string, answer.number
3823  */
3824  }
3825 
3826  /* "amns.pyx":135
3827  * if error_status.flag:
3828  * raise AmnsException(error_status.string)
3829  * return answer.string, answer.number # <<<<<<<<<<<<<<
3830  *
3831  * def set(self, setString):
3832  */
3833  __Pyx_XDECREF(__pyx_r);
3834  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
3835  __Pyx_GOTREF(__pyx_t_3);
3836  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_answer.number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
3837  __Pyx_GOTREF(__pyx_t_4);
3838  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 135, __pyx_L1_error)
3839  __Pyx_GOTREF(__pyx_t_7);
3840  __Pyx_GIVEREF(__pyx_t_3);
3841  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
3842  __Pyx_GIVEREF(__pyx_t_4);
3843  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
3844  __pyx_t_3 = 0;
3845  __pyx_t_4 = 0;
3846  __pyx_r = __pyx_t_7;
3847  __pyx_t_7 = 0;
3848  goto __pyx_L0;
3849 
3850  /* "amns.pyx":126
3851  * return answer
3852  *
3853  * def query(self, queryString): # <<<<<<<<<<<<<<
3854  * """Provide the interface to ITM_AMNS_QUERY_TABLE"""
3855  * cdef camns_interface.amns_c_query_type query
3856  */
3857 
3858  /* function exit code */
3859  __pyx_L1_error:;
3860  __Pyx_XDECREF(__pyx_t_3);
3861  __Pyx_XDECREF(__pyx_t_4);
3862  __Pyx_XDECREF(__pyx_t_5);
3863  __Pyx_XDECREF(__pyx_t_6);
3864  __Pyx_XDECREF(__pyx_t_7);
3865  __Pyx_AddTraceback("amns.Table.query", __pyx_clineno, __pyx_lineno, __pyx_filename);
3866  __pyx_r = NULL;
3867  __pyx_L0:;
3868  __Pyx_XGIVEREF(__pyx_r);
3869  __Pyx_RefNannyFinishContext();
3870  return __pyx_r;
3871 }
3872 
3873 /* "amns.pyx":137
3874  * return answer.string, answer.number
3875  *
3876  * def set(self, setString): # <<<<<<<<<<<<<<
3877  * """Provide the interface to ITM_AMNS_SET_TABLE"""
3878  * cdef camns_interface.amns_c_set_type set
3879  */
3880 
3881 /* Python wrapper */
3882 static PyObject *__pyx_pw_4amns_5Table_5set(PyObject *__pyx_v_self, PyObject *__pyx_v_setString); /*proto*/
3883 static char __pyx_doc_4amns_5Table_4set[] = "Provide the interface to ITM_AMNS_SET_TABLE";
3884 static PyObject *__pyx_pw_4amns_5Table_5set(PyObject *__pyx_v_self, PyObject *__pyx_v_setString) {
3885  PyObject *__pyx_r = 0;
3886  __Pyx_RefNannyDeclarations
3887  __Pyx_RefNannySetupContext("set (wrapper)", 0);
3888  __pyx_r = __pyx_pf_4amns_5Table_4set(((struct __pyx_obj_4amns_Table *)__pyx_v_self), ((PyObject *)__pyx_v_setString));
3889 
3890  /* function exit code */
3891  __Pyx_RefNannyFinishContext();
3892  return __pyx_r;
3893 }
3894 
3895 static PyObject *__pyx_pf_4amns_5Table_4set(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_setString) {
3896  amns_c_set_type __pyx_v_set;
3897  amns_c_error_type __pyx_v_error_status;
3898  PyObject *__pyx_r = NULL;
3899  __Pyx_RefNannyDeclarations
3900  char *__pyx_t_1;
3901  int __pyx_t_2;
3902  PyObject *__pyx_t_3 = NULL;
3903  PyObject *__pyx_t_4 = NULL;
3904  PyObject *__pyx_t_5 = NULL;
3905  PyObject *__pyx_t_6 = NULL;
3906  PyObject *__pyx_t_7 = NULL;
3907  __Pyx_RefNannySetupContext("set", 0);
3908 
3909  /* "amns.pyx":141
3910  * cdef camns_interface.amns_c_set_type set
3911  * cdef camns_interface.amns_c_error_type error_status
3912  * set.string = setString # <<<<<<<<<<<<<<
3913  * camns_interface.ITM_AMNS_CC_SET_TABLE(self._handle, &set, &error_status);
3914  * if error_status.flag:
3915  */
3916  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_setString); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
3917  __pyx_v_set.string = __pyx_t_1;
3918 
3919  /* "amns.pyx":142
3920  * cdef camns_interface.amns_c_error_type error_status
3921  * set.string = setString
3922  * camns_interface.ITM_AMNS_CC_SET_TABLE(self._handle, &set, &error_status); # <<<<<<<<<<<<<<
3923  * if error_status.flag:
3924  * raise AmnsException(error_status.string)
3925  */
3926  ITM_AMNS_CC_SET_TABLE(__pyx_v_self->_handle, (&__pyx_v_set), (&__pyx_v_error_status));
3927 
3928  /* "amns.pyx":143
3929  * set.string = setString
3930  * camns_interface.ITM_AMNS_CC_SET_TABLE(self._handle, &set, &error_status);
3931  * if error_status.flag: # <<<<<<<<<<<<<<
3932  * raise AmnsException(error_status.string)
3933  *
3934  */
3935  __pyx_t_2 = (__pyx_v_error_status.flag != 0);
3936  if (__pyx_t_2) {
3937 
3938  /* "amns.pyx":144
3939  * camns_interface.ITM_AMNS_CC_SET_TABLE(self._handle, &set, &error_status);
3940  * if error_status.flag:
3941  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
3942  *
3943  * def finalize(self):
3944  */
3945  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
3946  __Pyx_GOTREF(__pyx_t_4);
3947  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
3948  __Pyx_GOTREF(__pyx_t_5);
3949  __pyx_t_6 = NULL;
3950  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
3951  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
3952  if (likely(__pyx_t_6)) {
3953  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3954  __Pyx_INCREF(__pyx_t_6);
3955  __Pyx_INCREF(function);
3956  __Pyx_DECREF_SET(__pyx_t_4, function);
3957  }
3958  }
3959  if (!__pyx_t_6) {
3960  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
3961  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3962  __Pyx_GOTREF(__pyx_t_3);
3963  } else {
3964  #if CYTHON_FAST_PYCALL
3965  if (PyFunction_Check(__pyx_t_4)) {
3966  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
3967  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
3968  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3969  __Pyx_GOTREF(__pyx_t_3);
3970  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3971  } else
3972  #endif
3973  #if CYTHON_FAST_PYCCALL
3974  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
3975  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
3976  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
3977  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3978  __Pyx_GOTREF(__pyx_t_3);
3979  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3980  } else
3981  #endif
3982  {
3983  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
3984  __Pyx_GOTREF(__pyx_t_7);
3985  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
3986  __Pyx_GIVEREF(__pyx_t_5);
3987  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
3988  __pyx_t_5 = 0;
3989  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
3990  __Pyx_GOTREF(__pyx_t_3);
3991  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3992  }
3993  }
3994  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3995  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
3996  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3997  __PYX_ERR(0, 144, __pyx_L1_error)
3998 
3999  /* "amns.pyx":143
4000  * set.string = setString
4001  * camns_interface.ITM_AMNS_CC_SET_TABLE(self._handle, &set, &error_status);
4002  * if error_status.flag: # <<<<<<<<<<<<<<
4003  * raise AmnsException(error_status.string)
4004  *
4005  */
4006  }
4007 
4008  /* "amns.pyx":137
4009  * return answer.string, answer.number
4010  *
4011  * def set(self, setString): # <<<<<<<<<<<<<<
4012  * """Provide the interface to ITM_AMNS_SET_TABLE"""
4013  * cdef camns_interface.amns_c_set_type set
4014  */
4015 
4016  /* function exit code */
4017  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4018  goto __pyx_L0;
4019  __pyx_L1_error:;
4020  __Pyx_XDECREF(__pyx_t_3);
4021  __Pyx_XDECREF(__pyx_t_4);
4022  __Pyx_XDECREF(__pyx_t_5);
4023  __Pyx_XDECREF(__pyx_t_6);
4024  __Pyx_XDECREF(__pyx_t_7);
4025  __Pyx_AddTraceback("amns.Table.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
4026  __pyx_r = NULL;
4027  __pyx_L0:;
4028  __Pyx_XGIVEREF(__pyx_r);
4029  __Pyx_RefNannyFinishContext();
4030  return __pyx_r;
4031 }
4032 
4033 /* "amns.pyx":146
4034  * raise AmnsException(error_status.string)
4035  *
4036  * def finalize(self): # <<<<<<<<<<<<<<
4037  * """Provide the interface to ITM_AMNS_FINISH_TABLE"""
4038  * cdef camns_interface.amns_c_error_type error_status
4039  */
4040 
4041 /* Python wrapper */
4042 static PyObject *__pyx_pw_4amns_5Table_7finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4043 static char __pyx_doc_4amns_5Table_6finalize[] = "Provide the interface to ITM_AMNS_FINISH_TABLE";
4044 static PyObject *__pyx_pw_4amns_5Table_7finalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4045  PyObject *__pyx_r = 0;
4046  __Pyx_RefNannyDeclarations
4047  __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
4048  __pyx_r = __pyx_pf_4amns_5Table_6finalize(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4049 
4050  /* function exit code */
4051  __Pyx_RefNannyFinishContext();
4052  return __pyx_r;
4053 }
4054 
4055 static PyObject *__pyx_pf_4amns_5Table_6finalize(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4056  amns_c_error_type __pyx_v_error_status;
4057  PyObject *__pyx_r = NULL;
4058  __Pyx_RefNannyDeclarations
4059  int __pyx_t_1;
4060  PyObject *__pyx_t_2 = NULL;
4061  PyObject *__pyx_t_3 = NULL;
4062  PyObject *__pyx_t_4 = NULL;
4063  PyObject *__pyx_t_5 = NULL;
4064  PyObject *__pyx_t_6 = NULL;
4065  __Pyx_RefNannySetupContext("finalize", 0);
4066 
4067  /* "amns.pyx":149
4068  * """Provide the interface to ITM_AMNS_FINISH_TABLE"""
4069  * cdef camns_interface.amns_c_error_type error_status
4070  * camns_interface.ITM_AMNS_CC_FINISH_TABLE(&self._handle, &error_status) # <<<<<<<<<<<<<<
4071  * if error_status.flag:
4072  * raise AmnsException(error_status.string)
4073  */
4074  ITM_AMNS_CC_FINISH_TABLE((&__pyx_v_self->_handle), (&__pyx_v_error_status));
4075 
4076  /* "amns.pyx":150
4077  * cdef camns_interface.amns_c_error_type error_status
4078  * camns_interface.ITM_AMNS_CC_FINISH_TABLE(&self._handle, &error_status)
4079  * if error_status.flag: # <<<<<<<<<<<<<<
4080  * raise AmnsException(error_status.string)
4081  *
4082  */
4083  __pyx_t_1 = (__pyx_v_error_status.flag != 0);
4084  if (__pyx_t_1) {
4085 
4086  /* "amns.pyx":151
4087  * camns_interface.ITM_AMNS_CC_FINISH_TABLE(&self._handle, &error_status)
4088  * if error_status.flag:
4089  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
4090  *
4091  * @property
4092  */
4093  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
4094  __Pyx_GOTREF(__pyx_t_3);
4095  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
4096  __Pyx_GOTREF(__pyx_t_4);
4097  __pyx_t_5 = NULL;
4098  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4099  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
4100  if (likely(__pyx_t_5)) {
4101  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4102  __Pyx_INCREF(__pyx_t_5);
4103  __Pyx_INCREF(function);
4104  __Pyx_DECREF_SET(__pyx_t_3, function);
4105  }
4106  }
4107  if (!__pyx_t_5) {
4108  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
4109  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4110  __Pyx_GOTREF(__pyx_t_2);
4111  } else {
4112  #if CYTHON_FAST_PYCALL
4113  if (PyFunction_Check(__pyx_t_3)) {
4114  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
4115  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
4116  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4117  __Pyx_GOTREF(__pyx_t_2);
4118  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4119  } else
4120  #endif
4121  #if CYTHON_FAST_PYCCALL
4122  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
4123  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
4124  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
4125  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4126  __Pyx_GOTREF(__pyx_t_2);
4127  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4128  } else
4129  #endif
4130  {
4131  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
4132  __Pyx_GOTREF(__pyx_t_6);
4133  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
4134  __Pyx_GIVEREF(__pyx_t_4);
4135  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
4136  __pyx_t_4 = 0;
4137  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
4138  __Pyx_GOTREF(__pyx_t_2);
4139  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4140  }
4141  }
4142  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4143  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4144  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4145  __PYX_ERR(0, 151, __pyx_L1_error)
4146 
4147  /* "amns.pyx":150
4148  * cdef camns_interface.amns_c_error_type error_status
4149  * camns_interface.ITM_AMNS_CC_FINISH_TABLE(&self._handle, &error_status)
4150  * if error_status.flag: # <<<<<<<<<<<<<<
4151  * raise AmnsException(error_status.string)
4152  *
4153  */
4154  }
4155 
4156  /* "amns.pyx":146
4157  * raise AmnsException(error_status.string)
4158  *
4159  * def finalize(self): # <<<<<<<<<<<<<<
4160  * """Provide the interface to ITM_AMNS_FINISH_TABLE"""
4161  * cdef camns_interface.amns_c_error_type error_status
4162  */
4163 
4164  /* function exit code */
4165  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4166  goto __pyx_L0;
4167  __pyx_L1_error:;
4168  __Pyx_XDECREF(__pyx_t_2);
4169  __Pyx_XDECREF(__pyx_t_3);
4170  __Pyx_XDECREF(__pyx_t_4);
4171  __Pyx_XDECREF(__pyx_t_5);
4172  __Pyx_XDECREF(__pyx_t_6);
4173  __Pyx_AddTraceback("amns.Table.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
4174  __pyx_r = NULL;
4175  __pyx_L0:;
4176  __Pyx_XGIVEREF(__pyx_r);
4177  __Pyx_RefNannyFinishContext();
4178  return __pyx_r;
4179 }
4180 
4181 /* "amns.pyx":154
4182  *
4183  * @property
4184  * def no_of_reactants(self): # <<<<<<<<<<<<<<
4185  * """Query for no_of_reactants associated with the AMNS table"""
4186  * cdef camns_interface.amns_c_answer_type answer
4187  */
4188 
4189 /* Python wrapper */
4190 static PyObject *__pyx_pw_4amns_5Table_15no_of_reactants_1__get__(PyObject *__pyx_v_self); /*proto*/
4191 static PyObject *__pyx_pw_4amns_5Table_15no_of_reactants_1__get__(PyObject *__pyx_v_self) {
4192  PyObject *__pyx_r = 0;
4193  __Pyx_RefNannyDeclarations
4194  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4195  __pyx_r = __pyx_pf_4amns_5Table_15no_of_reactants___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4196 
4197  /* function exit code */
4198  __Pyx_RefNannyFinishContext();
4199  return __pyx_r;
4200 }
4201 
4202 static PyObject *__pyx_pf_4amns_5Table_15no_of_reactants___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4203  amns_c_answer_type __pyx_v_answer;
4204  PyObject *__pyx_r = NULL;
4205  __Pyx_RefNannyDeclarations
4206  PyObject *__pyx_t_1 = NULL;
4207  __Pyx_RefNannySetupContext("__get__", 0);
4208 
4209  /* "amns.pyx":157
4210  * """Query for no_of_reactants associated with the AMNS table"""
4211  * cdef camns_interface.amns_c_answer_type answer
4212  * answer = self.lquery("no_of_reactants") # <<<<<<<<<<<<<<
4213  * return answer.number
4214  *
4215  */
4216  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_no_of_reactants);
4217 
4218  /* "amns.pyx":158
4219  * cdef camns_interface.amns_c_answer_type answer
4220  * answer = self.lquery("no_of_reactants")
4221  * return answer.number # <<<<<<<<<<<<<<
4222  *
4223  * @property
4224  */
4225  __Pyx_XDECREF(__pyx_r);
4226  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_answer.number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
4227  __Pyx_GOTREF(__pyx_t_1);
4228  __pyx_r = __pyx_t_1;
4229  __pyx_t_1 = 0;
4230  goto __pyx_L0;
4231 
4232  /* "amns.pyx":154
4233  *
4234  * @property
4235  * def no_of_reactants(self): # <<<<<<<<<<<<<<
4236  * """Query for no_of_reactants associated with the AMNS table"""
4237  * cdef camns_interface.amns_c_answer_type answer
4238  */
4239 
4240  /* function exit code */
4241  __pyx_L1_error:;
4242  __Pyx_XDECREF(__pyx_t_1);
4243  __Pyx_AddTraceback("amns.Table.no_of_reactants.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4244  __pyx_r = NULL;
4245  __pyx_L0:;
4246  __Pyx_XGIVEREF(__pyx_r);
4247  __Pyx_RefNannyFinishContext();
4248  return __pyx_r;
4249 }
4250 
4251 /* "amns.pyx":161
4252  *
4253  * @property
4254  * def ndim(self): # <<<<<<<<<<<<<<
4255  * """Query for ndim associated with the AMNS table"""
4256  * cdef camns_interface.amns_c_answer_type answer
4257  */
4258 
4259 /* Python wrapper */
4260 static PyObject *__pyx_pw_4amns_5Table_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
4261 static PyObject *__pyx_pw_4amns_5Table_4ndim_1__get__(PyObject *__pyx_v_self) {
4262  PyObject *__pyx_r = 0;
4263  __Pyx_RefNannyDeclarations
4264  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4265  __pyx_r = __pyx_pf_4amns_5Table_4ndim___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4266 
4267  /* function exit code */
4268  __Pyx_RefNannyFinishContext();
4269  return __pyx_r;
4270 }
4271 
4272 static PyObject *__pyx_pf_4amns_5Table_4ndim___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4273  amns_c_answer_type __pyx_v_answer;
4274  PyObject *__pyx_r = NULL;
4275  __Pyx_RefNannyDeclarations
4276  PyObject *__pyx_t_1 = NULL;
4277  __Pyx_RefNannySetupContext("__get__", 0);
4278 
4279  /* "amns.pyx":164
4280  * """Query for ndim associated with the AMNS table"""
4281  * cdef camns_interface.amns_c_answer_type answer
4282  * answer = self.lquery("ndim") # <<<<<<<<<<<<<<
4283  * return answer.number
4284  *
4285  */
4286  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_ndim);
4287 
4288  /* "amns.pyx":165
4289  * cdef camns_interface.amns_c_answer_type answer
4290  * answer = self.lquery("ndim")
4291  * return answer.number # <<<<<<<<<<<<<<
4292  *
4293  * @property
4294  */
4295  __Pyx_XDECREF(__pyx_r);
4296  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_answer.number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
4297  __Pyx_GOTREF(__pyx_t_1);
4298  __pyx_r = __pyx_t_1;
4299  __pyx_t_1 = 0;
4300  goto __pyx_L0;
4301 
4302  /* "amns.pyx":161
4303  *
4304  * @property
4305  * def ndim(self): # <<<<<<<<<<<<<<
4306  * """Query for ndim associated with the AMNS table"""
4307  * cdef camns_interface.amns_c_answer_type answer
4308  */
4309 
4310  /* function exit code */
4311  __pyx_L1_error:;
4312  __Pyx_XDECREF(__pyx_t_1);
4313  __Pyx_AddTraceback("amns.Table.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4314  __pyx_r = NULL;
4315  __pyx_L0:;
4316  __Pyx_XGIVEREF(__pyx_r);
4317  __Pyx_RefNannyFinishContext();
4318  return __pyx_r;
4319 }
4320 
4321 /* "amns.pyx":168
4322  *
4323  * @property
4324  * def source(self): # <<<<<<<<<<<<<<
4325  * """Query for source associated with the AMNS table"""
4326  * cdef camns_interface.amns_c_answer_type answer
4327  */
4328 
4329 /* Python wrapper */
4330 static PyObject *__pyx_pw_4amns_5Table_6source_1__get__(PyObject *__pyx_v_self); /*proto*/
4331 static PyObject *__pyx_pw_4amns_5Table_6source_1__get__(PyObject *__pyx_v_self) {
4332  PyObject *__pyx_r = 0;
4333  __Pyx_RefNannyDeclarations
4334  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4335  __pyx_r = __pyx_pf_4amns_5Table_6source___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4336 
4337  /* function exit code */
4338  __Pyx_RefNannyFinishContext();
4339  return __pyx_r;
4340 }
4341 
4342 static PyObject *__pyx_pf_4amns_5Table_6source___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4343  amns_c_answer_type __pyx_v_answer;
4344  PyObject *__pyx_r = NULL;
4345  __Pyx_RefNannyDeclarations
4346  PyObject *__pyx_t_1 = NULL;
4347  __Pyx_RefNannySetupContext("__get__", 0);
4348 
4349  /* "amns.pyx":171
4350  * """Query for source associated with the AMNS table"""
4351  * cdef camns_interface.amns_c_answer_type answer
4352  * answer = self.lquery("source") # <<<<<<<<<<<<<<
4353  * return answer.string
4354  *
4355  */
4356  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_source);
4357 
4358  /* "amns.pyx":172
4359  * cdef camns_interface.amns_c_answer_type answer
4360  * answer = self.lquery("source")
4361  * return answer.string # <<<<<<<<<<<<<<
4362  *
4363  * @property
4364  */
4365  __Pyx_XDECREF(__pyx_r);
4366  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
4367  __Pyx_GOTREF(__pyx_t_1);
4368  __pyx_r = __pyx_t_1;
4369  __pyx_t_1 = 0;
4370  goto __pyx_L0;
4371 
4372  /* "amns.pyx":168
4373  *
4374  * @property
4375  * def source(self): # <<<<<<<<<<<<<<
4376  * """Query for source associated with the AMNS table"""
4377  * cdef camns_interface.amns_c_answer_type answer
4378  */
4379 
4380  /* function exit code */
4381  __pyx_L1_error:;
4382  __Pyx_XDECREF(__pyx_t_1);
4383  __Pyx_AddTraceback("amns.Table.source.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4384  __pyx_r = NULL;
4385  __pyx_L0:;
4386  __Pyx_XGIVEREF(__pyx_r);
4387  __Pyx_RefNannyFinishContext();
4388  return __pyx_r;
4389 }
4390 
4391 /* "amns.pyx":175
4392  *
4393  * @property
4394  * def filled(self): # <<<<<<<<<<<<<<
4395  * """Query for filled status associated with the AMNS table"""
4396  * cdef camns_interface.amns_c_answer_type answer
4397  */
4398 
4399 /* Python wrapper */
4400 static PyObject *__pyx_pw_4amns_5Table_6filled_1__get__(PyObject *__pyx_v_self); /*proto*/
4401 static PyObject *__pyx_pw_4amns_5Table_6filled_1__get__(PyObject *__pyx_v_self) {
4402  PyObject *__pyx_r = 0;
4403  __Pyx_RefNannyDeclarations
4404  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4405  __pyx_r = __pyx_pf_4amns_5Table_6filled___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4406 
4407  /* function exit code */
4408  __Pyx_RefNannyFinishContext();
4409  return __pyx_r;
4410 }
4411 
4412 static PyObject *__pyx_pf_4amns_5Table_6filled___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4413  amns_c_answer_type __pyx_v_answer;
4414  PyObject *__pyx_r = NULL;
4415  __Pyx_RefNannyDeclarations
4416  PyObject *__pyx_t_1 = NULL;
4417  __Pyx_RefNannySetupContext("__get__", 0);
4418 
4419  /* "amns.pyx":178
4420  * """Query for filled status associated with the AMNS table"""
4421  * cdef camns_interface.amns_c_answer_type answer
4422  * answer = self.lquery("filled") # <<<<<<<<<<<<<<
4423  * return answer.string
4424  *
4425  */
4426  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_filled);
4427 
4428  /* "amns.pyx":179
4429  * cdef camns_interface.amns_c_answer_type answer
4430  * answer = self.lquery("filled")
4431  * return answer.string # <<<<<<<<<<<<<<
4432  *
4433  * @property
4434  */
4435  __Pyx_XDECREF(__pyx_r);
4436  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
4437  __Pyx_GOTREF(__pyx_t_1);
4438  __pyx_r = __pyx_t_1;
4439  __pyx_t_1 = 0;
4440  goto __pyx_L0;
4441 
4442  /* "amns.pyx":175
4443  *
4444  * @property
4445  * def filled(self): # <<<<<<<<<<<<<<
4446  * """Query for filled status associated with the AMNS table"""
4447  * cdef camns_interface.amns_c_answer_type answer
4448  */
4449 
4450  /* function exit code */
4451  __pyx_L1_error:;
4452  __Pyx_XDECREF(__pyx_t_1);
4453  __Pyx_AddTraceback("amns.Table.filled.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4454  __pyx_r = NULL;
4455  __pyx_L0:;
4456  __Pyx_XGIVEREF(__pyx_r);
4457  __Pyx_RefNannyFinishContext();
4458  return __pyx_r;
4459 }
4460 
4461 /* "amns.pyx":182
4462  *
4463  * @property
4464  * def reaction_type(self): # <<<<<<<<<<<<<<
4465  * """Query for reaction_type associated with the AMNS table"""
4466  * cdef camns_interface.amns_c_answer_type answer
4467  */
4468 
4469 /* Python wrapper */
4470 static PyObject *__pyx_pw_4amns_5Table_13reaction_type_1__get__(PyObject *__pyx_v_self); /*proto*/
4471 static PyObject *__pyx_pw_4amns_5Table_13reaction_type_1__get__(PyObject *__pyx_v_self) {
4472  PyObject *__pyx_r = 0;
4473  __Pyx_RefNannyDeclarations
4474  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4475  __pyx_r = __pyx_pf_4amns_5Table_13reaction_type___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4476 
4477  /* function exit code */
4478  __Pyx_RefNannyFinishContext();
4479  return __pyx_r;
4480 }
4481 
4482 static PyObject *__pyx_pf_4amns_5Table_13reaction_type___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4483  amns_c_answer_type __pyx_v_answer;
4484  PyObject *__pyx_r = NULL;
4485  __Pyx_RefNannyDeclarations
4486  PyObject *__pyx_t_1 = NULL;
4487  __Pyx_RefNannySetupContext("__get__", 0);
4488 
4489  /* "amns.pyx":185
4490  * """Query for reaction_type associated with the AMNS table"""
4491  * cdef camns_interface.amns_c_answer_type answer
4492  * answer = self.lquery("reaction_type") # <<<<<<<<<<<<<<
4493  * return answer.string
4494  *
4495  */
4496  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_reaction_type);
4497 
4498  /* "amns.pyx":186
4499  * cdef camns_interface.amns_c_answer_type answer
4500  * answer = self.lquery("reaction_type")
4501  * return answer.string # <<<<<<<<<<<<<<
4502  *
4503  * @property
4504  */
4505  __Pyx_XDECREF(__pyx_r);
4506  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
4507  __Pyx_GOTREF(__pyx_t_1);
4508  __pyx_r = __pyx_t_1;
4509  __pyx_t_1 = 0;
4510  goto __pyx_L0;
4511 
4512  /* "amns.pyx":182
4513  *
4514  * @property
4515  * def reaction_type(self): # <<<<<<<<<<<<<<
4516  * """Query for reaction_type associated with the AMNS table"""
4517  * cdef camns_interface.amns_c_answer_type answer
4518  */
4519 
4520  /* function exit code */
4521  __pyx_L1_error:;
4522  __Pyx_XDECREF(__pyx_t_1);
4523  __Pyx_AddTraceback("amns.Table.reaction_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4524  __pyx_r = NULL;
4525  __pyx_L0:;
4526  __Pyx_XGIVEREF(__pyx_r);
4527  __Pyx_RefNannyFinishContext();
4528  return __pyx_r;
4529 }
4530 
4531 /* "amns.pyx":189
4532  *
4533  * @property
4534  * def reactants(self): # <<<<<<<<<<<<<<
4535  * """Query for reactants associated with the AMNS table"""
4536  * cdef camns_interface.amns_c_answer_type answer
4537  */
4538 
4539 /* Python wrapper */
4540 static PyObject *__pyx_pw_4amns_5Table_9reactants_1__get__(PyObject *__pyx_v_self); /*proto*/
4541 static PyObject *__pyx_pw_4amns_5Table_9reactants_1__get__(PyObject *__pyx_v_self) {
4542  PyObject *__pyx_r = 0;
4543  __Pyx_RefNannyDeclarations
4544  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4545  __pyx_r = __pyx_pf_4amns_5Table_9reactants___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4546 
4547  /* function exit code */
4548  __Pyx_RefNannyFinishContext();
4549  return __pyx_r;
4550 }
4551 
4552 static PyObject *__pyx_pf_4amns_5Table_9reactants___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4553  amns_c_answer_type __pyx_v_answer;
4554  PyObject *__pyx_r = NULL;
4555  __Pyx_RefNannyDeclarations
4556  PyObject *__pyx_t_1 = NULL;
4557  __Pyx_RefNannySetupContext("__get__", 0);
4558 
4559  /* "amns.pyx":192
4560  * """Query for reactants associated with the AMNS table"""
4561  * cdef camns_interface.amns_c_answer_type answer
4562  * answer = self.lquery("reactants") # <<<<<<<<<<<<<<
4563  * return answer.string
4564  *
4565  */
4566  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_reactants);
4567 
4568  /* "amns.pyx":193
4569  * cdef camns_interface.amns_c_answer_type answer
4570  * answer = self.lquery("reactants")
4571  * return answer.string # <<<<<<<<<<<<<<
4572  *
4573  * @property
4574  */
4575  __Pyx_XDECREF(__pyx_r);
4576  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
4577  __Pyx_GOTREF(__pyx_t_1);
4578  __pyx_r = __pyx_t_1;
4579  __pyx_t_1 = 0;
4580  goto __pyx_L0;
4581 
4582  /* "amns.pyx":189
4583  *
4584  * @property
4585  * def reactants(self): # <<<<<<<<<<<<<<
4586  * """Query for reactants associated with the AMNS table"""
4587  * cdef camns_interface.amns_c_answer_type answer
4588  */
4589 
4590  /* function exit code */
4591  __pyx_L1_error:;
4592  __Pyx_XDECREF(__pyx_t_1);
4593  __Pyx_AddTraceback("amns.Table.reactants.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4594  __pyx_r = NULL;
4595  __pyx_L0:;
4596  __Pyx_XGIVEREF(__pyx_r);
4597  __Pyx_RefNannyFinishContext();
4598  return __pyx_r;
4599 }
4600 
4601 /* "amns.pyx":196
4602  *
4603  * @property
4604  * def version(self): # <<<<<<<<<<<<<<
4605  * """Query for version associated with the AMNS table"""
4606  * cdef camns_interface.amns_c_answer_type answer
4607  */
4608 
4609 /* Python wrapper */
4610 static PyObject *__pyx_pw_4amns_5Table_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
4611 static PyObject *__pyx_pw_4amns_5Table_7version_1__get__(PyObject *__pyx_v_self) {
4612  PyObject *__pyx_r = 0;
4613  __Pyx_RefNannyDeclarations
4614  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4615  __pyx_r = __pyx_pf_4amns_5Table_7version___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4616 
4617  /* function exit code */
4618  __Pyx_RefNannyFinishContext();
4619  return __pyx_r;
4620 }
4621 
4622 static PyObject *__pyx_pf_4amns_5Table_7version___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4623  amns_c_answer_type __pyx_v_answer;
4624  PyObject *__pyx_r = NULL;
4625  __Pyx_RefNannyDeclarations
4626  PyObject *__pyx_t_1 = NULL;
4627  PyObject *__pyx_t_2 = NULL;
4628  PyObject *__pyx_t_3 = NULL;
4629  __Pyx_RefNannySetupContext("__get__", 0);
4630 
4631  /* "amns.pyx":199
4632  * """Query for version associated with the AMNS table"""
4633  * cdef camns_interface.amns_c_answer_type answer
4634  * answer = self.lquery("version") # <<<<<<<<<<<<<<
4635  * return answer.string, answer.number
4636  *
4637  */
4638  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_version);
4639 
4640  /* "amns.pyx":200
4641  * cdef camns_interface.amns_c_answer_type answer
4642  * answer = self.lquery("version")
4643  * return answer.string, answer.number # <<<<<<<<<<<<<<
4644  *
4645  * @property
4646  */
4647  __Pyx_XDECREF(__pyx_r);
4648  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
4649  __Pyx_GOTREF(__pyx_t_1);
4650  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_answer.number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
4651  __Pyx_GOTREF(__pyx_t_2);
4652  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error)
4653  __Pyx_GOTREF(__pyx_t_3);
4654  __Pyx_GIVEREF(__pyx_t_1);
4655  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
4656  __Pyx_GIVEREF(__pyx_t_2);
4657  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
4658  __pyx_t_1 = 0;
4659  __pyx_t_2 = 0;
4660  __pyx_r = __pyx_t_3;
4661  __pyx_t_3 = 0;
4662  goto __pyx_L0;
4663 
4664  /* "amns.pyx":196
4665  *
4666  * @property
4667  * def version(self): # <<<<<<<<<<<<<<
4668  * """Query for version associated with the AMNS table"""
4669  * cdef camns_interface.amns_c_answer_type answer
4670  */
4671 
4672  /* function exit code */
4673  __pyx_L1_error:;
4674  __Pyx_XDECREF(__pyx_t_1);
4675  __Pyx_XDECREF(__pyx_t_2);
4676  __Pyx_XDECREF(__pyx_t_3);
4677  __Pyx_AddTraceback("amns.Table.version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4678  __pyx_r = NULL;
4679  __pyx_L0:;
4680  __Pyx_XGIVEREF(__pyx_r);
4681  __Pyx_RefNannyFinishContext();
4682  return __pyx_r;
4683 }
4684 
4685 /* "amns.pyx":203
4686  *
4687  * @property
4688  * def state_label(self): # <<<<<<<<<<<<<<
4689  * """Query for state_label associated with the AMNS table"""
4690  * cdef camns_interface.amns_c_answer_type answer
4691  */
4692 
4693 /* Python wrapper */
4694 static PyObject *__pyx_pw_4amns_5Table_11state_label_1__get__(PyObject *__pyx_v_self); /*proto*/
4695 static PyObject *__pyx_pw_4amns_5Table_11state_label_1__get__(PyObject *__pyx_v_self) {
4696  PyObject *__pyx_r = 0;
4697  __Pyx_RefNannyDeclarations
4698  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4699  __pyx_r = __pyx_pf_4amns_5Table_11state_label___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4700 
4701  /* function exit code */
4702  __Pyx_RefNannyFinishContext();
4703  return __pyx_r;
4704 }
4705 
4706 static PyObject *__pyx_pf_4amns_5Table_11state_label___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4707  amns_c_answer_type __pyx_v_answer;
4708  PyObject *__pyx_r = NULL;
4709  __Pyx_RefNannyDeclarations
4710  PyObject *__pyx_t_1 = NULL;
4711  __Pyx_RefNannySetupContext("__get__", 0);
4712 
4713  /* "amns.pyx":206
4714  * """Query for state_label associated with the AMNS table"""
4715  * cdef camns_interface.amns_c_answer_type answer
4716  * answer = self.lquery("state_label") # <<<<<<<<<<<<<<
4717  * return answer.string
4718  *
4719  */
4720  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_state_label);
4721 
4722  /* "amns.pyx":207
4723  * cdef camns_interface.amns_c_answer_type answer
4724  * answer = self.lquery("state_label")
4725  * return answer.string # <<<<<<<<<<<<<<
4726  *
4727  * @property
4728  */
4729  __Pyx_XDECREF(__pyx_r);
4730  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
4731  __Pyx_GOTREF(__pyx_t_1);
4732  __pyx_r = __pyx_t_1;
4733  __pyx_t_1 = 0;
4734  goto __pyx_L0;
4735 
4736  /* "amns.pyx":203
4737  *
4738  * @property
4739  * def state_label(self): # <<<<<<<<<<<<<<
4740  * """Query for state_label associated with the AMNS table"""
4741  * cdef camns_interface.amns_c_answer_type answer
4742  */
4743 
4744  /* function exit code */
4745  __pyx_L1_error:;
4746  __Pyx_XDECREF(__pyx_t_1);
4747  __Pyx_AddTraceback("amns.Table.state_label.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4748  __pyx_r = NULL;
4749  __pyx_L0:;
4750  __Pyx_XGIVEREF(__pyx_r);
4751  __Pyx_RefNannyFinishContext();
4752  return __pyx_r;
4753 }
4754 
4755 /* "amns.pyx":210
4756  *
4757  * @property
4758  * def result_unit(self): # <<<<<<<<<<<<<<
4759  * """Query for result_unit associated with the AMNS table"""
4760  * cdef camns_interface.amns_c_answer_type answer
4761  */
4762 
4763 /* Python wrapper */
4764 static PyObject *__pyx_pw_4amns_5Table_11result_unit_1__get__(PyObject *__pyx_v_self); /*proto*/
4765 static PyObject *__pyx_pw_4amns_5Table_11result_unit_1__get__(PyObject *__pyx_v_self) {
4766  PyObject *__pyx_r = 0;
4767  __Pyx_RefNannyDeclarations
4768  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4769  __pyx_r = __pyx_pf_4amns_5Table_11result_unit___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4770 
4771  /* function exit code */
4772  __Pyx_RefNannyFinishContext();
4773  return __pyx_r;
4774 }
4775 
4776 static PyObject *__pyx_pf_4amns_5Table_11result_unit___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4777  amns_c_answer_type __pyx_v_answer;
4778  PyObject *__pyx_r = NULL;
4779  __Pyx_RefNannyDeclarations
4780  PyObject *__pyx_t_1 = NULL;
4781  __Pyx_RefNannySetupContext("__get__", 0);
4782 
4783  /* "amns.pyx":213
4784  * """Query for result_unit associated with the AMNS table"""
4785  * cdef camns_interface.amns_c_answer_type answer
4786  * answer = self.lquery("result_unit") # <<<<<<<<<<<<<<
4787  * return answer.string
4788  *
4789  */
4790  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_result_unit);
4791 
4792  /* "amns.pyx":214
4793  * cdef camns_interface.amns_c_answer_type answer
4794  * answer = self.lquery("result_unit")
4795  * return answer.string # <<<<<<<<<<<<<<
4796  *
4797  * @property
4798  */
4799  __Pyx_XDECREF(__pyx_r);
4800  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
4801  __Pyx_GOTREF(__pyx_t_1);
4802  __pyx_r = __pyx_t_1;
4803  __pyx_t_1 = 0;
4804  goto __pyx_L0;
4805 
4806  /* "amns.pyx":210
4807  *
4808  * @property
4809  * def result_unit(self): # <<<<<<<<<<<<<<
4810  * """Query for result_unit associated with the AMNS table"""
4811  * cdef camns_interface.amns_c_answer_type answer
4812  */
4813 
4814  /* function exit code */
4815  __pyx_L1_error:;
4816  __Pyx_XDECREF(__pyx_t_1);
4817  __Pyx_AddTraceback("amns.Table.result_unit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4818  __pyx_r = NULL;
4819  __pyx_L0:;
4820  __Pyx_XGIVEREF(__pyx_r);
4821  __Pyx_RefNannyFinishContext();
4822  return __pyx_r;
4823 }
4824 
4825 /* "amns.pyx":217
4826  *
4827  * @property
4828  * def result_label(self): # <<<<<<<<<<<<<<
4829  * """Query for result_label associated with the AMNS table"""
4830  * cdef camns_interface.amns_c_answer_type answer
4831  */
4832 
4833 /* Python wrapper */
4834 static PyObject *__pyx_pw_4amns_5Table_12result_label_1__get__(PyObject *__pyx_v_self); /*proto*/
4835 static PyObject *__pyx_pw_4amns_5Table_12result_label_1__get__(PyObject *__pyx_v_self) {
4836  PyObject *__pyx_r = 0;
4837  __Pyx_RefNannyDeclarations
4838  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4839  __pyx_r = __pyx_pf_4amns_5Table_12result_label___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4840 
4841  /* function exit code */
4842  __Pyx_RefNannyFinishContext();
4843  return __pyx_r;
4844 }
4845 
4846 static PyObject *__pyx_pf_4amns_5Table_12result_label___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4847  amns_c_answer_type __pyx_v_answer;
4848  PyObject *__pyx_r = NULL;
4849  __Pyx_RefNannyDeclarations
4850  PyObject *__pyx_t_1 = NULL;
4851  __Pyx_RefNannySetupContext("__get__", 0);
4852 
4853  /* "amns.pyx":220
4854  * """Query for result_label associated with the AMNS table"""
4855  * cdef camns_interface.amns_c_answer_type answer
4856  * answer = self.lquery("result_label") # <<<<<<<<<<<<<<
4857  * return answer.string
4858  *
4859  */
4860  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_result_label);
4861 
4862  /* "amns.pyx":221
4863  * cdef camns_interface.amns_c_answer_type answer
4864  * answer = self.lquery("result_label")
4865  * return answer.string # <<<<<<<<<<<<<<
4866  *
4867  * @property
4868  */
4869  __Pyx_XDECREF(__pyx_r);
4870  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_answer.string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
4871  __Pyx_GOTREF(__pyx_t_1);
4872  __pyx_r = __pyx_t_1;
4873  __pyx_t_1 = 0;
4874  goto __pyx_L0;
4875 
4876  /* "amns.pyx":217
4877  *
4878  * @property
4879  * def result_label(self): # <<<<<<<<<<<<<<
4880  * """Query for result_label associated with the AMNS table"""
4881  * cdef camns_interface.amns_c_answer_type answer
4882  */
4883 
4884  /* function exit code */
4885  __pyx_L1_error:;
4886  __Pyx_XDECREF(__pyx_t_1);
4887  __Pyx_AddTraceback("amns.Table.result_label.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4888  __pyx_r = NULL;
4889  __pyx_L0:;
4890  __Pyx_XGIVEREF(__pyx_r);
4891  __Pyx_RefNannyFinishContext();
4892  return __pyx_r;
4893 }
4894 
4895 /* "amns.pyx":224
4896  *
4897  * @property
4898  * def interp_fun(self): # <<<<<<<<<<<<<<
4899  * """Query for interp_fun associated with the AMNS table"""
4900  * cdef camns_interface.amns_c_answer_type answer
4901  */
4902 
4903 /* Python wrapper */
4904 static PyObject *__pyx_pw_4amns_5Table_10interp_fun_1__get__(PyObject *__pyx_v_self); /*proto*/
4905 static PyObject *__pyx_pw_4amns_5Table_10interp_fun_1__get__(PyObject *__pyx_v_self) {
4906  PyObject *__pyx_r = 0;
4907  __Pyx_RefNannyDeclarations
4908  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4909  __pyx_r = __pyx_pf_4amns_5Table_10interp_fun___get__(((struct __pyx_obj_4amns_Table *)__pyx_v_self));
4910 
4911  /* function exit code */
4912  __Pyx_RefNannyFinishContext();
4913  return __pyx_r;
4914 }
4915 
4916 static PyObject *__pyx_pf_4amns_5Table_10interp_fun___get__(struct __pyx_obj_4amns_Table *__pyx_v_self) {
4917  amns_c_answer_type __pyx_v_answer;
4918  PyObject *__pyx_r = NULL;
4919  __Pyx_RefNannyDeclarations
4920  PyObject *__pyx_t_1 = NULL;
4921  __Pyx_RefNannySetupContext("__get__", 0);
4922 
4923  /* "amns.pyx":227
4924  * """Query for interp_fun associated with the AMNS table"""
4925  * cdef camns_interface.amns_c_answer_type answer
4926  * answer = self.lquery("interp_fun") # <<<<<<<<<<<<<<
4927  * return answer.number
4928  *
4929  */
4930  __pyx_v_answer = ((struct __pyx_vtabstruct_4amns_Table *)__pyx_v_self->__pyx_vtab)->lquery(__pyx_v_self, __pyx_n_s_interp_fun);
4931 
4932  /* "amns.pyx":228
4933  * cdef camns_interface.amns_c_answer_type answer
4934  * answer = self.lquery("interp_fun")
4935  * return answer.number # <<<<<<<<<<<<<<
4936  *
4937  * def data(self, p1, p2 = None, p3 = None):
4938  */
4939  __Pyx_XDECREF(__pyx_r);
4940  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_answer.number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
4941  __Pyx_GOTREF(__pyx_t_1);
4942  __pyx_r = __pyx_t_1;
4943  __pyx_t_1 = 0;
4944  goto __pyx_L0;
4945 
4946  /* "amns.pyx":224
4947  *
4948  * @property
4949  * def interp_fun(self): # <<<<<<<<<<<<<<
4950  * """Query for interp_fun associated with the AMNS table"""
4951  * cdef camns_interface.amns_c_answer_type answer
4952  */
4953 
4954  /* function exit code */
4955  __pyx_L1_error:;
4956  __Pyx_XDECREF(__pyx_t_1);
4957  __Pyx_AddTraceback("amns.Table.interp_fun.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4958  __pyx_r = NULL;
4959  __pyx_L0:;
4960  __Pyx_XGIVEREF(__pyx_r);
4961  __Pyx_RefNannyFinishContext();
4962  return __pyx_r;
4963 }
4964 
4965 /* "amns.pyx":230
4966  * return answer.number
4967  *
4968  * def data(self, p1, p2 = None, p3 = None): # <<<<<<<<<<<<<<
4969  * """Return the AMNS data based on the arguments"""
4970  * nargs = 1
4971  */
4972 
4973 /* Python wrapper */
4974 static PyObject *__pyx_pw_4amns_5Table_9data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4975 static char __pyx_doc_4amns_5Table_8data[] = "Return the AMNS data based on the arguments";
4976 static PyObject *__pyx_pw_4amns_5Table_9data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4977  PyObject *__pyx_v_p1 = 0;
4978  PyObject *__pyx_v_p2 = 0;
4979  PyObject *__pyx_v_p3 = 0;
4980  PyObject *__pyx_r = 0;
4981  __Pyx_RefNannyDeclarations
4982  __Pyx_RefNannySetupContext("data (wrapper)", 0);
4983  {
4984  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p1,&__pyx_n_s_p2,&__pyx_n_s_p3,0};
4985  PyObject* values[3] = {0,0,0};
4986  values[1] = ((PyObject *)Py_None);
4987  values[2] = ((PyObject *)Py_None);
4988  if (unlikely(__pyx_kwds)) {
4989  Py_ssize_t kw_args;
4990  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4991  switch (pos_args) {
4992  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4993  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4994  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4995  case 0: break;
4996  default: goto __pyx_L5_argtuple_error;
4997  }
4998  kw_args = PyDict_Size(__pyx_kwds);
4999  switch (pos_args) {
5000  case 0:
5001  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p1)) != 0)) kw_args--;
5002  else goto __pyx_L5_argtuple_error;
5003  case 1:
5004  if (kw_args > 0) {
5005  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p2);
5006  if (value) { values[1] = value; kw_args--; }
5007  }
5008  case 2:
5009  if (kw_args > 0) {
5010  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p3);
5011  if (value) { values[2] = value; kw_args--; }
5012  }
5013  }
5014  if (unlikely(kw_args > 0)) {
5015  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "data") < 0)) __PYX_ERR(0, 230, __pyx_L3_error)
5016  }
5017  } else {
5018  switch (PyTuple_GET_SIZE(__pyx_args)) {
5019  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5020  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5021  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5022  break;
5023  default: goto __pyx_L5_argtuple_error;
5024  }
5025  }
5026  __pyx_v_p1 = values[0];
5027  __pyx_v_p2 = values[1];
5028  __pyx_v_p3 = values[2];
5029  }
5030  goto __pyx_L4_argument_unpacking_done;
5031  __pyx_L5_argtuple_error:;
5032  __Pyx_RaiseArgtupleInvalid("data", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 230, __pyx_L3_error)
5033  __pyx_L3_error:;
5034  __Pyx_AddTraceback("amns.Table.data", __pyx_clineno, __pyx_lineno, __pyx_filename);
5035  __Pyx_RefNannyFinishContext();
5036  return NULL;
5037  __pyx_L4_argument_unpacking_done:;
5038  __pyx_r = __pyx_pf_4amns_5Table_8data(((struct __pyx_obj_4amns_Table *)__pyx_v_self), __pyx_v_p1, __pyx_v_p2, __pyx_v_p3);
5039 
5040  /* function exit code */
5041  __Pyx_RefNannyFinishContext();
5042  return __pyx_r;
5043 }
5044 
5045 static PyObject *__pyx_pf_4amns_5Table_8data(struct __pyx_obj_4amns_Table *__pyx_v_self, PyObject *__pyx_v_p1, PyObject *__pyx_v_p2, PyObject *__pyx_v_p3) {
5046  PyObject *__pyx_v_nargs = NULL;
5047  PyObject *__pyx_v_refShape = NULL;
5048  PyObject *__pyx_v_res = NULL;
5049  PyObject *__pyx_r = NULL;
5050  __Pyx_RefNannyDeclarations
5051  int __pyx_t_1;
5052  int __pyx_t_2;
5053  PyObject *__pyx_t_3 = NULL;
5054  PyObject *__pyx_t_4 = NULL;
5055  PyObject *__pyx_t_5 = NULL;
5056  PyObject *__pyx_t_6 = NULL;
5057  PyObject *__pyx_t_7 = NULL;
5058  int __pyx_t_8;
5059  Py_ssize_t __pyx_t_9;
5060  int __pyx_t_10;
5061  __Pyx_RefNannySetupContext("data", 0);
5062 
5063  /* "amns.pyx":232
5064  * def data(self, p1, p2 = None, p3 = None):
5065  * """Return the AMNS data based on the arguments"""
5066  * nargs = 1 # <<<<<<<<<<<<<<
5067  * if p2 is not None: nargs += 1
5068  * if p3 is not None: nargs += 1
5069  */
5070  __Pyx_INCREF(__pyx_int_1);
5071  __pyx_v_nargs = __pyx_int_1;
5072 
5073  /* "amns.pyx":233
5074  * """Return the AMNS data based on the arguments"""
5075  * nargs = 1
5076  * if p2 is not None: nargs += 1 # <<<<<<<<<<<<<<
5077  * if p3 is not None: nargs += 1
5078  * if nargs != self.ndim:
5079  */
5080  __pyx_t_1 = (__pyx_v_p2 != Py_None);
5081  __pyx_t_2 = (__pyx_t_1 != 0);
5082  if (__pyx_t_2) {
5083  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nargs, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)
5084  __Pyx_GOTREF(__pyx_t_3);
5085  __Pyx_DECREF_SET(__pyx_v_nargs, __pyx_t_3);
5086  __pyx_t_3 = 0;
5087  }
5088 
5089  /* "amns.pyx":234
5090  * nargs = 1
5091  * if p2 is not None: nargs += 1
5092  * if p3 is not None: nargs += 1 # <<<<<<<<<<<<<<
5093  * if nargs != self.ndim:
5094  * raise AmnsException("Number of parameters does not match table dimensions (ndim="
5095  */
5096  __pyx_t_2 = (__pyx_v_p3 != Py_None);
5097  __pyx_t_1 = (__pyx_t_2 != 0);
5098  if (__pyx_t_1) {
5099  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nargs, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
5100  __Pyx_GOTREF(__pyx_t_3);
5101  __Pyx_DECREF_SET(__pyx_v_nargs, __pyx_t_3);
5102  __pyx_t_3 = 0;
5103  }
5104 
5105  /* "amns.pyx":235
5106  * if p2 is not None: nargs += 1
5107  * if p3 is not None: nargs += 1
5108  * if nargs != self.ndim: # <<<<<<<<<<<<<<
5109  * raise AmnsException("Number of parameters does not match table dimensions (ndim="
5110  * + str(self.ndim) + ")")
5111  */
5112  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
5113  __Pyx_GOTREF(__pyx_t_3);
5114  __pyx_t_4 = PyObject_RichCompare(__pyx_v_nargs, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
5115  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5116  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 235, __pyx_L1_error)
5117  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5118  if (__pyx_t_1) {
5119 
5120  /* "amns.pyx":236
5121  * if p3 is not None: nargs += 1
5122  * if nargs != self.ndim:
5123  * raise AmnsException("Number of parameters does not match table dimensions (ndim=" # <<<<<<<<<<<<<<
5124  * + str(self.ndim) + ")")
5125  *
5126  */
5127  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
5128  __Pyx_GOTREF(__pyx_t_3);
5129 
5130  /* "amns.pyx":237
5131  * if nargs != self.ndim:
5132  * raise AmnsException("Number of parameters does not match table dimensions (ndim="
5133  * + str(self.ndim) + ")") # <<<<<<<<<<<<<<
5134  *
5135  * refShape = p1.shape
5136  */
5137  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ndim); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error)
5138  __Pyx_GOTREF(__pyx_t_5);
5139  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
5140  __Pyx_GOTREF(__pyx_t_6);
5141  __Pyx_GIVEREF(__pyx_t_5);
5142  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
5143  __pyx_t_5 = 0;
5144  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error)
5145  __Pyx_GOTREF(__pyx_t_5);
5146  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5147  __pyx_t_6 = PyNumber_Add(__pyx_kp_s_Number_of_parameters_does_not_ma, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
5148  __Pyx_GOTREF(__pyx_t_6);
5149  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5150  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error)
5151  __Pyx_GOTREF(__pyx_t_5);
5152  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5153  __pyx_t_6 = NULL;
5154  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5155  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
5156  if (likely(__pyx_t_6)) {
5157  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5158  __Pyx_INCREF(__pyx_t_6);
5159  __Pyx_INCREF(function);
5160  __Pyx_DECREF_SET(__pyx_t_3, function);
5161  }
5162  }
5163  if (!__pyx_t_6) {
5164  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
5165  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5166  __Pyx_GOTREF(__pyx_t_4);
5167  } else {
5168  #if CYTHON_FAST_PYCALL
5169  if (PyFunction_Check(__pyx_t_3)) {
5170  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
5171  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
5172  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5173  __Pyx_GOTREF(__pyx_t_4);
5174  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5175  } else
5176  #endif
5177  #if CYTHON_FAST_PYCCALL
5178  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5179  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
5180  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
5181  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5182  __Pyx_GOTREF(__pyx_t_4);
5183  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5184  } else
5185  #endif
5186  {
5187  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
5188  __Pyx_GOTREF(__pyx_t_7);
5189  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
5190  __Pyx_GIVEREF(__pyx_t_5);
5191  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
5192  __pyx_t_5 = 0;
5193  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
5194  __Pyx_GOTREF(__pyx_t_4);
5195  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5196  }
5197  }
5198  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5199  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
5200  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5201  __PYX_ERR(0, 236, __pyx_L1_error)
5202 
5203  /* "amns.pyx":235
5204  * if p2 is not None: nargs += 1
5205  * if p3 is not None: nargs += 1
5206  * if nargs != self.ndim: # <<<<<<<<<<<<<<
5207  * raise AmnsException("Number of parameters does not match table dimensions (ndim="
5208  * + str(self.ndim) + ")")
5209  */
5210  }
5211 
5212  /* "amns.pyx":239
5213  * + str(self.ndim) + ")")
5214  *
5215  * refShape = p1.shape # <<<<<<<<<<<<<<
5216  * if p2 is not None and p2.shape != refShape:
5217  * raise AmnsException("Shape of parameter 2 inconsistent to shape of parameter 1")
5218  */
5219  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_p1, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
5220  __Pyx_GOTREF(__pyx_t_4);
5221  __pyx_v_refShape = __pyx_t_4;
5222  __pyx_t_4 = 0;
5223 
5224  /* "amns.pyx":240
5225  *
5226  * refShape = p1.shape
5227  * if p2 is not None and p2.shape != refShape: # <<<<<<<<<<<<<<
5228  * raise AmnsException("Shape of parameter 2 inconsistent to shape of parameter 1")
5229  * if p3 is not None and p3.shape != refShape:
5230  */
5231  __pyx_t_2 = (__pyx_v_p2 != Py_None);
5232  __pyx_t_8 = (__pyx_t_2 != 0);
5233  if (__pyx_t_8) {
5234  } else {
5235  __pyx_t_1 = __pyx_t_8;
5236  goto __pyx_L7_bool_binop_done;
5237  }
5238  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_p2, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
5239  __Pyx_GOTREF(__pyx_t_4);
5240  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_refShape, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)
5241  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5242  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
5243  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5244  __pyx_t_1 = __pyx_t_8;
5245  __pyx_L7_bool_binop_done:;
5246  if (__pyx_t_1) {
5247 
5248  /* "amns.pyx":241
5249  * refShape = p1.shape
5250  * if p2 is not None and p2.shape != refShape:
5251  * raise AmnsException("Shape of parameter 2 inconsistent to shape of parameter 1") # <<<<<<<<<<<<<<
5252  * if p3 is not None and p3.shape != refShape:
5253  * raise AmnsException("Shape of parameter 3 inconsistent to shape of parameter 1")
5254  */
5255  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
5256  __Pyx_GOTREF(__pyx_t_3);
5257  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error)
5258  __Pyx_GOTREF(__pyx_t_4);
5259  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5260  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
5261  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5262  __PYX_ERR(0, 241, __pyx_L1_error)
5263 
5264  /* "amns.pyx":240
5265  *
5266  * refShape = p1.shape
5267  * if p2 is not None and p2.shape != refShape: # <<<<<<<<<<<<<<
5268  * raise AmnsException("Shape of parameter 2 inconsistent to shape of parameter 1")
5269  * if p3 is not None and p3.shape != refShape:
5270  */
5271  }
5272 
5273  /* "amns.pyx":242
5274  * if p2 is not None and p2.shape != refShape:
5275  * raise AmnsException("Shape of parameter 2 inconsistent to shape of parameter 1")
5276  * if p3 is not None and p3.shape != refShape: # <<<<<<<<<<<<<<
5277  * raise AmnsException("Shape of parameter 3 inconsistent to shape of parameter 1")
5278  *
5279  */
5280  __pyx_t_8 = (__pyx_v_p3 != Py_None);
5281  __pyx_t_2 = (__pyx_t_8 != 0);
5282  if (__pyx_t_2) {
5283  } else {
5284  __pyx_t_1 = __pyx_t_2;
5285  goto __pyx_L10_bool_binop_done;
5286  }
5287  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_p3, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error)
5288  __Pyx_GOTREF(__pyx_t_4);
5289  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_refShape, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
5290  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5291  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 242, __pyx_L1_error)
5292  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5293  __pyx_t_1 = __pyx_t_2;
5294  __pyx_L10_bool_binop_done:;
5295  if (__pyx_t_1) {
5296 
5297  /* "amns.pyx":243
5298  * raise AmnsException("Shape of parameter 2 inconsistent to shape of parameter 1")
5299  * if p3 is not None and p3.shape != refShape:
5300  * raise AmnsException("Shape of parameter 3 inconsistent to shape of parameter 1") # <<<<<<<<<<<<<<
5301  *
5302  * if len(refShape) == 1:
5303  */
5304  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
5305  __Pyx_GOTREF(__pyx_t_3);
5306  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error)
5307  __Pyx_GOTREF(__pyx_t_4);
5308  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5309  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
5310  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5311  __PYX_ERR(0, 243, __pyx_L1_error)
5312 
5313  /* "amns.pyx":242
5314  * if p2 is not None and p2.shape != refShape:
5315  * raise AmnsException("Shape of parameter 2 inconsistent to shape of parameter 1")
5316  * if p3 is not None and p3.shape != refShape: # <<<<<<<<<<<<<<
5317  * raise AmnsException("Shape of parameter 3 inconsistent to shape of parameter 1")
5318  *
5319  */
5320  }
5321 
5322  /* "amns.pyx":245
5323  * raise AmnsException("Shape of parameter 3 inconsistent to shape of parameter 1")
5324  *
5325  * if len(refShape) == 1: # <<<<<<<<<<<<<<
5326  * res = self._data_1d(p1,p2,p3)
5327  * elif len(refShape) == 2:
5328  */
5329  __pyx_t_9 = PyObject_Length(__pyx_v_refShape); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 245, __pyx_L1_error)
5330  __pyx_t_1 = ((__pyx_t_9 == 1) != 0);
5331  if (__pyx_t_1) {
5332 
5333  /* "amns.pyx":246
5334  *
5335  * if len(refShape) == 1:
5336  * res = self._data_1d(p1,p2,p3) # <<<<<<<<<<<<<<
5337  * elif len(refShape) == 2:
5338  * res = self._data_2d(p1,p2,p3)
5339  */
5340  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_data_1d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
5341  __Pyx_GOTREF(__pyx_t_3);
5342  __pyx_t_7 = NULL;
5343  __pyx_t_10 = 0;
5344  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
5345  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
5346  if (likely(__pyx_t_7)) {
5347  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5348  __Pyx_INCREF(__pyx_t_7);
5349  __Pyx_INCREF(function);
5350  __Pyx_DECREF_SET(__pyx_t_3, function);
5351  __pyx_t_10 = 1;
5352  }
5353  }
5354  #if CYTHON_FAST_PYCALL
5355  if (PyFunction_Check(__pyx_t_3)) {
5356  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3};
5357  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
5358  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5359  __Pyx_GOTREF(__pyx_t_4);
5360  } else
5361  #endif
5362  #if CYTHON_FAST_PYCCALL
5363  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5364  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3};
5365  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
5366  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5367  __Pyx_GOTREF(__pyx_t_4);
5368  } else
5369  #endif
5370  {
5371  __pyx_t_5 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 246, __pyx_L1_error)
5372  __Pyx_GOTREF(__pyx_t_5);
5373  if (__pyx_t_7) {
5374  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
5375  }
5376  __Pyx_INCREF(__pyx_v_p1);
5377  __Pyx_GIVEREF(__pyx_v_p1);
5378  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_v_p1);
5379  __Pyx_INCREF(__pyx_v_p2);
5380  __Pyx_GIVEREF(__pyx_v_p2);
5381  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_v_p2);
5382  __Pyx_INCREF(__pyx_v_p3);
5383  __Pyx_GIVEREF(__pyx_v_p3);
5384  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_10, __pyx_v_p3);
5385  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
5386  __Pyx_GOTREF(__pyx_t_4);
5387  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5388  }
5389  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5390  __pyx_v_res = __pyx_t_4;
5391  __pyx_t_4 = 0;
5392 
5393  /* "amns.pyx":245
5394  * raise AmnsException("Shape of parameter 3 inconsistent to shape of parameter 1")
5395  *
5396  * if len(refShape) == 1: # <<<<<<<<<<<<<<
5397  * res = self._data_1d(p1,p2,p3)
5398  * elif len(refShape) == 2:
5399  */
5400  goto __pyx_L12;
5401  }
5402 
5403  /* "amns.pyx":247
5404  * if len(refShape) == 1:
5405  * res = self._data_1d(p1,p2,p3)
5406  * elif len(refShape) == 2: # <<<<<<<<<<<<<<
5407  * res = self._data_2d(p1,p2,p3)
5408  * elif len(refShape) == 3:
5409  */
5410  __pyx_t_9 = PyObject_Length(__pyx_v_refShape); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 247, __pyx_L1_error)
5411  __pyx_t_1 = ((__pyx_t_9 == 2) != 0);
5412  if (__pyx_t_1) {
5413 
5414  /* "amns.pyx":248
5415  * res = self._data_1d(p1,p2,p3)
5416  * elif len(refShape) == 2:
5417  * res = self._data_2d(p1,p2,p3) # <<<<<<<<<<<<<<
5418  * elif len(refShape) == 3:
5419  * res = self._data_3d(p1,p2,p3)
5420  */
5421  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_data_2d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
5422  __Pyx_GOTREF(__pyx_t_3);
5423  __pyx_t_5 = NULL;
5424  __pyx_t_10 = 0;
5425  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
5426  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
5427  if (likely(__pyx_t_5)) {
5428  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5429  __Pyx_INCREF(__pyx_t_5);
5430  __Pyx_INCREF(function);
5431  __Pyx_DECREF_SET(__pyx_t_3, function);
5432  __pyx_t_10 = 1;
5433  }
5434  }
5435  #if CYTHON_FAST_PYCALL
5436  if (PyFunction_Check(__pyx_t_3)) {
5437  PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3};
5438  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error)
5439  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
5440  __Pyx_GOTREF(__pyx_t_4);
5441  } else
5442  #endif
5443  #if CYTHON_FAST_PYCCALL
5444  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5445  PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3};
5446  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error)
5447  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
5448  __Pyx_GOTREF(__pyx_t_4);
5449  } else
5450  #endif
5451  {
5452  __pyx_t_7 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 248, __pyx_L1_error)
5453  __Pyx_GOTREF(__pyx_t_7);
5454  if (__pyx_t_5) {
5455  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
5456  }
5457  __Pyx_INCREF(__pyx_v_p1);
5458  __Pyx_GIVEREF(__pyx_v_p1);
5459  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_v_p1);
5460  __Pyx_INCREF(__pyx_v_p2);
5461  __Pyx_GIVEREF(__pyx_v_p2);
5462  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_v_p2);
5463  __Pyx_INCREF(__pyx_v_p3);
5464  __Pyx_GIVEREF(__pyx_v_p3);
5465  PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_10, __pyx_v_p3);
5466  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error)
5467  __Pyx_GOTREF(__pyx_t_4);
5468  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5469  }
5470  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5471  __pyx_v_res = __pyx_t_4;
5472  __pyx_t_4 = 0;
5473 
5474  /* "amns.pyx":247
5475  * if len(refShape) == 1:
5476  * res = self._data_1d(p1,p2,p3)
5477  * elif len(refShape) == 2: # <<<<<<<<<<<<<<
5478  * res = self._data_2d(p1,p2,p3)
5479  * elif len(refShape) == 3:
5480  */
5481  goto __pyx_L12;
5482  }
5483 
5484  /* "amns.pyx":249
5485  * elif len(refShape) == 2:
5486  * res = self._data_2d(p1,p2,p3)
5487  * elif len(refShape) == 3: # <<<<<<<<<<<<<<
5488  * res = self._data_3d(p1,p2,p3)
5489  * else:
5490  */
5491  __pyx_t_9 = PyObject_Length(__pyx_v_refShape); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 249, __pyx_L1_error)
5492  __pyx_t_1 = ((__pyx_t_9 == 3) != 0);
5493  if (__pyx_t_1) {
5494 
5495  /* "amns.pyx":250
5496  * res = self._data_2d(p1,p2,p3)
5497  * elif len(refShape) == 3:
5498  * res = self._data_3d(p1,p2,p3) # <<<<<<<<<<<<<<
5499  * else:
5500  * raise AmnsException("Unsupported rank of input arguments: %s" % (len(refShape),))
5501  */
5502  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_data_3d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
5503  __Pyx_GOTREF(__pyx_t_3);
5504  __pyx_t_7 = NULL;
5505  __pyx_t_10 = 0;
5506  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
5507  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
5508  if (likely(__pyx_t_7)) {
5509  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5510  __Pyx_INCREF(__pyx_t_7);
5511  __Pyx_INCREF(function);
5512  __Pyx_DECREF_SET(__pyx_t_3, function);
5513  __pyx_t_10 = 1;
5514  }
5515  }
5516  #if CYTHON_FAST_PYCALL
5517  if (PyFunction_Check(__pyx_t_3)) {
5518  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3};
5519  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
5520  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5521  __Pyx_GOTREF(__pyx_t_4);
5522  } else
5523  #endif
5524  #if CYTHON_FAST_PYCCALL
5525  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5526  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3};
5527  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
5528  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5529  __Pyx_GOTREF(__pyx_t_4);
5530  } else
5531  #endif
5532  {
5533  __pyx_t_5 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
5534  __Pyx_GOTREF(__pyx_t_5);
5535  if (__pyx_t_7) {
5536  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
5537  }
5538  __Pyx_INCREF(__pyx_v_p1);
5539  __Pyx_GIVEREF(__pyx_v_p1);
5540  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_v_p1);
5541  __Pyx_INCREF(__pyx_v_p2);
5542  __Pyx_GIVEREF(__pyx_v_p2);
5543  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_v_p2);
5544  __Pyx_INCREF(__pyx_v_p3);
5545  __Pyx_GIVEREF(__pyx_v_p3);
5546  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_10, __pyx_v_p3);
5547  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
5548  __Pyx_GOTREF(__pyx_t_4);
5549  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5550  }
5551  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5552  __pyx_v_res = __pyx_t_4;
5553  __pyx_t_4 = 0;
5554 
5555  /* "amns.pyx":249
5556  * elif len(refShape) == 2:
5557  * res = self._data_2d(p1,p2,p3)
5558  * elif len(refShape) == 3: # <<<<<<<<<<<<<<
5559  * res = self._data_3d(p1,p2,p3)
5560  * else:
5561  */
5562  goto __pyx_L12;
5563  }
5564 
5565  /* "amns.pyx":252
5566  * res = self._data_3d(p1,p2,p3)
5567  * else:
5568  * raise AmnsException("Unsupported rank of input arguments: %s" % (len(refShape),)) # <<<<<<<<<<<<<<
5569  *
5570  * return res
5571  */
5572  /*else*/ {
5573  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error)
5574  __Pyx_GOTREF(__pyx_t_3);
5575  __pyx_t_9 = PyObject_Length(__pyx_v_refShape); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 252, __pyx_L1_error)
5576  __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
5577  __Pyx_GOTREF(__pyx_t_5);
5578  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 252, __pyx_L1_error)
5579  __Pyx_GOTREF(__pyx_t_7);
5580  __Pyx_GIVEREF(__pyx_t_5);
5581  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
5582  __pyx_t_5 = 0;
5583  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unsupported_rank_of_input_argume, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
5584  __Pyx_GOTREF(__pyx_t_5);
5585  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5586  __pyx_t_7 = NULL;
5587  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5588  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
5589  if (likely(__pyx_t_7)) {
5590  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5591  __Pyx_INCREF(__pyx_t_7);
5592  __Pyx_INCREF(function);
5593  __Pyx_DECREF_SET(__pyx_t_3, function);
5594  }
5595  }
5596  if (!__pyx_t_7) {
5597  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
5598  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5599  __Pyx_GOTREF(__pyx_t_4);
5600  } else {
5601  #if CYTHON_FAST_PYCALL
5602  if (PyFunction_Check(__pyx_t_3)) {
5603  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
5604  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
5605  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5606  __Pyx_GOTREF(__pyx_t_4);
5607  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5608  } else
5609  #endif
5610  #if CYTHON_FAST_PYCCALL
5611  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5612  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
5613  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
5614  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5615  __Pyx_GOTREF(__pyx_t_4);
5616  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5617  } else
5618  #endif
5619  {
5620  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error)
5621  __Pyx_GOTREF(__pyx_t_6);
5622  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
5623  __Pyx_GIVEREF(__pyx_t_5);
5624  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
5625  __pyx_t_5 = 0;
5626  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
5627  __Pyx_GOTREF(__pyx_t_4);
5628  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5629  }
5630  }
5631  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5632  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
5633  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5634  __PYX_ERR(0, 252, __pyx_L1_error)
5635  }
5636  __pyx_L12:;
5637 
5638  /* "amns.pyx":254
5639  * raise AmnsException("Unsupported rank of input arguments: %s" % (len(refShape),))
5640  *
5641  * return res # <<<<<<<<<<<<<<
5642  *
5643  * def _data_1d(self, np.ndarray[np.double_t, ndim=1] p1,
5644  */
5645  __Pyx_XDECREF(__pyx_r);
5646  __Pyx_INCREF(__pyx_v_res);
5647  __pyx_r = __pyx_v_res;
5648  goto __pyx_L0;
5649 
5650  /* "amns.pyx":230
5651  * return answer.number
5652  *
5653  * def data(self, p1, p2 = None, p3 = None): # <<<<<<<<<<<<<<
5654  * """Return the AMNS data based on the arguments"""
5655  * nargs = 1
5656  */
5657 
5658  /* function exit code */
5659  __pyx_L1_error:;
5660  __Pyx_XDECREF(__pyx_t_3);
5661  __Pyx_XDECREF(__pyx_t_4);
5662  __Pyx_XDECREF(__pyx_t_5);
5663  __Pyx_XDECREF(__pyx_t_6);
5664  __Pyx_XDECREF(__pyx_t_7);
5665  __Pyx_AddTraceback("amns.Table.data", __pyx_clineno, __pyx_lineno, __pyx_filename);
5666  __pyx_r = NULL;
5667  __pyx_L0:;
5668  __Pyx_XDECREF(__pyx_v_nargs);
5669  __Pyx_XDECREF(__pyx_v_refShape);
5670  __Pyx_XDECREF(__pyx_v_res);
5671  __Pyx_XGIVEREF(__pyx_r);
5672  __Pyx_RefNannyFinishContext();
5673  return __pyx_r;
5674 }
5675 
5676 /* "amns.pyx":256
5677  * return res
5678  *
5679  * def _data_1d(self, np.ndarray[np.double_t, ndim=1] p1, # <<<<<<<<<<<<<<
5680  * np.ndarray[np.double_t, ndim=1] p2 = None,
5681  * np.ndarray[np.double_t, ndim=1] p3 = None):
5682  */
5683 
5684 /* Python wrapper */
5685 static PyObject *__pyx_pw_4amns_5Table_11_data_1d(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5686 static PyObject *__pyx_pw_4amns_5Table_11_data_1d(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5687  PyArrayObject *__pyx_v_p1 = 0;
5688  PyArrayObject *__pyx_v_p2 = 0;
5689  PyArrayObject *__pyx_v_p3 = 0;
5690  PyObject *__pyx_r = 0;
5691  __Pyx_RefNannyDeclarations
5692  __Pyx_RefNannySetupContext("_data_1d (wrapper)", 0);
5693  {
5694  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p1,&__pyx_n_s_p2,&__pyx_n_s_p3,0};
5695  PyObject* values[3] = {0,0,0};
5696 
5697  /* "amns.pyx":257
5698  *
5699  * def _data_1d(self, np.ndarray[np.double_t, ndim=1] p1,
5700  * np.ndarray[np.double_t, ndim=1] p2 = None, # <<<<<<<<<<<<<<
5701  * np.ndarray[np.double_t, ndim=1] p3 = None):
5702  * cdef camns_interface.amns_c_error_type error_status
5703  */
5704  values[1] = (PyObject *)((PyArrayObject *)Py_None);
5705 
5706  /* "amns.pyx":258
5707  * def _data_1d(self, np.ndarray[np.double_t, ndim=1] p1,
5708  * np.ndarray[np.double_t, ndim=1] p2 = None,
5709  * np.ndarray[np.double_t, ndim=1] p3 = None): # <<<<<<<<<<<<<<
5710  * cdef camns_interface.amns_c_error_type error_status
5711  * cdef np.ndarray[np.double_t, ndim=1] res
5712  */
5713  values[2] = (PyObject *)((PyArrayObject *)Py_None);
5714  if (unlikely(__pyx_kwds)) {
5715  Py_ssize_t kw_args;
5716  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5717  switch (pos_args) {
5718  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5719  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5720  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5721  case 0: break;
5722  default: goto __pyx_L5_argtuple_error;
5723  }
5724  kw_args = PyDict_Size(__pyx_kwds);
5725  switch (pos_args) {
5726  case 0:
5727  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p1)) != 0)) kw_args--;
5728  else goto __pyx_L5_argtuple_error;
5729  case 1:
5730  if (kw_args > 0) {
5731  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p2);
5732  if (value) { values[1] = value; kw_args--; }
5733  }
5734  case 2:
5735  if (kw_args > 0) {
5736  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p3);
5737  if (value) { values[2] = value; kw_args--; }
5738  }
5739  }
5740  if (unlikely(kw_args > 0)) {
5741  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_data_1d") < 0)) __PYX_ERR(0, 256, __pyx_L3_error)
5742  }
5743  } else {
5744  switch (PyTuple_GET_SIZE(__pyx_args)) {
5745  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5746  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5747  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5748  break;
5749  default: goto __pyx_L5_argtuple_error;
5750  }
5751  }
5752  __pyx_v_p1 = ((PyArrayObject *)values[0]);
5753  __pyx_v_p2 = ((PyArrayObject *)values[1]);
5754  __pyx_v_p3 = ((PyArrayObject *)values[2]);
5755  }
5756  goto __pyx_L4_argument_unpacking_done;
5757  __pyx_L5_argtuple_error:;
5758  __Pyx_RaiseArgtupleInvalid("_data_1d", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 256, __pyx_L3_error)
5759  __pyx_L3_error:;
5760  __Pyx_AddTraceback("amns.Table._data_1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
5761  __Pyx_RefNannyFinishContext();
5762  return NULL;
5763  __pyx_L4_argument_unpacking_done:;
5764  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p1), __pyx_ptype_5numpy_ndarray, 1, "p1", 0))) __PYX_ERR(0, 256, __pyx_L1_error)
5765  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p2), __pyx_ptype_5numpy_ndarray, 1, "p2", 0))) __PYX_ERR(0, 257, __pyx_L1_error)
5766  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p3), __pyx_ptype_5numpy_ndarray, 1, "p3", 0))) __PYX_ERR(0, 258, __pyx_L1_error)
5767  __pyx_r = __pyx_pf_4amns_5Table_10_data_1d(((struct __pyx_obj_4amns_Table *)__pyx_v_self), __pyx_v_p1, __pyx_v_p2, __pyx_v_p3);
5768 
5769  /* "amns.pyx":256
5770  * return res
5771  *
5772  * def _data_1d(self, np.ndarray[np.double_t, ndim=1] p1, # <<<<<<<<<<<<<<
5773  * np.ndarray[np.double_t, ndim=1] p2 = None,
5774  * np.ndarray[np.double_t, ndim=1] p3 = None):
5775  */
5776 
5777  /* function exit code */
5778  goto __pyx_L0;
5779  __pyx_L1_error:;
5780  __pyx_r = NULL;
5781  __pyx_L0:;
5782  __Pyx_RefNannyFinishContext();
5783  return __pyx_r;
5784 }
5785 
5786 static PyObject *__pyx_pf_4amns_5Table_10_data_1d(struct __pyx_obj_4amns_Table *__pyx_v_self, PyArrayObject *__pyx_v_p1, PyArrayObject *__pyx_v_p2, PyArrayObject *__pyx_v_p3) {
5787  amns_c_error_type __pyx_v_error_status;
5788  PyArrayObject *__pyx_v_res = 0;
5789  PyObject *__pyx_v_nargs = NULL;
5790  __Pyx_LocalBuf_ND __pyx_pybuffernd_p1;
5791  __Pyx_Buffer __pyx_pybuffer_p1;
5792  __Pyx_LocalBuf_ND __pyx_pybuffernd_p2;
5793  __Pyx_Buffer __pyx_pybuffer_p2;
5794  __Pyx_LocalBuf_ND __pyx_pybuffernd_p3;
5795  __Pyx_Buffer __pyx_pybuffer_p3;
5796  __Pyx_LocalBuf_ND __pyx_pybuffernd_res;
5797  __Pyx_Buffer __pyx_pybuffer_res;
5798  PyObject *__pyx_r = NULL;
5799  __Pyx_RefNannyDeclarations
5800  int __pyx_t_1;
5801  int __pyx_t_2;
5802  PyObject *__pyx_t_3 = NULL;
5803  PyObject *__pyx_t_4 = NULL;
5804  PyObject *__pyx_t_5 = NULL;
5805  PyObject *__pyx_t_6 = NULL;
5806  PyArrayObject *__pyx_t_7 = NULL;
5807  int __pyx_t_8;
5808  PyObject *__pyx_t_9 = NULL;
5809  PyObject *__pyx_t_10 = NULL;
5810  PyObject *__pyx_t_11 = NULL;
5811  PyObject *__pyx_t_12 = NULL;
5812  __Pyx_RefNannySetupContext("_data_1d", 0);
5813  __pyx_pybuffer_res.pybuffer.buf = NULL;
5814  __pyx_pybuffer_res.refcount = 0;
5815  __pyx_pybuffernd_res.data = NULL;
5816  __pyx_pybuffernd_res.rcbuffer = &__pyx_pybuffer_res;
5817  __pyx_pybuffer_p1.pybuffer.buf = NULL;
5818  __pyx_pybuffer_p1.refcount = 0;
5819  __pyx_pybuffernd_p1.data = NULL;
5820  __pyx_pybuffernd_p1.rcbuffer = &__pyx_pybuffer_p1;
5821  __pyx_pybuffer_p2.pybuffer.buf = NULL;
5822  __pyx_pybuffer_p2.refcount = 0;
5823  __pyx_pybuffernd_p2.data = NULL;
5824  __pyx_pybuffernd_p2.rcbuffer = &__pyx_pybuffer_p2;
5825  __pyx_pybuffer_p3.pybuffer.buf = NULL;
5826  __pyx_pybuffer_p3.refcount = 0;
5827  __pyx_pybuffernd_p3.data = NULL;
5828  __pyx_pybuffernd_p3.rcbuffer = &__pyx_pybuffer_p3;
5829  {
5830  __Pyx_BufFmt_StackElem __pyx_stack[1];
5831  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p1.rcbuffer->pybuffer, (PyObject*)__pyx_v_p1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 256, __pyx_L1_error)
5832  }
5833  __pyx_pybuffernd_p1.diminfo[0].strides = __pyx_pybuffernd_p1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p1.diminfo[0].shape = __pyx_pybuffernd_p1.rcbuffer->pybuffer.shape[0];
5834  {
5835  __Pyx_BufFmt_StackElem __pyx_stack[1];
5836  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p2.rcbuffer->pybuffer, (PyObject*)__pyx_v_p2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 256, __pyx_L1_error)
5837  }
5838  __pyx_pybuffernd_p2.diminfo[0].strides = __pyx_pybuffernd_p2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p2.diminfo[0].shape = __pyx_pybuffernd_p2.rcbuffer->pybuffer.shape[0];
5839  {
5840  __Pyx_BufFmt_StackElem __pyx_stack[1];
5841  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p3.rcbuffer->pybuffer, (PyObject*)__pyx_v_p3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 256, __pyx_L1_error)
5842  }
5843  __pyx_pybuffernd_p3.diminfo[0].strides = __pyx_pybuffernd_p3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p3.diminfo[0].shape = __pyx_pybuffernd_p3.rcbuffer->pybuffer.shape[0];
5844 
5845  /* "amns.pyx":262
5846  * cdef np.ndarray[np.double_t, ndim=1] res
5847  *
5848  * nargs = 1 # <<<<<<<<<<<<<<
5849  * if p2 is not None: nargs += 1
5850  * if p3 is not None: nargs += 1
5851  */
5852  __Pyx_INCREF(__pyx_int_1);
5853  __pyx_v_nargs = __pyx_int_1;
5854 
5855  /* "amns.pyx":263
5856  *
5857  * nargs = 1
5858  * if p2 is not None: nargs += 1 # <<<<<<<<<<<<<<
5859  * if p3 is not None: nargs += 1
5860  *
5861  */
5862  __pyx_t_1 = (((PyObject *)__pyx_v_p2) != Py_None);
5863  __pyx_t_2 = (__pyx_t_1 != 0);
5864  if (__pyx_t_2) {
5865  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nargs, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
5866  __Pyx_GOTREF(__pyx_t_3);
5867  __Pyx_DECREF_SET(__pyx_v_nargs, __pyx_t_3);
5868  __pyx_t_3 = 0;
5869  }
5870 
5871  /* "amns.pyx":264
5872  * nargs = 1
5873  * if p2 is not None: nargs += 1
5874  * if p3 is not None: nargs += 1 # <<<<<<<<<<<<<<
5875  *
5876  * res = np.empty_like(p1, order='F')
5877  */
5878  __pyx_t_2 = (((PyObject *)__pyx_v_p3) != Py_None);
5879  __pyx_t_1 = (__pyx_t_2 != 0);
5880  if (__pyx_t_1) {
5881  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nargs, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
5882  __Pyx_GOTREF(__pyx_t_3);
5883  __Pyx_DECREF_SET(__pyx_v_nargs, __pyx_t_3);
5884  __pyx_t_3 = 0;
5885  }
5886 
5887  /* "amns.pyx":266
5888  * if p3 is not None: nargs += 1
5889  *
5890  * res = np.empty_like(p1, order='F') # <<<<<<<<<<<<<<
5891  *
5892  * if nargs == 1:
5893  */
5894  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error)
5895  __Pyx_GOTREF(__pyx_t_3);
5896  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
5897  __Pyx_GOTREF(__pyx_t_4);
5898  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5899  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error)
5900  __Pyx_GOTREF(__pyx_t_3);
5901  __Pyx_INCREF(((PyObject *)__pyx_v_p1));
5902  __Pyx_GIVEREF(((PyObject *)__pyx_v_p1));
5903  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_p1));
5904  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error)
5905  __Pyx_GOTREF(__pyx_t_5);
5906  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
5907  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 266, __pyx_L1_error)
5908  __Pyx_GOTREF(__pyx_t_6);
5909  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5910  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5911  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5912  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 266, __pyx_L1_error)
5913  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
5914  {
5915  __Pyx_BufFmt_StackElem __pyx_stack[1];
5916  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer);
5917  __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_res.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
5918  if (unlikely(__pyx_t_8 < 0)) {
5919  PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
5920  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_res.rcbuffer->pybuffer, (PyObject*)__pyx_v_res, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
5921  Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
5922  __Pyx_RaiseBufferFallbackError();
5923  } else {
5924  PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
5925  }
5926  }
5927  __pyx_pybuffernd_res.diminfo[0].strides = __pyx_pybuffernd_res.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_res.diminfo[0].shape = __pyx_pybuffernd_res.rcbuffer->pybuffer.shape[0];
5928  if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 266, __pyx_L1_error)
5929  }
5930  __pyx_t_7 = 0;
5931  __pyx_v_res = ((PyArrayObject *)__pyx_t_6);
5932  __pyx_t_6 = 0;
5933 
5934  /* "amns.pyx":268
5935  * res = np.empty_like(p1, order='F')
5936  *
5937  * if nargs == 1: # <<<<<<<<<<<<<<
5938  * camns_interface.ITM_AMNS_CC_RX_1_A(self._handle, p1.shape[0],
5939  * <double*> res.data,
5940  */
5941  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_nargs, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 268, __pyx_L1_error)
5942  __Pyx_GOTREF(__pyx_t_6);
5943  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 268, __pyx_L1_error)
5944  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5945  if (__pyx_t_1) {
5946 
5947  /* "amns.pyx":269
5948  *
5949  * if nargs == 1:
5950  * camns_interface.ITM_AMNS_CC_RX_1_A(self._handle, p1.shape[0], # <<<<<<<<<<<<<<
5951  * <double*> res.data,
5952  * <double*> p1.data, &error_status);
5953  */
5954  ITM_AMNS_CC_RX_1_A(__pyx_v_self->_handle, (__pyx_v_p1->dimensions[0]), ((double *)__pyx_v_res->data), ((double *)__pyx_v_p1->data), (&__pyx_v_error_status));
5955 
5956  /* "amns.pyx":268
5957  * res = np.empty_like(p1, order='F')
5958  *
5959  * if nargs == 1: # <<<<<<<<<<<<<<
5960  * camns_interface.ITM_AMNS_CC_RX_1_A(self._handle, p1.shape[0],
5961  * <double*> res.data,
5962  */
5963  goto __pyx_L5;
5964  }
5965 
5966  /* "amns.pyx":272
5967  * <double*> res.data,
5968  * <double*> p1.data, &error_status);
5969  * elif nargs == 2: # <<<<<<<<<<<<<<
5970  * camns_interface.ITM_AMNS_CC_RX_1_B(self._handle, p1.shape[0],
5971  * <double*> res.data,
5972  */
5973  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_nargs, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 272, __pyx_L1_error)
5974  __Pyx_GOTREF(__pyx_t_6);
5975  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 272, __pyx_L1_error)
5976  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5977  if (__pyx_t_1) {
5978 
5979  /* "amns.pyx":273
5980  * <double*> p1.data, &error_status);
5981  * elif nargs == 2:
5982  * camns_interface.ITM_AMNS_CC_RX_1_B(self._handle, p1.shape[0], # <<<<<<<<<<<<<<
5983  * <double*> res.data,
5984  * <double*> p1.data,
5985  */
5986  ITM_AMNS_CC_RX_1_B(__pyx_v_self->_handle, (__pyx_v_p1->dimensions[0]), ((double *)__pyx_v_res->data), ((double *)__pyx_v_p1->data), ((double *)__pyx_v_p2->data), (&__pyx_v_error_status));
5987 
5988  /* "amns.pyx":272
5989  * <double*> res.data,
5990  * <double*> p1.data, &error_status);
5991  * elif nargs == 2: # <<<<<<<<<<<<<<
5992  * camns_interface.ITM_AMNS_CC_RX_1_B(self._handle, p1.shape[0],
5993  * <double*> res.data,
5994  */
5995  goto __pyx_L5;
5996  }
5997 
5998  /* "amns.pyx":277
5999  * <double*> p1.data,
6000  * <double*> p2.data, &error_status);
6001  * elif nargs == 3: # <<<<<<<<<<<<<<
6002  * camns_interface.ITM_AMNS_CC_RX_1_C(self._handle, p1.shape[0],
6003  * <double*> res.data,
6004  */
6005  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_nargs, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error)
6006  __Pyx_GOTREF(__pyx_t_6);
6007  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 277, __pyx_L1_error)
6008  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6009  if (__pyx_t_1) {
6010 
6011  /* "amns.pyx":278
6012  * <double*> p2.data, &error_status);
6013  * elif nargs == 3:
6014  * camns_interface.ITM_AMNS_CC_RX_1_C(self._handle, p1.shape[0], # <<<<<<<<<<<<<<
6015  * <double*> res.data,
6016  * <double*> p1.data,
6017  */
6018  ITM_AMNS_CC_RX_1_C(__pyx_v_self->_handle, (__pyx_v_p1->dimensions[0]), ((double *)__pyx_v_res->data), ((double *)__pyx_v_p1->data), ((double *)__pyx_v_p2->data), ((double *)__pyx_v_p3->data), (&__pyx_v_error_status));
6019 
6020  /* "amns.pyx":277
6021  * <double*> p1.data,
6022  * <double*> p2.data, &error_status);
6023  * elif nargs == 3: # <<<<<<<<<<<<<<
6024  * camns_interface.ITM_AMNS_CC_RX_1_C(self._handle, p1.shape[0],
6025  * <double*> res.data,
6026  */
6027  }
6028  __pyx_L5:;
6029 
6030  /* "amns.pyx":284
6031  * <double*> p3.data, &error_status);
6032  *
6033  * if error_status.flag: # <<<<<<<<<<<<<<
6034  * raise AmnsException(error_status.string)
6035  * return res
6036  */
6037  __pyx_t_1 = (__pyx_v_error_status.flag != 0);
6038  if (__pyx_t_1) {
6039 
6040  /* "amns.pyx":285
6041  *
6042  * if error_status.flag:
6043  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
6044  * return res
6045  *
6046  */
6047  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error)
6048  __Pyx_GOTREF(__pyx_t_5);
6049  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
6050  __Pyx_GOTREF(__pyx_t_3);
6051  __pyx_t_4 = NULL;
6052  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
6053  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
6054  if (likely(__pyx_t_4)) {
6055  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6056  __Pyx_INCREF(__pyx_t_4);
6057  __Pyx_INCREF(function);
6058  __Pyx_DECREF_SET(__pyx_t_5, function);
6059  }
6060  }
6061  if (!__pyx_t_4) {
6062  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error)
6063  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6064  __Pyx_GOTREF(__pyx_t_6);
6065  } else {
6066  #if CYTHON_FAST_PYCALL
6067  if (PyFunction_Check(__pyx_t_5)) {
6068  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
6069  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error)
6070  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6071  __Pyx_GOTREF(__pyx_t_6);
6072  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6073  } else
6074  #endif
6075  #if CYTHON_FAST_PYCCALL
6076  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
6077  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
6078  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error)
6079  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6080  __Pyx_GOTREF(__pyx_t_6);
6081  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6082  } else
6083  #endif
6084  {
6085  __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 285, __pyx_L1_error)
6086  __Pyx_GOTREF(__pyx_t_12);
6087  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
6088  __Pyx_GIVEREF(__pyx_t_3);
6089  PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_3);
6090  __pyx_t_3 = 0;
6091  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error)
6092  __Pyx_GOTREF(__pyx_t_6);
6093  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6094  }
6095  }
6096  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6097  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
6098  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6099  __PYX_ERR(0, 285, __pyx_L1_error)
6100 
6101  /* "amns.pyx":284
6102  * <double*> p3.data, &error_status);
6103  *
6104  * if error_status.flag: # <<<<<<<<<<<<<<
6105  * raise AmnsException(error_status.string)
6106  * return res
6107  */
6108  }
6109 
6110  /* "amns.pyx":286
6111  * if error_status.flag:
6112  * raise AmnsException(error_status.string)
6113  * return res # <<<<<<<<<<<<<<
6114  *
6115  * def _data_2d(self, np.ndarray[np.double_t, ndim=2] p1,
6116  */
6117  __Pyx_XDECREF(__pyx_r);
6118  __Pyx_INCREF(((PyObject *)__pyx_v_res));
6119  __pyx_r = ((PyObject *)__pyx_v_res);
6120  goto __pyx_L0;
6121 
6122  /* "amns.pyx":256
6123  * return res
6124  *
6125  * def _data_1d(self, np.ndarray[np.double_t, ndim=1] p1, # <<<<<<<<<<<<<<
6126  * np.ndarray[np.double_t, ndim=1] p2 = None,
6127  * np.ndarray[np.double_t, ndim=1] p3 = None):
6128  */
6129 
6130  /* function exit code */
6131  __pyx_L1_error:;
6132  __Pyx_XDECREF(__pyx_t_3);
6133  __Pyx_XDECREF(__pyx_t_4);
6134  __Pyx_XDECREF(__pyx_t_5);
6135  __Pyx_XDECREF(__pyx_t_6);
6136  __Pyx_XDECREF(__pyx_t_12);
6137  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
6138  __Pyx_PyThreadState_declare
6139  __Pyx_PyThreadState_assign
6140  __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
6141  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p1.rcbuffer->pybuffer);
6142  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p2.rcbuffer->pybuffer);
6143  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p3.rcbuffer->pybuffer);
6144  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer);
6145  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
6146  __Pyx_AddTraceback("amns.Table._data_1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6147  __pyx_r = NULL;
6148  goto __pyx_L2;
6149  __pyx_L0:;
6150  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p1.rcbuffer->pybuffer);
6151  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p2.rcbuffer->pybuffer);
6152  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p3.rcbuffer->pybuffer);
6153  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer);
6154  __pyx_L2:;
6155  __Pyx_XDECREF((PyObject *)__pyx_v_res);
6156  __Pyx_XDECREF(__pyx_v_nargs);
6157  __Pyx_XGIVEREF(__pyx_r);
6158  __Pyx_RefNannyFinishContext();
6159  return __pyx_r;
6160 }
6161 
6162 /* "amns.pyx":288
6163  * return res
6164  *
6165  * def _data_2d(self, np.ndarray[np.double_t, ndim=2] p1, # <<<<<<<<<<<<<<
6166  * np.ndarray[np.double_t, ndim=2] p2 = None,
6167  * np.ndarray[np.double_t, ndim=2] p3 = None):
6168  */
6169 
6170 /* Python wrapper */
6171 static PyObject *__pyx_pw_4amns_5Table_13_data_2d(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6172 static PyObject *__pyx_pw_4amns_5Table_13_data_2d(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6173  PyArrayObject *__pyx_v_p1 = 0;
6174  PyArrayObject *__pyx_v_p2 = 0;
6175  PyArrayObject *__pyx_v_p3 = 0;
6176  PyObject *__pyx_r = 0;
6177  __Pyx_RefNannyDeclarations
6178  __Pyx_RefNannySetupContext("_data_2d (wrapper)", 0);
6179  {
6180  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p1,&__pyx_n_s_p2,&__pyx_n_s_p3,0};
6181  PyObject* values[3] = {0,0,0};
6182 
6183  /* "amns.pyx":289
6184  *
6185  * def _data_2d(self, np.ndarray[np.double_t, ndim=2] p1,
6186  * np.ndarray[np.double_t, ndim=2] p2 = None, # <<<<<<<<<<<<<<
6187  * np.ndarray[np.double_t, ndim=2] p3 = None):
6188  *
6189  */
6190  values[1] = (PyObject *)((PyArrayObject *)Py_None);
6191 
6192  /* "amns.pyx":290
6193  * def _data_2d(self, np.ndarray[np.double_t, ndim=2] p1,
6194  * np.ndarray[np.double_t, ndim=2] p2 = None,
6195  * np.ndarray[np.double_t, ndim=2] p3 = None): # <<<<<<<<<<<<<<
6196  *
6197  * cdef camns_interface.amns_c_error_type error_status
6198  */
6199  values[2] = (PyObject *)((PyArrayObject *)Py_None);
6200  if (unlikely(__pyx_kwds)) {
6201  Py_ssize_t kw_args;
6202  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6203  switch (pos_args) {
6204  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6205  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6206  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6207  case 0: break;
6208  default: goto __pyx_L5_argtuple_error;
6209  }
6210  kw_args = PyDict_Size(__pyx_kwds);
6211  switch (pos_args) {
6212  case 0:
6213  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p1)) != 0)) kw_args--;
6214  else goto __pyx_L5_argtuple_error;
6215  case 1:
6216  if (kw_args > 0) {
6217  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p2);
6218  if (value) { values[1] = value; kw_args--; }
6219  }
6220  case 2:
6221  if (kw_args > 0) {
6222  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p3);
6223  if (value) { values[2] = value; kw_args--; }
6224  }
6225  }
6226  if (unlikely(kw_args > 0)) {
6227  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_data_2d") < 0)) __PYX_ERR(0, 288, __pyx_L3_error)
6228  }
6229  } else {
6230  switch (PyTuple_GET_SIZE(__pyx_args)) {
6231  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6232  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6233  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6234  break;
6235  default: goto __pyx_L5_argtuple_error;
6236  }
6237  }
6238  __pyx_v_p1 = ((PyArrayObject *)values[0]);
6239  __pyx_v_p2 = ((PyArrayObject *)values[1]);
6240  __pyx_v_p3 = ((PyArrayObject *)values[2]);
6241  }
6242  goto __pyx_L4_argument_unpacking_done;
6243  __pyx_L5_argtuple_error:;
6244  __Pyx_RaiseArgtupleInvalid("_data_2d", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 288, __pyx_L3_error)
6245  __pyx_L3_error:;
6246  __Pyx_AddTraceback("amns.Table._data_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6247  __Pyx_RefNannyFinishContext();
6248  return NULL;
6249  __pyx_L4_argument_unpacking_done:;
6250  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p1), __pyx_ptype_5numpy_ndarray, 1, "p1", 0))) __PYX_ERR(0, 288, __pyx_L1_error)
6251  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p2), __pyx_ptype_5numpy_ndarray, 1, "p2", 0))) __PYX_ERR(0, 289, __pyx_L1_error)
6252  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p3), __pyx_ptype_5numpy_ndarray, 1, "p3", 0))) __PYX_ERR(0, 290, __pyx_L1_error)
6253  __pyx_r = __pyx_pf_4amns_5Table_12_data_2d(((struct __pyx_obj_4amns_Table *)__pyx_v_self), __pyx_v_p1, __pyx_v_p2, __pyx_v_p3);
6254 
6255  /* "amns.pyx":288
6256  * return res
6257  *
6258  * def _data_2d(self, np.ndarray[np.double_t, ndim=2] p1, # <<<<<<<<<<<<<<
6259  * np.ndarray[np.double_t, ndim=2] p2 = None,
6260  * np.ndarray[np.double_t, ndim=2] p3 = None):
6261  */
6262 
6263  /* function exit code */
6264  goto __pyx_L0;
6265  __pyx_L1_error:;
6266  __pyx_r = NULL;
6267  __pyx_L0:;
6268  __Pyx_RefNannyFinishContext();
6269  return __pyx_r;
6270 }
6271 
6272 static PyObject *__pyx_pf_4amns_5Table_12_data_2d(struct __pyx_obj_4amns_Table *__pyx_v_self, PyArrayObject *__pyx_v_p1, PyArrayObject *__pyx_v_p2, PyArrayObject *__pyx_v_p3) {
6273  amns_c_error_type __pyx_v_error_status;
6274  PyArrayObject *__pyx_v_res = 0;
6275  PyObject *__pyx_v_nargs = NULL;
6276  __Pyx_LocalBuf_ND __pyx_pybuffernd_p1;
6277  __Pyx_Buffer __pyx_pybuffer_p1;
6278  __Pyx_LocalBuf_ND __pyx_pybuffernd_p2;
6279  __Pyx_Buffer __pyx_pybuffer_p2;
6280  __Pyx_LocalBuf_ND __pyx_pybuffernd_p3;
6281  __Pyx_Buffer __pyx_pybuffer_p3;
6282  __Pyx_LocalBuf_ND __pyx_pybuffernd_res;
6283  __Pyx_Buffer __pyx_pybuffer_res;
6284  PyObject *__pyx_r = NULL;
6285  __Pyx_RefNannyDeclarations
6286  int __pyx_t_1;
6287  int __pyx_t_2;
6288  PyObject *__pyx_t_3 = NULL;
6289  PyObject *__pyx_t_4 = NULL;
6290  PyObject *__pyx_t_5 = NULL;
6291  PyObject *__pyx_t_6 = NULL;
6292  PyArrayObject *__pyx_t_7 = NULL;
6293  int __pyx_t_8;
6294  PyObject *__pyx_t_9 = NULL;
6295  PyObject *__pyx_t_10 = NULL;
6296  PyObject *__pyx_t_11 = NULL;
6297  PyObject *__pyx_t_12 = NULL;
6298  __Pyx_RefNannySetupContext("_data_2d", 0);
6299  __pyx_pybuffer_res.pybuffer.buf = NULL;
6300  __pyx_pybuffer_res.refcount = 0;
6301  __pyx_pybuffernd_res.data = NULL;
6302  __pyx_pybuffernd_res.rcbuffer = &__pyx_pybuffer_res;
6303  __pyx_pybuffer_p1.pybuffer.buf = NULL;
6304  __pyx_pybuffer_p1.refcount = 0;
6305  __pyx_pybuffernd_p1.data = NULL;
6306  __pyx_pybuffernd_p1.rcbuffer = &__pyx_pybuffer_p1;
6307  __pyx_pybuffer_p2.pybuffer.buf = NULL;
6308  __pyx_pybuffer_p2.refcount = 0;
6309  __pyx_pybuffernd_p2.data = NULL;
6310  __pyx_pybuffernd_p2.rcbuffer = &__pyx_pybuffer_p2;
6311  __pyx_pybuffer_p3.pybuffer.buf = NULL;
6312  __pyx_pybuffer_p3.refcount = 0;
6313  __pyx_pybuffernd_p3.data = NULL;
6314  __pyx_pybuffernd_p3.rcbuffer = &__pyx_pybuffer_p3;
6315  {
6316  __Pyx_BufFmt_StackElem __pyx_stack[1];
6317  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p1.rcbuffer->pybuffer, (PyObject*)__pyx_v_p1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 288, __pyx_L1_error)
6318  }
6319  __pyx_pybuffernd_p1.diminfo[0].strides = __pyx_pybuffernd_p1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p1.diminfo[0].shape = __pyx_pybuffernd_p1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_p1.diminfo[1].strides = __pyx_pybuffernd_p1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_p1.diminfo[1].shape = __pyx_pybuffernd_p1.rcbuffer->pybuffer.shape[1];
6320  {
6321  __Pyx_BufFmt_StackElem __pyx_stack[1];
6322  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p2.rcbuffer->pybuffer, (PyObject*)__pyx_v_p2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 288, __pyx_L1_error)
6323  }
6324  __pyx_pybuffernd_p2.diminfo[0].strides = __pyx_pybuffernd_p2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p2.diminfo[0].shape = __pyx_pybuffernd_p2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_p2.diminfo[1].strides = __pyx_pybuffernd_p2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_p2.diminfo[1].shape = __pyx_pybuffernd_p2.rcbuffer->pybuffer.shape[1];
6325  {
6326  __Pyx_BufFmt_StackElem __pyx_stack[1];
6327  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p3.rcbuffer->pybuffer, (PyObject*)__pyx_v_p3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 288, __pyx_L1_error)
6328  }
6329  __pyx_pybuffernd_p3.diminfo[0].strides = __pyx_pybuffernd_p3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p3.diminfo[0].shape = __pyx_pybuffernd_p3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_p3.diminfo[1].strides = __pyx_pybuffernd_p3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_p3.diminfo[1].shape = __pyx_pybuffernd_p3.rcbuffer->pybuffer.shape[1];
6330 
6331  /* "amns.pyx":295
6332  * cdef np.ndarray[np.double_t, ndim=2] res
6333  *
6334  * nargs = 1 # <<<<<<<<<<<<<<
6335  * if p2 is not None: nargs += 1
6336  * if p3 is not None: nargs += 1
6337  */
6338  __Pyx_INCREF(__pyx_int_1);
6339  __pyx_v_nargs = __pyx_int_1;
6340 
6341  /* "amns.pyx":296
6342  *
6343  * nargs = 1
6344  * if p2 is not None: nargs += 1 # <<<<<<<<<<<<<<
6345  * if p3 is not None: nargs += 1
6346  *
6347  */
6348  __pyx_t_1 = (((PyObject *)__pyx_v_p2) != Py_None);
6349  __pyx_t_2 = (__pyx_t_1 != 0);
6350  if (__pyx_t_2) {
6351  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nargs, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error)
6352  __Pyx_GOTREF(__pyx_t_3);
6353  __Pyx_DECREF_SET(__pyx_v_nargs, __pyx_t_3);
6354  __pyx_t_3 = 0;
6355  }
6356 
6357  /* "amns.pyx":297
6358  * nargs = 1
6359  * if p2 is not None: nargs += 1
6360  * if p3 is not None: nargs += 1 # <<<<<<<<<<<<<<
6361  *
6362  * res = np.empty_like(p1, order='F')
6363  */
6364  __pyx_t_2 = (((PyObject *)__pyx_v_p3) != Py_None);
6365  __pyx_t_1 = (__pyx_t_2 != 0);
6366  if (__pyx_t_1) {
6367  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nargs, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error)
6368  __Pyx_GOTREF(__pyx_t_3);
6369  __Pyx_DECREF_SET(__pyx_v_nargs, __pyx_t_3);
6370  __pyx_t_3 = 0;
6371  }
6372 
6373  /* "amns.pyx":299
6374  * if p3 is not None: nargs += 1
6375  *
6376  * res = np.empty_like(p1, order='F') # <<<<<<<<<<<<<<
6377  *
6378  * if nargs == 1:
6379  */
6380  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
6381  __Pyx_GOTREF(__pyx_t_3);
6382  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error)
6383  __Pyx_GOTREF(__pyx_t_4);
6384  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6385  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
6386  __Pyx_GOTREF(__pyx_t_3);
6387  __Pyx_INCREF(((PyObject *)__pyx_v_p1));
6388  __Pyx_GIVEREF(((PyObject *)__pyx_v_p1));
6389  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_p1));
6390  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 299, __pyx_L1_error)
6391  __Pyx_GOTREF(__pyx_t_5);
6392  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(0, 299, __pyx_L1_error)
6393  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 299, __pyx_L1_error)
6394  __Pyx_GOTREF(__pyx_t_6);
6395  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6396  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6397  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6398  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 299, __pyx_L1_error)
6399  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
6400  {
6401  __Pyx_BufFmt_StackElem __pyx_stack[1];
6402  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer);
6403  __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_res.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
6404  if (unlikely(__pyx_t_8 < 0)) {
6405  PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
6406  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_res.rcbuffer->pybuffer, (PyObject*)__pyx_v_res, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
6407  Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
6408  __Pyx_RaiseBufferFallbackError();
6409  } else {
6410  PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
6411  }
6412  }
6413  __pyx_pybuffernd_res.diminfo[0].strides = __pyx_pybuffernd_res.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_res.diminfo[0].shape = __pyx_pybuffernd_res.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_res.diminfo[1].strides = __pyx_pybuffernd_res.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_res.diminfo[1].shape = __pyx_pybuffernd_res.rcbuffer->pybuffer.shape[1];
6414  if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 299, __pyx_L1_error)
6415  }
6416  __pyx_t_7 = 0;
6417  __pyx_v_res = ((PyArrayObject *)__pyx_t_6);
6418  __pyx_t_6 = 0;
6419 
6420  /* "amns.pyx":301
6421  * res = np.empty_like(p1, order='F')
6422  *
6423  * if nargs == 1: # <<<<<<<<<<<<<<
6424  * camns_interface.ITM_AMNS_CC_RX_2_A(self._handle, p1.shape[0], p1.shape[1],
6425  * <double*> res.data,
6426  */
6427  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_nargs, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 301, __pyx_L1_error)
6428  __Pyx_GOTREF(__pyx_t_6);
6429  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 301, __pyx_L1_error)
6430  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6431  if (__pyx_t_1) {
6432 
6433  /* "amns.pyx":302
6434  *
6435  * if nargs == 1:
6436  * camns_interface.ITM_AMNS_CC_RX_2_A(self._handle, p1.shape[0], p1.shape[1], # <<<<<<<<<<<<<<
6437  * <double*> res.data,
6438  * <double*> p1.data, &error_status);
6439  */
6440  ITM_AMNS_CC_RX_2_A(__pyx_v_self->_handle, (__pyx_v_p1->dimensions[0]), (__pyx_v_p1->dimensions[1]), ((double *)__pyx_v_res->data), ((double *)__pyx_v_p1->data), (&__pyx_v_error_status));
6441 
6442  /* "amns.pyx":301
6443  * res = np.empty_like(p1, order='F')
6444  *
6445  * if nargs == 1: # <<<<<<<<<<<<<<
6446  * camns_interface.ITM_AMNS_CC_RX_2_A(self._handle, p1.shape[0], p1.shape[1],
6447  * <double*> res.data,
6448  */
6449  goto __pyx_L5;
6450  }
6451 
6452  /* "amns.pyx":305
6453  * <double*> res.data,
6454  * <double*> p1.data, &error_status);
6455  * elif nargs == 2: # <<<<<<<<<<<<<<
6456  * camns_interface.ITM_AMNS_CC_RX_2_B(self._handle, p1.shape[0], p1.shape[1],
6457  * <double*> res.data,
6458  */
6459  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_nargs, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 305, __pyx_L1_error)
6460  __Pyx_GOTREF(__pyx_t_6);
6461  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 305, __pyx_L1_error)
6462  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6463  if (__pyx_t_1) {
6464 
6465  /* "amns.pyx":306
6466  * <double*> p1.data, &error_status);
6467  * elif nargs == 2:
6468  * camns_interface.ITM_AMNS_CC_RX_2_B(self._handle, p1.shape[0], p1.shape[1], # <<<<<<<<<<<<<<
6469  * <double*> res.data,
6470  * <double*> p1.data,
6471  */
6472  ITM_AMNS_CC_RX_2_B(__pyx_v_self->_handle, (__pyx_v_p1->dimensions[0]), (__pyx_v_p1->dimensions[1]), ((double *)__pyx_v_res->data), ((double *)__pyx_v_p1->data), ((double *)__pyx_v_p2->data), (&__pyx_v_error_status));
6473 
6474  /* "amns.pyx":305
6475  * <double*> res.data,
6476  * <double*> p1.data, &error_status);
6477  * elif nargs == 2: # <<<<<<<<<<<<<<
6478  * camns_interface.ITM_AMNS_CC_RX_2_B(self._handle, p1.shape[0], p1.shape[1],
6479  * <double*> res.data,
6480  */
6481  goto __pyx_L5;
6482  }
6483 
6484  /* "amns.pyx":310
6485  * <double*> p1.data,
6486  * <double*> p2.data, &error_status);
6487  * elif nargs == 3: # <<<<<<<<<<<<<<
6488  * camns_interface.ITM_AMNS_CC_RX_2_C(self._handle, p1.shape[0], p1.shape[1],
6489  * <double*> res.data,
6490  */
6491  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_nargs, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error)
6492  __Pyx_GOTREF(__pyx_t_6);
6493  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
6494  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6495  if (__pyx_t_1) {
6496 
6497  /* "amns.pyx":311
6498  * <double*> p2.data, &error_status);
6499  * elif nargs == 3:
6500  * camns_interface.ITM_AMNS_CC_RX_2_C(self._handle, p1.shape[0], p1.shape[1], # <<<<<<<<<<<<<<
6501  * <double*> res.data,
6502  * <double*> p1.data,
6503  */
6504  ITM_AMNS_CC_RX_2_C(__pyx_v_self->_handle, (__pyx_v_p1->dimensions[0]), (__pyx_v_p1->dimensions[1]), ((double *)__pyx_v_res->data), ((double *)__pyx_v_p1->data), ((double *)__pyx_v_p2->data), ((double *)__pyx_v_p3->data), (&__pyx_v_error_status));
6505 
6506  /* "amns.pyx":310
6507  * <double*> p1.data,
6508  * <double*> p2.data, &error_status);
6509  * elif nargs == 3: # <<<<<<<<<<<<<<
6510  * camns_interface.ITM_AMNS_CC_RX_2_C(self._handle, p1.shape[0], p1.shape[1],
6511  * <double*> res.data,
6512  */
6513  }
6514  __pyx_L5:;
6515 
6516  /* "amns.pyx":317
6517  * <double*> p3.data, &error_status);
6518  *
6519  * if error_status.flag: # <<<<<<<<<<<<<<
6520  * raise AmnsException(error_status.string)
6521  * return res
6522  */
6523  __pyx_t_1 = (__pyx_v_error_status.flag != 0);
6524  if (__pyx_t_1) {
6525 
6526  /* "amns.pyx":318
6527  *
6528  * if error_status.flag:
6529  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
6530  * return res
6531  *
6532  */
6533  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error)
6534  __Pyx_GOTREF(__pyx_t_5);
6535  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error)
6536  __Pyx_GOTREF(__pyx_t_3);
6537  __pyx_t_4 = NULL;
6538  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
6539  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
6540  if (likely(__pyx_t_4)) {
6541  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6542  __Pyx_INCREF(__pyx_t_4);
6543  __Pyx_INCREF(function);
6544  __Pyx_DECREF_SET(__pyx_t_5, function);
6545  }
6546  }
6547  if (!__pyx_t_4) {
6548  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
6549  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6550  __Pyx_GOTREF(__pyx_t_6);
6551  } else {
6552  #if CYTHON_FAST_PYCALL
6553  if (PyFunction_Check(__pyx_t_5)) {
6554  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
6555  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
6556  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6557  __Pyx_GOTREF(__pyx_t_6);
6558  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6559  } else
6560  #endif
6561  #if CYTHON_FAST_PYCCALL
6562  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
6563  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
6564  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
6565  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6566  __Pyx_GOTREF(__pyx_t_6);
6567  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6568  } else
6569  #endif
6570  {
6571  __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 318, __pyx_L1_error)
6572  __Pyx_GOTREF(__pyx_t_12);
6573  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
6574  __Pyx_GIVEREF(__pyx_t_3);
6575  PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_3);
6576  __pyx_t_3 = 0;
6577  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
6578  __Pyx_GOTREF(__pyx_t_6);
6579  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6580  }
6581  }
6582  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6583  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
6584  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6585  __PYX_ERR(0, 318, __pyx_L1_error)
6586 
6587  /* "amns.pyx":317
6588  * <double*> p3.data, &error_status);
6589  *
6590  * if error_status.flag: # <<<<<<<<<<<<<<
6591  * raise AmnsException(error_status.string)
6592  * return res
6593  */
6594  }
6595 
6596  /* "amns.pyx":319
6597  * if error_status.flag:
6598  * raise AmnsException(error_status.string)
6599  * return res # <<<<<<<<<<<<<<
6600  *
6601  * def _data_3d(self, np.ndarray[np.double_t, ndim=3] p1,
6602  */
6603  __Pyx_XDECREF(__pyx_r);
6604  __Pyx_INCREF(((PyObject *)__pyx_v_res));
6605  __pyx_r = ((PyObject *)__pyx_v_res);
6606  goto __pyx_L0;
6607 
6608  /* "amns.pyx":288
6609  * return res
6610  *
6611  * def _data_2d(self, np.ndarray[np.double_t, ndim=2] p1, # <<<<<<<<<<<<<<
6612  * np.ndarray[np.double_t, ndim=2] p2 = None,
6613  * np.ndarray[np.double_t, ndim=2] p3 = None):
6614  */
6615 
6616  /* function exit code */
6617  __pyx_L1_error:;
6618  __Pyx_XDECREF(__pyx_t_3);
6619  __Pyx_XDECREF(__pyx_t_4);
6620  __Pyx_XDECREF(__pyx_t_5);
6621  __Pyx_XDECREF(__pyx_t_6);
6622  __Pyx_XDECREF(__pyx_t_12);
6623  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
6624  __Pyx_PyThreadState_declare
6625  __Pyx_PyThreadState_assign
6626  __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
6627  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p1.rcbuffer->pybuffer);
6628  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p2.rcbuffer->pybuffer);
6629  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p3.rcbuffer->pybuffer);
6630  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer);
6631  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
6632  __Pyx_AddTraceback("amns.Table._data_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6633  __pyx_r = NULL;
6634  goto __pyx_L2;
6635  __pyx_L0:;
6636  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p1.rcbuffer->pybuffer);
6637  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p2.rcbuffer->pybuffer);
6638  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p3.rcbuffer->pybuffer);
6639  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer);
6640  __pyx_L2:;
6641  __Pyx_XDECREF((PyObject *)__pyx_v_res);
6642  __Pyx_XDECREF(__pyx_v_nargs);
6643  __Pyx_XGIVEREF(__pyx_r);
6644  __Pyx_RefNannyFinishContext();
6645  return __pyx_r;
6646 }
6647 
6648 /* "amns.pyx":321
6649  * return res
6650  *
6651  * def _data_3d(self, np.ndarray[np.double_t, ndim=3] p1, # <<<<<<<<<<<<<<
6652  * np.ndarray[np.double_t, ndim=3] p2 = None,
6653  * np.ndarray[np.double_t, ndim=3] p3 = None):
6654  */
6655 
6656 /* Python wrapper */
6657 static PyObject *__pyx_pw_4amns_5Table_15_data_3d(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6658 static PyObject *__pyx_pw_4amns_5Table_15_data_3d(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6659  PyArrayObject *__pyx_v_p1 = 0;
6660  PyArrayObject *__pyx_v_p2 = 0;
6661  PyArrayObject *__pyx_v_p3 = 0;
6662  PyObject *__pyx_r = 0;
6663  __Pyx_RefNannyDeclarations
6664  __Pyx_RefNannySetupContext("_data_3d (wrapper)", 0);
6665  {
6666  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p1,&__pyx_n_s_p2,&__pyx_n_s_p3,0};
6667  PyObject* values[3] = {0,0,0};
6668 
6669  /* "amns.pyx":322
6670  *
6671  * def _data_3d(self, np.ndarray[np.double_t, ndim=3] p1,
6672  * np.ndarray[np.double_t, ndim=3] p2 = None, # <<<<<<<<<<<<<<
6673  * np.ndarray[np.double_t, ndim=3] p3 = None):
6674  * cdef camns_interface.amns_c_error_type error_status
6675  */
6676  values[1] = (PyObject *)((PyArrayObject *)Py_None);
6677 
6678  /* "amns.pyx":323
6679  * def _data_3d(self, np.ndarray[np.double_t, ndim=3] p1,
6680  * np.ndarray[np.double_t, ndim=3] p2 = None,
6681  * np.ndarray[np.double_t, ndim=3] p3 = None): # <<<<<<<<<<<<<<
6682  * cdef camns_interface.amns_c_error_type error_status
6683  * cdef np.ndarray[np.double_t, ndim=3] res
6684  */
6685  values[2] = (PyObject *)((PyArrayObject *)Py_None);
6686  if (unlikely(__pyx_kwds)) {
6687  Py_ssize_t kw_args;
6688  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6689  switch (pos_args) {
6690  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6691  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6692  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6693  case 0: break;
6694  default: goto __pyx_L5_argtuple_error;
6695  }
6696  kw_args = PyDict_Size(__pyx_kwds);
6697  switch (pos_args) {
6698  case 0:
6699  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p1)) != 0)) kw_args--;
6700  else goto __pyx_L5_argtuple_error;
6701  case 1:
6702  if (kw_args > 0) {
6703  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p2);
6704  if (value) { values[1] = value; kw_args--; }
6705  }
6706  case 2:
6707  if (kw_args > 0) {
6708  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p3);
6709  if (value) { values[2] = value; kw_args--; }
6710  }
6711  }
6712  if (unlikely(kw_args > 0)) {
6713  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_data_3d") < 0)) __PYX_ERR(0, 321, __pyx_L3_error)
6714  }
6715  } else {
6716  switch (PyTuple_GET_SIZE(__pyx_args)) {
6717  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6718  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6719  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6720  break;
6721  default: goto __pyx_L5_argtuple_error;
6722  }
6723  }
6724  __pyx_v_p1 = ((PyArrayObject *)values[0]);
6725  __pyx_v_p2 = ((PyArrayObject *)values[1]);
6726  __pyx_v_p3 = ((PyArrayObject *)values[2]);
6727  }
6728  goto __pyx_L4_argument_unpacking_done;
6729  __pyx_L5_argtuple_error:;
6730  __Pyx_RaiseArgtupleInvalid("_data_3d", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 321, __pyx_L3_error)
6731  __pyx_L3_error:;
6732  __Pyx_AddTraceback("amns.Table._data_3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6733  __Pyx_RefNannyFinishContext();
6734  return NULL;
6735  __pyx_L4_argument_unpacking_done:;
6736  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p1), __pyx_ptype_5numpy_ndarray, 1, "p1", 0))) __PYX_ERR(0, 321, __pyx_L1_error)
6737  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p2), __pyx_ptype_5numpy_ndarray, 1, "p2", 0))) __PYX_ERR(0, 322, __pyx_L1_error)
6738  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p3), __pyx_ptype_5numpy_ndarray, 1, "p3", 0))) __PYX_ERR(0, 323, __pyx_L1_error)
6739  __pyx_r = __pyx_pf_4amns_5Table_14_data_3d(((struct __pyx_obj_4amns_Table *)__pyx_v_self), __pyx_v_p1, __pyx_v_p2, __pyx_v_p3);
6740 
6741  /* "amns.pyx":321
6742  * return res
6743  *
6744  * def _data_3d(self, np.ndarray[np.double_t, ndim=3] p1, # <<<<<<<<<<<<<<
6745  * np.ndarray[np.double_t, ndim=3] p2 = None,
6746  * np.ndarray[np.double_t, ndim=3] p3 = None):
6747  */
6748 
6749  /* function exit code */
6750  goto __pyx_L0;
6751  __pyx_L1_error:;
6752  __pyx_r = NULL;
6753  __pyx_L0:;
6754  __Pyx_RefNannyFinishContext();
6755  return __pyx_r;
6756 }
6757 
6758 static PyObject *__pyx_pf_4amns_5Table_14_data_3d(struct __pyx_obj_4amns_Table *__pyx_v_self, PyArrayObject *__pyx_v_p1, PyArrayObject *__pyx_v_p2, PyArrayObject *__pyx_v_p3) {
6759  amns_c_error_type __pyx_v_error_status;
6760  PyArrayObject *__pyx_v_res = 0;
6761  PyObject *__pyx_v_nargs = NULL;
6762  __Pyx_LocalBuf_ND __pyx_pybuffernd_p1;
6763  __Pyx_Buffer __pyx_pybuffer_p1;
6764  __Pyx_LocalBuf_ND __pyx_pybuffernd_p2;
6765  __Pyx_Buffer __pyx_pybuffer_p2;
6766  __Pyx_LocalBuf_ND __pyx_pybuffernd_p3;
6767  __Pyx_Buffer __pyx_pybuffer_p3;
6768  __Pyx_LocalBuf_ND __pyx_pybuffernd_res;
6769  __Pyx_Buffer __pyx_pybuffer_res;
6770  PyObject *__pyx_r = NULL;
6771  __Pyx_RefNannyDeclarations
6772  int __pyx_t_1;
6773  int __pyx_t_2;
6774  PyObject *__pyx_t_3 = NULL;
6775  PyObject *__pyx_t_4 = NULL;
6776  PyObject *__pyx_t_5 = NULL;
6777  PyObject *__pyx_t_6 = NULL;
6778  PyArrayObject *__pyx_t_7 = NULL;
6779  int __pyx_t_8;
6780  PyObject *__pyx_t_9 = NULL;
6781  PyObject *__pyx_t_10 = NULL;
6782  PyObject *__pyx_t_11 = NULL;
6783  PyObject *__pyx_t_12 = NULL;
6784  __Pyx_RefNannySetupContext("_data_3d", 0);
6785  __pyx_pybuffer_res.pybuffer.buf = NULL;
6786  __pyx_pybuffer_res.refcount = 0;
6787  __pyx_pybuffernd_res.data = NULL;
6788  __pyx_pybuffernd_res.rcbuffer = &__pyx_pybuffer_res;
6789  __pyx_pybuffer_p1.pybuffer.buf = NULL;
6790  __pyx_pybuffer_p1.refcount = 0;
6791  __pyx_pybuffernd_p1.data = NULL;
6792  __pyx_pybuffernd_p1.rcbuffer = &__pyx_pybuffer_p1;
6793  __pyx_pybuffer_p2.pybuffer.buf = NULL;
6794  __pyx_pybuffer_p2.refcount = 0;
6795  __pyx_pybuffernd_p2.data = NULL;
6796  __pyx_pybuffernd_p2.rcbuffer = &__pyx_pybuffer_p2;
6797  __pyx_pybuffer_p3.pybuffer.buf = NULL;
6798  __pyx_pybuffer_p3.refcount = 0;
6799  __pyx_pybuffernd_p3.data = NULL;
6800  __pyx_pybuffernd_p3.rcbuffer = &__pyx_pybuffer_p3;
6801  {
6802  __Pyx_BufFmt_StackElem __pyx_stack[1];
6803  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p1.rcbuffer->pybuffer, (PyObject*)__pyx_v_p1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 321, __pyx_L1_error)
6804  }
6805  __pyx_pybuffernd_p1.diminfo[0].strides = __pyx_pybuffernd_p1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p1.diminfo[0].shape = __pyx_pybuffernd_p1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_p1.diminfo[1].strides = __pyx_pybuffernd_p1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_p1.diminfo[1].shape = __pyx_pybuffernd_p1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_p1.diminfo[2].strides = __pyx_pybuffernd_p1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_p1.diminfo[2].shape = __pyx_pybuffernd_p1.rcbuffer->pybuffer.shape[2];
6806  {
6807  __Pyx_BufFmt_StackElem __pyx_stack[1];
6808  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p2.rcbuffer->pybuffer, (PyObject*)__pyx_v_p2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 321, __pyx_L1_error)
6809  }
6810  __pyx_pybuffernd_p2.diminfo[0].strides = __pyx_pybuffernd_p2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p2.diminfo[0].shape = __pyx_pybuffernd_p2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_p2.diminfo[1].strides = __pyx_pybuffernd_p2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_p2.diminfo[1].shape = __pyx_pybuffernd_p2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_p2.diminfo[2].strides = __pyx_pybuffernd_p2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_p2.diminfo[2].shape = __pyx_pybuffernd_p2.rcbuffer->pybuffer.shape[2];
6811  {
6812  __Pyx_BufFmt_StackElem __pyx_stack[1];
6813  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p3.rcbuffer->pybuffer, (PyObject*)__pyx_v_p3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 321, __pyx_L1_error)
6814  }
6815  __pyx_pybuffernd_p3.diminfo[0].strides = __pyx_pybuffernd_p3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p3.diminfo[0].shape = __pyx_pybuffernd_p3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_p3.diminfo[1].strides = __pyx_pybuffernd_p3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_p3.diminfo[1].shape = __pyx_pybuffernd_p3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_p3.diminfo[2].strides = __pyx_pybuffernd_p3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_p3.diminfo[2].shape = __pyx_pybuffernd_p3.rcbuffer->pybuffer.shape[2];
6816 
6817  /* "amns.pyx":327
6818  * cdef np.ndarray[np.double_t, ndim=3] res
6819  *
6820  * nargs = 1 # <<<<<<<<<<<<<<
6821  * if p2 is not None: nargs += 1
6822  * if p3 is not None: nargs += 1
6823  */
6824  __Pyx_INCREF(__pyx_int_1);
6825  __pyx_v_nargs = __pyx_int_1;
6826 
6827  /* "amns.pyx":328
6828  *
6829  * nargs = 1
6830  * if p2 is not None: nargs += 1 # <<<<<<<<<<<<<<
6831  * if p3 is not None: nargs += 1
6832  *
6833  */
6834  __pyx_t_1 = (((PyObject *)__pyx_v_p2) != Py_None);
6835  __pyx_t_2 = (__pyx_t_1 != 0);
6836  if (__pyx_t_2) {
6837  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nargs, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error)
6838  __Pyx_GOTREF(__pyx_t_3);
6839  __Pyx_DECREF_SET(__pyx_v_nargs, __pyx_t_3);
6840  __pyx_t_3 = 0;
6841  }
6842 
6843  /* "amns.pyx":329
6844  * nargs = 1
6845  * if p2 is not None: nargs += 1
6846  * if p3 is not None: nargs += 1 # <<<<<<<<<<<<<<
6847  *
6848  * res = np.empty_like(p1, order='F')
6849  */
6850  __pyx_t_2 = (((PyObject *)__pyx_v_p3) != Py_None);
6851  __pyx_t_1 = (__pyx_t_2 != 0);
6852  if (__pyx_t_1) {
6853  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nargs, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
6854  __Pyx_GOTREF(__pyx_t_3);
6855  __Pyx_DECREF_SET(__pyx_v_nargs, __pyx_t_3);
6856  __pyx_t_3 = 0;
6857  }
6858 
6859  /* "amns.pyx":331
6860  * if p3 is not None: nargs += 1
6861  *
6862  * res = np.empty_like(p1, order='F') # <<<<<<<<<<<<<<
6863  *
6864  * if nargs == 1:
6865  */
6866  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
6867  __Pyx_GOTREF(__pyx_t_3);
6868  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty_like); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error)
6869  __Pyx_GOTREF(__pyx_t_4);
6870  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6871  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
6872  __Pyx_GOTREF(__pyx_t_3);
6873  __Pyx_INCREF(((PyObject *)__pyx_v_p1));
6874  __Pyx_GIVEREF(((PyObject *)__pyx_v_p1));
6875  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_p1));
6876  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error)
6877  __Pyx_GOTREF(__pyx_t_5);
6878  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
6879  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error)
6880  __Pyx_GOTREF(__pyx_t_6);
6881  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6882  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6883  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6884  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 331, __pyx_L1_error)
6885  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
6886  {
6887  __Pyx_BufFmt_StackElem __pyx_stack[1];
6888  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer);
6889  __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_res.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
6890  if (unlikely(__pyx_t_8 < 0)) {
6891  PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
6892  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_res.rcbuffer->pybuffer, (PyObject*)__pyx_v_res, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
6893  Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
6894  __Pyx_RaiseBufferFallbackError();
6895  } else {
6896  PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
6897  }
6898  }
6899  __pyx_pybuffernd_res.diminfo[0].strides = __pyx_pybuffernd_res.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_res.diminfo[0].shape = __pyx_pybuffernd_res.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_res.diminfo[1].strides = __pyx_pybuffernd_res.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_res.diminfo[1].shape = __pyx_pybuffernd_res.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_res.diminfo[2].strides = __pyx_pybuffernd_res.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_res.diminfo[2].shape = __pyx_pybuffernd_res.rcbuffer->pybuffer.shape[2];
6900  if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 331, __pyx_L1_error)
6901  }
6902  __pyx_t_7 = 0;
6903  __pyx_v_res = ((PyArrayObject *)__pyx_t_6);
6904  __pyx_t_6 = 0;
6905 
6906  /* "amns.pyx":333
6907  * res = np.empty_like(p1, order='F')
6908  *
6909  * if nargs == 1: # <<<<<<<<<<<<<<
6910  * camns_interface.ITM_AMNS_CC_RX_3_A(self._handle, p1.shape[0], p1.shape[1], p1.shape[2],
6911  * <double*> res.data,
6912  */
6913  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_nargs, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L1_error)
6914  __Pyx_GOTREF(__pyx_t_6);
6915  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 333, __pyx_L1_error)
6916  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6917  if (__pyx_t_1) {
6918 
6919  /* "amns.pyx":334
6920  *
6921  * if nargs == 1:
6922  * camns_interface.ITM_AMNS_CC_RX_3_A(self._handle, p1.shape[0], p1.shape[1], p1.shape[2], # <<<<<<<<<<<<<<
6923  * <double*> res.data,
6924  * <double*> p1.data, &error_status);
6925  */
6926  ITM_AMNS_CC_RX_3_A(__pyx_v_self->_handle, (__pyx_v_p1->dimensions[0]), (__pyx_v_p1->dimensions[1]), (__pyx_v_p1->dimensions[2]), ((double *)__pyx_v_res->data), ((double *)__pyx_v_p1->data), (&__pyx_v_error_status));
6927 
6928  /* "amns.pyx":333
6929  * res = np.empty_like(p1, order='F')
6930  *
6931  * if nargs == 1: # <<<<<<<<<<<<<<
6932  * camns_interface.ITM_AMNS_CC_RX_3_A(self._handle, p1.shape[0], p1.shape[1], p1.shape[2],
6933  * <double*> res.data,
6934  */
6935  goto __pyx_L5;
6936  }
6937 
6938  /* "amns.pyx":337
6939  * <double*> res.data,
6940  * <double*> p1.data, &error_status);
6941  * elif nargs == 2: # <<<<<<<<<<<<<<
6942  * camns_interface.ITM_AMNS_CC_RX_3_B(self._handle, p1.shape[0], p1.shape[1], p1.shape[2],
6943  * <double*> res.data,
6944  */
6945  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_nargs, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
6946  __Pyx_GOTREF(__pyx_t_6);
6947  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 337, __pyx_L1_error)
6948  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6949  if (__pyx_t_1) {
6950 
6951  /* "amns.pyx":338
6952  * <double*> p1.data, &error_status);
6953  * elif nargs == 2:
6954  * camns_interface.ITM_AMNS_CC_RX_3_B(self._handle, p1.shape[0], p1.shape[1], p1.shape[2], # <<<<<<<<<<<<<<
6955  * <double*> res.data,
6956  * <double*> p1.data,
6957  */
6958  ITM_AMNS_CC_RX_3_B(__pyx_v_self->_handle, (__pyx_v_p1->dimensions[0]), (__pyx_v_p1->dimensions[1]), (__pyx_v_p1->dimensions[2]), ((double *)__pyx_v_res->data), ((double *)__pyx_v_p1->data), ((double *)__pyx_v_p2->data), (&__pyx_v_error_status));
6959 
6960  /* "amns.pyx":337
6961  * <double*> res.data,
6962  * <double*> p1.data, &error_status);
6963  * elif nargs == 2: # <<<<<<<<<<<<<<
6964  * camns_interface.ITM_AMNS_CC_RX_3_B(self._handle, p1.shape[0], p1.shape[1], p1.shape[2],
6965  * <double*> res.data,
6966  */
6967  goto __pyx_L5;
6968  }
6969 
6970  /* "amns.pyx":342
6971  * <double*> p1.data,
6972  * <double*> p2.data, &error_status);
6973  * elif nargs == 3: # <<<<<<<<<<<<<<
6974  * camns_interface.ITM_AMNS_CC_RX_3_C(self._handle, p1.shape[0], p1.shape[1], p1.shape[2],
6975  * <double*> res.data,
6976  */
6977  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_nargs, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
6978  __Pyx_GOTREF(__pyx_t_6);
6979  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 342, __pyx_L1_error)
6980  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6981  if (__pyx_t_1) {
6982 
6983  /* "amns.pyx":343
6984  * <double*> p2.data, &error_status);
6985  * elif nargs == 3:
6986  * camns_interface.ITM_AMNS_CC_RX_3_C(self._handle, p1.shape[0], p1.shape[1], p1.shape[2], # <<<<<<<<<<<<<<
6987  * <double*> res.data,
6988  * <double*> p1.data,
6989  */
6990  ITM_AMNS_CC_RX_3_C(__pyx_v_self->_handle, (__pyx_v_p1->dimensions[0]), (__pyx_v_p1->dimensions[1]), (__pyx_v_p1->dimensions[2]), ((double *)__pyx_v_res->data), ((double *)__pyx_v_p1->data), ((double *)__pyx_v_p2->data), ((double *)__pyx_v_p3->data), (&__pyx_v_error_status));
6991 
6992  /* "amns.pyx":342
6993  * <double*> p1.data,
6994  * <double*> p2.data, &error_status);
6995  * elif nargs == 3: # <<<<<<<<<<<<<<
6996  * camns_interface.ITM_AMNS_CC_RX_3_C(self._handle, p1.shape[0], p1.shape[1], p1.shape[2],
6997  * <double*> res.data,
6998  */
6999  }
7000  __pyx_L5:;
7001 
7002  /* "amns.pyx":349
7003  * <double*> p3.data, &error_status);
7004  *
7005  * if error_status.flag: # <<<<<<<<<<<<<<
7006  * raise AmnsException(error_status.string)
7007  * return res
7008  */
7009  __pyx_t_1 = (__pyx_v_error_status.flag != 0);
7010  if (__pyx_t_1) {
7011 
7012  /* "amns.pyx":350
7013  *
7014  * if error_status.flag:
7015  * raise AmnsException(error_status.string) # <<<<<<<<<<<<<<
7016  * return res
7017  *
7018  */
7019  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_AmnsException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 350, __pyx_L1_error)
7020  __Pyx_GOTREF(__pyx_t_5);
7021  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_error_status.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error)
7022  __Pyx_GOTREF(__pyx_t_3);
7023  __pyx_t_4 = NULL;
7024  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
7025  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
7026  if (likely(__pyx_t_4)) {
7027  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7028  __Pyx_INCREF(__pyx_t_4);
7029  __Pyx_INCREF(function);
7030  __Pyx_DECREF_SET(__pyx_t_5, function);
7031  }
7032  }
7033  if (!__pyx_t_4) {
7034  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 350, __pyx_L1_error)
7035  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7036  __Pyx_GOTREF(__pyx_t_6);
7037  } else {
7038  #if CYTHON_FAST_PYCALL
7039  if (PyFunction_Check(__pyx_t_5)) {
7040  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
7041  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 350, __pyx_L1_error)
7042  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7043  __Pyx_GOTREF(__pyx_t_6);
7044  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7045  } else
7046  #endif
7047  #if CYTHON_FAST_PYCCALL
7048  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
7049  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
7050  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 350, __pyx_L1_error)
7051  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7052  __Pyx_GOTREF(__pyx_t_6);
7053  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7054  } else
7055  #endif
7056  {
7057  __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 350, __pyx_L1_error)
7058  __Pyx_GOTREF(__pyx_t_12);
7059  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
7060  __Pyx_GIVEREF(__pyx_t_3);
7061  PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_3);
7062  __pyx_t_3 = 0;
7063  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 350, __pyx_L1_error)
7064  __Pyx_GOTREF(__pyx_t_6);
7065  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7066  }
7067  }
7068  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7069  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7070  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7071  __PYX_ERR(0, 350, __pyx_L1_error)
7072 
7073  /* "amns.pyx":349
7074  * <double*> p3.data, &error_status);
7075  *
7076  * if error_status.flag: # <<<<<<<<<<<<<<
7077  * raise AmnsException(error_status.string)
7078  * return res
7079  */
7080  }
7081 
7082  /* "amns.pyx":351
7083  * if error_status.flag:
7084  * raise AmnsException(error_status.string)
7085  * return res # <<<<<<<<<<<<<<
7086  *
7087  *
7088  */
7089  __Pyx_XDECREF(__pyx_r);
7090  __Pyx_INCREF(((PyObject *)__pyx_v_res));
7091  __pyx_r = ((PyObject *)__pyx_v_res);
7092  goto __pyx_L0;
7093 
7094  /* "amns.pyx":321
7095  * return res
7096  *
7097  * def _data_3d(self, np.ndarray[np.double_t, ndim=3] p1, # <<<<<<<<<<<<<<
7098  * np.ndarray[np.double_t, ndim=3] p2 = None,
7099  * np.ndarray[np.double_t, ndim=3] p3 = None):
7100  */
7101 
7102  /* function exit code */
7103  __pyx_L1_error:;
7104  __Pyx_XDECREF(__pyx_t_3);
7105  __Pyx_XDECREF(__pyx_t_4);
7106  __Pyx_XDECREF(__pyx_t_5);
7107  __Pyx_XDECREF(__pyx_t_6);
7108  __Pyx_XDECREF(__pyx_t_12);
7109  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
7110  __Pyx_PyThreadState_declare
7111  __Pyx_PyThreadState_assign
7112  __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
7113  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p1.rcbuffer->pybuffer);
7114  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p2.rcbuffer->pybuffer);
7115  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p3.rcbuffer->pybuffer);
7116  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer);
7117  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
7118  __Pyx_AddTraceback("amns.Table._data_3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
7119  __pyx_r = NULL;
7120  goto __pyx_L2;
7121  __pyx_L0:;
7122  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p1.rcbuffer->pybuffer);
7123  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p2.rcbuffer->pybuffer);
7124  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p3.rcbuffer->pybuffer);
7125  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer);
7126  __pyx_L2:;
7127  __Pyx_XDECREF((PyObject *)__pyx_v_res);
7128  __Pyx_XDECREF(__pyx_v_nargs);
7129  __Pyx_XGIVEREF(__pyx_r);
7130  __Pyx_RefNannyFinishContext();
7131  return __pyx_r;
7132 }
7133 
7134 /* "amns.pyx":359
7135  * cdef _reactants
7136  *
7137  * def __cinit__(self): # <<<<<<<<<<<<<<
7138  * pass
7139  *
7140  */
7141 
7142 /* Python wrapper */
7143 static int __pyx_pw_4amns_9Reactants_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7144 static int __pyx_pw_4amns_9Reactants_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7145  int __pyx_r;
7146  __Pyx_RefNannyDeclarations
7147  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
7148  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
7149  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
7150  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
7151  __pyx_r = __pyx_pf_4amns_9Reactants___cinit__(((struct __pyx_obj_4amns_Reactants *)__pyx_v_self));
7152 
7153  /* function exit code */
7154  __Pyx_RefNannyFinishContext();
7155  return __pyx_r;
7156 }
7157 
7158 static int __pyx_pf_4amns_9Reactants___cinit__(CYTHON_UNUSED struct __pyx_obj_4amns_Reactants *__pyx_v_self) {
7159  int __pyx_r;
7160  __Pyx_RefNannyDeclarations
7161  __Pyx_RefNannySetupContext("__cinit__", 0);
7162 
7163  /* function exit code */
7164  __pyx_r = 0;
7165  __Pyx_RefNannyFinishContext();
7166  return __pyx_r;
7167 }
7168 
7169 /* "amns.pyx":362
7170  * pass
7171  *
7172  * def __init__(self): # <<<<<<<<<<<<<<
7173  * self._handle = NULL
7174  * self._reactants= []
7175  */
7176 
7177 /* Python wrapper */
7178 static int __pyx_pw_4amns_9Reactants_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7179 static int __pyx_pw_4amns_9Reactants_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7180  int __pyx_r;
7181  __Pyx_RefNannyDeclarations
7182  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
7183  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
7184  __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
7185  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
7186  __pyx_r = __pyx_pf_4amns_9Reactants_2__init__(((struct __pyx_obj_4amns_Reactants *)__pyx_v_self));
7187 
7188  /* function exit code */
7189  __Pyx_RefNannyFinishContext();
7190  return __pyx_r;
7191 }
7192 
7193 static int __pyx_pf_4amns_9Reactants_2__init__(struct __pyx_obj_4amns_Reactants *__pyx_v_self) {
7194  int __pyx_r;
7195  __Pyx_RefNannyDeclarations
7196  PyObject *__pyx_t_1 = NULL;
7197  __Pyx_RefNannySetupContext("__init__", 0);
7198 
7199  /* "amns.pyx":363
7200  *
7201  * def __init__(self):
7202  * self._handle = NULL # <<<<<<<<<<<<<<
7203  * self._reactants= []
7204  * pass
7205  */
7206  __pyx_v_self->_handle = NULL;
7207 
7208  /* "amns.pyx":364
7209  * def __init__(self):
7210  * self._handle = NULL
7211  * self._reactants= [] # <<<<<<<<<<<<<<
7212  * pass
7213  *
7214  */
7215  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
7216  __Pyx_GOTREF(__pyx_t_1);
7217  __Pyx_GIVEREF(__pyx_t_1);
7218  __Pyx_GOTREF(__pyx_v_self->_reactants);
7219  __Pyx_DECREF(__pyx_v_self->_reactants);
7220  __pyx_v_self->_reactants = __pyx_t_1;
7221  __pyx_t_1 = 0;
7222 
7223  /* "amns.pyx":362
7224  * pass
7225  *
7226  * def __init__(self): # <<<<<<<<<<<<<<
7227  * self._handle = NULL
7228  * self._reactants= []
7229  */
7230 
7231  /* function exit code */
7232  __pyx_r = 0;
7233  goto __pyx_L0;
7234  __pyx_L1_error:;
7235  __Pyx_XDECREF(__pyx_t_1);
7236  __Pyx_AddTraceback("amns.Reactants.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7237  __pyx_r = -1;
7238  __pyx_L0:;
7239  __Pyx_RefNannyFinishContext();
7240  return __pyx_r;
7241 }
7242 
7243 /* "amns.pyx":367
7244  * pass
7245  *
7246  * cdef void* handle(self): # <<<<<<<<<<<<<<
7247  * cdef camns_interface.amns_c_reactant_type reactant
7248  * if self._handle == NULL:
7249  */
7250 
7251 static void *__pyx_f_4amns_9Reactants_handle(struct __pyx_obj_4amns_Reactants *__pyx_v_self) {
7252  amns_c_reactant_type __pyx_v_reactant;
7253  PyObject *__pyx_v_i = NULL;
7254  void *__pyx_r;
7255  __Pyx_RefNannyDeclarations
7256  int __pyx_t_1;
7257  PyObject *__pyx_t_2 = NULL;
7258  Py_ssize_t __pyx_t_3;
7259  PyObject *__pyx_t_4 = NULL;
7260  PyObject *(*__pyx_t_5)(PyObject *);
7261  PyObject *__pyx_t_6 = NULL;
7262  amns_c_reactant_type __pyx_t_7;
7263  int __pyx_t_8;
7264  __Pyx_RefNannySetupContext("handle", 0);
7265 
7266  /* "amns.pyx":369
7267  * cdef void* handle(self):
7268  * cdef camns_interface.amns_c_reactant_type reactant
7269  * if self._handle == NULL: # <<<<<<<<<<<<<<
7270  * camns_interface.ITM_AMNS_CC_SETUP_REACTANTS(&self._handle, "", 0, len(self._reactants));
7271  * for i, reactant in enumerate(self._reactants):
7272  */
7273  __pyx_t_1 = ((__pyx_v_self->_handle == NULL) != 0);
7274  if (__pyx_t_1) {
7275 
7276  /* "amns.pyx":370
7277  * cdef camns_interface.amns_c_reactant_type reactant
7278  * if self._handle == NULL:
7279  * camns_interface.ITM_AMNS_CC_SETUP_REACTANTS(&self._handle, "", 0, len(self._reactants)); # <<<<<<<<<<<<<<
7280  * for i, reactant in enumerate(self._reactants):
7281  * camns_interface.ITM_AMNS_CC_SET_REACTANT(self._handle, i+1, &reactant);
7282  */
7283  __pyx_t_2 = __pyx_v_self->_reactants;
7284  __Pyx_INCREF(__pyx_t_2);
7285  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 370, __pyx_L1_error)
7286  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7287  ITM_AMNS_CC_SETUP_REACTANTS((&__pyx_v_self->_handle), ((char *)""), 0, __pyx_t_3);
7288 
7289  /* "amns.pyx":371
7290  * if self._handle == NULL:
7291  * camns_interface.ITM_AMNS_CC_SETUP_REACTANTS(&self._handle, "", 0, len(self._reactants));
7292  * for i, reactant in enumerate(self._reactants): # <<<<<<<<<<<<<<
7293  * camns_interface.ITM_AMNS_CC_SET_REACTANT(self._handle, i+1, &reactant);
7294  * return self._handle
7295  */
7296  __Pyx_INCREF(__pyx_int_0);
7297  __pyx_t_2 = __pyx_int_0;
7298  if (likely(PyList_CheckExact(__pyx_v_self->_reactants)) || PyTuple_CheckExact(__pyx_v_self->_reactants)) {
7299  __pyx_t_4 = __pyx_v_self->_reactants; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
7300  __pyx_t_5 = NULL;
7301  } else {
7302  __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_self->_reactants); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
7303  __Pyx_GOTREF(__pyx_t_4);
7304  __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error)
7305  }
7306  for (;;) {
7307  if (likely(!__pyx_t_5)) {
7308  if (likely(PyList_CheckExact(__pyx_t_4))) {
7309  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
7310  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7311  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 371, __pyx_L1_error)
7312  #else
7313  __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error)
7314  __Pyx_GOTREF(__pyx_t_6);
7315  #endif
7316  } else {
7317  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
7318  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7319  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 371, __pyx_L1_error)
7320  #else
7321  __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error)
7322  __Pyx_GOTREF(__pyx_t_6);
7323  #endif
7324  }
7325  } else {
7326  __pyx_t_6 = __pyx_t_5(__pyx_t_4);
7327  if (unlikely(!__pyx_t_6)) {
7328  PyObject* exc_type = PyErr_Occurred();
7329  if (exc_type) {
7330  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7331  else __PYX_ERR(0, 371, __pyx_L1_error)
7332  }
7333  break;
7334  }
7335  __Pyx_GOTREF(__pyx_t_6);
7336  }
7337  __pyx_t_7 = __pyx_convert__from_py_amns_c_reactant_type(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 371, __pyx_L1_error)
7338  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7339  __pyx_v_reactant = __pyx_t_7;
7340  __Pyx_INCREF(__pyx_t_2);
7341  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
7342  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error)
7343  __Pyx_GOTREF(__pyx_t_6);
7344  __Pyx_DECREF(__pyx_t_2);
7345  __pyx_t_2 = __pyx_t_6;
7346  __pyx_t_6 = 0;
7347 
7348  /* "amns.pyx":372
7349  * camns_interface.ITM_AMNS_CC_SETUP_REACTANTS(&self._handle, "", 0, len(self._reactants));
7350  * for i, reactant in enumerate(self._reactants):
7351  * camns_interface.ITM_AMNS_CC_SET_REACTANT(self._handle, i+1, &reactant); # <<<<<<<<<<<<<<
7352  * return self._handle
7353  *
7354  */
7355  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error)
7356  __Pyx_GOTREF(__pyx_t_6);
7357  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 372, __pyx_L1_error)
7358  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7359  ITM_AMNS_CC_SET_REACTANT(__pyx_v_self->_handle, __pyx_t_8, (&__pyx_v_reactant));
7360 
7361  /* "amns.pyx":371
7362  * if self._handle == NULL:
7363  * camns_interface.ITM_AMNS_CC_SETUP_REACTANTS(&self._handle, "", 0, len(self._reactants));
7364  * for i, reactant in enumerate(self._reactants): # <<<<<<<<<<<<<<
7365  * camns_interface.ITM_AMNS_CC_SET_REACTANT(self._handle, i+1, &reactant);
7366  * return self._handle
7367  */
7368  }
7369  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7370  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7371 
7372  /* "amns.pyx":369
7373  * cdef void* handle(self):
7374  * cdef camns_interface.amns_c_reactant_type reactant
7375  * if self._handle == NULL: # <<<<<<<<<<<<<<
7376  * camns_interface.ITM_AMNS_CC_SETUP_REACTANTS(&self._handle, "", 0, len(self._reactants));
7377  * for i, reactant in enumerate(self._reactants):
7378  */
7379  }
7380 
7381  /* "amns.pyx":373
7382  * for i, reactant in enumerate(self._reactants):
7383  * camns_interface.ITM_AMNS_CC_SET_REACTANT(self._handle, i+1, &reactant);
7384  * return self._handle # <<<<<<<<<<<<<<
7385  *
7386  * def _invalidate_handle(self):
7387  */
7388  __pyx_r = __pyx_v_self->_handle;
7389  goto __pyx_L0;
7390 
7391  /* "amns.pyx":367
7392  * pass
7393  *
7394  * cdef void* handle(self): # <<<<<<<<<<<<<<
7395  * cdef camns_interface.amns_c_reactant_type reactant
7396  * if self._handle == NULL:
7397  */
7398 
7399  /* function exit code */
7400  __pyx_L1_error:;
7401  __Pyx_XDECREF(__pyx_t_2);
7402  __Pyx_XDECREF(__pyx_t_4);
7403  __Pyx_XDECREF(__pyx_t_6);
7404  __Pyx_WriteUnraisable("amns.Reactants.handle", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
7405  __pyx_r = 0;
7406  __pyx_L0:;
7407  __Pyx_XDECREF(__pyx_v_i);
7408  __Pyx_RefNannyFinishContext();
7409  return __pyx_r;
7410 }
7411 
7412 /* "amns.pyx":375
7413  * return self._handle
7414  *
7415  * def _invalidate_handle(self): # <<<<<<<<<<<<<<
7416  * if self._handle != NULL:
7417  * camns_interface.ITM_AMNS_CC_FINISH_REACTANTS(&self._handle)
7418  */
7419 
7420 /* Python wrapper */
7421 static PyObject *__pyx_pw_4amns_9Reactants_5_invalidate_handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
7422 static PyObject *__pyx_pw_4amns_9Reactants_5_invalidate_handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7423  PyObject *__pyx_r = 0;
7424  __Pyx_RefNannyDeclarations
7425  __Pyx_RefNannySetupContext("_invalidate_handle (wrapper)", 0);
7426  __pyx_r = __pyx_pf_4amns_9Reactants_4_invalidate_handle(((struct __pyx_obj_4amns_Reactants *)__pyx_v_self));
7427 
7428  /* function exit code */
7429  __Pyx_RefNannyFinishContext();
7430  return __pyx_r;
7431 }
7432 
7433 static PyObject *__pyx_pf_4amns_9Reactants_4_invalidate_handle(struct __pyx_obj_4amns_Reactants *__pyx_v_self) {
7434  PyObject *__pyx_r = NULL;
7435  __Pyx_RefNannyDeclarations
7436  int __pyx_t_1;
7437  __Pyx_RefNannySetupContext("_invalidate_handle", 0);
7438 
7439  /* "amns.pyx":376
7440  *
7441  * def _invalidate_handle(self):
7442  * if self._handle != NULL: # <<<<<<<<<<<<<<
7443  * camns_interface.ITM_AMNS_CC_FINISH_REACTANTS(&self._handle)
7444  * self._handle = NULL
7445  */
7446  __pyx_t_1 = ((__pyx_v_self->_handle != NULL) != 0);
7447  if (__pyx_t_1) {
7448 
7449  /* "amns.pyx":377
7450  * def _invalidate_handle(self):
7451  * if self._handle != NULL:
7452  * camns_interface.ITM_AMNS_CC_FINISH_REACTANTS(&self._handle) # <<<<<<<<<<<<<<
7453  * self._handle = NULL
7454  *
7455  */
7456  ITM_AMNS_CC_FINISH_REACTANTS((&__pyx_v_self->_handle));
7457 
7458  /* "amns.pyx":378
7459  * if self._handle != NULL:
7460  * camns_interface.ITM_AMNS_CC_FINISH_REACTANTS(&self._handle)
7461  * self._handle = NULL # <<<<<<<<<<<<<<
7462  *
7463  * def add(self, zn, za, mi, lr=None, real_specifier=None, int_specifier=None):
7464  */
7465  __pyx_v_self->_handle = NULL;
7466 
7467  /* "amns.pyx":376
7468  *
7469  * def _invalidate_handle(self):
7470  * if self._handle != NULL: # <<<<<<<<<<<<<<
7471  * camns_interface.ITM_AMNS_CC_FINISH_REACTANTS(&self._handle)
7472  * self._handle = NULL
7473  */
7474  }
7475 
7476  /* "amns.pyx":375
7477  * return self._handle
7478  *
7479  * def _invalidate_handle(self): # <<<<<<<<<<<<<<
7480  * if self._handle != NULL:
7481  * camns_interface.ITM_AMNS_CC_FINISH_REACTANTS(&self._handle)
7482  */
7483 
7484  /* function exit code */
7485  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7486  __Pyx_XGIVEREF(__pyx_r);
7487  __Pyx_RefNannyFinishContext();
7488  return __pyx_r;
7489 }
7490 
7491 /* "amns.pyx":380
7492  * self._handle = NULL
7493  *
7494  * def add(self, zn, za, mi, lr=None, real_specifier=None, int_specifier=None): # <<<<<<<<<<<<<<
7495  * """Add to the list of reactants/products"""
7496  * cdef camns_interface.amns_c_reactant_type r
7497  */
7498 
7499 /* Python wrapper */
7500 static PyObject *__pyx_pw_4amns_9Reactants_7add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7501 static char __pyx_doc_4amns_9Reactants_6add[] = "Add to the list of reactants/products";
7502 static PyObject *__pyx_pw_4amns_9Reactants_7add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7503  PyObject *__pyx_v_zn = 0;
7504  PyObject *__pyx_v_za = 0;
7505  PyObject *__pyx_v_mi = 0;
7506  PyObject *__pyx_v_lr = 0;
7507  PyObject *__pyx_v_real_specifier = 0;
7508  PyObject *__pyx_v_int_specifier = 0;
7509  PyObject *__pyx_r = 0;
7510  __Pyx_RefNannyDeclarations
7511  __Pyx_RefNannySetupContext("add (wrapper)", 0);
7512  {
7513  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_zn,&__pyx_n_s_za,&__pyx_n_s_mi,&__pyx_n_s_lr,&__pyx_n_s_real_specifier,&__pyx_n_s_int_specifier,0};
7514  PyObject* values[6] = {0,0,0,0,0,0};
7515  values[3] = ((PyObject *)Py_None);
7516  values[4] = ((PyObject *)Py_None);
7517  values[5] = ((PyObject *)Py_None);
7518  if (unlikely(__pyx_kwds)) {
7519  Py_ssize_t kw_args;
7520  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7521  switch (pos_args) {
7522  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7523  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7524  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7525  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7526  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7527  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7528  case 0: break;
7529  default: goto __pyx_L5_argtuple_error;
7530  }
7531  kw_args = PyDict_Size(__pyx_kwds);
7532  switch (pos_args) {
7533  case 0:
7534  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zn)) != 0)) kw_args--;
7535  else goto __pyx_L5_argtuple_error;
7536  case 1:
7537  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_za)) != 0)) kw_args--;
7538  else {
7539  __Pyx_RaiseArgtupleInvalid("add", 0, 3, 6, 1); __PYX_ERR(0, 380, __pyx_L3_error)
7540  }
7541  case 2:
7542  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mi)) != 0)) kw_args--;
7543  else {
7544  __Pyx_RaiseArgtupleInvalid("add", 0, 3, 6, 2); __PYX_ERR(0, 380, __pyx_L3_error)
7545  }
7546  case 3:
7547  if (kw_args > 0) {
7548  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lr);
7549  if (value) { values[3] = value; kw_args--; }
7550  }
7551  case 4:
7552  if (kw_args > 0) {
7553  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_real_specifier);
7554  if (value) { values[4] = value; kw_args--; }
7555  }
7556  case 5:
7557  if (kw_args > 0) {
7558  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_int_specifier);
7559  if (value) { values[5] = value; kw_args--; }
7560  }
7561  }
7562  if (unlikely(kw_args > 0)) {
7563  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add") < 0)) __PYX_ERR(0, 380, __pyx_L3_error)
7564  }
7565  } else {
7566  switch (PyTuple_GET_SIZE(__pyx_args)) {
7567  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7568  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7569  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7570  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7571  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7572  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7573  break;
7574  default: goto __pyx_L5_argtuple_error;
7575  }
7576  }
7577  __pyx_v_zn = values[0];
7578  __pyx_v_za = values[1];
7579  __pyx_v_mi = values[2];
7580  __pyx_v_lr = values[3];
7581  __pyx_v_real_specifier = values[4];
7582  __pyx_v_int_specifier = values[5];
7583  }
7584  goto __pyx_L4_argument_unpacking_done;
7585  __pyx_L5_argtuple_error:;
7586  __Pyx_RaiseArgtupleInvalid("add", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 380, __pyx_L3_error)
7587  __pyx_L3_error:;
7588  __Pyx_AddTraceback("amns.Reactants.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
7589  __Pyx_RefNannyFinishContext();
7590  return NULL;
7591  __pyx_L4_argument_unpacking_done:;
7592  __pyx_r = __pyx_pf_4amns_9Reactants_6add(((struct __pyx_obj_4amns_Reactants *)__pyx_v_self), __pyx_v_zn, __pyx_v_za, __pyx_v_mi, __pyx_v_lr, __pyx_v_real_specifier, __pyx_v_int_specifier);
7593 
7594  /* function exit code */
7595  __Pyx_RefNannyFinishContext();
7596  return __pyx_r;
7597 }
7598 
7599 static PyObject *__pyx_pf_4amns_9Reactants_6add(struct __pyx_obj_4amns_Reactants *__pyx_v_self, PyObject *__pyx_v_zn, PyObject *__pyx_v_za, PyObject *__pyx_v_mi, PyObject *__pyx_v_lr, PyObject *__pyx_v_real_specifier, PyObject *__pyx_v_int_specifier) {
7600  amns_c_reactant_type __pyx_v_r;
7601  PyObject *__pyx_r = NULL;
7602  __Pyx_RefNannyDeclarations
7603  PyObject *__pyx_t_1 = NULL;
7604  PyObject *__pyx_t_2 = NULL;
7605  PyObject *__pyx_t_3 = NULL;
7606  double __pyx_t_4;
7607  int __pyx_t_5;
7608  int __pyx_t_6;
7609  int __pyx_t_7;
7610  __Pyx_RefNannySetupContext("add", 0);
7611 
7612  /* "amns.pyx":383
7613  * """Add to the list of reactants/products"""
7614  * cdef camns_interface.amns_c_reactant_type r
7615  * r = camns_interface.get_default_amns_c_reactant_type() # <<<<<<<<<<<<<<
7616  * self._invalidate_handle()
7617  * r.ZN = zn
7618  */
7619  __pyx_v_r = get_default_amns_c_reactant_type();
7620 
7621  /* "amns.pyx":384
7622  * cdef camns_interface.amns_c_reactant_type r
7623  * r = camns_interface.get_default_amns_c_reactant_type()
7624  * self._invalidate_handle() # <<<<<<<<<<<<<<
7625  * r.ZN = zn
7626  * r.ZA = za
7627  */
7628  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_invalidate_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
7629  __Pyx_GOTREF(__pyx_t_2);
7630  __pyx_t_3 = NULL;
7631  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
7632  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
7633  if (likely(__pyx_t_3)) {
7634  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
7635  __Pyx_INCREF(__pyx_t_3);
7636  __Pyx_INCREF(function);
7637  __Pyx_DECREF_SET(__pyx_t_2, function);
7638  }
7639  }
7640  if (__pyx_t_3) {
7641  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)
7642  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7643  } else {
7644  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)
7645  }
7646  __Pyx_GOTREF(__pyx_t_1);
7647  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7648  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7649 
7650  /* "amns.pyx":385
7651  * r = camns_interface.get_default_amns_c_reactant_type()
7652  * self._invalidate_handle()
7653  * r.ZN = zn # <<<<<<<<<<<<<<
7654  * r.ZA = za
7655  * r.MI = mi
7656  */
7657  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_zn); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 385, __pyx_L1_error)
7658  __pyx_v_r.ZN = __pyx_t_4;
7659 
7660  /* "amns.pyx":386
7661  * self._invalidate_handle()
7662  * r.ZN = zn
7663  * r.ZA = za # <<<<<<<<<<<<<<
7664  * r.MI = mi
7665  * if lr: r.LR = lr
7666  */
7667  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_za); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 386, __pyx_L1_error)
7668  __pyx_v_r.ZA = __pyx_t_4;
7669 
7670  /* "amns.pyx":387
7671  * r.ZN = zn
7672  * r.ZA = za
7673  * r.MI = mi # <<<<<<<<<<<<<<
7674  * if lr: r.LR = lr
7675  * if real_specifier: r.real_specifier = real_specifier
7676  */
7677  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_mi); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L1_error)
7678  __pyx_v_r.MI = __pyx_t_4;
7679 
7680  /* "amns.pyx":388
7681  * r.ZA = za
7682  * r.MI = mi
7683  * if lr: r.LR = lr # <<<<<<<<<<<<<<
7684  * if real_specifier: r.real_specifier = real_specifier
7685  * if int_specifier: r.int_specifier = int_specifier
7686  */
7687  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_lr); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 388, __pyx_L1_error)
7688  if (__pyx_t_5) {
7689  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_lr); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 388, __pyx_L1_error)
7690  __pyx_v_r.LR = __pyx_t_6;
7691  }
7692 
7693  /* "amns.pyx":389
7694  * r.MI = mi
7695  * if lr: r.LR = lr
7696  * if real_specifier: r.real_specifier = real_specifier # <<<<<<<<<<<<<<
7697  * if int_specifier: r.int_specifier = int_specifier
7698  * self._reactants.append(r)
7699  */
7700  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_real_specifier); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 389, __pyx_L1_error)
7701  if (__pyx_t_5) {
7702  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_real_specifier); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 389, __pyx_L1_error)
7703  __pyx_v_r.real_specifier = __pyx_t_4;
7704  }
7705 
7706  /* "amns.pyx":390
7707  * if lr: r.LR = lr
7708  * if real_specifier: r.real_specifier = real_specifier
7709  * if int_specifier: r.int_specifier = int_specifier # <<<<<<<<<<<<<<
7710  * self._reactants.append(r)
7711  *
7712  */
7713  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_int_specifier); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 390, __pyx_L1_error)
7714  if (__pyx_t_5) {
7715  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_int_specifier); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 390, __pyx_L1_error)
7716  __pyx_v_r.int_specifier = __pyx_t_6;
7717  }
7718 
7719  /* "amns.pyx":391
7720  * if real_specifier: r.real_specifier = real_specifier
7721  * if int_specifier: r.int_specifier = int_specifier
7722  * self._reactants.append(r) # <<<<<<<<<<<<<<
7723  *
7724  * def __len__(self):
7725  */
7726  __pyx_t_1 = __pyx_convert__to_py_amns_c_reactant_type(__pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
7727  __Pyx_GOTREF(__pyx_t_1);
7728  __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_self->_reactants, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 391, __pyx_L1_error)
7729  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7730 
7731  /* "amns.pyx":380
7732  * self._handle = NULL
7733  *
7734  * def add(self, zn, za, mi, lr=None, real_specifier=None, int_specifier=None): # <<<<<<<<<<<<<<
7735  * """Add to the list of reactants/products"""
7736  * cdef camns_interface.amns_c_reactant_type r
7737  */
7738 
7739  /* function exit code */
7740  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7741  goto __pyx_L0;
7742  __pyx_L1_error:;
7743  __Pyx_XDECREF(__pyx_t_1);
7744  __Pyx_XDECREF(__pyx_t_2);
7745  __Pyx_XDECREF(__pyx_t_3);
7746  __Pyx_AddTraceback("amns.Reactants.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
7747  __pyx_r = NULL;
7748  __pyx_L0:;
7749  __Pyx_XGIVEREF(__pyx_r);
7750  __Pyx_RefNannyFinishContext();
7751  return __pyx_r;
7752 }
7753 
7754 /* "amns.pyx":393
7755  * self._reactants.append(r)
7756  *
7757  * def __len__(self): # <<<<<<<<<<<<<<
7758  * """Return the number of reactants/products"""
7759  * return len(self._reactants)
7760  */
7761 
7762 /* Python wrapper */
7763 static Py_ssize_t __pyx_pw_4amns_9Reactants_9__len__(PyObject *__pyx_v_self); /*proto*/
7764 static char __pyx_doc_4amns_9Reactants_8__len__[] = "Return the number of reactants/products";
7765 #if CYTHON_COMPILING_IN_CPYTHON
7766 struct wrapperbase __pyx_wrapperbase_4amns_9Reactants_8__len__;
7767 #endif
7768 static Py_ssize_t __pyx_pw_4amns_9Reactants_9__len__(PyObject *__pyx_v_self) {
7769  Py_ssize_t __pyx_r;
7770  __Pyx_RefNannyDeclarations
7771  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
7772  __pyx_r = __pyx_pf_4amns_9Reactants_8__len__(((struct __pyx_obj_4amns_Reactants *)__pyx_v_self));
7773 
7774  /* function exit code */
7775  __Pyx_RefNannyFinishContext();
7776  return __pyx_r;
7777 }
7778 
7779 static Py_ssize_t __pyx_pf_4amns_9Reactants_8__len__(struct __pyx_obj_4amns_Reactants *__pyx_v_self) {
7780  Py_ssize_t __pyx_r;
7781  __Pyx_RefNannyDeclarations
7782  PyObject *__pyx_t_1 = NULL;
7783  Py_ssize_t __pyx_t_2;
7784  __Pyx_RefNannySetupContext("__len__", 0);
7785 
7786  /* "amns.pyx":395
7787  * def __len__(self):
7788  * """Return the number of reactants/products"""
7789  * return len(self._reactants) # <<<<<<<<<<<<<<
7790  *
7791  * def __str__(self):
7792  */
7793  __pyx_t_1 = __pyx_v_self->_reactants;
7794  __Pyx_INCREF(__pyx_t_1);
7795  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 395, __pyx_L1_error)
7796  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7797  __pyx_r = __pyx_t_2;
7798  goto __pyx_L0;
7799 
7800  /* "amns.pyx":393
7801  * self._reactants.append(r)
7802  *
7803  * def __len__(self): # <<<<<<<<<<<<<<
7804  * """Return the number of reactants/products"""
7805  * return len(self._reactants)
7806  */
7807 
7808  /* function exit code */
7809  __pyx_L1_error:;
7810  __Pyx_XDECREF(__pyx_t_1);
7811  __Pyx_AddTraceback("amns.Reactants.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7812  __pyx_r = -1;
7813  __pyx_L0:;
7814  __Pyx_RefNannyFinishContext();
7815  return __pyx_r;
7816 }
7817 
7818 /* "amns.pyx":397
7819  * return len(self._reactants)
7820  *
7821  * def __str__(self): # <<<<<<<<<<<<<<
7822  * """Return a string version of all the reactants/products"""
7823  * return str(self._reactants)
7824  */
7825 
7826 /* Python wrapper */
7827 static PyObject *__pyx_pw_4amns_9Reactants_11__str__(PyObject *__pyx_v_self); /*proto*/
7828 static char __pyx_doc_4amns_9Reactants_10__str__[] = "Return a string version of all the reactants/products";
7829 #if CYTHON_COMPILING_IN_CPYTHON
7830 struct wrapperbase __pyx_wrapperbase_4amns_9Reactants_10__str__;
7831 #endif
7832 static PyObject *__pyx_pw_4amns_9Reactants_11__str__(PyObject *__pyx_v_self) {
7833  PyObject *__pyx_r = 0;
7834  __Pyx_RefNannyDeclarations
7835  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
7836  __pyx_r = __pyx_pf_4amns_9Reactants_10__str__(((struct __pyx_obj_4amns_Reactants *)__pyx_v_self));
7837 
7838  /* function exit code */
7839  __Pyx_RefNannyFinishContext();
7840  return __pyx_r;
7841 }
7842 
7843 static PyObject *__pyx_pf_4amns_9Reactants_10__str__(struct __pyx_obj_4amns_Reactants *__pyx_v_self) {
7844  PyObject *__pyx_r = NULL;
7845  __Pyx_RefNannyDeclarations
7846  PyObject *__pyx_t_1 = NULL;
7847  PyObject *__pyx_t_2 = NULL;
7848  __Pyx_RefNannySetupContext("__str__", 0);
7849 
7850  /* "amns.pyx":399
7851  * def __str__(self):
7852  * """Return a string version of all the reactants/products"""
7853  * return str(self._reactants) # <<<<<<<<<<<<<<
7854  *
7855  * def test(self):
7856  */
7857  __Pyx_XDECREF(__pyx_r);
7858  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
7859  __Pyx_GOTREF(__pyx_t_1);
7860  __Pyx_INCREF(__pyx_v_self->_reactants);
7861  __Pyx_GIVEREF(__pyx_v_self->_reactants);
7862  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_reactants);
7863  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
7864  __Pyx_GOTREF(__pyx_t_2);
7865  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7866  __pyx_r = __pyx_t_2;
7867  __pyx_t_2 = 0;
7868  goto __pyx_L0;
7869 
7870  /* "amns.pyx":397
7871  * return len(self._reactants)
7872  *
7873  * def __str__(self): # <<<<<<<<<<<<<<
7874  * """Return a string version of all the reactants/products"""
7875  * return str(self._reactants)
7876  */
7877 
7878  /* function exit code */
7879  __pyx_L1_error:;
7880  __Pyx_XDECREF(__pyx_t_1);
7881  __Pyx_XDECREF(__pyx_t_2);
7882  __Pyx_AddTraceback("amns.Reactants.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7883  __pyx_r = NULL;
7884  __pyx_L0:;
7885  __Pyx_XGIVEREF(__pyx_r);
7886  __Pyx_RefNannyFinishContext();
7887  return __pyx_r;
7888 }
7889 
7890 /* "amns.pyx":401
7891  * return str(self._reactants)
7892  *
7893  * def test(self): # <<<<<<<<<<<<<<
7894  * cdef void* handle
7895  * handle = self.handle()
7896  */
7897 
7898 /* Python wrapper */
7899 static PyObject *__pyx_pw_4amns_9Reactants_13test(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
7900 static PyObject *__pyx_pw_4amns_9Reactants_13test(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7901  PyObject *__pyx_r = 0;
7902  __Pyx_RefNannyDeclarations
7903  __Pyx_RefNannySetupContext("test (wrapper)", 0);
7904  __pyx_r = __pyx_pf_4amns_9Reactants_12test(((struct __pyx_obj_4amns_Reactants *)__pyx_v_self));
7905 
7906  /* function exit code */
7907  __Pyx_RefNannyFinishContext();
7908  return __pyx_r;
7909 }
7910 
7911 static PyObject *__pyx_pf_4amns_9Reactants_12test(struct __pyx_obj_4amns_Reactants *__pyx_v_self) {
7912  CYTHON_UNUSED void *__pyx_v_handle;
7913  PyObject *__pyx_r = NULL;
7914  __Pyx_RefNannyDeclarations
7915  __Pyx_RefNannySetupContext("test", 0);
7916 
7917  /* "amns.pyx":403
7918  * def test(self):
7919  * cdef void* handle
7920  * handle = self.handle() # <<<<<<<<<<<<<<
7921  *
7922  * def value(self):
7923  */
7924  __pyx_v_handle = ((struct __pyx_vtabstruct_4amns_Reactants *)__pyx_v_self->__pyx_vtab)->handle(__pyx_v_self);
7925 
7926  /* "amns.pyx":401
7927  * return str(self._reactants)
7928  *
7929  * def test(self): # <<<<<<<<<<<<<<
7930  * cdef void* handle
7931  * handle = self.handle()
7932  */
7933 
7934  /* function exit code */
7935  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7936  __Pyx_XGIVEREF(__pyx_r);
7937  __Pyx_RefNannyFinishContext();
7938  return __pyx_r;
7939 }
7940 
7941 /* "amns.pyx":405
7942  * handle = self.handle()
7943  *
7944  * def value(self): # <<<<<<<<<<<<<<
7945  * """Return all of the reactants/products"""
7946  * return self._reactants
7947  */
7948 
7949 /* Python wrapper */
7950 static PyObject *__pyx_pw_4amns_9Reactants_15value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
7951 static char __pyx_doc_4amns_9Reactants_14value[] = "Return all of the reactants/products";
7952 static PyObject *__pyx_pw_4amns_9Reactants_15value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7953  PyObject *__pyx_r = 0;
7954  __Pyx_RefNannyDeclarations
7955  __Pyx_RefNannySetupContext("value (wrapper)", 0);
7956  __pyx_r = __pyx_pf_4amns_9Reactants_14value(((struct __pyx_obj_4amns_Reactants *)__pyx_v_self));
7957 
7958  /* function exit code */
7959  __Pyx_RefNannyFinishContext();
7960  return __pyx_r;
7961 }
7962 
7963 static PyObject *__pyx_pf_4amns_9Reactants_14value(struct __pyx_obj_4amns_Reactants *__pyx_v_self) {
7964  PyObject *__pyx_r = NULL;
7965  __Pyx_RefNannyDeclarations
7966  __Pyx_RefNannySetupContext("value", 0);
7967 
7968  /* "amns.pyx":407
7969  * def value(self):
7970  * """Return all of the reactants/products"""
7971  * return self._reactants # <<<<<<<<<<<<<<
7972  *
7973  *
7974  */
7975  __Pyx_XDECREF(__pyx_r);
7976  __Pyx_INCREF(__pyx_v_self->_reactants);
7977  __pyx_r = __pyx_v_self->_reactants;
7978  goto __pyx_L0;
7979 
7980  /* "amns.pyx":405
7981  * handle = self.handle()
7982  *
7983  * def value(self): # <<<<<<<<<<<<<<
7984  * """Return all of the reactants/products"""
7985  * return self._reactants
7986  */
7987 
7988  /* function exit code */
7989  __pyx_L0:;
7990  __Pyx_XGIVEREF(__pyx_r);
7991  __Pyx_RefNannyFinishContext();
7992  return __pyx_r;
7993 }
7994 
7995 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
7996  * # experimental exception made for __getbuffer__ and __releasebuffer__
7997  * # -- the details of this may change.
7998  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
7999  * # This implementation of getbuffer is geared towards Cython
8000  * # requirements, and does not yet fullfill the PEP.
8001  */
8002 
8003 /* Python wrapper */
8004 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
8005 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
8006  int __pyx_r;
8007  __Pyx_RefNannyDeclarations
8008  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
8009  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
8010 
8011  /* function exit code */
8012  __Pyx_RefNannyFinishContext();
8013  return __pyx_r;
8014 }
8015 
8016 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
8017  int __pyx_v_copy_shape;
8018  int __pyx_v_i;
8019  int __pyx_v_ndim;
8020  int __pyx_v_endian_detector;
8021  int __pyx_v_little_endian;
8022  int __pyx_v_t;
8023  char *__pyx_v_f;
8024  PyArray_Descr *__pyx_v_descr = 0;
8025  int __pyx_v_offset;
8026  int __pyx_v_hasfields;
8027  int __pyx_r;
8028  __Pyx_RefNannyDeclarations
8029  int __pyx_t_1;
8030  int __pyx_t_2;
8031  PyObject *__pyx_t_3 = NULL;
8032  int __pyx_t_4;
8033  int __pyx_t_5;
8034  PyObject *__pyx_t_6 = NULL;
8035  char *__pyx_t_7;
8036  __Pyx_RefNannySetupContext("__getbuffer__", 0);
8037  if (__pyx_v_info != NULL) {
8038  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
8039  __Pyx_GIVEREF(__pyx_v_info->obj);
8040  }
8041 
8042  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203
8043  * # of flags
8044  *
8045  * if info == NULL: return # <<<<<<<<<<<<<<
8046  *
8047  * cdef int copy_shape, i, ndim
8048  */
8049  __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
8050  if (__pyx_t_1) {
8051  __pyx_r = 0;
8052  goto __pyx_L0;
8053  }
8054 
8055  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206
8056  *
8057  * cdef int copy_shape, i, ndim
8058  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
8059  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
8060  *
8061  */
8062  __pyx_v_endian_detector = 1;
8063 
8064  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":207
8065  * cdef int copy_shape, i, ndim
8066  * cdef int endian_detector = 1
8067  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
8068  *
8069  * ndim = PyArray_NDIM(self)
8070  */
8071  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
8072 
8073  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209
8074  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
8075  *
8076  * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
8077  *
8078  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8079  */
8080  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
8081 
8082  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
8083  * ndim = PyArray_NDIM(self)
8084  *
8085  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
8086  * copy_shape = 1
8087  * else:
8088  */
8089  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
8090  if (__pyx_t_1) {
8091 
8092  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":212
8093  *
8094  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8095  * copy_shape = 1 # <<<<<<<<<<<<<<
8096  * else:
8097  * copy_shape = 0
8098  */
8099  __pyx_v_copy_shape = 1;
8100 
8101  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
8102  * ndim = PyArray_NDIM(self)
8103  *
8104  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
8105  * copy_shape = 1
8106  * else:
8107  */
8108  goto __pyx_L4;
8109  }
8110 
8111  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214
8112  * copy_shape = 1
8113  * else:
8114  * copy_shape = 0 # <<<<<<<<<<<<<<
8115  *
8116  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
8117  */
8118  /*else*/ {
8119  __pyx_v_copy_shape = 0;
8120  }
8121  __pyx_L4:;
8122 
8123  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
8124  * copy_shape = 0
8125  *
8126  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
8127  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
8128  * raise ValueError(u"ndarray is not C contiguous")
8129  */
8130  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
8131  if (__pyx_t_2) {
8132  } else {
8133  __pyx_t_1 = __pyx_t_2;
8134  goto __pyx_L6_bool_binop_done;
8135  }
8136 
8137  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217
8138  *
8139  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
8140  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
8141  * raise ValueError(u"ndarray is not C contiguous")
8142  *
8143  */
8144  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
8145  __pyx_t_1 = __pyx_t_2;
8146  __pyx_L6_bool_binop_done:;
8147 
8148  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
8149  * copy_shape = 0
8150  *
8151  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
8152  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
8153  * raise ValueError(u"ndarray is not C contiguous")
8154  */
8155  if (__pyx_t_1) {
8156 
8157  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
8158  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
8159  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
8160  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
8161  *
8162  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
8163  */
8164  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 218, __pyx_L1_error)
8165  __Pyx_GOTREF(__pyx_t_3);
8166  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
8167  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8168  __PYX_ERR(1, 218, __pyx_L1_error)
8169 
8170  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
8171  * copy_shape = 0
8172  *
8173  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
8174  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
8175  * raise ValueError(u"ndarray is not C contiguous")
8176  */
8177  }
8178 
8179  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
8180  * raise ValueError(u"ndarray is not C contiguous")
8181  *
8182  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
8183  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
8184  * raise ValueError(u"ndarray is not Fortran contiguous")
8185  */
8186  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
8187  if (__pyx_t_2) {
8188  } else {
8189  __pyx_t_1 = __pyx_t_2;
8190  goto __pyx_L9_bool_binop_done;
8191  }
8192 
8193  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221
8194  *
8195  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
8196  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
8197  * raise ValueError(u"ndarray is not Fortran contiguous")
8198  *
8199  */
8200  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
8201  __pyx_t_1 = __pyx_t_2;
8202  __pyx_L9_bool_binop_done:;
8203 
8204  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
8205  * raise ValueError(u"ndarray is not C contiguous")
8206  *
8207  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
8208  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
8209  * raise ValueError(u"ndarray is not Fortran contiguous")
8210  */
8211  if (__pyx_t_1) {
8212 
8213  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
8214  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
8215  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
8216  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
8217  *
8218  * info.buf = PyArray_DATA(self)
8219  */
8220  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error)
8221  __Pyx_GOTREF(__pyx_t_3);
8222  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
8223  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8224  __PYX_ERR(1, 222, __pyx_L1_error)
8225 
8226  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
8227  * raise ValueError(u"ndarray is not C contiguous")
8228  *
8229  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
8230  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
8231  * raise ValueError(u"ndarray is not Fortran contiguous")
8232  */
8233  }
8234 
8235  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":224
8236  * raise ValueError(u"ndarray is not Fortran contiguous")
8237  *
8238  * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
8239  * info.ndim = ndim
8240  * if copy_shape:
8241  */
8242  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
8243 
8244  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":225
8245  *
8246  * info.buf = PyArray_DATA(self)
8247  * info.ndim = ndim # <<<<<<<<<<<<<<
8248  * if copy_shape:
8249  * # Allocate new buffer for strides and shape info.
8250  */
8251  __pyx_v_info->ndim = __pyx_v_ndim;
8252 
8253  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
8254  * info.buf = PyArray_DATA(self)
8255  * info.ndim = ndim
8256  * if copy_shape: # <<<<<<<<<<<<<<
8257  * # Allocate new buffer for strides and shape info.
8258  * # This is allocated as one block, strides first.
8259  */
8260  __pyx_t_1 = (__pyx_v_copy_shape != 0);
8261  if (__pyx_t_1) {
8262 
8263  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229
8264  * # Allocate new buffer for strides and shape info.
8265  * # This is allocated as one block, strides first.
8266  * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2) # <<<<<<<<<<<<<<
8267  * info.shape = info.strides + ndim
8268  * for i in range(ndim):
8269  */
8270  __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));
8271 
8272  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230
8273  * # This is allocated as one block, strides first.
8274  * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
8275  * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
8276  * for i in range(ndim):
8277  * info.strides[i] = PyArray_STRIDES(self)[i]
8278  */
8279  __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
8280 
8281  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231
8282  * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
8283  * info.shape = info.strides + ndim
8284  * for i in range(ndim): # <<<<<<<<<<<<<<
8285  * info.strides[i] = PyArray_STRIDES(self)[i]
8286  * info.shape[i] = PyArray_DIMS(self)[i]
8287  */
8288  __pyx_t_4 = __pyx_v_ndim;
8289  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
8290  __pyx_v_i = __pyx_t_5;
8291 
8292  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232
8293  * info.shape = info.strides + ndim
8294  * for i in range(ndim):
8295  * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
8296  * info.shape[i] = PyArray_DIMS(self)[i]
8297  * else:
8298  */
8299  (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
8300 
8301  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233
8302  * for i in range(ndim):
8303  * info.strides[i] = PyArray_STRIDES(self)[i]
8304  * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
8305  * else:
8306  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
8307  */
8308  (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
8309  }
8310 
8311  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
8312  * info.buf = PyArray_DATA(self)
8313  * info.ndim = ndim
8314  * if copy_shape: # <<<<<<<<<<<<<<
8315  * # Allocate new buffer for strides and shape info.
8316  * # This is allocated as one block, strides first.
8317  */
8318  goto __pyx_L11;
8319  }
8320 
8321  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235
8322  * info.shape[i] = PyArray_DIMS(self)[i]
8323  * else:
8324  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
8325  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
8326  * info.suboffsets = NULL
8327  */
8328  /*else*/ {
8329  __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
8330 
8331  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236
8332  * else:
8333  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
8334  * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
8335  * info.suboffsets = NULL
8336  * info.itemsize = PyArray_ITEMSIZE(self)
8337  */
8338  __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
8339  }
8340  __pyx_L11:;
8341 
8342  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":237
8343  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
8344  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
8345  * info.suboffsets = NULL # <<<<<<<<<<<<<<
8346  * info.itemsize = PyArray_ITEMSIZE(self)
8347  * info.readonly = not PyArray_ISWRITEABLE(self)
8348  */
8349  __pyx_v_info->suboffsets = NULL;
8350 
8351  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":238
8352  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
8353  * info.suboffsets = NULL
8354  * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
8355  * info.readonly = not PyArray_ISWRITEABLE(self)
8356  *
8357  */
8358  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
8359 
8360  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239
8361  * info.suboffsets = NULL
8362  * info.itemsize = PyArray_ITEMSIZE(self)
8363  * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
8364  *
8365  * cdef int t
8366  */
8367  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
8368 
8369  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":242
8370  *
8371  * cdef int t
8372  * cdef char* f = NULL # <<<<<<<<<<<<<<
8373  * cdef dtype descr = self.descr
8374  * cdef int offset
8375  */
8376  __pyx_v_f = NULL;
8377 
8378  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":243
8379  * cdef int t
8380  * cdef char* f = NULL
8381  * cdef dtype descr = self.descr # <<<<<<<<<<<<<<
8382  * cdef int offset
8383  *
8384  */
8385  __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
8386  __Pyx_INCREF(__pyx_t_3);
8387  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
8388  __pyx_t_3 = 0;
8389 
8390  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246
8391  * cdef int offset
8392  *
8393  * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
8394  *
8395  * if not hasfields and not copy_shape:
8396  */
8397  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
8398 
8399  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
8400  * cdef bint hasfields = PyDataType_HASFIELDS(descr)
8401  *
8402  * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
8403  * # do not call releasebuffer
8404  * info.obj = None
8405  */
8406  __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0);
8407  if (__pyx_t_2) {
8408  } else {
8409  __pyx_t_1 = __pyx_t_2;
8410  goto __pyx_L15_bool_binop_done;
8411  }
8412  __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0);
8413  __pyx_t_1 = __pyx_t_2;
8414  __pyx_L15_bool_binop_done:;
8415  if (__pyx_t_1) {
8416 
8417  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":250
8418  * if not hasfields and not copy_shape:
8419  * # do not call releasebuffer
8420  * info.obj = None # <<<<<<<<<<<<<<
8421  * else:
8422  * # need to call releasebuffer
8423  */
8424  __Pyx_INCREF(Py_None);
8425  __Pyx_GIVEREF(Py_None);
8426  __Pyx_GOTREF(__pyx_v_info->obj);
8427  __Pyx_DECREF(__pyx_v_info->obj);
8428  __pyx_v_info->obj = Py_None;
8429 
8430  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
8431  * cdef bint hasfields = PyDataType_HASFIELDS(descr)
8432  *
8433  * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
8434  * # do not call releasebuffer
8435  * info.obj = None
8436  */
8437  goto __pyx_L14;
8438  }
8439 
8440  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253
8441  * else:
8442  * # need to call releasebuffer
8443  * info.obj = self # <<<<<<<<<<<<<<
8444  *
8445  * if not hasfields:
8446  */
8447  /*else*/ {
8448  __Pyx_INCREF(((PyObject *)__pyx_v_self));
8449  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
8450  __Pyx_GOTREF(__pyx_v_info->obj);
8451  __Pyx_DECREF(__pyx_v_info->obj);
8452  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
8453  }
8454  __pyx_L14:;
8455 
8456  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
8457  * info.obj = self
8458  *
8459  * if not hasfields: # <<<<<<<<<<<<<<
8460  * t = descr.type_num
8461  * if ((descr.byteorder == c'>' and little_endian) or
8462  */
8463  __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
8464  if (__pyx_t_1) {
8465 
8466  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256
8467  *
8468  * if not hasfields:
8469  * t = descr.type_num # <<<<<<<<<<<<<<
8470  * if ((descr.byteorder == c'>' and little_endian) or
8471  * (descr.byteorder == c'<' and not little_endian)):
8472  */
8473  __pyx_t_4 = __pyx_v_descr->type_num;
8474  __pyx_v_t = __pyx_t_4;
8475 
8476  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
8477  * if not hasfields:
8478  * t = descr.type_num
8479  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
8480  * (descr.byteorder == c'<' and not little_endian)):
8481  * raise ValueError(u"Non-native byte order not supported")
8482  */
8483  __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
8484  if (!__pyx_t_2) {
8485  goto __pyx_L20_next_or;
8486  } else {
8487  }
8488  __pyx_t_2 = (__pyx_v_little_endian != 0);
8489  if (!__pyx_t_2) {
8490  } else {
8491  __pyx_t_1 = __pyx_t_2;
8492  goto __pyx_L19_bool_binop_done;
8493  }
8494  __pyx_L20_next_or:;
8495 
8496  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
8497  * t = descr.type_num
8498  * if ((descr.byteorder == c'>' and little_endian) or
8499  * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
8500  * raise ValueError(u"Non-native byte order not supported")
8501  * if t == NPY_BYTE: f = "b"
8502  */
8503  __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
8504  if (__pyx_t_2) {
8505  } else {
8506  __pyx_t_1 = __pyx_t_2;
8507  goto __pyx_L19_bool_binop_done;
8508  }
8509  __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
8510  __pyx_t_1 = __pyx_t_2;
8511  __pyx_L19_bool_binop_done:;
8512 
8513  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
8514  * if not hasfields:
8515  * t = descr.type_num
8516  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
8517  * (descr.byteorder == c'<' and not little_endian)):
8518  * raise ValueError(u"Non-native byte order not supported")
8519  */
8520  if (__pyx_t_1) {
8521 
8522  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
8523  * if ((descr.byteorder == c'>' and little_endian) or
8524  * (descr.byteorder == c'<' and not little_endian)):
8525  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
8526  * if t == NPY_BYTE: f = "b"
8527  * elif t == NPY_UBYTE: f = "B"
8528  */
8529  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 259, __pyx_L1_error)
8530  __Pyx_GOTREF(__pyx_t_3);
8531  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
8532  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8533  __PYX_ERR(1, 259, __pyx_L1_error)
8534 
8535  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
8536  * if not hasfields:
8537  * t = descr.type_num
8538  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
8539  * (descr.byteorder == c'<' and not little_endian)):
8540  * raise ValueError(u"Non-native byte order not supported")
8541  */
8542  }
8543 
8544  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260
8545  * (descr.byteorder == c'<' and not little_endian)):
8546  * raise ValueError(u"Non-native byte order not supported")
8547  * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
8548  * elif t == NPY_UBYTE: f = "B"
8549  * elif t == NPY_SHORT: f = "h"
8550  */
8551  switch (__pyx_v_t) {
8552  case NPY_BYTE:
8553  __pyx_v_f = ((char *)"b");
8554  break;
8555 
8556  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261
8557  * raise ValueError(u"Non-native byte order not supported")
8558  * if t == NPY_BYTE: f = "b"
8559  * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
8560  * elif t == NPY_SHORT: f = "h"
8561  * elif t == NPY_USHORT: f = "H"
8562  */
8563  case NPY_UBYTE:
8564  __pyx_v_f = ((char *)"B");
8565  break;
8566 
8567  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262
8568  * if t == NPY_BYTE: f = "b"
8569  * elif t == NPY_UBYTE: f = "B"
8570  * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
8571  * elif t == NPY_USHORT: f = "H"
8572  * elif t == NPY_INT: f = "i"
8573  */
8574  case NPY_SHORT:
8575  __pyx_v_f = ((char *)"h");
8576  break;
8577 
8578  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263
8579  * elif t == NPY_UBYTE: f = "B"
8580  * elif t == NPY_SHORT: f = "h"
8581  * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
8582  * elif t == NPY_INT: f = "i"
8583  * elif t == NPY_UINT: f = "I"
8584  */
8585  case NPY_USHORT:
8586  __pyx_v_f = ((char *)"H");
8587  break;
8588 
8589  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264
8590  * elif t == NPY_SHORT: f = "h"
8591  * elif t == NPY_USHORT: f = "H"
8592  * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
8593  * elif t == NPY_UINT: f = "I"
8594  * elif t == NPY_LONG: f = "l"
8595  */
8596  case NPY_INT:
8597  __pyx_v_f = ((char *)"i");
8598  break;
8599 
8600  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
8601  * elif t == NPY_USHORT: f = "H"
8602  * elif t == NPY_INT: f = "i"
8603  * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
8604  * elif t == NPY_LONG: f = "l"
8605  * elif t == NPY_ULONG: f = "L"
8606  */
8607  case NPY_UINT:
8608  __pyx_v_f = ((char *)"I");
8609  break;
8610 
8611  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
8612  * elif t == NPY_INT: f = "i"
8613  * elif t == NPY_UINT: f = "I"
8614  * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
8615  * elif t == NPY_ULONG: f = "L"
8616  * elif t == NPY_LONGLONG: f = "q"
8617  */
8618  case NPY_LONG:
8619  __pyx_v_f = ((char *)"l");
8620  break;
8621 
8622  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267
8623  * elif t == NPY_UINT: f = "I"
8624  * elif t == NPY_LONG: f = "l"
8625  * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
8626  * elif t == NPY_LONGLONG: f = "q"
8627  * elif t == NPY_ULONGLONG: f = "Q"
8628  */
8629  case NPY_ULONG:
8630  __pyx_v_f = ((char *)"L");
8631  break;
8632 
8633  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
8634  * elif t == NPY_LONG: f = "l"
8635  * elif t == NPY_ULONG: f = "L"
8636  * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
8637  * elif t == NPY_ULONGLONG: f = "Q"
8638  * elif t == NPY_FLOAT: f = "f"
8639  */
8640  case NPY_LONGLONG:
8641  __pyx_v_f = ((char *)"q");
8642  break;
8643 
8644  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269
8645  * elif t == NPY_ULONG: f = "L"
8646  * elif t == NPY_LONGLONG: f = "q"
8647  * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
8648  * elif t == NPY_FLOAT: f = "f"
8649  * elif t == NPY_DOUBLE: f = "d"
8650  */
8651  case NPY_ULONGLONG:
8652  __pyx_v_f = ((char *)"Q");
8653  break;
8654 
8655  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
8656  * elif t == NPY_LONGLONG: f = "q"
8657  * elif t == NPY_ULONGLONG: f = "Q"
8658  * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
8659  * elif t == NPY_DOUBLE: f = "d"
8660  * elif t == NPY_LONGDOUBLE: f = "g"
8661  */
8662  case NPY_FLOAT:
8663  __pyx_v_f = ((char *)"f");
8664  break;
8665 
8666  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
8667  * elif t == NPY_ULONGLONG: f = "Q"
8668  * elif t == NPY_FLOAT: f = "f"
8669  * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
8670  * elif t == NPY_LONGDOUBLE: f = "g"
8671  * elif t == NPY_CFLOAT: f = "Zf"
8672  */
8673  case NPY_DOUBLE:
8674  __pyx_v_f = ((char *)"d");
8675  break;
8676 
8677  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
8678  * elif t == NPY_FLOAT: f = "f"
8679  * elif t == NPY_DOUBLE: f = "d"
8680  * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
8681  * elif t == NPY_CFLOAT: f = "Zf"
8682  * elif t == NPY_CDOUBLE: f = "Zd"
8683  */
8684  case NPY_LONGDOUBLE:
8685  __pyx_v_f = ((char *)"g");
8686  break;
8687 
8688  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273
8689  * elif t == NPY_DOUBLE: f = "d"
8690  * elif t == NPY_LONGDOUBLE: f = "g"
8691  * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
8692  * elif t == NPY_CDOUBLE: f = "Zd"
8693  * elif t == NPY_CLONGDOUBLE: f = "Zg"
8694  */
8695  case NPY_CFLOAT:
8696  __pyx_v_f = ((char *)"Zf");
8697  break;
8698 
8699  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
8700  * elif t == NPY_LONGDOUBLE: f = "g"
8701  * elif t == NPY_CFLOAT: f = "Zf"
8702  * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
8703  * elif t == NPY_CLONGDOUBLE: f = "Zg"
8704  * elif t == NPY_OBJECT: f = "O"
8705  */
8706  case NPY_CDOUBLE:
8707  __pyx_v_f = ((char *)"Zd");
8708  break;
8709 
8710  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
8711  * elif t == NPY_CFLOAT: f = "Zf"
8712  * elif t == NPY_CDOUBLE: f = "Zd"
8713  * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
8714  * elif t == NPY_OBJECT: f = "O"
8715  * else:
8716  */
8717  case NPY_CLONGDOUBLE:
8718  __pyx_v_f = ((char *)"Zg");
8719  break;
8720 
8721  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
8722  * elif t == NPY_CDOUBLE: f = "Zd"
8723  * elif t == NPY_CLONGDOUBLE: f = "Zg"
8724  * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
8725  * else:
8726  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
8727  */
8728  case NPY_OBJECT:
8729  __pyx_v_f = ((char *)"O");
8730  break;
8731  default:
8732 
8733  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
8734  * elif t == NPY_OBJECT: f = "O"
8735  * else:
8736  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
8737  * info.format = f
8738  * return
8739  */
8740  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
8741  __Pyx_GOTREF(__pyx_t_3);
8742  __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
8743  __Pyx_GOTREF(__pyx_t_6);
8744  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8745  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
8746  __Pyx_GOTREF(__pyx_t_3);
8747  __Pyx_GIVEREF(__pyx_t_6);
8748  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
8749  __pyx_t_6 = 0;
8750  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
8751  __Pyx_GOTREF(__pyx_t_6);
8752  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8753  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
8754  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8755  __PYX_ERR(1, 278, __pyx_L1_error)
8756  break;
8757  }
8758 
8759  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
8760  * else:
8761  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
8762  * info.format = f # <<<<<<<<<<<<<<
8763  * return
8764  * else:
8765  */
8766  __pyx_v_info->format = __pyx_v_f;
8767 
8768  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
8769  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
8770  * info.format = f
8771  * return # <<<<<<<<<<<<<<
8772  * else:
8773  * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
8774  */
8775  __pyx_r = 0;
8776  goto __pyx_L0;
8777 
8778  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
8779  * info.obj = self
8780  *
8781  * if not hasfields: # <<<<<<<<<<<<<<
8782  * t = descr.type_num
8783  * if ((descr.byteorder == c'>' and little_endian) or
8784  */
8785  }
8786 
8787  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282
8788  * return
8789  * else:
8790  * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
8791  * info.format[0] = c'^' # Native data types, manual alignment
8792  * offset = 0
8793  */
8794  /*else*/ {
8795  __pyx_v_info->format = ((char *)malloc(0xFF));
8796 
8797  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
8798  * else:
8799  * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
8800  * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
8801  * offset = 0
8802  * f = _util_dtypestring(descr, info.format + 1,
8803  */
8804  (__pyx_v_info->format[0]) = '^';
8805 
8806  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
8807  * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
8808  * info.format[0] = c'^' # Native data types, manual alignment
8809  * offset = 0 # <<<<<<<<<<<<<<
8810  * f = _util_dtypestring(descr, info.format + 1,
8811  * info.format + _buffer_format_string_len,
8812  */
8813  __pyx_v_offset = 0;
8814 
8815  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
8816  * info.format[0] = c'^' # Native data types, manual alignment
8817  * offset = 0
8818  * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
8819  * info.format + _buffer_format_string_len,
8820  * &offset)
8821  */
8822  __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) __PYX_ERR(1, 285, __pyx_L1_error)
8823  __pyx_v_f = __pyx_t_7;
8824 
8825  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288
8826  * info.format + _buffer_format_string_len,
8827  * &offset)
8828  * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
8829  *
8830  * def __releasebuffer__(ndarray self, Py_buffer* info):
8831  */
8832  (__pyx_v_f[0]) = '\x00';
8833  }
8834 
8835  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
8836  * # experimental exception made for __getbuffer__ and __releasebuffer__
8837  * # -- the details of this may change.
8838  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
8839  * # This implementation of getbuffer is geared towards Cython
8840  * # requirements, and does not yet fullfill the PEP.
8841  */
8842 
8843  /* function exit code */
8844  __pyx_r = 0;
8845  goto __pyx_L0;
8846  __pyx_L1_error:;
8847  __Pyx_XDECREF(__pyx_t_3);
8848  __Pyx_XDECREF(__pyx_t_6);
8849  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8850  __pyx_r = -1;
8851  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
8852  __Pyx_GOTREF(__pyx_v_info->obj);
8853  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
8854  }
8855  goto __pyx_L2;
8856  __pyx_L0:;
8857  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
8858  __Pyx_GOTREF(Py_None);
8859  __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
8860  }
8861  __pyx_L2:;
8862  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
8863  __Pyx_RefNannyFinishContext();
8864  return __pyx_r;
8865 }
8866 
8867 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
8868  * f[0] = c'\0' # Terminate format string
8869  *
8870  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
8871  * if PyArray_HASFIELDS(self):
8872  * stdlib.free(info.format)
8873  */
8874 
8875 /* Python wrapper */
8876 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
8877 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
8878  __Pyx_RefNannyDeclarations
8879  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
8880  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
8881 
8882  /* function exit code */
8883  __Pyx_RefNannyFinishContext();
8884 }
8885 
8886 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
8887  __Pyx_RefNannyDeclarations
8888  int __pyx_t_1;
8889  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
8890 
8891  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
8892  *
8893  * def __releasebuffer__(ndarray self, Py_buffer* info):
8894  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
8895  * stdlib.free(info.format)
8896  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8897  */
8898  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
8899  if (__pyx_t_1) {
8900 
8901  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
8902  * def __releasebuffer__(ndarray self, Py_buffer* info):
8903  * if PyArray_HASFIELDS(self):
8904  * stdlib.free(info.format) # <<<<<<<<<<<<<<
8905  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8906  * stdlib.free(info.strides)
8907  */
8908  free(__pyx_v_info->format);
8909 
8910  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
8911  *
8912  * def __releasebuffer__(ndarray self, Py_buffer* info):
8913  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
8914  * stdlib.free(info.format)
8915  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8916  */
8917  }
8918 
8919  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
8920  * if PyArray_HASFIELDS(self):
8921  * stdlib.free(info.format)
8922  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
8923  * stdlib.free(info.strides)
8924  * # info.shape was stored after info.strides in the same block
8925  */
8926  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
8927  if (__pyx_t_1) {
8928 
8929  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":294
8930  * stdlib.free(info.format)
8931  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8932  * stdlib.free(info.strides) # <<<<<<<<<<<<<<
8933  * # info.shape was stored after info.strides in the same block
8934  *
8935  */
8936  free(__pyx_v_info->strides);
8937 
8938  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
8939  * if PyArray_HASFIELDS(self):
8940  * stdlib.free(info.format)
8941  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
8942  * stdlib.free(info.strides)
8943  * # info.shape was stored after info.strides in the same block
8944  */
8945  }
8946 
8947  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
8948  * f[0] = c'\0' # Terminate format string
8949  *
8950  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
8951  * if PyArray_HASFIELDS(self):
8952  * stdlib.free(info.format)
8953  */
8954 
8955  /* function exit code */
8956  __Pyx_RefNannyFinishContext();
8957 }
8958 
8959 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
8960  * ctypedef npy_cdouble complex_t
8961  *
8962  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
8963  * return PyArray_MultiIterNew(1, <void*>a)
8964  *
8965  */
8966 
8967 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
8968  PyObject *__pyx_r = NULL;
8969  __Pyx_RefNannyDeclarations
8970  PyObject *__pyx_t_1 = NULL;
8971  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
8972 
8973  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771
8974  *
8975  * cdef inline object PyArray_MultiIterNew1(a):
8976  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
8977  *
8978  * cdef inline object PyArray_MultiIterNew2(a, b):
8979  */
8980  __Pyx_XDECREF(__pyx_r);
8981  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 771, __pyx_L1_error)
8982  __Pyx_GOTREF(__pyx_t_1);
8983  __pyx_r = __pyx_t_1;
8984  __pyx_t_1 = 0;
8985  goto __pyx_L0;
8986 
8987  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
8988  * ctypedef npy_cdouble complex_t
8989  *
8990  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
8991  * return PyArray_MultiIterNew(1, <void*>a)
8992  *
8993  */
8994 
8995  /* function exit code */
8996  __pyx_L1_error:;
8997  __Pyx_XDECREF(__pyx_t_1);
8998  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
8999  __pyx_r = 0;
9000  __pyx_L0:;
9001  __Pyx_XGIVEREF(__pyx_r);
9002  __Pyx_RefNannyFinishContext();
9003  return __pyx_r;
9004 }
9005 
9006 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
9007  * return PyArray_MultiIterNew(1, <void*>a)
9008  *
9009  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
9010  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
9011  *
9012  */
9013 
9014 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
9015  PyObject *__pyx_r = NULL;
9016  __Pyx_RefNannyDeclarations
9017  PyObject *__pyx_t_1 = NULL;
9018  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
9019 
9020  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774
9021  *
9022  * cdef inline object PyArray_MultiIterNew2(a, b):
9023  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
9024  *
9025  * cdef inline object PyArray_MultiIterNew3(a, b, c):
9026  */
9027  __Pyx_XDECREF(__pyx_r);
9028  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 774, __pyx_L1_error)
9029  __Pyx_GOTREF(__pyx_t_1);
9030  __pyx_r = __pyx_t_1;
9031  __pyx_t_1 = 0;
9032  goto __pyx_L0;
9033 
9034  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
9035  * return PyArray_MultiIterNew(1, <void*>a)
9036  *
9037  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
9038  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
9039  *
9040  */
9041 
9042  /* function exit code */
9043  __pyx_L1_error:;
9044  __Pyx_XDECREF(__pyx_t_1);
9045  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
9046  __pyx_r = 0;
9047  __pyx_L0:;
9048  __Pyx_XGIVEREF(__pyx_r);
9049  __Pyx_RefNannyFinishContext();
9050  return __pyx_r;
9051 }
9052 
9053 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
9054  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
9055  *
9056  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
9057  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
9058  *
9059  */
9060 
9061 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
9062  PyObject *__pyx_r = NULL;
9063  __Pyx_RefNannyDeclarations
9064  PyObject *__pyx_t_1 = NULL;
9065  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
9066 
9067  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
9068  *
9069  * cdef inline object PyArray_MultiIterNew3(a, b, c):
9070  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
9071  *
9072  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
9073  */
9074  __Pyx_XDECREF(__pyx_r);
9075  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 777, __pyx_L1_error)
9076  __Pyx_GOTREF(__pyx_t_1);
9077  __pyx_r = __pyx_t_1;
9078  __pyx_t_1 = 0;
9079  goto __pyx_L0;
9080 
9081  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
9082  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
9083  *
9084  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
9085  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
9086  *
9087  */
9088 
9089  /* function exit code */
9090  __pyx_L1_error:;
9091  __Pyx_XDECREF(__pyx_t_1);
9092  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
9093  __pyx_r = 0;
9094  __pyx_L0:;
9095  __Pyx_XGIVEREF(__pyx_r);
9096  __Pyx_RefNannyFinishContext();
9097  return __pyx_r;
9098 }
9099 
9100 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
9101  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
9102  *
9103  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
9104  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
9105  *
9106  */
9107 
9108 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
9109  PyObject *__pyx_r = NULL;
9110  __Pyx_RefNannyDeclarations
9111  PyObject *__pyx_t_1 = NULL;
9112  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
9113 
9114  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780
9115  *
9116  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
9117  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
9118  *
9119  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
9120  */
9121  __Pyx_XDECREF(__pyx_r);
9122  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 780, __pyx_L1_error)
9123  __Pyx_GOTREF(__pyx_t_1);
9124  __pyx_r = __pyx_t_1;
9125  __pyx_t_1 = 0;
9126  goto __pyx_L0;
9127 
9128  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
9129  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
9130  *
9131  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
9132  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
9133  *
9134  */
9135 
9136  /* function exit code */
9137  __pyx_L1_error:;
9138  __Pyx_XDECREF(__pyx_t_1);
9139  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
9140  __pyx_r = 0;
9141  __pyx_L0:;
9142  __Pyx_XGIVEREF(__pyx_r);
9143  __Pyx_RefNannyFinishContext();
9144  return __pyx_r;
9145 }
9146 
9147 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
9148  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
9149  *
9150  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
9151  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
9152  *
9153  */
9154 
9155 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
9156  PyObject *__pyx_r = NULL;
9157  __Pyx_RefNannyDeclarations
9158  PyObject *__pyx_t_1 = NULL;
9159  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
9160 
9161  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
9162  *
9163  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
9164  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
9165  *
9166  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
9167  */
9168  __Pyx_XDECREF(__pyx_r);
9169  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error)
9170  __Pyx_GOTREF(__pyx_t_1);
9171  __pyx_r = __pyx_t_1;
9172  __pyx_t_1 = 0;
9173  goto __pyx_L0;
9174 
9175  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
9176  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
9177  *
9178  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
9179  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
9180  *
9181  */
9182 
9183  /* function exit code */
9184  __pyx_L1_error:;
9185  __Pyx_XDECREF(__pyx_t_1);
9186  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
9187  __pyx_r = 0;
9188  __pyx_L0:;
9189  __Pyx_XGIVEREF(__pyx_r);
9190  __Pyx_RefNannyFinishContext();
9191  return __pyx_r;
9192 }
9193 
9194 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
9195  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
9196  *
9197  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
9198  * # Recursive utility function used in __getbuffer__ to get format
9199  * # string. The new location in the format string is returned.
9200  */
9201 
9202 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
9203  PyArray_Descr *__pyx_v_child = 0;
9204  int __pyx_v_endian_detector;
9205  int __pyx_v_little_endian;
9206  PyObject *__pyx_v_fields = 0;
9207  PyObject *__pyx_v_childname = NULL;
9208  PyObject *__pyx_v_new_offset = NULL;
9209  PyObject *__pyx_v_t = NULL;
9210  char *__pyx_r;
9211  __Pyx_RefNannyDeclarations
9212  PyObject *__pyx_t_1 = NULL;
9213  Py_ssize_t __pyx_t_2;
9214  PyObject *__pyx_t_3 = NULL;
9215  PyObject *__pyx_t_4 = NULL;
9216  int __pyx_t_5;
9217  int __pyx_t_6;
9218  int __pyx_t_7;
9219  long __pyx_t_8;
9220  char *__pyx_t_9;
9221  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
9222 
9223  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
9224  *
9225  * cdef dtype child
9226  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
9227  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
9228  * cdef tuple fields
9229  */
9230  __pyx_v_endian_detector = 1;
9231 
9232  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
9233  * cdef dtype child
9234  * cdef int endian_detector = 1
9235  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
9236  * cdef tuple fields
9237  *
9238  */
9239  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
9240 
9241  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
9242  * cdef tuple fields
9243  *
9244  * for childname in descr.names: # <<<<<<<<<<<<<<
9245  * fields = descr.fields[childname]
9246  * child, new_offset = fields
9247  */
9248  if (unlikely(__pyx_v_descr->names == Py_None)) {
9249  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
9250  __PYX_ERR(1, 794, __pyx_L1_error)
9251  }
9252  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
9253  for (;;) {
9254  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
9255  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9256  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 794, __pyx_L1_error)
9257  #else
9258  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
9259  __Pyx_GOTREF(__pyx_t_3);
9260  #endif
9261  __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
9262  __pyx_t_3 = 0;
9263 
9264  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795
9265  *
9266  * for childname in descr.names:
9267  * fields = descr.fields[childname] # <<<<<<<<<<<<<<
9268  * child, new_offset = fields
9269  *
9270  */
9271  if (unlikely(__pyx_v_descr->fields == Py_None)) {
9272  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
9273  __PYX_ERR(1, 795, __pyx_L1_error)
9274  }
9275  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 795, __pyx_L1_error)
9276  __Pyx_GOTREF(__pyx_t_3);
9277  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 795, __pyx_L1_error)
9278  __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
9279  __pyx_t_3 = 0;
9280 
9281  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796
9282  * for childname in descr.names:
9283  * fields = descr.fields[childname]
9284  * child, new_offset = fields # <<<<<<<<<<<<<<
9285  *
9286  * if (end - f) - <int>(new_offset - offset[0]) < 15:
9287  */
9288  if (likely(__pyx_v_fields != Py_None)) {
9289  PyObject* sequence = __pyx_v_fields;
9290  #if !CYTHON_COMPILING_IN_PYPY
9291  Py_ssize_t size = Py_SIZE(sequence);
9292  #else
9293  Py_ssize_t size = PySequence_Size(sequence);
9294  #endif
9295  if (unlikely(size != 2)) {
9296  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
9297  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
9298  __PYX_ERR(1, 796, __pyx_L1_error)
9299  }
9300  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9301  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
9302  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
9303  __Pyx_INCREF(__pyx_t_3);
9304  __Pyx_INCREF(__pyx_t_4);
9305  #else
9306  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
9307  __Pyx_GOTREF(__pyx_t_3);
9308  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
9309  __Pyx_GOTREF(__pyx_t_4);
9310  #endif
9311  } else {
9312  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 796, __pyx_L1_error)
9313  }
9314  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 796, __pyx_L1_error)
9315  __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
9316  __pyx_t_3 = 0;
9317  __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
9318  __pyx_t_4 = 0;
9319 
9320  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
9321  * child, new_offset = fields
9322  *
9323  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
9324  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
9325  *
9326  */
9327  __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 798, __pyx_L1_error)
9328  __Pyx_GOTREF(__pyx_t_4);
9329  __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
9330  __Pyx_GOTREF(__pyx_t_3);
9331  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9332  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 798, __pyx_L1_error)
9333  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9334  __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
9335  if (__pyx_t_6) {
9336 
9337  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
9338  *
9339  * if (end - f) - <int>(new_offset - offset[0]) < 15:
9340  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
9341  *
9342  * if ((child.byteorder == c'>' and little_endian) or
9343  */
9344  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __pyx_L1_error)
9345  __Pyx_GOTREF(__pyx_t_3);
9346  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
9347  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9348  __PYX_ERR(1, 799, __pyx_L1_error)
9349 
9350  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
9351  * child, new_offset = fields
9352  *
9353  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
9354  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
9355  *
9356  */
9357  }
9358 
9359  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
9360  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
9361  *
9362  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
9363  * (child.byteorder == c'<' and not little_endian)):
9364  * raise ValueError(u"Non-native byte order not supported")
9365  */
9366  __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
9367  if (!__pyx_t_7) {
9368  goto __pyx_L8_next_or;
9369  } else {
9370  }
9371  __pyx_t_7 = (__pyx_v_little_endian != 0);
9372  if (!__pyx_t_7) {
9373  } else {
9374  __pyx_t_6 = __pyx_t_7;
9375  goto __pyx_L7_bool_binop_done;
9376  }
9377  __pyx_L8_next_or:;
9378 
9379  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
9380  *
9381  * if ((child.byteorder == c'>' and little_endian) or
9382  * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
9383  * raise ValueError(u"Non-native byte order not supported")
9384  * # One could encode it in the format string and have Cython
9385  */
9386  __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
9387  if (__pyx_t_7) {
9388  } else {
9389  __pyx_t_6 = __pyx_t_7;
9390  goto __pyx_L7_bool_binop_done;
9391  }
9392  __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
9393  __pyx_t_6 = __pyx_t_7;
9394  __pyx_L7_bool_binop_done:;
9395 
9396  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
9397  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
9398  *
9399  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
9400  * (child.byteorder == c'<' and not little_endian)):
9401  * raise ValueError(u"Non-native byte order not supported")
9402  */
9403  if (__pyx_t_6) {
9404 
9405  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
9406  * if ((child.byteorder == c'>' and little_endian) or
9407  * (child.byteorder == c'<' and not little_endian)):
9408  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
9409  * # One could encode it in the format string and have Cython
9410  * # complain instead, BUT: < and > in format strings also imply
9411  */
9412  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __pyx_L1_error)
9413  __Pyx_GOTREF(__pyx_t_3);
9414  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
9415  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9416  __PYX_ERR(1, 803, __pyx_L1_error)
9417 
9418  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
9419  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
9420  *
9421  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
9422  * (child.byteorder == c'<' and not little_endian)):
9423  * raise ValueError(u"Non-native byte order not supported")
9424  */
9425  }
9426 
9427  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
9428  *
9429  * # Output padding bytes
9430  * while offset[0] < new_offset: # <<<<<<<<<<<<<<
9431  * f[0] = 120 # "x"; pad byte
9432  * f += 1
9433  */
9434  while (1) {
9435  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 813, __pyx_L1_error)
9436  __Pyx_GOTREF(__pyx_t_3);
9437  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 813, __pyx_L1_error)
9438  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9439  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 813, __pyx_L1_error)
9440  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9441  if (!__pyx_t_6) break;
9442 
9443  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814
9444  * # Output padding bytes
9445  * while offset[0] < new_offset:
9446  * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
9447  * f += 1
9448  * offset[0] += 1
9449  */
9450  (__pyx_v_f[0]) = 0x78;
9451 
9452  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
9453  * while offset[0] < new_offset:
9454  * f[0] = 120 # "x"; pad byte
9455  * f += 1 # <<<<<<<<<<<<<<
9456  * offset[0] += 1
9457  *
9458  */
9459  __pyx_v_f = (__pyx_v_f + 1);
9460 
9461  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
9462  * f[0] = 120 # "x"; pad byte
9463  * f += 1
9464  * offset[0] += 1 # <<<<<<<<<<<<<<
9465  *
9466  * offset[0] += child.itemsize
9467  */
9468  __pyx_t_8 = 0;
9469  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
9470  }
9471 
9472  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818
9473  * offset[0] += 1
9474  *
9475  * offset[0] += child.itemsize # <<<<<<<<<<<<<<
9476  *
9477  * if not PyDataType_HASFIELDS(child):
9478  */
9479  __pyx_t_8 = 0;
9480  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
9481 
9482  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
9483  * offset[0] += child.itemsize
9484  *
9485  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
9486  * t = child.type_num
9487  * if end - f < 5:
9488  */
9489  __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
9490  if (__pyx_t_6) {
9491 
9492  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
9493  *
9494  * if not PyDataType_HASFIELDS(child):
9495  * t = child.type_num # <<<<<<<<<<<<<<
9496  * if end - f < 5:
9497  * raise RuntimeError(u"Format string allocated too short.")
9498  */
9499  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 821, __pyx_L1_error)
9500  __Pyx_GOTREF(__pyx_t_4);
9501  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
9502  __pyx_t_4 = 0;
9503 
9504  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
9505  * if not PyDataType_HASFIELDS(child):
9506  * t = child.type_num
9507  * if end - f < 5: # <<<<<<<<<<<<<<
9508  * raise RuntimeError(u"Format string allocated too short.")
9509  *
9510  */
9511  __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
9512  if (__pyx_t_6) {
9513 
9514  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
9515  * t = child.type_num
9516  * if end - f < 5:
9517  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
9518  *
9519  * # Until ticket #99 is fixed, use integers to avoid warnings
9520  */
9521  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 823, __pyx_L1_error)
9522  __Pyx_GOTREF(__pyx_t_4);
9523  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
9524  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9525  __PYX_ERR(1, 823, __pyx_L1_error)
9526 
9527  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
9528  * if not PyDataType_HASFIELDS(child):
9529  * t = child.type_num
9530  * if end - f < 5: # <<<<<<<<<<<<<<
9531  * raise RuntimeError(u"Format string allocated too short.")
9532  *
9533  */
9534  }
9535 
9536  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826
9537  *
9538  * # Until ticket #99 is fixed, use integers to avoid warnings
9539  * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
9540  * elif t == NPY_UBYTE: f[0] = 66 #"B"
9541  * elif t == NPY_SHORT: f[0] = 104 #"h"
9542  */
9543  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 826, __pyx_L1_error)
9544  __Pyx_GOTREF(__pyx_t_4);
9545  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 826, __pyx_L1_error)
9546  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9547  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
9548  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9549  if (__pyx_t_6) {
9550  (__pyx_v_f[0]) = 98;
9551  goto __pyx_L15;
9552  }
9553 
9554  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
9555  * # Until ticket #99 is fixed, use integers to avoid warnings
9556  * if t == NPY_BYTE: f[0] = 98 #"b"
9557  * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
9558  * elif t == NPY_SHORT: f[0] = 104 #"h"
9559  * elif t == NPY_USHORT: f[0] = 72 #"H"
9560  */
9561  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 827, __pyx_L1_error)
9562  __Pyx_GOTREF(__pyx_t_3);
9563  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
9564  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9565  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 827, __pyx_L1_error)
9566  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9567  if (__pyx_t_6) {
9568  (__pyx_v_f[0]) = 66;
9569  goto __pyx_L15;
9570  }
9571 
9572  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
9573  * if t == NPY_BYTE: f[0] = 98 #"b"
9574  * elif t == NPY_UBYTE: f[0] = 66 #"B"
9575  * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
9576  * elif t == NPY_USHORT: f[0] = 72 #"H"
9577  * elif t == NPY_INT: f[0] = 105 #"i"
9578  */
9579  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 828, __pyx_L1_error)
9580  __Pyx_GOTREF(__pyx_t_4);
9581  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 828, __pyx_L1_error)
9582  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9583  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 828, __pyx_L1_error)
9584  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9585  if (__pyx_t_6) {
9586  (__pyx_v_f[0]) = 0x68;
9587  goto __pyx_L15;
9588  }
9589 
9590  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829
9591  * elif t == NPY_UBYTE: f[0] = 66 #"B"
9592  * elif t == NPY_SHORT: f[0] = 104 #"h"
9593  * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
9594  * elif t == NPY_INT: f[0] = 105 #"i"
9595  * elif t == NPY_UINT: f[0] = 73 #"I"
9596  */
9597  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
9598  __Pyx_GOTREF(__pyx_t_3);
9599  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 829, __pyx_L1_error)
9600  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9601  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 829, __pyx_L1_error)
9602  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9603  if (__pyx_t_6) {
9604  (__pyx_v_f[0]) = 72;
9605  goto __pyx_L15;
9606  }
9607 
9608  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
9609  * elif t == NPY_SHORT: f[0] = 104 #"h"
9610  * elif t == NPY_USHORT: f[0] = 72 #"H"
9611  * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
9612  * elif t == NPY_UINT: f[0] = 73 #"I"
9613  * elif t == NPY_LONG: f[0] = 108 #"l"
9614  */
9615  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 830, __pyx_L1_error)
9616  __Pyx_GOTREF(__pyx_t_4);
9617  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 830, __pyx_L1_error)
9618  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9619  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 830, __pyx_L1_error)
9620  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9621  if (__pyx_t_6) {
9622  (__pyx_v_f[0]) = 0x69;
9623  goto __pyx_L15;
9624  }
9625 
9626  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
9627  * elif t == NPY_USHORT: f[0] = 72 #"H"
9628  * elif t == NPY_INT: f[0] = 105 #"i"
9629  * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
9630  * elif t == NPY_LONG: f[0] = 108 #"l"
9631  * elif t == NPY_ULONG: f[0] = 76 #"L"
9632  */
9633  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 831, __pyx_L1_error)
9634  __Pyx_GOTREF(__pyx_t_3);
9635  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 831, __pyx_L1_error)
9636  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9637  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
9638  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9639  if (__pyx_t_6) {
9640  (__pyx_v_f[0]) = 73;
9641  goto __pyx_L15;
9642  }
9643 
9644  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832
9645  * elif t == NPY_INT: f[0] = 105 #"i"
9646  * elif t == NPY_UINT: f[0] = 73 #"I"
9647  * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
9648  * elif t == NPY_ULONG: f[0] = 76 #"L"
9649  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
9650  */
9651  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __pyx_L1_error)
9652  __Pyx_GOTREF(__pyx_t_4);
9653  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 832, __pyx_L1_error)
9654  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9655  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
9656  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9657  if (__pyx_t_6) {
9658  (__pyx_v_f[0]) = 0x6C;
9659  goto __pyx_L15;
9660  }
9661 
9662  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
9663  * elif t == NPY_UINT: f[0] = 73 #"I"
9664  * elif t == NPY_LONG: f[0] = 108 #"l"
9665  * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
9666  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
9667  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
9668  */
9669  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
9670  __Pyx_GOTREF(__pyx_t_3);
9671  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
9672  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9673  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 833, __pyx_L1_error)
9674  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9675  if (__pyx_t_6) {
9676  (__pyx_v_f[0]) = 76;
9677  goto __pyx_L15;
9678  }
9679 
9680  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
9681  * elif t == NPY_LONG: f[0] = 108 #"l"
9682  * elif t == NPY_ULONG: f[0] = 76 #"L"
9683  * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
9684  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
9685  * elif t == NPY_FLOAT: f[0] = 102 #"f"
9686  */
9687  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
9688  __Pyx_GOTREF(__pyx_t_4);
9689  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error)
9690  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9691  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 834, __pyx_L1_error)
9692  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9693  if (__pyx_t_6) {
9694  (__pyx_v_f[0]) = 0x71;
9695  goto __pyx_L15;
9696  }
9697 
9698  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835
9699  * elif t == NPY_ULONG: f[0] = 76 #"L"
9700  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
9701  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
9702  * elif t == NPY_FLOAT: f[0] = 102 #"f"
9703  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
9704  */
9705  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
9706  __Pyx_GOTREF(__pyx_t_3);
9707  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error)
9708  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9709  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 835, __pyx_L1_error)
9710  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9711  if (__pyx_t_6) {
9712  (__pyx_v_f[0]) = 81;
9713  goto __pyx_L15;
9714  }
9715 
9716  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
9717  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
9718  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
9719  * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
9720  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
9721  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
9722  */
9723  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __pyx_L1_error)
9724  __Pyx_GOTREF(__pyx_t_4);
9725  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 836, __pyx_L1_error)
9726  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9727  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 836, __pyx_L1_error)
9728  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9729  if (__pyx_t_6) {
9730  (__pyx_v_f[0]) = 0x66;
9731  goto __pyx_L15;
9732  }
9733 
9734  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
9735  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
9736  * elif t == NPY_FLOAT: f[0] = 102 #"f"
9737  * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
9738  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
9739  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
9740  */
9741  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error)
9742  __Pyx_GOTREF(__pyx_t_3);
9743  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __pyx_L1_error)
9744  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9745  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
9746  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9747  if (__pyx_t_6) {
9748  (__pyx_v_f[0]) = 0x64;
9749  goto __pyx_L15;
9750  }
9751 
9752  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
9753  * elif t == NPY_FLOAT: f[0] = 102 #"f"
9754  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
9755  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
9756  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
9757  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
9758  */
9759  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 838, __pyx_L1_error)
9760  __Pyx_GOTREF(__pyx_t_4);
9761  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
9762  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9763  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
9764  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9765  if (__pyx_t_6) {
9766  (__pyx_v_f[0]) = 0x67;
9767  goto __pyx_L15;
9768  }
9769 
9770  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839
9771  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
9772  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
9773  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
9774  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
9775  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
9776  */
9777  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 839, __pyx_L1_error)
9778  __Pyx_GOTREF(__pyx_t_3);
9779  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 839, __pyx_L1_error)
9780  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9781  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
9782  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9783  if (__pyx_t_6) {
9784  (__pyx_v_f[0]) = 90;
9785  (__pyx_v_f[1]) = 0x66;
9786  __pyx_v_f = (__pyx_v_f + 1);
9787  goto __pyx_L15;
9788  }
9789 
9790  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
9791  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
9792  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
9793  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
9794  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
9795  * elif t == NPY_OBJECT: f[0] = 79 #"O"
9796  */
9797  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error)
9798  __Pyx_GOTREF(__pyx_t_4);
9799  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error)
9800  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9801  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __pyx_L1_error)
9802  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9803  if (__pyx_t_6) {
9804  (__pyx_v_f[0]) = 90;
9805  (__pyx_v_f[1]) = 0x64;
9806  __pyx_v_f = (__pyx_v_f + 1);
9807  goto __pyx_L15;
9808  }
9809 
9810  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841
9811  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
9812  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
9813  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
9814  * elif t == NPY_OBJECT: f[0] = 79 #"O"
9815  * else:
9816  */
9817  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
9818  __Pyx_GOTREF(__pyx_t_3);
9819  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
9820  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9821  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
9822  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9823  if (__pyx_t_6) {
9824  (__pyx_v_f[0]) = 90;
9825  (__pyx_v_f[1]) = 0x67;
9826  __pyx_v_f = (__pyx_v_f + 1);
9827  goto __pyx_L15;
9828  }
9829 
9830  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
9831  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
9832  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
9833  * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
9834  * else:
9835  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
9836  */
9837  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 842, __pyx_L1_error)
9838  __Pyx_GOTREF(__pyx_t_4);
9839  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __pyx_L1_error)
9840  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9841  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
9842  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9843  if (__pyx_t_6) {
9844  (__pyx_v_f[0]) = 79;
9845  goto __pyx_L15;
9846  }
9847 
9848  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844
9849  * elif t == NPY_OBJECT: f[0] = 79 #"O"
9850  * else:
9851  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
9852  * f += 1
9853  * else:
9854  */
9855  /*else*/ {
9856  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
9857  __Pyx_GOTREF(__pyx_t_3);
9858  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __pyx_L1_error)
9859  __Pyx_GOTREF(__pyx_t_4);
9860  __Pyx_GIVEREF(__pyx_t_3);
9861  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
9862  __pyx_t_3 = 0;
9863  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
9864  __Pyx_GOTREF(__pyx_t_3);
9865  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9866  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
9867  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9868  __PYX_ERR(1, 844, __pyx_L1_error)
9869  }
9870  __pyx_L15:;
9871 
9872  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845
9873  * else:
9874  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
9875  * f += 1 # <<<<<<<<<<<<<<
9876  * else:
9877  * # Cython ignores struct boundary information ("T{...}"),
9878  */
9879  __pyx_v_f = (__pyx_v_f + 1);
9880 
9881  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
9882  * offset[0] += child.itemsize
9883  *
9884  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
9885  * t = child.type_num
9886  * if end - f < 5:
9887  */
9888  goto __pyx_L13;
9889  }
9890 
9891  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849
9892  * # Cython ignores struct boundary information ("T{...}"),
9893  * # so don't output it
9894  * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
9895  * return f
9896  *
9897  */
9898  /*else*/ {
9899  __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) __PYX_ERR(1, 849, __pyx_L1_error)
9900  __pyx_v_f = __pyx_t_9;
9901  }
9902  __pyx_L13:;
9903 
9904  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
9905  * cdef tuple fields
9906  *
9907  * for childname in descr.names: # <<<<<<<<<<<<<<
9908  * fields = descr.fields[childname]
9909  * child, new_offset = fields
9910  */
9911  }
9912  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9913 
9914  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850
9915  * # so don't output it
9916  * f = _util_dtypestring(child, f, end, offset)
9917  * return f # <<<<<<<<<<<<<<
9918  *
9919  *
9920  */
9921  __pyx_r = __pyx_v_f;
9922  goto __pyx_L0;
9923 
9924  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
9925  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
9926  *
9927  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
9928  * # Recursive utility function used in __getbuffer__ to get format
9929  * # string. The new location in the format string is returned.
9930  */
9931 
9932  /* function exit code */
9933  __pyx_L1_error:;
9934  __Pyx_XDECREF(__pyx_t_1);
9935  __Pyx_XDECREF(__pyx_t_3);
9936  __Pyx_XDECREF(__pyx_t_4);
9937  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
9938  __pyx_r = NULL;
9939  __pyx_L0:;
9940  __Pyx_XDECREF((PyObject *)__pyx_v_child);
9941  __Pyx_XDECREF(__pyx_v_fields);
9942  __Pyx_XDECREF(__pyx_v_childname);
9943  __Pyx_XDECREF(__pyx_v_new_offset);
9944  __Pyx_XDECREF(__pyx_v_t);
9945  __Pyx_RefNannyFinishContext();
9946  return __pyx_r;
9947 }
9948 
9949 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
9950  *
9951  *
9952  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
9953  * cdef PyObject* baseptr
9954  * if base is None:
9955  */
9956 
9957 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
9958  PyObject *__pyx_v_baseptr;
9959  __Pyx_RefNannyDeclarations
9960  int __pyx_t_1;
9961  int __pyx_t_2;
9962  __Pyx_RefNannySetupContext("set_array_base", 0);
9963 
9964  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
9965  * cdef inline void set_array_base(ndarray arr, object base):
9966  * cdef PyObject* baseptr
9967  * if base is None: # <<<<<<<<<<<<<<
9968  * baseptr = NULL
9969  * else:
9970  */
9971  __pyx_t_1 = (__pyx_v_base == Py_None);
9972  __pyx_t_2 = (__pyx_t_1 != 0);
9973  if (__pyx_t_2) {
9974 
9975  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969
9976  * cdef PyObject* baseptr
9977  * if base is None:
9978  * baseptr = NULL # <<<<<<<<<<<<<<
9979  * else:
9980  * Py_INCREF(base) # important to do this before decref below!
9981  */
9982  __pyx_v_baseptr = NULL;
9983 
9984  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
9985  * cdef inline void set_array_base(ndarray arr, object base):
9986  * cdef PyObject* baseptr
9987  * if base is None: # <<<<<<<<<<<<<<
9988  * baseptr = NULL
9989  * else:
9990  */
9991  goto __pyx_L3;
9992  }
9993 
9994  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971
9995  * baseptr = NULL
9996  * else:
9997  * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<<
9998  * baseptr = <PyObject*>base
9999  * Py_XDECREF(arr.base)
10000  */
10001  /*else*/ {
10002  Py_INCREF(__pyx_v_base);
10003 
10004  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972
10005  * else:
10006  * Py_INCREF(base) # important to do this before decref below!
10007  * baseptr = <PyObject*>base # <<<<<<<<<<<<<<
10008  * Py_XDECREF(arr.base)
10009  * arr.base = baseptr
10010  */
10011  __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
10012  }
10013  __pyx_L3:;
10014 
10015  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973
10016  * Py_INCREF(base) # important to do this before decref below!
10017  * baseptr = <PyObject*>base
10018  * Py_XDECREF(arr.base) # <<<<<<<<<<<<<<
10019  * arr.base = baseptr
10020  *
10021  */
10022  Py_XDECREF(__pyx_v_arr->base);
10023 
10024  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974
10025  * baseptr = <PyObject*>base
10026  * Py_XDECREF(arr.base)
10027  * arr.base = baseptr # <<<<<<<<<<<<<<
10028  *
10029  * cdef inline object get_array_base(ndarray arr):
10030  */
10031  __pyx_v_arr->base = __pyx_v_baseptr;
10032 
10033  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
10034  *
10035  *
10036  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
10037  * cdef PyObject* baseptr
10038  * if base is None:
10039  */
10040 
10041  /* function exit code */
10042  __Pyx_RefNannyFinishContext();
10043 }
10044 
10045 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
10046  * arr.base = baseptr
10047  *
10048  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
10049  * if arr.base is NULL:
10050  * return None
10051  */
10052 
10053 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
10054  PyObject *__pyx_r = NULL;
10055  __Pyx_RefNannyDeclarations
10056  int __pyx_t_1;
10057  __Pyx_RefNannySetupContext("get_array_base", 0);
10058 
10059  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
10060  *
10061  * cdef inline object get_array_base(ndarray arr):
10062  * if arr.base is NULL: # <<<<<<<<<<<<<<
10063  * return None
10064  * else:
10065  */
10066  __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
10067  if (__pyx_t_1) {
10068 
10069  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978
10070  * cdef inline object get_array_base(ndarray arr):
10071  * if arr.base is NULL:
10072  * return None # <<<<<<<<<<<<<<
10073  * else:
10074  * return <object>arr.base
10075  */
10076  __Pyx_XDECREF(__pyx_r);
10077  __Pyx_INCREF(Py_None);
10078  __pyx_r = Py_None;
10079  goto __pyx_L0;
10080 
10081  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
10082  *
10083  * cdef inline object get_array_base(ndarray arr):
10084  * if arr.base is NULL: # <<<<<<<<<<<<<<
10085  * return None
10086  * else:
10087  */
10088  }
10089 
10090  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980
10091  * return None
10092  * else:
10093  * return <object>arr.base # <<<<<<<<<<<<<<
10094  *
10095  *
10096  */
10097  /*else*/ {
10098  __Pyx_XDECREF(__pyx_r);
10099  __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
10100  __pyx_r = ((PyObject *)__pyx_v_arr->base);
10101  goto __pyx_L0;
10102  }
10103 
10104  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
10105  * arr.base = baseptr
10106  *
10107  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
10108  * if arr.base is NULL:
10109  * return None
10110  */
10111 
10112  /* function exit code */
10113  __pyx_L0:;
10114  __Pyx_XGIVEREF(__pyx_r);
10115  __Pyx_RefNannyFinishContext();
10116  return __pyx_r;
10117 }
10118 
10119 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":985
10120  * # Versions of the import_* functions which are more suitable for
10121  * # Cython code.
10122  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
10123  * try:
10124  * _import_array()
10125  */
10126 
10127 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
10128  int __pyx_r;
10129  __Pyx_RefNannyDeclarations
10130  PyObject *__pyx_t_1 = NULL;
10131  PyObject *__pyx_t_2 = NULL;
10132  PyObject *__pyx_t_3 = NULL;
10133  int __pyx_t_4;
10134  PyObject *__pyx_t_5 = NULL;
10135  PyObject *__pyx_t_6 = NULL;
10136  PyObject *__pyx_t_7 = NULL;
10137  PyObject *__pyx_t_8 = NULL;
10138  __Pyx_RefNannySetupContext("import_array", 0);
10139 
10140  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
10141  * # Cython code.
10142  * cdef inline int import_array() except -1:
10143  * try: # <<<<<<<<<<<<<<
10144  * _import_array()
10145  * except Exception:
10146  */
10147  {
10148  __Pyx_PyThreadState_declare
10149  __Pyx_PyThreadState_assign
10150  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10151  __Pyx_XGOTREF(__pyx_t_1);
10152  __Pyx_XGOTREF(__pyx_t_2);
10153  __Pyx_XGOTREF(__pyx_t_3);
10154  /*try:*/ {
10155 
10156  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":987
10157  * cdef inline int import_array() except -1:
10158  * try:
10159  * _import_array() # <<<<<<<<<<<<<<
10160  * except Exception:
10161  * raise ImportError("numpy.core.multiarray failed to import")
10162  */
10163  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 987, __pyx_L3_error)
10164 
10165  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
10166  * # Cython code.
10167  * cdef inline int import_array() except -1:
10168  * try: # <<<<<<<<<<<<<<
10169  * _import_array()
10170  * except Exception:
10171  */
10172  }
10173  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10174  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10175  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10176  goto __pyx_L10_try_end;
10177  __pyx_L3_error:;
10178  __Pyx_PyThreadState_assign
10179 
10180  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":988
10181  * try:
10182  * _import_array()
10183  * except Exception: # <<<<<<<<<<<<<<
10184  * raise ImportError("numpy.core.multiarray failed to import")
10185  *
10186  */
10187  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
10188  if (__pyx_t_4) {
10189  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
10190  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 988, __pyx_L5_except_error)
10191  __Pyx_GOTREF(__pyx_t_5);
10192  __Pyx_GOTREF(__pyx_t_6);
10193  __Pyx_GOTREF(__pyx_t_7);
10194 
10195  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":989
10196  * _import_array()
10197  * except Exception:
10198  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
10199  *
10200  * cdef inline int import_umath() except -1:
10201  */
10202  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 989, __pyx_L5_except_error)
10203  __Pyx_GOTREF(__pyx_t_8);
10204  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
10205  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10206  __PYX_ERR(1, 989, __pyx_L5_except_error)
10207  }
10208  goto __pyx_L5_except_error;
10209  __pyx_L5_except_error:;
10210 
10211  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
10212  * # Cython code.
10213  * cdef inline int import_array() except -1:
10214  * try: # <<<<<<<<<<<<<<
10215  * _import_array()
10216  * except Exception:
10217  */
10218  __Pyx_PyThreadState_assign
10219  __Pyx_XGIVEREF(__pyx_t_1);
10220  __Pyx_XGIVEREF(__pyx_t_2);
10221  __Pyx_XGIVEREF(__pyx_t_3);
10222  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10223  goto __pyx_L1_error;
10224  __pyx_L10_try_end:;
10225  }
10226 
10227  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":985
10228  * # Versions of the import_* functions which are more suitable for
10229  * # Cython code.
10230  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
10231  * try:
10232  * _import_array()
10233  */
10234 
10235  /* function exit code */
10236  __pyx_r = 0;
10237  goto __pyx_L0;
10238  __pyx_L1_error:;
10239  __Pyx_XDECREF(__pyx_t_5);
10240  __Pyx_XDECREF(__pyx_t_6);
10241  __Pyx_XDECREF(__pyx_t_7);
10242  __Pyx_XDECREF(__pyx_t_8);
10243  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
10244  __pyx_r = -1;
10245  __pyx_L0:;
10246  __Pyx_RefNannyFinishContext();
10247  return __pyx_r;
10248 }
10249 
10250 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":991
10251  * raise ImportError("numpy.core.multiarray failed to import")
10252  *
10253  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
10254  * try:
10255  * _import_umath()
10256  */
10257 
10258 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
10259  int __pyx_r;
10260  __Pyx_RefNannyDeclarations
10261  PyObject *__pyx_t_1 = NULL;
10262  PyObject *__pyx_t_2 = NULL;
10263  PyObject *__pyx_t_3 = NULL;
10264  int __pyx_t_4;
10265  PyObject *__pyx_t_5 = NULL;
10266  PyObject *__pyx_t_6 = NULL;
10267  PyObject *__pyx_t_7 = NULL;
10268  PyObject *__pyx_t_8 = NULL;
10269  __Pyx_RefNannySetupContext("import_umath", 0);
10270 
10271  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
10272  *
10273  * cdef inline int import_umath() except -1:
10274  * try: # <<<<<<<<<<<<<<
10275  * _import_umath()
10276  * except Exception:
10277  */
10278  {
10279  __Pyx_PyThreadState_declare
10280  __Pyx_PyThreadState_assign
10281  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10282  __Pyx_XGOTREF(__pyx_t_1);
10283  __Pyx_XGOTREF(__pyx_t_2);
10284  __Pyx_XGOTREF(__pyx_t_3);
10285  /*try:*/ {
10286 
10287  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":993
10288  * cdef inline int import_umath() except -1:
10289  * try:
10290  * _import_umath() # <<<<<<<<<<<<<<
10291  * except Exception:
10292  * raise ImportError("numpy.core.umath failed to import")
10293  */
10294  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 993, __pyx_L3_error)
10295 
10296  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
10297  *
10298  * cdef inline int import_umath() except -1:
10299  * try: # <<<<<<<<<<<<<<
10300  * _import_umath()
10301  * except Exception:
10302  */
10303  }
10304  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10305  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10306  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10307  goto __pyx_L10_try_end;
10308  __pyx_L3_error:;
10309  __Pyx_PyThreadState_assign
10310 
10311  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":994
10312  * try:
10313  * _import_umath()
10314  * except Exception: # <<<<<<<<<<<<<<
10315  * raise ImportError("numpy.core.umath failed to import")
10316  *
10317  */
10318  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
10319  if (__pyx_t_4) {
10320  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
10321  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 994, __pyx_L5_except_error)
10322  __Pyx_GOTREF(__pyx_t_5);
10323  __Pyx_GOTREF(__pyx_t_6);
10324  __Pyx_GOTREF(__pyx_t_7);
10325 
10326  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":995
10327  * _import_umath()
10328  * except Exception:
10329  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
10330  *
10331  * cdef inline int import_ufunc() except -1:
10332  */
10333  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 995, __pyx_L5_except_error)
10334  __Pyx_GOTREF(__pyx_t_8);
10335  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
10336  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10337  __PYX_ERR(1, 995, __pyx_L5_except_error)
10338  }
10339  goto __pyx_L5_except_error;
10340  __pyx_L5_except_error:;
10341 
10342  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
10343  *
10344  * cdef inline int import_umath() except -1:
10345  * try: # <<<<<<<<<<<<<<
10346  * _import_umath()
10347  * except Exception:
10348  */
10349  __Pyx_PyThreadState_assign
10350  __Pyx_XGIVEREF(__pyx_t_1);
10351  __Pyx_XGIVEREF(__pyx_t_2);
10352  __Pyx_XGIVEREF(__pyx_t_3);
10353  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10354  goto __pyx_L1_error;
10355  __pyx_L10_try_end:;
10356  }
10357 
10358  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":991
10359  * raise ImportError("numpy.core.multiarray failed to import")
10360  *
10361  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
10362  * try:
10363  * _import_umath()
10364  */
10365 
10366  /* function exit code */
10367  __pyx_r = 0;
10368  goto __pyx_L0;
10369  __pyx_L1_error:;
10370  __Pyx_XDECREF(__pyx_t_5);
10371  __Pyx_XDECREF(__pyx_t_6);
10372  __Pyx_XDECREF(__pyx_t_7);
10373  __Pyx_XDECREF(__pyx_t_8);
10374  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
10375  __pyx_r = -1;
10376  __pyx_L0:;
10377  __Pyx_RefNannyFinishContext();
10378  return __pyx_r;
10379 }
10380 
10381 /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
10382  * raise ImportError("numpy.core.umath failed to import")
10383  *
10384  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
10385  * try:
10386  * _import_umath()
10387  */
10388 
10389 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
10390  int __pyx_r;
10391  __Pyx_RefNannyDeclarations
10392  PyObject *__pyx_t_1 = NULL;
10393  PyObject *__pyx_t_2 = NULL;
10394  PyObject *__pyx_t_3 = NULL;
10395  int __pyx_t_4;
10396  PyObject *__pyx_t_5 = NULL;
10397  PyObject *__pyx_t_6 = NULL;
10398  PyObject *__pyx_t_7 = NULL;
10399  PyObject *__pyx_t_8 = NULL;
10400  __Pyx_RefNannySetupContext("import_ufunc", 0);
10401 
10402  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
10403  *
10404  * cdef inline int import_ufunc() except -1:
10405  * try: # <<<<<<<<<<<<<<
10406  * _import_umath()
10407  * except Exception:
10408  */
10409  {
10410  __Pyx_PyThreadState_declare
10411  __Pyx_PyThreadState_assign
10412  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10413  __Pyx_XGOTREF(__pyx_t_1);
10414  __Pyx_XGOTREF(__pyx_t_2);
10415  __Pyx_XGOTREF(__pyx_t_3);
10416  /*try:*/ {
10417 
10418  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":999
10419  * cdef inline int import_ufunc() except -1:
10420  * try:
10421  * _import_umath() # <<<<<<<<<<<<<<
10422  * except Exception:
10423  * raise ImportError("numpy.core.umath failed to import")
10424  */
10425  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 999, __pyx_L3_error)
10426 
10427  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
10428  *
10429  * cdef inline int import_ufunc() except -1:
10430  * try: # <<<<<<<<<<<<<<
10431  * _import_umath()
10432  * except Exception:
10433  */
10434  }
10435  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10436  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10437  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10438  goto __pyx_L10_try_end;
10439  __pyx_L3_error:;
10440  __Pyx_PyThreadState_assign
10441 
10442  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1000
10443  * try:
10444  * _import_umath()
10445  * except Exception: # <<<<<<<<<<<<<<
10446  * raise ImportError("numpy.core.umath failed to import")
10447  */
10448  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
10449  if (__pyx_t_4) {
10450  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
10451  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1000, __pyx_L5_except_error)
10452  __Pyx_GOTREF(__pyx_t_5);
10453  __Pyx_GOTREF(__pyx_t_6);
10454  __Pyx_GOTREF(__pyx_t_7);
10455 
10456  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1001
10457  * _import_umath()
10458  * except Exception:
10459  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
10460  */
10461  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1001, __pyx_L5_except_error)
10462  __Pyx_GOTREF(__pyx_t_8);
10463  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
10464  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10465  __PYX_ERR(1, 1001, __pyx_L5_except_error)
10466  }
10467  goto __pyx_L5_except_error;
10468  __pyx_L5_except_error:;
10469 
10470  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
10471  *
10472  * cdef inline int import_ufunc() except -1:
10473  * try: # <<<<<<<<<<<<<<
10474  * _import_umath()
10475  * except Exception:
10476  */
10477  __Pyx_PyThreadState_assign
10478  __Pyx_XGIVEREF(__pyx_t_1);
10479  __Pyx_XGIVEREF(__pyx_t_2);
10480  __Pyx_XGIVEREF(__pyx_t_3);
10481  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10482  goto __pyx_L1_error;
10483  __pyx_L10_try_end:;
10484  }
10485 
10486  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
10487  * raise ImportError("numpy.core.umath failed to import")
10488  *
10489  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
10490  * try:
10491  * _import_umath()
10492  */
10493 
10494  /* function exit code */
10495  __pyx_r = 0;
10496  goto __pyx_L0;
10497  __pyx_L1_error:;
10498  __Pyx_XDECREF(__pyx_t_5);
10499  __Pyx_XDECREF(__pyx_t_6);
10500  __Pyx_XDECREF(__pyx_t_7);
10501  __Pyx_XDECREF(__pyx_t_8);
10502  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
10503  __pyx_r = -1;
10504  __pyx_L0:;
10505  __Pyx_RefNannyFinishContext();
10506  return __pyx_r;
10507 }
10508 
10509 /* "FromPyStructUtility":11
10510  *
10511  * @cname("__pyx_convert__from_py_amns_c_reactant_type")
10512  * cdef amns_c_reactant_type __pyx_convert__from_py_amns_c_reactant_type(obj) except *: # <<<<<<<<<<<<<<
10513  * cdef amns_c_reactant_type result
10514  * if not PyMapping_Check(obj):
10515  */
10516 
10517 static amns_c_reactant_type __pyx_convert__from_py_amns_c_reactant_type(PyObject *__pyx_v_obj) {
10518  amns_c_reactant_type __pyx_v_result;
10519  PyObject *__pyx_v_value = NULL;
10520  amns_c_reactant_type __pyx_r;
10521  __Pyx_RefNannyDeclarations
10522  int __pyx_t_1;
10523  PyObject *__pyx_t_2 = NULL;
10524  PyObject *__pyx_t_3 = NULL;
10525  PyObject *__pyx_t_4 = NULL;
10526  PyObject *__pyx_t_5 = NULL;
10527  int __pyx_t_6;
10528  PyObject *__pyx_t_7 = NULL;
10529  PyObject *__pyx_t_8 = NULL;
10530  PyObject *__pyx_t_9 = NULL;
10531  double __pyx_t_10;
10532  __Pyx_RefNannySetupContext("__pyx_convert__from_py_amns_c_reactant_type", 0);
10533 
10534  /* "FromPyStructUtility":13
10535  * cdef amns_c_reactant_type __pyx_convert__from_py_amns_c_reactant_type(obj) except *:
10536  * cdef amns_c_reactant_type result
10537  * if not PyMapping_Check(obj): # <<<<<<<<<<<<<<
10538  * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
10539  *
10540  */
10541  __pyx_t_1 = ((!(PyMapping_Check(__pyx_v_obj) != 0)) != 0);
10542  if (__pyx_t_1) {
10543 
10544  /* "FromPyStructUtility":14
10545  * cdef amns_c_reactant_type result
10546  * if not PyMapping_Check(obj):
10547  * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) # <<<<<<<<<<<<<<
10548  *
10549  * try:
10550  */
10551  __pyx_t_2 = PyErr_Format(__pyx_builtin_TypeError, ((char const *)"Expected %.16s, got %.200s"), ((char *)"a mapping"), Py_TYPE(__pyx_v_obj)->tp_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 14, __pyx_L1_error)
10552  __Pyx_GOTREF(__pyx_t_2);
10553  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10554 
10555  /* "FromPyStructUtility":13
10556  * cdef amns_c_reactant_type __pyx_convert__from_py_amns_c_reactant_type(obj) except *:
10557  * cdef amns_c_reactant_type result
10558  * if not PyMapping_Check(obj): # <<<<<<<<<<<<<<
10559  * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
10560  *
10561  */
10562  }
10563 
10564  /* "FromPyStructUtility":16
10565  * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
10566  *
10567  * try: # <<<<<<<<<<<<<<
10568  * value = obj['ZN']
10569  * except KeyError:
10570  */
10571  {
10572  __Pyx_PyThreadState_declare
10573  __Pyx_PyThreadState_assign
10574  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
10575  __Pyx_XGOTREF(__pyx_t_3);
10576  __Pyx_XGOTREF(__pyx_t_4);
10577  __Pyx_XGOTREF(__pyx_t_5);
10578  /*try:*/ {
10579 
10580  /* "FromPyStructUtility":17
10581  *
10582  * try:
10583  * value = obj['ZN'] # <<<<<<<<<<<<<<
10584  * except KeyError:
10585  * raise ValueError("No value specified for struct attribute 'ZN'")
10586  */
10587  __pyx_t_2 = PyObject_GetItem(__pyx_v_obj, __pyx_n_s_ZN); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L4_error)
10588  __Pyx_GOTREF(__pyx_t_2);
10589  __pyx_v_value = __pyx_t_2;
10590  __pyx_t_2 = 0;
10591 
10592  /* "FromPyStructUtility":16
10593  * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
10594  *
10595  * try: # <<<<<<<<<<<<<<
10596  * value = obj['ZN']
10597  * except KeyError:
10598  */
10599  }
10600  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10601  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10602  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10603  goto __pyx_L11_try_end;
10604  __pyx_L4_error:;
10605  __Pyx_PyThreadState_assign
10606  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10607 
10608  /* "FromPyStructUtility":18
10609  * try:
10610  * value = obj['ZN']
10611  * except KeyError: # <<<<<<<<<<<<<<
10612  * raise ValueError("No value specified for struct attribute 'ZN'")
10613  * result.ZN = value
10614  */
10615  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
10616  if (__pyx_t_6) {
10617  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_amns_c_reactant_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
10618  if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(2, 18, __pyx_L6_except_error)
10619  __Pyx_GOTREF(__pyx_t_2);
10620  __Pyx_GOTREF(__pyx_t_7);
10621  __Pyx_GOTREF(__pyx_t_8);
10622 
10623  /* "FromPyStructUtility":19
10624  * value = obj['ZN']
10625  * except KeyError:
10626  * raise ValueError("No value specified for struct attribute 'ZN'") # <<<<<<<<<<<<<<
10627  * result.ZN = value
10628  * try:
10629  */
10630  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 19, __pyx_L6_except_error)
10631  __Pyx_GOTREF(__pyx_t_9);
10632  __Pyx_Raise(__pyx_t_9, 0, 0, 0);
10633  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10634  __PYX_ERR(2, 19, __pyx_L6_except_error)
10635  }
10636  goto __pyx_L6_except_error;
10637  __pyx_L6_except_error:;
10638 
10639  /* "FromPyStructUtility":16
10640  * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
10641  *
10642  * try: # <<<<<<<<<<<<<<
10643  * value = obj['ZN']
10644  * except KeyError:
10645  */
10646  __Pyx_PyThreadState_assign
10647  __Pyx_XGIVEREF(__pyx_t_3);
10648  __Pyx_XGIVEREF(__pyx_t_4);
10649  __Pyx_XGIVEREF(__pyx_t_5);
10650  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
10651  goto __pyx_L1_error;
10652  __pyx_L11_try_end:;
10653  }
10654 
10655  /* "FromPyStructUtility":20
10656  * except KeyError:
10657  * raise ValueError("No value specified for struct attribute 'ZN'")
10658  * result.ZN = value # <<<<<<<<<<<<<<
10659  * try:
10660  * value = obj['ZA']
10661  */
10662  __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 20, __pyx_L1_error)
10663  __pyx_v_result.ZN = __pyx_t_10;
10664 
10665  /* "FromPyStructUtility":21
10666  * raise ValueError("No value specified for struct attribute 'ZN'")
10667  * result.ZN = value
10668  * try: # <<<<<<<<<<<<<<
10669  * value = obj['ZA']
10670  * except KeyError:
10671  */
10672  {
10673  __Pyx_PyThreadState_declare
10674  __Pyx_PyThreadState_assign
10675  __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
10676  __Pyx_XGOTREF(__pyx_t_5);
10677  __Pyx_XGOTREF(__pyx_t_4);
10678  __Pyx_XGOTREF(__pyx_t_3);
10679  /*try:*/ {
10680 
10681  /* "FromPyStructUtility":22
10682  * result.ZN = value
10683  * try:
10684  * value = obj['ZA'] # <<<<<<<<<<<<<<
10685  * except KeyError:
10686  * raise ValueError("No value specified for struct attribute 'ZA'")
10687  */
10688  __pyx_t_8 = PyObject_GetItem(__pyx_v_obj, __pyx_n_s_ZA); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 22, __pyx_L14_error)
10689  __Pyx_GOTREF(__pyx_t_8);
10690  __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
10691  __pyx_t_8 = 0;
10692 
10693  /* "FromPyStructUtility":21
10694  * raise ValueError("No value specified for struct attribute 'ZN'")
10695  * result.ZN = value
10696  * try: # <<<<<<<<<<<<<<
10697  * value = obj['ZA']
10698  * except KeyError:
10699  */
10700  }
10701  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10702  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10703  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10704  goto __pyx_L21_try_end;
10705  __pyx_L14_error:;
10706  __Pyx_PyThreadState_assign
10707  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
10708  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10709  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10710  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
10711 
10712  /* "FromPyStructUtility":23
10713  * try:
10714  * value = obj['ZA']
10715  * except KeyError: # <<<<<<<<<<<<<<
10716  * raise ValueError("No value specified for struct attribute 'ZA'")
10717  * result.ZA = value
10718  */
10719  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
10720  if (__pyx_t_6) {
10721  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_amns_c_reactant_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
10722  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(2, 23, __pyx_L16_except_error)
10723  __Pyx_GOTREF(__pyx_t_8);
10724  __Pyx_GOTREF(__pyx_t_7);
10725  __Pyx_GOTREF(__pyx_t_2);
10726 
10727  /* "FromPyStructUtility":24
10728  * value = obj['ZA']
10729  * except KeyError:
10730  * raise ValueError("No value specified for struct attribute 'ZA'") # <<<<<<<<<<<<<<
10731  * result.ZA = value
10732  * try:
10733  */
10734  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 24, __pyx_L16_except_error)
10735  __Pyx_GOTREF(__pyx_t_9);
10736  __Pyx_Raise(__pyx_t_9, 0, 0, 0);
10737  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10738  __PYX_ERR(2, 24, __pyx_L16_except_error)
10739  }
10740  goto __pyx_L16_except_error;
10741  __pyx_L16_except_error:;
10742 
10743  /* "FromPyStructUtility":21
10744  * raise ValueError("No value specified for struct attribute 'ZN'")
10745  * result.ZN = value
10746  * try: # <<<<<<<<<<<<<<
10747  * value = obj['ZA']
10748  * except KeyError:
10749  */
10750  __Pyx_PyThreadState_assign
10751  __Pyx_XGIVEREF(__pyx_t_5);
10752  __Pyx_XGIVEREF(__pyx_t_4);
10753  __Pyx_XGIVEREF(__pyx_t_3);
10754  __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
10755  goto __pyx_L1_error;
10756  __pyx_L21_try_end:;
10757  }
10758 
10759  /* "FromPyStructUtility":25
10760  * except KeyError:
10761  * raise ValueError("No value specified for struct attribute 'ZA'")
10762  * result.ZA = value # <<<<<<<<<<<<<<
10763  * try:
10764  * value = obj['MI']
10765  */
10766  __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 25, __pyx_L1_error)
10767  __pyx_v_result.ZA = __pyx_t_10;
10768 
10769  /* "FromPyStructUtility":26
10770  * raise ValueError("No value specified for struct attribute 'ZA'")
10771  * result.ZA = value
10772  * try: # <<<<<<<<<<<<<<
10773  * value = obj['MI']
10774  * except KeyError:
10775  */
10776  {
10777  __Pyx_PyThreadState_declare
10778  __Pyx_PyThreadState_assign
10779  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
10780  __Pyx_XGOTREF(__pyx_t_3);
10781  __Pyx_XGOTREF(__pyx_t_4);
10782  __Pyx_XGOTREF(__pyx_t_5);
10783  /*try:*/ {
10784 
10785  /* "FromPyStructUtility":27
10786  * result.ZA = value
10787  * try:
10788  * value = obj['MI'] # <<<<<<<<<<<<<<
10789  * except KeyError:
10790  * raise ValueError("No value specified for struct attribute 'MI'")
10791  */
10792  __pyx_t_2 = PyObject_GetItem(__pyx_v_obj, __pyx_n_s_MI); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 27, __pyx_L24_error)
10793  __Pyx_GOTREF(__pyx_t_2);
10794  __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
10795  __pyx_t_2 = 0;
10796 
10797  /* "FromPyStructUtility":26
10798  * raise ValueError("No value specified for struct attribute 'ZA'")
10799  * result.ZA = value
10800  * try: # <<<<<<<<<<<<<<
10801  * value = obj['MI']
10802  * except KeyError:
10803  */
10804  }
10805  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10806  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10807  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10808  goto __pyx_L31_try_end;
10809  __pyx_L24_error:;
10810  __Pyx_PyThreadState_assign
10811  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
10812  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
10813  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10814  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10815 
10816  /* "FromPyStructUtility":28
10817  * try:
10818  * value = obj['MI']
10819  * except KeyError: # <<<<<<<<<<<<<<
10820  * raise ValueError("No value specified for struct attribute 'MI'")
10821  * result.MI = value
10822  */
10823  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
10824  if (__pyx_t_6) {
10825  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_amns_c_reactant_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
10826  if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(2, 28, __pyx_L26_except_error)
10827  __Pyx_GOTREF(__pyx_t_2);
10828  __Pyx_GOTREF(__pyx_t_7);
10829  __Pyx_GOTREF(__pyx_t_8);
10830 
10831  /* "FromPyStructUtility":29
10832  * value = obj['MI']
10833  * except KeyError:
10834  * raise ValueError("No value specified for struct attribute 'MI'") # <<<<<<<<<<<<<<
10835  * result.MI = value
10836  * try:
10837  */
10838  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 29, __pyx_L26_except_error)
10839  __Pyx_GOTREF(__pyx_t_9);
10840  __Pyx_Raise(__pyx_t_9, 0, 0, 0);
10841  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10842  __PYX_ERR(2, 29, __pyx_L26_except_error)
10843  }
10844  goto __pyx_L26_except_error;
10845  __pyx_L26_except_error:;
10846 
10847  /* "FromPyStructUtility":26
10848  * raise ValueError("No value specified for struct attribute 'ZA'")
10849  * result.ZA = value
10850  * try: # <<<<<<<<<<<<<<
10851  * value = obj['MI']
10852  * except KeyError:
10853  */
10854  __Pyx_PyThreadState_assign
10855  __Pyx_XGIVEREF(__pyx_t_3);
10856  __Pyx_XGIVEREF(__pyx_t_4);
10857  __Pyx_XGIVEREF(__pyx_t_5);
10858  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
10859  goto __pyx_L1_error;
10860  __pyx_L31_try_end:;
10861  }
10862 
10863  /* "FromPyStructUtility":30
10864  * except KeyError:
10865  * raise ValueError("No value specified for struct attribute 'MI'")
10866  * result.MI = value # <<<<<<<<<<<<<<
10867  * try:
10868  * value = obj['LR']
10869  */
10870  __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 30, __pyx_L1_error)
10871  __pyx_v_result.MI = __pyx_t_10;
10872 
10873  /* "FromPyStructUtility":31
10874  * raise ValueError("No value specified for struct attribute 'MI'")
10875  * result.MI = value
10876  * try: # <<<<<<<<<<<<<<
10877  * value = obj['LR']
10878  * except KeyError:
10879  */
10880  {
10881  __Pyx_PyThreadState_declare
10882  __Pyx_PyThreadState_assign
10883  __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
10884  __Pyx_XGOTREF(__pyx_t_5);
10885  __Pyx_XGOTREF(__pyx_t_4);
10886  __Pyx_XGOTREF(__pyx_t_3);
10887  /*try:*/ {
10888 
10889  /* "FromPyStructUtility":32
10890  * result.MI = value
10891  * try:
10892  * value = obj['LR'] # <<<<<<<<<<<<<<
10893  * except KeyError:
10894  * raise ValueError("No value specified for struct attribute 'LR'")
10895  */
10896  __pyx_t_8 = PyObject_GetItem(__pyx_v_obj, __pyx_n_s_LR); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 32, __pyx_L34_error)
10897  __Pyx_GOTREF(__pyx_t_8);
10898  __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
10899  __pyx_t_8 = 0;
10900 
10901  /* "FromPyStructUtility":31
10902  * raise ValueError("No value specified for struct attribute 'MI'")
10903  * result.MI = value
10904  * try: # <<<<<<<<<<<<<<
10905  * value = obj['LR']
10906  * except KeyError:
10907  */
10908  }
10909  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10910  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10911  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10912  goto __pyx_L41_try_end;
10913  __pyx_L34_error:;
10914  __Pyx_PyThreadState_assign
10915  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
10916  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10917  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10918  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
10919 
10920  /* "FromPyStructUtility":33
10921  * try:
10922  * value = obj['LR']
10923  * except KeyError: # <<<<<<<<<<<<<<
10924  * raise ValueError("No value specified for struct attribute 'LR'")
10925  * result.LR = value
10926  */
10927  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
10928  if (__pyx_t_6) {
10929  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_amns_c_reactant_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
10930  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(2, 33, __pyx_L36_except_error)
10931  __Pyx_GOTREF(__pyx_t_8);
10932  __Pyx_GOTREF(__pyx_t_7);
10933  __Pyx_GOTREF(__pyx_t_2);
10934 
10935  /* "FromPyStructUtility":34
10936  * value = obj['LR']
10937  * except KeyError:
10938  * raise ValueError("No value specified for struct attribute 'LR'") # <<<<<<<<<<<<<<
10939  * result.LR = value
10940  * try:
10941  */
10942  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 34, __pyx_L36_except_error)
10943  __Pyx_GOTREF(__pyx_t_9);
10944  __Pyx_Raise(__pyx_t_9, 0, 0, 0);
10945  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10946  __PYX_ERR(2, 34, __pyx_L36_except_error)
10947  }
10948  goto __pyx_L36_except_error;
10949  __pyx_L36_except_error:;
10950 
10951  /* "FromPyStructUtility":31
10952  * raise ValueError("No value specified for struct attribute 'MI'")
10953  * result.MI = value
10954  * try: # <<<<<<<<<<<<<<
10955  * value = obj['LR']
10956  * except KeyError:
10957  */
10958  __Pyx_PyThreadState_assign
10959  __Pyx_XGIVEREF(__pyx_t_5);
10960  __Pyx_XGIVEREF(__pyx_t_4);
10961  __Pyx_XGIVEREF(__pyx_t_3);
10962  __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
10963  goto __pyx_L1_error;
10964  __pyx_L41_try_end:;
10965  }
10966 
10967  /* "FromPyStructUtility":35
10968  * except KeyError:
10969  * raise ValueError("No value specified for struct attribute 'LR'")
10970  * result.LR = value # <<<<<<<<<<<<<<
10971  * try:
10972  * value = obj['real_specifier']
10973  */
10974  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 35, __pyx_L1_error)
10975  __pyx_v_result.LR = __pyx_t_6;
10976 
10977  /* "FromPyStructUtility":36
10978  * raise ValueError("No value specified for struct attribute 'LR'")
10979  * result.LR = value
10980  * try: # <<<<<<<<<<<<<<
10981  * value = obj['real_specifier']
10982  * except KeyError:
10983  */
10984  {
10985  __Pyx_PyThreadState_declare
10986  __Pyx_PyThreadState_assign
10987  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
10988  __Pyx_XGOTREF(__pyx_t_3);
10989  __Pyx_XGOTREF(__pyx_t_4);
10990  __Pyx_XGOTREF(__pyx_t_5);
10991  /*try:*/ {
10992 
10993  /* "FromPyStructUtility":37
10994  * result.LR = value
10995  * try:
10996  * value = obj['real_specifier'] # <<<<<<<<<<<<<<
10997  * except KeyError:
10998  * raise ValueError("No value specified for struct attribute 'real_specifier'")
10999  */
11000  __pyx_t_2 = PyObject_GetItem(__pyx_v_obj, __pyx_n_s_real_specifier); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 37, __pyx_L44_error)
11001  __Pyx_GOTREF(__pyx_t_2);
11002  __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
11003  __pyx_t_2 = 0;
11004 
11005  /* "FromPyStructUtility":36
11006  * raise ValueError("No value specified for struct attribute 'LR'")
11007  * result.LR = value
11008  * try: # <<<<<<<<<<<<<<
11009  * value = obj['real_specifier']
11010  * except KeyError:
11011  */
11012  }
11013  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11014  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11015  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11016  goto __pyx_L51_try_end;
11017  __pyx_L44_error:;
11018  __Pyx_PyThreadState_assign
11019  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11020  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11021  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11022  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11023 
11024  /* "FromPyStructUtility":38
11025  * try:
11026  * value = obj['real_specifier']
11027  * except KeyError: # <<<<<<<<<<<<<<
11028  * raise ValueError("No value specified for struct attribute 'real_specifier'")
11029  * result.real_specifier = value
11030  */
11031  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
11032  if (__pyx_t_6) {
11033  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_amns_c_reactant_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
11034  if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(2, 38, __pyx_L46_except_error)
11035  __Pyx_GOTREF(__pyx_t_2);
11036  __Pyx_GOTREF(__pyx_t_7);
11037  __Pyx_GOTREF(__pyx_t_8);
11038 
11039  /* "FromPyStructUtility":39
11040  * value = obj['real_specifier']
11041  * except KeyError:
11042  * raise ValueError("No value specified for struct attribute 'real_specifier'") # <<<<<<<<<<<<<<
11043  * result.real_specifier = value
11044  * try:
11045  */
11046  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 39, __pyx_L46_except_error)
11047  __Pyx_GOTREF(__pyx_t_9);
11048  __Pyx_Raise(__pyx_t_9, 0, 0, 0);
11049  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11050  __PYX_ERR(2, 39, __pyx_L46_except_error)
11051  }
11052  goto __pyx_L46_except_error;
11053  __pyx_L46_except_error:;
11054 
11055  /* "FromPyStructUtility":36
11056  * raise ValueError("No value specified for struct attribute 'LR'")
11057  * result.LR = value
11058  * try: # <<<<<<<<<<<<<<
11059  * value = obj['real_specifier']
11060  * except KeyError:
11061  */
11062  __Pyx_PyThreadState_assign
11063  __Pyx_XGIVEREF(__pyx_t_3);
11064  __Pyx_XGIVEREF(__pyx_t_4);
11065  __Pyx_XGIVEREF(__pyx_t_5);
11066  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
11067  goto __pyx_L1_error;
11068  __pyx_L51_try_end:;
11069  }
11070 
11071  /* "FromPyStructUtility":40
11072  * except KeyError:
11073  * raise ValueError("No value specified for struct attribute 'real_specifier'")
11074  * result.real_specifier = value # <<<<<<<<<<<<<<
11075  * try:
11076  * value = obj['int_specifier']
11077  */
11078  __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 40, __pyx_L1_error)
11079  __pyx_v_result.real_specifier = __pyx_t_10;
11080 
11081  /* "FromPyStructUtility":41
11082  * raise ValueError("No value specified for struct attribute 'real_specifier'")
11083  * result.real_specifier = value
11084  * try: # <<<<<<<<<<<<<<
11085  * value = obj['int_specifier']
11086  * except KeyError:
11087  */
11088  {
11089  __Pyx_PyThreadState_declare
11090  __Pyx_PyThreadState_assign
11091  __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
11092  __Pyx_XGOTREF(__pyx_t_5);
11093  __Pyx_XGOTREF(__pyx_t_4);
11094  __Pyx_XGOTREF(__pyx_t_3);
11095  /*try:*/ {
11096 
11097  /* "FromPyStructUtility":42
11098  * result.real_specifier = value
11099  * try:
11100  * value = obj['int_specifier'] # <<<<<<<<<<<<<<
11101  * except KeyError:
11102  * raise ValueError("No value specified for struct attribute 'int_specifier'")
11103  */
11104  __pyx_t_8 = PyObject_GetItem(__pyx_v_obj, __pyx_n_s_int_specifier); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 42, __pyx_L54_error)
11105  __Pyx_GOTREF(__pyx_t_8);
11106  __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
11107  __pyx_t_8 = 0;
11108 
11109  /* "FromPyStructUtility":41
11110  * raise ValueError("No value specified for struct attribute 'real_specifier'")
11111  * result.real_specifier = value
11112  * try: # <<<<<<<<<<<<<<
11113  * value = obj['int_specifier']
11114  * except KeyError:
11115  */
11116  }
11117  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11118  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11119  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11120  goto __pyx_L61_try_end;
11121  __pyx_L54_error:;
11122  __Pyx_PyThreadState_assign
11123  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11124  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11125  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11126  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11127 
11128  /* "FromPyStructUtility":43
11129  * try:
11130  * value = obj['int_specifier']
11131  * except KeyError: # <<<<<<<<<<<<<<
11132  * raise ValueError("No value specified for struct attribute 'int_specifier'")
11133  * result.int_specifier = value
11134  */
11135  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
11136  if (__pyx_t_6) {
11137  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_amns_c_reactant_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
11138  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(2, 43, __pyx_L56_except_error)
11139  __Pyx_GOTREF(__pyx_t_8);
11140  __Pyx_GOTREF(__pyx_t_7);
11141  __Pyx_GOTREF(__pyx_t_2);
11142 
11143  /* "FromPyStructUtility":44
11144  * value = obj['int_specifier']
11145  * except KeyError:
11146  * raise ValueError("No value specified for struct attribute 'int_specifier'") # <<<<<<<<<<<<<<
11147  * result.int_specifier = value
11148  * return result
11149  */
11150  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 44, __pyx_L56_except_error)
11151  __Pyx_GOTREF(__pyx_t_9);
11152  __Pyx_Raise(__pyx_t_9, 0, 0, 0);
11153  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11154  __PYX_ERR(2, 44, __pyx_L56_except_error)
11155  }
11156  goto __pyx_L56_except_error;
11157  __pyx_L56_except_error:;
11158 
11159  /* "FromPyStructUtility":41
11160  * raise ValueError("No value specified for struct attribute 'real_specifier'")
11161  * result.real_specifier = value
11162  * try: # <<<<<<<<<<<<<<
11163  * value = obj['int_specifier']
11164  * except KeyError:
11165  */
11166  __Pyx_PyThreadState_assign
11167  __Pyx_XGIVEREF(__pyx_t_5);
11168  __Pyx_XGIVEREF(__pyx_t_4);
11169  __Pyx_XGIVEREF(__pyx_t_3);
11170  __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
11171  goto __pyx_L1_error;
11172  __pyx_L61_try_end:;
11173  }
11174 
11175  /* "FromPyStructUtility":45
11176  * except KeyError:
11177  * raise ValueError("No value specified for struct attribute 'int_specifier'")
11178  * result.int_specifier = value # <<<<<<<<<<<<<<
11179  * return result
11180  *
11181  */
11182  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 45, __pyx_L1_error)
11183  __pyx_v_result.int_specifier = __pyx_t_6;
11184 
11185  /* "FromPyStructUtility":46
11186  * raise ValueError("No value specified for struct attribute 'int_specifier'")
11187  * result.int_specifier = value
11188  * return result # <<<<<<<<<<<<<<
11189  *
11190  *
11191  */
11192  __pyx_r = __pyx_v_result;
11193  goto __pyx_L0;
11194 
11195  /* "FromPyStructUtility":11
11196  *
11197  * @cname("__pyx_convert__from_py_amns_c_reactant_type")
11198  * cdef amns_c_reactant_type __pyx_convert__from_py_amns_c_reactant_type(obj) except *: # <<<<<<<<<<<<<<
11199  * cdef amns_c_reactant_type result
11200  * if not PyMapping_Check(obj):
11201  */
11202 
11203  /* function exit code */
11204  __pyx_L1_error:;
11205  __Pyx_XDECREF(__pyx_t_2);
11206  __Pyx_XDECREF(__pyx_t_7);
11207  __Pyx_XDECREF(__pyx_t_8);
11208  __Pyx_XDECREF(__pyx_t_9);
11209  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_amns_c_reactant_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
11210  __pyx_L0:;
11211  __Pyx_XDECREF(__pyx_v_value);
11212  __Pyx_RefNannyFinishContext();
11213  return __pyx_r;
11214 }
11215 static struct __pyx_vtabstruct_4amns_Amns __pyx_vtable_4amns_Amns;
11216 
11217 static PyObject *__pyx_tp_new_4amns_Amns(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
11218  struct __pyx_obj_4amns_Amns *p;
11219  PyObject *o;
11220  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
11221  o = (*t->tp_alloc)(t, 0);
11222  } else {
11223  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
11224  }
11225  if (unlikely(!o)) return 0;
11226  p = ((struct __pyx_obj_4amns_Amns *)o);
11227  p->__pyx_vtab = __pyx_vtabptr_4amns_Amns;
11228  return o;
11229 }
11230 
11231 static void __pyx_tp_dealloc_4amns_Amns(PyObject *o) {
11232  #if PY_VERSION_HEX >= 0x030400a1
11233  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
11234  if (PyObject_CallFinalizerFromDealloc(o)) return;
11235  }
11236  #endif
11237  (*Py_TYPE(o)->tp_free)(o);
11238 }
11239 
11240 static PyObject *__pyx_getprop_4amns_4Amns_version(PyObject *o, CYTHON_UNUSED void *x) {
11241  return __pyx_pw_4amns_4Amns_7version_1__get__(o);
11242 }
11243 
11244 static PyMethodDef __pyx_methods_4amns_Amns[] = {
11245  {"_setup", (PyCFunction)__pyx_pw_4amns_4Amns_3_setup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4amns_4Amns_2_setup},
11246  {"query", (PyCFunction)__pyx_pw_4amns_4Amns_5query, METH_O, __pyx_doc_4amns_4Amns_4query},
11247  {"set", (PyCFunction)__pyx_pw_4amns_4Amns_7set, METH_O, __pyx_doc_4amns_4Amns_6set},
11248  {"finalize", (PyCFunction)__pyx_pw_4amns_4Amns_9finalize, METH_NOARGS, __pyx_doc_4amns_4Amns_8finalize},
11249  {"get_table", (PyCFunction)__pyx_pw_4amns_4Amns_11get_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4amns_4Amns_10get_table},
11250  {0, 0, 0, 0}
11251 };
11252 
11253 static struct PyGetSetDef __pyx_getsets_4amns_Amns[] = {
11254  {(char *)"version", __pyx_getprop_4amns_4Amns_version, 0, (char *)"Query for version of the AMNS data", 0},
11255  {0, 0, 0, 0, 0}
11256 };
11257 
11258 static PyTypeObject __pyx_type_4amns_Amns = {
11259  PyVarObject_HEAD_INIT(0, 0)
11260  "amns.Amns", /*tp_name*/
11261  sizeof(struct __pyx_obj_4amns_Amns), /*tp_basicsize*/
11262  0, /*tp_itemsize*/
11263  __pyx_tp_dealloc_4amns_Amns, /*tp_dealloc*/
11264  0, /*tp_print*/
11265  0, /*tp_getattr*/
11266  0, /*tp_setattr*/
11267  #if PY_MAJOR_VERSION < 3
11268  0, /*tp_compare*/
11269  #endif
11270  #if PY_MAJOR_VERSION >= 3
11271  0, /*tp_as_async*/
11272  #endif
11273  0, /*tp_repr*/
11274  0, /*tp_as_number*/
11275  0, /*tp_as_sequence*/
11276  0, /*tp_as_mapping*/
11277  0, /*tp_hash*/
11278  0, /*tp_call*/
11279  0, /*tp_str*/
11280  0, /*tp_getattro*/
11281  0, /*tp_setattro*/
11282  0, /*tp_as_buffer*/
11283  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
11284  0, /*tp_doc*/
11285  0, /*tp_traverse*/
11286  0, /*tp_clear*/
11287  0, /*tp_richcompare*/
11288  0, /*tp_weaklistoffset*/
11289  0, /*tp_iter*/
11290  0, /*tp_iternext*/
11291  __pyx_methods_4amns_Amns, /*tp_methods*/
11292  0, /*tp_members*/
11293  __pyx_getsets_4amns_Amns, /*tp_getset*/
11294  0, /*tp_base*/
11295  0, /*tp_dict*/
11296  0, /*tp_descr_get*/
11297  0, /*tp_descr_set*/
11298  0, /*tp_dictoffset*/
11299  __pyx_pw_4amns_4Amns_1__init__, /*tp_init*/
11300  0, /*tp_alloc*/
11301  __pyx_tp_new_4amns_Amns, /*tp_new*/
11302  0, /*tp_free*/
11303  0, /*tp_is_gc*/
11304  0, /*tp_bases*/
11305  0, /*tp_mro*/
11306  0, /*tp_cache*/
11307  0, /*tp_subclasses*/
11308  0, /*tp_weaklist*/
11309  0, /*tp_del*/
11310  0, /*tp_version_tag*/
11311  #if PY_VERSION_HEX >= 0x030400a1
11312  0, /*tp_finalize*/
11313  #endif
11314 };
11315 static struct __pyx_vtabstruct_4amns_Table __pyx_vtable_4amns_Table;
11316 
11317 static PyObject *__pyx_tp_new_4amns_Table(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
11318  struct __pyx_obj_4amns_Table *p;
11319  PyObject *o;
11320  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
11321  o = (*t->tp_alloc)(t, 0);
11322  } else {
11323  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
11324  }
11325  if (unlikely(!o)) return 0;
11326  p = ((struct __pyx_obj_4amns_Table *)o);
11327  p->__pyx_vtab = __pyx_vtabptr_4amns_Table;
11328  p->_parentAmns = ((struct __pyx_obj_4amns_Amns *)Py_None); Py_INCREF(Py_None);
11329  return o;
11330 }
11331 
11332 static void __pyx_tp_dealloc_4amns_Table(PyObject *o) {
11333  struct __pyx_obj_4amns_Table *p = (struct __pyx_obj_4amns_Table *)o;
11334  #if PY_VERSION_HEX >= 0x030400a1
11335  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
11336  if (PyObject_CallFinalizerFromDealloc(o)) return;
11337  }
11338  #endif
11339  PyObject_GC_UnTrack(o);
11340  Py_CLEAR(p->_parentAmns);
11341  (*Py_TYPE(o)->tp_free)(o);
11342 }
11343 
11344 static int __pyx_tp_traverse_4amns_Table(PyObject *o, visitproc v, void *a) {
11345  int e;
11346  struct __pyx_obj_4amns_Table *p = (struct __pyx_obj_4amns_Table *)o;
11347  if (p->_parentAmns) {
11348  e = (*v)(((PyObject*)p->_parentAmns), a); if (e) return e;
11349  }
11350  return 0;
11351 }
11352 
11353 static int __pyx_tp_clear_4amns_Table(PyObject *o) {
11354  PyObject* tmp;
11355  struct __pyx_obj_4amns_Table *p = (struct __pyx_obj_4amns_Table *)o;
11356  tmp = ((PyObject*)p->_parentAmns);
11357  p->_parentAmns = ((struct __pyx_obj_4amns_Amns *)Py_None); Py_INCREF(Py_None);
11358  Py_XDECREF(tmp);
11359  return 0;
11360 }
11361 
11362 static PyObject *__pyx_getprop_4amns_5Table_no_of_reactants(PyObject *o, CYTHON_UNUSED void *x) {
11363  return __pyx_pw_4amns_5Table_15no_of_reactants_1__get__(o);
11364 }
11365 
11366 static PyObject *__pyx_getprop_4amns_5Table_ndim(PyObject *o, CYTHON_UNUSED void *x) {
11367  return __pyx_pw_4amns_5Table_4ndim_1__get__(o);
11368 }
11369 
11370 static PyObject *__pyx_getprop_4amns_5Table_source(PyObject *o, CYTHON_UNUSED void *x) {
11371  return __pyx_pw_4amns_5Table_6source_1__get__(o);
11372 }
11373 
11374 static PyObject *__pyx_getprop_4amns_5Table_filled(PyObject *o, CYTHON_UNUSED void *x) {
11375  return __pyx_pw_4amns_5Table_6filled_1__get__(o);
11376 }
11377 
11378 static PyObject *__pyx_getprop_4amns_5Table_reaction_type(PyObject *o, CYTHON_UNUSED void *x) {
11379  return __pyx_pw_4amns_5Table_13reaction_type_1__get__(o);
11380 }
11381 
11382 static PyObject *__pyx_getprop_4amns_5Table_reactants(PyObject *o, CYTHON_UNUSED void *x) {
11383  return __pyx_pw_4amns_5Table_9reactants_1__get__(o);
11384 }
11385 
11386 static PyObject *__pyx_getprop_4amns_5Table_version(PyObject *o, CYTHON_UNUSED void *x) {
11387  return __pyx_pw_4amns_5Table_7version_1__get__(o);
11388 }
11389 
11390 static PyObject *__pyx_getprop_4amns_5Table_state_label(PyObject *o, CYTHON_UNUSED void *x) {
11391  return __pyx_pw_4amns_5Table_11state_label_1__get__(o);
11392 }
11393 
11394 static PyObject *__pyx_getprop_4amns_5Table_result_unit(PyObject *o, CYTHON_UNUSED void *x) {
11395  return __pyx_pw_4amns_5Table_11result_unit_1__get__(o);
11396 }
11397 
11398 static PyObject *__pyx_getprop_4amns_5Table_result_label(PyObject *o, CYTHON_UNUSED void *x) {
11399  return __pyx_pw_4amns_5Table_12result_label_1__get__(o);
11400 }
11401 
11402 static PyObject *__pyx_getprop_4amns_5Table_interp_fun(PyObject *o, CYTHON_UNUSED void *x) {
11403  return __pyx_pw_4amns_5Table_10interp_fun_1__get__(o);
11404 }
11405 
11406 static PyMethodDef __pyx_methods_4amns_Table[] = {
11407  {"query", (PyCFunction)__pyx_pw_4amns_5Table_3query, METH_O, __pyx_doc_4amns_5Table_2query},
11408  {"set", (PyCFunction)__pyx_pw_4amns_5Table_5set, METH_O, __pyx_doc_4amns_5Table_4set},
11409  {"finalize", (PyCFunction)__pyx_pw_4amns_5Table_7finalize, METH_NOARGS, __pyx_doc_4amns_5Table_6finalize},
11410  {"data", (PyCFunction)__pyx_pw_4amns_5Table_9data, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4amns_5Table_8data},
11411  {"_data_1d", (PyCFunction)__pyx_pw_4amns_5Table_11_data_1d, METH_VARARGS|METH_KEYWORDS, 0},
11412  {"_data_2d", (PyCFunction)__pyx_pw_4amns_5Table_13_data_2d, METH_VARARGS|METH_KEYWORDS, 0},
11413  {"_data_3d", (PyCFunction)__pyx_pw_4amns_5Table_15_data_3d, METH_VARARGS|METH_KEYWORDS, 0},
11414  {0, 0, 0, 0}
11415 };
11416 
11417 static struct PyGetSetDef __pyx_getsets_4amns_Table[] = {
11418  {(char *)"no_of_reactants", __pyx_getprop_4amns_5Table_no_of_reactants, 0, (char *)"Query for no_of_reactants associated with the AMNS table", 0},
11419  {(char *)"ndim", __pyx_getprop_4amns_5Table_ndim, 0, (char *)"Query for ndim associated with the AMNS table", 0},
11420  {(char *)"source", __pyx_getprop_4amns_5Table_source, 0, (char *)"Query for source associated with the AMNS table", 0},
11421  {(char *)"filled", __pyx_getprop_4amns_5Table_filled, 0, (char *)"Query for filled status associated with the AMNS table", 0},
11422  {(char *)"reaction_type", __pyx_getprop_4amns_5Table_reaction_type, 0, (char *)"Query for reaction_type associated with the AMNS table", 0},
11423  {(char *)"reactants", __pyx_getprop_4amns_5Table_reactants, 0, (char *)"Query for reactants associated with the AMNS table", 0},
11424  {(char *)"version", __pyx_getprop_4amns_5Table_version, 0, (char *)"Query for version associated with the AMNS table", 0},
11425  {(char *)"state_label", __pyx_getprop_4amns_5Table_state_label, 0, (char *)"Query for state_label associated with the AMNS table", 0},
11426  {(char *)"result_unit", __pyx_getprop_4amns_5Table_result_unit, 0, (char *)"Query for result_unit associated with the AMNS table", 0},
11427  {(char *)"result_label", __pyx_getprop_4amns_5Table_result_label, 0, (char *)"Query for result_label associated with the AMNS table", 0},
11428  {(char *)"interp_fun", __pyx_getprop_4amns_5Table_interp_fun, 0, (char *)"Query for interp_fun associated with the AMNS table", 0},
11429  {0, 0, 0, 0, 0}
11430 };
11431 
11432 static PyTypeObject __pyx_type_4amns_Table = {
11433  PyVarObject_HEAD_INIT(0, 0)
11434  "amns.Table", /*tp_name*/
11435  sizeof(struct __pyx_obj_4amns_Table), /*tp_basicsize*/
11436  0, /*tp_itemsize*/
11437  __pyx_tp_dealloc_4amns_Table, /*tp_dealloc*/
11438  0, /*tp_print*/
11439  0, /*tp_getattr*/
11440  0, /*tp_setattr*/
11441  #if PY_MAJOR_VERSION < 3
11442  0, /*tp_compare*/
11443  #endif
11444  #if PY_MAJOR_VERSION >= 3
11445  0, /*tp_as_async*/
11446  #endif
11447  0, /*tp_repr*/
11448  0, /*tp_as_number*/
11449  0, /*tp_as_sequence*/
11450  0, /*tp_as_mapping*/
11451  0, /*tp_hash*/
11452  0, /*tp_call*/
11453  0, /*tp_str*/
11454  0, /*tp_getattro*/
11455  0, /*tp_setattro*/
11456  0, /*tp_as_buffer*/
11457  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
11458  0, /*tp_doc*/
11459  __pyx_tp_traverse_4amns_Table, /*tp_traverse*/
11460  __pyx_tp_clear_4amns_Table, /*tp_clear*/
11461  0, /*tp_richcompare*/
11462  0, /*tp_weaklistoffset*/
11463  0, /*tp_iter*/
11464  0, /*tp_iternext*/
11465  __pyx_methods_4amns_Table, /*tp_methods*/
11466  0, /*tp_members*/
11467  __pyx_getsets_4amns_Table, /*tp_getset*/
11468  0, /*tp_base*/
11469  0, /*tp_dict*/
11470  0, /*tp_descr_get*/
11471  0, /*tp_descr_set*/
11472  0, /*tp_dictoffset*/
11473  __pyx_pw_4amns_5Table_1__init__, /*tp_init*/
11474  0, /*tp_alloc*/
11475  __pyx_tp_new_4amns_Table, /*tp_new*/
11476  0, /*tp_free*/
11477  0, /*tp_is_gc*/
11478  0, /*tp_bases*/
11479  0, /*tp_mro*/
11480  0, /*tp_cache*/
11481  0, /*tp_subclasses*/
11482  0, /*tp_weaklist*/
11483  0, /*tp_del*/
11484  0, /*tp_version_tag*/
11485  #if PY_VERSION_HEX >= 0x030400a1
11486  0, /*tp_finalize*/
11487  #endif
11488 };
11489 static struct __pyx_vtabstruct_4amns_Reactants __pyx_vtable_4amns_Reactants;
11490 
11491 static PyObject *__pyx_tp_new_4amns_Reactants(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
11492  struct __pyx_obj_4amns_Reactants *p;
11493  PyObject *o;
11494  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
11495  o = (*t->tp_alloc)(t, 0);
11496  } else {
11497  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
11498  }
11499  if (unlikely(!o)) return 0;
11500  p = ((struct __pyx_obj_4amns_Reactants *)o);
11501  p->__pyx_vtab = __pyx_vtabptr_4amns_Reactants;
11502  p->_reactants = Py_None; Py_INCREF(Py_None);
11503  if (unlikely(__pyx_pw_4amns_9Reactants_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
11504  return o;
11505  bad:
11506  Py_DECREF(o); o = 0;
11507  return NULL;
11508 }
11509 
11510 static void __pyx_tp_dealloc_4amns_Reactants(PyObject *o) {
11511  struct __pyx_obj_4amns_Reactants *p = (struct __pyx_obj_4amns_Reactants *)o;
11512  #if PY_VERSION_HEX >= 0x030400a1
11513  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
11514  if (PyObject_CallFinalizerFromDealloc(o)) return;
11515  }
11516  #endif
11517  PyObject_GC_UnTrack(o);
11518  Py_CLEAR(p->_reactants);
11519  (*Py_TYPE(o)->tp_free)(o);
11520 }
11521 
11522 static int __pyx_tp_traverse_4amns_Reactants(PyObject *o, visitproc v, void *a) {
11523  int e;
11524  struct __pyx_obj_4amns_Reactants *p = (struct __pyx_obj_4amns_Reactants *)o;
11525  if (p->_reactants) {
11526  e = (*v)(p->_reactants, a); if (e) return e;
11527  }
11528  return 0;
11529 }
11530 
11531 static int __pyx_tp_clear_4amns_Reactants(PyObject *o) {
11532  PyObject* tmp;
11533  struct __pyx_obj_4amns_Reactants *p = (struct __pyx_obj_4amns_Reactants *)o;
11534  tmp = ((PyObject*)p->_reactants);
11535  p->_reactants = Py_None; Py_INCREF(Py_None);
11536  Py_XDECREF(tmp);
11537  return 0;
11538 }
11539 
11540 static PyMethodDef __pyx_methods_4amns_Reactants[] = {
11541  {"_invalidate_handle", (PyCFunction)__pyx_pw_4amns_9Reactants_5_invalidate_handle, METH_NOARGS, 0},
11542  {"add", (PyCFunction)__pyx_pw_4amns_9Reactants_7add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4amns_9Reactants_6add},
11543  {"test", (PyCFunction)__pyx_pw_4amns_9Reactants_13test, METH_NOARGS, 0},
11544  {"value", (PyCFunction)__pyx_pw_4amns_9Reactants_15value, METH_NOARGS, __pyx_doc_4amns_9Reactants_14value},
11545  {0, 0, 0, 0}
11546 };
11547 
11548 static PySequenceMethods __pyx_tp_as_sequence_Reactants = {
11549  __pyx_pw_4amns_9Reactants_9__len__, /*sq_length*/
11550  0, /*sq_concat*/
11551  0, /*sq_repeat*/
11552  0, /*sq_item*/
11553  0, /*sq_slice*/
11554  0, /*sq_ass_item*/
11555  0, /*sq_ass_slice*/
11556  0, /*sq_contains*/
11557  0, /*sq_inplace_concat*/
11558  0, /*sq_inplace_repeat*/
11559 };
11560 
11561 static PyMappingMethods __pyx_tp_as_mapping_Reactants = {
11562  __pyx_pw_4amns_9Reactants_9__len__, /*mp_length*/
11563  0, /*mp_subscript*/
11564  0, /*mp_ass_subscript*/
11565 };
11566 
11567 static PyTypeObject __pyx_type_4amns_Reactants = {
11568  PyVarObject_HEAD_INIT(0, 0)
11569  "amns.Reactants", /*tp_name*/
11570  sizeof(struct __pyx_obj_4amns_Reactants), /*tp_basicsize*/
11571  0, /*tp_itemsize*/
11572  __pyx_tp_dealloc_4amns_Reactants, /*tp_dealloc*/
11573  0, /*tp_print*/
11574  0, /*tp_getattr*/
11575  0, /*tp_setattr*/
11576  #if PY_MAJOR_VERSION < 3
11577  0, /*tp_compare*/
11578  #endif
11579  #if PY_MAJOR_VERSION >= 3
11580  0, /*tp_as_async*/
11581  #endif
11582  0, /*tp_repr*/
11583  0, /*tp_as_number*/
11584  &__pyx_tp_as_sequence_Reactants, /*tp_as_sequence*/
11585  &__pyx_tp_as_mapping_Reactants, /*tp_as_mapping*/
11586  0, /*tp_hash*/
11587  0, /*tp_call*/
11588  __pyx_pw_4amns_9Reactants_11__str__, /*tp_str*/
11589  0, /*tp_getattro*/
11590  0, /*tp_setattro*/
11591  0, /*tp_as_buffer*/
11592  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
11593  0, /*tp_doc*/
11594  __pyx_tp_traverse_4amns_Reactants, /*tp_traverse*/
11595  __pyx_tp_clear_4amns_Reactants, /*tp_clear*/
11596  0, /*tp_richcompare*/
11597  0, /*tp_weaklistoffset*/
11598  0, /*tp_iter*/
11599  0, /*tp_iternext*/
11600  __pyx_methods_4amns_Reactants, /*tp_methods*/
11601  0, /*tp_members*/
11602  0, /*tp_getset*/
11603  0, /*tp_base*/
11604  0, /*tp_dict*/
11605  0, /*tp_descr_get*/
11606  0, /*tp_descr_set*/
11607  0, /*tp_dictoffset*/
11608  __pyx_pw_4amns_9Reactants_3__init__, /*tp_init*/
11609  0, /*tp_alloc*/
11610  __pyx_tp_new_4amns_Reactants, /*tp_new*/
11611  0, /*tp_free*/
11612  0, /*tp_is_gc*/
11613  0, /*tp_bases*/
11614  0, /*tp_mro*/
11615  0, /*tp_cache*/
11616  0, /*tp_subclasses*/
11617  0, /*tp_weaklist*/
11618  0, /*tp_del*/
11619  0, /*tp_version_tag*/
11620  #if PY_VERSION_HEX >= 0x030400a1
11621  0, /*tp_finalize*/
11622  #endif
11623 };
11624 
11625 static PyMethodDef __pyx_methods[] = {
11626  {0, 0, 0, 0}
11627 };
11628 
11629 #if PY_MAJOR_VERSION >= 3
11630 static struct PyModuleDef __pyx_moduledef = {
11631  #if PY_VERSION_HEX < 0x03020000
11632  { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
11633  #else
11634  PyModuleDef_HEAD_INIT,
11635  #endif
11636  "amns",
11637  0, /* m_doc */
11638  -1, /* m_size */
11639  __pyx_methods /* m_methods */,
11640  NULL, /* m_reload */
11641  NULL, /* m_traverse */
11642  NULL, /* m_clear */
11643  NULL /* m_free */
11644 };
11645 #endif
11646 
11647 static __Pyx_StringTabEntry __pyx_string_tab[] = {
11648  {&__pyx_n_s_AmnsException, __pyx_k_AmnsException, sizeof(__pyx_k_AmnsException), 0, 0, 1, 1},
11649  {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
11650  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
11651  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
11652  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
11653  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
11654  {&__pyx_n_s_LR, __pyx_k_LR, sizeof(__pyx_k_LR), 0, 0, 1, 1},
11655  {&__pyx_n_s_MI, __pyx_k_MI, sizeof(__pyx_k_MI), 0, 0, 1, 1},
11656  {&__pyx_kp_s_No_value_specified_for_struct_at, __pyx_k_No_value_specified_for_struct_at, sizeof(__pyx_k_No_value_specified_for_struct_at), 0, 0, 1, 0},
11657  {&__pyx_kp_s_No_value_specified_for_struct_at_2, __pyx_k_No_value_specified_for_struct_at_2, sizeof(__pyx_k_No_value_specified_for_struct_at_2), 0, 0, 1, 0},
11658  {&__pyx_kp_s_No_value_specified_for_struct_at_3, __pyx_k_No_value_specified_for_struct_at_3, sizeof(__pyx_k_No_value_specified_for_struct_at_3), 0, 0, 1, 0},
11659  {&__pyx_kp_s_No_value_specified_for_struct_at_4, __pyx_k_No_value_specified_for_struct_at_4, sizeof(__pyx_k_No_value_specified_for_struct_at_4), 0, 0, 1, 0},
11660  {&__pyx_kp_s_No_value_specified_for_struct_at_5, __pyx_k_No_value_specified_for_struct_at_5, sizeof(__pyx_k_No_value_specified_for_struct_at_5), 0, 0, 1, 0},
11661  {&__pyx_kp_s_No_value_specified_for_struct_at_6, __pyx_k_No_value_specified_for_struct_at_6, sizeof(__pyx_k_No_value_specified_for_struct_at_6), 0, 0, 1, 0},
11662  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
11663  {&__pyx_kp_s_Number_of_parameters_does_not_ma, __pyx_k_Number_of_parameters_does_not_ma, sizeof(__pyx_k_Number_of_parameters_does_not_ma), 0, 0, 1, 0},
11664  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
11665  {&__pyx_kp_s_Shape_of_parameter_2_inconsisten, __pyx_k_Shape_of_parameter_2_inconsisten, sizeof(__pyx_k_Shape_of_parameter_2_inconsisten), 0, 0, 1, 0},
11666  {&__pyx_kp_s_Shape_of_parameter_3_inconsisten, __pyx_k_Shape_of_parameter_3_inconsisten, sizeof(__pyx_k_Shape_of_parameter_3_inconsisten), 0, 0, 1, 0},
11667  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
11668  {&__pyx_kp_s_Unsupported_rank_of_input_argume, __pyx_k_Unsupported_rank_of_input_argume, sizeof(__pyx_k_Unsupported_rank_of_input_argume), 0, 0, 1, 0},
11669  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
11670  {&__pyx_n_s_ZA, __pyx_k_ZA, sizeof(__pyx_k_ZA), 0, 0, 1, 1},
11671  {&__pyx_n_s_ZN, __pyx_k_ZN, sizeof(__pyx_k_ZN), 0, 0, 1, 1},
11672  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
11673  {&__pyx_n_s_amns, __pyx_k_amns, sizeof(__pyx_k_amns), 0, 0, 1, 1},
11674  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
11675  {&__pyx_n_s_backend, __pyx_k_backend, sizeof(__pyx_k_backend), 0, 0, 1, 1},
11676  {&__pyx_n_s_data_1d, __pyx_k_data_1d, sizeof(__pyx_k_data_1d), 0, 0, 1, 1},
11677  {&__pyx_n_s_data_2d, __pyx_k_data_2d, sizeof(__pyx_k_data_2d), 0, 0, 1, 1},
11678  {&__pyx_n_s_data_3d, __pyx_k_data_3d, sizeof(__pyx_k_data_3d), 0, 0, 1, 1},
11679  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
11680  {&__pyx_n_s_empty_like, __pyx_k_empty_like, sizeof(__pyx_k_empty_like), 0, 0, 1, 1},
11681  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
11682  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
11683  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
11684  {&__pyx_n_s_filled, __pyx_k_filled, sizeof(__pyx_k_filled), 0, 0, 1, 1},
11685  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
11686  {&__pyx_n_s_int_specifier, __pyx_k_int_specifier, sizeof(__pyx_k_int_specifier), 0, 0, 1, 1},
11687  {&__pyx_n_s_interp_fun, __pyx_k_interp_fun, sizeof(__pyx_k_interp_fun), 0, 0, 1, 1},
11688  {&__pyx_n_s_invalidate_handle, __pyx_k_invalidate_handle, sizeof(__pyx_k_invalidate_handle), 0, 0, 1, 1},
11689  {&__pyx_n_s_isotope_resolved, __pyx_k_isotope_resolved, sizeof(__pyx_k_isotope_resolved), 0, 0, 1, 1},
11690  {&__pyx_n_s_lr, __pyx_k_lr, sizeof(__pyx_k_lr), 0, 0, 1, 1},
11691  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
11692  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
11693  {&__pyx_n_s_mi, __pyx_k_mi, sizeof(__pyx_k_mi), 0, 0, 1, 1},
11694  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
11695  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
11696  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
11697  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
11698  {&__pyx_n_s_no_of_reactants, __pyx_k_no_of_reactants, sizeof(__pyx_k_no_of_reactants), 0, 0, 1, 1},
11699  {&__pyx_n_s_nowarn, __pyx_k_nowarn, sizeof(__pyx_k_nowarn), 0, 0, 1, 1},
11700  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
11701  {&__pyx_n_s_number, __pyx_k_number, sizeof(__pyx_k_number), 0, 0, 1, 1},
11702  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
11703  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
11704  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
11705  {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1},
11706  {&__pyx_n_s_p1, __pyx_k_p1, sizeof(__pyx_k_p1), 0, 0, 1, 1},
11707  {&__pyx_n_s_p2, __pyx_k_p2, sizeof(__pyx_k_p2), 0, 0, 1, 1},
11708  {&__pyx_n_s_p3, __pyx_k_p3, sizeof(__pyx_k_p3), 0, 0, 1, 1},
11709  {&__pyx_n_s_parentAmns, __pyx_k_parentAmns, sizeof(__pyx_k_parentAmns), 0, 0, 1, 1},
11710  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
11711  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
11712  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
11713  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
11714  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
11715  {&__pyx_n_s_reactants, __pyx_k_reactants, sizeof(__pyx_k_reactants), 0, 0, 1, 1},
11716  {&__pyx_n_s_reactionString, __pyx_k_reactionString, sizeof(__pyx_k_reactionString), 0, 0, 1, 1},
11717  {&__pyx_n_s_reaction_type, __pyx_k_reaction_type, sizeof(__pyx_k_reaction_type), 0, 0, 1, 1},
11718  {&__pyx_n_s_real_specifier, __pyx_k_real_specifier, sizeof(__pyx_k_real_specifier), 0, 0, 1, 1},
11719  {&__pyx_n_s_result_label, __pyx_k_result_label, sizeof(__pyx_k_result_label), 0, 0, 1, 1},
11720  {&__pyx_n_s_result_unit, __pyx_k_result_unit, sizeof(__pyx_k_result_unit), 0, 0, 1, 1},
11721  {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
11722  {&__pyx_n_s_setup, __pyx_k_setup, sizeof(__pyx_k_setup), 0, 0, 1, 1},
11723  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
11724  {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
11725  {&__pyx_n_s_state_label, __pyx_k_state_label, sizeof(__pyx_k_state_label), 0, 0, 1, 1},
11726  {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
11727  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
11728  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
11729  {&__pyx_n_s_user, __pyx_k_user, sizeof(__pyx_k_user), 0, 0, 1, 1},
11730  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
11731  {&__pyx_n_s_version_backend, __pyx_k_version_backend, sizeof(__pyx_k_version_backend), 0, 0, 1, 1},
11732  {&__pyx_n_s_version_number, __pyx_k_version_number, sizeof(__pyx_k_version_number), 0, 0, 1, 1},
11733  {&__pyx_n_s_version_string, __pyx_k_version_string, sizeof(__pyx_k_version_string), 0, 0, 1, 1},
11734  {&__pyx_n_s_version_user, __pyx_k_version_user, sizeof(__pyx_k_version_user), 0, 0, 1, 1},
11735  {&__pyx_n_s_za, __pyx_k_za, sizeof(__pyx_k_za), 0, 0, 1, 1},
11736  {&__pyx_n_s_zn, __pyx_k_zn, sizeof(__pyx_k_zn), 0, 0, 1, 1},
11737  {0, 0, 0, 0, 0, 0, 0}
11738 };
11739 static int __Pyx_InitCachedBuiltins(void) {
11740  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 371, __pyx_L1_error)
11741  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 218, __pyx_L1_error)
11742  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 231, __pyx_L1_error)
11743  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 799, __pyx_L1_error)
11744  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 989, __pyx_L1_error)
11745  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(2, 14, __pyx_L1_error)
11746  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(2, 18, __pyx_L1_error)
11747  return 0;
11748  __pyx_L1_error:;
11749  return -1;
11750 }
11751 
11752 static int __Pyx_InitCachedConstants(void) {
11753  __Pyx_RefNannyDeclarations
11754  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
11755 
11756  /* "amns.pyx":113
11757  * raise AmnsException(error_status.string)
11758  *
11759  * self.set("nowarn") # <<<<<<<<<<<<<<
11760  *
11761  *
11762  */
11763  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_nowarn); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 113, __pyx_L1_error)
11764  __Pyx_GOTREF(__pyx_tuple_);
11765  __Pyx_GIVEREF(__pyx_tuple_);
11766 
11767  /* "amns.pyx":241
11768  * refShape = p1.shape
11769  * if p2 is not None and p2.shape != refShape:
11770  * raise AmnsException("Shape of parameter 2 inconsistent to shape of parameter 1") # <<<<<<<<<<<<<<
11771  * if p3 is not None and p3.shape != refShape:
11772  * raise AmnsException("Shape of parameter 3 inconsistent to shape of parameter 1")
11773  */
11774  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Shape_of_parameter_2_inconsisten); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 241, __pyx_L1_error)
11775  __Pyx_GOTREF(__pyx_tuple__3);
11776  __Pyx_GIVEREF(__pyx_tuple__3);
11777 
11778  /* "amns.pyx":243
11779  * raise AmnsException("Shape of parameter 2 inconsistent to shape of parameter 1")
11780  * if p3 is not None and p3.shape != refShape:
11781  * raise AmnsException("Shape of parameter 3 inconsistent to shape of parameter 1") # <<<<<<<<<<<<<<
11782  *
11783  * if len(refShape) == 1:
11784  */
11785  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Shape_of_parameter_3_inconsisten); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 243, __pyx_L1_error)
11786  __Pyx_GOTREF(__pyx_tuple__4);
11787  __Pyx_GIVEREF(__pyx_tuple__4);
11788 
11789  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
11790  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
11791  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
11792  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
11793  *
11794  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
11795  */
11796  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 218, __pyx_L1_error)
11797  __Pyx_GOTREF(__pyx_tuple__5);
11798  __Pyx_GIVEREF(__pyx_tuple__5);
11799 
11800  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
11801  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
11802  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
11803  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
11804  *
11805  * info.buf = PyArray_DATA(self)
11806  */
11807  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 222, __pyx_L1_error)
11808  __Pyx_GOTREF(__pyx_tuple__6);
11809  __Pyx_GIVEREF(__pyx_tuple__6);
11810 
11811  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
11812  * if ((descr.byteorder == c'>' and little_endian) or
11813  * (descr.byteorder == c'<' and not little_endian)):
11814  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
11815  * if t == NPY_BYTE: f = "b"
11816  * elif t == NPY_UBYTE: f = "B"
11817  */
11818  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 259, __pyx_L1_error)
11819  __Pyx_GOTREF(__pyx_tuple__7);
11820  __Pyx_GIVEREF(__pyx_tuple__7);
11821 
11822  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
11823  *
11824  * if (end - f) - <int>(new_offset - offset[0]) < 15:
11825  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
11826  *
11827  * if ((child.byteorder == c'>' and little_endian) or
11828  */
11829  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 799, __pyx_L1_error)
11830  __Pyx_GOTREF(__pyx_tuple__8);
11831  __Pyx_GIVEREF(__pyx_tuple__8);
11832 
11833  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
11834  * if ((child.byteorder == c'>' and little_endian) or
11835  * (child.byteorder == c'<' and not little_endian)):
11836  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
11837  * # One could encode it in the format string and have Cython
11838  * # complain instead, BUT: < and > in format strings also imply
11839  */
11840  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 803, __pyx_L1_error)
11841  __Pyx_GOTREF(__pyx_tuple__9);
11842  __Pyx_GIVEREF(__pyx_tuple__9);
11843 
11844  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
11845  * t = child.type_num
11846  * if end - f < 5:
11847  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
11848  *
11849  * # Until ticket #99 is fixed, use integers to avoid warnings
11850  */
11851  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 823, __pyx_L1_error)
11852  __Pyx_GOTREF(__pyx_tuple__10);
11853  __Pyx_GIVEREF(__pyx_tuple__10);
11854 
11855  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":989
11856  * _import_array()
11857  * except Exception:
11858  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
11859  *
11860  * cdef inline int import_umath() except -1:
11861  */
11862  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 989, __pyx_L1_error)
11863  __Pyx_GOTREF(__pyx_tuple__11);
11864  __Pyx_GIVEREF(__pyx_tuple__11);
11865 
11866  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":995
11867  * _import_umath()
11868  * except Exception:
11869  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
11870  *
11871  * cdef inline int import_ufunc() except -1:
11872  */
11873  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 995, __pyx_L1_error)
11874  __Pyx_GOTREF(__pyx_tuple__12);
11875  __Pyx_GIVEREF(__pyx_tuple__12);
11876 
11877  /* "../../../../../../../../../../gw/switm/python/2.7/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1001
11878  * _import_umath()
11879  * except Exception:
11880  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
11881  */
11882  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 1001, __pyx_L1_error)
11883  __Pyx_GOTREF(__pyx_tuple__13);
11884  __Pyx_GIVEREF(__pyx_tuple__13);
11885 
11886  /* "FromPyStructUtility":19
11887  * value = obj['ZN']
11888  * except KeyError:
11889  * raise ValueError("No value specified for struct attribute 'ZN'") # <<<<<<<<<<<<<<
11890  * result.ZN = value
11891  * try:
11892  */
11893  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 19, __pyx_L1_error)
11894  __Pyx_GOTREF(__pyx_tuple__14);
11895  __Pyx_GIVEREF(__pyx_tuple__14);
11896 
11897  /* "FromPyStructUtility":24
11898  * value = obj['ZA']
11899  * except KeyError:
11900  * raise ValueError("No value specified for struct attribute 'ZA'") # <<<<<<<<<<<<<<
11901  * result.ZA = value
11902  * try:
11903  */
11904  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_2); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 24, __pyx_L1_error)
11905  __Pyx_GOTREF(__pyx_tuple__15);
11906  __Pyx_GIVEREF(__pyx_tuple__15);
11907 
11908  /* "FromPyStructUtility":29
11909  * value = obj['MI']
11910  * except KeyError:
11911  * raise ValueError("No value specified for struct attribute 'MI'") # <<<<<<<<<<<<<<
11912  * result.MI = value
11913  * try:
11914  */
11915  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_3); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 29, __pyx_L1_error)
11916  __Pyx_GOTREF(__pyx_tuple__16);
11917  __Pyx_GIVEREF(__pyx_tuple__16);
11918 
11919  /* "FromPyStructUtility":34
11920  * value = obj['LR']
11921  * except KeyError:
11922  * raise ValueError("No value specified for struct attribute 'LR'") # <<<<<<<<<<<<<<
11923  * result.LR = value
11924  * try:
11925  */
11926  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_4); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 34, __pyx_L1_error)
11927  __Pyx_GOTREF(__pyx_tuple__17);
11928  __Pyx_GIVEREF(__pyx_tuple__17);
11929 
11930  /* "FromPyStructUtility":39
11931  * value = obj['real_specifier']
11932  * except KeyError:
11933  * raise ValueError("No value specified for struct attribute 'real_specifier'") # <<<<<<<<<<<<<<
11934  * result.real_specifier = value
11935  * try:
11936  */
11937  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_5); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 39, __pyx_L1_error)
11938  __Pyx_GOTREF(__pyx_tuple__18);
11939  __Pyx_GIVEREF(__pyx_tuple__18);
11940 
11941  /* "FromPyStructUtility":44
11942  * value = obj['int_specifier']
11943  * except KeyError:
11944  * raise ValueError("No value specified for struct attribute 'int_specifier'") # <<<<<<<<<<<<<<
11945  * result.int_specifier = value
11946  * return result
11947  */
11948  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_6); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(2, 44, __pyx_L1_error)
11949  __Pyx_GOTREF(__pyx_tuple__19);
11950  __Pyx_GIVEREF(__pyx_tuple__19);
11951  __Pyx_RefNannyFinishContext();
11952  return 0;
11953  __pyx_L1_error:;
11954  __Pyx_RefNannyFinishContext();
11955  return -1;
11956 }
11957 
11958 static int __Pyx_InitGlobals(void) {
11959  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
11960  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
11961  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
11962  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
11963  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
11964  return 0;
11965  __pyx_L1_error:;
11966  return -1;
11967 }
11968 
11969 #if PY_MAJOR_VERSION < 3
11970 PyMODINIT_FUNC initamns(void); /*proto*/
11971 PyMODINIT_FUNC initamns(void)
11972 #else
11973 PyMODINIT_FUNC PyInit_amns(void); /*proto*/
11974 PyMODINIT_FUNC PyInit_amns(void)
11975 #endif
11976 {
11977  PyObject *__pyx_t_1 = NULL;
11978  PyObject *__pyx_t_2 = NULL;
11979  PyObject *__pyx_t_3 = NULL;
11980  PyObject *__pyx_t_4 = NULL;
11981  __Pyx_RefNannyDeclarations
11982  #if CYTHON_REFNANNY
11983  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
11984  if (!__Pyx_RefNanny) {
11985  PyErr_Clear();
11986  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
11987  if (!__Pyx_RefNanny)
11988  Py_FatalError("failed to import 'refnanny' module");
11989  }
11990  #endif
11991  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_amns(void)", 0);
11992  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11993  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
11994  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
11995  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
11996  #ifdef __Pyx_CyFunction_USED
11997  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11998  #endif
11999  #ifdef __Pyx_FusedFunction_USED
12000  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12001  #endif
12002  #ifdef __Pyx_Coroutine_USED
12003  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12004  #endif
12005  #ifdef __Pyx_Generator_USED
12006  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12007  #endif
12008  #ifdef __Pyx_StopAsyncIteration_USED
12009  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12010  #endif
12011  /*--- Library function declarations ---*/
12012  /*--- Threads initialization code ---*/
12013  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
12014  #ifdef WITH_THREAD /* Python build with threading support? */
12015  PyEval_InitThreads();
12016  #endif
12017  #endif
12018  /*--- Module creation code ---*/
12019  #if PY_MAJOR_VERSION < 3
12020  __pyx_m = Py_InitModule4("amns", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
12021  #else
12022  __pyx_m = PyModule_Create(&__pyx_moduledef);
12023  #endif
12024  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
12025  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
12026  Py_INCREF(__pyx_d);
12027  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
12028  #if CYTHON_COMPILING_IN_PYPY
12029  Py_INCREF(__pyx_b);
12030  #endif
12031  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
12032  /*--- Initialize various global constants etc. ---*/
12033  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12034  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
12035  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12036  #endif
12037  if (__pyx_module_is_main_amns) {
12038  if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12039  }
12040  #if PY_MAJOR_VERSION >= 3
12041  {
12042  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
12043  if (!PyDict_GetItemString(modules, "amns")) {
12044  if (unlikely(PyDict_SetItemString(modules, "amns", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
12045  }
12046  }
12047  #endif
12048  /*--- Builtin init code ---*/
12049  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12050  /*--- Constants init code ---*/
12051  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12052  /*--- Global init code ---*/
12053  /*--- Variable export code ---*/
12054  /*--- Function export code ---*/
12055  /*--- Type init code ---*/
12056  __pyx_vtabptr_4amns_Amns = &__pyx_vtable_4amns_Amns;
12057  __pyx_vtable_4amns_Amns.handle = (void *(*)(struct __pyx_obj_4amns_Amns *))__pyx_f_4amns_4Amns_handle;
12058  __pyx_vtable_4amns_Amns.lquery = (amns_c_answer_type (*)(struct __pyx_obj_4amns_Amns *, PyObject *))__pyx_f_4amns_4Amns_lquery;
12059  if (PyType_Ready(&__pyx_type_4amns_Amns) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
12060  __pyx_type_4amns_Amns.tp_print = 0;
12061  #if CYTHON_COMPILING_IN_CPYTHON
12062  {
12063  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4amns_Amns, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 11, __pyx_L1_error)
12064  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
12065  __pyx_wrapperbase_4amns_4Amns___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
12066  __pyx_wrapperbase_4amns_4Amns___init__.doc = __pyx_doc_4amns_4Amns___init__;
12067  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4amns_4Amns___init__;
12068  }
12069  }
12070  #endif
12071  if (__Pyx_SetVtable(__pyx_type_4amns_Amns.tp_dict, __pyx_vtabptr_4amns_Amns) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
12072  if (PyObject_SetAttrString(__pyx_m, "Amns", (PyObject *)&__pyx_type_4amns_Amns) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
12073  __pyx_ptype_4amns_Amns = &__pyx_type_4amns_Amns;
12074  __pyx_vtabptr_4amns_Table = &__pyx_vtable_4amns_Table;
12075  __pyx_vtable_4amns_Table.lquery = (amns_c_answer_type (*)(struct __pyx_obj_4amns_Table *, PyObject *))__pyx_f_4amns_5Table_lquery;
12076  if (PyType_Ready(&__pyx_type_4amns_Table) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
12077  __pyx_type_4amns_Table.tp_print = 0;
12078  #if CYTHON_COMPILING_IN_CPYTHON
12079  {
12080  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4amns_Table, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 92, __pyx_L1_error)
12081  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
12082  __pyx_wrapperbase_4amns_5Table___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
12083  __pyx_wrapperbase_4amns_5Table___init__.doc = __pyx_doc_4amns_5Table___init__;
12084  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4amns_5Table___init__;
12085  }
12086  }
12087  #endif
12088  if (__Pyx_SetVtable(__pyx_type_4amns_Table.tp_dict, __pyx_vtabptr_4amns_Table) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
12089  if (PyObject_SetAttrString(__pyx_m, "Table", (PyObject *)&__pyx_type_4amns_Table) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
12090  __pyx_ptype_4amns_Table = &__pyx_type_4amns_Table;
12091  __pyx_vtabptr_4amns_Reactants = &__pyx_vtable_4amns_Reactants;
12092  __pyx_vtable_4amns_Reactants.handle = (void *(*)(struct __pyx_obj_4amns_Reactants *))__pyx_f_4amns_9Reactants_handle;
12093  if (PyType_Ready(&__pyx_type_4amns_Reactants) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
12094  __pyx_type_4amns_Reactants.tp_print = 0;
12095  #if CYTHON_COMPILING_IN_CPYTHON
12096  {
12097  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4amns_Reactants, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 354, __pyx_L1_error)
12098  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
12099  __pyx_wrapperbase_4amns_9Reactants_8__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
12100  __pyx_wrapperbase_4amns_9Reactants_8__len__.doc = __pyx_doc_4amns_9Reactants_8__len__;
12101  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4amns_9Reactants_8__len__;
12102  }
12103  }
12104  #endif
12105  #if CYTHON_COMPILING_IN_CPYTHON
12106  {
12107  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4amns_Reactants, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 354, __pyx_L1_error)
12108  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
12109  __pyx_wrapperbase_4amns_9Reactants_10__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
12110  __pyx_wrapperbase_4amns_9Reactants_10__str__.doc = __pyx_doc_4amns_9Reactants_10__str__;
12111  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4amns_9Reactants_10__str__;
12112  }
12113  }
12114  #endif
12115  if (__Pyx_SetVtable(__pyx_type_4amns_Reactants.tp_dict, __pyx_vtabptr_4amns_Reactants) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
12116  if (PyObject_SetAttrString(__pyx_m, "Reactants", (PyObject *)&__pyx_type_4amns_Reactants) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
12117  __pyx_ptype_4amns_Reactants = &__pyx_type_4amns_Reactants;
12118  /*--- Type import code ---*/
12119  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
12120  #if CYTHON_COMPILING_IN_PYPY
12121  sizeof(PyTypeObject),
12122  #else
12123  sizeof(PyHeapTypeObject),
12124  #endif
12125  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(3, 9, __pyx_L1_error)
12126  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(1, 155, __pyx_L1_error)
12127  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(1, 168, __pyx_L1_error)
12128  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(1, 172, __pyx_L1_error)
12129  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(1, 181, __pyx_L1_error)
12130  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(1, 861, __pyx_L1_error)
12131  /*--- Variable import code ---*/
12132  /*--- Function import code ---*/
12133  /*--- Execution code ---*/
12134  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
12135  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12136  #endif
12137 
12138  /* "amns.pyx":3
12139  * cimport camns_interface
12140  * from camns_interface cimport *
12141  * import numpy as np # <<<<<<<<<<<<<<
12142  * cimport numpy as np
12143  *
12144  */
12145  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
12146  __Pyx_GOTREF(__pyx_t_1);
12147  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
12148  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12149 
12150  /* "amns.pyx":410
12151  *
12152  *
12153  * class AmnsException(Exception): # <<<<<<<<<<<<<<
12154  * pass
12155  */
12156  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
12157  __Pyx_GOTREF(__pyx_t_1);
12158  __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
12159  __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
12160  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
12161  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
12162  __Pyx_GOTREF(__pyx_t_2);
12163  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AmnsException, __pyx_n_s_AmnsException, (PyObject *) NULL, __pyx_n_s_amns, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error)
12164  __Pyx_GOTREF(__pyx_t_3);
12165  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AmnsException, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error)
12166  __Pyx_GOTREF(__pyx_t_4);
12167  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AmnsException, __pyx_t_4) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
12168  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12169  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12170  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12171  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12172 
12173  /* "amns.pyx":1
12174  * cimport camns_interface # <<<<<<<<<<<<<<
12175  * from camns_interface cimport *
12176  * import numpy as np
12177  */
12178  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
12179  __Pyx_GOTREF(__pyx_t_1);
12180  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
12181  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12182 
12183  /* "FromPyStructUtility":11
12184  *
12185  * @cname("__pyx_convert__from_py_amns_c_reactant_type")
12186  * cdef amns_c_reactant_type __pyx_convert__from_py_amns_c_reactant_type(obj) except *: # <<<<<<<<<<<<<<
12187  * cdef amns_c_reactant_type result
12188  * if not PyMapping_Check(obj):
12189  */
12190 
12191  /*--- Wrapped vars code ---*/
12192 
12193  goto __pyx_L0;
12194  __pyx_L1_error:;
12195  __Pyx_XDECREF(__pyx_t_1);
12196  __Pyx_XDECREF(__pyx_t_2);
12197  __Pyx_XDECREF(__pyx_t_3);
12198  __Pyx_XDECREF(__pyx_t_4);
12199  if (__pyx_m) {
12200  if (__pyx_d) {
12201  __Pyx_AddTraceback("init amns", __pyx_clineno, __pyx_lineno, __pyx_filename);
12202  }
12203  Py_DECREF(__pyx_m); __pyx_m = 0;
12204  } else if (!PyErr_Occurred()) {
12205  PyErr_SetString(PyExc_ImportError, "init amns");
12206  }
12207  __pyx_L0:;
12208  __Pyx_RefNannyFinishContext();
12209  #if PY_MAJOR_VERSION < 3
12210  return;
12211  #else
12212  return __pyx_m;
12213  #endif
12214 }
12215 
12216 /* --- Runtime support code --- */
12217 /* Refnanny */
12218 #if CYTHON_REFNANNY
12219 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
12220  PyObject *m = NULL, *p = NULL;
12221  void *r = NULL;
12222  m = PyImport_ImportModule((char *)modname);
12223  if (!m) goto end;
12224  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
12225  if (!p) goto end;
12226  r = PyLong_AsVoidPtr(p);
12227 end:
12228  Py_XDECREF(p);
12229  Py_XDECREF(m);
12230  return (__Pyx_RefNannyAPIStruct *)r;
12231 }
12232 #endif
12233 
12234 /* GetBuiltinName */
12235 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
12236  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
12237  if (unlikely(!result)) {
12238  PyErr_Format(PyExc_NameError,
12239 #if PY_MAJOR_VERSION >= 3
12240  "name '%U' is not defined", name);
12241 #else
12242  "name '%.200s' is not defined", PyString_AS_STRING(name));
12243 #endif
12244  }
12245  return result;
12246 }
12247 
12248 /* RaiseDoubleKeywords */
12249 static void __Pyx_RaiseDoubleKeywordsError(
12250  const char* func_name,
12251  PyObject* kw_name)
12252 {
12253  PyErr_Format(PyExc_TypeError,
12254  #if PY_MAJOR_VERSION >= 3
12255  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
12256  #else
12257  "%s() got multiple values for keyword argument '%s'", func_name,
12258  PyString_AsString(kw_name));
12259  #endif
12260 }
12261 
12262 /* ParseKeywords */
12263 static int __Pyx_ParseOptionalKeywords(
12264  PyObject *kwds,
12265  PyObject **argnames[],
12266  PyObject *kwds2,
12267  PyObject *values[],
12268  Py_ssize_t num_pos_args,
12269  const char* function_name)
12270 {
12271  PyObject *key = 0, *value = 0;
12272  Py_ssize_t pos = 0;
12273  PyObject*** name;
12274  PyObject*** first_kw_arg = argnames + num_pos_args;
12275  while (PyDict_Next(kwds, &pos, &key, &value)) {
12276  name = first_kw_arg;
12277  while (*name && (**name != key)) name++;
12278  if (*name) {
12279  values[name-argnames] = value;
12280  continue;
12281  }
12282  name = first_kw_arg;
12283  #if PY_MAJOR_VERSION < 3
12284  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
12285  while (*name) {
12286  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
12287  && _PyString_Eq(**name, key)) {
12288  values[name-argnames] = value;
12289  break;
12290  }
12291  name++;
12292  }
12293  if (*name) continue;
12294  else {
12295  PyObject*** argname = argnames;
12296  while (argname != first_kw_arg) {
12297  if ((**argname == key) || (
12298  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
12299  && _PyString_Eq(**argname, key))) {
12300  goto arg_passed_twice;
12301  }
12302  argname++;
12303  }
12304  }
12305  } else
12306  #endif
12307  if (likely(PyUnicode_Check(key))) {
12308  while (*name) {
12309  int cmp = (**name == key) ? 0 :
12310  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
12311  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
12312  #endif
12313  PyUnicode_Compare(**name, key);
12314  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
12315  if (cmp == 0) {
12316  values[name-argnames] = value;
12317  break;
12318  }
12319  name++;
12320  }
12321  if (*name) continue;
12322  else {
12323  PyObject*** argname = argnames;
12324  while (argname != first_kw_arg) {
12325  int cmp = (**argname == key) ? 0 :
12326  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
12327  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
12328  #endif
12329  PyUnicode_Compare(**argname, key);
12330  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
12331  if (cmp == 0) goto arg_passed_twice;
12332  argname++;
12333  }
12334  }
12335  } else
12336  goto invalid_keyword_type;
12337  if (kwds2) {
12338  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
12339  } else {
12340  goto invalid_keyword;
12341  }
12342  }
12343  return 0;
12344 arg_passed_twice:
12345  __Pyx_RaiseDoubleKeywordsError(function_name, key);
12346  goto bad;
12347 invalid_keyword_type:
12348  PyErr_Format(PyExc_TypeError,
12349  "%.200s() keywords must be strings", function_name);
12350  goto bad;
12351 invalid_keyword:
12352  PyErr_Format(PyExc_TypeError,
12353  #if PY_MAJOR_VERSION < 3
12354  "%.200s() got an unexpected keyword argument '%.200s'",
12355  function_name, PyString_AsString(key));
12356  #else
12357  "%s() got an unexpected keyword argument '%U'",
12358  function_name, key);
12359  #endif
12360 bad:
12361  return -1;
12362 }
12363 
12364 /* RaiseArgTupleInvalid */
12365 static void __Pyx_RaiseArgtupleInvalid(
12366  const char* func_name,
12367  int exact,
12368  Py_ssize_t num_min,
12369  Py_ssize_t num_max,
12370  Py_ssize_t num_found)
12371 {
12372  Py_ssize_t num_expected;
12373  const char *more_or_less;
12374  if (num_found < num_min) {
12375  num_expected = num_min;
12376  more_or_less = "at least";
12377  } else {
12378  num_expected = num_max;
12379  more_or_less = "at most";
12380  }
12381  if (exact) {
12382  more_or_less = "exactly";
12383  }
12384  PyErr_Format(PyExc_TypeError,
12385  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
12386  func_name, more_or_less, num_expected,
12387  (num_expected == 1) ? "" : "s", num_found);
12388 }
12389 
12390 /* PyObjectCall */
12391 #if CYTHON_COMPILING_IN_CPYTHON
12392 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
12393  PyObject *result;
12394  ternaryfunc call = func->ob_type->tp_call;
12395  if (unlikely(!call))
12396  return PyObject_Call(func, arg, kw);
12397  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
12398  return NULL;
12399  result = (*call)(func, arg, kw);
12400  Py_LeaveRecursiveCall();
12401  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
12402  PyErr_SetString(
12403  PyExc_SystemError,
12404  "NULL result without error in PyObject_Call");
12405  }
12406  return result;
12407 }
12408 #endif
12409 
12410 /* GetModuleGlobalName */
12411 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
12412  PyObject *result;
12413 #if !CYTHON_AVOID_BORROWED_REFS
12414  result = PyDict_GetItem(__pyx_d, name);
12415  if (likely(result)) {
12416  Py_INCREF(result);
12417  } else {
12418 #else
12419  result = PyObject_GetItem(__pyx_d, name);
12420  if (!result) {
12421  PyErr_Clear();
12422 #endif
12423  result = __Pyx_GetBuiltinName(name);
12424  }
12425  return result;
12426 }
12427 
12428 /* PyCFunctionFastCall */
12429  #if CYTHON_FAST_PYCCALL
12430 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
12431  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
12432  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
12433  PyObject *self = PyCFunction_GET_SELF(func);
12434  assert(PyCFunction_Check(func));
12435  assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
12436  assert(nargs >= 0);
12437  assert(nargs == 0 || args != NULL);
12438  /* _PyCFunction_FastCallDict() must not be called with an exception set,
12439  because it may clear it (directly or indirectly) and so the
12440  caller loses its exception */
12441  assert(!PyErr_Occurred());
12442  return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
12443 }
12444 #endif // CYTHON_FAST_PYCCALL
12445 
12446 /* PyFunctionFastCall */
12447  #if CYTHON_FAST_PYCALL
12448 #include "frameobject.h"
12449 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
12450  PyObject *globals) {
12451  PyFrameObject *f;
12452  PyThreadState *tstate = PyThreadState_GET();
12453  PyObject **fastlocals;
12454  Py_ssize_t i;
12455  PyObject *result;
12456  assert(globals != NULL);
12457  /* XXX Perhaps we should create a specialized
12458  PyFrame_New() that doesn't take locals, but does
12459  take builtins without sanity checking them.
12460  */
12461  assert(tstate != NULL);
12462  f = PyFrame_New(tstate, co, globals, NULL);
12463  if (f == NULL) {
12464  return NULL;
12465  }
12466  fastlocals = f->f_localsplus;
12467  for (i = 0; i < na; i++) {
12468  Py_INCREF(*args);
12469  fastlocals[i] = *args++;
12470  }
12471  result = PyEval_EvalFrameEx(f,0);
12472  ++tstate->recursion_depth;
12473  Py_DECREF(f);
12474  --tstate->recursion_depth;
12475  return result;
12476 }
12477 #if 1 || PY_VERSION_HEX < 0x030600B1
12478 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
12479  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
12480  PyObject *globals = PyFunction_GET_GLOBALS(func);
12481  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
12482  PyObject *closure;
12483 #if PY_MAJOR_VERSION >= 3
12484  PyObject *kwdefs;
12485 #endif
12486  PyObject *kwtuple, **k;
12487  PyObject **d;
12488  Py_ssize_t nd;
12489  Py_ssize_t nk;
12490  PyObject *result;
12491  assert(kwargs == NULL || PyDict_Check(kwargs));
12492  nk = kwargs ? PyDict_Size(kwargs) : 0;
12493  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
12494  return NULL;
12495  }
12496  if (
12497 #if PY_MAJOR_VERSION >= 3
12498  co->co_kwonlyargcount == 0 &&
12499 #endif
12500  likely(kwargs == NULL || nk == 0) &&
12501  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
12502  if (argdefs == NULL && co->co_argcount == nargs) {
12503  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
12504  goto done;
12505  }
12506  else if (nargs == 0 && argdefs != NULL
12507  && co->co_argcount == Py_SIZE(argdefs)) {
12508  /* function called with no arguments, but all parameters have
12509  a default value: use default values as arguments .*/
12510  args = &PyTuple_GET_ITEM(argdefs, 0);
12511  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
12512  goto done;
12513  }
12514  }
12515  if (kwargs != NULL) {
12516  Py_ssize_t pos, i;
12517  kwtuple = PyTuple_New(2 * nk);
12518  if (kwtuple == NULL) {
12519  result = NULL;
12520  goto done;
12521  }
12522  k = &PyTuple_GET_ITEM(kwtuple, 0);
12523  pos = i = 0;
12524  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
12525  Py_INCREF(k[i]);
12526  Py_INCREF(k[i+1]);
12527  i += 2;
12528  }
12529  nk = i / 2;
12530  }
12531  else {
12532  kwtuple = NULL;
12533  k = NULL;
12534  }
12535  closure = PyFunction_GET_CLOSURE(func);
12536 #if PY_MAJOR_VERSION >= 3
12537  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
12538 #endif
12539  if (argdefs != NULL) {
12540  d = &PyTuple_GET_ITEM(argdefs, 0);
12541  nd = Py_SIZE(argdefs);
12542  }
12543  else {
12544  d = NULL;
12545  nd = 0;
12546  }
12547 #if PY_MAJOR_VERSION >= 3
12548  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
12549  args, nargs,
12550  k, (int)nk,
12551  d, (int)nd, kwdefs, closure);
12552 #else
12553  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
12554  args, nargs,
12555  k, (int)nk,
12556  d, (int)nd, closure);
12557 #endif
12558  Py_XDECREF(kwtuple);
12559 done:
12560  Py_LeaveRecursiveCall();
12561  return result;
12562 }
12563 #endif // CPython < 3.6
12564 #endif // CYTHON_FAST_PYCALL
12565 
12566 /* PyObjectCallMethO */
12567  #if CYTHON_COMPILING_IN_CPYTHON
12568 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
12569  PyObject *self, *result;
12570  PyCFunction cfunc;
12571  cfunc = PyCFunction_GET_FUNCTION(func);
12572  self = PyCFunction_GET_SELF(func);
12573  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
12574  return NULL;
12575  result = cfunc(self, arg);
12576  Py_LeaveRecursiveCall();
12577  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
12578  PyErr_SetString(
12579  PyExc_SystemError,
12580  "NULL result without error in PyObject_Call");
12581  }
12582  return result;
12583 }
12584 #endif
12585 
12586 /* PyObjectCallOneArg */
12587  #if CYTHON_COMPILING_IN_CPYTHON
12588 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
12589  PyObject *result;
12590  PyObject *args = PyTuple_New(1);
12591  if (unlikely(!args)) return NULL;
12592  Py_INCREF(arg);
12593  PyTuple_SET_ITEM(args, 0, arg);
12594  result = __Pyx_PyObject_Call(func, args, NULL);
12595  Py_DECREF(args);
12596  return result;
12597 }
12598 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
12599 #if CYTHON_FAST_PYCALL
12600  if (PyFunction_Check(func)) {
12601  return __Pyx_PyFunction_FastCall(func, &arg, 1);
12602  }
12603 #endif
12604 #ifdef __Pyx_CyFunction_USED
12605  if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
12606 #else
12607  if (likely(PyCFunction_Check(func))) {
12608 #endif
12609  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
12610  return __Pyx_PyObject_CallMethO(func, arg);
12611 #if CYTHON_FAST_PYCCALL
12612  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
12613  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
12614 #endif
12615  }
12616  }
12617  return __Pyx__PyObject_CallOneArg(func, arg);
12618 }
12619 #else
12620 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
12621  PyObject *result;
12622  PyObject *args = PyTuple_Pack(1, arg);
12623  if (unlikely(!args)) return NULL;
12624  result = __Pyx_PyObject_Call(func, args, NULL);
12625  Py_DECREF(args);
12626  return result;
12627 }
12628 #endif
12629 
12630 /* PyErrFetchRestore */
12631  #if CYTHON_FAST_THREAD_STATE
12632 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
12633  PyObject *tmp_type, *tmp_value, *tmp_tb;
12634  tmp_type = tstate->curexc_type;
12635  tmp_value = tstate->curexc_value;
12636  tmp_tb = tstate->curexc_traceback;
12637  tstate->curexc_type = type;
12638  tstate->curexc_value = value;
12639  tstate->curexc_traceback = tb;
12640  Py_XDECREF(tmp_type);
12641  Py_XDECREF(tmp_value);
12642  Py_XDECREF(tmp_tb);
12643 }
12644 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
12645  *type = tstate->curexc_type;
12646  *value = tstate->curexc_value;
12647  *tb = tstate->curexc_traceback;
12648  tstate->curexc_type = 0;
12649  tstate->curexc_value = 0;
12650  tstate->curexc_traceback = 0;
12651 }
12652 #endif
12653 
12654 /* RaiseException */
12655  #if PY_MAJOR_VERSION < 3
12656 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
12657  CYTHON_UNUSED PyObject *cause) {
12658  __Pyx_PyThreadState_declare
12659  Py_XINCREF(type);
12660  if (!value || value == Py_None)
12661  value = NULL;
12662  else
12663  Py_INCREF(value);
12664  if (!tb || tb == Py_None)
12665  tb = NULL;
12666  else {
12667  Py_INCREF(tb);
12668  if (!PyTraceBack_Check(tb)) {
12669  PyErr_SetString(PyExc_TypeError,
12670  "raise: arg 3 must be a traceback or None");
12671  goto raise_error;
12672  }
12673  }
12674  if (PyType_Check(type)) {
12675 #if CYTHON_COMPILING_IN_PYPY
12676  if (!value) {
12677  Py_INCREF(Py_None);
12678  value = Py_None;
12679  }
12680 #endif
12681  PyErr_NormalizeException(&type, &value, &tb);
12682  } else {
12683  if (value) {
12684  PyErr_SetString(PyExc_TypeError,
12685  "instance exception may not have a separate value");
12686  goto raise_error;
12687  }
12688  value = type;
12689  type = (PyObject*) Py_TYPE(type);
12690  Py_INCREF(type);
12691  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
12692  PyErr_SetString(PyExc_TypeError,
12693  "raise: exception class must be a subclass of BaseException");
12694  goto raise_error;
12695  }
12696  }
12697  __Pyx_PyThreadState_assign
12698  __Pyx_ErrRestore(type, value, tb);
12699  return;
12700 raise_error:
12701  Py_XDECREF(value);
12702  Py_XDECREF(type);
12703  Py_XDECREF(tb);
12704  return;
12705 }
12706 #else
12707 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
12708  PyObject* owned_instance = NULL;
12709  if (tb == Py_None) {
12710  tb = 0;
12711  } else if (tb && !PyTraceBack_Check(tb)) {
12712  PyErr_SetString(PyExc_TypeError,
12713  "raise: arg 3 must be a traceback or None");
12714  goto bad;
12715  }
12716  if (value == Py_None)
12717  value = 0;
12718  if (PyExceptionInstance_Check(type)) {
12719  if (value) {
12720  PyErr_SetString(PyExc_TypeError,
12721  "instance exception may not have a separate value");
12722  goto bad;
12723  }
12724  value = type;
12725  type = (PyObject*) Py_TYPE(value);
12726  } else if (PyExceptionClass_Check(type)) {
12727  PyObject *instance_class = NULL;
12728  if (value && PyExceptionInstance_Check(value)) {
12729  instance_class = (PyObject*) Py_TYPE(value);
12730  if (instance_class != type) {
12731  int is_subclass = PyObject_IsSubclass(instance_class, type);
12732  if (!is_subclass) {
12733  instance_class = NULL;
12734  } else if (unlikely(is_subclass == -1)) {
12735  goto bad;
12736  } else {
12737  type = instance_class;
12738  }
12739  }
12740  }
12741  if (!instance_class) {
12742  PyObject *args;
12743  if (!value)
12744  args = PyTuple_New(0);
12745  else if (PyTuple_Check(value)) {
12746  Py_INCREF(value);
12747  args = value;
12748  } else
12749  args = PyTuple_Pack(1, value);
12750  if (!args)
12751  goto bad;
12752  owned_instance = PyObject_Call(type, args, NULL);
12753  Py_DECREF(args);
12754  if (!owned_instance)
12755  goto bad;
12756  value = owned_instance;
12757  if (!PyExceptionInstance_Check(value)) {
12758  PyErr_Format(PyExc_TypeError,
12759  "calling %R should have returned an instance of "
12760  "BaseException, not %R",
12761  type, Py_TYPE(value));
12762  goto bad;
12763  }
12764  }
12765  } else {
12766  PyErr_SetString(PyExc_TypeError,
12767  "raise: exception class must be a subclass of BaseException");
12768  goto bad;
12769  }
12770 #if PY_VERSION_HEX >= 0x03030000
12771  if (cause) {
12772 #else
12773  if (cause && cause != Py_None) {
12774 #endif
12775  PyObject *fixed_cause;
12776  if (cause == Py_None) {
12777  fixed_cause = NULL;
12778  } else if (PyExceptionClass_Check(cause)) {
12779  fixed_cause = PyObject_CallObject(cause, NULL);
12780  if (fixed_cause == NULL)
12781  goto bad;
12782  } else if (PyExceptionInstance_Check(cause)) {
12783  fixed_cause = cause;
12784  Py_INCREF(fixed_cause);
12785  } else {
12786  PyErr_SetString(PyExc_TypeError,
12787  "exception causes must derive from "
12788  "BaseException");
12789  goto bad;
12790  }
12791  PyException_SetCause(value, fixed_cause);
12792  }
12793  PyErr_SetObject(type, value);
12794  if (tb) {
12795 #if CYTHON_COMPILING_IN_PYPY
12796  PyObject *tmp_type, *tmp_value, *tmp_tb;
12797  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
12798  Py_INCREF(tb);
12799  PyErr_Restore(tmp_type, tmp_value, tb);
12800  Py_XDECREF(tmp_tb);
12801 #else
12802  PyThreadState *tstate = PyThreadState_GET();
12803  PyObject* tmp_tb = tstate->curexc_traceback;
12804  if (tb != tmp_tb) {
12805  Py_INCREF(tb);
12806  tstate->curexc_traceback = tb;
12807  Py_XDECREF(tmp_tb);
12808  }
12809 #endif
12810  }
12811 bad:
12812  Py_XDECREF(owned_instance);
12813  return;
12814 }
12815 #endif
12816 
12817 /* WriteUnraisableException */
12818  static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
12819  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
12820  int full_traceback, CYTHON_UNUSED int nogil) {
12821  PyObject *old_exc, *old_val, *old_tb;
12822  PyObject *ctx;
12823  __Pyx_PyThreadState_declare
12824 #ifdef WITH_THREAD
12825  PyGILState_STATE state;
12826  if (nogil)
12827  state = PyGILState_Ensure();
12828 #ifdef _MSC_VER
12829  else state = (PyGILState_STATE)-1;
12830 #endif
12831 #endif
12832  __Pyx_PyThreadState_assign
12833  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
12834  if (full_traceback) {
12835  Py_XINCREF(old_exc);
12836  Py_XINCREF(old_val);
12837  Py_XINCREF(old_tb);
12838  __Pyx_ErrRestore(old_exc, old_val, old_tb);
12839  PyErr_PrintEx(1);
12840  }
12841  #if PY_MAJOR_VERSION < 3
12842  ctx = PyString_FromString(name);
12843  #else
12844  ctx = PyUnicode_FromString(name);
12845  #endif
12846  __Pyx_ErrRestore(old_exc, old_val, old_tb);
12847  if (!ctx) {
12848  PyErr_WriteUnraisable(Py_None);
12849  } else {
12850  PyErr_WriteUnraisable(ctx);
12851  Py_DECREF(ctx);
12852  }
12853 #ifdef WITH_THREAD
12854  if (nogil)
12855  PyGILState_Release(state);
12856 #endif
12857 }
12858 
12859 /* ArgTypeTest */
12860  static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
12861  PyErr_Format(PyExc_TypeError,
12862  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
12863  name, type->tp_name, Py_TYPE(obj)->tp_name);
12864 }
12865 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
12866  const char *name, int exact)
12867 {
12868  if (unlikely(!type)) {
12869  PyErr_SetString(PyExc_SystemError, "Missing type object");
12870  return 0;
12871  }
12872  if (none_allowed && obj == Py_None) return 1;
12873  else if (exact) {
12874  if (likely(Py_TYPE(obj) == type)) return 1;
12875  #if PY_MAJOR_VERSION == 2
12876  else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
12877  #endif
12878  }
12879  else {
12880  if (likely(PyObject_TypeCheck(obj, type))) return 1;
12881  }
12882  __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
12883  return 0;
12884 }
12885 
12886 /* PyIntBinop */
12887  #if !CYTHON_COMPILING_IN_PYPY
12888 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
12889  #if PY_MAJOR_VERSION < 3
12890  if (likely(PyInt_CheckExact(op1))) {
12891  const long b = intval;
12892  long x;
12893  long a = PyInt_AS_LONG(op1);
12894  x = (long)((unsigned long)a + b);
12895  if (likely((x^a) >= 0 || (x^b) >= 0))
12896  return PyInt_FromLong(x);
12897  return PyLong_Type.tp_as_number->nb_add(op1, op2);
12898  }
12899  #endif
12900  #if CYTHON_USE_PYLONG_INTERNALS
12901  if (likely(PyLong_CheckExact(op1))) {
12902  const long b = intval;
12903  long a, x;
12904 #ifdef HAVE_LONG_LONG
12905  const PY_LONG_LONG llb = intval;
12906  PY_LONG_LONG lla, llx;
12907 #endif
12908  const digit* digits = ((PyLongObject*)op1)->ob_digit;
12909  const Py_ssize_t size = Py_SIZE(op1);
12910  if (likely(__Pyx_sst_abs(size) <= 1)) {
12911  a = likely(size) ? digits[0] : 0;
12912  if (size == -1) a = -a;
12913  } else {
12914  switch (size) {
12915  case -2:
12916  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
12917  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
12918  break;
12919 #ifdef HAVE_LONG_LONG
12920  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
12921  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
12922  goto long_long;
12923 #endif
12924  }
12925  case 2:
12926  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
12927  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
12928  break;
12929 #ifdef HAVE_LONG_LONG
12930  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
12931  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
12932  goto long_long;
12933 #endif
12934  }
12935  case -3:
12936  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
12937  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
12938  break;
12939 #ifdef HAVE_LONG_LONG
12940  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
12941  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]));
12942  goto long_long;
12943 #endif
12944  }
12945  case 3:
12946  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
12947  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
12948  break;
12949 #ifdef HAVE_LONG_LONG
12950  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
12951  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]));
12952  goto long_long;
12953 #endif
12954  }
12955  case -4:
12956  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
12957  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
12958  break;
12959 #ifdef HAVE_LONG_LONG
12960  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
12961  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]));
12962  goto long_long;
12963 #endif
12964  }
12965  case 4:
12966  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
12967  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
12968  break;
12969 #ifdef HAVE_LONG_LONG
12970  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
12971  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]));
12972  goto long_long;
12973 #endif
12974  }
12975  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
12976  }
12977  }
12978  x = a + b;
12979  return PyLong_FromLong(x);
12980 #ifdef HAVE_LONG_LONG
12981  long_long:
12982  llx = lla + llb;
12983  return PyLong_FromLongLong(llx);
12984 #endif
12985 
12986 
12987  }
12988  #endif
12989  if (PyFloat_CheckExact(op1)) {
12990  const long b = intval;
12991  double a = PyFloat_AS_DOUBLE(op1);
12992  double result;
12993  PyFPE_START_PROTECT("add", return NULL)
12994  result = ((double)a) + (double)b;
12995  PyFPE_END_PROTECT(result)
12996  return PyFloat_FromDouble(result);
12997  }
12998  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
12999 }
13000 #endif
13001 
13002 /* BufferFormatCheck */
13003  static CYTHON_INLINE int __Pyx_IsLittleEndian(void) {
13004  unsigned int n = 1;
13005  return *(unsigned char*)(&n) != 0;
13006 }
13007 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
13008  __Pyx_BufFmt_StackElem* stack,
13009  __Pyx_TypeInfo* type) {
13010  stack[0].field = &ctx->root;
13011  stack[0].parent_offset = 0;
13012  ctx->root.type = type;
13013  ctx->root.name = "buffer dtype";
13014  ctx->root.offset = 0;
13015  ctx->head = stack;
13016  ctx->head->field = &ctx->root;
13017  ctx->fmt_offset = 0;
13018  ctx->head->parent_offset = 0;
13019  ctx->new_packmode = '@';
13020  ctx->enc_packmode = '@';
13021  ctx->new_count = 1;
13022  ctx->enc_count = 0;
13023  ctx->enc_type = 0;
13024  ctx->is_complex = 0;
13025  ctx->is_valid_array = 0;
13026  ctx->struct_alignment = 0;
13027  while (type->typegroup == 'S') {
13028  ++ctx->head;
13029  ctx->head->field = type->fields;
13030  ctx->head->parent_offset = 0;
13031  type = type->fields->type;
13032  }
13033 }
13034 static int __Pyx_BufFmt_ParseNumber(const char** ts) {
13035  int count;
13036  const char* t = *ts;
13037  if (*t < '0' || *t > '9') {
13038  return -1;
13039  } else {
13040  count = *t++ - '0';
13041  while (*t >= '0' && *t < '9') {
13042  count *= 10;
13043  count += *t++ - '0';
13044  }
13045  }
13046  *ts = t;
13047  return count;
13048 }
13049 static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
13050  int number = __Pyx_BufFmt_ParseNumber(ts);
13051  if (number == -1)
13052  PyErr_Format(PyExc_ValueError,\
13053  "Does not understand character buffer dtype format string ('%c')", **ts);
13054  return number;
13055 }
13056 static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
13057  PyErr_Format(PyExc_ValueError,
13058  "Unexpected format string character: '%c'", ch);
13059 }
13060 static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
13061  switch (ch) {
13062  case 'c': return "'char'";
13063  case 'b': return "'signed char'";
13064  case 'B': return "'unsigned char'";
13065  case 'h': return "'short'";
13066  case 'H': return "'unsigned short'";
13067  case 'i': return "'int'";
13068  case 'I': return "'unsigned int'";
13069  case 'l': return "'long'";
13070  case 'L': return "'unsigned long'";
13071  case 'q': return "'long long'";
13072  case 'Q': return "'unsigned long long'";
13073  case 'f': return (is_complex ? "'complex float'" : "'float'");
13074  case 'd': return (is_complex ? "'complex double'" : "'double'");
13075  case 'g': return (is_complex ? "'complex long double'" : "'long double'");
13076  case 'T': return "a struct";
13077  case 'O': return "Python object";
13078  case 'P': return "a pointer";
13079  case 's': case 'p': return "a string";
13080  case 0: return "end";
13081  default: return "unparseable format string";
13082  }
13083 }
13084 static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
13085  switch (ch) {
13086  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
13087  case 'h': case 'H': return 2;
13088  case 'i': case 'I': case 'l': case 'L': return 4;
13089  case 'q': case 'Q': return 8;
13090  case 'f': return (is_complex ? 8 : 4);
13091  case 'd': return (is_complex ? 16 : 8);
13092  case 'g': {
13093  PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
13094  return 0;
13095  }
13096  case 'O': case 'P': return sizeof(void*);
13097  default:
13098  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
13099  return 0;
13100  }
13101 }
13102 static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
13103  switch (ch) {
13104  case 'c': case 'b': case 'B': case 's': case 'p': return 1;
13105  case 'h': case 'H': return sizeof(short);
13106  case 'i': case 'I': return sizeof(int);
13107  case 'l': case 'L': return sizeof(long);
13108  #ifdef HAVE_LONG_LONG
13109  case 'q': case 'Q': return sizeof(PY_LONG_LONG);
13110  #endif
13111  case 'f': return sizeof(float) * (is_complex ? 2 : 1);
13112  case 'd': return sizeof(double) * (is_complex ? 2 : 1);
13113  case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
13114  case 'O': case 'P': return sizeof(void*);
13115  default: {
13116  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
13117  return 0;
13118  }
13119  }
13120 }
13121 typedef struct { char c; short x; } __Pyx_st_short;
13122 typedef struct { char c; int x; } __Pyx_st_int;
13123 typedef struct { char c; long x; } __Pyx_st_long;
13124 typedef struct { char c; float x; } __Pyx_st_float;
13125 typedef struct { char c; double x; } __Pyx_st_double;
13126 typedef struct { char c; long double x; } __Pyx_st_longdouble;
13127 typedef struct { char c; void *x; } __Pyx_st_void_p;
13128 #ifdef HAVE_LONG_LONG
13129 typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
13130 #endif
13131 static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
13132  switch (ch) {
13133  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
13134  case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
13135  case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
13136  case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
13137 #ifdef HAVE_LONG_LONG
13138  case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
13139 #endif
13140  case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
13141  case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
13142  case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
13143  case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
13144  default:
13145  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
13146  return 0;
13147  }
13148 }
13149 /* These are for computing the padding at the end of the struct to align
13150  on the first member of the struct. This will probably the same as above,
13151  but we don't have any guarantees.
13152  */
13153 typedef struct { short x; char c; } __Pyx_pad_short;
13154 typedef struct { int x; char c; } __Pyx_pad_int;
13155 typedef struct { long x; char c; } __Pyx_pad_long;
13156 typedef struct { float x; char c; } __Pyx_pad_float;
13157 typedef struct { double x; char c; } __Pyx_pad_double;
13158 typedef struct { long double x; char c; } __Pyx_pad_longdouble;
13159 typedef struct { void *x; char c; } __Pyx_pad_void_p;
13160 #ifdef HAVE_LONG_LONG
13161 typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
13162 #endif
13163 static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
13164  switch (ch) {
13165  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
13166  case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
13167  case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
13168  case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
13169 #ifdef HAVE_LONG_LONG
13170  case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
13171 #endif
13172  case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
13173  case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
13174  case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
13175  case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
13176  default:
13177  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
13178  return 0;
13179  }
13180 }
13181 static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
13182  switch (ch) {
13183  case 'c':
13184  return 'H';
13185  case 'b': case 'h': case 'i':
13186  case 'l': case 'q': case 's': case 'p':
13187  return 'I';
13188  case 'B': case 'H': case 'I': case 'L': case 'Q':
13189  return 'U';
13190  case 'f': case 'd': case 'g':
13191  return (is_complex ? 'C' : 'R');
13192  case 'O':
13193  return 'O';
13194  case 'P':
13195  return 'P';
13196  default: {
13197  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
13198  return 0;
13199  }
13200  }
13201 }
13202 static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
13203  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
13204  const char* expected;
13205  const char* quote;
13206  if (ctx->head == NULL) {
13207  expected = "end";
13208  quote = "";
13209  } else {
13210  expected = ctx->head->field->type->name;
13211  quote = "'";
13212  }
13213  PyErr_Format(PyExc_ValueError,
13214  "Buffer dtype mismatch, expected %s%s%s but got %s",
13215  quote, expected, quote,
13216  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
13217  } else {
13218  __Pyx_StructField* field = ctx->head->field;
13219  __Pyx_StructField* parent = (ctx->head - 1)->field;
13220  PyErr_Format(PyExc_ValueError,
13221  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
13222  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
13223  parent->type->name, field->name);
13224  }
13225 }
13226 static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
13227  char group;
13228  size_t size, offset, arraysize = 1;
13229  if (ctx->enc_type == 0) return 0;
13230  if (ctx->head->field->type->arraysize[0]) {
13231  int i, ndim = 0;
13232  if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
13233  ctx->is_valid_array = ctx->head->field->type->ndim == 1;
13234  ndim = 1;
13235  if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
13236  PyErr_Format(PyExc_ValueError,
13237  "Expected a dimension of size %zu, got %zu",
13238  ctx->head->field->type->arraysize[0], ctx->enc_count);
13239  return -1;
13240  }
13241  }
13242  if (!ctx->is_valid_array) {
13243  PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
13244  ctx->head->field->type->ndim, ndim);
13245  return -1;
13246  }
13247  for (i = 0; i < ctx->head->field->type->ndim; i++) {
13248  arraysize *= ctx->head->field->type->arraysize[i];
13249  }
13250  ctx->is_valid_array = 0;
13251  ctx->enc_count = 1;
13252  }
13253  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
13254  do {
13255  __Pyx_StructField* field = ctx->head->field;
13256  __Pyx_TypeInfo* type = field->type;
13257  if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
13258  size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
13259  } else {
13260  size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
13261  }
13262  if (ctx->enc_packmode == '@') {
13263  size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
13264  size_t align_mod_offset;
13265  if (align_at == 0) return -1;
13266  align_mod_offset = ctx->fmt_offset % align_at;
13267  if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
13268  if (ctx->struct_alignment == 0)
13269  ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
13270  ctx->is_complex);
13271  }
13272  if (type->size != size || type->typegroup != group) {
13273  if (type->typegroup == 'C' && type->fields != NULL) {
13274  size_t parent_offset = ctx->head->parent_offset + field->offset;
13275  ++ctx->head;
13276  ctx->head->field = type->fields;
13277  ctx->head->parent_offset = parent_offset;
13278  continue;
13279  }
13280  if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
13281  } else {
13282  __Pyx_BufFmt_RaiseExpected(ctx);
13283  return -1;
13284  }
13285  }
13286  offset = ctx->head->parent_offset + field->offset;
13287  if (ctx->fmt_offset != offset) {
13288  PyErr_Format(PyExc_ValueError,
13289  "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
13290  (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
13291  return -1;
13292  }
13293  ctx->fmt_offset += size;
13294  if (arraysize)
13295  ctx->fmt_offset += (arraysize - 1) * size;
13296  --ctx->enc_count;
13297  while (1) {
13298  if (field == &ctx->root) {
13299  ctx->head = NULL;
13300  if (ctx->enc_count != 0) {
13301  __Pyx_BufFmt_RaiseExpected(ctx);
13302  return -1;
13303  }
13304  break;
13305  }
13306  ctx->head->field = ++field;
13307  if (field->type == NULL) {
13308  --ctx->head;
13309  field = ctx->head->field;
13310  continue;
13311  } else if (field->type->typegroup == 'S') {
13312  size_t parent_offset = ctx->head->parent_offset + field->offset;
13313  if (field->type->fields->type == NULL) continue;
13314  field = field->type->fields;
13315  ++ctx->head;
13316  ctx->head->field = field;
13317  ctx->head->parent_offset = parent_offset;
13318  break;
13319  } else {
13320  break;
13321  }
13322  }
13323  } while (ctx->enc_count);
13324  ctx->enc_type = 0;
13325  ctx->is_complex = 0;
13326  return 0;
13327 }
13328 static CYTHON_INLINE PyObject *
13329 __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
13330 {
13331  const char *ts = *tsp;
13332  int i = 0, number;
13333  int ndim = ctx->head->field->type->ndim;
13334 ;
13335  ++ts;
13336  if (ctx->new_count != 1) {
13337  PyErr_SetString(PyExc_ValueError,
13338  "Cannot handle repeated arrays in format string");
13339  return NULL;
13340  }
13341  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
13342  while (*ts && *ts != ')') {
13343  switch (*ts) {
13344  case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;
13345  default: break;
13346  }
13347  number = __Pyx_BufFmt_ExpectNumber(&ts);
13348  if (number == -1) return NULL;
13349  if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
13350  return PyErr_Format(PyExc_ValueError,
13351  "Expected a dimension of size %zu, got %d",
13352  ctx->head->field->type->arraysize[i], number);
13353  if (*ts != ',' && *ts != ')')
13354  return PyErr_Format(PyExc_ValueError,
13355  "Expected a comma in format string, got '%c'", *ts);
13356  if (*ts == ',') ts++;
13357  i++;
13358  }
13359  if (i != ndim)
13360  return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
13361  ctx->head->field->type->ndim, i);
13362  if (!*ts) {
13363  PyErr_SetString(PyExc_ValueError,
13364  "Unexpected end of format string, expected ')'");
13365  return NULL;
13366  }
13367  ctx->is_valid_array = 1;
13368  ctx->new_count = 1;
13369  *tsp = ++ts;
13370  return Py_None;
13371 }
13372 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
13373  int got_Z = 0;
13374  while (1) {
13375  switch(*ts) {
13376  case 0:
13377  if (ctx->enc_type != 0 && ctx->head == NULL) {
13378  __Pyx_BufFmt_RaiseExpected(ctx);
13379  return NULL;
13380  }
13381  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
13382  if (ctx->head != NULL) {
13383  __Pyx_BufFmt_RaiseExpected(ctx);
13384  return NULL;
13385  }
13386  return ts;
13387  case ' ':
13388  case '\r':
13389  case '\n':
13390  ++ts;
13391  break;
13392  case '<':
13393  if (!__Pyx_IsLittleEndian()) {
13394  PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
13395  return NULL;
13396  }
13397  ctx->new_packmode = '=';
13398  ++ts;
13399  break;
13400  case '>':
13401  case '!':
13402  if (__Pyx_IsLittleEndian()) {
13403  PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
13404  return NULL;
13405  }
13406  ctx->new_packmode = '=';
13407  ++ts;
13408  break;
13409  case '=':
13410  case '@':
13411  case '^':
13412  ctx->new_packmode = *ts++;
13413  break;
13414  case 'T':
13415  {
13416  const char* ts_after_sub;
13417  size_t i, struct_count = ctx->new_count;
13418  size_t struct_alignment = ctx->struct_alignment;
13419  ctx->new_count = 1;
13420  ++ts;
13421  if (*ts != '{') {
13422  PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
13423  return NULL;
13424  }
13425  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
13426  ctx->enc_type = 0;
13427  ctx->enc_count = 0;
13428  ctx->struct_alignment = 0;
13429  ++ts;
13430  ts_after_sub = ts;
13431  for (i = 0; i != struct_count; ++i) {
13432  ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
13433  if (!ts_after_sub) return NULL;
13434  }
13435  ts = ts_after_sub;
13436  if (struct_alignment) ctx->struct_alignment = struct_alignment;
13437  }
13438  break;
13439  case '}':
13440  {
13441  size_t alignment = ctx->struct_alignment;
13442  ++ts;
13443  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
13444  ctx->enc_type = 0;
13445  if (alignment && ctx->fmt_offset % alignment) {
13446  ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
13447  }
13448  }
13449  return ts;
13450  case 'x':
13451  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
13452  ctx->fmt_offset += ctx->new_count;
13453  ctx->new_count = 1;
13454  ctx->enc_count = 0;
13455  ctx->enc_type = 0;
13456  ctx->enc_packmode = ctx->new_packmode;
13457  ++ts;
13458  break;
13459  case 'Z':
13460  got_Z = 1;
13461  ++ts;
13462  if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
13463  __Pyx_BufFmt_RaiseUnexpectedChar('Z');
13464  return NULL;
13465  }
13466  case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
13467  case 'l': case 'L': case 'q': case 'Q':
13468  case 'f': case 'd': case 'g':
13469  case 'O': case 'p':
13470  if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
13471  ctx->enc_packmode == ctx->new_packmode) {
13472  ctx->enc_count += ctx->new_count;
13473  ctx->new_count = 1;
13474  got_Z = 0;
13475  ++ts;
13476  break;
13477  }
13478  case 's':
13479  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
13480  ctx->enc_count = ctx->new_count;
13481  ctx->enc_packmode = ctx->new_packmode;
13482  ctx->enc_type = *ts;
13483  ctx->is_complex = got_Z;
13484  ++ts;
13485  ctx->new_count = 1;
13486  got_Z = 0;
13487  break;
13488  case ':':
13489  ++ts;
13490  while(*ts != ':') ++ts;
13491  ++ts;
13492  break;
13493  case '(':
13494  if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
13495  break;
13496  default:
13497  {
13498  int number = __Pyx_BufFmt_ExpectNumber(&ts);
13499  if (number == -1) return NULL;
13500  ctx->new_count = (size_t)number;
13501  }
13502  }
13503  }
13504 }
13505 static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
13506  buf->buf = NULL;
13507  buf->obj = NULL;
13508  buf->strides = __Pyx_zeros;
13509  buf->shape = __Pyx_zeros;
13510  buf->suboffsets = __Pyx_minusones;
13511 }
13512 static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
13513  Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags,
13514  int nd, int cast, __Pyx_BufFmt_StackElem* stack)
13515 {
13516  if (obj == Py_None || obj == NULL) {
13517  __Pyx_ZeroBuffer(buf);
13518  return 0;
13519  }
13520  buf->buf = NULL;
13521  if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail;
13522  if (buf->ndim != nd) {
13523  PyErr_Format(PyExc_ValueError,
13524  "Buffer has wrong number of dimensions (expected %d, got %d)",
13525  nd, buf->ndim);
13526  goto fail;
13527  }
13528  if (!cast) {
13529  __Pyx_BufFmt_Context ctx;
13530  __Pyx_BufFmt_Init(&ctx, stack, dtype);
13531  if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
13532  }
13533  if ((unsigned)buf->itemsize != dtype->size) {
13534  PyErr_Format(PyExc_ValueError,
13535  "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
13536  buf->itemsize, (buf->itemsize > 1) ? "s" : "",
13537  dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
13538  goto fail;
13539  }
13540  if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
13541  return 0;
13542 fail:;
13543  __Pyx_ZeroBuffer(buf);
13544  return -1;
13545 }
13546 static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
13547  if (info->buf == NULL) return;
13548  if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
13549  __Pyx_ReleaseBuffer(info);
13550 }
13551 
13552 /* ExtTypeTest */
13553  static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
13554  if (unlikely(!type)) {
13555  PyErr_SetString(PyExc_SystemError, "Missing type object");
13556  return 0;
13557  }
13558  if (likely(PyObject_TypeCheck(obj, type)))
13559  return 1;
13560  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
13561  Py_TYPE(obj)->tp_name, type->tp_name);
13562  return 0;
13563 }
13564 
13565 /* BufferFallbackError */
13566  static void __Pyx_RaiseBufferFallbackError(void) {
13567  PyErr_SetString(PyExc_ValueError,
13568  "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
13569 }
13570 
13571 /* PyIntBinop */
13572  #if !CYTHON_COMPILING_IN_PYPY
13573 static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
13574  if (op1 == op2) {
13575  Py_RETURN_TRUE;
13576  }
13577  #if PY_MAJOR_VERSION < 3
13578  if (likely(PyInt_CheckExact(op1))) {
13579  const long b = intval;
13580  long a = PyInt_AS_LONG(op1);
13581  if (a == b) {
13582  Py_RETURN_TRUE;
13583  } else {
13584  Py_RETURN_FALSE;
13585  }
13586  }
13587  #endif
13588  #if CYTHON_USE_PYLONG_INTERNALS
13589  if (likely(PyLong_CheckExact(op1))) {
13590  const long b = intval;
13591  long a;
13592  const digit* digits = ((PyLongObject*)op1)->ob_digit;
13593  const Py_ssize_t size = Py_SIZE(op1);
13594  if (likely(__Pyx_sst_abs(size) <= 1)) {
13595  a = likely(size) ? digits[0] : 0;
13596  if (size == -1) a = -a;
13597  } else {
13598  switch (size) {
13599  case -2:
13600  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
13601  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13602  break;
13603  }
13604  case 2:
13605  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
13606  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13607  break;
13608  }
13609  case -3:
13610  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
13611  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13612  break;
13613  }
13614  case 3:
13615  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
13616  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13617  break;
13618  }
13619  case -4:
13620  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
13621  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13622  break;
13623  }
13624  case 4:
13625  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
13626  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13627  break;
13628  }
13629  #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
13630  default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
13631  #else
13632  default: Py_RETURN_FALSE;
13633  #endif
13634  }
13635  }
13636  if (a == b) {
13637  Py_RETURN_TRUE;
13638  } else {
13639  Py_RETURN_FALSE;
13640  }
13641  }
13642  #endif
13643  if (PyFloat_CheckExact(op1)) {
13644  const long b = intval;
13645  double a = PyFloat_AS_DOUBLE(op1);
13646  if ((double)a == (double)b) {
13647  Py_RETURN_TRUE;
13648  } else {
13649  Py_RETURN_FALSE;
13650  }
13651  }
13652  return PyObject_RichCompare(op1, op2, Py_EQ);
13653 }
13654 #endif
13655 
13656 /* KeywordStringCheck */
13657  static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
13658  PyObject *kwdict,
13659  const char* function_name,
13660  int kw_allowed)
13661 {
13662  PyObject* key = 0;
13663  Py_ssize_t pos = 0;
13664 #if CYTHON_COMPILING_IN_PYPY
13665  if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
13666  goto invalid_keyword;
13667  return 1;
13668 #else
13669  while (PyDict_Next(kwdict, &pos, &key, 0)) {
13670  #if PY_MAJOR_VERSION < 3
13671  if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
13672  #endif
13673  if (unlikely(!PyUnicode_Check(key)))
13674  goto invalid_keyword_type;
13675  }
13676  if ((!kw_allowed) && unlikely(key))
13677  goto invalid_keyword;
13678  return 1;
13679 invalid_keyword_type:
13680  PyErr_Format(PyExc_TypeError,
13681  "%.200s() keywords must be strings", function_name);
13682  return 0;
13683 #endif
13684 invalid_keyword:
13685  PyErr_Format(PyExc_TypeError,
13686  #if PY_MAJOR_VERSION < 3
13687  "%.200s() got an unexpected keyword argument '%.200s'",
13688  function_name, PyString_AsString(key));
13689  #else
13690  "%s() got an unexpected keyword argument '%U'",
13691  function_name, key);
13692  #endif
13693  return 0;
13694 }
13695 
13696 /* PyObjectCallNoArg */
13697  #if CYTHON_COMPILING_IN_CPYTHON
13698 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
13699 #if CYTHON_FAST_PYCALL
13700  if (PyFunction_Check(func)) {
13701  return __Pyx_PyFunction_FastCall(func, NULL, 0);
13702  }
13703 #endif
13704 #ifdef __Pyx_CyFunction_USED
13705  if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
13706 #else
13707  if (likely(PyCFunction_Check(func))) {
13708 #endif
13709  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
13710  return __Pyx_PyObject_CallMethO(func, NULL);
13711  }
13712  }
13713  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
13714 }
13715 #endif
13716 
13717 /* PyObjectCallMethod1 */
13718  static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
13719  PyObject *method, *result = NULL;
13720  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
13721  if (unlikely(!method)) goto done;
13722 #if CYTHON_UNPACK_METHODS
13723  if (likely(PyMethod_Check(method))) {
13724  PyObject *self = PyMethod_GET_SELF(method);
13725  if (likely(self)) {
13726  PyObject *args;
13727  PyObject *function = PyMethod_GET_FUNCTION(method);
13728  #if CYTHON_FAST_PYCALL
13729  if (PyFunction_Check(function)) {
13730  PyObject *args[2] = {self, arg};
13731  result = __Pyx_PyFunction_FastCall(function, args, 2);
13732  goto done;
13733  }
13734  #endif
13735  #if CYTHON_FAST_PYCCALL
13736  if (__Pyx_PyFastCFunction_Check(function)) {
13737  PyObject *args[2] = {self, arg};
13738  result = __Pyx_PyCFunction_FastCall(function, args, 2);
13739  goto done;
13740  }
13741  #endif
13742  args = PyTuple_New(2);
13743  if (unlikely(!args)) goto done;
13744  Py_INCREF(self);
13745  PyTuple_SET_ITEM(args, 0, self);
13746  Py_INCREF(arg);
13747  PyTuple_SET_ITEM(args, 1, arg);
13748  Py_INCREF(function);
13749  Py_DECREF(method); method = NULL;
13750  result = __Pyx_PyObject_Call(function, args, NULL);
13751  Py_DECREF(args);
13752  Py_DECREF(function);
13753  return result;
13754  }
13755  }
13756 #endif
13757  result = __Pyx_PyObject_CallOneArg(method, arg);
13758 done:
13759  Py_XDECREF(method);
13760  return result;
13761 }
13762 
13763 /* append */
13764  static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
13765  if (likely(PyList_CheckExact(L))) {
13766  if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
13767  } else {
13768  PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
13769  if (unlikely(!retval))
13770  return -1;
13771  Py_DECREF(retval);
13772  }
13773  return 0;
13774 }
13775 
13776 /* RaiseTooManyValuesToUnpack */
13777  static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
13778  PyErr_Format(PyExc_ValueError,
13779  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
13780 }
13781 
13782 /* RaiseNeedMoreValuesToUnpack */
13783  static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
13784  PyErr_Format(PyExc_ValueError,
13785  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
13786  index, (index == 1) ? "" : "s");
13787 }
13788 
13789 /* RaiseNoneIterError */
13790  static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
13791  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
13792 }
13793 
13794 /* SaveResetException */
13795  #if CYTHON_FAST_THREAD_STATE
13796 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
13797  *type = tstate->exc_type;
13798  *value = tstate->exc_value;
13799  *tb = tstate->exc_traceback;
13800  Py_XINCREF(*type);
13801  Py_XINCREF(*value);
13802  Py_XINCREF(*tb);
13803 }
13804 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
13805  PyObject *tmp_type, *tmp_value, *tmp_tb;
13806  tmp_type = tstate->exc_type;
13807  tmp_value = tstate->exc_value;
13808  tmp_tb = tstate->exc_traceback;
13809  tstate->exc_type = type;
13810  tstate->exc_value = value;
13811  tstate->exc_traceback = tb;
13812  Py_XDECREF(tmp_type);
13813  Py_XDECREF(tmp_value);
13814  Py_XDECREF(tmp_tb);
13815 }
13816 #endif
13817 
13818 /* PyErrExceptionMatches */
13819  #if CYTHON_FAST_THREAD_STATE
13820 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
13821  PyObject *exc_type = tstate->curexc_type;
13822  if (exc_type == err) return 1;
13823  if (unlikely(!exc_type)) return 0;
13824  return PyErr_GivenExceptionMatches(exc_type, err);
13825 }
13826 #endif
13827 
13828 /* GetException */
13829  #if CYTHON_FAST_THREAD_STATE
13830 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
13831 #else
13832 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
13833 #endif
13834  PyObject *local_type, *local_value, *local_tb;
13835 #if CYTHON_FAST_THREAD_STATE
13836  PyObject *tmp_type, *tmp_value, *tmp_tb;
13837  local_type = tstate->curexc_type;
13838  local_value = tstate->curexc_value;
13839  local_tb = tstate->curexc_traceback;
13840  tstate->curexc_type = 0;
13841  tstate->curexc_value = 0;
13842  tstate->curexc_traceback = 0;
13843 #else
13844  PyErr_Fetch(&local_type, &local_value, &local_tb);
13845 #endif
13846  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
13847 #if CYTHON_FAST_THREAD_STATE
13848  if (unlikely(tstate->curexc_type))
13849 #else
13850  if (unlikely(PyErr_Occurred()))
13851 #endif
13852  goto bad;
13853  #if PY_MAJOR_VERSION >= 3
13854  if (local_tb) {
13855  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
13856  goto bad;
13857  }
13858  #endif
13859  Py_XINCREF(local_tb);
13860  Py_XINCREF(local_type);
13861  Py_XINCREF(local_value);
13862  *type = local_type;
13863  *value = local_value;
13864  *tb = local_tb;
13865 #if CYTHON_FAST_THREAD_STATE
13866  tmp_type = tstate->exc_type;
13867  tmp_value = tstate->exc_value;
13868  tmp_tb = tstate->exc_traceback;
13869  tstate->exc_type = local_type;
13870  tstate->exc_value = local_value;
13871  tstate->exc_traceback = local_tb;
13872  Py_XDECREF(tmp_type);
13873  Py_XDECREF(tmp_value);
13874  Py_XDECREF(tmp_tb);
13875 #else
13876  PyErr_SetExcInfo(local_type, local_value, local_tb);
13877 #endif
13878  return 0;
13879 bad:
13880  *type = 0;
13881  *value = 0;
13882  *tb = 0;
13883  Py_XDECREF(local_type);
13884  Py_XDECREF(local_value);
13885  Py_XDECREF(local_tb);
13886  return -1;
13887 }
13888 
13889 /* SetVTable */
13890  static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
13891 #if PY_VERSION_HEX >= 0x02070000
13892  PyObject *ob = PyCapsule_New(vtable, 0, 0);
13893 #else
13894  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
13895 #endif
13896  if (!ob)
13897  goto bad;
13898  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
13899  goto bad;
13900  Py_DECREF(ob);
13901  return 0;
13902 bad:
13903  Py_XDECREF(ob);
13904  return -1;
13905 }
13906 
13907 /* Import */
13908  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
13909  PyObject *empty_list = 0;
13910  PyObject *module = 0;
13911  PyObject *global_dict = 0;
13912  PyObject *empty_dict = 0;
13913  PyObject *list;
13914  #if PY_VERSION_HEX < 0x03030000
13915  PyObject *py_import;
13916  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
13917  if (!py_import)
13918  goto bad;
13919  #endif
13920  if (from_list)
13921  list = from_list;
13922  else {
13923  empty_list = PyList_New(0);
13924  if (!empty_list)
13925  goto bad;
13926  list = empty_list;
13927  }
13928  global_dict = PyModule_GetDict(__pyx_m);
13929  if (!global_dict)
13930  goto bad;
13931  empty_dict = PyDict_New();
13932  if (!empty_dict)
13933  goto bad;
13934  {
13935  #if PY_MAJOR_VERSION >= 3
13936  if (level == -1) {
13937  if (strchr(__Pyx_MODULE_NAME, '.')) {
13938  #if PY_VERSION_HEX < 0x03030000
13939  PyObject *py_level = PyInt_FromLong(1);
13940  if (!py_level)
13941  goto bad;
13942  module = PyObject_CallFunctionObjArgs(py_import,
13943  name, global_dict, empty_dict, list, py_level, NULL);
13944  Py_DECREF(py_level);
13945  #else
13946  module = PyImport_ImportModuleLevelObject(
13947  name, global_dict, empty_dict, list, 1);
13948  #endif
13949  if (!module) {
13950  if (!PyErr_ExceptionMatches(PyExc_ImportError))
13951  goto bad;
13952  PyErr_Clear();
13953  }
13954  }
13955  level = 0;
13956  }
13957  #endif
13958  if (!module) {
13959  #if PY_VERSION_HEX < 0x03030000
13960  PyObject *py_level = PyInt_FromLong(level);
13961  if (!py_level)
13962  goto bad;
13963  module = PyObject_CallFunctionObjArgs(py_import,
13964  name, global_dict, empty_dict, list, py_level, NULL);
13965  Py_DECREF(py_level);
13966  #else
13967  module = PyImport_ImportModuleLevelObject(
13968  name, global_dict, empty_dict, list, level);
13969  #endif
13970  }
13971  }
13972 bad:
13973  #if PY_VERSION_HEX < 0x03030000
13974  Py_XDECREF(py_import);
13975  #endif
13976  Py_XDECREF(empty_list);
13977  Py_XDECREF(empty_dict);
13978  return module;
13979 }
13980 
13981 /* CalculateMetaclass */
13982  static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
13983  Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
13984  for (i=0; i < nbases; i++) {
13985  PyTypeObject *tmptype;
13986  PyObject *tmp = PyTuple_GET_ITEM(bases, i);
13987  tmptype = Py_TYPE(tmp);
13988 #if PY_MAJOR_VERSION < 3
13989  if (tmptype == &PyClass_Type)
13990  continue;
13991 #endif
13992  if (!metaclass) {
13993  metaclass = tmptype;
13994  continue;
13995  }
13996  if (PyType_IsSubtype(metaclass, tmptype))
13997  continue;
13998  if (PyType_IsSubtype(tmptype, metaclass)) {
13999  metaclass = tmptype;
14000  continue;
14001  }
14002  PyErr_SetString(PyExc_TypeError,
14003  "metaclass conflict: "
14004  "the metaclass of a derived class "
14005  "must be a (non-strict) subclass "
14006  "of the metaclasses of all its bases");
14007  return NULL;
14008  }
14009  if (!metaclass) {
14010 #if PY_MAJOR_VERSION < 3
14011  metaclass = &PyClass_Type;
14012 #else
14013  metaclass = &PyType_Type;
14014 #endif
14015  }
14016  Py_INCREF((PyObject*) metaclass);
14017  return (PyObject*) metaclass;
14018 }
14019 
14020 /* Py3ClassCreate */
14021  static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
14022  PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
14023  PyObject *ns;
14024  if (metaclass) {
14025  PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
14026  if (prep) {
14027  PyObject *pargs = PyTuple_Pack(2, name, bases);
14028  if (unlikely(!pargs)) {
14029  Py_DECREF(prep);
14030  return NULL;
14031  }
14032  ns = PyObject_Call(prep, pargs, mkw);
14033  Py_DECREF(prep);
14034  Py_DECREF(pargs);
14035  } else {
14036  if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
14037  return NULL;
14038  PyErr_Clear();
14039  ns = PyDict_New();
14040  }
14041  } else {
14042  ns = PyDict_New();
14043  }
14044  if (unlikely(!ns))
14045  return NULL;
14046  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
14047  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
14048  if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
14049  return ns;
14050 bad:
14051  Py_DECREF(ns);
14052  return NULL;
14053 }
14054 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
14055  PyObject *dict, PyObject *mkw,
14056  int calculate_metaclass, int allow_py2_metaclass) {
14057  PyObject *result, *margs;
14058  PyObject *owned_metaclass = NULL;
14059  if (allow_py2_metaclass) {
14060  owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
14061  if (owned_metaclass) {
14062  metaclass = owned_metaclass;
14063  } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
14064  PyErr_Clear();
14065  } else {
14066  return NULL;
14067  }
14068  }
14069  if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
14070  metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
14071  Py_XDECREF(owned_metaclass);
14072  if (unlikely(!metaclass))
14073  return NULL;
14074  owned_metaclass = metaclass;
14075  }
14076  margs = PyTuple_Pack(3, name, bases, dict);
14077  if (unlikely(!margs)) {
14078  result = NULL;
14079  } else {
14080  result = PyObject_Call(metaclass, margs, mkw);
14081  Py_DECREF(margs);
14082  }
14083  Py_XDECREF(owned_metaclass);
14084  return result;
14085 }
14086 
14087 /* CodeObjectCache */
14088  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
14089  int start = 0, mid = 0, end = count - 1;
14090  if (end >= 0 && code_line > entries[end].code_line) {
14091  return count;
14092  }
14093  while (start < end) {
14094  mid = start + (end - start) / 2;
14095  if (code_line < entries[mid].code_line) {
14096  end = mid;
14097  } else if (code_line > entries[mid].code_line) {
14098  start = mid + 1;
14099  } else {
14100  return mid;
14101  }
14102  }
14103  if (code_line <= entries[mid].code_line) {
14104  return mid;
14105  } else {
14106  return mid + 1;
14107  }
14108 }
14109 static PyCodeObject *__pyx_find_code_object(int code_line) {
14110  PyCodeObject* code_object;
14111  int pos;
14112  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
14113  return NULL;
14114  }
14115  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
14116  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
14117  return NULL;
14118  }
14119  code_object = __pyx_code_cache.entries[pos].code_object;
14120  Py_INCREF(code_object);
14121  return code_object;
14122 }
14123 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
14124  int pos, i;
14125  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
14126  if (unlikely(!code_line)) {
14127  return;
14128  }
14129  if (unlikely(!entries)) {
14130  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
14131  if (likely(entries)) {
14132  __pyx_code_cache.entries = entries;
14133  __pyx_code_cache.max_count = 64;
14134  __pyx_code_cache.count = 1;
14135  entries[0].code_line = code_line;
14136  entries[0].code_object = code_object;
14137  Py_INCREF(code_object);
14138  }
14139  return;
14140  }
14141  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
14142  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
14143  PyCodeObject* tmp = entries[pos].code_object;
14144  entries[pos].code_object = code_object;
14145  Py_DECREF(tmp);
14146  return;
14147  }
14148  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
14149  int new_max = __pyx_code_cache.max_count + 64;
14150  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
14151  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
14152  if (unlikely(!entries)) {
14153  return;
14154  }
14155  __pyx_code_cache.entries = entries;
14156  __pyx_code_cache.max_count = new_max;
14157  }
14158  for (i=__pyx_code_cache.count; i>pos; i--) {
14159  entries[i] = entries[i-1];
14160  }
14161  entries[pos].code_line = code_line;
14162  entries[pos].code_object = code_object;
14163  __pyx_code_cache.count++;
14164  Py_INCREF(code_object);
14165 }
14166 
14167 /* AddTraceback */
14168  #include "compile.h"
14169 #include "frameobject.h"
14170 #include "traceback.h"
14171 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
14172  const char *funcname, int c_line,
14173  int py_line, const char *filename) {
14174  PyCodeObject *py_code = 0;
14175  PyObject *py_srcfile = 0;
14176  PyObject *py_funcname = 0;
14177  #if PY_MAJOR_VERSION < 3
14178  py_srcfile = PyString_FromString(filename);
14179  #else
14180  py_srcfile = PyUnicode_FromString(filename);
14181  #endif
14182  if (!py_srcfile) goto bad;
14183  if (c_line) {
14184  #if PY_MAJOR_VERSION < 3
14185  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
14186  #else
14187  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
14188  #endif
14189  }
14190  else {
14191  #if PY_MAJOR_VERSION < 3
14192  py_funcname = PyString_FromString(funcname);
14193  #else
14194  py_funcname = PyUnicode_FromString(funcname);
14195  #endif
14196  }
14197  if (!py_funcname) goto bad;
14198  py_code = __Pyx_PyCode_New(
14199  0,
14200  0,
14201  0,
14202  0,
14203  0,
14204  __pyx_empty_bytes, /*PyObject *code,*/
14205  __pyx_empty_tuple, /*PyObject *consts,*/
14206  __pyx_empty_tuple, /*PyObject *names,*/
14207  __pyx_empty_tuple, /*PyObject *varnames,*/
14208  __pyx_empty_tuple, /*PyObject *freevars,*/
14209  __pyx_empty_tuple, /*PyObject *cellvars,*/
14210  py_srcfile, /*PyObject *filename,*/
14211  py_funcname, /*PyObject *name,*/
14212  py_line,
14213  __pyx_empty_bytes /*PyObject *lnotab*/
14214  );
14215  Py_DECREF(py_srcfile);
14216  Py_DECREF(py_funcname);
14217  return py_code;
14218 bad:
14219  Py_XDECREF(py_srcfile);
14220  Py_XDECREF(py_funcname);
14221  return NULL;
14222 }
14223 static void __Pyx_AddTraceback(const char *funcname, int c_line,
14224  int py_line, const char *filename) {
14225  PyCodeObject *py_code = 0;
14226  PyFrameObject *py_frame = 0;
14227  py_code = __pyx_find_code_object(c_line ? c_line : py_line);
14228  if (!py_code) {
14229  py_code = __Pyx_CreateCodeObjectForTraceback(
14230  funcname, c_line, py_line, filename);
14231  if (!py_code) goto bad;
14232  __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
14233  }
14234  py_frame = PyFrame_New(
14235  PyThreadState_GET(), /*PyThreadState *tstate,*/
14236  py_code, /*PyCodeObject *code,*/
14237  __pyx_d, /*PyObject *globals,*/
14238  0 /*PyObject *locals*/
14239  );
14240  if (!py_frame) goto bad;
14241  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
14242  PyTraceBack_Here(py_frame);
14243 bad:
14244  Py_XDECREF(py_code);
14245  Py_XDECREF(py_frame);
14246 }
14247 
14248 #if PY_MAJOR_VERSION < 3
14249 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
14250  if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
14251  if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
14252  PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
14253  return -1;
14254 }
14255 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
14256  PyObject *obj = view->obj;
14257  if (!obj) return;
14258  if (PyObject_CheckBuffer(obj)) {
14259  PyBuffer_Release(view);
14260  return;
14261  }
14262  if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; }
14263  Py_DECREF(obj);
14264  view->obj = NULL;
14265 }
14266 #endif
14267 
14268 
14269  /* CIntToPy */
14270  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
14271  const int neg_one = (int) -1, const_zero = (int) 0;
14272  const int is_unsigned = neg_one > const_zero;
14273  if (is_unsigned) {
14274  if (sizeof(int) < sizeof(long)) {
14275  return PyInt_FromLong((long) value);
14276  } else if (sizeof(int) <= sizeof(unsigned long)) {
14277  return PyLong_FromUnsignedLong((unsigned long) value);
14278 #ifdef HAVE_LONG_LONG
14279  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
14280  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14281 #endif
14282  }
14283  } else {
14284  if (sizeof(int) <= sizeof(long)) {
14285  return PyInt_FromLong((long) value);
14286 #ifdef HAVE_LONG_LONG
14287  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
14288  return PyLong_FromLongLong((PY_LONG_LONG) value);
14289 #endif
14290  }
14291  }
14292  {
14293  int one = 1; int little = (int)*(unsigned char *)&one;
14294  unsigned char *bytes = (unsigned char *)&value;
14295  return _PyLong_FromByteArray(bytes, sizeof(int),
14296  little, !is_unsigned);
14297  }
14298 }
14299 
14300 static PyObject* __pyx_convert__to_py_amns_c_version_type(amns_c_version_type s) {
14301  PyObject* res;
14302  PyObject* member;
14303  res = PyDict_New(); if (unlikely(!res)) return NULL;
14304  member = __Pyx_PyObject_FromString(s.string); if (unlikely(!member)) goto bad;
14305  if (unlikely(PyDict_SetItem(res, __pyx_n_s_string, member) < 0)) goto bad;
14306  Py_DECREF(member);
14307  member = __Pyx_PyInt_From_int(s.number); if (unlikely(!member)) goto bad;
14308  if (unlikely(PyDict_SetItem(res, __pyx_n_s_number, member) < 0)) goto bad;
14309  Py_DECREF(member);
14310  member = __Pyx_PyObject_FromString(s.backend); if (unlikely(!member)) goto bad;
14311  if (unlikely(PyDict_SetItem(res, __pyx_n_s_backend, member) < 0)) goto bad;
14312  Py_DECREF(member);
14313  member = __Pyx_PyObject_FromString(s.user); if (unlikely(!member)) goto bad;
14314  if (unlikely(PyDict_SetItem(res, __pyx_n_s_user, member) < 0)) goto bad;
14315  Py_DECREF(member);
14316  return res;
14317  bad:
14318  Py_XDECREF(member);
14319  Py_DECREF(res);
14320  return NULL;
14321  }
14322  /* Print */
14323  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
14324 static PyObject *__Pyx_GetStdout(void) {
14325  PyObject *f = PySys_GetObject((char *)"stdout");
14326  if (!f) {
14327  PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
14328  }
14329  return f;
14330 }
14331 static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
14332  int i;
14333  if (!f) {
14334  if (!(f = __Pyx_GetStdout()))
14335  return -1;
14336  }
14337  Py_INCREF(f);
14338  for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
14339  PyObject* v;
14340  if (PyFile_SoftSpace(f, 1)) {
14341  if (PyFile_WriteString(" ", f) < 0)
14342  goto error;
14343  }
14344  v = PyTuple_GET_ITEM(arg_tuple, i);
14345  if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
14346  goto error;
14347  if (PyString_Check(v)) {
14348  char *s = PyString_AsString(v);
14349  Py_ssize_t len = PyString_Size(v);
14350  if (len > 0) {
14351  switch (s[len-1]) {
14352  case ' ': break;
14353  case '\f': case '\r': case '\n': case '\t': case '\v':
14354  PyFile_SoftSpace(f, 0);
14355  break;
14356  default: break;
14357  }
14358  }
14359  }
14360  }
14361  if (newline) {
14362  if (PyFile_WriteString("\n", f) < 0)
14363  goto error;
14364  PyFile_SoftSpace(f, 0);
14365  }
14366  Py_DECREF(f);
14367  return 0;
14368 error:
14369  Py_DECREF(f);
14370  return -1;
14371 }
14372 #else
14373 static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
14374  PyObject* kwargs = 0;
14375  PyObject* result = 0;
14376  PyObject* end_string;
14377  if (unlikely(!__pyx_print)) {
14378  __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
14379  if (!__pyx_print)
14380  return -1;
14381  }
14382  if (stream) {
14383  kwargs = PyDict_New();
14384  if (unlikely(!kwargs))
14385  return -1;
14386  if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
14387  goto bad;
14388  if (!newline) {
14389  end_string = PyUnicode_FromStringAndSize(" ", 1);
14390  if (unlikely(!end_string))
14391  goto bad;
14392  if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
14393  Py_DECREF(end_string);
14394  goto bad;
14395  }
14396  Py_DECREF(end_string);
14397  }
14398  } else if (!newline) {
14399  if (unlikely(!__pyx_print_kwargs)) {
14400  __pyx_print_kwargs = PyDict_New();
14401  if (unlikely(!__pyx_print_kwargs))
14402  return -1;
14403  end_string = PyUnicode_FromStringAndSize(" ", 1);
14404  if (unlikely(!end_string))
14405  return -1;
14406  if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
14407  Py_DECREF(end_string);
14408  return -1;
14409  }
14410  Py_DECREF(end_string);
14411  }
14412  kwargs = __pyx_print_kwargs;
14413  }
14414  result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
14415  if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
14416  Py_DECREF(kwargs);
14417  if (!result)
14418  return -1;
14419  Py_DECREF(result);
14420  return 0;
14421 bad:
14422  if (kwargs != __pyx_print_kwargs)
14423  Py_XDECREF(kwargs);
14424  return -1;
14425 }
14426 #endif
14427 
14428 /* CIntFromPyVerify */
14429  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
14430  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
14431 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
14432  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
14433 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
14434  {\
14435  func_type value = func_value;\
14436  if (sizeof(target_type) < sizeof(func_type)) {\
14437  if (unlikely(value != (func_type) (target_type) value)) {\
14438  func_type zero = 0;\
14439  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
14440  return (target_type) -1;\
14441  if (is_unsigned && unlikely(value < zero))\
14442  goto raise_neg_overflow;\
14443  else\
14444  goto raise_overflow;\
14445  }\
14446  }\
14447  return (target_type) value;\
14448  }
14449 
14450 static PyObject* __pyx_convert__to_py_amns_c_reactant_type(amns_c_reactant_type s) {
14451  PyObject* res;
14452  PyObject* member;
14453  res = PyDict_New(); if (unlikely(!res)) return NULL;
14454  member = PyFloat_FromDouble(s.ZN); if (unlikely(!member)) goto bad;
14455  if (unlikely(PyDict_SetItem(res, __pyx_n_s_ZN, member) < 0)) goto bad;
14456  Py_DECREF(member);
14457  member = PyFloat_FromDouble(s.ZA); if (unlikely(!member)) goto bad;
14458  if (unlikely(PyDict_SetItem(res, __pyx_n_s_ZA, member) < 0)) goto bad;
14459  Py_DECREF(member);
14460  member = PyFloat_FromDouble(s.MI); if (unlikely(!member)) goto bad;
14461  if (unlikely(PyDict_SetItem(res, __pyx_n_s_MI, member) < 0)) goto bad;
14462  Py_DECREF(member);
14463  member = __Pyx_PyInt_From_int(s.LR); if (unlikely(!member)) goto bad;
14464  if (unlikely(PyDict_SetItem(res, __pyx_n_s_LR, member) < 0)) goto bad;
14465  Py_DECREF(member);
14466  member = PyFloat_FromDouble(s.real_specifier); if (unlikely(!member)) goto bad;
14467  if (unlikely(PyDict_SetItem(res, __pyx_n_s_real_specifier, member) < 0)) goto bad;
14468  Py_DECREF(member);
14469  member = __Pyx_PyInt_From_int(s.int_specifier); if (unlikely(!member)) goto bad;
14470  if (unlikely(PyDict_SetItem(res, __pyx_n_s_int_specifier, member) < 0)) goto bad;
14471  Py_DECREF(member);
14472  return res;
14473  bad:
14474  Py_XDECREF(member);
14475  Py_DECREF(res);
14476  return NULL;
14477  }
14478  /* Declarations */
14479  #if CYTHON_CCOMPLEX
14480  #ifdef __cplusplus
14481  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
14482  return ::std::complex< float >(x, y);
14483  }
14484  #else
14485  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
14486  return x + y*(__pyx_t_float_complex)_Complex_I;
14487  }
14488  #endif
14489 #else
14490  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
14491  __pyx_t_float_complex z;
14492  z.real = x;
14493  z.imag = y;
14494  return z;
14495  }
14496 #endif
14497 
14498 /* Arithmetic */
14499  #if CYTHON_CCOMPLEX
14500 #else
14501  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
14502  return (a.real == b.real) && (a.imag == b.imag);
14503  }
14504  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
14505  __pyx_t_float_complex z;
14506  z.real = a.real + b.real;
14507  z.imag = a.imag + b.imag;
14508  return z;
14509  }
14510  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
14511  __pyx_t_float_complex z;
14512  z.real = a.real - b.real;
14513  z.imag = a.imag - b.imag;
14514  return z;
14515  }
14516  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
14517  __pyx_t_float_complex z;
14518  z.real = a.real * b.real - a.imag * b.imag;
14519  z.imag = a.real * b.imag + a.imag * b.real;
14520  return z;
14521  }
14522  #if 1
14523  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
14524  if (b.imag == 0) {
14525  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
14526  } else if (fabsf(b.real) >= fabsf(b.imag)) {
14527  if (b.real == 0 && b.imag == 0) {
14528  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
14529  } else {
14530  float r = b.imag / b.real;
14531  float s = 1.0 / (b.real + b.imag * r);
14532  return __pyx_t_float_complex_from_parts(
14533  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
14534  }
14535  } else {
14536  float r = b.real / b.imag;
14537  float s = 1.0 / (b.imag + b.real * r);
14538  return __pyx_t_float_complex_from_parts(
14539  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
14540  }
14541  }
14542  #else
14543  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
14544  if (b.imag == 0) {
14545  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
14546  } else {
14547  float denom = b.real * b.real + b.imag * b.imag;
14548  return __pyx_t_float_complex_from_parts(
14549  (a.real * b.real + a.imag * b.imag) / denom,
14550  (a.imag * b.real - a.real * b.imag) / denom);
14551  }
14552  }
14553  #endif
14554  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
14555  __pyx_t_float_complex z;
14556  z.real = -a.real;
14557  z.imag = -a.imag;
14558  return z;
14559  }
14560  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
14561  return (a.real == 0) && (a.imag == 0);
14562  }
14563  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
14564  __pyx_t_float_complex z;
14565  z.real = a.real;
14566  z.imag = -a.imag;
14567  return z;
14568  }
14569  #if 1
14570  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
14571  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
14572  return sqrtf(z.real*z.real + z.imag*z.imag);
14573  #else
14574  return hypotf(z.real, z.imag);
14575  #endif
14576  }
14577  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
14578  __pyx_t_float_complex z;
14579  float r, lnr, theta, z_r, z_theta;
14580  if (b.imag == 0 && b.real == (int)b.real) {
14581  if (b.real < 0) {
14582  float denom = a.real * a.real + a.imag * a.imag;
14583  a.real = a.real / denom;
14584  a.imag = -a.imag / denom;
14585  b.real = -b.real;
14586  }
14587  switch ((int)b.real) {
14588  case 0:
14589  z.real = 1;
14590  z.imag = 0;
14591  return z;
14592  case 1:
14593  return a;
14594  case 2:
14595  z = __Pyx_c_prod_float(a, a);
14596  return __Pyx_c_prod_float(a, a);
14597  case 3:
14598  z = __Pyx_c_prod_float(a, a);
14599  return __Pyx_c_prod_float(z, a);
14600  case 4:
14601  z = __Pyx_c_prod_float(a, a);
14602  return __Pyx_c_prod_float(z, z);
14603  }
14604  }
14605  if (a.imag == 0) {
14606  if (a.real == 0) {
14607  return a;
14608  } else if (b.imag == 0) {
14609  z.real = powf(a.real, b.real);
14610  z.imag = 0;
14611  return z;
14612  } else if (a.real > 0) {
14613  r = a.real;
14614  theta = 0;
14615  } else {
14616  r = -a.real;
14617  theta = atan2f(0, -1);
14618  }
14619  } else {
14620  r = __Pyx_c_abs_float(a);
14621  theta = atan2f(a.imag, a.real);
14622  }
14623  lnr = logf(r);
14624  z_r = expf(lnr * b.real - theta * b.imag);
14625  z_theta = theta * b.real + lnr * b.imag;
14626  z.real = z_r * cosf(z_theta);
14627  z.imag = z_r * sinf(z_theta);
14628  return z;
14629  }
14630  #endif
14631 #endif
14632 
14633 /* Declarations */
14634  #if CYTHON_CCOMPLEX
14635  #ifdef __cplusplus
14636  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
14637  return ::std::complex< double >(x, y);
14638  }
14639  #else
14640  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
14641  return x + y*(__pyx_t_double_complex)_Complex_I;
14642  }
14643  #endif
14644 #else
14645  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
14646  __pyx_t_double_complex z;
14647  z.real = x;
14648  z.imag = y;
14649  return z;
14650  }
14651 #endif
14652 
14653 /* Arithmetic */
14654  #if CYTHON_CCOMPLEX
14655 #else
14656  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
14657  return (a.real == b.real) && (a.imag == b.imag);
14658  }
14659  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
14660  __pyx_t_double_complex z;
14661  z.real = a.real + b.real;
14662  z.imag = a.imag + b.imag;
14663  return z;
14664  }
14665  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
14666  __pyx_t_double_complex z;
14667  z.real = a.real - b.real;
14668  z.imag = a.imag - b.imag;
14669  return z;
14670  }
14671  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
14672  __pyx_t_double_complex z;
14673  z.real = a.real * b.real - a.imag * b.imag;
14674  z.imag = a.real * b.imag + a.imag * b.real;
14675  return z;
14676  }
14677  #if 1
14678  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
14679  if (b.imag == 0) {
14680  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
14681  } else if (fabs(b.real) >= fabs(b.imag)) {
14682  if (b.real == 0 && b.imag == 0) {
14683  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
14684  } else {
14685  double r = b.imag / b.real;
14686  double s = 1.0 / (b.real + b.imag * r);
14687  return __pyx_t_double_complex_from_parts(
14688  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
14689  }
14690  } else {
14691  double r = b.real / b.imag;
14692  double s = 1.0 / (b.imag + b.real * r);
14693  return __pyx_t_double_complex_from_parts(
14694  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
14695  }
14696  }
14697  #else
14698  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
14699  if (b.imag == 0) {
14700  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
14701  } else {
14702  double denom = b.real * b.real + b.imag * b.imag;
14703  return __pyx_t_double_complex_from_parts(
14704  (a.real * b.real + a.imag * b.imag) / denom,
14705  (a.imag * b.real - a.real * b.imag) / denom);
14706  }
14707  }
14708  #endif
14709  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
14710  __pyx_t_double_complex z;
14711  z.real = -a.real;
14712  z.imag = -a.imag;
14713  return z;
14714  }
14715  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
14716  return (a.real == 0) && (a.imag == 0);
14717  }
14718  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
14719  __pyx_t_double_complex z;
14720  z.real = a.real;
14721  z.imag = -a.imag;
14722  return z;
14723  }
14724  #if 1
14725  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
14726  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
14727  return sqrt(z.real*z.real + z.imag*z.imag);
14728  #else
14729  return hypot(z.real, z.imag);
14730  #endif
14731  }
14732  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
14733  __pyx_t_double_complex z;
14734  double r, lnr, theta, z_r, z_theta;
14735  if (b.imag == 0 && b.real == (int)b.real) {
14736  if (b.real < 0) {
14737  double denom = a.real * a.real + a.imag * a.imag;
14738  a.real = a.real / denom;
14739  a.imag = -a.imag / denom;
14740  b.real = -b.real;
14741  }
14742  switch ((int)b.real) {
14743  case 0:
14744  z.real = 1;
14745  z.imag = 0;
14746  return z;
14747  case 1:
14748  return a;
14749  case 2:
14750  z = __Pyx_c_prod_double(a, a);
14751  return __Pyx_c_prod_double(a, a);
14752  case 3:
14753  z = __Pyx_c_prod_double(a, a);
14754  return __Pyx_c_prod_double(z, a);
14755  case 4:
14756  z = __Pyx_c_prod_double(a, a);
14757  return __Pyx_c_prod_double(z, z);
14758  }
14759  }
14760  if (a.imag == 0) {
14761  if (a.real == 0) {
14762  return a;
14763  } else if (b.imag == 0) {
14764  z.real = pow(a.real, b.real);
14765  z.imag = 0;
14766  return z;
14767  } else if (a.real > 0) {
14768  r = a.real;
14769  theta = 0;
14770  } else {
14771  r = -a.real;
14772  theta = atan2(0, -1);
14773  }
14774  } else {
14775  r = __Pyx_c_abs_double(a);
14776  theta = atan2(a.imag, a.real);
14777  }
14778  lnr = log(r);
14779  z_r = exp(lnr * b.real - theta * b.imag);
14780  z_theta = theta * b.real + lnr * b.imag;
14781  z.real = z_r * cos(z_theta);
14782  z.imag = z_r * sin(z_theta);
14783  return z;
14784  }
14785  #endif
14786 #endif
14787 
14788 /* CIntToPy */
14789  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
14790  const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0;
14791  const int is_unsigned = neg_one > const_zero;
14792  if (is_unsigned) {
14793  if (sizeof(enum NPY_TYPES) < sizeof(long)) {
14794  return PyInt_FromLong((long) value);
14795  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
14796  return PyLong_FromUnsignedLong((unsigned long) value);
14797 #ifdef HAVE_LONG_LONG
14798  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
14799  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14800 #endif
14801  }
14802  } else {
14803  if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
14804  return PyInt_FromLong((long) value);
14805 #ifdef HAVE_LONG_LONG
14806  } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
14807  return PyLong_FromLongLong((PY_LONG_LONG) value);
14808 #endif
14809  }
14810  }
14811  {
14812  int one = 1; int little = (int)*(unsigned char *)&one;
14813  unsigned char *bytes = (unsigned char *)&value;
14814  return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
14815  little, !is_unsigned);
14816  }
14817 }
14818 
14819 /* PrintOne */
14820  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
14821 static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
14822  if (!f) {
14823  if (!(f = __Pyx_GetStdout()))
14824  return -1;
14825  }
14826  Py_INCREF(f);
14827  if (PyFile_SoftSpace(f, 0)) {
14828  if (PyFile_WriteString(" ", f) < 0)
14829  goto error;
14830  }
14831  if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
14832  goto error;
14833  if (PyFile_WriteString("\n", f) < 0)
14834  goto error;
14835  Py_DECREF(f);
14836  return 0;
14837 error:
14838  Py_DECREF(f);
14839  return -1;
14840  /* the line below is just to avoid C compiler
14841  * warnings about unused functions */
14842  return __Pyx_Print(f, NULL, 0);
14843 }
14844 #else
14845 static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
14846  int res;
14847  PyObject* arg_tuple = PyTuple_Pack(1, o);
14848  if (unlikely(!arg_tuple))
14849  return -1;
14850  res = __Pyx_Print(stream, arg_tuple, 1);
14851  Py_DECREF(arg_tuple);
14852  return res;
14853 }
14854 #endif
14855 
14856 /* CIntFromPy */
14857  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
14858  const int neg_one = (int) -1, const_zero = (int) 0;
14859  const int is_unsigned = neg_one > const_zero;
14860 #if PY_MAJOR_VERSION < 3
14861  if (likely(PyInt_Check(x))) {
14862  if (sizeof(int) < sizeof(long)) {
14863  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
14864  } else {
14865  long val = PyInt_AS_LONG(x);
14866  if (is_unsigned && unlikely(val < 0)) {
14867  goto raise_neg_overflow;
14868  }
14869  return (int) val;
14870  }
14871  } else
14872 #endif
14873  if (likely(PyLong_Check(x))) {
14874  if (is_unsigned) {
14875 #if CYTHON_USE_PYLONG_INTERNALS
14876  const digit* digits = ((PyLongObject*)x)->ob_digit;
14877  switch (Py_SIZE(x)) {
14878  case 0: return (int) 0;
14879  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
14880  case 2:
14881  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
14882  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
14883  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14884  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
14885  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
14886  }
14887  }
14888  break;
14889  case 3:
14890  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
14891  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
14892  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14893  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
14894  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
14895  }
14896  }
14897  break;
14898  case 4:
14899  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
14900  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
14901  __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])))
14902  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
14903  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
14904  }
14905  }
14906  break;
14907  }
14908 #endif
14909 #if CYTHON_COMPILING_IN_CPYTHON
14910  if (unlikely(Py_SIZE(x) < 0)) {
14911  goto raise_neg_overflow;
14912  }
14913 #else
14914  {
14915  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
14916  if (unlikely(result < 0))
14917  return (int) -1;
14918  if (unlikely(result == 1))
14919  goto raise_neg_overflow;
14920  }
14921 #endif
14922  if (sizeof(int) <= sizeof(unsigned long)) {
14923  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
14924 #ifdef HAVE_LONG_LONG
14925  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
14926  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
14927 #endif
14928  }
14929  } else {
14930 #if CYTHON_USE_PYLONG_INTERNALS
14931  const digit* digits = ((PyLongObject*)x)->ob_digit;
14932  switch (Py_SIZE(x)) {
14933  case 0: return (int) 0;
14934  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
14935  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
14936  case -2:
14937  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
14938  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
14939  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14940  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
14941  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14942  }
14943  }
14944  break;
14945  case 2:
14946  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
14947  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
14948  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14949  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
14950  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14951  }
14952  }
14953  break;
14954  case -3:
14955  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
14956  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
14957  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14958  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
14959  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14960  }
14961  }
14962  break;
14963  case 3:
14964  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
14965  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
14966  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
14967  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
14968  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14969  }
14970  }
14971  break;
14972  case -4:
14973  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
14974  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
14975  __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])))
14976  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
14977  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14978  }
14979  }
14980  break;
14981  case 4:
14982  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
14983  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
14984  __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])))
14985  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
14986  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
14987  }
14988  }
14989  break;
14990  }
14991 #endif
14992  if (sizeof(int) <= sizeof(long)) {
14993  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
14994 #ifdef HAVE_LONG_LONG
14995  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
14996  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
14997 #endif
14998  }
14999  }
15000  {
15001 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
15002  PyErr_SetString(PyExc_RuntimeError,
15003  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
15004 #else
15005  int val;
15006  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
15007  #if PY_MAJOR_VERSION < 3
15008  if (likely(v) && !PyLong_Check(v)) {
15009  PyObject *tmp = v;
15010  v = PyNumber_Long(tmp);
15011  Py_DECREF(tmp);
15012  }
15013  #endif
15014  if (likely(v)) {
15015  int one = 1; int is_little = (int)*(unsigned char *)&one;
15016  unsigned char *bytes = (unsigned char *)&val;
15017  int ret = _PyLong_AsByteArray((PyLongObject *)v,
15018  bytes, sizeof(val),
15019  is_little, !is_unsigned);
15020  Py_DECREF(v);
15021  if (likely(!ret))
15022  return val;
15023  }
15024 #endif
15025  return (int) -1;
15026  }
15027  } else {
15028  int val;
15029  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15030  if (!tmp) return (int) -1;
15031  val = __Pyx_PyInt_As_int(tmp);
15032  Py_DECREF(tmp);
15033  return val;
15034  }
15035 raise_overflow:
15036  PyErr_SetString(PyExc_OverflowError,
15037  "value too large to convert to int");
15038  return (int) -1;
15039 raise_neg_overflow:
15040  PyErr_SetString(PyExc_OverflowError,
15041  "can't convert negative value to int");
15042  return (int) -1;
15043 }
15044 
15045 /* CIntToPy */
15046  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
15047  const long neg_one = (long) -1, const_zero = (long) 0;
15048  const int is_unsigned = neg_one > const_zero;
15049  if (is_unsigned) {
15050  if (sizeof(long) < sizeof(long)) {
15051  return PyInt_FromLong((long) value);
15052  } else if (sizeof(long) <= sizeof(unsigned long)) {
15053  return PyLong_FromUnsignedLong((unsigned long) value);
15054 #ifdef HAVE_LONG_LONG
15055  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
15056  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
15057 #endif
15058  }
15059  } else {
15060  if (sizeof(long) <= sizeof(long)) {
15061  return PyInt_FromLong((long) value);
15062 #ifdef HAVE_LONG_LONG
15063  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
15064  return PyLong_FromLongLong((PY_LONG_LONG) value);
15065 #endif
15066  }
15067  }
15068  {
15069  int one = 1; int little = (int)*(unsigned char *)&one;
15070  unsigned char *bytes = (unsigned char *)&value;
15071  return _PyLong_FromByteArray(bytes, sizeof(long),
15072  little, !is_unsigned);
15073  }
15074 }
15075 
15076 /* CIntFromPy */
15077  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
15078  const long neg_one = (long) -1, const_zero = (long) 0;
15079  const int is_unsigned = neg_one > const_zero;
15080 #if PY_MAJOR_VERSION < 3
15081  if (likely(PyInt_Check(x))) {
15082  if (sizeof(long) < sizeof(long)) {
15083  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
15084  } else {
15085  long val = PyInt_AS_LONG(x);
15086  if (is_unsigned && unlikely(val < 0)) {
15087  goto raise_neg_overflow;
15088  }
15089  return (long) val;
15090  }
15091  } else
15092 #endif
15093  if (likely(PyLong_Check(x))) {
15094  if (is_unsigned) {
15095 #if CYTHON_USE_PYLONG_INTERNALS
15096  const digit* digits = ((PyLongObject*)x)->ob_digit;
15097  switch (Py_SIZE(x)) {
15098  case 0: return (long) 0;
15099  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
15100  case 2:
15101  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
15102  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15103  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15104  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
15105  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15106  }
15107  }
15108  break;
15109  case 3:
15110  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
15111  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15112  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15113  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
15114  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15115  }
15116  }
15117  break;
15118  case 4:
15119  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
15120  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15121  __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])))
15122  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
15123  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
15124  }
15125  }
15126  break;
15127  }
15128 #endif
15129 #if CYTHON_COMPILING_IN_CPYTHON
15130  if (unlikely(Py_SIZE(x) < 0)) {
15131  goto raise_neg_overflow;
15132  }
15133 #else
15134  {
15135  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
15136  if (unlikely(result < 0))
15137  return (long) -1;
15138  if (unlikely(result == 1))
15139  goto raise_neg_overflow;
15140  }
15141 #endif
15142  if (sizeof(long) <= sizeof(unsigned long)) {
15143  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
15144 #ifdef HAVE_LONG_LONG
15145  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
15146  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
15147 #endif
15148  }
15149  } else {
15150 #if CYTHON_USE_PYLONG_INTERNALS
15151  const digit* digits = ((PyLongObject*)x)->ob_digit;
15152  switch (Py_SIZE(x)) {
15153  case 0: return (long) 0;
15154  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
15155  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
15156  case -2:
15157  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
15158  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15159  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15160  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
15161  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15162  }
15163  }
15164  break;
15165  case 2:
15166  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
15167  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
15168  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15169  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
15170  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15171  }
15172  }
15173  break;
15174  case -3:
15175  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
15176  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15177  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15178  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
15179  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15180  }
15181  }
15182  break;
15183  case 3:
15184  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
15185  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
15186  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
15187  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
15188  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15189  }
15190  }
15191  break;
15192  case -4:
15193  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
15194  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15195  __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])))
15196  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
15197  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15198  }
15199  }
15200  break;
15201  case 4:
15202  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
15203  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
15204  __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])))
15205  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
15206  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
15207  }
15208  }
15209  break;
15210  }
15211 #endif
15212  if (sizeof(long) <= sizeof(long)) {
15213  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
15214 #ifdef HAVE_LONG_LONG
15215  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
15216  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
15217 #endif
15218  }
15219  }
15220  {
15221 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
15222  PyErr_SetString(PyExc_RuntimeError,
15223  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
15224 #else
15225  long val;
15226  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
15227  #if PY_MAJOR_VERSION < 3
15228  if (likely(v) && !PyLong_Check(v)) {
15229  PyObject *tmp = v;
15230  v = PyNumber_Long(tmp);
15231  Py_DECREF(tmp);
15232  }
15233  #endif
15234  if (likely(v)) {
15235  int one = 1; int is_little = (int)*(unsigned char *)&one;
15236  unsigned char *bytes = (unsigned char *)&val;
15237  int ret = _PyLong_AsByteArray((PyLongObject *)v,
15238  bytes, sizeof(val),
15239  is_little, !is_unsigned);
15240  Py_DECREF(v);
15241  if (likely(!ret))
15242  return val;
15243  }
15244 #endif
15245  return (long) -1;
15246  }
15247  } else {
15248  long val;
15249  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
15250  if (!tmp) return (long) -1;
15251  val = __Pyx_PyInt_As_long(tmp);
15252  Py_DECREF(tmp);
15253  return val;
15254  }
15255 raise_overflow:
15256  PyErr_SetString(PyExc_OverflowError,
15257  "value too large to convert to long");
15258  return (long) -1;
15259 raise_neg_overflow:
15260  PyErr_SetString(PyExc_OverflowError,
15261  "can't convert negative value to long");
15262  return (long) -1;
15263 }
15264 
15265 /* CheckBinaryVersion */
15266  static int __Pyx_check_binary_version(void) {
15267  char ctversion[4], rtversion[4];
15268  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
15269  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
15270  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
15271  char message[200];
15272  PyOS_snprintf(message, sizeof(message),
15273  "compiletime version %s of module '%.100s' "
15274  "does not match runtime version %s",
15275  ctversion, __Pyx_MODULE_NAME, rtversion);
15276  return PyErr_WarnEx(NULL, message, 1);
15277  }
15278  return 0;
15279 }
15280 
15281 /* ModuleImport */
15282  #ifndef __PYX_HAVE_RT_ImportModule
15283 #define __PYX_HAVE_RT_ImportModule
15284 static PyObject *__Pyx_ImportModule(const char *name) {
15285  PyObject *py_name = 0;
15286  PyObject *py_module = 0;
15287  py_name = __Pyx_PyIdentifier_FromString(name);
15288  if (!py_name)
15289  goto bad;
15290  py_module = PyImport_Import(py_name);
15291  Py_DECREF(py_name);
15292  return py_module;
15293 bad:
15294  Py_XDECREF(py_name);
15295  return 0;
15296 }
15297 #endif
15298 
15299 /* TypeImport */
15300  #ifndef __PYX_HAVE_RT_ImportType
15301 #define __PYX_HAVE_RT_ImportType
15302 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
15303  size_t size, int strict)
15304 {
15305  PyObject *py_module = 0;
15306  PyObject *result = 0;
15307  PyObject *py_name = 0;
15308  char warning[200];
15309  Py_ssize_t basicsize;
15310 #ifdef Py_LIMITED_API
15311  PyObject *py_basicsize;
15312 #endif
15313  py_module = __Pyx_ImportModule(module_name);
15314  if (!py_module)
15315  goto bad;
15316  py_name = __Pyx_PyIdentifier_FromString(class_name);
15317  if (!py_name)
15318  goto bad;
15319  result = PyObject_GetAttr(py_module, py_name);
15320  Py_DECREF(py_name);
15321  py_name = 0;
15322  Py_DECREF(py_module);
15323  py_module = 0;
15324  if (!result)
15325  goto bad;
15326  if (!PyType_Check(result)) {
15327  PyErr_Format(PyExc_TypeError,
15328  "%.200s.%.200s is not a type object",
15329  module_name, class_name);
15330  goto bad;
15331  }
15332 #ifndef Py_LIMITED_API
15333  basicsize = ((PyTypeObject *)result)->tp_basicsize;
15334 #else
15335  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
15336  if (!py_basicsize)
15337  goto bad;
15338  basicsize = PyLong_AsSsize_t(py_basicsize);
15339  Py_DECREF(py_basicsize);
15340  py_basicsize = 0;
15341  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
15342  goto bad;
15343 #endif
15344  if (!strict && (size_t)basicsize > size) {
15345  PyOS_snprintf(warning, sizeof(warning),
15346  "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
15347  module_name, class_name, basicsize, size);
15348  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
15349  }
15350  else if ((size_t)basicsize != size) {
15351  PyErr_Format(PyExc_ValueError,
15352  "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
15353  module_name, class_name, basicsize, size);
15354  goto bad;
15355  }
15356  return (PyTypeObject *)result;
15357 bad:
15358  Py_XDECREF(py_module);
15359  Py_XDECREF(result);
15360  return NULL;
15361 }
15362 #endif
15363 
15364 /* InitStrings */
15365  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
15366  while (t->p) {
15367  #if PY_MAJOR_VERSION < 3
15368  if (t->is_unicode) {
15369  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
15370  } else if (t->intern) {
15371  *t->p = PyString_InternFromString(t->s);
15372  } else {
15373  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
15374  }
15375  #else
15376  if (t->is_unicode | t->is_str) {
15377  if (t->intern) {
15378  *t->p = PyUnicode_InternFromString(t->s);
15379  } else if (t->encoding) {
15380  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
15381  } else {
15382  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
15383  }
15384  } else {
15385  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
15386  }
15387  #endif
15388  if (!*t->p)
15389  return -1;
15390  ++t;
15391  }
15392  return 0;
15393 }
15394 
15395 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
15396  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
15397 }
15398 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
15399  Py_ssize_t ignore;
15400  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
15401 }
15402 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
15403 #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
15404  if (
15405 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
15406  __Pyx_sys_getdefaultencoding_not_ascii &&
15407 #endif
15408  PyUnicode_Check(o)) {
15409 #if PY_VERSION_HEX < 0x03030000
15410  char* defenc_c;
15411  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
15412  if (!defenc) return NULL;
15413  defenc_c = PyBytes_AS_STRING(defenc);
15414 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
15415  {
15416  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
15417  char* c;
15418  for (c = defenc_c; c < end; c++) {
15419  if ((unsigned char) (*c) >= 128) {
15420  PyUnicode_AsASCIIString(o);
15421  return NULL;
15422  }
15423  }
15424  }
15425 #endif
15426  *length = PyBytes_GET_SIZE(defenc);
15427  return defenc_c;
15428 #else
15429  if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
15430 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
15431  if (PyUnicode_IS_ASCII(o)) {
15432  *length = PyUnicode_GET_LENGTH(o);
15433  return PyUnicode_AsUTF8(o);
15434  } else {
15435  PyUnicode_AsASCIIString(o);
15436  return NULL;
15437  }
15438 #else
15439  return PyUnicode_AsUTF8AndSize(o, length);
15440 #endif
15441 #endif
15442  } else
15443 #endif
15444 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
15445  if (PyByteArray_Check(o)) {
15446  *length = PyByteArray_GET_SIZE(o);
15447  return PyByteArray_AS_STRING(o);
15448  } else
15449 #endif
15450  {
15451  char* result;
15452  int r = PyBytes_AsStringAndSize(o, &result, length);
15453  if (unlikely(r < 0)) {
15454  return NULL;
15455  } else {
15456  return result;
15457  }
15458  }
15459 }
15460 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
15461  int is_true = x == Py_True;
15462  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
15463  else return PyObject_IsTrue(x);
15464 }
15465 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
15466 #if CYTHON_USE_TYPE_SLOTS
15467  PyNumberMethods *m;
15468 #endif
15469  const char *name = NULL;
15470  PyObject *res = NULL;
15471 #if PY_MAJOR_VERSION < 3
15472  if (PyInt_Check(x) || PyLong_Check(x))
15473 #else
15474  if (PyLong_Check(x))
15475 #endif
15476  return __Pyx_NewRef(x);
15477 #if CYTHON_USE_TYPE_SLOTS
15478  m = Py_TYPE(x)->tp_as_number;
15479  #if PY_MAJOR_VERSION < 3
15480  if (m && m->nb_int) {
15481  name = "int";
15482  res = PyNumber_Int(x);
15483  }
15484  else if (m && m->nb_long) {
15485  name = "long";
15486  res = PyNumber_Long(x);
15487  }
15488  #else
15489  if (m && m->nb_int) {
15490  name = "int";
15491  res = PyNumber_Long(x);
15492  }
15493  #endif
15494 #else
15495  res = PyNumber_Int(x);
15496 #endif
15497  if (res) {
15498 #if PY_MAJOR_VERSION < 3
15499  if (!PyInt_Check(res) && !PyLong_Check(res)) {
15500 #else
15501  if (!PyLong_Check(res)) {
15502 #endif
15503  PyErr_Format(PyExc_TypeError,
15504  "__%.4s__ returned non-%.4s (type %.200s)",
15505  name, name, Py_TYPE(res)->tp_name);
15506  Py_DECREF(res);
15507  return NULL;
15508  }
15509  }
15510  else if (!PyErr_Occurred()) {
15511  PyErr_SetString(PyExc_TypeError,
15512  "an integer is required");
15513  }
15514  return res;
15515 }
15516 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
15517  Py_ssize_t ival;
15518  PyObject *x;
15519 #if PY_MAJOR_VERSION < 3
15520  if (likely(PyInt_CheckExact(b))) {
15521  if (sizeof(Py_ssize_t) >= sizeof(long))
15522  return PyInt_AS_LONG(b);
15523  else
15524  return PyInt_AsSsize_t(x);
15525  }
15526 #endif
15527  if (likely(PyLong_CheckExact(b))) {
15528  #if CYTHON_USE_PYLONG_INTERNALS
15529  const digit* digits = ((PyLongObject*)b)->ob_digit;
15530  const Py_ssize_t size = Py_SIZE(b);
15531  if (likely(__Pyx_sst_abs(size) <= 1)) {
15532  ival = likely(size) ? digits[0] : 0;
15533  if (size == -1) ival = -ival;
15534  return ival;
15535  } else {
15536  switch (size) {
15537  case 2:
15538  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
15539  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
15540  }
15541  break;
15542  case -2:
15543  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
15544  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
15545  }
15546  break;
15547  case 3:
15548  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
15549  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
15550  }
15551  break;
15552  case -3:
15553  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
15554  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
15555  }
15556  break;
15557  case 4:
15558  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
15559  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]));
15560  }
15561  break;
15562  case -4:
15563  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
15564  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]));
15565  }
15566  break;
15567  }
15568  }
15569  #endif
15570  return PyLong_AsSsize_t(b);
15571  }
15572  x = PyNumber_Index(b);
15573  if (!x) return -1;
15574  ival = PyInt_AsSsize_t(x);
15575  Py_DECREF(x);
15576  return ival;
15577 }
15578 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
15579  return PyInt_FromSize_t(ival);
15580 }
15581 
15582 
15583 #endif /* Py_PYTHON_H */
char * string
string version of the answer to a query
void ITM_AMNS_CC_SET_TABLE(void *handle_rx_in, amns_c_set_type *set, amns_c_error_type *error_status)
void ITM_AMNS_CC_RX_1_B(void *handle_rx_in, int nx, double *out, double *arg1, double *arg2, amns_c_error_type *error_status)
amns_c_reaction_type get_default_amns_c_reaction_type(void)
prototype
void ITM_AMNS_CC_RX_3_B(void *handle_rx_in, int nx, int ny, int nz, double *out, double *arg1, double *arg2, amns_c_error_type *error_status)
void ITM_AMNS_CC_RX_3_C(void *handle_rx_in, int nx, int ny, int nz, double *out, double *arg1, double *arg2, double *arg3, amns_c_error_type *error_status)
int number
integer version of the answer to a query
Type for error returns from the AMNS interface (&quot;C&quot; version)
Type for querying parameters in the AMNS package (&quot;C&quot; version)
if error_status & query
Definition: amns.pyx:11
for i
Definition: amns.pyx:365
amns_c_version_type get_default_amns_c_version_type(void)
prototype
if error_status flag
Definition: amns.pyx:11
amns_c_reactant_type get_default_amns_c_reactant_type(void)
prototype
if error_status np ndarray[np.double_t, ndim=2] np ndarray[np.double_t, ndim=2] np ndarray[np.double_t, ndim=2] p3
Definition: amns.pyx:284
if error_status np ndarray[np.double_t, ndim=2] p1
Definition: amns.pyx:282
double MI
Atomic mass.
Type for answers from queries in the AMNS package (&quot;C&quot; version)
void ITM_AMNS_CC_FINISH_TABLE(void **handle_rx_inout, amns_c_error_type *error_status)
Type used for specifying reactions when using the AMNS interface (&quot;C&quot; version)
void ITM_AMNS_CC_FINISH_REACTANTS(void **reactants_handle_inout)
from libcpp cimport bool cdef from amns_interface ZA
double real_specifier
a place holder to specify an optional real further characterising a reactant/product ...
void ITM_AMNS_CC_RX_1_C(void *handle_rx_in, int nx, double *out, double *arg1, double *arg2, double *arg3, amns_c_error_type *error_status)
Type for setting parameters in the AMNS package (&quot;C&quot; version)
if error_status np ndarray[np.double_t, ndim=2] np ndarray[np.double_t, ndim=2] np ndarray[np.double_t, ndim=2] ndim
Definition: amns.pyx:287
void ITM_AMNS_CC_QUERY_TABLE(void *handle_rx_in, amns_c_query_type *query, amns_c_answer_type *answer, amns_c_error_type *error_status)
void ITM_AMNS_CC_FINISH(void **handle_inout, amns_c_error_type *error_status)
Type for specifying the AMNS version (&quot;C&quot; version)
char * backend
specify the backend to be used to access the CPOs
if error_status answer number def version(self) if error_status &error_status if error_status Reactants isotope_resolved
Definition: amns.pyx:81
char * string
ascii specification of the version
if error_status answer number def set(self, setString) if error_status &error_status if error_status answer number def state_label(self) elif nargs
Definition: amns.pyx:266
version
Definition: setup.py:45
char * user
specify the username of the data to be obtained (defaults to tghe person running the code) ...
int number
integer specification of the version number (primary specification at the moment) ...
void ITM_AMNS_CC_RX_2_C(void *handle_rx_in, int nx, int ny, double *out, double *arg1, double *arg2, double *arg3, amns_c_error_type *error_status)
void ITM_AMNS_CC_SETUP_REACTANTS(void **reactants_handle_out, char *string_in, int index_in, int n_reactants)
void ITM_AMNS_CC_SET_REACTANT(void *reactants_handle_in, int reactant_index, amns_c_reactant_type *reactant_in)
if error_status np ndarray[np.double_t, ndim=2] np ndarray[np.double_t, ndim=2] p2
Definition: amns.pyx:283
double ZA
Atomic charge.
void ITM_AMNS_CC_SET(void *handle_in, amns_c_set_type *set, amns_c_error_type *error_status)
void ITM_AMNS_CC_QUERY(void *handle_in, amns_c_query_type *query, amns_c_answer_type *answer, amns_c_error_type *error_status)
bool flag
True if an error occurred.
void ITM_AMNS_CC_RX_2_B(void *handle_rx_in, int nx, int ny, double *out, double *arg1, double *arg2, amns_c_error_type *error_status)
double ZN
Nuclear charge.
Type for indicating a single reactant or product when using the AMNS interface.
if error_status answer number def version(self) if error_status &error_status if error_status Reactants reactants
Definition: amns.pyx:59
string name
Definition: setup.py:44
void ITM_AMNS_CC_RX_3_A(void *handle_rx_in, int nx, int ny, int nz, double *out, double *arg1, amns_c_error_type *error_status)
if error_status len(self._reactants))
void ITM_AMNS_CC_SETUP_TABLE(void *handle_in, amns_c_reaction_type *reaction_type, void *reactant_handle_in, void **handle_rx_out, amns_c_error_type *error_status)
int int_specifier
a place holder to specify an optional integer further characterising a reactant/product ...
int LR
reactant (LR=0) or product (LR=1)
void ITM_AMNS_CC_RX_1_A(void *handle_rx_in, int nx, double *out, double *arg1, amns_c_error_type *error_status)
void ITM_AMNS_CC_RX_2_A(void *handle_rx_in, int nx, int ny, double *out, double *arg1, amns_c_error_type *error_status)
void ITM_AMNS_CC_SETUP(void **handle_out, amns_c_error_type *error_status)
void ITM_AMNS_CC_SETUP_VERSION(void **handle_in, amns_c_version_type *version, amns_c_error_type *error_status)