/* Generated by Cython 0.17.4 on Fri May 17 18:38:14 2013 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ !PyComplex_Check(o)) #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) typedef struct { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_VERSION_HEX < 0x02060000 #define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_FromString PyString_FromString #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_DecodeEscape PyString_DecodeEscape #define PyBytes_AsString PyString_AsString #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define PyBytes_Size PyString_Size #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_VERSION_HEX < 0x03020000 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300) #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) #else #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) #else #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) #else #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #define __PYX_HAVE__tables__tableextension #define __PYX_HAVE_API__tables__tableextension #include "time.h" #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "hdf5.h" #include "H5ATTR.h" #include "H5ARRAY.h" #include "utils.h" #include "typeconv.h" #include "blosc_filter.h" #include "pythread.h" #include "string.h" #include "H5TB-opt.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif /* inline attribute */ #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif /* unused attribute */ #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ /* Type Conversion Predeclarations */ #define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) #define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; #if !defined(CYTHON_CCOMPLEX) #if defined(__cplusplus) #define CYTHON_CCOMPLEX 1 #elif defined(_Complex_I) #define CYTHON_CCOMPLEX 1 #else #define CYTHON_CCOMPLEX 0 #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus #include #else #include #endif #endif #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) #undef _Complex_I #define _Complex_I 1.0fj #endif static const char *__pyx_f[] = { "tableextension.pyx", "numpy.pxd", "type.pxd", "hdf5extension.pxd", "bool.pxd", "complex.pxd", "lrucacheextension.pxd", }; /* "numpy.pxd":723 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t */ typedef npy_int8 __pyx_t_5numpy_int8_t; /* "numpy.pxd":724 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t */ typedef npy_int16 __pyx_t_5numpy_int16_t; /* "numpy.pxd":725 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< * ctypedef npy_int64 int64_t * #ctypedef npy_int96 int96_t */ typedef npy_int32 __pyx_t_5numpy_int32_t; /* "numpy.pxd":726 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< * #ctypedef npy_int96 int96_t * #ctypedef npy_int128 int128_t */ typedef npy_int64 __pyx_t_5numpy_int64_t; /* "numpy.pxd":730 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; /* "numpy.pxd":731 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; /* "numpy.pxd":732 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< * ctypedef npy_uint64 uint64_t * #ctypedef npy_uint96 uint96_t */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; /* "numpy.pxd":733 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< * #ctypedef npy_uint96 uint96_t * #ctypedef npy_uint128 uint128_t */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; /* "numpy.pxd":737 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "numpy.pxd":738 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< * #ctypedef npy_float80 float80_t * #ctypedef npy_float128 float128_t */ typedef npy_float64 __pyx_t_5numpy_float64_t; /* "numpy.pxd":747 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t */ typedef npy_long __pyx_t_5numpy_int_t; /* "numpy.pxd":748 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< * ctypedef npy_longlong longlong_t * */ typedef npy_longlong __pyx_t_5numpy_long_t; /* "numpy.pxd":749 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< * * ctypedef npy_ulong uint_t */ typedef npy_longlong __pyx_t_5numpy_longlong_t; /* "numpy.pxd":751 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t */ typedef npy_ulong __pyx_t_5numpy_uint_t; /* "numpy.pxd":752 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "numpy.pxd":753 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; /* "numpy.pxd":755 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "numpy.pxd":756 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "numpy.pxd":758 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t */ typedef npy_double __pyx_t_5numpy_float_t; /* "numpy.pxd":759 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "numpy.pxd":760 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cfloat cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< float > __pyx_t_float_complex; #else typedef float _Complex __pyx_t_float_complex; #endif #else typedef struct { float real, imag; } __pyx_t_float_complex; #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< double > __pyx_t_double_complex; #else typedef double _Complex __pyx_t_double_complex; #endif #else typedef struct { double real, imag; } __pyx_t_double_complex; #endif /*--- Type declarations ---*/ struct __pyx_obj_6tables_13hdf5extension_Node; struct __pyx_obj_6tables_13hdf5extension_Leaf; struct __pyx_obj_6tables_13hdf5extension_Array; struct __pyx_obj_6tables_17lrucacheextension_BaseCache; struct __pyx_obj_6tables_17lrucacheextension_ObjectCache; struct __pyx_obj_6tables_14tableextension_Row; struct __pyx_obj_6tables_17lrucacheextension_NodeCache; struct __pyx_obj_6tables_17lrucacheextension_ObjectNode; struct __pyx_obj_6tables_17lrucacheextension_NumCache; struct __pyx_obj_6tables_14tableextension_Table; /* "numpy.pxd":762 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; /* "numpy.pxd":763 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "numpy.pxd":764 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cdouble complex_t */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; /* "numpy.pxd":766 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; /* "hdf5extension.pxd":18 * * # Declaration of instance variables for shared classes * cdef class Node: # <<<<<<<<<<<<<< * cdef object name * cdef hid_t parent_id */ struct __pyx_obj_6tables_13hdf5extension_Node { PyObject_HEAD PyObject *name; hid_t parent_id; }; /* "hdf5extension.pxd":22 * cdef hid_t parent_id * * cdef class Leaf(Node): # <<<<<<<<<<<<<< * cdef hid_t dataset_id * cdef hid_t type_id */ struct __pyx_obj_6tables_13hdf5extension_Leaf { struct __pyx_obj_6tables_13hdf5extension_Node __pyx_base; struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf *__pyx_vtab; hid_t dataset_id; hid_t type_id; hid_t base_type_id; hid_t disk_type_id; hsize_t *dims; }; /* "hdf5extension.pxd":31 * cdef _convert_time64(self, ndarray nparr, int sense) * * cdef class Array(Leaf): # <<<<<<<<<<<<<< * cdef int rank * cdef hsize_t *maxdims */ struct __pyx_obj_6tables_13hdf5extension_Array { struct __pyx_obj_6tables_13hdf5extension_Leaf __pyx_base; int rank; hsize_t *maxdims; hsize_t *dims_chunk; }; /* "lrucacheextension.pxd":26 * * # Base class for other caches * cdef class BaseCache: # <<<<<<<<<<<<<< * cdef int iscachedisabled, incsetcount * cdef long setcount, getcount, containscount */ struct __pyx_obj_6tables_17lrucacheextension_BaseCache { PyObject_HEAD struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache *__pyx_vtab; int iscachedisabled; int incsetcount; long setcount; long getcount; long containscount; long disablecyclecount; long disableeverycycles; long enablecyclecount; long enableeverycycles; double nprobes; double hitratio; long seqn_; long nextslot; long nslots; long *ratimes; double lowesthr; PyArrayObject *atimes; PyObject *name; }; /* "lrucacheextension.pxd":49 * * # The ObjectCache class is useful for general python objects * cdef class ObjectCache(BaseCache): # <<<<<<<<<<<<<< * cdef long maxcachesize, cachesize, maxobjsize * cdef long *rsizes */ struct __pyx_obj_6tables_17lrucacheextension_ObjectCache { struct __pyx_obj_6tables_17lrucacheextension_BaseCache __pyx_base; long maxcachesize; long cachesize; long maxobjsize; long *rsizes; PyArrayObject *sizes; PyObject *__pyx___list; PyObject *__pyx___dict; struct __pyx_obj_6tables_17lrucacheextension_ObjectNode *mrunode; }; /* "tables/tableextension.pyx":672 * * * cdef class Row: # <<<<<<<<<<<<<< * """Table row iterator and field accessor. * */ struct __pyx_obj_6tables_14tableextension_Row { PyObject_HEAD struct __pyx_vtabstruct_6tables_14tableextension_Row *__pyx_vtab; long _row; long _unsaved_nrows; long _mod_nrows; hsize_t start; hsize_t absstep; PY_LONG_LONG stop; PY_LONG_LONG step; PY_LONG_LONG nextelement; PY_LONG_LONG _nrow; PY_LONG_LONG stopb; hsize_t nrowsinbuf; hsize_t nrows; hsize_t nrowsread; hsize_t chunksize; hsize_t nchunksinbuf; hsize_t totalchunks; hsize_t startb; hsize_t lenbuf; PY_LONG_LONG indexchunk; int bufcounter; int counter; int exist_enum_cols; int _riterator; int _stride; int _rowsize; int wherecond; int indexed; int ro_filemode; int chunked; int _bufferinfo_done; int sss_on; int iterseq_max_elements; PyArrayObject *bufcoords; PyArrayObject *indexvalid; PyArrayObject *indexvalues; PyArrayObject *chunkmap; hsize_t *bufcoords_data; hsize_t *index_values_data; char *chunkmap_data; char *index_valid_data; PyObject *dtype; PyObject *iobuf; PyObject *iobufcpy; PyObject *wrec; PyObject *wreccpy; PyObject *wfields; PyObject *rfields; PyObject *coords; PyObject *condfunc; PyObject *condargs; PyObject *mod_elements; PyObject *colenums; PyObject *rfieldscache; PyObject *wfieldscache; PyObject *_table_file; PyObject *_table_path; PyObject *modified_fields; PyObject *seq_available; }; /* "lrucacheextension.pxd":17 * # Declaration of instance variables for shared classes * # The NodeCache class is useful for caching general objects (like Nodes). * cdef class NodeCache: # <<<<<<<<<<<<<< * cdef long nextslot, nslots * cdef object nodes, paths */ struct __pyx_obj_6tables_17lrucacheextension_NodeCache { PyObject_HEAD struct __pyx_vtabstruct_6tables_17lrucacheextension_NodeCache *__pyx_vtab; long nextslot; long nslots; PyObject *nodes; PyObject *paths; }; /* "lrucacheextension.pxd":43 * * # Helper class for ObjectCache * cdef class ObjectNode: # <<<<<<<<<<<<<< * cdef object key, obj * cdef long nslot */ struct __pyx_obj_6tables_17lrucacheextension_ObjectNode { PyObject_HEAD PyObject *key; PyObject *obj; long nslot; }; /* "lrucacheextension.pxd":64 * * # The NumCache class is useful for caching numerical data in an efficient way * cdef class NumCache(BaseCache): # <<<<<<<<<<<<<< * cdef long itemsize, slotsize * cdef ndarray cacheobj, keys */ struct __pyx_obj_6tables_17lrucacheextension_NumCache { struct __pyx_obj_6tables_17lrucacheextension_BaseCache __pyx_base; long itemsize; long slotsize; PyArrayObject *cacheobj; PyArrayObject *keys; void *rcache; PY_LONG_LONG *rkeys; PyObject *__pyx___dict; }; /* "tables/tableextension.pyx":148 * # Public classes * * cdef class Table(Leaf): # <<<<<<<<<<<<<< * # instance variables * cdef void *wbuf */ struct __pyx_obj_6tables_14tableextension_Table { struct __pyx_obj_6tables_13hdf5extension_Leaf __pyx_base; void *wbuf; }; /* "lrucacheextension.pxd":17 * # Declaration of instance variables for shared classes * # The NodeCache class is useful for caching general objects (like Nodes). * cdef class NodeCache: # <<<<<<<<<<<<<< * cdef long nextslot, nslots * cdef object nodes, paths */ struct __pyx_vtabstruct_6tables_17lrucacheextension_NodeCache { PyObject *(*setitem)(struct __pyx_obj_6tables_17lrucacheextension_NodeCache *, PyObject *, PyObject *); long (*getslot)(struct __pyx_obj_6tables_17lrucacheextension_NodeCache *, PyObject *); PyObject *(*cpop)(struct __pyx_obj_6tables_17lrucacheextension_NodeCache *, PyObject *); }; static struct __pyx_vtabstruct_6tables_17lrucacheextension_NodeCache *__pyx_vtabptr_6tables_17lrucacheextension_NodeCache; /* "lrucacheextension.pxd":26 * * # Base class for other caches * cdef class BaseCache: # <<<<<<<<<<<<<< * cdef int iscachedisabled, incsetcount * cdef long setcount, getcount, containscount */ struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache { int (*checkhitratio)(struct __pyx_obj_6tables_17lrucacheextension_BaseCache *); int (*couldenablecache_)(struct __pyx_obj_6tables_17lrucacheextension_BaseCache *); long (*incseqn)(struct __pyx_obj_6tables_17lrucacheextension_BaseCache *); }; static struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache *__pyx_vtabptr_6tables_17lrucacheextension_BaseCache; /* "lrucacheextension.pxd":49 * * # The ObjectCache class is useful for general python objects * cdef class ObjectCache(BaseCache): # <<<<<<<<<<<<<< * cdef long maxcachesize, cachesize, maxobjsize * cdef long *rsizes */ struct __pyx_vtabstruct_6tables_17lrucacheextension_ObjectCache { struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache __pyx_base; PyObject *(*removeslot_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, long); PyObject *(*clearcache_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *); PyObject *(*updateslot_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, long, long, PyObject *, PyObject *); long (*setitem_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, PyObject *, PyObject *, long); long (*getslot_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, PyObject *); PyObject *(*getitem_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, long); }; static struct __pyx_vtabstruct_6tables_17lrucacheextension_ObjectCache *__pyx_vtabptr_6tables_17lrucacheextension_ObjectCache; /* "tables/tableextension.pyx":672 * * * cdef class Row: # <<<<<<<<<<<<<< * """Table row iterator and field accessor. * */ struct __pyx_vtabstruct_6tables_14tableextension_Row { PyObject *(*_new_buffer)(struct __pyx_obj_6tables_14tableextension_Row *, PyObject *); PyObject *(*_init_loop)(struct __pyx_obj_6tables_14tableextension_Row *, hsize_t, PY_LONG_LONG, PY_LONG_LONG, PyObject *, PyObject *); PyObject *(*__pyx___next__indexed)(struct __pyx_obj_6tables_14tableextension_Row *); PyObject *(*__pyx___next__coords)(struct __pyx_obj_6tables_14tableextension_Row *); PyObject *(*__pyx___next__inkernel)(struct __pyx_obj_6tables_14tableextension_Row *); PyObject *(*__pyx___next__general)(struct __pyx_obj_6tables_14tableextension_Row *); PyObject *(*_finish_riterator)(struct __pyx_obj_6tables_14tableextension_Row *); }; static struct __pyx_vtabstruct_6tables_14tableextension_Row *__pyx_vtabptr_6tables_14tableextension_Row; /* "hdf5extension.pxd":22 * cdef hid_t parent_id * * cdef class Leaf(Node): # <<<<<<<<<<<<<< * cdef hid_t dataset_id * cdef hid_t type_id */ struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf { PyObject *(*_get_type_ids)(struct __pyx_obj_6tables_13hdf5extension_Leaf *); PyObject *(*_convert_time64)(struct __pyx_obj_6tables_13hdf5extension_Leaf *, PyArrayObject *, int); }; static struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf *__pyx_vtabptr_6tables_13hdf5extension_Leaf; /* "tables/tableextension.pyx":148 * # Public classes * * cdef class Table(Leaf): # <<<<<<<<<<<<<< * # instance variables * cdef void *wbuf */ struct __pyx_vtabstruct_6tables_14tableextension_Table { struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf __pyx_base; PyObject *(*get_nested_type)(struct __pyx_obj_6tables_14tableextension_Table *, hid_t, hid_t, PyObject *, PyObject *); PyObject *(*_convert_time64_)(struct __pyx_obj_6tables_14tableextension_Table *, PyArrayObject *, hsize_t, int); PyObject *(*_convert_types)(struct __pyx_obj_6tables_14tableextension_Table *, PyArrayObject *, hsize_t, int, int __pyx_skip_dispatch); hsize_t (*_read_chunk)(struct __pyx_obj_6tables_14tableextension_Table *, hsize_t, PyArrayObject *, long); }; static struct __pyx_vtabstruct_6tables_14tableextension_Table *__pyx_vtabptr_6tables_14tableextension_Table; /* "hdf5extension.pxd":31 * cdef _convert_time64(self, ndarray nparr, int sense) * * cdef class Array(Leaf): # <<<<<<<<<<<<<< * cdef int rank * cdef hsize_t *maxdims */ struct __pyx_vtabstruct_6tables_13hdf5extension_Array { struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf __pyx_base; }; static struct __pyx_vtabstruct_6tables_13hdf5extension_Array *__pyx_vtabptr_6tables_13hdf5extension_Array; /* "lrucacheextension.pxd":64 * * # The NumCache class is useful for caching numerical data in an efficient way * cdef class NumCache(BaseCache): # <<<<<<<<<<<<<< * cdef long itemsize, slotsize * cdef ndarray cacheobj, keys */ struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache { struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache __pyx_base; void *(*getaddrslot_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, long); long (*setitem_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, PY_LONG_LONG, void *, long); long (*setitem1_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, PY_LONG_LONG); long (*getslot_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, PY_LONG_LONG); PyObject *(*getitem_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, long, void *, long); void *(*getitem1_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, long); }; static struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *__pyx_vtabptr_6tables_17lrucacheextension_NumCache; #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil) \ if (acquire_gil) { \ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ PyGILState_Release(__pyx_gilstate_save); \ } else { \ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil) \ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext() \ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif /* CYTHON_REFNANNY */ #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } #define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_List_Fast(o, i) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) { #if CYTHON_COMPILING_IN_CPYTHON if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Tuple_Fast(o, i) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) { #if CYTHON_COMPILING_IN_CPYTHON if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } #define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_GetItemInt_Fast(o, i) : \ __Pyx_GetItemInt_Generic(o, to_py_func(i))) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) { #if CYTHON_COMPILING_IN_CPYTHON if (PyList_CheckExact(o)) { Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { /* inlined PySequence_GetItem() */ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (unlikely(l < 0)) return NULL; i += l; } return m->sq_item(o, i); } } #else if (PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(PyList_Append(L, x) < 0)) return NULL; Py_INCREF(Py_None); return Py_None; /* this is just to have an accurate signature */ } else { PyObject *r, *m; m = __Pyx_GetAttrString(L, "append"); if (!m) return NULL; r = PyObject_CallFunctionObjArgs(m, x, NULL); Py_DECREF(m); return r; } } #include static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE hsize_t __Pyx_div_hsize_t(hsize_t, hsize_t); /* proto */ #define UNARY_NEG_WOULD_OVERFLOW(x) (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) #if PY_VERSION_HEX < 0x02050000 #ifndef PyAnySet_CheckExact #define PyAnySet_CheckExact(ob) \ ((ob)->ob_type == &PySet_Type || \ (ob)->ob_type == &PyFrozenSet_Type) #define PySet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) #define Pyx_PyFrozenSet_New(iterable) \ PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) #define PySet_Size(anyset) \ PyObject_Size((anyset)) #define PySet_Contains(anyset, key) \ PySequence_Contains((anyset), (key)) #define PySet_Pop(set) \ PyObject_CallMethod(set, (char *)"pop", NULL) static CYTHON_INLINE int PySet_Clear(PyObject *set) { PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key); if (!ret) return -1; Py_DECREF(ret); return 0; } #endif /* PyAnySet_CheckExact (<= Py2.4) */ #endif /* < Py2.5 */ static CYTHON_INLINE hsize_t __Pyx_mod_hsize_t(hsize_t, hsize_t); /* proto */ static CYTHON_INLINE PY_LONG_LONG __Pyx_mod_PY_LONG_LONG(PY_LONG_LONG, PY_LONG_LONG); /* proto */ static CYTHON_INLINE PY_LONG_LONG __Pyx_div_PY_LONG_LONG(PY_LONG_LONG, PY_LONG_LONG); /* proto */ #define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ __Pyx_SetItemInt_Fast(o, i, v) : \ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) { #if CYTHON_COMPILING_IN_CPYTHON if (PyList_CheckExact(o)) { Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { /* inlined PySequence_SetItem() */ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (unlikely(l < 0)) return -1; i += l; } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (PySequence_Check(o) && !PyDict_Check(o)) { #else if (PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/ static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); static CYTHON_INLINE hsize_t __Pyx_PyInt_from_py_hsize_t(PyObject *); static CYTHON_INLINE hid_t __Pyx_PyInt_from_py_hid_t(PyObject *); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hsize_t(hsize_t); #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) #define __Pyx_CIMAG(z) ((z).imag()) #else #define __Pyx_CREAL(z) (__real__(z)) #define __Pyx_CIMAG(z) (__imag__(z)) #endif #else #define __Pyx_CREAL(z) ((z).real) #define __Pyx_CIMAG(z) ((z).imag) #endif #if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX #define __Pyx_SET_CREAL(z,x) ((z).real(x)) #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) #define __Pyx_c_sumf(a, b) ((a)+(b)) #define __Pyx_c_difff(a, b) ((a)-(b)) #define __Pyx_c_prodf(a, b) ((a)*(b)) #define __Pyx_c_quotf(a, b) ((a)/(b)) #define __Pyx_c_negf(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zerof(z) ((z)==(float)0) #define __Pyx_c_conjf(z) (::std::conj(z)) #if 1 #define __Pyx_c_absf(z) (::std::abs(z)) #define __Pyx_c_powf(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zerof(z) ((z)==0) #define __Pyx_c_conjf(z) (conjf(z)) #if 1 #define __Pyx_c_absf(z) (cabsf(z)) #define __Pyx_c_powf(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) #define __Pyx_c_sum(a, b) ((a)+(b)) #define __Pyx_c_diff(a, b) ((a)-(b)) #define __Pyx_c_prod(a, b) ((a)*(b)) #define __Pyx_c_quot(a, b) ((a)/(b)) #define __Pyx_c_neg(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero(z) ((z)==(double)0) #define __Pyx_c_conj(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs(z) (::std::abs(z)) #define __Pyx_c_pow(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero(z) ((z)==0) #define __Pyx_c_conj(z) (conj(z)) #if 1 #define __Pyx_c_abs(z) (cabs(z)) #define __Pyx_c_pow(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename); /*proto*/ static int __Pyx_check_binary_version(void); #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/ typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.object' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'numpy' */ /* Module declarations from 'numpy' */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ /* Module declarations from 'tables.definitions' */ /* Module declarations from 'tables.utilsextension' */ static hid_t (*__pyx_f_6tables_14utilsextension_get_native_type)(hid_t); /*proto*/ static PyObject *(*__pyx_f_6tables_14utilsextension_cstr_to_pystr)(const char *); /*proto*/ /* Module declarations from 'tables.hdf5extension' */ static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Node = 0; static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Leaf = 0; static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Array = 0; /* Module declarations from 'cpython.version' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'tables.lrucacheextension' */ static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_NodeCache = 0; static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_BaseCache = 0; static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_ObjectNode = 0; static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_ObjectCache = 0; static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_NumCache = 0; /* Module declarations from 'tables.tableextension' */ static PyTypeObject *__pyx_ptype_6tables_14tableextension_Table = 0; static PyTypeObject *__pyx_ptype_6tables_14tableextension_Row = 0; static PyObject *__pyx_f_6tables_14tableextension_get_nested_field_cache(PyObject *, PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6tables_14tableextension_join_path(PyObject *, PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "tables.tableextension" int __pyx_module_is_main_tables__tableextension = 0; /* Implementation of 'tables.tableextension' */ static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_StopIteration; static PyObject *__pyx_builtin_IOError; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_pf_6tables_14tableextension_5Table__create_table(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_complib, PyObject *__pyx_v_obversion); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_2_get_info(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_4_convert_types(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyArrayObject *__pyx_v_recarr, hsize_t __pyx_v_nrecords, int __pyx_v_sense); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_6_open_append(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyArrayObject *__pyx_v_recarr); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_8_append_records(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, int __pyx_v_nrecords); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_10_close_append(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_12_update_records(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, hsize_t __pyx_v_step, PyArrayObject *__pyx_v_recarr); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_14_update_elements(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hsize_t __pyx_v_nrecords, PyArrayObject *__pyx_v_coords, PyArrayObject *__pyx_v_recarr); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_16_read_records(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_nrecords, PyArrayObject *__pyx_v_recarr); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_18_read_elements(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyArrayObject *__pyx_v_coords, PyArrayObject *__pyx_v_recarr); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_20_remove_rows(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, long __pyx_v_step); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_4nrow___get__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_5table___get__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static int __pyx_pf_6tables_14tableextension_3Row___cinit__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_table); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_2_iter(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_step, PyObject *__pyx_v_coords, PyObject *__pyx_v_chunkmap); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_4__iter__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_6__next__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_8_fill_col(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_result, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_step, PyObject *__pyx_v_field); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_10append(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_12_flush_buffered_rows(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_14_get_unsaved_nrows(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_16update(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_18_flush_mod_rows(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static int __pyx_pf_6tables_14tableextension_3Row_20__contains__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_22__getitem__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static int __pyx_pf_6tables_14tableextension_3Row_24__setitem__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_26fetch_all_fields(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_28__str__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_30__repr__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self); /* proto */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ static char __pyx_k_1[] = ""; static char __pyx_k_2[] = "/"; static char __pyx_k_3[] = "utf-8"; static char __pyx_k_9[] = "Problems creating the table"; static char __pyx_k_11[] = "Can't set attribute '%s' in table:\n %s."; static char __pyx_k_12[] = "FIELD_%d_NAME"; static char __pyx_k_14[] = "table ``%s``, column ``%s``: %%s"; static char __pyx_k_18[] = "Non-existing node ``%s`` under ``%s``"; static char __pyx_k_19[] = "Node ``%s`` is not a Table object"; static char __pyx_k_20[] = "Problems getting desciption for table %s"; static char __pyx_k_21[] = "Problems appending the records."; static char __pyx_k_23[] = "Problems setting the NROWS attribute."; static char __pyx_k_25[] = "Problems updating the records."; static char __pyx_k_28[] = "Problems reading records."; static char __pyx_k_30[] = "Problems reading chunk records."; static char __pyx_k_33[] = "Problems deleting records."; static char __pyx_k_35[] = "step size may not be 0."; static char __pyx_k_38[] = "ITERSEQ_MAX_ELEMENTS"; static char __pyx_k_39[] = "Attempt to write over a file opened in read-only mode"; static char __pyx_k_41[] = "You cannot append rows to a non-chunked table."; static char __pyx_k_43[] = "You cannot append rows when in middle of a table iterator. If what you want is to update records, use Row.update() instead."; static char __pyx_k_45[] = "_flush_buffered_rows"; static char __pyx_k_47[] = "You are only allowed to update rows through the Row.update() method if you are in the middle of a table iterator."; static char __pyx_k_49[] = "_mark_columns_as_dirty"; static char __pyx_k_50[] = "attempt to write over a file opened in read-only mode"; static char __pyx_k_52[] = "invalid type (%s) for column ``%s``"; static char __pyx_k_53[] = "Warning: Row iterator has not been initialized for table:\n %s\n You will normally want to use this method in iterator contexts."; static char __pyx_k_54[] = "Warning: Row iterator has not been initialized for table:\n %s\n You will normally want to use this object in iterator contexts."; static char __pyx_k_55[] = "%s.row (%s), pointing to row #%d"; static char __pyx_k_56[] = "ndarray is not C contiguous"; static char __pyx_k_58[] = "ndarray is not Fortran contiguous"; static char __pyx_k_60[] = "Non-native byte order not supported"; static char __pyx_k_62[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_63[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_66[] = "Format string allocated too short."; static char __pyx_k_68[] = "The current row number.\n\n This property is useful for knowing which row is being dealt with in the\n middle of a loop or iterator.\n\n "; static char __pyx_k_69[] = "Here is where Table and Row extension types live.\n\nClasses (type extensions):\n\n Table\n Row\n\nFunctions:\n\nMisc variables:\n\n"; static char __pyx_k_70[] = "tables.description"; static char __pyx_k_71[] = "tables.exceptions"; static char __pyx_k_72[] = "tables.conditions"; static char __pyx_k_73[] = "tables.utilsextension"; static char __pyx_k_74[] = "npext_prefixes_to_ptkinds"; static char __pyx_k_75[] = "hdf5_class_to_string"; static char __pyx_k_76[] = "tables.utils"; static char __pyx_k_77[] = "tables._past"; static char __pyx_k_78[] = "previous_api_property"; static char __pyx_k_87[] = "iterseq_max_elements"; static char __pyx_k__B[] = "B"; static char __pyx_k__H[] = "H"; static char __pyx_k__I[] = "I"; static char __pyx_k__L[] = "L"; static char __pyx_k__O[] = "O"; static char __pyx_k__Q[] = "Q"; static char __pyx_k__b[] = "b"; static char __pyx_k__d[] = "d"; static char __pyx_k__f[] = "f"; static char __pyx_k__g[] = "g"; static char __pyx_k__h[] = "h"; static char __pyx_k__i[] = "i"; static char __pyx_k__l[] = "l"; static char __pyx_k__q[] = "q"; static char __pyx_k__r[] = "r"; static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__Col[] = "Col"; static char __pyx_k__add[] = "add"; static char __pyx_k__big[] = "big"; static char __pyx_k__int[] = "int"; static char __pyx_k__pos[] = "pos"; static char __pyx_k__sys[] = "sys"; static char __pyx_k__args[] = "args"; static char __pyx_k__copy[] = "copy"; static char __pyx_k__enum[] = "enum"; static char __pyx_k__flat[] = "flat"; static char __pyx_k__h5tb[] = "h5tb"; static char __pyx_k__item[] = "item"; static char __pyx_k__kind[] = "kind"; static char __pyx_k__mode[] = "mode"; static char __pyx_k__size[] = "size"; static char __pyx_k__step[] = "step"; static char __pyx_k__stop[] = "stop"; static char __pyx_k__time[] = "time"; static char __pyx_k__uint[] = "uint"; static char __pyx_k__CLASS[] = "CLASS"; static char __pyx_k__IObuf[] = "IObuf"; static char __pyx_k__NROWS[] = "NROWS"; static char __pyx_k__TITLE[] = "TITLE"; static char __pyx_k__array[] = "array"; static char __pyx_k__dtype[] = "dtype"; static char __pyx_k__empty[] = "empty"; static char __pyx_k__field[] = "field"; static char __pyx_k__float[] = "float"; static char __pyx_k__int64[] = "int64"; static char __pyx_k__iobuf[] = "iobuf"; static char __pyx_k__mixed[] = "mixed"; static char __pyx_k__names[] = "names"; static char __pyx_k__nrows[] = "nrows"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__range[] = "range"; static char __pyx_k__sense[] = "sense"; static char __pyx_k__shape[] = "shape"; static char __pyx_k__start[] = "start"; static char __pyx_k__table[] = "table"; static char __pyx_k__title[] = "title"; static char __pyx_k__zeros[] = "zeros"; static char __pyx_k____eq__[] = "__eq__"; static char __pyx_k___v_pos[] = "_v_pos"; static char __pyx_k__arange[] = "arange"; static char __pyx_k__coords[] = "coords"; static char __pyx_k__encode[] = "encode"; static char __pyx_k__extend[] = "extend"; static char __pyx_k__little[] = "little"; static char __pyx_k__params[] = "params"; static char __pyx_k__recarr[] = "recarr"; static char __pyx_k__result[] = "result"; static char __pyx_k__time32[] = "time32"; static char __pyx_k__time64[] = "time64"; static char __pyx_k__uint64[] = "uint64"; static char __pyx_k__IOError[] = "IOError"; static char __pyx_k__VERSION[] = "VERSION"; static char __pyx_k___v_file[] = "_v_file"; static char __pyx_k__alltrue[] = "alltrue"; static char __pyx_k__asarray[] = "asarray"; static char __pyx_k__complex[] = "complex"; static char __pyx_k__complib[] = "complib"; static char __pyx_k__filters[] = "filters"; static char __pyx_k__rowsize[] = "rowsize"; static char __pyx_k__shuffle[] = "shuffle"; static char __pyx_k__strides[] = "strides"; static char __pyx_k__IObufcpy[] = "IObufcpy"; static char __pyx_k__KeyError[] = "KeyError"; static char __pyx_k__SizeType[] = "SizeType"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____name__[] = "__name__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k___chunked[] = "_chunked"; static char __pyx_k___fillCol[] = "_fillCol"; static char __pyx_k___v_dtype[] = "_v_dtype"; static char __pyx_k___v_names[] = "_v_names"; static char __pyx_k__byteswap[] = "byteswap"; static char __pyx_k__chunkmap[] = "chunkmap"; static char __pyx_k__coltypes[] = "coltypes"; static char __pyx_k__iobufcpy[] = "iobufcpy"; static char __pyx_k__itemsize[] = "itemsize"; static char __pyx_k__nrecords[] = "nrecords"; static char __pyx_k__sometrue[] = "sometrue"; static char __pyx_k__TypeError[] = "TypeError"; static char __pyx_k____class__[] = "__class__"; static char __pyx_k___colenums[] = "_colenums"; static char __pyx_k___fill_col[] = "_fill_col"; static char __pyx_k___get_node[] = "_get_node"; static char __pyx_k___nslotseq[] = "_nslotseq"; static char __pyx_k___seqcache[] = "_seqcache"; static char __pyx_k___v_leaves[] = "_v_leaves"; static char __pyx_k___v_parent[] = "_v_parent"; static char __pyx_k___v_wdflts[] = "_v_wdflts"; static char __pyx_k__byteorder[] = "byteorder"; static char __pyx_k__coldescrs[] = "coldescrs"; static char __pyx_k__complevel[] = "complevel"; static char __pyx_k__enumerate[] = "enumerate"; static char __pyx_k__from_atom[] = "from_atom"; static char __pyx_k__obversion[] = "obversion"; static char __pyx_k__whereCond[] = "whereCond"; static char __pyx_k__wherecond[] = "wherecond"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k___byteorder[] = "_byteorder"; static char __pyx_k___c_classid[] = "_c_classid"; static char __pyx_k___use_index[] = "_use_index"; static char __pyx_k__chunkshape[] = "chunkshape"; static char __pyx_k__fletcher32[] = "fletcher32"; static char __pyx_k__indexChunk[] = "indexChunk"; static char __pyx_k__indexValid[] = "indexValid"; static char __pyx_k__indexchunk[] = "indexchunk"; static char __pyx_k__indexvalid[] = "indexvalid"; static char __pyx_k__irrelevant[] = "irrelevant"; static char __pyx_k__nrowsinbuf[] = "nrowsinbuf"; static char __pyx_k__H5T_STD_I64[] = "H5T_STD_I64"; static char __pyx_k___chunkcache[] = "_chunkcache"; static char __pyx_k___dirtycache[] = "_dirtycache"; static char __pyx_k___v_pathname[] = "_v_pathname"; static char __pyx_k___v_recarray[] = "_v_recarray"; static char __pyx_k__description[] = "description"; static char __pyx_k__indexValues[] = "indexValues"; static char __pyx_k__indexvalues[] = "indexvalues"; static char __pyx_k__HDF5ExtError[] = "HDF5ExtError"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k___remove_rows[] = "_remove_rows"; static char __pyx_k__chunkmapData[] = "chunkmapData"; static char __pyx_k__colpathnames[] = "colpathnames"; static char __pyx_k__previous_api[] = "previous_api"; static char __pyx_k__StopIteration[] = "StopIteration"; static char __pyx_k___flushModRows[] = "_flushModRows"; static char __pyx_k___read_records[] = "_read_records"; static char __pyx_k__bufcoordsData[] = "bufcoordsData"; static char __pyx_k__chunkmap_data[] = "chunkmap_data"; static char __pyx_k___convert_types[] = "_convert_types"; static char __pyx_k___get_container[] = "_get_container"; static char __pyx_k___read_elements[] = "_read_elements"; static char __pyx_k__bufcoords_data[] = "bufcoords_data"; static char __pyx_k__call_on_recarr[] = "call_on_recarr"; static char __pyx_k__indexValidData[] = "indexValidData"; static char __pyx_k__pttype_to_hdf5[] = "pttype_to_hdf5"; static char __pyx_k___flush_mod_rows[] = "_flush_mod_rows"; static char __pyx_k___time64colnames[] = "_time64colnames"; static char __pyx_k__indexValuesData[] = "indexValuesData"; static char __pyx_k___getUnsavedNrows[] = "_getUnsavedNrows"; static char __pyx_k___update_elements[] = "_update_elements"; static char __pyx_k___where_condition[] = "_where_condition"; static char __pyx_k__fetch_all_fields[] = "fetch_all_fields"; static char __pyx_k__get_nested_field[] = "get_nested_field"; static char __pyx_k__index_valid_data[] = "index_valid_data"; static char __pyx_k__pt_special_kinds[] = "pt_special_kinds"; static char __pyx_k__index_values_data[] = "index_values_data"; static char __pyx_k__PYTABLES_SYS_ATTRS[] = "PYTABLES_SYS_ATTRS"; static char __pyx_k___flushBufferedRows[] = "_flushBufferedRows"; static char __pyx_k___get_unsaved_nrows[] = "_get_unsaved_nrows"; static char __pyx_k__create_nested_type[] = "create_nested_type"; static char __pyx_k__iterseqMaxElements[] = "iterseqMaxElements"; static char __pyx_k__platform_byteorder[] = "platform_byteorder"; static char __pyx_k__NotImplementedError[] = "NotImplementedError"; static char __pyx_k___save_buffered_rows[] = "_save_buffered_rows"; static char __pyx_k__atom_from_hdf5_type[] = "atom_from_hdf5_type"; static char __pyx_k__hdf5_to_np_ext_type[] = "hdf5_to_np_ext_type"; static PyObject *__pyx_kp_s_1; static PyObject *__pyx_kp_s_11; static PyObject *__pyx_kp_s_14; static PyObject *__pyx_kp_s_18; static PyObject *__pyx_kp_s_19; static PyObject *__pyx_kp_s_2; static PyObject *__pyx_kp_s_20; static PyObject *__pyx_kp_s_21; static PyObject *__pyx_kp_s_23; static PyObject *__pyx_kp_s_25; static PyObject *__pyx_kp_s_28; static PyObject *__pyx_kp_s_3; static PyObject *__pyx_kp_s_30; static PyObject *__pyx_kp_s_33; static PyObject *__pyx_kp_s_35; static PyObject *__pyx_n_s_38; static PyObject *__pyx_kp_s_39; static PyObject *__pyx_kp_s_41; static PyObject *__pyx_kp_s_43; static PyObject *__pyx_n_s_45; static PyObject *__pyx_kp_s_47; static PyObject *__pyx_n_s_49; static PyObject *__pyx_kp_s_50; static PyObject *__pyx_kp_s_52; static PyObject *__pyx_kp_s_53; static PyObject *__pyx_kp_s_54; static PyObject *__pyx_kp_s_55; static PyObject *__pyx_kp_u_56; static PyObject *__pyx_kp_u_58; static PyObject *__pyx_kp_u_60; static PyObject *__pyx_kp_u_62; static PyObject *__pyx_kp_u_63; static PyObject *__pyx_kp_u_66; static PyObject *__pyx_n_s_70; static PyObject *__pyx_n_s_71; static PyObject *__pyx_n_s_72; static PyObject *__pyx_n_s_73; static PyObject *__pyx_n_s_74; static PyObject *__pyx_n_s_75; static PyObject *__pyx_n_s_76; static PyObject *__pyx_n_s_77; static PyObject *__pyx_n_s_78; static PyObject *__pyx_n_s_87; static PyObject *__pyx_kp_s_9; static PyObject *__pyx_n_s__CLASS; static PyObject *__pyx_n_s__Col; static PyObject *__pyx_n_s__H5T_STD_I64; static PyObject *__pyx_n_s__HDF5ExtError; static PyObject *__pyx_n_s__IOError; static PyObject *__pyx_n_s__IObuf; static PyObject *__pyx_n_s__IObufcpy; static PyObject *__pyx_n_s__KeyError; static PyObject *__pyx_n_s__NROWS; static PyObject *__pyx_n_s__NotImplementedError; static PyObject *__pyx_n_s__PYTABLES_SYS_ATTRS; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__SizeType; static PyObject *__pyx_n_s__StopIteration; static PyObject *__pyx_n_s__TITLE; static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__VERSION; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s____class__; static PyObject *__pyx_n_s____eq__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____name__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s___byteorder; static PyObject *__pyx_n_s___c_classid; static PyObject *__pyx_n_s___chunkcache; static PyObject *__pyx_n_s___chunked; static PyObject *__pyx_n_s___colenums; static PyObject *__pyx_n_s___convert_types; static PyObject *__pyx_n_s___dirtycache; static PyObject *__pyx_n_s___fillCol; static PyObject *__pyx_n_s___fill_col; static PyObject *__pyx_n_s___flushBufferedRows; static PyObject *__pyx_n_s___flushModRows; static PyObject *__pyx_n_s___flush_mod_rows; static PyObject *__pyx_n_s___getUnsavedNrows; static PyObject *__pyx_n_s___get_container; static PyObject *__pyx_n_s___get_node; static PyObject *__pyx_n_s___get_unsaved_nrows; static PyObject *__pyx_n_s___nslotseq; static PyObject *__pyx_n_s___read_elements; static PyObject *__pyx_n_s___read_records; static PyObject *__pyx_n_s___remove_rows; static PyObject *__pyx_n_s___save_buffered_rows; static PyObject *__pyx_n_s___seqcache; static PyObject *__pyx_n_s___time64colnames; static PyObject *__pyx_n_s___update_elements; static PyObject *__pyx_n_s___use_index; static PyObject *__pyx_n_s___v_dtype; static PyObject *__pyx_n_s___v_file; static PyObject *__pyx_n_s___v_leaves; static PyObject *__pyx_n_s___v_names; static PyObject *__pyx_n_s___v_parent; static PyObject *__pyx_n_s___v_pathname; static PyObject *__pyx_n_s___v_pos; static PyObject *__pyx_n_s___v_recarray; static PyObject *__pyx_n_s___v_wdflts; static PyObject *__pyx_n_s___where_condition; static PyObject *__pyx_n_s__add; static PyObject *__pyx_n_s__alltrue; static PyObject *__pyx_n_s__arange; static PyObject *__pyx_n_s__args; static PyObject *__pyx_n_s__array; static PyObject *__pyx_n_s__asarray; static PyObject *__pyx_n_s__atom_from_hdf5_type; static PyObject *__pyx_n_s__big; static PyObject *__pyx_n_s__bufcoordsData; static PyObject *__pyx_n_s__bufcoords_data; static PyObject *__pyx_n_s__byteorder; static PyObject *__pyx_n_s__byteswap; static PyObject *__pyx_n_s__call_on_recarr; static PyObject *__pyx_n_s__chunkmap; static PyObject *__pyx_n_s__chunkmapData; static PyObject *__pyx_n_s__chunkmap_data; static PyObject *__pyx_n_s__chunkshape; static PyObject *__pyx_n_s__coldescrs; static PyObject *__pyx_n_s__colpathnames; static PyObject *__pyx_n_s__coltypes; static PyObject *__pyx_n_s__complevel; static PyObject *__pyx_n_s__complex; static PyObject *__pyx_n_s__complib; static PyObject *__pyx_n_s__coords; static PyObject *__pyx_n_s__copy; static PyObject *__pyx_n_s__create_nested_type; static PyObject *__pyx_n_s__description; static PyObject *__pyx_n_s__dtype; static PyObject *__pyx_n_s__empty; static PyObject *__pyx_n_s__encode; static PyObject *__pyx_n_s__enum; static PyObject *__pyx_n_s__enumerate; static PyObject *__pyx_n_s__extend; static PyObject *__pyx_n_s__fetch_all_fields; static PyObject *__pyx_n_s__field; static PyObject *__pyx_n_s__filters; static PyObject *__pyx_n_s__flat; static PyObject *__pyx_n_s__fletcher32; static PyObject *__pyx_n_s__float; static PyObject *__pyx_n_s__from_atom; static PyObject *__pyx_n_s__get_nested_field; static PyObject *__pyx_n_s__h5tb; static PyObject *__pyx_n_s__hdf5_to_np_ext_type; static PyObject *__pyx_n_s__indexChunk; static PyObject *__pyx_n_s__indexValid; static PyObject *__pyx_n_s__indexValidData; static PyObject *__pyx_n_s__indexValues; static PyObject *__pyx_n_s__indexValuesData; static PyObject *__pyx_n_s__index_valid_data; static PyObject *__pyx_n_s__index_values_data; static PyObject *__pyx_n_s__indexchunk; static PyObject *__pyx_n_s__indexvalid; static PyObject *__pyx_n_s__indexvalues; static PyObject *__pyx_n_s__int; static PyObject *__pyx_n_s__int64; static PyObject *__pyx_n_s__iobuf; static PyObject *__pyx_n_s__iobufcpy; static PyObject *__pyx_n_s__irrelevant; static PyObject *__pyx_n_s__item; static PyObject *__pyx_n_s__itemsize; static PyObject *__pyx_n_s__iterseqMaxElements; static PyObject *__pyx_n_s__kind; static PyObject *__pyx_n_s__little; static PyObject *__pyx_n_s__mixed; static PyObject *__pyx_n_s__mode; static PyObject *__pyx_n_s__names; static PyObject *__pyx_n_s__nrecords; static PyObject *__pyx_n_s__nrows; static PyObject *__pyx_n_s__nrowsinbuf; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__obversion; static PyObject *__pyx_n_s__params; static PyObject *__pyx_n_s__platform_byteorder; static PyObject *__pyx_n_s__pos; static PyObject *__pyx_n_s__previous_api; static PyObject *__pyx_n_s__pt_special_kinds; static PyObject *__pyx_n_s__pttype_to_hdf5; static PyObject *__pyx_n_s__r; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__recarr; static PyObject *__pyx_n_s__result; static PyObject *__pyx_n_s__rowsize; static PyObject *__pyx_n_s__sense; static PyObject *__pyx_n_s__shape; static PyObject *__pyx_n_s__shuffle; static PyObject *__pyx_n_s__size; static PyObject *__pyx_n_s__sometrue; static PyObject *__pyx_n_s__start; static PyObject *__pyx_n_s__step; static PyObject *__pyx_n_s__stop; static PyObject *__pyx_n_s__strides; static PyObject *__pyx_n_s__sys; static PyObject *__pyx_n_s__table; static PyObject *__pyx_n_s__time; static PyObject *__pyx_n_s__time32; static PyObject *__pyx_n_s__time64; static PyObject *__pyx_n_s__title; static PyObject *__pyx_n_s__uint; static PyObject *__pyx_n_s__uint64; static PyObject *__pyx_n_s__whereCond; static PyObject *__pyx_n_s__wherecond; static PyObject *__pyx_n_s__zeros; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_15; static PyObject *__pyx_k_tuple_4; static PyObject *__pyx_k_tuple_5; static PyObject *__pyx_k_tuple_6; static PyObject *__pyx_k_tuple_7; static PyObject *__pyx_k_tuple_8; static PyObject *__pyx_k_tuple_10; static PyObject *__pyx_k_tuple_13; static PyObject *__pyx_k_tuple_15; static PyObject *__pyx_k_tuple_16; static PyObject *__pyx_k_tuple_17; static PyObject *__pyx_k_tuple_22; static PyObject *__pyx_k_tuple_24; static PyObject *__pyx_k_tuple_26; static PyObject *__pyx_k_tuple_27; static PyObject *__pyx_k_tuple_29; static PyObject *__pyx_k_tuple_31; static PyObject *__pyx_k_tuple_32; static PyObject *__pyx_k_tuple_34; static PyObject *__pyx_k_tuple_36; static PyObject *__pyx_k_tuple_37; static PyObject *__pyx_k_tuple_40; static PyObject *__pyx_k_tuple_42; static PyObject *__pyx_k_tuple_44; static PyObject *__pyx_k_tuple_46; static PyObject *__pyx_k_tuple_48; static PyObject *__pyx_k_tuple_51; static PyObject *__pyx_k_tuple_57; static PyObject *__pyx_k_tuple_59; static PyObject *__pyx_k_tuple_61; static PyObject *__pyx_k_tuple_64; static PyObject *__pyx_k_tuple_65; static PyObject *__pyx_k_tuple_67; static PyObject *__pyx_k_tuple_79; static PyObject *__pyx_k_tuple_80; static PyObject *__pyx_k_tuple_81; static PyObject *__pyx_k_tuple_82; static PyObject *__pyx_k_tuple_83; static PyObject *__pyx_k_tuple_84; static PyObject *__pyx_k_tuple_85; static PyObject *__pyx_k_tuple_86; static PyObject *__pyx_k_tuple_88; static PyObject *__pyx_k_tuple_89; static PyObject *__pyx_k_tuple_90; /* "tables/tableextension.pyx":117 * * # Private functions * cdef get_nested_field_cache(recarray, fieldname, fieldcache): # <<<<<<<<<<<<<< * """Get the maybe nested field named `fieldname` from the `recarray`. * */ static PyObject *__pyx_f_6tables_14tableextension_get_nested_field_cache(PyObject *__pyx_v_recarray, PyObject *__pyx_v_fieldname, PyObject *__pyx_v_fieldcache) { PyObject *__pyx_v_field = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_nested_field_cache", 0); /* "tables/tableextension.pyx":126 * """ * * try: # <<<<<<<<<<<<<< * field = fieldcache[fieldname] * except KeyError: */ { __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "tables/tableextension.pyx":127 * * try: * field = fieldcache[fieldname] # <<<<<<<<<<<<<< * except KeyError: * # Check whether fieldname is an integer and if so, get the field */ __pyx_t_4 = PyObject_GetItem(__pyx_v_fieldcache, __pyx_v_fieldname); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_field = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":128 * try: * field = fieldcache[fieldname] * except KeyError: # <<<<<<<<<<<<<< * # Check whether fieldname is an integer and if so, get the field * # straight from the recarray dictionary (it can't be anywhere else) */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_5) { __Pyx_AddTraceback("tables.tableextension.get_nested_field_cache", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "tables/tableextension.pyx":131 * # Check whether fieldname is an integer and if so, get the field * # straight from the recarray dictionary (it can't be anywhere else) * if isinstance(fieldname, int): # <<<<<<<<<<<<<< * field = recarray[fieldname] * else: */ __pyx_t_8 = ((PyObject *)((PyObject*)(&PyInt_Type))); __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = __Pyx_TypeCheck(__pyx_v_fieldname, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { /* "tables/tableextension.pyx":132 * # straight from the recarray dictionary (it can't be anywhere else) * if isinstance(fieldname, int): * field = recarray[fieldname] # <<<<<<<<<<<<<< * else: * field = get_nested_field(recarray, fieldname) */ __pyx_t_8 = PyObject_GetItem(__pyx_v_recarray, __pyx_v_fieldname); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF(__pyx_v_field); __pyx_v_field = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L13; } /*else*/ { /* "tables/tableextension.pyx":134 * field = recarray[fieldname] * else: * field = get_nested_field(recarray, fieldname) # <<<<<<<<<<<<<< * fieldcache[fieldname] = field * return field */ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_nested_field); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_recarray); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_recarray); __Pyx_GIVEREF(__pyx_v_recarray); __Pyx_INCREF(__pyx_v_fieldname); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_fieldname); __Pyx_GIVEREF(__pyx_v_fieldname); __pyx_t_11 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_v_field); __pyx_v_field = __pyx_t_11; __pyx_t_11 = 0; } __pyx_L13:; /* "tables/tableextension.pyx":135 * else: * field = get_nested_field(recarray, fieldname) * fieldcache[fieldname] = field # <<<<<<<<<<<<<< * return field * */ if (PyObject_SetItem(__pyx_v_fieldcache, __pyx_v_fieldname, __pyx_v_field) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "tables/tableextension.pyx":136 * field = get_nested_field(recarray, fieldname) * fieldcache[fieldname] = field * return field # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_field); __pyx_r = __pyx_v_field; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("tables.tableextension.get_nested_field_cache", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_field); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":139 * * * cdef join_path(object parent, object name): # <<<<<<<<<<<<<< * if parent == "": * return name */ static PyObject *__pyx_f_6tables_14tableextension_join_path(PyObject *__pyx_v_parent, PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("join_path", 0); /* "tables/tableextension.pyx":140 * * cdef join_path(object parent, object name): * if parent == "": # <<<<<<<<<<<<<< * return name * else: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_parent, ((PyObject *)__pyx_kp_s_1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "tables/tableextension.pyx":141 * cdef join_path(object parent, object name): * if parent == "": * return name # <<<<<<<<<<<<<< * else: * return parent + '/' + name */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_name); __pyx_r = __pyx_v_name; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "tables/tableextension.pyx":143 * return name * else: * return parent + '/' + name # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Add(__pyx_v_parent, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.tableextension.join_path", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_1_create_table(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_5Table_1_create_table(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_title = 0; PyObject *__pyx_v_complib = 0; PyObject *__pyx_v_obversion = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_create_table (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__title,&__pyx_n_s__complib,&__pyx_n_s__obversion,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__title)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__complib)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_create_table", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obversion)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_create_table", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_create_table") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_title = values[0]; __pyx_v_complib = values[1]; __pyx_v_obversion = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_create_table", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Table._create_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_14tableextension_5Table__create_table(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self), __pyx_v_title, __pyx_v_complib, __pyx_v_obversion); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":152 * cdef void *wbuf * * def _create_table(self, title, complib, obversion): # <<<<<<<<<<<<<< * cdef int offset * cdef int ret */ static PyObject *__pyx_pf_6tables_14tableextension_5Table__create_table(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyObject *__pyx_v_title, PyObject *__pyx_v_complib, PyObject *__pyx_v_obversion) { int __pyx_v_ret; void *__pyx_v_data; hsize_t __pyx_v_nrows; PyObject *__pyx_v_class_ = 0; PyArrayObject *__pyx_v_wdflts = 0; void *__pyx_v_fill_data; PyArrayObject *__pyx_v_recarr = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_encoded_title = 0; PyObject *__pyx_v_encoded_complib = 0; PyObject *__pyx_v_encoded_obversion = 0; char *__pyx_v_ctitle; char *__pyx_v_cobversion; PyObject *__pyx_v_encoded_name = 0; char __pyx_v_fieldname[128]; int __pyx_v_i; enum H5T_cset_t __pyx_v_cset; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; hid_t __pyx_t_6; int __pyx_t_7; char *__pyx_t_8; hsize_t __pyx_t_9; hsize_t __pyx_t_10; int __pyx_t_11; char *__pyx_t_12; int __pyx_t_13; int __pyx_t_14; Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); Py_ssize_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_create_table", 0); /* "tables/tableextension.pyx":165 * cdef object name * cdef bytes encoded_title, encoded_complib, encoded_obversion * cdef char *ctitle = NULL, *cobversion = NULL # <<<<<<<<<<<<<< * cdef bytes encoded_name * cdef char fieldname[128] */ __pyx_v_ctitle = NULL; __pyx_v_cobversion = NULL; /* "tables/tableextension.pyx":169 * cdef char fieldname[128] * cdef int i * cdef H5T_cset_t cset = H5T_CSET_ASCII # <<<<<<<<<<<<<< * * encoded_title = title.encode('utf-8') */ __pyx_v_cset = H5T_CSET_ASCII; /* "tables/tableextension.pyx":171 * cdef H5T_cset_t cset = H5T_CSET_ASCII * * encoded_title = title.encode('utf-8') # <<<<<<<<<<<<<< * encoded_complib = complib.encode('utf-8') * encoded_obversion = obversion.encode('utf-8') */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_title, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_title = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":172 * * encoded_title = title.encode('utf-8') * encoded_complib = complib.encode('utf-8') # <<<<<<<<<<<<<< * encoded_obversion = obversion.encode('utf-8') * encoded_name = self.name.encode('utf-8') */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_complib, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_complib = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":173 * encoded_title = title.encode('utf-8') * encoded_complib = complib.encode('utf-8') * encoded_obversion = obversion.encode('utf-8') # <<<<<<<<<<<<<< * encoded_name = self.name.encode('utf-8') * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_obversion, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_obversion = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":174 * encoded_complib = complib.encode('utf-8') * encoded_obversion = obversion.encode('utf-8') * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Get the C pointer */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->__pyx_base.__pyx_base.name, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":177 * * # Get the C pointer * ctitle = encoded_title # <<<<<<<<<<<<<< * cobversion = encoded_obversion * */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_title)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ctitle = __pyx_t_3; /* "tables/tableextension.pyx":178 * # Get the C pointer * ctitle = encoded_title * cobversion = encoded_obversion # <<<<<<<<<<<<<< * * # Compute the complete compound datatype based on the table description */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_obversion)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cobversion = __pyx_t_3; /* "tables/tableextension.pyx":181 * * # Compute the complete compound datatype based on the table description * self.disk_type_id = create_nested_type(self.description, self.byteorder) # <<<<<<<<<<<<<< * #self.type_id = H5Tcopy(self.disk_type_id) * # A H5Tcopy only is not enough, as we want the in-memory type to be */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__create_nested_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__description); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__byteorder); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyInt_from_py_hid_t(__pyx_t_4); if (unlikely((__pyx_t_6 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->__pyx_base.disk_type_id = __pyx_t_6; /* "tables/tableextension.pyx":185 * # A H5Tcopy only is not enough, as we want the in-memory type to be * # in the byteorder of the machine (sys.byteorder). * self.type_id = create_nested_type(self.description, sys.byteorder) # <<<<<<<<<<<<<< * * # The fill values area */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__create_nested_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__description); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx_base.type_id = __pyx_t_6; /* "tables/tableextension.pyx":188 * * # The fill values area * wdflts = self._v_wdflts # <<<<<<<<<<<<<< * if wdflts is None: * fill_data = NULL */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_wdflts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_wdflts = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":189 * # The fill values area * wdflts = self._v_wdflts * if wdflts is None: # <<<<<<<<<<<<<< * fill_data = NULL * else: */ __pyx_t_7 = (((PyObject *)__pyx_v_wdflts) == Py_None); if (__pyx_t_7) { /* "tables/tableextension.pyx":190 * wdflts = self._v_wdflts * if wdflts is None: * fill_data = NULL # <<<<<<<<<<<<<< * else: * fill_data = wdflts.data */ __pyx_v_fill_data = NULL; goto __pyx_L3; } /*else*/ { /* "tables/tableextension.pyx":192 * fill_data = NULL * else: * fill_data = wdflts.data # <<<<<<<<<<<<<< * * # test if there is data to be saved initially */ __pyx_t_3 = __pyx_v_wdflts->data; __pyx_v_fill_data = __pyx_t_3; } __pyx_L3:; /* "tables/tableextension.pyx":195 * * # test if there is data to be saved initially * if self._v_recarray is not None: # <<<<<<<<<<<<<< * recarr = self._v_recarray * data = recarr.data */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_recarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { /* "tables/tableextension.pyx":196 * # test if there is data to be saved initially * if self._v_recarray is not None: * recarr = self._v_recarray # <<<<<<<<<<<<<< * data = recarr.data * else: */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_recarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_recarr = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":197 * if self._v_recarray is not None: * recarr = self._v_recarray * data = recarr.data # <<<<<<<<<<<<<< * else: * data = NULL */ __pyx_t_3 = __pyx_v_recarr->data; __pyx_v_data = __pyx_t_3; goto __pyx_L4; } /*else*/ { /* "tables/tableextension.pyx":199 * data = recarr.data * else: * data = NULL # <<<<<<<<<<<<<< * * class_ = self._c_classid.encode('utf-8') */ __pyx_v_data = NULL; } __pyx_L4:; /* "tables/tableextension.pyx":201 * data = NULL * * class_ = self._c_classid.encode('utf-8') # <<<<<<<<<<<<<< * self.dataset_id = H5TBOmake_table(ctitle, self.parent_id, encoded_name, * cobversion, class_, self.disk_type_id, */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___c_classid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_class_ = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":202 * * class_ = self._c_classid.encode('utf-8') * self.dataset_id = H5TBOmake_table(ctitle, self.parent_id, encoded_name, # <<<<<<<<<<<<<< * cobversion, class_, self.disk_type_id, * self.nrows, self.chunkshape[0], */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":203 * class_ = self._c_classid.encode('utf-8') * self.dataset_id = H5TBOmake_table(ctitle, self.parent_id, encoded_name, * cobversion, class_, self.disk_type_id, # <<<<<<<<<<<<<< * self.nrows, self.chunkshape[0], * fill_data, */ __pyx_t_8 = PyBytes_AsString(((PyObject *)__pyx_v_class_)); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":204 * self.dataset_id = H5TBOmake_table(ctitle, self.parent_id, encoded_name, * cobversion, class_, self.disk_type_id, * self.nrows, self.chunkshape[0], # <<<<<<<<<<<<<< * fill_data, * self.filters.complevel, encoded_complib, */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__chunkshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_10 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":206 * self.nrows, self.chunkshape[0], * fill_data, * self.filters.complevel, encoded_complib, # <<<<<<<<<<<<<< * self.filters.shuffle, * self.filters.fletcher32, */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__complevel); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_complib)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":207 * fill_data, * self.filters.complevel, encoded_complib, * self.filters.shuffle, # <<<<<<<<<<<<<< * self.filters.fletcher32, * data) */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__shuffle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":208 * self.filters.complevel, encoded_complib, * self.filters.shuffle, * self.filters.fletcher32, # <<<<<<<<<<<<<< * data) * if self.dataset_id < 0: */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__fletcher32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":202 * * class_ = self._c_classid.encode('utf-8') * self.dataset_id = H5TBOmake_table(ctitle, self.parent_id, encoded_name, # <<<<<<<<<<<<<< * cobversion, class_, self.disk_type_id, * self.nrows, self.chunkshape[0], */ __pyx_v_self->__pyx_base.dataset_id = H5TBOmake_table(__pyx_v_ctitle, __pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_3, __pyx_v_cobversion, __pyx_t_8, __pyx_v_self->__pyx_base.disk_type_id, __pyx_t_9, __pyx_t_10, __pyx_v_fill_data, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_v_data); /* "tables/tableextension.pyx":210 * self.filters.fletcher32, * data) * if self.dataset_id < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems creating the table") * */ __pyx_t_7 = (__pyx_v_self->__pyx_base.dataset_id < 0); if (__pyx_t_7) { /* "tables/tableextension.pyx":211 * data) * if self.dataset_id < 0: * raise HDF5ExtError("Problems creating the table") # <<<<<<<<<<<<<< * * if self._v_file.params['PYTABLES_SYS_ATTRS']: */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "tables/tableextension.pyx":213 * raise HDF5ExtError("Problems creating the table") * * if self._v_file.params['PYTABLES_SYS_ATTRS']: # <<<<<<<<<<<<<< * if PY_MAJOR_VERSION > 2: * cset = H5T_CSET_UTF8 */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_file); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__params); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__PYTABLES_SYS_ATTRS)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "tables/tableextension.pyx":214 * * if self._v_file.params['PYTABLES_SYS_ATTRS']: * if PY_MAJOR_VERSION > 2: # <<<<<<<<<<<<<< * cset = H5T_CSET_UTF8 * # Set the conforming table attributes */ __pyx_t_7 = (PY_MAJOR_VERSION > 2); if (__pyx_t_7) { /* "tables/tableextension.pyx":215 * if self._v_file.params['PYTABLES_SYS_ATTRS']: * if PY_MAJOR_VERSION > 2: * cset = H5T_CSET_UTF8 # <<<<<<<<<<<<<< * # Set the conforming table attributes * # Attach the CLASS attribute */ __pyx_v_cset = H5T_CSET_UTF8; goto __pyx_L7; } __pyx_L7:; /* "tables/tableextension.pyx":218 * # Set the conforming table attributes * # Attach the CLASS attribute * ret = H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, # <<<<<<<<<<<<<< * len(class_), cset) * if ret < 0: */ __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_class_)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":219 * # Attach the CLASS attribute * ret = H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, * len(class_), cset) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % */ if (unlikely(((PyObject *)__pyx_v_class_) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_class_)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__CLASS, __pyx_t_12, __pyx_t_15, __pyx_v_cset); /* "tables/tableextension.pyx":220 * ret = H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, * len(class_), cset) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * ("CLASS", self.name)) */ __pyx_t_7 = (__pyx_v_ret < 0); if (__pyx_t_7) { /* "tables/tableextension.pyx":221 * len(class_), cset) * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % # <<<<<<<<<<<<<< * ("CLASS", self.name)) * # Attach the VERSION attribute */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "tables/tableextension.pyx":222 * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * ("CLASS", self.name)) # <<<<<<<<<<<<<< * # Attach the VERSION attribute * ret = H5ATTRset_attribute_string(self.dataset_id, "VERSION", cobversion, */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__CLASS)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__CLASS)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__CLASS)); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base.__pyx_base.name); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "tables/tableextension.pyx":225 * # Attach the VERSION attribute * ret = H5ATTRset_attribute_string(self.dataset_id, "VERSION", cobversion, * len(encoded_obversion), cset) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % */ if (unlikely(((PyObject *)__pyx_v_encoded_obversion) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_encoded_obversion)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__VERSION, __pyx_v_cobversion, __pyx_t_15, __pyx_v_cset); /* "tables/tableextension.pyx":226 * ret = H5ATTRset_attribute_string(self.dataset_id, "VERSION", cobversion, * len(encoded_obversion), cset) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * ("VERSION", self.name)) */ __pyx_t_7 = (__pyx_v_ret < 0); if (__pyx_t_7) { /* "tables/tableextension.pyx":227 * len(encoded_obversion), cset) * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % # <<<<<<<<<<<<<< * ("VERSION", self.name)) * # Attach the TITLE attribute */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "tables/tableextension.pyx":228 * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * ("VERSION", self.name)) # <<<<<<<<<<<<<< * # Attach the TITLE attribute * ret = H5ATTRset_attribute_string(self.dataset_id, "TITLE", ctitle, */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__VERSION)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__VERSION)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VERSION)); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base.__pyx_base.name); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; /* "tables/tableextension.pyx":231 * # Attach the TITLE attribute * ret = H5ATTRset_attribute_string(self.dataset_id, "TITLE", ctitle, * len(encoded_title), cset) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % */ if (unlikely(((PyObject *)__pyx_v_encoded_title) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_15 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_encoded_title)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__TITLE, __pyx_v_ctitle, __pyx_t_15, __pyx_v_cset); /* "tables/tableextension.pyx":232 * ret = H5ATTRset_attribute_string(self.dataset_id, "TITLE", ctitle, * len(encoded_title), cset) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * ("TITLE", self.name)) */ __pyx_t_7 = (__pyx_v_ret < 0); if (__pyx_t_7) { /* "tables/tableextension.pyx":233 * len(encoded_title), cset) * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % # <<<<<<<<<<<<<< * ("TITLE", self.name)) * # Attach the NROWS attribute */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "tables/tableextension.pyx":234 * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * ("TITLE", self.name)) # <<<<<<<<<<<<<< * # Attach the NROWS attribute * nrows = self.nrows */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__TITLE)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__TITLE)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__TITLE)); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base.__pyx_base.name); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; /* "tables/tableextension.pyx":236 * ("TITLE", self.name)) * # Attach the NROWS attribute * nrows = self.nrows # <<<<<<<<<<<<<< * ret = H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, * 0, NULL, &nrows) */ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_4); if (unlikely((__pyx_t_10 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nrows = __pyx_t_10; /* "tables/tableextension.pyx":237 * # Attach the NROWS attribute * nrows = self.nrows * ret = H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, # <<<<<<<<<<<<<< * 0, NULL, &nrows) * if ret < 0: */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__H5T_STD_I64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_from_py_hid_t(__pyx_t_4); if (unlikely((__pyx_t_6 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":238 * nrows = self.nrows * ret = H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, * 0, NULL, &nrows) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % */ __pyx_v_ret = H5ATTRset_attribute(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__NROWS, __pyx_t_6, 0, NULL, ((char *)(&__pyx_v_nrows))); /* "tables/tableextension.pyx":239 * ret = H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, * 0, NULL, &nrows) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * ("NROWS", self.name)) */ __pyx_t_7 = (__pyx_v_ret < 0); if (__pyx_t_7) { /* "tables/tableextension.pyx":240 * 0, NULL, &nrows) * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % # <<<<<<<<<<<<<< * ("NROWS", self.name)) * */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "tables/tableextension.pyx":241 * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * ("NROWS", self.name)) # <<<<<<<<<<<<<< * * # Attach the FIELD_N_NAME attributes */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__NROWS)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__NROWS)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NROWS)); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base.__pyx_base.name); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L11; } __pyx_L11:; /* "tables/tableextension.pyx":245 * # Attach the FIELD_N_NAME attributes * # We write only the first level names * for i, name in enumerate(self.description._v_names): # <<<<<<<<<<<<<< * snprintf(fieldname, 128, "FIELD_%d_NAME", i) * encoded_name = name.encode('utf-8') */ __pyx_t_14 = 0; __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__description); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s___v_names); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { __pyx_t_15 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = Py_TYPE(__pyx_t_1)->tp_iternext; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_16(__pyx_t_1); if (unlikely(!__pyx_t_2)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF(__pyx_v_name); __pyx_v_name = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_i = __pyx_t_14; __pyx_t_14 = (__pyx_t_14 + 1); /* "tables/tableextension.pyx":246 * # We write only the first level names * for i, name in enumerate(self.description._v_names): * snprintf(fieldname, 128, "FIELD_%d_NAME", i) # <<<<<<<<<<<<<< * encoded_name = name.encode('utf-8') * ret = H5ATTRset_attribute_string(self.dataset_id, fieldname, */ snprintf(__pyx_v_fieldname, 128, __pyx_k_12, __pyx_v_i); /* "tables/tableextension.pyx":247 * for i, name in enumerate(self.description._v_names): * snprintf(fieldname, 128, "FIELD_%d_NAME", i) * encoded_name = name.encode('utf-8') # <<<<<<<<<<<<<< * ret = H5ATTRset_attribute_string(self.dataset_id, fieldname, * encoded_name, len(encoded_name), */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_name, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_v_encoded_name)); __pyx_v_encoded_name = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":249 * encoded_name = name.encode('utf-8') * ret = H5ATTRset_attribute_string(self.dataset_id, fieldname, * encoded_name, len(encoded_name), # <<<<<<<<<<<<<< * cset) * if ret < 0: */ __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(((PyObject *)__pyx_v_encoded_name) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_17 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_encoded_name)); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":250 * ret = H5ATTRset_attribute_string(self.dataset_id, fieldname, * encoded_name, len(encoded_name), * cset) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % */ __pyx_v_ret = H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_fieldname, __pyx_t_12, __pyx_t_17, __pyx_v_cset); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":251 * encoded_name, len(encoded_name), * cset) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * (fieldname, self.name)) */ __pyx_t_7 = (__pyx_v_ret < 0); if (__pyx_t_7) { /* "tables/tableextension.pyx":252 * cset) * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % # <<<<<<<<<<<<<< * (fieldname, self.name)) * */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "tables/tableextension.pyx":253 * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in table:\n %s." % * (fieldname, self.name)) # <<<<<<<<<<<<<< * * # If created in PyTables, the table is always chunked */ __pyx_t_4 = PyBytes_FromString(__pyx_v_fieldname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base.__pyx_base.name); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L14; } __pyx_L14:; goto __pyx_L6; } __pyx_L6:; /* "tables/tableextension.pyx":256 * * # If created in PyTables, the table is always chunked * self._chunked = True # Accessible from python # <<<<<<<<<<<<<< * * # Finally, return the object identifier. */ __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___chunked, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":259 * * # Finally, return the object identifier. * return self.dataset_id # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->__pyx_base.dataset_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tables.tableextension.Table._create_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_class_); __Pyx_XDECREF((PyObject *)__pyx_v_wdflts); __Pyx_XDECREF((PyObject *)__pyx_v_recarr); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_encoded_title); __Pyx_XDECREF(__pyx_v_encoded_complib); __Pyx_XDECREF(__pyx_v_encoded_obversion); __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":262 * * * cdef get_nested_type(self, hid_t type_id, hid_t native_type_id, # <<<<<<<<<<<<<< * object colpath, object field_byteorders): * """Open a nested type and return a nested dictionary as description.""" */ static PyObject *__pyx_f_6tables_14tableextension_5Table_get_nested_type(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hid_t __pyx_v_type_id, hid_t __pyx_v_native_type_id, PyObject *__pyx_v_colpath, PyObject *__pyx_v_field_byteorders) { hid_t __pyx_v_member_type_id; hid_t __pyx_v_native_member_type_id; hsize_t __pyx_v_nfields; size_t __pyx_v_itemsize; int __pyx_v_i; char *__pyx_v_c_colname; enum H5T_class_t __pyx_v_class_id; char __pyx_v_c_byteorder2[11]; PyObject *__pyx_v_desc = 0; PyObject *__pyx_v_colobj = 0; PyObject *__pyx_v_colpath2 = 0; PyObject *__pyx_v_byteorder = 0; PyObject *__pyx_v_colname = 0; PyObject *__pyx_v_byteorder2 = 0; PyObject *__pyx_v_offset = NULL; PyObject *__pyx_v_atom = NULL; PyObject *__pyx_v_te = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; hsize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); size_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; Py_ssize_t __pyx_t_18; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_nested_type", 0); __Pyx_INCREF(__pyx_v_field_byteorders); /* "tables/tableextension.pyx":278 * cdef str colname, byteorder2 * * offset = 0 # <<<<<<<<<<<<<< * desc = {} * # Get the number of members */ __Pyx_INCREF(__pyx_int_0); __pyx_v_offset = __pyx_int_0; /* "tables/tableextension.pyx":279 * * offset = 0 * desc = {} # <<<<<<<<<<<<<< * # Get the number of members * nfields = H5Tget_nmembers(type_id) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_desc = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":281 * desc = {} * # Get the number of members * nfields = H5Tget_nmembers(type_id) # <<<<<<<<<<<<<< * # Iterate thru the members * for i from 0 <= i < nfields: */ __pyx_v_nfields = H5Tget_nmembers(__pyx_v_type_id); /* "tables/tableextension.pyx":283 * nfields = H5Tget_nmembers(type_id) * # Iterate thru the members * for i from 0 <= i < nfields: # <<<<<<<<<<<<<< * # Get the member name * c_colname = H5Tget_member_name(type_id, i) */ __pyx_t_2 = __pyx_v_nfields; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "tables/tableextension.pyx":285 * for i from 0 <= i < nfields: * # Get the member name * c_colname = H5Tget_member_name(type_id, i) # <<<<<<<<<<<<<< * colname = cstr_to_pystr(c_colname) * */ __pyx_v_c_colname = H5Tget_member_name(__pyx_v_type_id, __pyx_v_i); /* "tables/tableextension.pyx":286 * # Get the member name * c_colname = H5Tget_member_name(type_id, i) * colname = cstr_to_pystr(c_colname) # <<<<<<<<<<<<<< * * # Get the member type */ __pyx_t_1 = ((PyObject *)__pyx_f_6tables_14utilsextension_cstr_to_pystr(__pyx_v_c_colname)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(((PyObject *)__pyx_v_colname)); __pyx_v_colname = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":289 * * # Get the member type * member_type_id = H5Tget_member_type(type_id, i) # <<<<<<<<<<<<<< * # Get the HDF5 class * class_id = H5Tget_class(member_type_id) */ __pyx_v_member_type_id = H5Tget_member_type(__pyx_v_type_id, __pyx_v_i); /* "tables/tableextension.pyx":291 * member_type_id = H5Tget_member_type(type_id, i) * # Get the HDF5 class * class_id = H5Tget_class(member_type_id) # <<<<<<<<<<<<<< * if class_id == H5T_COMPOUND and not is_complex(member_type_id): * colpath2 = join_path(colpath, colname) */ __pyx_v_class_id = H5Tget_class(__pyx_v_member_type_id); /* "tables/tableextension.pyx":292 * # Get the HDF5 class * class_id = H5Tget_class(member_type_id) * if class_id == H5T_COMPOUND and not is_complex(member_type_id): # <<<<<<<<<<<<<< * colpath2 = join_path(colpath, colname) * # Create the native data in-memory (without gaps!) */ __pyx_t_3 = (__pyx_v_class_id == H5T_COMPOUND); if (__pyx_t_3) { __pyx_t_4 = (!is_complex(__pyx_v_member_type_id)); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_3; } if (__pyx_t_5) { /* "tables/tableextension.pyx":293 * class_id = H5Tget_class(member_type_id) * if class_id == H5T_COMPOUND and not is_complex(member_type_id): * colpath2 = join_path(colpath, colname) # <<<<<<<<<<<<<< * # Create the native data in-memory (without gaps!) * itemsize = H5Tget_size(member_type_id) */ __pyx_t_1 = __pyx_f_6tables_14tableextension_join_path(__pyx_v_colpath, ((PyObject *)__pyx_v_colname)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_v_colpath2); __pyx_v_colpath2 = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":295 * colpath2 = join_path(colpath, colname) * # Create the native data in-memory (without gaps!) * itemsize = H5Tget_size(member_type_id) # <<<<<<<<<<<<<< * native_member_type_id = H5Tcreate(H5T_COMPOUND, itemsize) * desc[colname], itemsize = self.get_nested_type( */ __pyx_v_itemsize = H5Tget_size(__pyx_v_member_type_id); /* "tables/tableextension.pyx":296 * # Create the native data in-memory (without gaps!) * itemsize = H5Tget_size(member_type_id) * native_member_type_id = H5Tcreate(H5T_COMPOUND, itemsize) # <<<<<<<<<<<<<< * desc[colname], itemsize = self.get_nested_type( * member_type_id, native_member_type_id, colpath2, field_byteorders) */ __pyx_v_native_member_type_id = H5Tcreate(H5T_COMPOUND, __pyx_v_itemsize); /* "tables/tableextension.pyx":298 * native_member_type_id = H5Tcreate(H5T_COMPOUND, itemsize) * desc[colname], itemsize = self.get_nested_type( * member_type_id, native_member_type_id, colpath2, field_byteorders) # <<<<<<<<<<<<<< * desc[colname]["_v_pos"] = i # Remember the position * else: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->get_nested_type(__pyx_v_self, __pyx_v_member_type_id, __pyx_v_native_member_type_id, __pyx_v_colpath2, __pyx_v_field_byteorders); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } /* "tables/tableextension.pyx":297 * itemsize = H5Tget_size(member_type_id) * native_member_type_id = H5Tcreate(H5T_COMPOUND, itemsize) * desc[colname], itemsize = self.get_nested_type( # <<<<<<<<<<<<<< * member_type_id, native_member_type_id, colpath2, field_byteorders) * desc[colname]["_v_pos"] = i # Remember the position */ __pyx_t_10 = __Pyx_PyInt_AsSize_t(__pyx_t_7); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyObject_SetItem(__pyx_v_desc, ((PyObject *)__pyx_v_colname), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_itemsize = __pyx_t_10; /* "tables/tableextension.pyx":299 * desc[colname], itemsize = self.get_nested_type( * member_type_id, native_member_type_id, colpath2, field_byteorders) * desc[colname]["_v_pos"] = i # Remember the position # <<<<<<<<<<<<<< * else: * # Get the member format and the corresponding Col object */ __pyx_t_1 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_GetItem(__pyx_v_desc, ((PyObject *)__pyx_v_colname)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s___v_pos), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } /*else*/ { /* "tables/tableextension.pyx":302 * else: * # Get the member format and the corresponding Col object * try: # <<<<<<<<<<<<<< * native_member_type_id = get_native_type(member_type_id) * atom = atom_from_hdf5_type(native_member_type_id) */ { __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "tables/tableextension.pyx":303 * # Get the member format and the corresponding Col object * try: * native_member_type_id = get_native_type(member_type_id) # <<<<<<<<<<<<<< * atom = atom_from_hdf5_type(native_member_type_id) * colobj = Col.from_atom(atom, pos=i) */ __pyx_v_native_member_type_id = __pyx_f_6tables_14utilsextension_get_native_type(__pyx_v_member_type_id); /* "tables/tableextension.pyx":304 * try: * native_member_type_id = get_native_type(member_type_id) * atom = atom_from_hdf5_type(native_member_type_id) # <<<<<<<<<<<<<< * colobj = Col.from_atom(atom, pos=i) * itemsize = H5Tget_size(native_member_type_id) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__atom_from_hdf5_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyInt_to_py_hid_t(__pyx_v_native_member_type_id); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_v_atom); __pyx_v_atom = __pyx_t_7; __pyx_t_7 = 0; /* "tables/tableextension.pyx":305 * native_member_type_id = get_native_type(member_type_id) * atom = atom_from_hdf5_type(native_member_type_id) * colobj = Col.from_atom(atom, pos=i) # <<<<<<<<<<<<<< * itemsize = H5Tget_size(native_member_type_id) * except TypeError, te: */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__Col); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__from_atom); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_atom); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_atom); __Pyx_GIVEREF(__pyx_v_atom); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_8 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L8_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_v_colobj); __pyx_v_colobj = __pyx_t_8; __pyx_t_8 = 0; /* "tables/tableextension.pyx":306 * atom = atom_from_hdf5_type(native_member_type_id) * colobj = Col.from_atom(atom, pos=i) * itemsize = H5Tget_size(native_member_type_id) # <<<<<<<<<<<<<< * except TypeError, te: * # Re-raise TypeError again with more info */ __pyx_v_itemsize = H5Tget_size(__pyx_v_native_member_type_id); } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "tables/tableextension.pyx":307 * colobj = Col.from_atom(atom, pos=i) * itemsize = H5Tget_size(native_member_type_id) * except TypeError, te: # <<<<<<<<<<<<<< * # Re-raise TypeError again with more info * raise TypeError( */ __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_14) { __Pyx_AddTraceback("tables.tableextension.Table.get_nested_type", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_1, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_v_te = __pyx_t_1; /* "tables/tableextension.pyx":310 * # Re-raise TypeError again with more info * raise TypeError( * ("table ``%s``, column ``%s``: %%s" % (self.name, colname)) # <<<<<<<<<<<<<< * % te.args[0]) * desc[colname] = colobj */ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->__pyx_base.__pyx_base.name); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name); __Pyx_INCREF(((PyObject *)__pyx_v_colname)); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_colname)); __Pyx_GIVEREF(((PyObject *)__pyx_v_colname)); __pyx_t_15 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_15)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; /* "tables/tableextension.pyx":311 * raise TypeError( * ("table ``%s``, column ``%s``: %%s" % (self.name, colname)) * % te.args[0]) # <<<<<<<<<<<<<< * desc[colname] = colobj * # For time kinds, save the byteorder of the column */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_te, __pyx_n_s__args); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_t_15), __pyx_t_16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_L15_try_end:; } /* "tables/tableextension.pyx":312 * ("table ``%s``, column ``%s``: %%s" % (self.name, colname)) * % te.args[0]) * desc[colname] = colobj # <<<<<<<<<<<<<< * # For time kinds, save the byteorder of the column * # (useful for conversion of time datatypes later on) */ if (PyObject_SetItem(__pyx_v_desc, ((PyObject *)__pyx_v_colname), __pyx_v_colobj) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":315 * # For time kinds, save the byteorder of the column * # (useful for conversion of time datatypes later on) * if colobj.kind == "time": # <<<<<<<<<<<<<< * colobj._byteorder = H5Tget_order(member_type_id) * if colobj._byteorder == H5T_ORDER_LE: */ __pyx_t_7 = PyObject_GetAttr(__pyx_v_colobj, __pyx_n_s__kind); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_n_s__time), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "tables/tableextension.pyx":316 * # (useful for conversion of time datatypes later on) * if colobj.kind == "time": * colobj._byteorder = H5Tget_order(member_type_id) # <<<<<<<<<<<<<< * if colobj._byteorder == H5T_ORDER_LE: * field_byteorders.append("little") */ __pyx_t_1 = PyInt_FromLong(H5Tget_order(__pyx_v_member_type_id)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_v_colobj, __pyx_n_s___byteorder, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":317 * if colobj.kind == "time": * colobj._byteorder = H5Tget_order(member_type_id) * if colobj._byteorder == H5T_ORDER_LE: # <<<<<<<<<<<<<< * field_byteorders.append("little") * else: */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_colobj, __pyx_n_s___byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyInt_FromLong(H5T_ORDER_LE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_5) { /* "tables/tableextension.pyx":318 * colobj._byteorder = H5Tget_order(member_type_id) * if colobj._byteorder == H5T_ORDER_LE: * field_byteorders.append("little") # <<<<<<<<<<<<<< * else: * field_byteorders.append("big") */ __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_field_byteorders, ((PyObject *)__pyx_n_s__little)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L19; } /*else*/ { /* "tables/tableextension.pyx":320 * field_byteorders.append("little") * else: * field_byteorders.append("big") # <<<<<<<<<<<<<< * elif colobj.kind in ['int', 'uint', 'float', 'complex', 'enum']: * # Keep track of the byteorder for this column */ __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_field_byteorders, ((PyObject *)__pyx_n_s__big)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_L19:; goto __pyx_L18; } /* "tables/tableextension.pyx":321 * else: * field_byteorders.append("big") * elif colobj.kind in ['int', 'uint', 'float', 'complex', 'enum']: # <<<<<<<<<<<<<< * # Keep track of the byteorder for this column * get_order(member_type_id, c_byteorder2) */ __pyx_t_8 = PyObject_GetAttr(__pyx_v_colobj, __pyx_n_s__kind); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__int), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!((int)__pyx_t_5)) { __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__uint), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = ((int)__pyx_t_3); } else { __pyx_t_4 = ((int)__pyx_t_5); } if (!__pyx_t_4) { __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__float), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = ((int)__pyx_t_5); } else { __pyx_t_3 = __pyx_t_4; } if (!__pyx_t_3) { __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__complex), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = ((int)__pyx_t_4); } else { __pyx_t_5 = __pyx_t_3; } if (!__pyx_t_5) { __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__enum), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = ((int)__pyx_t_3); } else { __pyx_t_4 = __pyx_t_5; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = __pyx_t_4; if (__pyx_t_5) { /* "tables/tableextension.pyx":323 * elif colobj.kind in ['int', 'uint', 'float', 'complex', 'enum']: * # Keep track of the byteorder for this column * get_order(member_type_id, c_byteorder2) # <<<<<<<<<<<<<< * byteorder2 = cstr_to_pystr(c_byteorder2) * if byteorder2 in ["little", "big"]: */ get_order(__pyx_v_member_type_id, __pyx_v_c_byteorder2); /* "tables/tableextension.pyx":324 * # Keep track of the byteorder for this column * get_order(member_type_id, c_byteorder2) * byteorder2 = cstr_to_pystr(c_byteorder2) # <<<<<<<<<<<<<< * if byteorder2 in ["little", "big"]: * field_byteorders.append(byteorder2) */ __pyx_t_8 = ((PyObject *)__pyx_f_6tables_14utilsextension_cstr_to_pystr(__pyx_v_c_byteorder2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF(((PyObject *)__pyx_v_byteorder2)); __pyx_v_byteorder2 = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; /* "tables/tableextension.pyx":325 * get_order(member_type_id, c_byteorder2) * byteorder2 = cstr_to_pystr(c_byteorder2) * if byteorder2 in ["little", "big"]: # <<<<<<<<<<<<<< * field_byteorders.append(byteorder2) * */ __Pyx_INCREF(((PyObject *)__pyx_v_byteorder2)); __pyx_t_17 = __pyx_v_byteorder2; __pyx_t_5 = (__Pyx_PyString_Equals(((PyObject *)__pyx_t_17), ((PyObject *)__pyx_n_s__little), Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!((int)__pyx_t_5)) { __pyx_t_4 = (__Pyx_PyString_Equals(((PyObject *)__pyx_t_17), ((PyObject *)__pyx_n_s__big), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((int)__pyx_t_4); } else { __pyx_t_3 = ((int)__pyx_t_5); } __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __pyx_t_5 = __pyx_t_3; if (__pyx_t_5) { /* "tables/tableextension.pyx":326 * byteorder2 = cstr_to_pystr(c_byteorder2) * if byteorder2 in ["little", "big"]: * field_byteorders.append(byteorder2) # <<<<<<<<<<<<<< * * # Insert the native member */ __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_field_byteorders, ((PyObject *)__pyx_v_byteorder2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L20; } __pyx_L20:; goto __pyx_L18; } __pyx_L18:; } __pyx_L5:; /* "tables/tableextension.pyx":329 * * # Insert the native member * H5Tinsert(native_type_id, c_colname, offset, native_member_type_id) # <<<<<<<<<<<<<< * # Update the offset * offset = offset + itemsize */ __pyx_t_10 = __Pyx_PyInt_AsSize_t(__pyx_v_offset); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5Tinsert(__pyx_v_native_type_id, __pyx_v_c_colname, __pyx_t_10, __pyx_v_native_member_type_id); /* "tables/tableextension.pyx":331 * H5Tinsert(native_type_id, c_colname, offset, native_member_type_id) * # Update the offset * offset = offset + itemsize # <<<<<<<<<<<<<< * # Release resources * H5Tclose(native_member_type_id) */ __pyx_t_8 = __Pyx_PyInt_FromSize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyNumber_Add(__pyx_v_offset, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_v_offset); __pyx_v_offset = __pyx_t_7; __pyx_t_7 = 0; /* "tables/tableextension.pyx":333 * offset = offset + itemsize * # Release resources * H5Tclose(native_member_type_id) # <<<<<<<<<<<<<< * H5Tclose(member_type_id) * free(c_colname) */ H5Tclose(__pyx_v_native_member_type_id); /* "tables/tableextension.pyx":334 * # Release resources * H5Tclose(native_member_type_id) * H5Tclose(member_type_id) # <<<<<<<<<<<<<< * free(c_colname) * */ H5Tclose(__pyx_v_member_type_id); /* "tables/tableextension.pyx":335 * H5Tclose(native_member_type_id) * H5Tclose(member_type_id) * free(c_colname) # <<<<<<<<<<<<<< * * # set the byteorder and other things (just in top level) */ free(__pyx_v_c_colname); } /* "tables/tableextension.pyx":338 * * # set the byteorder and other things (just in top level) * if colpath == "": # <<<<<<<<<<<<<< * # Compute a byteorder for the entire table * if len(field_byteorders) > 0: */ __pyx_t_7 = PyObject_RichCompare(__pyx_v_colpath, ((PyObject *)__pyx_kp_s_1), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { /* "tables/tableextension.pyx":340 * if colpath == "": * # Compute a byteorder for the entire table * if len(field_byteorders) > 0: # <<<<<<<<<<<<<< * field_byteorders = numpy.array(field_byteorders) * # Cython doesn't interpret well the extended comparison */ __pyx_t_18 = PyObject_Length(__pyx_v_field_byteorders); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_18 > 0); if (__pyx_t_5) { /* "tables/tableextension.pyx":341 * # Compute a byteorder for the entire table * if len(field_byteorders) > 0: * field_byteorders = numpy.array(field_byteorders) # <<<<<<<<<<<<<< * # Cython doesn't interpret well the extended comparison * # operators so this: field_byteorders == "little" doesn't work */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_field_byteorders); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_field_byteorders); __Pyx_GIVEREF(__pyx_v_field_byteorders); __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_v_field_byteorders); __pyx_v_field_byteorders = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":345 * # operators so this: field_byteorders == "little" doesn't work * # as expected * if numpy.alltrue(field_byteorders.__eq__("little")): # <<<<<<<<<<<<<< * byteorder = "little" * elif numpy.alltrue(field_byteorders.__eq__("big")): */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__alltrue); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(__pyx_v_field_byteorders, __pyx_n_s____eq__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_5) { /* "tables/tableextension.pyx":346 * # as expected * if numpy.alltrue(field_byteorders.__eq__("little")): * byteorder = "little" # <<<<<<<<<<<<<< * elif numpy.alltrue(field_byteorders.__eq__("big")): * byteorder = "big" */ __Pyx_INCREF(((PyObject *)__pyx_n_s__little)); __pyx_v_byteorder = ((PyObject *)__pyx_n_s__little); goto __pyx_L23; } /* "tables/tableextension.pyx":347 * if numpy.alltrue(field_byteorders.__eq__("little")): * byteorder = "little" * elif numpy.alltrue(field_byteorders.__eq__("big")): # <<<<<<<<<<<<<< * byteorder = "big" * else: # Yes! someone has done it! */ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__alltrue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyObject_GetAttr(__pyx_v_field_byteorders, __pyx_n_s____eq__); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_5) { /* "tables/tableextension.pyx":348 * byteorder = "little" * elif numpy.alltrue(field_byteorders.__eq__("big")): * byteorder = "big" # <<<<<<<<<<<<<< * else: # Yes! someone has done it! * byteorder = "mixed" */ __Pyx_INCREF(((PyObject *)__pyx_n_s__big)); __pyx_v_byteorder = ((PyObject *)__pyx_n_s__big); goto __pyx_L23; } /*else*/ { /* "tables/tableextension.pyx":350 * byteorder = "big" * else: # Yes! someone has done it! * byteorder = "mixed" # <<<<<<<<<<<<<< * else: * byteorder = "irrelevant" */ __Pyx_INCREF(((PyObject *)__pyx_n_s__mixed)); __pyx_v_byteorder = ((PyObject *)__pyx_n_s__mixed); } __pyx_L23:; goto __pyx_L22; } /*else*/ { /* "tables/tableextension.pyx":352 * byteorder = "mixed" * else: * byteorder = "irrelevant" # <<<<<<<<<<<<<< * self.byteorder = byteorder * # Correct the type size in case the memory type size is less */ __Pyx_INCREF(((PyObject *)__pyx_n_s__irrelevant)); __pyx_v_byteorder = ((PyObject *)__pyx_n_s__irrelevant); } __pyx_L22:; /* "tables/tableextension.pyx":353 * else: * byteorder = "irrelevant" * self.byteorder = byteorder # <<<<<<<<<<<<<< * # Correct the type size in case the memory type size is less * # than the type in-disk (probably due to reading native HDF5 */ if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__byteorder, __pyx_v_byteorder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L21; } __pyx_L21:; /* "tables/tableextension.pyx":358 * # files written with tools allowing field padding) * # Solves bug #23 * if H5Tget_size(native_type_id) > offset: # <<<<<<<<<<<<<< * H5Tset_size(native_type_id, offset) * */ __pyx_t_7 = __Pyx_PyInt_FromSize_t(H5Tget_size(__pyx_v_native_type_id)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_v_offset, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_5) { /* "tables/tableextension.pyx":359 * # Solves bug #23 * if H5Tget_size(native_type_id) > offset: * H5Tset_size(native_type_id, offset) # <<<<<<<<<<<<<< * * return desc, offset */ __pyx_t_10 = __Pyx_PyInt_AsSize_t(__pyx_v_offset); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5Tset_size(__pyx_v_native_type_id, __pyx_t_10); goto __pyx_L24; } __pyx_L24:; /* "tables/tableextension.pyx":361 * H5Tset_size(native_type_id, offset) * * return desc, offset # <<<<<<<<<<<<<< * * def _get_info(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_desc); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_desc); __Pyx_GIVEREF(__pyx_v_desc); __Pyx_INCREF(__pyx_v_offset); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_offset); __Pyx_GIVEREF(__pyx_v_offset); __pyx_r = ((PyObject *)__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(((PyObject *)__pyx_t_17)); __Pyx_AddTraceback("tables.tableextension.Table.get_nested_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_desc); __Pyx_XDECREF(__pyx_v_colobj); __Pyx_XDECREF(__pyx_v_colpath2); __Pyx_XDECREF(__pyx_v_byteorder); __Pyx_XDECREF(__pyx_v_colname); __Pyx_XDECREF(__pyx_v_byteorder2); __Pyx_XDECREF(__pyx_v_offset); __Pyx_XDECREF(__pyx_v_atom); __Pyx_XDECREF(__pyx_v_te); __Pyx_XDECREF(__pyx_v_field_byteorders); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_3_get_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6tables_14tableextension_5Table_2_get_info[] = "Get info from a table on disk."; static PyObject *__pyx_pw_6tables_14tableextension_5Table_3_get_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_info (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_5Table_2_get_info(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":363 * return desc, offset * * def _get_info(self): # <<<<<<<<<<<<<< * """Get info from a table on disk.""" * */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_2_get_info(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self) { hid_t __pyx_v_space_id; hid_t __pyx_v_plist; size_t __pyx_v_type_size; hsize_t __pyx_v_dims[1]; hsize_t __pyx_v_chunksize[1]; enum H5D_layout_t __pyx_v_layout; PyObject *__pyx_v_encoded_name = 0; PyObject *__pyx_v_desc = NULL; CYTHON_UNUSED PyObject *__pyx_v__ = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_info", 0); /* "tables/tableextension.pyx":372 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Open the dataset */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->__pyx_base.__pyx_base.name, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":375 * * # Open the dataset * self.dataset_id = H5Dopen(self.parent_id, encoded_name, H5P_DEFAULT) # <<<<<<<<<<<<<< * if self.dataset_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->__pyx_base.dataset_id = H5Dopen(__pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_3, H5P_DEFAULT); /* "tables/tableextension.pyx":376 * # Open the dataset * self.dataset_id = H5Dopen(self.parent_id, encoded_name, H5P_DEFAULT) * if self.dataset_id < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (self.name, self._v_parent._v_pathname)) */ __pyx_t_4 = (__pyx_v_self->__pyx_base.dataset_id < 0); if (__pyx_t_4) { /* "tables/tableextension.pyx":377 * self.dataset_id = H5Dopen(self.parent_id, encoded_name, H5P_DEFAULT) * if self.dataset_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % # <<<<<<<<<<<<<< * (self.name, self._v_parent._v_pathname)) * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "tables/tableextension.pyx":378 * if self.dataset_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (self.name, self._v_parent._v_pathname)) # <<<<<<<<<<<<<< * * # Get the datatype on disk */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s___v_pathname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.__pyx_base.name); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":381 * * # Get the datatype on disk * self.disk_type_id = H5Dget_type(self.dataset_id) # <<<<<<<<<<<<<< * if H5Tget_class(self.disk_type_id) != H5T_COMPOUND: * raise ValueError("Node ``%s`` is not a Table object" % */ __pyx_v_self->__pyx_base.disk_type_id = H5Dget_type(__pyx_v_self->__pyx_base.dataset_id); /* "tables/tableextension.pyx":382 * # Get the datatype on disk * self.disk_type_id = H5Dget_type(self.dataset_id) * if H5Tget_class(self.disk_type_id) != H5T_COMPOUND: # <<<<<<<<<<<<<< * raise ValueError("Node ``%s`` is not a Table object" % * (self._v_parent._v_leaves[self.name]._v_pathname)) */ __pyx_t_4 = (H5Tget_class(__pyx_v_self->__pyx_base.disk_type_id) != H5T_COMPOUND); if (__pyx_t_4) { /* "tables/tableextension.pyx":384 * if H5Tget_class(self.disk_type_id) != H5T_COMPOUND: * raise ValueError("Node ``%s`` is not a Table object" % * (self._v_parent._v_leaves[self.name]._v_pathname)) # <<<<<<<<<<<<<< * # Get the number of rows * space_id = H5Dget_space(self.dataset_id) */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_parent); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s___v_leaves); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_v_self->__pyx_base.__pyx_base.name); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s___v_pathname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "tables/tableextension.pyx":386 * (self._v_parent._v_leaves[self.name]._v_pathname)) * # Get the number of rows * space_id = H5Dget_space(self.dataset_id) # <<<<<<<<<<<<<< * H5Sget_simple_extent_dims(space_id, dims, NULL) * self.nrows = SizeType(dims[0]) */ __pyx_v_space_id = H5Dget_space(__pyx_v_self->__pyx_base.dataset_id); /* "tables/tableextension.pyx":387 * # Get the number of rows * space_id = H5Dget_space(self.dataset_id) * H5Sget_simple_extent_dims(space_id, dims, NULL) # <<<<<<<<<<<<<< * self.nrows = SizeType(dims[0]) * # Free resources */ H5Sget_simple_extent_dims(__pyx_v_space_id, __pyx_v_dims, NULL); /* "tables/tableextension.pyx":388 * space_id = H5Dget_space(self.dataset_id) * H5Sget_simple_extent_dims(space_id, dims, NULL) * self.nrows = SizeType(dims[0]) # <<<<<<<<<<<<<< * # Free resources * H5Sclose(space_id) */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_dims[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":390 * self.nrows = SizeType(dims[0]) * # Free resources * H5Sclose(space_id) # <<<<<<<<<<<<<< * * # Get the layout of the datatype */ H5Sclose(__pyx_v_space_id); /* "tables/tableextension.pyx":393 * * # Get the layout of the datatype * plist = H5Dget_create_plist(self.dataset_id) # <<<<<<<<<<<<<< * layout = H5Pget_layout(plist) * if layout == H5D_CHUNKED: */ __pyx_v_plist = H5Dget_create_plist(__pyx_v_self->__pyx_base.dataset_id); /* "tables/tableextension.pyx":394 * # Get the layout of the datatype * plist = H5Dget_create_plist(self.dataset_id) * layout = H5Pget_layout(plist) # <<<<<<<<<<<<<< * if layout == H5D_CHUNKED: * self._chunked = 1 */ __pyx_v_layout = H5Pget_layout(__pyx_v_plist); /* "tables/tableextension.pyx":395 * plist = H5Dget_create_plist(self.dataset_id) * layout = H5Pget_layout(plist) * if layout == H5D_CHUNKED: # <<<<<<<<<<<<<< * self._chunked = 1 * # Get the chunksize */ __pyx_t_4 = (__pyx_v_layout == H5D_CHUNKED); if (__pyx_t_4) { /* "tables/tableextension.pyx":396 * layout = H5Pget_layout(plist) * if layout == H5D_CHUNKED: * self._chunked = 1 # <<<<<<<<<<<<<< * # Get the chunksize * H5Pget_chunk(plist, 1, chunksize) */ if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___chunked, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":398 * self._chunked = 1 * # Get the chunksize * H5Pget_chunk(plist, 1, chunksize) # <<<<<<<<<<<<<< * else: * self._chunked = 0 */ H5Pget_chunk(__pyx_v_plist, 1, __pyx_v_chunksize); goto __pyx_L5; } /*else*/ { /* "tables/tableextension.pyx":400 * H5Pget_chunk(plist, 1, chunksize) * else: * self._chunked = 0 # <<<<<<<<<<<<<< * chunksize[0] = 0 * H5Pclose(plist) */ if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___chunked, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":401 * else: * self._chunked = 0 * chunksize[0] = 0 # <<<<<<<<<<<<<< * H5Pclose(plist) * */ (__pyx_v_chunksize[0]) = 0; } __pyx_L5:; /* "tables/tableextension.pyx":402 * self._chunked = 0 * chunksize[0] = 0 * H5Pclose(plist) # <<<<<<<<<<<<<< * * # Get the type size */ H5Pclose(__pyx_v_plist); /* "tables/tableextension.pyx":405 * * # Get the type size * type_size = H5Tget_size(self.disk_type_id) # <<<<<<<<<<<<<< * # Create the native data in-memory * self.type_id = H5Tcreate(H5T_COMPOUND, type_size) */ __pyx_v_type_size = H5Tget_size(__pyx_v_self->__pyx_base.disk_type_id); /* "tables/tableextension.pyx":407 * type_size = H5Tget_size(self.disk_type_id) * # Create the native data in-memory * self.type_id = H5Tcreate(H5T_COMPOUND, type_size) # <<<<<<<<<<<<<< * # Fill-up the (nested) native type (removing the gaps!) and description * desc, _ = self.get_nested_type(self.disk_type_id, self.type_id, "", []) */ __pyx_v_self->__pyx_base.type_id = H5Tcreate(H5T_COMPOUND, __pyx_v_type_size); /* "tables/tableextension.pyx":409 * self.type_id = H5Tcreate(H5T_COMPOUND, type_size) * # Fill-up the (nested) native type (removing the gaps!) and description * desc, _ = self.get_nested_type(self.disk_type_id, self.type_id, "", []) # <<<<<<<<<<<<<< * if desc == {}: * raise HDF5ExtError("Problems getting desciption for table %s", self.name) */ __pyx_t_1 = ((PyObject *)__pyx_kp_s_1); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->get_nested_type(__pyx_v_self, __pyx_v_self->__pyx_base.disk_type_id, __pyx_v_self->__pyx_base.type_id, __pyx_t_1, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __pyx_v_desc = __pyx_t_2; __pyx_t_2 = 0; __pyx_v__ = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":410 * # Fill-up the (nested) native type (removing the gaps!) and description * desc, _ = self.get_nested_type(self.disk_type_id, self.type_id, "", []) * if desc == {}: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems getting desciption for table %s", self.name) * */ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_1 = PyObject_RichCompare(__pyx_v_desc, ((PyObject *)__pyx_t_5), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "tables/tableextension.pyx":411 * desc, _ = self.get_nested_type(self.disk_type_id, self.type_id, "", []) * if desc == {}: * raise HDF5ExtError("Problems getting desciption for table %s", self.name) # <<<<<<<<<<<<<< * * # Return the object ID and the description */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_kp_s_20)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_20)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20)); __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->__pyx_base.__pyx_base.name); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.name); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "tables/tableextension.pyx":414 * * # Return the object ID and the description * return (self.dataset_id, desc, SizeType(chunksize[0])) # <<<<<<<<<<<<<< * * cdef _convert_time64_(self, ndarray nparr, hsize_t nrecords, int sense): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->__pyx_base.dataset_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_chunksize[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_desc); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_desc); __Pyx_GIVEREF(__pyx_v_desc); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.tableextension.Table._get_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XDECREF(__pyx_v_desc); __Pyx_XDECREF(__pyx_v__); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":416 * return (self.dataset_id, desc, SizeType(chunksize[0])) * * cdef _convert_time64_(self, ndarray nparr, hsize_t nrecords, int sense): # <<<<<<<<<<<<<< * """Converts a NumPy of Time64 elements between NumPy and HDF5 formats. * */ static PyObject *__pyx_f_6tables_14tableextension_5Table__convert_time64_(CYTHON_UNUSED struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyArrayObject *__pyx_v_nparr, hsize_t __pyx_v_nrecords, int __pyx_v_sense) { void *__pyx_v_t64buf; long __pyx_v_byteoffset; long __pyx_v_bytestride; long __pyx_v_nelements; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; long __pyx_t_5; char *__pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_convert_time64_", 0); /* "tables/tableextension.pyx":428 * cdef long byteoffset, bytestride, nelements * * byteoffset = 0 # NumPy objects doesn't have an offset # <<<<<<<<<<<<<< * bytestride = nparr.strides[0] # supports multi-dimensional recarray * # Compute the number of elements in the multidimensional cell */ __pyx_v_byteoffset = 0; /* "tables/tableextension.pyx":429 * * byteoffset = 0 # NumPy objects doesn't have an offset * bytestride = nparr.strides[0] # supports multi-dimensional recarray # <<<<<<<<<<<<<< * # Compute the number of elements in the multidimensional cell * nelements = nparr.size // len(nparr) */ __pyx_v_bytestride = (__pyx_v_nparr->strides[0]); /* "tables/tableextension.pyx":431 * bytestride = nparr.strides[0] # supports multi-dimensional recarray * # Compute the number of elements in the multidimensional cell * nelements = nparr.size // len(nparr) # <<<<<<<<<<<<<< * t64buf = nparr.data * */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_nparr), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_nparr)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyInt_AsLong(__pyx_t_4); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nelements = __pyx_t_5; /* "tables/tableextension.pyx":432 * # Compute the number of elements in the multidimensional cell * nelements = nparr.size // len(nparr) * t64buf = nparr.data # <<<<<<<<<<<<<< * * conv_float64_timeval32( */ __pyx_t_6 = __pyx_v_nparr->data; __pyx_v_t64buf = __pyx_t_6; /* "tables/tableextension.pyx":435 * * conv_float64_timeval32( * t64buf, byteoffset, bytestride, nrecords, nelements, sense) # <<<<<<<<<<<<<< * * cpdef _convert_types(self, ndarray recarr, hsize_t nrecords, int sense): */ conv_float64_timeval32(__pyx_v_t64buf, __pyx_v_byteoffset, __pyx_v_bytestride, __pyx_v_nrecords, __pyx_v_nelements, __pyx_v_sense); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.tableextension.Table._convert_time64_", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":437 * t64buf, byteoffset, bytestride, nrecords, nelements, sense) * * cpdef _convert_types(self, ndarray recarr, hsize_t nrecords, int sense): # <<<<<<<<<<<<<< * """Converts columns in 'recarr' between NumPy and HDF5 formats. * */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_5_convert_types(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6tables_14tableextension_5Table__convert_types(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyArrayObject *__pyx_v_recarr, hsize_t __pyx_v_nrecords, int __pyx_v_sense, int __pyx_skip_dispatch) { PyObject *__pyx_v_colpathname = NULL; PyObject *__pyx_v_colobj = NULL; PyObject *__pyx_v_column = NULL; PyObject *__pyx_v_t64cname = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_convert_types", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overriden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___convert_types); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_5_convert_types)) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_nrecords); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyInt_FromLong(__pyx_v_sense); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_recarr)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_recarr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_recarr)); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "tables/tableextension.pyx":448 * # For reading, first swap the byteorder by hand * # (this is not currently supported by HDF5) * if sense == 1: # <<<<<<<<<<<<<< * for colpathname in self.colpathnames: * if self.coltypes[colpathname] in ["time32", "time64"]: */ __pyx_t_5 = (__pyx_v_sense == 1); if (__pyx_t_5) { /* "tables/tableextension.pyx":449 * # (this is not currently supported by HDF5) * if sense == 1: * for colpathname in self.colpathnames: # <<<<<<<<<<<<<< * if self.coltypes[colpathname] in ["time32", "time64"]: * colobj = self.coldescrs[colpathname] */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__colpathnames); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_1)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF(__pyx_v_colpathname); __pyx_v_colpathname = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":450 * if sense == 1: * for colpathname in self.colpathnames: * if self.coltypes[colpathname] in ["time32", "time64"]: # <<<<<<<<<<<<<< * colobj = self.coldescrs[colpathname] * if hasattr(colobj, "_byteorder"): */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coltypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_colpathname); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__time32), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!((int)__pyx_t_5)) { __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = ((int)__pyx_t_8); } else { __pyx_t_9 = ((int)__pyx_t_5); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_t_9; if (__pyx_t_5) { /* "tables/tableextension.pyx":451 * for colpathname in self.colpathnames: * if self.coltypes[colpathname] in ["time32", "time64"]: * colobj = self.coldescrs[colpathname] # <<<<<<<<<<<<<< * if hasattr(colobj, "_byteorder"): * if colobj._byteorder != platform_byteorder: */ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coldescrs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_v_colpathname); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_v_colobj); __pyx_v_colobj = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":452 * if self.coltypes[colpathname] in ["time32", "time64"]: * colobj = self.coldescrs[colpathname] * if hasattr(colobj, "_byteorder"): # <<<<<<<<<<<<<< * if colobj._byteorder != platform_byteorder: * column = get_nested_field(recarr, colpathname) */ __pyx_t_1 = ((PyObject *)__pyx_n_s___byteorder); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = PyObject_HasAttr(__pyx_v_colobj, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "tables/tableextension.pyx":453 * colobj = self.coldescrs[colpathname] * if hasattr(colobj, "_byteorder"): * if colobj._byteorder != platform_byteorder: # <<<<<<<<<<<<<< * column = get_nested_field(recarr, colpathname) * # Do an *inplace* byteswapping */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_colobj, __pyx_n_s___byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__platform_byteorder); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "tables/tableextension.pyx":454 * if hasattr(colobj, "_byteorder"): * if colobj._byteorder != platform_byteorder: * column = get_nested_field(recarr, colpathname) # <<<<<<<<<<<<<< * # Do an *inplace* byteswapping * column.byteswap(True) */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_nested_field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_recarr)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_recarr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_recarr)); __Pyx_INCREF(__pyx_v_colpathname); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_colpathname); __Pyx_GIVEREF(__pyx_v_colpathname); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_v_column); __pyx_v_column = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":456 * column = get_nested_field(recarr, colpathname) * # Do an *inplace* byteswapping * column.byteswap(True) # <<<<<<<<<<<<<< * * # This should be generalised to support other type conversions. */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_column, __pyx_n_s__byteswap); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8; } __pyx_L8:; goto __pyx_L7; } __pyx_L7:; goto __pyx_L6; } __pyx_L6:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":459 * * # This should be generalised to support other type conversions. * for t64cname in self._time64colnames: # <<<<<<<<<<<<<< * column = get_nested_field(recarr, t64cname) * self._convert_time64_(column, nrecords, sense) */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___time64colnames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF(__pyx_v_t64cname); __pyx_v_t64cname = __pyx_t_3; __pyx_t_3 = 0; /* "tables/tableextension.pyx":460 * # This should be generalised to support other type conversions. * for t64cname in self._time64colnames: * column = get_nested_field(recarr, t64cname) # <<<<<<<<<<<<<< * self._convert_time64_(column, nrecords, sense) * */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_nested_field); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_recarr)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_recarr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_recarr)); __Pyx_INCREF(__pyx_v_t64cname); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_t64cname); __Pyx_GIVEREF(__pyx_v_t64cname); __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_v_column); __pyx_v_column = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":461 * for t64cname in self._time64colnames: * column = get_nested_field(recarr, t64cname) * self._convert_time64_(column, nrecords, sense) # <<<<<<<<<<<<<< * * def _open_append(self, ndarray recarr): */ if (!(likely(((__pyx_v_column) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_column, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_column; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->_convert_time64_(__pyx_v_self, ((PyArrayObject *)__pyx_t_1), __pyx_v_nrecords, __pyx_v_sense); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.tableextension.Table._convert_types", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_colpathname); __Pyx_XDECREF(__pyx_v_colobj); __Pyx_XDECREF(__pyx_v_column); __Pyx_XDECREF(__pyx_v_t64cname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_5_convert_types(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_14tableextension_5Table_4_convert_types[] = "Converts columns in 'recarr' between NumPy and HDF5 formats.\n\n NumPy to HDF5 conversion is performed when 'sense' is 0. Otherwise, HDF5\n to NumPy conversion is performed. The conversion is done in place,\n i.e. 'recarr' is modified.\n\n "; static PyObject *__pyx_pw_6tables_14tableextension_5Table_5_convert_types(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_recarr = 0; hsize_t __pyx_v_nrecords; int __pyx_v_sense; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_convert_types (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__recarr,&__pyx_n_s__nrecords,&__pyx_n_s__sense,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__recarr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nrecords)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_convert_types", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sense)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_convert_types", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_convert_types") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_recarr = ((PyArrayObject *)values[0]); __pyx_v_nrecords = __Pyx_PyInt_from_py_hsize_t(values[1]); if (unlikely((__pyx_v_nrecords == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_sense = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_sense == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_convert_types", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Table._convert_types", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_recarr), __pyx_ptype_5numpy_ndarray, 1, "recarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_14tableextension_5Table_4_convert_types(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self), __pyx_v_recarr, __pyx_v_nrecords, __pyx_v_sense); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":437 * t64buf, byteoffset, bytestride, nrecords, nelements, sense) * * cpdef _convert_types(self, ndarray recarr, hsize_t nrecords, int sense): # <<<<<<<<<<<<<< * """Converts columns in 'recarr' between NumPy and HDF5 formats. * */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_4_convert_types(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyArrayObject *__pyx_v_recarr, hsize_t __pyx_v_nrecords, int __pyx_v_sense) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_convert_types", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->_convert_types(__pyx_v_self, __pyx_v_recarr, __pyx_v_nrecords, __pyx_v_sense, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("tables.tableextension.Table._convert_types", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_7_open_append(PyObject *__pyx_v_self, PyObject *__pyx_v_recarr); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_5Table_7_open_append(PyObject *__pyx_v_self, PyObject *__pyx_v_recarr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_open_append (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_recarr), __pyx_ptype_5numpy_ndarray, 1, "recarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_14tableextension_5Table_6_open_append(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self), ((PyArrayObject *)__pyx_v_recarr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":463 * self._convert_time64_(column, nrecords, sense) * * def _open_append(self, ndarray recarr): # <<<<<<<<<<<<<< * self._v_recarray = recarr * # Get the pointer to the buffer data area */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_6_open_append(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyArrayObject *__pyx_v_recarr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_open_append", 0); /* "tables/tableextension.pyx":464 * * def _open_append(self, ndarray recarr): * self._v_recarray = recarr # <<<<<<<<<<<<<< * # Get the pointer to the buffer data area * self.wbuf = recarr.data */ if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_recarray, ((PyObject *)__pyx_v_recarr)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":466 * self._v_recarray = recarr * # Get the pointer to the buffer data area * self.wbuf = recarr.data # <<<<<<<<<<<<<< * * def _append_records(self, int nrecords): */ __pyx_t_1 = __pyx_v_recarr->data; __pyx_v_self->wbuf = __pyx_t_1; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("tables.tableextension.Table._open_append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_9_append_records(PyObject *__pyx_v_self, PyObject *__pyx_arg_nrecords); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_5Table_9_append_records(PyObject *__pyx_v_self, PyObject *__pyx_arg_nrecords) { int __pyx_v_nrecords; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_append_records (wrapper)", 0); assert(__pyx_arg_nrecords); { __pyx_v_nrecords = __Pyx_PyInt_AsInt(__pyx_arg_nrecords); if (unlikely((__pyx_v_nrecords == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Table._append_records", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_14tableextension_5Table_8_append_records(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self), ((int)__pyx_v_nrecords)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":468 * self.wbuf = recarr.data * * def _append_records(self, int nrecords): # <<<<<<<<<<<<<< * cdef int ret * cdef hsize_t nrows */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_8_append_records(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, int __pyx_v_nrecords) { int __pyx_v_ret; hsize_t __pyx_v_nrows; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; hsize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_append_records", 0); /* "tables/tableextension.pyx":473 * * # Convert some NumPy types to HDF5 before storing. * self._convert_types(self._v_recarray, nrecords, 0) # <<<<<<<<<<<<<< * * nrows = self.nrows */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_recarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->_convert_types(__pyx_v_self, ((PyArrayObject *)__pyx_t_1), __pyx_v_nrecords, 0, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":475 * self._convert_types(self._v_recarray, nrecords, 0) * * nrows = self.nrows # <<<<<<<<<<<<<< * # release GIL (allow other threads to use the Python interpreter) * with nogil: */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nrows = __pyx_t_3; /* "tables/tableextension.pyx":477 * nrows = self.nrows * # release GIL (allow other threads to use the Python interpreter) * with nogil: # <<<<<<<<<<<<<< * # Append the records: * ret = H5TBOappend_records(self.dataset_id, self.type_id, */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/tableextension.pyx":480 * # Append the records: * ret = H5TBOappend_records(self.dataset_id, self.type_id, * nrecords, nrows, self.wbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5TBOappend_records(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_nrecords, __pyx_v_nrows, __pyx_v_self->wbuf); } /* "tables/tableextension.pyx":477 * nrows = self.nrows * # release GIL (allow other threads to use the Python interpreter) * with nogil: # <<<<<<<<<<<<<< * # Append the records: * ret = H5TBOappend_records(self.dataset_id, self.type_id, */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/tableextension.pyx":482 * nrecords, nrows, self.wbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems appending the records.") * */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/tableextension.pyx":483 * * if ret < 0: * raise HDF5ExtError("Problems appending the records.") # <<<<<<<<<<<<<< * * self.nrows = self.nrows + nrecords */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "tables/tableextension.pyx":485 * raise HDF5ExtError("Problems appending the records.") * * self.nrows = self.nrows + nrecords # <<<<<<<<<<<<<< * * def _close_append(self): */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromLong(__pyx_v_nrecords); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tables.tableextension.Table._append_records", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_11_close_append(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_5Table_11_close_append(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_close_append (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_5Table_10_close_append(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":487 * self.nrows = self.nrows + nrecords * * def _close_append(self): # <<<<<<<<<<<<<< * cdef hsize_t nrows * */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_10_close_append(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self) { hsize_t __pyx_v_nrows; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; hsize_t __pyx_t_4; hid_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_close_append", 0); /* "tables/tableextension.pyx":490 * cdef hsize_t nrows * * if self._v_file.params['PYTABLES_SYS_ATTRS']: # <<<<<<<<<<<<<< * # Update the NROWS attribute * nrows = self.nrows */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_file); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__params); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__PYTABLES_SYS_ATTRS)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/tableextension.pyx":492 * if self._v_file.params['PYTABLES_SYS_ATTRS']: * # Update the NROWS attribute * nrows = self.nrows # <<<<<<<<<<<<<< * if (H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, * 0, NULL, &nrows) < 0): */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nrows = __pyx_t_4; /* "tables/tableextension.pyx":493 * # Update the NROWS attribute * nrows = self.nrows * if (H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, # <<<<<<<<<<<<<< * 0, NULL, &nrows) < 0): * raise HDF5ExtError("Problems setting the NROWS attribute.") */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__H5T_STD_I64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":494 * nrows = self.nrows * if (H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, * 0, NULL, &nrows) < 0): # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems setting the NROWS attribute.") * */ __pyx_t_3 = (H5ATTRset_attribute(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__NROWS, __pyx_t_5, 0, NULL, ((char *)(&__pyx_v_nrows))) < 0); if (__pyx_t_3) { /* "tables/tableextension.pyx":495 * if (H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, * 0, NULL, &nrows) < 0): * raise HDF5ExtError("Problems setting the NROWS attribute.") # <<<<<<<<<<<<<< * * # Set the caches to dirty (in fact, and for the append case, */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":499 * # Set the caches to dirty (in fact, and for the append case, * # it should be only the caches based on limits, but anyway) * self._dirtycache = True # <<<<<<<<<<<<<< * # Delete the reference to recarray as we doesn't need it anymore * self._v_recarray = None */ __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___dirtycache, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":501 * self._dirtycache = True * # Delete the reference to recarray as we doesn't need it anymore * self._v_recarray = None # <<<<<<<<<<<<<< * * def _update_records(self, hsize_t start, hsize_t stop, */ if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_recarray, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("tables.tableextension.Table._close_append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_13_update_records(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_5Table_13_update_records(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { hsize_t __pyx_v_start; hsize_t __pyx_v_stop; hsize_t __pyx_v_step; PyArrayObject *__pyx_v_recarr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_update_records (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__stop,&__pyx_n_s__step,&__pyx_n_s__recarr,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stop)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_update_records", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__step)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_update_records", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__recarr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_update_records", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_update_records") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_start = __Pyx_PyInt_from_py_hsize_t(values[0]); if (unlikely((__pyx_v_start == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_stop = __Pyx_PyInt_from_py_hsize_t(values[1]); if (unlikely((__pyx_v_stop == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_step = __Pyx_PyInt_from_py_hsize_t(values[2]); if (unlikely((__pyx_v_step == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_recarr = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_update_records", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Table._update_records", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_recarr), __pyx_ptype_5numpy_ndarray, 1, "recarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_14tableextension_5Table_12_update_records(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self), __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_recarr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":503 * self._v_recarray = None * * def _update_records(self, hsize_t start, hsize_t stop, # <<<<<<<<<<<<<< * hsize_t step, ndarray recarr): * cdef herr_t ret */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_12_update_records(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, hsize_t __pyx_v_step, PyArrayObject *__pyx_v_recarr) { herr_t __pyx_v_ret; void *__pyx_v_rbuf; hsize_t __pyx_v_nrecords; hsize_t __pyx_v_nrows; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_update_records", 0); /* "tables/tableextension.pyx":510 * * # Get the pointer to the buffer data area * rbuf = recarr.data # <<<<<<<<<<<<<< * * # Compute the number of records to update */ __pyx_t_1 = __pyx_v_recarr->data; __pyx_v_rbuf = __pyx_t_1; /* "tables/tableextension.pyx":513 * * # Compute the number of records to update * nrecords = len(recarr) # <<<<<<<<<<<<<< * nrows = get_len_of_range(start, stop, step) * if nrecords > nrows: */ __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_recarr)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nrecords = __pyx_t_2; /* "tables/tableextension.pyx":514 * # Compute the number of records to update * nrecords = len(recarr) * nrows = get_len_of_range(start, stop, step) # <<<<<<<<<<<<<< * if nrecords > nrows: * nrecords = nrows */ __pyx_v_nrows = get_len_of_range(__pyx_v_start, __pyx_v_stop, __pyx_v_step); /* "tables/tableextension.pyx":515 * nrecords = len(recarr) * nrows = get_len_of_range(start, stop, step) * if nrecords > nrows: # <<<<<<<<<<<<<< * nrecords = nrows * */ __pyx_t_3 = (__pyx_v_nrecords > __pyx_v_nrows); if (__pyx_t_3) { /* "tables/tableextension.pyx":516 * nrows = get_len_of_range(start, stop, step) * if nrecords > nrows: * nrecords = nrows # <<<<<<<<<<<<<< * * # Convert some NumPy types to HDF5 before storing. */ __pyx_v_nrecords = __pyx_v_nrows; goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":519 * * # Convert some NumPy types to HDF5 before storing. * self._convert_types(recarr, nrecords, 0) # <<<<<<<<<<<<<< * # Update the records: * with nogil: */ __pyx_t_4 = ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->_convert_types(__pyx_v_self, __pyx_v_recarr, __pyx_v_nrecords, 0, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":521 * self._convert_types(recarr, nrecords, 0) * # Update the records: * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOwrite_records(self.dataset_id, self.type_id, * start, nrecords, step, rbuf ) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/tableextension.pyx":523 * with nogil: * ret = H5TBOwrite_records(self.dataset_id, self.type_id, * start, nrecords, step, rbuf ) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5TBOwrite_records(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_start, __pyx_v_nrecords, __pyx_v_step, __pyx_v_rbuf); } /* "tables/tableextension.pyx":521 * self._convert_types(recarr, nrecords, 0) * # Update the records: * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOwrite_records(self.dataset_id, self.type_id, * start, nrecords, step, rbuf ) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/tableextension.pyx":525 * start, nrecords, step, rbuf ) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems updating the records.") * */ __pyx_t_3 = (__pyx_v_ret < 0); if (__pyx_t_3) { /* "tables/tableextension.pyx":526 * * if ret < 0: * raise HDF5ExtError("Problems updating the records.") # <<<<<<<<<<<<<< * * # Set the caches to dirty */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "tables/tableextension.pyx":529 * * # Set the caches to dirty * self._dirtycache = True # <<<<<<<<<<<<<< * * def _update_elements(self, hsize_t nrecords, ndarray coords, */ __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___dirtycache, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tables.tableextension.Table._update_records", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_15_update_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_5Table_15_update_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { hsize_t __pyx_v_nrecords; PyArrayObject *__pyx_v_coords = 0; PyArrayObject *__pyx_v_recarr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_update_elements (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nrecords,&__pyx_n_s__coords,&__pyx_n_s__recarr,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nrecords)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coords)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_update_elements", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__recarr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_update_elements", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_update_elements") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_nrecords = __Pyx_PyInt_from_py_hsize_t(values[0]); if (unlikely((__pyx_v_nrecords == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_coords = ((PyArrayObject *)values[1]); __pyx_v_recarr = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_update_elements", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Table._update_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_coords), __pyx_ptype_5numpy_ndarray, 1, "coords", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_recarr), __pyx_ptype_5numpy_ndarray, 1, "recarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_14tableextension_5Table_14_update_elements(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self), __pyx_v_nrecords, __pyx_v_coords, __pyx_v_recarr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":531 * self._dirtycache = True * * def _update_elements(self, hsize_t nrecords, ndarray coords, # <<<<<<<<<<<<<< * ndarray recarr): * cdef herr_t ret */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_14_update_elements(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hsize_t __pyx_v_nrecords, PyArrayObject *__pyx_v_coords, PyArrayObject *__pyx_v_recarr) { herr_t __pyx_v_ret; void *__pyx_v_rbuf; void *__pyx_v_rcoords; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_update_elements", 0); /* "tables/tableextension.pyx":537 * * # Get the chunk of the coords that correspond to a buffer * rcoords = coords.data # <<<<<<<<<<<<<< * * # Get the pointer to the buffer data area */ __pyx_t_1 = __pyx_v_coords->data; __pyx_v_rcoords = __pyx_t_1; /* "tables/tableextension.pyx":540 * * # Get the pointer to the buffer data area * rbuf = recarr.data # <<<<<<<<<<<<<< * * # Convert some NumPy types to HDF5 before storing. */ __pyx_t_1 = __pyx_v_recarr->data; __pyx_v_rbuf = __pyx_t_1; /* "tables/tableextension.pyx":543 * * # Convert some NumPy types to HDF5 before storing. * self._convert_types(recarr, nrecords, 0) # <<<<<<<<<<<<<< * * # Update the records: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->_convert_types(__pyx_v_self, __pyx_v_recarr, __pyx_v_nrecords, 0, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":546 * * # Update the records: * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOwrite_elements(self.dataset_id, self.type_id, * nrecords, rcoords, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/tableextension.pyx":548 * with nogil: * ret = H5TBOwrite_elements(self.dataset_id, self.type_id, * nrecords, rcoords, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5TBOwrite_elements(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_nrecords, __pyx_v_rcoords, __pyx_v_rbuf); } /* "tables/tableextension.pyx":546 * * # Update the records: * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOwrite_elements(self.dataset_id, self.type_id, * nrecords, rcoords, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/tableextension.pyx":550 * nrecords, rcoords, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems updating the records.") * */ __pyx_t_3 = (__pyx_v_ret < 0); if (__pyx_t_3) { /* "tables/tableextension.pyx":551 * * if ret < 0: * raise HDF5ExtError("Problems updating the records.") # <<<<<<<<<<<<<< * * # Set the caches to dirty */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "tables/tableextension.pyx":554 * * # Set the caches to dirty * self._dirtycache = True # <<<<<<<<<<<<<< * * def _read_records(self, hsize_t start, hsize_t nrecords, ndarray recarr): */ __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___dirtycache, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.tableextension.Table._update_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_17_read_records(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_5Table_17_read_records(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { hsize_t __pyx_v_start; hsize_t __pyx_v_nrecords; PyArrayObject *__pyx_v_recarr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_read_records (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__nrecords,&__pyx_n_s__recarr,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nrecords)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_read_records", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__recarr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_read_records", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_read_records") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_start = __Pyx_PyInt_from_py_hsize_t(values[0]); if (unlikely((__pyx_v_start == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nrecords = __Pyx_PyInt_from_py_hsize_t(values[1]); if (unlikely((__pyx_v_nrecords == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_recarr = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_read_records", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Table._read_records", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_recarr), __pyx_ptype_5numpy_ndarray, 1, "recarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_14tableextension_5Table_16_read_records(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self), __pyx_v_start, __pyx_v_nrecords, __pyx_v_recarr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":556 * self._dirtycache = True * * def _read_records(self, hsize_t start, hsize_t nrecords, ndarray recarr): # <<<<<<<<<<<<<< * cdef void *rbuf * cdef int ret */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_16_read_records(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_nrecords, PyArrayObject *__pyx_v_recarr) { void *__pyx_v_rbuf; int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; hsize_t __pyx_t_5; char *__pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_records", 0); /* "tables/tableextension.pyx":561 * * # Correct the number of records to read, if needed * if (start + nrecords) > self.nrows: # <<<<<<<<<<<<<< * nrecords = self.nrows - start * */ __pyx_t_1 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_start + __pyx_v_nrecords)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "tables/tableextension.pyx":562 * # Correct the number of records to read, if needed * if (start + nrecords) > self.nrows: * nrecords = self.nrows - start # <<<<<<<<<<<<<< * * # Get the pointer to the buffer data area */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nrecords = __pyx_t_5; goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":565 * * # Get the pointer to the buffer data area * rbuf = recarr.data # <<<<<<<<<<<<<< * * # Read the records from disk */ __pyx_t_6 = __pyx_v_recarr->data; __pyx_v_rbuf = __pyx_t_6; /* "tables/tableextension.pyx":568 * * # Read the records from disk * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOread_records(self.dataset_id, self.type_id, start, * nrecords, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/tableextension.pyx":570 * with nogil: * ret = H5TBOread_records(self.dataset_id, self.type_id, start, * nrecords, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5TBOread_records(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_start, __pyx_v_nrecords, __pyx_v_rbuf); } /* "tables/tableextension.pyx":568 * * # Read the records from disk * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOread_records(self.dataset_id, self.type_id, start, * nrecords, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/tableextension.pyx":572 * nrecords, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems reading records.") * */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/tableextension.pyx":573 * * if ret < 0: * raise HDF5ExtError("Problems reading records.") # <<<<<<<<<<<<<< * * # Convert some HDF5 types to NumPy after reading. */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "tables/tableextension.pyx":576 * * # Convert some HDF5 types to NumPy after reading. * self._convert_types(recarr, nrecords, 1) # <<<<<<<<<<<<<< * * return nrecords */ __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->_convert_types(__pyx_v_self, __pyx_v_recarr, __pyx_v_nrecords, 1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":578 * self._convert_types(recarr, nrecords, 1) * * return nrecords # <<<<<<<<<<<<<< * * cdef hsize_t _read_chunk(self, hsize_t nchunk, ndarray iobuf, long cstart): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_nrecords); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.tableextension.Table._read_records", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":580 * return nrecords * * cdef hsize_t _read_chunk(self, hsize_t nchunk, ndarray iobuf, long cstart): # <<<<<<<<<<<<<< * cdef long nslot * cdef hsize_t start, nrecords, chunkshape */ static hsize_t __pyx_f_6tables_14tableextension_5Table__read_chunk(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hsize_t __pyx_v_nchunk, PyArrayObject *__pyx_v_iobuf, long __pyx_v_cstart) { long __pyx_v_nslot; hsize_t __pyx_v_start; hsize_t __pyx_v_nrecords; hsize_t __pyx_v_chunkshape; int __pyx_v_ret; void *__pyx_v_rbuf; struct __pyx_obj_6tables_17lrucacheextension_NumCache *__pyx_v_chunkcache = 0; hsize_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; long __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; hsize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_chunk", 0); /* "tables/tableextension.pyx":587 * cdef NumCache chunkcache * * chunkcache = self._chunkcache # <<<<<<<<<<<<<< * chunkshape = chunkcache.slotsize * # Correct the number of records to read, if needed */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___chunkcache); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6tables_17lrucacheextension_NumCache))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_chunkcache = ((struct __pyx_obj_6tables_17lrucacheextension_NumCache *)__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":588 * * chunkcache = self._chunkcache * chunkshape = chunkcache.slotsize # <<<<<<<<<<<<<< * # Correct the number of records to read, if needed * start = nchunk*chunkshape */ __pyx_t_2 = __pyx_v_chunkcache->slotsize; __pyx_v_chunkshape = __pyx_t_2; /* "tables/tableextension.pyx":590 * chunkshape = chunkcache.slotsize * # Correct the number of records to read, if needed * start = nchunk*chunkshape # <<<<<<<<<<<<<< * nrecords = chunkshape * if (start + nrecords) > self.nrows: */ __pyx_v_start = (__pyx_v_nchunk * __pyx_v_chunkshape); /* "tables/tableextension.pyx":591 * # Correct the number of records to read, if needed * start = nchunk*chunkshape * nrecords = chunkshape # <<<<<<<<<<<<<< * if (start + nrecords) > self.nrows: * nrecords = self.nrows - start */ __pyx_v_nrecords = __pyx_v_chunkshape; /* "tables/tableextension.pyx":592 * start = nchunk*chunkshape * nrecords = chunkshape * if (start + nrecords) > self.nrows: # <<<<<<<<<<<<<< * nrecords = self.nrows - start * rbuf = iobuf.data + cstart * chunkcache.itemsize */ __pyx_t_1 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_start + __pyx_v_nrecords)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "tables/tableextension.pyx":593 * nrecords = chunkshape * if (start + nrecords) > self.nrows: * nrecords = self.nrows - start # <<<<<<<<<<<<<< * rbuf = iobuf.data + cstart * chunkcache.itemsize * # Try to see if the chunk is in cache */ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_start); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nrecords = __pyx_t_6; goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":594 * if (start + nrecords) > self.nrows: * nrecords = self.nrows - start * rbuf = iobuf.data + cstart * chunkcache.itemsize # <<<<<<<<<<<<<< * # Try to see if the chunk is in cache * nslot = chunkcache.getslot_(nchunk) */ __pyx_v_rbuf = (((char *)__pyx_v_iobuf->data) + (__pyx_v_cstart * __pyx_v_chunkcache->itemsize)); /* "tables/tableextension.pyx":596 * rbuf = iobuf.data + cstart * chunkcache.itemsize * # Try to see if the chunk is in cache * nslot = chunkcache.getslot_(nchunk) # <<<<<<<<<<<<<< * if nslot >= 0: * chunkcache.getitem_(nslot, rbuf, 0) */ __pyx_v_nslot = ((struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *)__pyx_v_chunkcache->__pyx_base.__pyx_vtab)->getslot_(__pyx_v_chunkcache, __pyx_v_nchunk); /* "tables/tableextension.pyx":597 * # Try to see if the chunk is in cache * nslot = chunkcache.getslot_(nchunk) * if nslot >= 0: # <<<<<<<<<<<<<< * chunkcache.getitem_(nslot, rbuf, 0) * else: */ __pyx_t_5 = (__pyx_v_nslot >= 0); if (__pyx_t_5) { /* "tables/tableextension.pyx":598 * nslot = chunkcache.getslot_(nchunk) * if nslot >= 0: * chunkcache.getitem_(nslot, rbuf, 0) # <<<<<<<<<<<<<< * else: * # Chunk is not in cache. Read it and put it in the LRU cache. */ __pyx_t_1 = ((struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *)__pyx_v_chunkcache->__pyx_base.__pyx_vtab)->getitem_(__pyx_v_chunkcache, __pyx_v_nslot, __pyx_v_rbuf, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4; } /*else*/ { /* "tables/tableextension.pyx":601 * else: * # Chunk is not in cache. Read it and put it in the LRU cache. * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOread_records(self.dataset_id, self.type_id, * start, nrecords, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/tableextension.pyx":603 * with nogil: * ret = H5TBOread_records(self.dataset_id, self.type_id, * start, nrecords, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5TBOread_records(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_start, __pyx_v_nrecords, __pyx_v_rbuf); } /* "tables/tableextension.pyx":601 * else: * # Chunk is not in cache. Read it and put it in the LRU cache. * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOread_records(self.dataset_id, self.type_id, * start, nrecords, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/tableextension.pyx":605 * start, nrecords, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems reading chunk records.") * nslot = chunkcache.setitem_(nchunk, rbuf, 0) */ __pyx_t_5 = (__pyx_v_ret < 0); if (__pyx_t_5) { /* "tables/tableextension.pyx":606 * * if ret < 0: * raise HDF5ExtError("Problems reading chunk records.") # <<<<<<<<<<<<<< * nslot = chunkcache.setitem_(nchunk, rbuf, 0) * return nrecords */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "tables/tableextension.pyx":607 * if ret < 0: * raise HDF5ExtError("Problems reading chunk records.") * nslot = chunkcache.setitem_(nchunk, rbuf, 0) # <<<<<<<<<<<<<< * return nrecords * */ __pyx_v_nslot = ((struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *)__pyx_v_chunkcache->__pyx_base.__pyx_vtab)->setitem_(__pyx_v_chunkcache, __pyx_v_nchunk, __pyx_v_rbuf, 0); } __pyx_L4:; /* "tables/tableextension.pyx":608 * raise HDF5ExtError("Problems reading chunk records.") * nslot = chunkcache.setitem_(nchunk, rbuf, 0) * return nrecords # <<<<<<<<<<<<<< * * def _read_elements(self, ndarray coords, ndarray recarr): */ __pyx_r = __pyx_v_nrecords; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("tables.tableextension.Table._read_chunk", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_chunkcache); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_19_read_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_5Table_19_read_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_coords = 0; PyArrayObject *__pyx_v_recarr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_read_elements (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__coords,&__pyx_n_s__recarr,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coords)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__recarr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_read_elements", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_read_elements") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_coords = ((PyArrayObject *)values[0]); __pyx_v_recarr = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_read_elements", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Table._read_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_coords), __pyx_ptype_5numpy_ndarray, 1, "coords", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_recarr), __pyx_ptype_5numpy_ndarray, 1, "recarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_14tableextension_5Table_18_read_elements(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self), __pyx_v_coords, __pyx_v_recarr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":610 * return nrecords * * def _read_elements(self, ndarray coords, ndarray recarr): # <<<<<<<<<<<<<< * cdef long nrecords * cdef void *rbuf, *rbuf2 */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_18_read_elements(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, PyArrayObject *__pyx_v_coords, PyArrayObject *__pyx_v_recarr) { long __pyx_v_nrecords; void *__pyx_v_rbuf; void *__pyx_v_rbuf2; int __pyx_v_ret; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; long __pyx_t_2; char *__pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_elements", 0); /* "tables/tableextension.pyx":616 * * # Get the chunk of the coords that correspond to a buffer * nrecords = coords.size # <<<<<<<<<<<<<< * # Get the pointer to the buffer data area * rbuf = recarr.data */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_coords), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_t_1); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nrecords = __pyx_t_2; /* "tables/tableextension.pyx":618 * nrecords = coords.size * # Get the pointer to the buffer data area * rbuf = recarr.data # <<<<<<<<<<<<<< * # Get the pointer to the buffer coords area * rbuf2 = coords.data */ __pyx_t_3 = __pyx_v_recarr->data; __pyx_v_rbuf = __pyx_t_3; /* "tables/tableextension.pyx":620 * rbuf = recarr.data * # Get the pointer to the buffer coords area * rbuf2 = coords.data # <<<<<<<<<<<<<< * * with nogil: */ __pyx_t_3 = __pyx_v_coords->data; __pyx_v_rbuf2 = __pyx_t_3; /* "tables/tableextension.pyx":622 * rbuf2 = coords.data * * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOread_elements(self.dataset_id, self.type_id, * nrecords, rbuf2, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/tableextension.pyx":624 * with nogil: * ret = H5TBOread_elements(self.dataset_id, self.type_id, * nrecords, rbuf2, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5TBOread_elements(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_nrecords, __pyx_v_rbuf2, __pyx_v_rbuf); } /* "tables/tableextension.pyx":622 * rbuf2 = coords.data * * with nogil: # <<<<<<<<<<<<<< * ret = H5TBOread_elements(self.dataset_id, self.type_id, * nrecords, rbuf2, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/tableextension.pyx":626 * nrecords, rbuf2, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems reading records.") * */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/tableextension.pyx":627 * * if ret < 0: * raise HDF5ExtError("Problems reading records.") # <<<<<<<<<<<<<< * * # Convert some HDF5 types to NumPy after reading. */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "tables/tableextension.pyx":630 * * # Convert some HDF5 types to NumPy after reading. * self._convert_types(recarr, nrecords, 1) # <<<<<<<<<<<<<< * * return nrecords */ __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_self->__pyx_base.__pyx_vtab)->_convert_types(__pyx_v_self, __pyx_v_recarr, __pyx_v_nrecords, 1, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "tables/tableextension.pyx":632 * self._convert_types(recarr, nrecords, 1) * * return nrecords # <<<<<<<<<<<<<< * * def _remove_rows(self, hsize_t start, hsize_t stop, long step): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyInt_FromLong(__pyx_v_nrecords); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tables.tableextension.Table._read_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_5Table_21_remove_rows(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_5Table_21_remove_rows(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { hsize_t __pyx_v_start; hsize_t __pyx_v_stop; long __pyx_v_step; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_remove_rows (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__stop,&__pyx_n_s__step,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stop)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_remove_rows", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__step)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_remove_rows", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_remove_rows") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_start = __Pyx_PyInt_from_py_hsize_t(values[0]); if (unlikely((__pyx_v_start == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_stop = __Pyx_PyInt_from_py_hsize_t(values[1]); if (unlikely((__pyx_v_stop == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_step = __Pyx_PyInt_AsLong(values[2]); if (unlikely((__pyx_v_step == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_remove_rows", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Table._remove_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_14tableextension_5Table_20_remove_rows(((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_v_self), __pyx_v_start, __pyx_v_stop, __pyx_v_step); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":634 * return nrecords * * def _remove_rows(self, hsize_t start, hsize_t stop, long step): # <<<<<<<<<<<<<< * cdef size_t rowsize * cdef hsize_t nrecords, nrecords2 */ static PyObject *__pyx_pf_6tables_14tableextension_5Table_20_remove_rows(struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, long __pyx_v_step) { size_t __pyx_v_rowsize; hsize_t __pyx_v_nrecords; hsize_t __pyx_v_nrecords2; hsize_t __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; hsize_t __pyx_t_4; hsize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; hid_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_remove_rows", 0); /* "tables/tableextension.pyx":639 * cdef hsize_t i * * if step == 1: # <<<<<<<<<<<<<< * nrecords = stop - start * rowsize = self.rowsize */ __pyx_t_1 = (__pyx_v_step == 1); if (__pyx_t_1) { /* "tables/tableextension.pyx":640 * * if step == 1: * nrecords = stop - start # <<<<<<<<<<<<<< * rowsize = self.rowsize * # Using self.disk_type_id should be faster (i.e. less conversions) */ __pyx_v_nrecords = (__pyx_v_stop - __pyx_v_start); /* "tables/tableextension.pyx":641 * if step == 1: * nrecords = stop - start * rowsize = self.rowsize # <<<<<<<<<<<<<< * # Using self.disk_type_id should be faster (i.e. less conversions) * if (H5TBOdelete_records(self.dataset_id, self.disk_type_id, */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__rowsize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AsSize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_rowsize = __pyx_t_3; /* "tables/tableextension.pyx":644 * # Using self.disk_type_id should be faster (i.e. less conversions) * if (H5TBOdelete_records(self.dataset_id, self.disk_type_id, * self.nrows, rowsize, start, nrecords, # <<<<<<<<<<<<<< * self.nrowsinbuf) < 0): * raise HDF5ExtError("Problems deleting records.") */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":645 * if (H5TBOdelete_records(self.dataset_id, self.disk_type_id, * self.nrows, rowsize, start, nrecords, * self.nrowsinbuf) < 0): # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems deleting records.") * */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrowsinbuf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = (H5TBOdelete_records(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.disk_type_id, __pyx_t_4, __pyx_v_rowsize, __pyx_v_start, __pyx_v_nrecords, __pyx_t_5) < 0); if (__pyx_t_1) { /* "tables/tableextension.pyx":646 * self.nrows, rowsize, start, nrecords, * self.nrowsinbuf) < 0): * raise HDF5ExtError("Problems deleting records.") # <<<<<<<<<<<<<< * * self.nrows = self.nrows - nrecords */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "tables/tableextension.pyx":648 * raise HDF5ExtError("Problems deleting records.") * * self.nrows = self.nrows - nrecords # <<<<<<<<<<<<<< * if self._v_file.params['PYTABLES_SYS_ATTRS']: * # Attach the NROWS attribute */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_nrecords); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyNumber_Subtract(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "tables/tableextension.pyx":649 * * self.nrows = self.nrows - nrecords * if self._v_file.params['PYTABLES_SYS_ATTRS']: # <<<<<<<<<<<<<< * # Attach the NROWS attribute * nrecords2 = self.nrows */ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_file); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__params); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__PYTABLES_SYS_ATTRS)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { /* "tables/tableextension.pyx":651 * if self._v_file.params['PYTABLES_SYS_ATTRS']: * # Attach the NROWS attribute * nrecords2 = self.nrows # <<<<<<<<<<<<<< * H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, * 0, NULL, &nrecords2) */ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_7); if (unlikely((__pyx_t_5 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_nrecords2 = __pyx_t_5; /* "tables/tableextension.pyx":652 * # Attach the NROWS attribute * nrecords2 = self.nrows * H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, # <<<<<<<<<<<<<< * 0, NULL, &nrecords2) * # Set the caches to dirty */ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__H5T_STD_I64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_from_py_hid_t(__pyx_t_7); if (unlikely((__pyx_t_8 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "tables/tableextension.pyx":653 * nrecords2 = self.nrows * H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, * 0, NULL, &nrecords2) # <<<<<<<<<<<<<< * # Set the caches to dirty * self._dirtycache = True */ H5ATTRset_attribute(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__NROWS, __pyx_t_8, 0, NULL, ((char *)(&__pyx_v_nrecords2))); goto __pyx_L5; } __pyx_L5:; /* "tables/tableextension.pyx":655 * 0, NULL, &nrecords2) * # Set the caches to dirty * self._dirtycache = True # <<<<<<<<<<<<<< * # Return the number of records removed * return nrecords */ __pyx_t_7 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___dirtycache, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "tables/tableextension.pyx":657 * self._dirtycache = True * # Return the number of records removed * return nrecords # <<<<<<<<<<<<<< * elif step == -1: * self._remove_rows(self, stop+1, start+1, 1) */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_nrecords); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L3; } /* "tables/tableextension.pyx":658 * # Return the number of records removed * return nrecords * elif step == -1: # <<<<<<<<<<<<<< * self._remove_rows(self, stop+1, start+1, 1) * elif step >= 1: */ __pyx_t_1 = (__pyx_v_step == -1); if (__pyx_t_1) { /* "tables/tableextension.pyx":659 * return nrecords * elif step == -1: * self._remove_rows(self, stop+1, start+1, 1) # <<<<<<<<<<<<<< * elif step >= 1: * # always want to go through the space backwards */ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___remove_rows); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_stop + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_start + 1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L3; } /* "tables/tableextension.pyx":660 * elif step == -1: * self._remove_rows(self, stop+1, start+1, 1) * elif step >= 1: # <<<<<<<<<<<<<< * # always want to go through the space backwards * for i in range(stop - step, start - step, -step): */ __pyx_t_1 = (__pyx_v_step >= 1); if (__pyx_t_1) { /* "tables/tableextension.pyx":662 * elif step >= 1: * # always want to go through the space backwards * for i in range(stop - step, start - step, -step): # <<<<<<<<<<<<<< * self._remove_rows(self, i, i+1, 1) * elif step <= -1: */ __pyx_t_6 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_stop - __pyx_v_step)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_start - __pyx_v_step)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyInt_FromLong((-__pyx_v_step)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_6 = 0; __pyx_t_9 = 0; __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_7 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_7)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } __pyx_t_5 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_7); if (unlikely((__pyx_t_5 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_i = __pyx_t_5; /* "tables/tableextension.pyx":663 * # always want to go through the space backwards * for i in range(stop - step, start - step, -step): * self._remove_rows(self, i, i+1, 1) # <<<<<<<<<<<<<< * elif step <= -1: * # always want to go through the space backwards */ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___remove_rows); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_i + 1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_9 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } /* "tables/tableextension.pyx":664 * for i in range(stop - step, start - step, -step): * self._remove_rows(self, i, i+1, 1) * elif step <= -1: # <<<<<<<<<<<<<< * # always want to go through the space backwards * for i in range(start, stop, step): */ __pyx_t_1 = (__pyx_v_step <= -1); if (__pyx_t_1) { /* "tables/tableextension.pyx":666 * elif step <= -1: * # always want to go through the space backwards * for i in range(start, stop, step): # <<<<<<<<<<<<<< * self._remove_rows(self, i, i+1, 1) * else: */ __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_stop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = PyInt_FromLong(__pyx_v_step); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; if (PyList_CheckExact(__pyx_t_12) || PyTuple_CheckExact(__pyx_t_12)) { __pyx_t_7 = __pyx_t_12; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_7)) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_12); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_7)) { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_12); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_12 = __pyx_t_11(__pyx_t_7); if (unlikely(!__pyx_t_12)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_12); } __pyx_t_5 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_12); if (unlikely((__pyx_t_5 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_i = __pyx_t_5; /* "tables/tableextension.pyx":667 * # always want to go through the space backwards * for i in range(start, stop, step): * self._remove_rows(self, i, i+1, 1) # <<<<<<<<<<<<<< * else: * raise ValueError("step size may not be 0.") */ __pyx_t_12 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___remove_rows); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_i + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_6 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L3; } /*else*/ { /* "tables/tableextension.pyx":669 * self._remove_rows(self, i, i+1, 1) * else: * raise ValueError("step size may not be 0.") # <<<<<<<<<<<<<< * * */ __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("tables.tableextension.Table._remove_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_4nrow_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_3Row_4nrow_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_4nrow___get__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":748 * """ * * def __get__(self): # <<<<<<<<<<<<<< * return SizeType(self._nrow) * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_4nrow___get__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "tables/tableextension.pyx":749 * * def __get__(self): * return SizeType(self._nrow) # <<<<<<<<<<<<<< * * property table: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyLong_FromLongLong(__pyx_v_self->_nrow); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.tableextension.Row.nrow.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_5table_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_3Row_5table_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_5table___get__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":752 * * property table: * def __get__(self): # <<<<<<<<<<<<<< * return self._table_file._get_node(self._table_path) * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_5table___get__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "tables/tableextension.pyx":753 * property table: * def __get__(self): * return self._table_file._get_node(self._table_path) # <<<<<<<<<<<<<< * * def __cinit__(self, table): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->_table_file, __pyx_n_s___get_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->_table_path); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_table_path); __Pyx_GIVEREF(__pyx_v_self->_table_path); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.tableextension.Row.table.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6tables_14tableextension_3Row_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6tables_14tableextension_3Row_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_table = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__table,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__table)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_table = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Row.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_14tableextension_3Row___cinit__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self), __pyx_v_table); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":755 * return self._table_file._get_node(self._table_path) * * def __cinit__(self, table): # <<<<<<<<<<<<<< * cdef int nfields, i * # Location-dependent information. */ static int __pyx_pf_6tables_14tableextension_3Row___cinit__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_table) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; hsize_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "tables/tableextension.pyx":758 * cdef int nfields, i * # Location-dependent information. * self._table_file = table._v_file # <<<<<<<<<<<<<< * self._table_path = table._v_pathname * self._unsaved_nrows = 0 */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___v_file); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_table_file); __Pyx_DECREF(__pyx_v_self->_table_file); __pyx_v_self->_table_file = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":759 * # Location-dependent information. * self._table_file = table._v_file * self._table_path = table._v_pathname # <<<<<<<<<<<<<< * self._unsaved_nrows = 0 * self._mod_nrows = 0 */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___v_pathname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_table_path); __Pyx_DECREF(__pyx_v_self->_table_path); __pyx_v_self->_table_path = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":760 * self._table_file = table._v_file * self._table_path = table._v_pathname * self._unsaved_nrows = 0 # <<<<<<<<<<<<<< * self._mod_nrows = 0 * self._row = 0 */ __pyx_v_self->_unsaved_nrows = 0; /* "tables/tableextension.pyx":761 * self._table_path = table._v_pathname * self._unsaved_nrows = 0 * self._mod_nrows = 0 # <<<<<<<<<<<<<< * self._row = 0 * self._nrow = 0 # Useful in mod_append read iterators */ __pyx_v_self->_mod_nrows = 0; /* "tables/tableextension.pyx":762 * self._unsaved_nrows = 0 * self._mod_nrows = 0 * self._row = 0 # <<<<<<<<<<<<<< * self._nrow = 0 # Useful in mod_append read iterators * self._riterator = 0 */ __pyx_v_self->_row = 0; /* "tables/tableextension.pyx":763 * self._mod_nrows = 0 * self._row = 0 * self._nrow = 0 # Useful in mod_append read iterators # <<<<<<<<<<<<<< * self._riterator = 0 * self._bufferinfo_done = 0 */ __pyx_v_self->_nrow = 0; /* "tables/tableextension.pyx":764 * self._row = 0 * self._nrow = 0 # Useful in mod_append read iterators * self._riterator = 0 # <<<<<<<<<<<<<< * self._bufferinfo_done = 0 * # Some variables from table will be cached here */ __pyx_v_self->_riterator = 0; /* "tables/tableextension.pyx":765 * self._nrow = 0 # Useful in mod_append read iterators * self._riterator = 0 * self._bufferinfo_done = 0 # <<<<<<<<<<<<<< * # Some variables from table will be cached here * if table._v_file.mode == 'r': */ __pyx_v_self->_bufferinfo_done = 0; /* "tables/tableextension.pyx":767 * self._bufferinfo_done = 0 * # Some variables from table will be cached here * if table._v_file.mode == 'r': # <<<<<<<<<<<<<< * self.ro_filemode = 1 * else: */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___v_file); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/tableextension.pyx":768 * # Some variables from table will be cached here * if table._v_file.mode == 'r': * self.ro_filemode = 1 # <<<<<<<<<<<<<< * else: * self.ro_filemode = 0 */ __pyx_v_self->ro_filemode = 1; goto __pyx_L3; } /*else*/ { /* "tables/tableextension.pyx":770 * self.ro_filemode = 1 * else: * self.ro_filemode = 0 # <<<<<<<<<<<<<< * self.chunked = table._chunked * self.colenums = table._colenums */ __pyx_v_self->ro_filemode = 0; } __pyx_L3:; /* "tables/tableextension.pyx":771 * else: * self.ro_filemode = 0 * self.chunked = table._chunked # <<<<<<<<<<<<<< * self.colenums = table._colenums * self.exist_enum_cols = len(self.colenums) */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___chunked); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->chunked = __pyx_t_4; /* "tables/tableextension.pyx":772 * self.ro_filemode = 0 * self.chunked = table._chunked * self.colenums = table._colenums # <<<<<<<<<<<<<< * self.exist_enum_cols = len(self.colenums) * self.nrowsinbuf = table.nrowsinbuf */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___colenums); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->colenums); __Pyx_DECREF(__pyx_v_self->colenums); __pyx_v_self->colenums = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":773 * self.chunked = table._chunked * self.colenums = table._colenums * self.exist_enum_cols = len(self.colenums) # <<<<<<<<<<<<<< * self.nrowsinbuf = table.nrowsinbuf * self.chunksize = table.chunkshape[0] */ __pyx_t_1 = __pyx_v_self->colenums; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->exist_enum_cols = __pyx_t_5; /* "tables/tableextension.pyx":774 * self.colenums = table._colenums * self.exist_enum_cols = len(self.colenums) * self.nrowsinbuf = table.nrowsinbuf # <<<<<<<<<<<<<< * self.chunksize = table.chunkshape[0] * self.nchunksinbuf = self.nrowsinbuf / self.chunksize */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s__nrowsinbuf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->nrowsinbuf = __pyx_t_6; /* "tables/tableextension.pyx":775 * self.exist_enum_cols = len(self.colenums) * self.nrowsinbuf = table.nrowsinbuf * self.chunksize = table.chunkshape[0] # <<<<<<<<<<<<<< * self.nchunksinbuf = self.nrowsinbuf / self.chunksize * self.dtype = table._v_dtype */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s__chunkshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->chunksize = __pyx_t_6; /* "tables/tableextension.pyx":776 * self.nrowsinbuf = table.nrowsinbuf * self.chunksize = table.chunkshape[0] * self.nchunksinbuf = self.nrowsinbuf / self.chunksize # <<<<<<<<<<<<<< * self.dtype = table._v_dtype * self._new_buffer(table) */ if (unlikely(__pyx_v_self->chunksize == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(hsize_t) == sizeof(long) && unlikely(__pyx_v_self->chunksize == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->nrowsinbuf))) { PyErr_Format(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->nchunksinbuf = __Pyx_div_hsize_t(__pyx_v_self->nrowsinbuf, __pyx_v_self->chunksize); /* "tables/tableextension.pyx":777 * self.chunksize = table.chunkshape[0] * self.nchunksinbuf = self.nrowsinbuf / self.chunksize * self.dtype = table._v_dtype # <<<<<<<<<<<<<< * self._new_buffer(table) * self.mod_elements = None */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___v_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->dtype); __Pyx_DECREF(__pyx_v_self->dtype); __pyx_v_self->dtype = __pyx_t_2; __pyx_t_2 = 0; /* "tables/tableextension.pyx":778 * self.nchunksinbuf = self.nrowsinbuf / self.chunksize * self.dtype = table._v_dtype * self._new_buffer(table) # <<<<<<<<<<<<<< * self.mod_elements = None * self.rfieldscache = {} */ __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_new_buffer(__pyx_v_self, __pyx_v_table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":779 * self.dtype = table._v_dtype * self._new_buffer(table) * self.mod_elements = None # <<<<<<<<<<<<<< * self.rfieldscache = {} * self.wfieldscache = {} */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->mod_elements); __Pyx_DECREF(__pyx_v_self->mod_elements); __pyx_v_self->mod_elements = Py_None; /* "tables/tableextension.pyx":780 * self._new_buffer(table) * self.mod_elements = None * self.rfieldscache = {} # <<<<<<<<<<<<<< * self.wfieldscache = {} * self.modified_fields = set() */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __Pyx_GOTREF(__pyx_v_self->rfieldscache); __Pyx_DECREF(__pyx_v_self->rfieldscache); __pyx_v_self->rfieldscache = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":781 * self.mod_elements = None * self.rfieldscache = {} * self.wfieldscache = {} # <<<<<<<<<<<<<< * self.modified_fields = set() * */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __Pyx_GOTREF(__pyx_v_self->wfieldscache); __Pyx_DECREF(__pyx_v_self->wfieldscache); __pyx_v_self->wfieldscache = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":782 * self.rfieldscache = {} * self.wfieldscache = {} * self.modified_fields = set() # <<<<<<<<<<<<<< * * def _iter(self, start=0, stop=0, step=1, coords=None, chunkmap=None): */ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __Pyx_GOTREF(__pyx_v_self->modified_fields); __Pyx_DECREF(__pyx_v_self->modified_fields); __pyx_v_self->modified_fields = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("tables.tableextension.Row.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_3_iter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_2_iter[] = "Return an iterator for traversiong the data in table."; static PyObject *__pyx_pw_6tables_14tableextension_3Row_3_iter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_start = 0; PyObject *__pyx_v_stop = 0; PyObject *__pyx_v_step = 0; PyObject *__pyx_v_coords = 0; PyObject *__pyx_v_chunkmap = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_iter (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__stop,&__pyx_n_s__step,&__pyx_n_s__coords,&__pyx_n_s__chunkmap,0}; PyObject* values[5] = {0,0,0,0,0}; values[0] = ((PyObject *)__pyx_int_0); values[1] = ((PyObject *)__pyx_int_0); values[2] = ((PyObject *)__pyx_int_1); /* "tables/tableextension.pyx":784 * self.modified_fields = set() * * def _iter(self, start=0, stop=0, step=1, coords=None, chunkmap=None): # <<<<<<<<<<<<<< * """Return an iterator for traversiong the data in table.""" * self._init_loop(start, stop, step, coords, chunkmap) */ values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stop); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__step); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coords); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__chunkmap); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_iter") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_start = values[0]; __pyx_v_stop = values[1]; __pyx_v_step = values[2]; __pyx_v_coords = values[3]; __pyx_v_chunkmap = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_iter", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Row._iter", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_14tableextension_3Row_2_iter(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self), __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_coords, __pyx_v_chunkmap); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6tables_14tableextension_3Row_2_iter(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_step, PyObject *__pyx_v_coords, PyObject *__pyx_v_chunkmap) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations hsize_t __pyx_t_1; PY_LONG_LONG __pyx_t_2; PY_LONG_LONG __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_iter", 0); /* "tables/tableextension.pyx":786 * def _iter(self, start=0, stop=0, step=1, coords=None, chunkmap=None): * """Return an iterator for traversiong the data in table.""" * self._init_loop(start, stop, step, coords, chunkmap) # <<<<<<<<<<<<<< * return iter(self) * */ __pyx_t_1 = __Pyx_PyInt_from_py_hsize_t(__pyx_v_start); if (unlikely((__pyx_t_1 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyInt_AsLongLong(__pyx_v_stop); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyInt_AsLongLong(__pyx_v_step); if (unlikely((__pyx_t_3 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_init_loop(__pyx_v_self, __pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_v_coords, __pyx_v_chunkmap); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":787 * """Return an iterator for traversiong the data in table.""" * self._init_loop(start, stop, step, coords, chunkmap) * return iter(self) # <<<<<<<<<<<<<< * * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.tableextension.Row._iter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_5__iter__(PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_4__iter__[] = "Iterator that traverses all the data in the Table"; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6tables_14tableextension_3Row_4__iter__; #endif static PyObject *__pyx_pw_6tables_14tableextension_3Row_5__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_4__iter__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":789 * return iter(self) * * def __iter__(self): # <<<<<<<<<<<<<< * """Iterator that traverses all the data in the Table""" * return self */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_4__iter__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); /* "tables/tableextension.pyx":791 * def __iter__(self): * """Iterator that traverses all the data in the Table""" * return self # <<<<<<<<<<<<<< * * cdef _new_buffer(self, table): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":793 * return self * * cdef _new_buffer(self, table): # <<<<<<<<<<<<<< * """Create the recarrays for I/O buffering""" * */ static PyObject *__pyx_f_6tables_14tableextension_3Row__new_buffer(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_table) { PyObject *__pyx_v_wdflts = NULL; PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_buff = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; hsize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_new_buffer", 0); /* "tables/tableextension.pyx":796 * """Create the recarrays for I/O buffering""" * * wdflts = table._v_wdflts # <<<<<<<<<<<<<< * if wdflts is None: * self.wrec = numpy.zeros(1, dtype=self.dtype) # Defaults are zero */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___v_wdflts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_wdflts = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":797 * * wdflts = table._v_wdflts * if wdflts is None: # <<<<<<<<<<<<<< * self.wrec = numpy.zeros(1, dtype=self.dtype) # Defaults are zero * else: */ __pyx_t_2 = (__pyx_v_wdflts == Py_None); if (__pyx_t_2) { /* "tables/tableextension.pyx":798 * wdflts = table._v_wdflts * if wdflts is None: * self.wrec = numpy.zeros(1, dtype=self.dtype) # Defaults are zero # <<<<<<<<<<<<<< * else: * self.wrec = table._v_wdflts.copy() */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_v_self->dtype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_37), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->wrec); __Pyx_DECREF(__pyx_v_self->wrec); __pyx_v_self->wrec = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { /* "tables/tableextension.pyx":800 * self.wrec = numpy.zeros(1, dtype=self.dtype) # Defaults are zero * else: * self.wrec = table._v_wdflts.copy() # <<<<<<<<<<<<<< * self.wreccpy = self.wrec.copy() # A copy of the defaults * # Build the wfields dictionary for faster access to columns */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___v_wdflts); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->wrec); __Pyx_DECREF(__pyx_v_self->wrec); __pyx_v_self->wrec = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "tables/tableextension.pyx":801 * else: * self.wrec = table._v_wdflts.copy() * self.wreccpy = self.wrec.copy() # A copy of the defaults # <<<<<<<<<<<<<< * # Build the wfields dictionary for faster access to columns * self.wfields = {} */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->wrec, __pyx_n_s__copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->wreccpy); __Pyx_DECREF(__pyx_v_self->wreccpy); __pyx_v_self->wreccpy = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":803 * self.wreccpy = self.wrec.copy() # A copy of the defaults * # Build the wfields dictionary for faster access to columns * self.wfields = {} # <<<<<<<<<<<<<< * for name in self.dtype.names: * self.wfields[name] = self.wrec[name] */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_GOTREF(__pyx_v_self->wfields); __Pyx_DECREF(__pyx_v_self->wfields); __pyx_v_self->wfields = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":804 * # Build the wfields dictionary for faster access to columns * self.wfields = {} * for name in self.dtype.names: # <<<<<<<<<<<<<< * self.wfields[name] = self.wrec[name] * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->dtype, __pyx_n_s__names); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_1)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF(__pyx_v_name); __pyx_v_name = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":805 * self.wfields = {} * for name in self.dtype.names: * self.wfields[name] = self.wrec[name] # <<<<<<<<<<<<<< * * # Get the read buffer for this instance (it is private, remember!) */ __pyx_t_1 = PyObject_GetItem(__pyx_v_self->wrec, __pyx_v_name); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(__pyx_v_self->wfields, __pyx_v_name, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":808 * * # Get the read buffer for this instance (it is private, remember!) * buff = self.iobuf = table._get_container(self.nrowsinbuf) # <<<<<<<<<<<<<< * # Build the rfields dictionary for faster access to columns * # This is quite fast, as it only takes around 5 us per column */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___get_container); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_self->nrowsinbuf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_1); __pyx_v_buff = __pyx_t_1; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->iobuf); __Pyx_DECREF(__pyx_v_self->iobuf); __pyx_v_self->iobuf = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":813 * # in my laptop (Pentium 4 @ 2 GHz). * # F. Alted 2006-08-18 * self.rfields = {} # <<<<<<<<<<<<<< * for i, name in enumerate(self.dtype.names): * self.rfields[i] = buff[name] */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_GOTREF(__pyx_v_self->rfields); __Pyx_DECREF(__pyx_v_self->rfields); __pyx_v_self->rfields = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":814 * # F. Alted 2006-08-18 * self.rfields = {} * for i, name in enumerate(self.dtype.names): # <<<<<<<<<<<<<< * self.rfields[i] = buff[name] * self.rfields[name] = buff[name] */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->dtype, __pyx_n_s__names); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_3 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_3)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF(__pyx_v_name); __pyx_v_name = __pyx_t_3; __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF(__pyx_v_i); __pyx_v_i = __pyx_t_1; __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; /* "tables/tableextension.pyx":815 * self.rfields = {} * for i, name in enumerate(self.dtype.names): * self.rfields[i] = buff[name] # <<<<<<<<<<<<<< * self.rfields[name] = buff[name] * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_buff, __pyx_v_name); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_v_self->rfields, __pyx_v_i, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "tables/tableextension.pyx":816 * for i, name in enumerate(self.dtype.names): * self.rfields[i] = buff[name] * self.rfields[name] = buff[name] # <<<<<<<<<<<<<< * * # Get the stride of these buffers */ __pyx_t_3 = PyObject_GetItem(__pyx_v_buff, __pyx_v_name); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetItem(__pyx_v_self->rfields, __pyx_v_name, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":819 * * # Get the stride of these buffers * self._stride = buff.strides[0] # <<<<<<<<<<<<<< * # The rowsize * self._rowsize = self.dtype.itemsize */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_buff, __pyx_n_s__strides); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->_stride = __pyx_t_7; /* "tables/tableextension.pyx":821 * self._stride = buff.strides[0] * # The rowsize * self._rowsize = self.dtype.itemsize # <<<<<<<<<<<<<< * self.nrows = table.nrows # This value may change * */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->dtype, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->_rowsize = __pyx_t_7; /* "tables/tableextension.pyx":822 * # The rowsize * self._rowsize = self.dtype.itemsize * self.nrows = table.nrows # This value may change # <<<<<<<<<<<<<< * * cdef _init_loop(self, hsize_t start, long long stop, long long step, */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s__nrows); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->nrows = __pyx_t_8; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.tableextension.Row._new_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_wdflts); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_buff); __Pyx_XDECREF(__pyx_v_i); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":824 * self.nrows = table.nrows # This value may change * * cdef _init_loop(self, hsize_t start, long long stop, long long step, # <<<<<<<<<<<<<< * object coords, object chunkmap): * """Initialization for the __iter__ iterator""" */ static PyObject *__pyx_f_6tables_14tableextension_3Row__init_loop(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, hsize_t __pyx_v_start, PY_LONG_LONG __pyx_v_stop, PY_LONG_LONG __pyx_v_step, PyObject *__pyx_v_coords, PyObject *__pyx_v_chunkmap) { PyObject *__pyx_v_table = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; hsize_t __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PY_LONG_LONG __pyx_t_7; PY_LONG_LONG __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); int __pyx_t_13; int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_loop", 0); /* "tables/tableextension.pyx":827 * object coords, object chunkmap): * """Initialization for the __iter__ iterator""" * table = self.table # <<<<<<<<<<<<<< * self._riterator = 1 # We are inside a read iterator * self.start = start */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_table = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":828 * """Initialization for the __iter__ iterator""" * table = self.table * self._riterator = 1 # We are inside a read iterator # <<<<<<<<<<<<<< * self.start = start * self.stop = stop */ __pyx_v_self->_riterator = 1; /* "tables/tableextension.pyx":829 * table = self.table * self._riterator = 1 # We are inside a read iterator * self.start = start # <<<<<<<<<<<<<< * self.stop = stop * self.step = step */ __pyx_v_self->start = __pyx_v_start; /* "tables/tableextension.pyx":830 * self._riterator = 1 # We are inside a read iterator * self.start = start * self.stop = stop # <<<<<<<<<<<<<< * self.step = step * self.coords = coords */ __pyx_v_self->stop = __pyx_v_stop; /* "tables/tableextension.pyx":831 * self.start = start * self.stop = stop * self.step = step # <<<<<<<<<<<<<< * self.coords = coords * self.startb = 0 */ __pyx_v_self->step = __pyx_v_step; /* "tables/tableextension.pyx":832 * self.stop = stop * self.step = step * self.coords = coords # <<<<<<<<<<<<<< * self.startb = 0 * if step > 0: */ __Pyx_INCREF(__pyx_v_coords); __Pyx_GIVEREF(__pyx_v_coords); __Pyx_GOTREF(__pyx_v_self->coords); __Pyx_DECREF(__pyx_v_self->coords); __pyx_v_self->coords = __pyx_v_coords; /* "tables/tableextension.pyx":833 * self.step = step * self.coords = coords * self.startb = 0 # <<<<<<<<<<<<<< * if step > 0: * self._row = -1 # a sentinel */ __pyx_v_self->startb = 0; /* "tables/tableextension.pyx":834 * self.coords = coords * self.startb = 0 * if step > 0: # <<<<<<<<<<<<<< * self._row = -1 # a sentinel * self.nrowsread = start */ __pyx_t_2 = (__pyx_v_step > 0); if (__pyx_t_2) { /* "tables/tableextension.pyx":835 * self.startb = 0 * if step > 0: * self._row = -1 # a sentinel # <<<<<<<<<<<<<< * self.nrowsread = start * elif step < 0: */ __pyx_v_self->_row = -1; /* "tables/tableextension.pyx":836 * if step > 0: * self._row = -1 # a sentinel * self.nrowsread = start # <<<<<<<<<<<<<< * elif step < 0: * self._row = 0 */ __pyx_v_self->nrowsread = __pyx_v_start; goto __pyx_L3; } /* "tables/tableextension.pyx":837 * self._row = -1 # a sentinel * self.nrowsread = start * elif step < 0: # <<<<<<<<<<<<<< * self._row = 0 * self.nrowsread = 0 */ __pyx_t_2 = (__pyx_v_step < 0); if (__pyx_t_2) { /* "tables/tableextension.pyx":838 * self.nrowsread = start * elif step < 0: * self._row = 0 # <<<<<<<<<<<<<< * self.nrowsread = 0 * self.nextelement = start */ __pyx_v_self->_row = 0; /* "tables/tableextension.pyx":839 * elif step < 0: * self._row = 0 * self.nrowsread = 0 # <<<<<<<<<<<<<< * self.nextelement = start * self._nrow = start - self.step */ __pyx_v_self->nrowsread = 0; /* "tables/tableextension.pyx":840 * self._row = 0 * self.nrowsread = 0 * self.nextelement = start # <<<<<<<<<<<<<< * self._nrow = start - self.step * self.wherecond = 0 */ __pyx_v_self->nextelement = __pyx_v_start; goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":841 * self.nrowsread = 0 * self.nextelement = start * self._nrow = start - self.step # <<<<<<<<<<<<<< * self.wherecond = 0 * self.indexed = 0 */ __pyx_v_self->_nrow = (__pyx_v_start - __pyx_v_self->step); /* "tables/tableextension.pyx":842 * self.nextelement = start * self._nrow = start - self.step * self.wherecond = 0 # <<<<<<<<<<<<<< * self.indexed = 0 * */ __pyx_v_self->wherecond = 0; /* "tables/tableextension.pyx":843 * self._nrow = start - self.step * self.wherecond = 0 * self.indexed = 0 # <<<<<<<<<<<<<< * * self.nrows = table.nrows # Update the row counter */ __pyx_v_self->indexed = 0; /* "tables/tableextension.pyx":845 * self.indexed = 0 * * self.nrows = table.nrows # Update the row counter # <<<<<<<<<<<<<< * * if coords is not None and 0 < step: */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s__nrows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->nrows = __pyx_t_3; /* "tables/tableextension.pyx":847 * self.nrows = table.nrows # Update the row counter * * if coords is not None and 0 < step: # <<<<<<<<<<<<<< * self.nrowsread = start * self.nextelement = start */ __pyx_t_2 = (__pyx_v_coords != Py_None); if (__pyx_t_2) { __pyx_t_4 = (0 < __pyx_v_step); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_2; } if (__pyx_t_5) { /* "tables/tableextension.pyx":848 * * if coords is not None and 0 < step: * self.nrowsread = start # <<<<<<<<<<<<<< * self.nextelement = start * self.stop = min(stop, len(coords)) */ __pyx_v_self->nrowsread = __pyx_v_start; /* "tables/tableextension.pyx":849 * if coords is not None and 0 < step: * self.nrowsread = start * self.nextelement = start # <<<<<<<<<<<<<< * self.stop = min(stop, len(coords)) * self.absstep = abs(step) */ __pyx_v_self->nextelement = __pyx_v_start; /* "tables/tableextension.pyx":850 * self.nrowsread = start * self.nextelement = start * self.stop = min(stop, len(coords)) # <<<<<<<<<<<<<< * self.absstep = abs(step) * return */ __pyx_t_6 = PyObject_Length(__pyx_v_coords); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __pyx_v_stop; if ((__pyx_t_6 < __pyx_t_7)) { __pyx_t_8 = __pyx_t_6; } else { __pyx_t_8 = __pyx_t_7; } __pyx_v_self->stop = __pyx_t_8; /* "tables/tableextension.pyx":851 * self.nextelement = start * self.stop = min(stop, len(coords)) * self.absstep = abs(step) # <<<<<<<<<<<<<< * return * elif coords is not None and 0 > step: */ __pyx_t_1 = PyLong_FromLongLong(__pyx_v_step); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_9); if (unlikely((__pyx_t_3 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_self->absstep = __pyx_t_3; /* "tables/tableextension.pyx":852 * self.stop = min(stop, len(coords)) * self.absstep = abs(step) * return # <<<<<<<<<<<<<< * elif coords is not None and 0 > step: * #self.nrowsread = 0 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L4; } /* "tables/tableextension.pyx":853 * self.absstep = abs(step) * return * elif coords is not None and 0 > step: # <<<<<<<<<<<<<< * #self.nrowsread = 0 * #self.nextelement = start */ __pyx_t_5 = (__pyx_v_coords != Py_None); if (__pyx_t_5) { __pyx_t_2 = (0 > __pyx_v_step); __pyx_t_4 = __pyx_t_2; } else { __pyx_t_4 = __pyx_t_5; } if (__pyx_t_4) { /* "tables/tableextension.pyx":858 * #self.stop = min(stop, len(coords)) * #self.stop = max(stop, start - len(coords)) * self.absstep = abs(step) # <<<<<<<<<<<<<< * return * */ __pyx_t_9 = PyLong_FromLongLong(__pyx_v_step); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyNumber_Absolute(__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->absstep = __pyx_t_3; /* "tables/tableextension.pyx":859 * #self.stop = max(stop, start - len(coords)) * self.absstep = abs(step) * return # <<<<<<<<<<<<<< * * if table._where_condition: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "tables/tableextension.pyx":861 * return * * if table._where_condition: # <<<<<<<<<<<<<< * self.wherecond = 1 * self.condfunc, self.condargs = table._where_condition */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___where_condition); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "tables/tableextension.pyx":862 * * if table._where_condition: * self.wherecond = 1 # <<<<<<<<<<<<<< * self.condfunc, self.condargs = table._where_condition * table._where_condition = None */ __pyx_v_self->wherecond = 1; /* "tables/tableextension.pyx":863 * if table._where_condition: * self.wherecond = 1 * self.condfunc, self.condargs = table._where_condition # <<<<<<<<<<<<<< * table._where_condition = None * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___where_condition); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_9); __Pyx_GOTREF(__pyx_v_self->condfunc); __Pyx_DECREF(__pyx_v_self->condfunc); __pyx_v_self->condfunc = __pyx_t_9; __pyx_t_9 = 0; __Pyx_GIVEREF(__pyx_t_10); __Pyx_GOTREF(__pyx_v_self->condargs); __Pyx_DECREF(__pyx_v_self->condargs); __pyx_v_self->condargs = __pyx_t_10; __pyx_t_10 = 0; /* "tables/tableextension.pyx":864 * self.wherecond = 1 * self.condfunc, self.condargs = table._where_condition * table._where_condition = None # <<<<<<<<<<<<<< * * if table._use_index: */ if (PyObject_SetAttr(__pyx_v_table, __pyx_n_s___where_condition, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "tables/tableextension.pyx":866 * table._where_condition = None * * if table._use_index: # <<<<<<<<<<<<<< * self.indexed = 1 * # Compute totalchunks here because self.nrows can change during the */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___use_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "tables/tableextension.pyx":867 * * if table._use_index: * self.indexed = 1 # <<<<<<<<<<<<<< * # Compute totalchunks here because self.nrows can change during the * # life of a Row instance. */ __pyx_v_self->indexed = 1; /* "tables/tableextension.pyx":870 * # Compute totalchunks here because self.nrows can change during the * # life of a Row instance. * self.totalchunks = self.nrows / self.chunksize # <<<<<<<<<<<<<< * if self.nrows % self.chunksize: * self.totalchunks = self.totalchunks + 1 */ if (unlikely(__pyx_v_self->chunksize == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(hsize_t) == sizeof(long) && unlikely(__pyx_v_self->chunksize == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->nrows))) { PyErr_Format(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->totalchunks = __Pyx_div_hsize_t(__pyx_v_self->nrows, __pyx_v_self->chunksize); /* "tables/tableextension.pyx":871 * # life of a Row instance. * self.totalchunks = self.nrows / self.chunksize * if self.nrows % self.chunksize: # <<<<<<<<<<<<<< * self.totalchunks = self.totalchunks + 1 * self.nrowsread = 0 */ if (unlikely(__pyx_v_self->chunksize == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = __Pyx_mod_hsize_t(__pyx_v_self->nrows, __pyx_v_self->chunksize); if (__pyx_t_3) { /* "tables/tableextension.pyx":872 * self.totalchunks = self.nrows / self.chunksize * if self.nrows % self.chunksize: * self.totalchunks = self.totalchunks + 1 # <<<<<<<<<<<<<< * self.nrowsread = 0 * self.nextelement = 0 */ __pyx_v_self->totalchunks = (__pyx_v_self->totalchunks + 1); goto __pyx_L9; } __pyx_L9:; /* "tables/tableextension.pyx":873 * if self.nrows % self.chunksize: * self.totalchunks = self.totalchunks + 1 * self.nrowsread = 0 # <<<<<<<<<<<<<< * self.nextelement = 0 * self.chunkmap = chunkmap */ __pyx_v_self->nrowsread = 0; /* "tables/tableextension.pyx":874 * self.totalchunks = self.totalchunks + 1 * self.nrowsread = 0 * self.nextelement = 0 # <<<<<<<<<<<<<< * self.chunkmap = chunkmap * self.chunkmap_data = self.chunkmap.data */ __pyx_v_self->nextelement = 0; /* "tables/tableextension.pyx":875 * self.nrowsread = 0 * self.nextelement = 0 * self.chunkmap = chunkmap # <<<<<<<<<<<<<< * self.chunkmap_data = self.chunkmap.data * table._use_index = False */ if (!(likely(((__pyx_v_chunkmap) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_chunkmap, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_chunkmap); __Pyx_GIVEREF(__pyx_v_chunkmap); __Pyx_GOTREF(__pyx_v_self->chunkmap); __Pyx_DECREF(((PyObject *)__pyx_v_self->chunkmap)); __pyx_v_self->chunkmap = ((PyArrayObject *)__pyx_v_chunkmap); /* "tables/tableextension.pyx":876 * self.nextelement = 0 * self.chunkmap = chunkmap * self.chunkmap_data = self.chunkmap.data # <<<<<<<<<<<<<< * table._use_index = False * self.lenbuf = self.nrowsinbuf */ __pyx_v_self->chunkmap_data = ((char *)__pyx_v_self->chunkmap->data); /* "tables/tableextension.pyx":877 * self.chunkmap = chunkmap * self.chunkmap_data = self.chunkmap.data * table._use_index = False # <<<<<<<<<<<<<< * self.lenbuf = self.nrowsinbuf * # Check if we have limitations on start, stop, step */ __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_v_table, __pyx_n_s___use_index, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":878 * self.chunkmap_data = self.chunkmap.data * table._use_index = False * self.lenbuf = self.nrowsinbuf # <<<<<<<<<<<<<< * # Check if we have limitations on start, stop, step * self.sss_on = (self.start > 0 or self.stop < self.nrows or self.step > 1) */ __pyx_t_3 = __pyx_v_self->nrowsinbuf; __pyx_v_self->lenbuf = __pyx_t_3; /* "tables/tableextension.pyx":880 * self.lenbuf = self.nrowsinbuf * # Check if we have limitations on start, stop, step * self.sss_on = (self.start > 0 or self.stop < self.nrows or self.step > 1) # <<<<<<<<<<<<<< * self.iterseq_max_elements = table._v_file.params['ITERSEQ_MAX_ELEMENTS'] * self.seq_available = True */ __pyx_t_4 = (__pyx_v_self->start > 0); if (!__pyx_t_4) { __pyx_t_5 = (__pyx_v_self->stop < __pyx_v_self->nrows); if (!__pyx_t_5) { __pyx_t_2 = (__pyx_v_self->step > 1); __pyx_t_13 = __pyx_t_2; } else { __pyx_t_13 = __pyx_t_5; } __pyx_t_5 = __pyx_t_13; } else { __pyx_t_5 = __pyx_t_4; } __pyx_v_self->sss_on = __pyx_t_5; /* "tables/tableextension.pyx":881 * # Check if we have limitations on start, stop, step * self.sss_on = (self.start > 0 or self.stop < self.nrows or self.step > 1) * self.iterseq_max_elements = table._v_file.params['ITERSEQ_MAX_ELEMENTS'] # <<<<<<<<<<<<<< * self.seq_available = True * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___v_file); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__params); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetItem(__pyx_t_10, ((PyObject *)__pyx_n_s_38)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->iterseq_max_elements = __pyx_t_14; /* "tables/tableextension.pyx":882 * self.sss_on = (self.start > 0 or self.stop < self.nrows or self.step > 1) * self.iterseq_max_elements = table._v_file.params['ITERSEQ_MAX_ELEMENTS'] * self.seq_available = True # <<<<<<<<<<<<<< * * def __next__(self): */ __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->seq_available); __Pyx_DECREF(__pyx_v_self->seq_available); __pyx_v_self->seq_available = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L8; } __pyx_L8:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("tables.tableextension.Row._init_loop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_table); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_7__next__(PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_6__next__[] = "next() method for __iter__() that is called on each iteration"; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6tables_14tableextension_3Row_6__next__; #endif static PyObject *__pyx_pw_6tables_14tableextension_3Row_7__next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__next__ (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_6__next__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":884 * self.seq_available = True * * def __next__(self): # <<<<<<<<<<<<<< * """next() method for __iter__() that is called on each iteration""" * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_6__next__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); /* "tables/tableextension.pyx":887 * """next() method for __iter__() that is called on each iteration""" * * if not self._riterator: # <<<<<<<<<<<<<< * # The iterator is already exhausted! * raise StopIteration */ __pyx_t_1 = (!__pyx_v_self->_riterator); if (__pyx_t_1) { /* "tables/tableextension.pyx":889 * if not self._riterator: * # The iterator is already exhausted! * raise StopIteration # <<<<<<<<<<<<<< * if self.indexed: * return self.__next__indexed() */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":890 * # The iterator is already exhausted! * raise StopIteration * if self.indexed: # <<<<<<<<<<<<<< * return self.__next__indexed() * elif self.coords is not None: */ if (__pyx_v_self->indexed) { /* "tables/tableextension.pyx":891 * raise StopIteration * if self.indexed: * return self.__next__indexed() # <<<<<<<<<<<<<< * elif self.coords is not None: * return self.__next__coords() */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->__pyx___next__indexed(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L4; } /* "tables/tableextension.pyx":892 * if self.indexed: * return self.__next__indexed() * elif self.coords is not None: # <<<<<<<<<<<<<< * return self.__next__coords() * elif self.wherecond: */ __pyx_t_1 = (__pyx_v_self->coords != Py_None); if (__pyx_t_1) { /* "tables/tableextension.pyx":893 * return self.__next__indexed() * elif self.coords is not None: * return self.__next__coords() # <<<<<<<<<<<<<< * elif self.wherecond: * return self.__next__inkernel() */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->__pyx___next__coords(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L4; } /* "tables/tableextension.pyx":894 * elif self.coords is not None: * return self.__next__coords() * elif self.wherecond: # <<<<<<<<<<<<<< * return self.__next__inkernel() * else: */ if (__pyx_v_self->wherecond) { /* "tables/tableextension.pyx":895 * return self.__next__coords() * elif self.wherecond: * return self.__next__inkernel() # <<<<<<<<<<<<<< * else: * return self.__next__general() */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->__pyx___next__inkernel(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; goto __pyx_L4; } /*else*/ { /* "tables/tableextension.pyx":897 * return self.__next__inkernel() * else: * return self.__next__general() # <<<<<<<<<<<<<< * * cdef __next__indexed(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->__pyx___next__general(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("tables.tableextension.Row.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":899 * return self.__next__general() * * cdef __next__indexed(self): # <<<<<<<<<<<<<< * """The version of next() for indexed columns and a chunkmap.""" * */ static PyObject *__pyx_f_6tables_14tableextension_3Row___next__indexed(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { long __pyx_v_recout; long __pyx_v_j; long __pyx_v_cs; hsize_t __pyx_v_nchunksread; PyObject *__pyx_v_tmp_range = 0; struct __pyx_obj_6tables_14tableextension_Table *__pyx_v_table = 0; PyArrayObject *__pyx_v_iobuf = 0; long __pyx_v_nslot; PyObject *__pyx_v_seq = 0; struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *__pyx_v_seqcache = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; hsize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PY_LONG_LONG __pyx_t_7; Py_ssize_t __pyx_t_8; long __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__indexed", 0); /* "tables/tableextension.pyx":912 * cdef ObjectCache seqcache * * assert self.nrowsinbuf >= self.chunksize # <<<<<<<<<<<<<< * while self.nextelement < self.stop: * if self.nextelement >= self.nrowsread: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_self->nrowsinbuf >= __pyx_v_self->chunksize))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "tables/tableextension.pyx":913 * * assert self.nrowsinbuf >= self.chunksize * while self.nextelement < self.stop: # <<<<<<<<<<<<<< * if self.nextelement >= self.nrowsread: * # Skip until there is interesting information */ while (1) { __pyx_t_1 = (__pyx_v_self->nextelement < __pyx_v_self->stop); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":914 * assert self.nrowsinbuf >= self.chunksize * while self.nextelement < self.stop: * if self.nextelement >= self.nrowsread: # <<<<<<<<<<<<<< * # Skip until there is interesting information * while self.start > self.nrowsread + self.nrowsinbuf: */ __pyx_t_1 = (__pyx_v_self->nextelement >= __pyx_v_self->nrowsread); if (__pyx_t_1) { /* "tables/tableextension.pyx":916 * if self.nextelement >= self.nrowsread: * # Skip until there is interesting information * while self.start > self.nrowsread + self.nrowsinbuf: # <<<<<<<<<<<<<< * self.nrowsread = self.nrowsread + self.nrowsinbuf * self.nextelement = self.nextelement + self.nrowsinbuf */ while (1) { __pyx_t_1 = (__pyx_v_self->start > (__pyx_v_self->nrowsread + __pyx_v_self->nrowsinbuf)); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":917 * # Skip until there is interesting information * while self.start > self.nrowsread + self.nrowsinbuf: * self.nrowsread = self.nrowsread + self.nrowsinbuf # <<<<<<<<<<<<<< * self.nextelement = self.nextelement + self.nrowsinbuf * */ __pyx_v_self->nrowsread = (__pyx_v_self->nrowsread + __pyx_v_self->nrowsinbuf); /* "tables/tableextension.pyx":918 * while self.start > self.nrowsread + self.nrowsinbuf: * self.nrowsread = self.nrowsread + self.nrowsinbuf * self.nextelement = self.nextelement + self.nrowsinbuf # <<<<<<<<<<<<<< * * table = self.table */ __pyx_v_self->nextelement = (__pyx_v_self->nextelement + __pyx_v_self->nrowsinbuf); } /* "tables/tableextension.pyx":920 * self.nextelement = self.nextelement + self.nrowsinbuf * * table = self.table # <<<<<<<<<<<<<< * iobuf = self.iobuf * j = 0; recout = 0; cs = self.chunksize */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6tables_14tableextension_Table))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_table)); __pyx_v_table = ((struct __pyx_obj_6tables_14tableextension_Table *)__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":921 * * table = self.table * iobuf = self.iobuf # <<<<<<<<<<<<<< * j = 0; recout = 0; cs = self.chunksize * nchunksread = self.nrowsread / cs */ if (!(likely(((__pyx_v_self->iobuf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->iobuf, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_self->iobuf); __Pyx_XDECREF(((PyObject *)__pyx_v_iobuf)); __pyx_v_iobuf = ((PyArrayObject *)__pyx_v_self->iobuf); /* "tables/tableextension.pyx":922 * table = self.table * iobuf = self.iobuf * j = 0; recout = 0; cs = self.chunksize # <<<<<<<<<<<<<< * nchunksread = self.nrowsread / cs * tmp_range = numpy.arange(0, cs, dtype='int64') */ __pyx_v_j = 0; __pyx_v_recout = 0; __pyx_t_3 = __pyx_v_self->chunksize; __pyx_v_cs = __pyx_t_3; /* "tables/tableextension.pyx":923 * iobuf = self.iobuf * j = 0; recout = 0; cs = self.chunksize * nchunksread = self.nrowsread / cs # <<<<<<<<<<<<<< * tmp_range = numpy.arange(0, cs, dtype='int64') * self.bufcoords = numpy.empty(self.nrowsinbuf, dtype='int64') */ if (unlikely(__pyx_v_cs == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(hsize_t) == sizeof(long) && unlikely(__pyx_v_cs == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->nrowsread))) { PyErr_Format(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nchunksread = __Pyx_div_hsize_t(__pyx_v_self->nrowsread, __pyx_v_cs); /* "tables/tableextension.pyx":924 * j = 0; recout = 0; cs = self.chunksize * nchunksread = self.nrowsread / cs * tmp_range = numpy.arange(0, cs, dtype='int64') # <<<<<<<<<<<<<< * self.bufcoords = numpy.empty(self.nrowsinbuf, dtype='int64') * # Fetch valid chunks until the I/O buffer is full */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__arange); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_cs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_v_tmp_range); __pyx_v_tmp_range = __pyx_t_6; __pyx_t_6 = 0; /* "tables/tableextension.pyx":925 * nchunksread = self.nrowsread / cs * tmp_range = numpy.arange(0, cs, dtype='int64') * self.bufcoords = numpy.empty(self.nrowsinbuf, dtype='int64') # <<<<<<<<<<<<<< * # Fetch valid chunks until the I/O buffer is full * while nchunksread < self.totalchunks: */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_self->nrowsinbuf); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->bufcoords); __Pyx_DECREF(((PyObject *)__pyx_v_self->bufcoords)); __pyx_v_self->bufcoords = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":927 * self.bufcoords = numpy.empty(self.nrowsinbuf, dtype='int64') * # Fetch valid chunks until the I/O buffer is full * while nchunksread < self.totalchunks: # <<<<<<<<<<<<<< * if self.chunkmap_data[nchunksread]: * self.bufcoords[j*cs:(j+1)*cs] = tmp_range + self.nrowsread */ while (1) { __pyx_t_1 = (__pyx_v_nchunksread < __pyx_v_self->totalchunks); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":928 * # Fetch valid chunks until the I/O buffer is full * while nchunksread < self.totalchunks: * if self.chunkmap_data[nchunksread]: # <<<<<<<<<<<<<< * self.bufcoords[j*cs:(j+1)*cs] = tmp_range + self.nrowsread * # Not optimized read */ if ((__pyx_v_self->chunkmap_data[__pyx_v_nchunksread])) { /* "tables/tableextension.pyx":929 * while nchunksread < self.totalchunks: * if self.chunkmap_data[nchunksread]: * self.bufcoords[j*cs:(j+1)*cs] = tmp_range + self.nrowsread # <<<<<<<<<<<<<< * # Not optimized read * # recout = recout + table._read_records( */ __pyx_t_4 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_self->nrowsread); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyNumber_Add(__pyx_v_tmp_range, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_self->bufcoords), (__pyx_v_j * __pyx_v_cs), ((__pyx_v_j + 1) * __pyx_v_cs), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/tableextension.pyx":938 * # cache, but using the PyTables one has the advantage that the * # user can easily change this parameter. * recout = recout + table._read_chunk(nchunksread, iobuf, j*cs) # <<<<<<<<<<<<<< * j = j + 1 * self.nrowsread = (nchunksread+1)*cs */ __pyx_v_recout = (__pyx_v_recout + ((struct __pyx_vtabstruct_6tables_14tableextension_Table *)__pyx_v_table->__pyx_base.__pyx_vtab)->_read_chunk(__pyx_v_table, __pyx_v_nchunksread, __pyx_v_iobuf, (__pyx_v_j * __pyx_v_cs))); /* "tables/tableextension.pyx":939 * # user can easily change this parameter. * recout = recout + table._read_chunk(nchunksread, iobuf, j*cs) * j = j + 1 # <<<<<<<<<<<<<< * self.nrowsread = (nchunksread+1)*cs * if self.nrowsread > self.stop: */ __pyx_v_j = (__pyx_v_j + 1); goto __pyx_L10; } __pyx_L10:; /* "tables/tableextension.pyx":940 * recout = recout + table._read_chunk(nchunksread, iobuf, j*cs) * j = j + 1 * self.nrowsread = (nchunksread+1)*cs # <<<<<<<<<<<<<< * if self.nrowsread > self.stop: * self.nrowsread = self.stop */ __pyx_v_self->nrowsread = ((__pyx_v_nchunksread + 1) * __pyx_v_cs); /* "tables/tableextension.pyx":941 * j = j + 1 * self.nrowsread = (nchunksread+1)*cs * if self.nrowsread > self.stop: # <<<<<<<<<<<<<< * self.nrowsread = self.stop * break */ __pyx_t_1 = (__pyx_v_self->nrowsread > __pyx_v_self->stop); if (__pyx_t_1) { /* "tables/tableextension.pyx":942 * self.nrowsread = (nchunksread+1)*cs * if self.nrowsread > self.stop: * self.nrowsread = self.stop # <<<<<<<<<<<<<< * break * elif j == self.nchunksinbuf: */ __pyx_t_7 = __pyx_v_self->stop; __pyx_v_self->nrowsread = __pyx_t_7; /* "tables/tableextension.pyx":943 * if self.nrowsread > self.stop: * self.nrowsread = self.stop * break # <<<<<<<<<<<<<< * elif j == self.nchunksinbuf: * break */ goto __pyx_L9_break; goto __pyx_L11; } /* "tables/tableextension.pyx":944 * self.nrowsread = self.stop * break * elif j == self.nchunksinbuf: # <<<<<<<<<<<<<< * break * nchunksread = nchunksread + 1 */ __pyx_t_1 = (__pyx_v_j == __pyx_v_self->nchunksinbuf); if (__pyx_t_1) { /* "tables/tableextension.pyx":945 * break * elif j == self.nchunksinbuf: * break # <<<<<<<<<<<<<< * nchunksread = nchunksread + 1 * */ goto __pyx_L9_break; goto __pyx_L11; } __pyx_L11:; /* "tables/tableextension.pyx":946 * elif j == self.nchunksinbuf: * break * nchunksread = nchunksread + 1 # <<<<<<<<<<<<<< * * # Evaluate the condition on this table fragment. */ __pyx_v_nchunksread = (__pyx_v_nchunksread + 1); } __pyx_L9_break:; /* "tables/tableextension.pyx":949 * * # Evaluate the condition on this table fragment. * iobuf = iobuf[:recout] # <<<<<<<<<<<<<< * * self.table._convert_types(iobuf, len(iobuf), 1) */ __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_iobuf), 0, __pyx_v_recout); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_v_iobuf)); __pyx_v_iobuf = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "tables/tableextension.pyx":951 * iobuf = iobuf[:recout] * * self.table._convert_types(iobuf, len(iobuf), 1) # <<<<<<<<<<<<<< * self.indexvalid = call_on_recarr( * self.condfunc, self.condargs, iobuf) */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s___convert_types); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_iobuf)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_iobuf)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_iobuf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_iobuf)); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/tableextension.pyx":952 * * self.table._convert_types(iobuf, len(iobuf), 1) * self.indexvalid = call_on_recarr( # <<<<<<<<<<<<<< * self.condfunc, self.condargs, iobuf) * self.index_valid_data = self.indexvalid.data */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__call_on_recarr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "tables/tableextension.pyx":953 * self.table._convert_types(iobuf, len(iobuf), 1) * self.indexvalid = call_on_recarr( * self.condfunc, self.condargs, iobuf) # <<<<<<<<<<<<<< * self.index_valid_data = self.indexvalid.data * # Get the valid coordinates */ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->condfunc); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->condfunc); __Pyx_GIVEREF(__pyx_v_self->condfunc); __Pyx_INCREF(__pyx_v_self->condargs); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->condargs); __Pyx_GIVEREF(__pyx_v_self->condargs); __Pyx_INCREF(((PyObject *)__pyx_v_iobuf)); PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_iobuf)); __Pyx_GIVEREF(((PyObject *)__pyx_v_iobuf)); __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":952 * * self.table._convert_types(iobuf, len(iobuf), 1) * self.indexvalid = call_on_recarr( # <<<<<<<<<<<<<< * self.condfunc, self.condargs, iobuf) * self.index_valid_data = self.indexvalid.data */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->indexvalid); __Pyx_DECREF(((PyObject *)__pyx_v_self->indexvalid)); __pyx_v_self->indexvalid = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":954 * self.indexvalid = call_on_recarr( * self.condfunc, self.condargs, iobuf) * self.index_valid_data = self.indexvalid.data # <<<<<<<<<<<<<< * # Get the valid coordinates * self.indexvalues = self.bufcoords[:recout][self.indexvalid] */ __pyx_v_self->index_valid_data = ((char *)__pyx_v_self->indexvalid->data); /* "tables/tableextension.pyx":956 * self.index_valid_data = self.indexvalid.data * # Get the valid coordinates * self.indexvalues = self.bufcoords[:recout][self.indexvalid] # <<<<<<<<<<<<<< * self.index_values_data = self.indexvalues.data * self.lenbuf = self.indexvalues.size */ __pyx_t_4 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_self->bufcoords), 0, __pyx_v_recout); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetItem(__pyx_t_4, ((PyObject *)__pyx_v_self->indexvalid)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->indexvalues); __Pyx_DECREF(((PyObject *)__pyx_v_self->indexvalues)); __pyx_v_self->indexvalues = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "tables/tableextension.pyx":957 * # Get the valid coordinates * self.indexvalues = self.bufcoords[:recout][self.indexvalid] * self.index_values_data = self.indexvalues.data # <<<<<<<<<<<<<< * self.lenbuf = self.indexvalues.size * # Place the valid results at the beginning of the buffer */ __pyx_v_self->index_values_data = ((hsize_t *)__pyx_v_self->indexvalues->data); /* "tables/tableextension.pyx":958 * self.indexvalues = self.bufcoords[:recout][self.indexvalid] * self.index_values_data = self.indexvalues.data * self.lenbuf = self.indexvalues.size # <<<<<<<<<<<<<< * # Place the valid results at the beginning of the buffer * iobuf[:self.lenbuf] = iobuf[self.indexvalid] */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self->indexvalues), __pyx_n_s__size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_5); if (unlikely((__pyx_t_3 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->lenbuf = __pyx_t_3; /* "tables/tableextension.pyx":960 * self.lenbuf = self.indexvalues.size * # Place the valid results at the beginning of the buffer * iobuf[:self.lenbuf] = iobuf[self.indexvalid] # <<<<<<<<<<<<<< * * # Initialize the internal buffer row counter */ __pyx_t_5 = PyObject_GetItem(((PyObject *)__pyx_v_iobuf), ((PyObject *)__pyx_v_self->indexvalid)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_iobuf), 0, __pyx_v_self->lenbuf, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "tables/tableextension.pyx":963 * * # Initialize the internal buffer row counter * self._row = -1 # <<<<<<<<<<<<<< * * # Feed the indexvalues into the seqcache */ __pyx_v_self->_row = -1; /* "tables/tableextension.pyx":966 * * # Feed the indexvalues into the seqcache * seqcache = table._seqcache # <<<<<<<<<<<<<< * nslot = table._nslotseq * # See if we have a buffer available to place results */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_table), __pyx_n_s___seqcache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6tables_17lrucacheextension_ObjectCache))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_seqcache)); __pyx_v_seqcache = ((struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *)__pyx_t_5); __pyx_t_5 = 0; /* "tables/tableextension.pyx":967 * # Feed the indexvalues into the seqcache * seqcache = table._seqcache * nslot = table._nslotseq # <<<<<<<<<<<<<< * # See if we have a buffer available to place results * if nslot >= 0 and self.seq_available: */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_table), __pyx_n_s___nslotseq); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyInt_AsLong(__pyx_t_5); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_nslot = __pyx_t_9; /* "tables/tableextension.pyx":969 * nslot = table._nslotseq * # See if we have a buffer available to place results * if nslot >= 0 and self.seq_available: # <<<<<<<<<<<<<< * seq = seqcache.getitem_(nslot) * if self.lenbuf + len(seq) < self.iterseq_max_elements: */ __pyx_t_1 = (__pyx_v_nslot >= 0); if (__pyx_t_1) { __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->seq_available); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = __pyx_t_10; } else { __pyx_t_11 = __pyx_t_1; } if (__pyx_t_11) { /* "tables/tableextension.pyx":970 * # See if we have a buffer available to place results * if nslot >= 0 and self.seq_available: * seq = seqcache.getitem_(nslot) # <<<<<<<<<<<<<< * if self.lenbuf + len(seq) < self.iterseq_max_elements: * seq.extend(self.indexvalues) */ __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_17lrucacheextension_ObjectCache *)__pyx_v_seqcache->__pyx_base.__pyx_vtab)->getitem_(__pyx_v_seqcache, __pyx_v_nslot); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_v_seq); __pyx_v_seq = __pyx_t_5; __pyx_t_5 = 0; /* "tables/tableextension.pyx":971 * if nslot >= 0 and self.seq_available: * seq = seqcache.getitem_(nslot) * if self.lenbuf + len(seq) < self.iterseq_max_elements: # <<<<<<<<<<<<<< * seq.extend(self.indexvalues) * # Update the size of sequence in cache */ __pyx_t_8 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((__pyx_v_self->lenbuf + __pyx_t_8) < __pyx_v_self->iterseq_max_elements); if (__pyx_t_11) { /* "tables/tableextension.pyx":972 * seq = seqcache.getitem_(nslot) * if self.lenbuf + len(seq) < self.iterseq_max_elements: * seq.extend(self.indexvalues) # <<<<<<<<<<<<<< * # Update the size of sequence in cache * # Each element in indexvalues should take at least 8 bytes */ __pyx_t_5 = PyObject_GetAttr(__pyx_v_seq, __pyx_n_s__extend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self->indexvalues)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->indexvalues)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->indexvalues)); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/tableextension.pyx":975 * # Update the size of sequence in cache * # Each element in indexvalues should take at least 8 bytes * seqcache.rsizes[nslot] = len(seq) * 8 # <<<<<<<<<<<<<< * else: * seqcache.removeslot_(nslot) */ __pyx_t_8 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_seqcache->rsizes[__pyx_v_nslot]) = (__pyx_t_8 * 8); goto __pyx_L13; } /*else*/ { /* "tables/tableextension.pyx":977 * seqcache.rsizes[nslot] = len(seq) * 8 * else: * seqcache.removeslot_(nslot) # <<<<<<<<<<<<<< * self.seq_available = False * */ __pyx_t_6 = ((struct __pyx_vtabstruct_6tables_17lrucacheextension_ObjectCache *)__pyx_v_seqcache->__pyx_base.__pyx_vtab)->removeslot_(__pyx_v_seqcache, __pyx_v_nslot); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/tableextension.pyx":978 * else: * seqcache.removeslot_(nslot) * self.seq_available = False # <<<<<<<<<<<<<< * * self._row = self._row + 1 */ __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->seq_available); __Pyx_DECREF(__pyx_v_self->seq_available); __pyx_v_self->seq_available = __pyx_t_6; __pyx_t_6 = 0; } __pyx_L13:; goto __pyx_L12; } __pyx_L12:; goto __pyx_L5; } __pyx_L5:; /* "tables/tableextension.pyx":980 * self.seq_available = False * * self._row = self._row + 1 # <<<<<<<<<<<<<< * # Check whether we have read all the rows in buf * if self._row == self.lenbuf: */ __pyx_v_self->_row = (__pyx_v_self->_row + 1); /* "tables/tableextension.pyx":982 * self._row = self._row + 1 * # Check whether we have read all the rows in buf * if self._row == self.lenbuf: # <<<<<<<<<<<<<< * self.nextelement = self.nrowsread * # Make _row to point to the last valid entry in buffer */ __pyx_t_11 = (__pyx_v_self->_row == __pyx_v_self->lenbuf); if (__pyx_t_11) { /* "tables/tableextension.pyx":983 * # Check whether we have read all the rows in buf * if self._row == self.lenbuf: * self.nextelement = self.nrowsread # <<<<<<<<<<<<<< * # Make _row to point to the last valid entry in buffer * # (this is useful for accessing the last row after an iterator loop) */ __pyx_t_3 = __pyx_v_self->nrowsread; __pyx_v_self->nextelement = __pyx_t_3; /* "tables/tableextension.pyx":986 * # Make _row to point to the last valid entry in buffer * # (this is useful for accessing the last row after an iterator loop) * self._row = self._row - 1 # <<<<<<<<<<<<<< * continue * self._nrow = self.index_values_data[self._row] */ __pyx_v_self->_row = (__pyx_v_self->_row - 1); /* "tables/tableextension.pyx":987 * # (this is useful for accessing the last row after an iterator loop) * self._row = self._row - 1 * continue # <<<<<<<<<<<<<< * self._nrow = self.index_values_data[self._row] * # Check additional conditions on start, stop, step params */ goto __pyx_L3_continue; goto __pyx_L14; } __pyx_L14:; /* "tables/tableextension.pyx":988 * self._row = self._row - 1 * continue * self._nrow = self.index_values_data[self._row] # <<<<<<<<<<<<<< * # Check additional conditions on start, stop, step params * if self.sss_on: */ __pyx_v_self->_nrow = (__pyx_v_self->index_values_data[__pyx_v_self->_row]); /* "tables/tableextension.pyx":990 * self._nrow = self.index_values_data[self._row] * # Check additional conditions on start, stop, step params * if self.sss_on: # <<<<<<<<<<<<<< * if (self._nrow < self.start or self._nrow >= self.stop): * self.nextelement = self.nextelement + 1 */ if (__pyx_v_self->sss_on) { /* "tables/tableextension.pyx":991 * # Check additional conditions on start, stop, step params * if self.sss_on: * if (self._nrow < self.start or self._nrow >= self.stop): # <<<<<<<<<<<<<< * self.nextelement = self.nextelement + 1 * continue */ __pyx_t_11 = (__pyx_v_self->_nrow < __pyx_v_self->start); if (!__pyx_t_11) { __pyx_t_1 = (__pyx_v_self->_nrow >= __pyx_v_self->stop); __pyx_t_10 = __pyx_t_1; } else { __pyx_t_10 = __pyx_t_11; } if (__pyx_t_10) { /* "tables/tableextension.pyx":992 * if self.sss_on: * if (self._nrow < self.start or self._nrow >= self.stop): * self.nextelement = self.nextelement + 1 # <<<<<<<<<<<<<< * continue * if (self.step > 1 and */ __pyx_v_self->nextelement = (__pyx_v_self->nextelement + 1); /* "tables/tableextension.pyx":993 * if (self._nrow < self.start or self._nrow >= self.stop): * self.nextelement = self.nextelement + 1 * continue # <<<<<<<<<<<<<< * if (self.step > 1 and * ((self._nrow - self.start) % self.step > 0)): */ goto __pyx_L3_continue; goto __pyx_L16; } __pyx_L16:; /* "tables/tableextension.pyx":994 * self.nextelement = self.nextelement + 1 * continue * if (self.step > 1 and # <<<<<<<<<<<<<< * ((self._nrow - self.start) % self.step > 0)): * self.nextelement = self.nextelement + 1 */ __pyx_t_10 = (__pyx_v_self->step > 1); if (__pyx_t_10) { /* "tables/tableextension.pyx":995 * continue * if (self.step > 1 and * ((self._nrow - self.start) % self.step > 0)): # <<<<<<<<<<<<<< * self.nextelement = self.nextelement + 1 * continue */ __pyx_t_3 = (__pyx_v_self->_nrow - __pyx_v_self->start); if (unlikely(__pyx_v_self->step == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = (__Pyx_mod_PY_LONG_LONG(__pyx_t_3, __pyx_v_self->step) > 0); __pyx_t_1 = __pyx_t_11; } else { __pyx_t_1 = __pyx_t_10; } if (__pyx_t_1) { /* "tables/tableextension.pyx":996 * if (self.step > 1 and * ((self._nrow - self.start) % self.step > 0)): * self.nextelement = self.nextelement + 1 # <<<<<<<<<<<<<< * continue * # Return this row */ __pyx_v_self->nextelement = (__pyx_v_self->nextelement + 1); /* "tables/tableextension.pyx":997 * ((self._nrow - self.start) % self.step > 0)): * self.nextelement = self.nextelement + 1 * continue # <<<<<<<<<<<<<< * # Return this row * self.nextelement = self._nrow + 1 */ goto __pyx_L3_continue; goto __pyx_L17; } __pyx_L17:; goto __pyx_L15; } __pyx_L15:; /* "tables/tableextension.pyx":999 * continue * # Return this row * self.nextelement = self._nrow + 1 # <<<<<<<<<<<<<< * return self * else: */ __pyx_v_self->nextelement = (__pyx_v_self->_nrow + 1); /* "tables/tableextension.pyx":1000 * # Return this row * self.nextelement = self._nrow + 1 * return self # <<<<<<<<<<<<<< * else: * # All the elements have been read for this mode */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; __pyx_L3_continue:; } /*else*/ { /* "tables/tableextension.pyx":1003 * else: * # All the elements have been read for this mode * self._finish_riterator() # <<<<<<<<<<<<<< * * cdef __next__coords(self): */ __pyx_t_6 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_finish_riterator(__pyx_v_self); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.tableextension.Row.__next__indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp_range); __Pyx_XDECREF((PyObject *)__pyx_v_table); __Pyx_XDECREF((PyObject *)__pyx_v_iobuf); __Pyx_XDECREF(__pyx_v_seq); __Pyx_XDECREF((PyObject *)__pyx_v_seqcache); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1005 * self._finish_riterator() * * cdef __next__coords(self): # <<<<<<<<<<<<<< * """The version of next() for user-required coordinates""" * cdef int recout */ static PyObject *__pyx_f_6tables_14tableextension_3Row___next__coords(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { int __pyx_v_recout; PY_LONG_LONG __pyx_v_lenbuf; PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; hsize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; Py_ssize_t __pyx_t_8; PY_LONG_LONG __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__coords", 0); /* "tables/tableextension.pyx":1010 * cdef long long lenbuf, nextelement * cdef object tmp * if 0 < self.step: # <<<<<<<<<<<<<< * while self.nextelement < self.stop: * if self.nextelement >= self.nrowsread: */ __pyx_t_1 = (0 < __pyx_v_self->step); if (__pyx_t_1) { /* "tables/tableextension.pyx":1011 * cdef object tmp * if 0 < self.step: * while self.nextelement < self.stop: # <<<<<<<<<<<<<< * if self.nextelement >= self.nrowsread: * # Correction for avoiding reading past self.stop */ while (1) { __pyx_t_1 = (__pyx_v_self->nextelement < __pyx_v_self->stop); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":1012 * if 0 < self.step: * while self.nextelement < self.stop: * if self.nextelement >= self.nrowsread: # <<<<<<<<<<<<<< * # Correction for avoiding reading past self.stop * if self.nrowsread+self.nrowsinbuf > self.stop: */ __pyx_t_1 = (__pyx_v_self->nextelement >= __pyx_v_self->nrowsread); if (__pyx_t_1) { /* "tables/tableextension.pyx":1014 * if self.nextelement >= self.nrowsread: * # Correction for avoiding reading past self.stop * if self.nrowsread+self.nrowsinbuf > self.stop: # <<<<<<<<<<<<<< * lenbuf = self.stop-self.nrowsread * else: */ __pyx_t_1 = ((__pyx_v_self->nrowsread + __pyx_v_self->nrowsinbuf) > __pyx_v_self->stop); if (__pyx_t_1) { /* "tables/tableextension.pyx":1015 * # Correction for avoiding reading past self.stop * if self.nrowsread+self.nrowsinbuf > self.stop: * lenbuf = self.stop-self.nrowsread # <<<<<<<<<<<<<< * else: * lenbuf = self.nrowsinbuf */ __pyx_v_lenbuf = (__pyx_v_self->stop - __pyx_v_self->nrowsread); goto __pyx_L7; } /*else*/ { /* "tables/tableextension.pyx":1017 * lenbuf = self.stop-self.nrowsread * else: * lenbuf = self.nrowsinbuf # <<<<<<<<<<<<<< * tmp = self.coords[self.nrowsread:self.nrowsread+lenbuf:self.step] * # We have to get a contiguous buffer, so numpy.array is the way to go */ __pyx_t_2 = __pyx_v_self->nrowsinbuf; __pyx_v_lenbuf = __pyx_t_2; } __pyx_L7:; /* "tables/tableextension.pyx":1018 * else: * lenbuf = self.nrowsinbuf * tmp = self.coords[self.nrowsread:self.nrowsread+lenbuf:self.step] # <<<<<<<<<<<<<< * # We have to get a contiguous buffer, so numpy.array is the way to go * self.bufcoords = numpy.array(tmp, dtype="uint64") */ __pyx_t_3 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_self->nrowsread); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyLong_FromLongLong((__pyx_v_self->nrowsread + __pyx_v_lenbuf)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyLong_FromLongLong(__pyx_v_self->step); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySlice_New(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetItem(__pyx_v_self->coords, __pyx_t_6); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_v_tmp); __pyx_v_tmp = __pyx_t_5; __pyx_t_5 = 0; /* "tables/tableextension.pyx":1020 * tmp = self.coords[self.nrowsread:self.nrowsread+lenbuf:self.step] * # We have to get a contiguous buffer, so numpy.array is the way to go * self.bufcoords = numpy.array(tmp, dtype="uint64") # <<<<<<<<<<<<<< * self._row = -1 * if self.bufcoords.size > 0: */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__array); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tmp); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tmp); __Pyx_GIVEREF(__pyx_v_tmp); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__uint64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->bufcoords); __Pyx_DECREF(((PyObject *)__pyx_v_self->bufcoords)); __pyx_v_self->bufcoords = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "tables/tableextension.pyx":1021 * # We have to get a contiguous buffer, so numpy.array is the way to go * self.bufcoords = numpy.array(tmp, dtype="uint64") * self._row = -1 # <<<<<<<<<<<<<< * if self.bufcoords.size > 0: * recout = self.table._read_elements(self.bufcoords, self.iobuf) */ __pyx_v_self->_row = -1; /* "tables/tableextension.pyx":1022 * self.bufcoords = numpy.array(tmp, dtype="uint64") * self._row = -1 * if self.bufcoords.size > 0: # <<<<<<<<<<<<<< * recout = self.table._read_elements(self.bufcoords, self.iobuf) * else: */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self->bufcoords), __pyx_n_s__size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* "tables/tableextension.pyx":1023 * self._row = -1 * if self.bufcoords.size > 0: * recout = self.table._read_elements(self.bufcoords, self.iobuf) # <<<<<<<<<<<<<< * else: * recout = 0 */ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s___read_elements); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self->bufcoords)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->bufcoords)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->bufcoords)); __Pyx_INCREF(__pyx_v_self->iobuf); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->iobuf); __Pyx_GIVEREF(__pyx_v_self->iobuf); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_recout = __pyx_t_7; goto __pyx_L8; } /*else*/ { /* "tables/tableextension.pyx":1025 * recout = self.table._read_elements(self.bufcoords, self.iobuf) * else: * recout = 0 # <<<<<<<<<<<<<< * self.bufcoords_data = self.bufcoords.data * self.nrowsread = self.nrowsread + lenbuf */ __pyx_v_recout = 0; } __pyx_L8:; /* "tables/tableextension.pyx":1026 * else: * recout = 0 * self.bufcoords_data = self.bufcoords.data # <<<<<<<<<<<<<< * self.nrowsread = self.nrowsread + lenbuf * if recout == 0: */ __pyx_v_self->bufcoords_data = ((hsize_t *)__pyx_v_self->bufcoords->data); /* "tables/tableextension.pyx":1027 * recout = 0 * self.bufcoords_data = self.bufcoords.data * self.nrowsread = self.nrowsread + lenbuf # <<<<<<<<<<<<<< * if recout == 0: * # no items were read, skip out */ __pyx_v_self->nrowsread = (__pyx_v_self->nrowsread + __pyx_v_lenbuf); /* "tables/tableextension.pyx":1028 * self.bufcoords_data = self.bufcoords.data * self.nrowsread = self.nrowsread + lenbuf * if recout == 0: # <<<<<<<<<<<<<< * # no items were read, skip out * continue */ __pyx_t_1 = (__pyx_v_recout == 0); if (__pyx_t_1) { /* "tables/tableextension.pyx":1030 * if recout == 0: * # no items were read, skip out * continue # <<<<<<<<<<<<<< * self._row = self._row + 1 * self._nrow = self.bufcoords_data[self._row] */ goto __pyx_L4_continue; goto __pyx_L9; } __pyx_L9:; goto __pyx_L6; } __pyx_L6:; /* "tables/tableextension.pyx":1031 * # no items were read, skip out * continue * self._row = self._row + 1 # <<<<<<<<<<<<<< * self._nrow = self.bufcoords_data[self._row] * self.nextelement = self.nextelement + self.absstep */ __pyx_v_self->_row = (__pyx_v_self->_row + 1); /* "tables/tableextension.pyx":1032 * continue * self._row = self._row + 1 * self._nrow = self.bufcoords_data[self._row] # <<<<<<<<<<<<<< * self.nextelement = self.nextelement + self.absstep * return self */ __pyx_v_self->_nrow = (__pyx_v_self->bufcoords_data[__pyx_v_self->_row]); /* "tables/tableextension.pyx":1033 * self._row = self._row + 1 * self._nrow = self.bufcoords_data[self._row] * self.nextelement = self.nextelement + self.absstep # <<<<<<<<<<<<<< * return self * else: */ __pyx_v_self->nextelement = (__pyx_v_self->nextelement + __pyx_v_self->absstep); /* "tables/tableextension.pyx":1034 * self._nrow = self.bufcoords_data[self._row] * self.nextelement = self.nextelement + self.absstep * return self # <<<<<<<<<<<<<< * else: * # All the elements have been read for this mode */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; __pyx_L4_continue:; } /*else*/ { /* "tables/tableextension.pyx":1037 * else: * # All the elements have been read for this mode * self._finish_riterator() # <<<<<<<<<<<<<< * elif 0 > self.step: * #print "self.nextelement = ", self.nextelement, self.start, self.nrowsread, self.nextelement < self.start - self.nrowsread + 1 */ __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_finish_riterator(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } goto __pyx_L3; } /* "tables/tableextension.pyx":1038 * # All the elements have been read for this mode * self._finish_riterator() * elif 0 > self.step: # <<<<<<<<<<<<<< * #print "self.nextelement = ", self.nextelement, self.start, self.nrowsread, self.nextelement < self.start - self.nrowsread + 1 * while self.nextelement - 1 > self.stop: */ __pyx_t_1 = (0 > __pyx_v_self->step); if (__pyx_t_1) { /* "tables/tableextension.pyx":1040 * elif 0 > self.step: * #print "self.nextelement = ", self.nextelement, self.start, self.nrowsread, self.nextelement < self.start - self.nrowsread + 1 * while self.nextelement - 1 > self.stop: # <<<<<<<<<<<<<< * if self.nextelement < self.start - ( self.nrowsread) + 1: * if 0 > self.nextelement - ( self.nrowsinbuf) + 1: */ while (1) { __pyx_t_1 = ((__pyx_v_self->nextelement - 1) > __pyx_v_self->stop); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":1041 * #print "self.nextelement = ", self.nextelement, self.start, self.nrowsread, self.nextelement < self.start - self.nrowsread + 1 * while self.nextelement - 1 > self.stop: * if self.nextelement < self.start - ( self.nrowsread) + 1: # <<<<<<<<<<<<<< * if 0 > self.nextelement - ( self.nrowsinbuf) + 1: * tmp = self.coords[0:self.nextelement + 1] */ __pyx_t_1 = (__pyx_v_self->nextelement < ((__pyx_v_self->start - ((PY_LONG_LONG)__pyx_v_self->nrowsread)) + 1)); if (__pyx_t_1) { /* "tables/tableextension.pyx":1042 * while self.nextelement - 1 > self.stop: * if self.nextelement < self.start - ( self.nrowsread) + 1: * if 0 > self.nextelement - ( self.nrowsinbuf) + 1: # <<<<<<<<<<<<<< * tmp = self.coords[0:self.nextelement + 1] * else: */ __pyx_t_1 = (0 > ((__pyx_v_self->nextelement - ((PY_LONG_LONG)__pyx_v_self->nrowsinbuf)) + 1)); if (__pyx_t_1) { /* "tables/tableextension.pyx":1043 * if self.nextelement < self.start - ( self.nrowsread) + 1: * if 0 > self.nextelement - ( self.nrowsinbuf) + 1: * tmp = self.coords[0:self.nextelement + 1] # <<<<<<<<<<<<<< * else: * tmp = self.coords[self.nextelement - ( self.nrowsinbuf) + 1:self.nextelement + 1] */ __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_self->coords, 0, (__pyx_v_self->nextelement + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_tmp = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L13; } /*else*/ { /* "tables/tableextension.pyx":1045 * tmp = self.coords[0:self.nextelement + 1] * else: * tmp = self.coords[self.nextelement - ( self.nrowsinbuf) + 1:self.nextelement + 1] # <<<<<<<<<<<<<< * self.bufcoords = numpy.array(tmp, dtype="uint64") * recout = self.table._read_elements(self.bufcoords, self.iobuf) */ __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_self->coords, ((__pyx_v_self->nextelement - ((PY_LONG_LONG)__pyx_v_self->nrowsinbuf)) + 1), (__pyx_v_self->nextelement + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_tmp = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L13:; /* "tables/tableextension.pyx":1046 * else: * tmp = self.coords[self.nextelement - ( self.nrowsinbuf) + 1:self.nextelement + 1] * self.bufcoords = numpy.array(tmp, dtype="uint64") # <<<<<<<<<<<<<< * recout = self.table._read_elements(self.bufcoords, self.iobuf) * self.bufcoords_data = self.bufcoords.data */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_tmp); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tmp); __Pyx_GIVEREF(__pyx_v_tmp); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__uint64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->bufcoords); __Pyx_DECREF(((PyObject *)__pyx_v_self->bufcoords)); __pyx_v_self->bufcoords = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "tables/tableextension.pyx":1047 * tmp = self.coords[self.nextelement - ( self.nrowsinbuf) + 1:self.nextelement + 1] * self.bufcoords = numpy.array(tmp, dtype="uint64") * recout = self.table._read_elements(self.bufcoords, self.iobuf) # <<<<<<<<<<<<<< * self.bufcoords_data = self.bufcoords.data * self.nrowsread = self.nrowsread + self.nrowsinbuf */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s___read_elements); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_self->bufcoords)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self->bufcoords)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->bufcoords)); __Pyx_INCREF(__pyx_v_self->iobuf); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->iobuf); __Pyx_GIVEREF(__pyx_v_self->iobuf); __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_recout = __pyx_t_7; /* "tables/tableextension.pyx":1048 * self.bufcoords = numpy.array(tmp, dtype="uint64") * recout = self.table._read_elements(self.bufcoords, self.iobuf) * self.bufcoords_data = self.bufcoords.data # <<<<<<<<<<<<<< * self.nrowsread = self.nrowsread + self.nrowsinbuf * self._row = len(self.bufcoords) - 1 */ __pyx_v_self->bufcoords_data = ((hsize_t *)__pyx_v_self->bufcoords->data); /* "tables/tableextension.pyx":1049 * recout = self.table._read_elements(self.bufcoords, self.iobuf) * self.bufcoords_data = self.bufcoords.data * self.nrowsread = self.nrowsread + self.nrowsinbuf # <<<<<<<<<<<<<< * self._row = len(self.bufcoords) - 1 * else: */ __pyx_v_self->nrowsread = (__pyx_v_self->nrowsread + __pyx_v_self->nrowsinbuf); /* "tables/tableextension.pyx":1050 * self.bufcoords_data = self.bufcoords.data * self.nrowsread = self.nrowsread + self.nrowsinbuf * self._row = len(self.bufcoords) - 1 # <<<<<<<<<<<<<< * else: * self._row = (self._row + self.step) % len(self.bufcoords) */ __pyx_t_5 = ((PyObject *)__pyx_v_self->bufcoords); __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->_row = (__pyx_t_8 - 1); goto __pyx_L12; } /*else*/ { /* "tables/tableextension.pyx":1052 * self._row = len(self.bufcoords) - 1 * else: * self._row = (self._row + self.step) % len(self.bufcoords) # <<<<<<<<<<<<<< * * self._nrow = self.nextelement - self.step */ __pyx_t_9 = (__pyx_v_self->_row + __pyx_v_self->step); __pyx_t_5 = ((PyObject *)__pyx_v_self->bufcoords); __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__pyx_t_8 == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->_row = __Pyx_mod_PY_LONG_LONG(__pyx_t_9, __pyx_t_8); } __pyx_L12:; /* "tables/tableextension.pyx":1054 * self._row = (self._row + self.step) % len(self.bufcoords) * * self._nrow = self.nextelement - self.step # <<<<<<<<<<<<<< * self.nextelement = self.nextelement + self.step * # Return this value */ __pyx_v_self->_nrow = (__pyx_v_self->nextelement - __pyx_v_self->step); /* "tables/tableextension.pyx":1055 * * self._nrow = self.nextelement - self.step * self.nextelement = self.nextelement + self.step # <<<<<<<<<<<<<< * # Return this value * return self */ __pyx_v_self->nextelement = (__pyx_v_self->nextelement + __pyx_v_self->step); /* "tables/tableextension.pyx":1057 * self.nextelement = self.nextelement + self.step * # Return this value * return self # <<<<<<<<<<<<<< * else: * # All the elements have been read for this mode */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; } /*else*/ { /* "tables/tableextension.pyx":1060 * else: * # All the elements have been read for this mode * self._finish_riterator() # <<<<<<<<<<<<<< * else: * self._finish_riterator() */ __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_finish_riterator(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } goto __pyx_L3; } /*else*/ { /* "tables/tableextension.pyx":1062 * self._finish_riterator() * else: * self._finish_riterator() # <<<<<<<<<<<<<< * * cdef __next__inkernel(self): */ __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_finish_riterator(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.tableextension.Row.__next__coords", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1064 * self._finish_riterator() * * cdef __next__inkernel(self): # <<<<<<<<<<<<<< * """The version of next() in case of in-kernel conditions""" * */ static PyObject *__pyx_f_6tables_14tableextension_3Row___next__inkernel(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { hsize_t __pyx_v_recout; hsize_t __pyx_v_correct; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; hsize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PY_LONG_LONG __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__inkernel", 0); /* "tables/tableextension.pyx":1070 * cdef object numexpr_locals, colvar, col * * self.nextelement = self._nrow + self.step # <<<<<<<<<<<<<< * while self.nextelement < self.stop: * if self.nextelement >= self.nrowsread: */ __pyx_v_self->nextelement = (__pyx_v_self->_nrow + __pyx_v_self->step); /* "tables/tableextension.pyx":1071 * * self.nextelement = self._nrow + self.step * while self.nextelement < self.stop: # <<<<<<<<<<<<<< * if self.nextelement >= self.nrowsread: * # Skip until there is interesting information */ while (1) { __pyx_t_1 = (__pyx_v_self->nextelement < __pyx_v_self->stop); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":1072 * self.nextelement = self._nrow + self.step * while self.nextelement < self.stop: * if self.nextelement >= self.nrowsread: # <<<<<<<<<<<<<< * # Skip until there is interesting information * while self.nextelement >= self.nrowsread + self.nrowsinbuf: */ __pyx_t_1 = (__pyx_v_self->nextelement >= __pyx_v_self->nrowsread); if (__pyx_t_1) { /* "tables/tableextension.pyx":1074 * if self.nextelement >= self.nrowsread: * # Skip until there is interesting information * while self.nextelement >= self.nrowsread + self.nrowsinbuf: # <<<<<<<<<<<<<< * self.nrowsread = self.nrowsread + self.nrowsinbuf * # Compute the end for this iteration */ while (1) { __pyx_t_1 = (__pyx_v_self->nextelement >= (__pyx_v_self->nrowsread + __pyx_v_self->nrowsinbuf)); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":1075 * # Skip until there is interesting information * while self.nextelement >= self.nrowsread + self.nrowsinbuf: * self.nrowsread = self.nrowsread + self.nrowsinbuf # <<<<<<<<<<<<<< * # Compute the end for this iteration * self.stopb = self.stop - self.nrowsread */ __pyx_v_self->nrowsread = (__pyx_v_self->nrowsread + __pyx_v_self->nrowsinbuf); } /* "tables/tableextension.pyx":1077 * self.nrowsread = self.nrowsread + self.nrowsinbuf * # Compute the end for this iteration * self.stopb = self.stop - self.nrowsread # <<<<<<<<<<<<<< * if self.stopb > self.nrowsinbuf: * self.stopb = self.nrowsinbuf */ __pyx_v_self->stopb = (__pyx_v_self->stop - __pyx_v_self->nrowsread); /* "tables/tableextension.pyx":1078 * # Compute the end for this iteration * self.stopb = self.stop - self.nrowsread * if self.stopb > self.nrowsinbuf: # <<<<<<<<<<<<<< * self.stopb = self.nrowsinbuf * self._row = self.startb - self.step */ __pyx_t_1 = (__pyx_v_self->stopb > __pyx_v_self->nrowsinbuf); if (__pyx_t_1) { /* "tables/tableextension.pyx":1079 * self.stopb = self.stop - self.nrowsread * if self.stopb > self.nrowsinbuf: * self.stopb = self.nrowsinbuf # <<<<<<<<<<<<<< * self._row = self.startb - self.step * # Read a chunk */ __pyx_t_2 = __pyx_v_self->nrowsinbuf; __pyx_v_self->stopb = __pyx_t_2; goto __pyx_L8; } __pyx_L8:; /* "tables/tableextension.pyx":1080 * if self.stopb > self.nrowsinbuf: * self.stopb = self.nrowsinbuf * self._row = self.startb - self.step # <<<<<<<<<<<<<< * # Read a chunk * recout = self.table._read_records(self.nextelement, self.nrowsinbuf, */ __pyx_v_self->_row = (__pyx_v_self->startb - __pyx_v_self->step); /* "tables/tableextension.pyx":1082 * self._row = self.startb - self.step * # Read a chunk * recout = self.table._read_records(self.nextelement, self.nrowsinbuf, # <<<<<<<<<<<<<< * self.iobuf) * self.nrowsread = self.nrowsread + recout */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___read_records); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyLong_FromLongLong(__pyx_v_self->nextelement); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_self->nrowsinbuf); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "tables/tableextension.pyx":1083 * # Read a chunk * recout = self.table._read_records(self.nextelement, self.nrowsinbuf, * self.iobuf) # <<<<<<<<<<<<<< * self.nrowsread = self.nrowsread + recout * self.indexchunk = -self.step */ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->iobuf); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_self->iobuf); __Pyx_GIVEREF(__pyx_v_self->iobuf); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_5); if (unlikely((__pyx_t_2 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_recout = __pyx_t_2; /* "tables/tableextension.pyx":1084 * recout = self.table._read_records(self.nextelement, self.nrowsinbuf, * self.iobuf) * self.nrowsread = self.nrowsread + recout # <<<<<<<<<<<<<< * self.indexchunk = -self.step * */ __pyx_v_self->nrowsread = (__pyx_v_self->nrowsread + __pyx_v_recout); /* "tables/tableextension.pyx":1085 * self.iobuf) * self.nrowsread = self.nrowsread + recout * self.indexchunk = -self.step # <<<<<<<<<<<<<< * * # Evaluate the condition on this table fragment. */ __pyx_v_self->indexchunk = (-__pyx_v_self->step); /* "tables/tableextension.pyx":1088 * * # Evaluate the condition on this table fragment. * self.indexvalid = call_on_recarr( # <<<<<<<<<<<<<< * self.condfunc, self.condargs, self.iobuf[:recout] ) * */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__call_on_recarr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "tables/tableextension.pyx":1089 * # Evaluate the condition on this table fragment. * self.indexvalid = call_on_recarr( * self.condfunc, self.condargs, self.iobuf[:recout] ) # <<<<<<<<<<<<<< * * # Is there any interesting information in this buffer? */ __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_self->iobuf, 0, __pyx_v_recout); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->condfunc); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->condfunc); __Pyx_GIVEREF(__pyx_v_self->condfunc); __Pyx_INCREF(__pyx_v_self->condargs); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->condargs); __Pyx_GIVEREF(__pyx_v_self->condargs); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/tableextension.pyx":1088 * * # Evaluate the condition on this table fragment. * self.indexvalid = call_on_recarr( # <<<<<<<<<<<<<< * self.condfunc, self.condargs, self.iobuf[:recout] ) * */ __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->indexvalid); __Pyx_DECREF(((PyObject *)__pyx_v_self->indexvalid)); __pyx_v_self->indexvalid = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "tables/tableextension.pyx":1092 * * # Is there any interesting information in this buffer? * if not numpy.sometrue(self.indexvalid): # <<<<<<<<<<<<<< * # No, so take the next one * if self.step >= self.nrowsinbuf: */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__sometrue); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_self->indexvalid)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self->indexvalid)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->indexvalid)); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (!__pyx_t_1); if (__pyx_t_7) { /* "tables/tableextension.pyx":1094 * if not numpy.sometrue(self.indexvalid): * # No, so take the next one * if self.step >= self.nrowsinbuf: # <<<<<<<<<<<<<< * self.nextelement = self.nextelement + self.step * else: */ __pyx_t_7 = (__pyx_v_self->step >= __pyx_v_self->nrowsinbuf); if (__pyx_t_7) { /* "tables/tableextension.pyx":1095 * # No, so take the next one * if self.step >= self.nrowsinbuf: * self.nextelement = self.nextelement + self.step # <<<<<<<<<<<<<< * else: * self.nextelement = self.nextelement + self.nrowsinbuf */ __pyx_v_self->nextelement = (__pyx_v_self->nextelement + __pyx_v_self->step); goto __pyx_L10; } /*else*/ { /* "tables/tableextension.pyx":1097 * self.nextelement = self.nextelement + self.step * else: * self.nextelement = self.nextelement + self.nrowsinbuf # <<<<<<<<<<<<<< * # Correction for step size > 1 * if self.step > 1: */ __pyx_v_self->nextelement = (__pyx_v_self->nextelement + __pyx_v_self->nrowsinbuf); /* "tables/tableextension.pyx":1099 * self.nextelement = self.nextelement + self.nrowsinbuf * # Correction for step size > 1 * if self.step > 1: # <<<<<<<<<<<<<< * correct = (self.nextelement - self.start) % self.step * self.nextelement = self.nextelement + self.step - correct */ __pyx_t_7 = (__pyx_v_self->step > 1); if (__pyx_t_7) { /* "tables/tableextension.pyx":1100 * # Correction for step size > 1 * if self.step > 1: * correct = (self.nextelement - self.start) % self.step # <<<<<<<<<<<<<< * self.nextelement = self.nextelement + self.step - correct * continue */ __pyx_t_2 = (__pyx_v_self->nextelement - __pyx_v_self->start); if (unlikely(__pyx_v_self->step == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_correct = __Pyx_mod_PY_LONG_LONG(__pyx_t_2, __pyx_v_self->step); /* "tables/tableextension.pyx":1101 * if self.step > 1: * correct = (self.nextelement - self.start) % self.step * self.nextelement = self.nextelement + self.step - correct # <<<<<<<<<<<<<< * continue * self.index_valid_data = self.indexvalid.data */ __pyx_v_self->nextelement = ((__pyx_v_self->nextelement + __pyx_v_self->step) - __pyx_v_correct); goto __pyx_L11; } __pyx_L11:; } __pyx_L10:; /* "tables/tableextension.pyx":1102 * correct = (self.nextelement - self.start) % self.step * self.nextelement = self.nextelement + self.step - correct * continue # <<<<<<<<<<<<<< * self.index_valid_data = self.indexvalid.data * */ goto __pyx_L3_continue; goto __pyx_L9; } __pyx_L9:; /* "tables/tableextension.pyx":1103 * self.nextelement = self.nextelement + self.step - correct * continue * self.index_valid_data = self.indexvalid.data # <<<<<<<<<<<<<< * * self._row = self._row + self.step */ __pyx_v_self->index_valid_data = ((char *)__pyx_v_self->indexvalid->data); goto __pyx_L5; } __pyx_L5:; /* "tables/tableextension.pyx":1105 * self.index_valid_data = self.indexvalid.data * * self._row = self._row + self.step # <<<<<<<<<<<<<< * self._nrow = self.nextelement * if self._row + self.step >= self.stopb: */ __pyx_v_self->_row = (__pyx_v_self->_row + __pyx_v_self->step); /* "tables/tableextension.pyx":1106 * * self._row = self._row + self.step * self._nrow = self.nextelement # <<<<<<<<<<<<<< * if self._row + self.step >= self.stopb: * # Compute the start row for the next buffer */ __pyx_t_8 = __pyx_v_self->nextelement; __pyx_v_self->_nrow = __pyx_t_8; /* "tables/tableextension.pyx":1107 * self._row = self._row + self.step * self._nrow = self.nextelement * if self._row + self.step >= self.stopb: # <<<<<<<<<<<<<< * # Compute the start row for the next buffer * self.startb = 0 */ __pyx_t_7 = ((__pyx_v_self->_row + __pyx_v_self->step) >= __pyx_v_self->stopb); if (__pyx_t_7) { /* "tables/tableextension.pyx":1109 * if self._row + self.step >= self.stopb: * # Compute the start row for the next buffer * self.startb = 0 # <<<<<<<<<<<<<< * * self.nextelement = self._nrow + self.step */ __pyx_v_self->startb = 0; goto __pyx_L12; } __pyx_L12:; /* "tables/tableextension.pyx":1111 * self.startb = 0 * * self.nextelement = self._nrow + self.step # <<<<<<<<<<<<<< * # Return only if this value is interesting * self.indexchunk = self.indexchunk + self.step */ __pyx_v_self->nextelement = (__pyx_v_self->_nrow + __pyx_v_self->step); /* "tables/tableextension.pyx":1113 * self.nextelement = self._nrow + self.step * # Return only if this value is interesting * self.indexchunk = self.indexchunk + self.step # <<<<<<<<<<<<<< * if self.index_valid_data[self.indexchunk]: * return self */ __pyx_v_self->indexchunk = (__pyx_v_self->indexchunk + __pyx_v_self->step); /* "tables/tableextension.pyx":1114 * # Return only if this value is interesting * self.indexchunk = self.indexchunk + self.step * if self.index_valid_data[self.indexchunk]: # <<<<<<<<<<<<<< * return self * else: */ if ((__pyx_v_self->index_valid_data[__pyx_v_self->indexchunk])) { /* "tables/tableextension.pyx":1115 * self.indexchunk = self.indexchunk + self.step * if self.index_valid_data[self.indexchunk]: * return self # <<<<<<<<<<<<<< * else: * self._finish_riterator() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; goto __pyx_L13; } __pyx_L13:; __pyx_L3_continue:; } /*else*/ { /* "tables/tableextension.pyx":1117 * return self * else: * self._finish_riterator() # <<<<<<<<<<<<<< * * cdef __next__general(self): */ __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_finish_riterator(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.tableextension.Row.__next__inkernel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1119 * self._finish_riterator() * * cdef __next__general(self): # <<<<<<<<<<<<<< * """The version of next() for the general cases""" * cdef int recout */ static PyObject *__pyx_f_6tables_14tableextension_3Row___next__general(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { int __pyx_v_recout; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; hsize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PY_LONG_LONG __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__general", 0); /* "tables/tableextension.pyx":1122 * """The version of next() for the general cases""" * cdef int recout * if 0 < self.step: # <<<<<<<<<<<<<< * self.nextelement = self._nrow + self.step * while self.nextelement < self.stop: */ __pyx_t_1 = (0 < __pyx_v_self->step); if (__pyx_t_1) { /* "tables/tableextension.pyx":1123 * cdef int recout * if 0 < self.step: * self.nextelement = self._nrow + self.step # <<<<<<<<<<<<<< * while self.nextelement < self.stop: * if self.nextelement >= self.nrowsread: */ __pyx_v_self->nextelement = (__pyx_v_self->_nrow + __pyx_v_self->step); /* "tables/tableextension.pyx":1124 * if 0 < self.step: * self.nextelement = self._nrow + self.step * while self.nextelement < self.stop: # <<<<<<<<<<<<<< * if self.nextelement >= self.nrowsread: * # Skip until there is interesting information */ while (1) { __pyx_t_1 = (__pyx_v_self->nextelement < __pyx_v_self->stop); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":1125 * self.nextelement = self._nrow + self.step * while self.nextelement < self.stop: * if self.nextelement >= self.nrowsread: # <<<<<<<<<<<<<< * # Skip until there is interesting information * while self.nextelement >= self.nrowsread + self.nrowsinbuf: */ __pyx_t_1 = (__pyx_v_self->nextelement >= __pyx_v_self->nrowsread); if (__pyx_t_1) { /* "tables/tableextension.pyx":1127 * if self.nextelement >= self.nrowsread: * # Skip until there is interesting information * while self.nextelement >= self.nrowsread + self.nrowsinbuf: # <<<<<<<<<<<<<< * self.nrowsread = self.nrowsread + self.nrowsinbuf * # Compute the end for this iteration */ while (1) { __pyx_t_1 = (__pyx_v_self->nextelement >= (__pyx_v_self->nrowsread + __pyx_v_self->nrowsinbuf)); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":1128 * # Skip until there is interesting information * while self.nextelement >= self.nrowsread + self.nrowsinbuf: * self.nrowsread = self.nrowsread + self.nrowsinbuf # <<<<<<<<<<<<<< * # Compute the end for this iteration * self.stopb = self.stop - self.nrowsread */ __pyx_v_self->nrowsread = (__pyx_v_self->nrowsread + __pyx_v_self->nrowsinbuf); } /* "tables/tableextension.pyx":1130 * self.nrowsread = self.nrowsread + self.nrowsinbuf * # Compute the end for this iteration * self.stopb = self.stop - self.nrowsread # <<<<<<<<<<<<<< * if self.stopb > self.nrowsinbuf: * self.stopb = self.nrowsinbuf */ __pyx_v_self->stopb = (__pyx_v_self->stop - __pyx_v_self->nrowsread); /* "tables/tableextension.pyx":1131 * # Compute the end for this iteration * self.stopb = self.stop - self.nrowsread * if self.stopb > self.nrowsinbuf: # <<<<<<<<<<<<<< * self.stopb = self.nrowsinbuf * self._row = self.startb - self.step */ __pyx_t_1 = (__pyx_v_self->stopb > __pyx_v_self->nrowsinbuf); if (__pyx_t_1) { /* "tables/tableextension.pyx":1132 * self.stopb = self.stop - self.nrowsread * if self.stopb > self.nrowsinbuf: * self.stopb = self.nrowsinbuf # <<<<<<<<<<<<<< * self._row = self.startb - self.step * # Read a chunk */ __pyx_t_2 = __pyx_v_self->nrowsinbuf; __pyx_v_self->stopb = __pyx_t_2; goto __pyx_L9; } __pyx_L9:; /* "tables/tableextension.pyx":1133 * if self.stopb > self.nrowsinbuf: * self.stopb = self.nrowsinbuf * self._row = self.startb - self.step # <<<<<<<<<<<<<< * # Read a chunk * recout = self.table._read_records(self.nrowsread, self.nrowsinbuf, */ __pyx_v_self->_row = (__pyx_v_self->startb - __pyx_v_self->step); /* "tables/tableextension.pyx":1135 * self._row = self.startb - self.step * # Read a chunk * recout = self.table._read_records(self.nrowsread, self.nrowsinbuf, # <<<<<<<<<<<<<< * self.iobuf) * self.nrowsread = self.nrowsread + recout */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___read_records); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_self->nrowsread); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_self->nrowsinbuf); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "tables/tableextension.pyx":1136 * # Read a chunk * recout = self.table._read_records(self.nrowsread, self.nrowsinbuf, * self.iobuf) # <<<<<<<<<<<<<< * self.nrowsread = self.nrowsread + recout * */ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->iobuf); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_self->iobuf); __Pyx_GIVEREF(__pyx_v_self->iobuf); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_recout = __pyx_t_7; /* "tables/tableextension.pyx":1137 * recout = self.table._read_records(self.nrowsread, self.nrowsinbuf, * self.iobuf) * self.nrowsread = self.nrowsread + recout # <<<<<<<<<<<<<< * * self._row = self._row + self.step */ __pyx_v_self->nrowsread = (__pyx_v_self->nrowsread + __pyx_v_recout); goto __pyx_L6; } __pyx_L6:; /* "tables/tableextension.pyx":1139 * self.nrowsread = self.nrowsread + recout * * self._row = self._row + self.step # <<<<<<<<<<<<<< * self._nrow = self.nextelement * if self._row + self.step >= self.stopb: */ __pyx_v_self->_row = (__pyx_v_self->_row + __pyx_v_self->step); /* "tables/tableextension.pyx":1140 * * self._row = self._row + self.step * self._nrow = self.nextelement # <<<<<<<<<<<<<< * if self._row + self.step >= self.stopb: * # Compute the start row for the next buffer */ __pyx_t_8 = __pyx_v_self->nextelement; __pyx_v_self->_nrow = __pyx_t_8; /* "tables/tableextension.pyx":1141 * self._row = self._row + self.step * self._nrow = self.nextelement * if self._row + self.step >= self.stopb: # <<<<<<<<<<<<<< * # Compute the start row for the next buffer * self.startb = (self._row + self.step) % self.nrowsinbuf */ __pyx_t_1 = ((__pyx_v_self->_row + __pyx_v_self->step) >= __pyx_v_self->stopb); if (__pyx_t_1) { /* "tables/tableextension.pyx":1143 * if self._row + self.step >= self.stopb: * # Compute the start row for the next buffer * self.startb = (self._row + self.step) % self.nrowsinbuf # <<<<<<<<<<<<<< * * self.nextelement = self._nrow + self.step */ __pyx_t_8 = (__pyx_v_self->_row + __pyx_v_self->step); if (unlikely(__pyx_v_self->nrowsinbuf == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->startb = __Pyx_mod_hsize_t(__pyx_t_8, __pyx_v_self->nrowsinbuf); goto __pyx_L10; } __pyx_L10:; /* "tables/tableextension.pyx":1145 * self.startb = (self._row + self.step) % self.nrowsinbuf * * self.nextelement = self._nrow + self.step # <<<<<<<<<<<<<< * # Return this value * return self */ __pyx_v_self->nextelement = (__pyx_v_self->_nrow + __pyx_v_self->step); /* "tables/tableextension.pyx":1147 * self.nextelement = self._nrow + self.step * # Return this value * return self # <<<<<<<<<<<<<< * else: * self._finish_riterator() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; } /*else*/ { /* "tables/tableextension.pyx":1149 * return self * else: * self._finish_riterator() # <<<<<<<<<<<<<< * elif 0 > self.step: * self.stopb = -1 */ __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_finish_riterator(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } goto __pyx_L3; } /* "tables/tableextension.pyx":1150 * else: * self._finish_riterator() * elif 0 > self.step: # <<<<<<<<<<<<<< * self.stopb = -1 * while self.nextelement - 1 > self.stop: */ __pyx_t_1 = (0 > __pyx_v_self->step); if (__pyx_t_1) { /* "tables/tableextension.pyx":1151 * self._finish_riterator() * elif 0 > self.step: * self.stopb = -1 # <<<<<<<<<<<<<< * while self.nextelement - 1 > self.stop: * if self.nextelement < self.start - self.nrowsread + 1: */ __pyx_v_self->stopb = -1; /* "tables/tableextension.pyx":1152 * elif 0 > self.step: * self.stopb = -1 * while self.nextelement - 1 > self.stop: # <<<<<<<<<<<<<< * if self.nextelement < self.start - self.nrowsread + 1: * # Read a chunk */ while (1) { __pyx_t_1 = ((__pyx_v_self->nextelement - 1) > __pyx_v_self->stop); if (!__pyx_t_1) break; /* "tables/tableextension.pyx":1153 * self.stopb = -1 * while self.nextelement - 1 > self.stop: * if self.nextelement < self.start - self.nrowsread + 1: # <<<<<<<<<<<<<< * # Read a chunk * recout = self.table._read_records(self.nextelement - self.nrowsinbuf + 1, */ __pyx_t_1 = (__pyx_v_self->nextelement < ((__pyx_v_self->start - __pyx_v_self->nrowsread) + 1)); if (__pyx_t_1) { /* "tables/tableextension.pyx":1155 * if self.nextelement < self.start - self.nrowsread + 1: * # Read a chunk * recout = self.table._read_records(self.nextelement - self.nrowsinbuf + 1, # <<<<<<<<<<<<<< * self.nrowsinbuf, self.iobuf) * self.nrowsread = self.nrowsread + self.nrowsinbuf */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s___read_records); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_to_py_hsize_t(((__pyx_v_self->nextelement - __pyx_v_self->nrowsinbuf) + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "tables/tableextension.pyx":1156 * # Read a chunk * recout = self.table._read_records(self.nextelement - self.nrowsinbuf + 1, * self.nrowsinbuf, self.iobuf) # <<<<<<<<<<<<<< * self.nrowsread = self.nrowsread + self.nrowsinbuf * self._row = self.nrowsinbuf - 1 */ __pyx_t_4 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_self->nrowsinbuf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->iobuf); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->iobuf); __Pyx_GIVEREF(__pyx_v_self->iobuf); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_recout = __pyx_t_7; /* "tables/tableextension.pyx":1157 * recout = self.table._read_records(self.nextelement - self.nrowsinbuf + 1, * self.nrowsinbuf, self.iobuf) * self.nrowsread = self.nrowsread + self.nrowsinbuf # <<<<<<<<<<<<<< * self._row = self.nrowsinbuf - 1 * else: */ __pyx_v_self->nrowsread = (__pyx_v_self->nrowsread + __pyx_v_self->nrowsinbuf); /* "tables/tableextension.pyx":1158 * self.nrowsinbuf, self.iobuf) * self.nrowsread = self.nrowsread + self.nrowsinbuf * self._row = self.nrowsinbuf - 1 # <<<<<<<<<<<<<< * else: * self._row = (self._row + self.step) % self.nrowsinbuf */ __pyx_v_self->_row = (__pyx_v_self->nrowsinbuf - 1); goto __pyx_L13; } /*else*/ { /* "tables/tableextension.pyx":1160 * self._row = self.nrowsinbuf - 1 * else: * self._row = (self._row + self.step) % self.nrowsinbuf # <<<<<<<<<<<<<< * * self._nrow = self.nextelement - self.step */ __pyx_t_8 = (__pyx_v_self->_row + __pyx_v_self->step); if (unlikely(__pyx_v_self->nrowsinbuf == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_self->_row = __Pyx_mod_hsize_t(__pyx_t_8, __pyx_v_self->nrowsinbuf); } __pyx_L13:; /* "tables/tableextension.pyx":1162 * self._row = (self._row + self.step) % self.nrowsinbuf * * self._nrow = self.nextelement - self.step # <<<<<<<<<<<<<< * self.nextelement = self.nextelement + self.step * # Return this value */ __pyx_v_self->_nrow = (__pyx_v_self->nextelement - __pyx_v_self->step); /* "tables/tableextension.pyx":1163 * * self._nrow = self.nextelement - self.step * self.nextelement = self.nextelement + self.step # <<<<<<<<<<<<<< * # Return this value * return self */ __pyx_v_self->nextelement = (__pyx_v_self->nextelement + __pyx_v_self->step); /* "tables/tableextension.pyx":1165 * self.nextelement = self.nextelement + self.step * # Return this value * return self # <<<<<<<<<<<<<< * else: * self._finish_riterator() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; } /*else*/ { /* "tables/tableextension.pyx":1167 * return self * else: * self._finish_riterator() # <<<<<<<<<<<<<< * * cdef _finish_riterator(self): */ __pyx_t_4 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_finish_riterator(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.tableextension.Row.__next__general", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1169 * self._finish_riterator() * * cdef _finish_riterator(self): # <<<<<<<<<<<<<< * """Clean-up things after iterator has been done""" * */ static PyObject *__pyx_f_6tables_14tableextension_3Row__finish_riterator(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_finish_riterator", 0); /* "tables/tableextension.pyx":1172 * """Clean-up things after iterator has been done""" * * self.rfieldscache = {} # empty rfields cache # <<<<<<<<<<<<<< * self.wfieldscache = {} # empty wfields cache * # Make a copy of the last read row in the private record */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_GOTREF(__pyx_v_self->rfieldscache); __Pyx_DECREF(__pyx_v_self->rfieldscache); __pyx_v_self->rfieldscache = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":1173 * * self.rfieldscache = {} # empty rfields cache * self.wfieldscache = {} # empty wfields cache # <<<<<<<<<<<<<< * # Make a copy of the last read row in the private record * # (this is useful for accessing the last row after an iterator loop) */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __Pyx_GOTREF(__pyx_v_self->wfieldscache); __Pyx_DECREF(__pyx_v_self->wfieldscache); __pyx_v_self->wfieldscache = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":1176 * # Make a copy of the last read row in the private record * # (this is useful for accessing the last row after an iterator loop) * if self._row >= 0: # <<<<<<<<<<<<<< * self.wrec[:] = self.iobuf[self._row] * self._riterator = 0 # out of iterator */ __pyx_t_2 = (__pyx_v_self->_row >= 0); if (__pyx_t_2) { /* "tables/tableextension.pyx":1177 * # (this is useful for accessing the last row after an iterator loop) * if self._row >= 0: * self.wrec[:] = self.iobuf[self._row] # <<<<<<<<<<<<<< * self._riterator = 0 # out of iterator * if self._mod_nrows > 0: # Check if there is some modified row */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->iobuf, __pyx_v_self->_row, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PySequence_SetSlice(__pyx_v_self->wrec, 0, PY_SSIZE_T_MAX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":1178 * if self._row >= 0: * self.wrec[:] = self.iobuf[self._row] * self._riterator = 0 # out of iterator # <<<<<<<<<<<<<< * if self._mod_nrows > 0: # Check if there is some modified row * self._flush_mod_rows() # Flush any possible modified row */ __pyx_v_self->_riterator = 0; /* "tables/tableextension.pyx":1179 * self.wrec[:] = self.iobuf[self._row] * self._riterator = 0 # out of iterator * if self._mod_nrows > 0: # Check if there is some modified row # <<<<<<<<<<<<<< * self._flush_mod_rows() # Flush any possible modified row * self.modified_fields = set() # Empty the set of modified fields */ __pyx_t_2 = (__pyx_v_self->_mod_nrows > 0); if (__pyx_t_2) { /* "tables/tableextension.pyx":1180 * self._riterator = 0 # out of iterator * if self._mod_nrows > 0: # Check if there is some modified row * self._flush_mod_rows() # Flush any possible modified row # <<<<<<<<<<<<<< * self.modified_fields = set() # Empty the set of modified fields * raise StopIteration # end of iteration */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___flush_mod_rows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; /* "tables/tableextension.pyx":1181 * if self._mod_nrows > 0: # Check if there is some modified row * self._flush_mod_rows() # Flush any possible modified row * self.modified_fields = set() # Empty the set of modified fields # <<<<<<<<<<<<<< * raise StopIteration # end of iteration * */ __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __Pyx_GOTREF(__pyx_v_self->modified_fields); __Pyx_DECREF(__pyx_v_self->modified_fields); __pyx_v_self->modified_fields = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; /* "tables/tableextension.pyx":1182 * self._flush_mod_rows() # Flush any possible modified row * self.modified_fields = set() # Empty the set of modified fields * raise StopIteration # end of iteration # <<<<<<<<<<<<<< * * def _fill_col(self, result, start, stop, step, field): */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.tableextension.Row._finish_riterator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_9_fill_col(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_8_fill_col[] = "Read a field from a table on disk and put the result in result"; static PyObject *__pyx_pw_6tables_14tableextension_3Row_9_fill_col(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_result = 0; PyObject *__pyx_v_start = 0; PyObject *__pyx_v_stop = 0; PyObject *__pyx_v_step = 0; PyObject *__pyx_v_field = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_fill_col (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__result,&__pyx_n_s__start,&__pyx_n_s__stop,&__pyx_n_s__step,&__pyx_n_s__field,0}; PyObject* values[5] = {0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__result)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_fill_col", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stop)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_fill_col", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__step)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_fill_col", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_fill_col", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_fill_col") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); } __pyx_v_result = values[0]; __pyx_v_start = values[1]; __pyx_v_stop = values[2]; __pyx_v_step = values[3]; __pyx_v_field = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_fill_col", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.tableextension.Row._fill_col", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_14tableextension_3Row_8_fill_col(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self), __pyx_v_result, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_field); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1184 * raise StopIteration # end of iteration * * def _fill_col(self, result, start, stop, step, field): # <<<<<<<<<<<<<< * """Read a field from a table on disk and put the result in result""" * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_8_fill_col(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_result, PyObject *__pyx_v_start, PyObject *__pyx_v_stop, PyObject *__pyx_v_step, PyObject *__pyx_v_field) { hsize_t __pyx_v_startr; hsize_t __pyx_v_istartb; hsize_t __pyx_v_istart; hsize_t __pyx_v_inrowsinbuf; hsize_t __pyx_v_inextelement; PY_LONG_LONG __pyx_v_stopr; PY_LONG_LONG __pyx_v_istopb; PY_LONG_LONG __pyx_v_i; PY_LONG_LONG __pyx_v_j; PY_LONG_LONG __pyx_v_inrowsread; PY_LONG_LONG __pyx_v_istop; PY_LONG_LONG __pyx_v_istep; PyObject *__pyx_v_fields = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations hsize_t __pyx_t_1; PY_LONG_LONG __pyx_t_2; PY_LONG_LONG __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; hsize_t __pyx_t_7; hsize_t __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_fill_col", 0); /* "tables/tableextension.pyx":1194 * * # We can't reuse existing buffers in this context * self._init_loop(start, stop, step, None, None) # <<<<<<<<<<<<<< * istart, istop, istep = (self.start, self.stop, self.step) * inrowsinbuf, inextelement, inrowsread = (self.nrowsinbuf, istart, istart) */ __pyx_t_1 = __Pyx_PyInt_from_py_hsize_t(__pyx_v_start); if (unlikely((__pyx_t_1 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyInt_AsLongLong(__pyx_v_stop); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyInt_AsLongLong(__pyx_v_step); if (unlikely((__pyx_t_3 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = Py_None; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = Py_None; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = ((struct __pyx_vtabstruct_6tables_14tableextension_Row *)__pyx_v_self->__pyx_vtab)->_init_loop(__pyx_v_self, __pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/tableextension.pyx":1195 * # We can't reuse existing buffers in this context * self._init_loop(start, stop, step, None, None) * istart, istop, istep = (self.start, self.stop, self.step) # <<<<<<<<<<<<<< * inrowsinbuf, inextelement, inrowsread = (self.nrowsinbuf, istart, istart) * istartb, startr = (self.startb, 0) */ __pyx_t_1 = __pyx_v_self->start; __pyx_t_3 = __pyx_v_self->stop; __pyx_t_2 = __pyx_v_self->step; __pyx_v_istart = __pyx_t_1; __pyx_v_istop = __pyx_t_3; __pyx_v_istep = __pyx_t_2; /* "tables/tableextension.pyx":1196 * self._init_loop(start, stop, step, None, None) * istart, istop, istep = (self.start, self.stop, self.step) * inrowsinbuf, inextelement, inrowsread = (self.nrowsinbuf, istart, istart) # <<<<<<<<<<<<<< * istartb, startr = (self.startb, 0) * i = istart */ __pyx_t_1 = __pyx_v_self->nrowsinbuf; __pyx_t_7 = __pyx_v_istart; __pyx_t_8 = __pyx_v_istart; __pyx_v_inrowsinbuf = __pyx_t_1; __pyx_v_inextelement = __pyx_t_7; __pyx_v_inrowsread = __pyx_t_8; /* "tables/tableextension.pyx":1197 * istart, istop, istep = (self.start, self.stop, self.step) * inrowsinbuf, inextelement, inrowsread = (self.nrowsinbuf, istart, istart) * istartb, startr = (self.startb, 0) # <<<<<<<<<<<<<< * i = istart * if 0 < istep: */ __pyx_t_8 = __pyx_v_self->startb; __pyx_t_7 = 0; __pyx_v_istartb = __pyx_t_8; __pyx_v_startr = __pyx_t_7; /* "tables/tableextension.pyx":1198 * inrowsinbuf, inextelement, inrowsread = (self.nrowsinbuf, istart, istart) * istartb, startr = (self.startb, 0) * i = istart # <<<<<<<<<<<<<< * if 0 < istep: * while i < istop: */ __pyx_v_i = __pyx_v_istart; /* "tables/tableextension.pyx":1199 * istartb, startr = (self.startb, 0) * i = istart * if 0 < istep: # <<<<<<<<<<<<<< * while i < istop: * if (inextelement >= inrowsread + inrowsinbuf): */ __pyx_t_9 = (0 < __pyx_v_istep); if (__pyx_t_9) { /* "tables/tableextension.pyx":1200 * i = istart * if 0 < istep: * while i < istop: # <<<<<<<<<<<<<< * if (inextelement >= inrowsread + inrowsinbuf): * inrowsread = inrowsread + inrowsinbuf */ while (1) { __pyx_t_9 = (__pyx_v_i < __pyx_v_istop); if (!__pyx_t_9) break; /* "tables/tableextension.pyx":1201 * if 0 < istep: * while i < istop: * if (inextelement >= inrowsread + inrowsinbuf): # <<<<<<<<<<<<<< * inrowsread = inrowsread + inrowsinbuf * i = i + inrowsinbuf */ __pyx_t_9 = (__pyx_v_inextelement >= (__pyx_v_inrowsread + __pyx_v_inrowsinbuf)); if (__pyx_t_9) { /* "tables/tableextension.pyx":1202 * while i < istop: * if (inextelement >= inrowsread + inrowsinbuf): * inrowsread = inrowsread + inrowsinbuf # <<<<<<<<<<<<<< * i = i + inrowsinbuf * continue */ __pyx_v_inrowsread = (__pyx_v_inrowsread + __pyx_v_inrowsinbuf); /* "tables/tableextension.pyx":1203 * if (inextelement >= inrowsread + inrowsinbuf): * inrowsread = inrowsread + inrowsinbuf * i = i + inrowsinbuf # <<<<<<<<<<<<<< * continue * # Compute the end for this iteration */ __pyx_v_i = (__pyx_v_i + __pyx_v_inrowsinbuf); /* "tables/tableextension.pyx":1204 * inrowsread = inrowsread + inrowsinbuf * i = i + inrowsinbuf * continue # <<<<<<<<<<<<<< * # Compute the end for this iteration * istopb = istop - inrowsread */ goto __pyx_L4_continue; goto __pyx_L6; } __pyx_L6:; /* "tables/tableextension.pyx":1206 * continue * # Compute the end for this iteration * istopb = istop - inrowsread # <<<<<<<<<<<<<< * if istopb > inrowsinbuf: * istopb = inrowsinbuf */ __pyx_v_istopb = (__pyx_v_istop - __pyx_v_inrowsread); /* "tables/tableextension.pyx":1207 * # Compute the end for this iteration * istopb = istop - inrowsread * if istopb > inrowsinbuf: # <<<<<<<<<<<<<< * istopb = inrowsinbuf * stopr = startr + ((istopb - istartb - 1) / istep) + 1 */ __pyx_t_9 = (__pyx_v_istopb > __pyx_v_inrowsinbuf); if (__pyx_t_9) { /* "tables/tableextension.pyx":1208 * istopb = istop - inrowsread * if istopb > inrowsinbuf: * istopb = inrowsinbuf # <<<<<<<<<<<<<< * stopr = startr + ((istopb - istartb - 1) / istep) + 1 * # Read a chunk */ __pyx_v_istopb = __pyx_v_inrowsinbuf; goto __pyx_L7; } __pyx_L7:; /* "tables/tableextension.pyx":1209 * if istopb > inrowsinbuf: * istopb = inrowsinbuf * stopr = startr + ((istopb - istartb - 1) / istep) + 1 # <<<<<<<<<<<<<< * # Read a chunk * inrowsread = inrowsread + self.table._read_records(i, inrowsinbuf, */ __pyx_t_7 = ((__pyx_v_istopb - __pyx_v_istartb) - 1); if (unlikely(__pyx_v_istep == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(PY_LONG_LONG) == sizeof(long) && unlikely(__pyx_v_istep == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_7))) { PyErr_Format(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_stopr = ((__pyx_v_startr + __Pyx_div_PY_LONG_LONG(__pyx_t_7, __pyx_v_istep)) + 1); /* "tables/tableextension.pyx":1211 * stopr = startr + ((istopb - istartb - 1) / istep) + 1 * # Read a chunk * inrowsread = inrowsread + self.table._read_records(i, inrowsinbuf, # <<<<<<<<<<<<<< * self.iobuf) * # Assign the correct part to result */ __pyx_t_6 = PyLong_FromLongLong(__pyx_v_inrowsread); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s___read_records); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyLong_FromLongLong(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_inrowsinbuf); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); /* "tables/tableextension.pyx":1212 * # Read a chunk * inrowsread = inrowsread + self.table._read_records(i, inrowsinbuf, * self.iobuf) # <<<<<<<<<<<<<< * # Assign the correct part to result * fields = self.iobuf */ __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_self->iobuf); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_self->iobuf); __Pyx_GIVEREF(__pyx_v_self->iobuf); __pyx_t_5 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyNumber_Add(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_2 = __Pyx_PyInt_AsLongLong(__pyx_t_11); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_inrowsread = __pyx_t_2; /* "tables/tableextension.pyx":1214 * self.iobuf) * # Assign the correct part to result * fields = self.iobuf # <<<<<<<<<<<<<< * if field: * fields = get_nested_field(fields, field) */ __pyx_t_11 = __pyx_v_self->iobuf; __Pyx_INCREF(__pyx_t_11); __Pyx_XDECREF(__pyx_v_fields); __pyx_v_fields = __pyx_t_11; __pyx_t_11 = 0; /* "tables/tableextension.pyx":1215 * # Assign the correct part to result * fields = self.iobuf * if field: # <<<<<<<<<<<<<< * fields = get_nested_field(fields, field) * result[startr:stopr] = fields[istartb:istopb:istep] */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_field); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { /* "tables/tableextension.pyx":1216 * fields = self.iobuf * if field: * fields = get_nested_field(fields, field) # <<<<<<<<<<<<<< * result[startr:stopr] = fields[istartb:istopb:istep] * */ __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_nested_field); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_fields); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_fields); __Pyx_GIVEREF(__pyx_v_fields); __Pyx_INCREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); __pyx_t_6 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_v_fields); __pyx_v_fields = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L8; } __pyx_L8:; /* "tables/tableextension.pyx":1217 * if field: * fields = get_nested_field(fields, field) * result[startr:stopr] = fields[istartb:istopb:istep] # <<<<<<<<<<<<<< * * # Compute some indexes for the next iteration */ __pyx_t_6 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_istartb); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = PyLong_FromLongLong(__pyx_v_istopb); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyLong_FromLongLong(__pyx_v_istep); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = PySlice_New(__pyx_t_6, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyObject_GetItem(__pyx_v_fields, __pyx_t_4); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PySequence_SetSlice(__pyx_v_result, __pyx_v_startr, __pyx_v_stopr, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "tables/tableextension.pyx":1220 * * # Compute some indexes for the next iteration * startr = stopr # <<<<<<<<<<<<<< * j = istartb + ((istopb - istartb - 1) / istep) * istep * istartb = (j+istep) % inrowsinbuf */ __pyx_v_startr = __pyx_v_stopr; /* "tables/tableextension.pyx":1221 * # Compute some indexes for the next iteration * startr = stopr * j = istartb + ((istopb - istartb - 1) / istep) * istep # <<<<<<<<<<<<<< * istartb = (j+istep) % inrowsinbuf * inextelement = inextelement + istep */ __pyx_t_7 = ((__pyx_v_istopb - __pyx_v_istartb) - 1); if (unlikely(__pyx_v_istep == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(PY_LONG_LONG) == sizeof(long) && unlikely(__pyx_v_istep == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_7))) { PyErr_Format(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_j = (__pyx_v_istartb + (__Pyx_div_PY_LONG_LONG(__pyx_t_7, __pyx_v_istep) * __pyx_v_istep)); /* "tables/tableextension.pyx":1222 * startr = stopr * j = istartb + ((istopb - istartb - 1) / istep) * istep * istartb = (j+istep) % inrowsinbuf # <<<<<<<<<<<<<< * inextelement = inextelement + istep * i = i + inrowsinbuf */ __pyx_t_2 = (__pyx_v_j + __pyx_v_istep); if (unlikely(__pyx_v_inrowsinbuf == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_istartb = __Pyx_mod_hsize_t(__pyx_t_2, __pyx_v_inrowsinbuf); /* "tables/tableextension.pyx":1223 * j = istartb + ((istopb - istartb - 1) / istep) * istep * istartb = (j+istep) % inrowsinbuf * inextelement = inextelement + istep # <<<<<<<<<<<<<< * i = i + inrowsinbuf * elif 0 > istep: */ __pyx_v_inextelement = (__pyx_v_inextelement + __pyx_v_istep); /* "tables/tableextension.pyx":1224 * istartb = (j+istep) % inrowsinbuf * inextelement = inextelement + istep * i = i + inrowsinbuf # <<<<<<<<<<<<<< * elif 0 > istep: * inrowsinbuf = self.nrowsinbuf */ __pyx_v_i = (__pyx_v_i + __pyx_v_inrowsinbuf); __pyx_L4_continue:; } goto __pyx_L3; } /* "tables/tableextension.pyx":1225 * inextelement = inextelement + istep * i = i + inrowsinbuf * elif 0 > istep: # <<<<<<<<<<<<<< * inrowsinbuf = self.nrowsinbuf * #istartb = self.startb */ __pyx_t_9 = (0 > __pyx_v_istep); if (__pyx_t_9) { /* "tables/tableextension.pyx":1226 * i = i + inrowsinbuf * elif 0 > istep: * inrowsinbuf = self.nrowsinbuf # <<<<<<<<<<<<<< * #istartb = self.startb * istartb = self.nrowsinbuf - 1 */ __pyx_t_7 = __pyx_v_self->nrowsinbuf; __pyx_v_inrowsinbuf = __pyx_t_7; /* "tables/tableextension.pyx":1228 * inrowsinbuf = self.nrowsinbuf * #istartb = self.startb * istartb = self.nrowsinbuf - 1 # <<<<<<<<<<<<<< * #istopb = self.stopb - 1 * istopb = -1 */ __pyx_v_istartb = (__pyx_v_self->nrowsinbuf - 1); /* "tables/tableextension.pyx":1230 * istartb = self.nrowsinbuf - 1 * #istopb = self.stopb - 1 * istopb = -1 # <<<<<<<<<<<<<< * startr = 0 * i = istart */ __pyx_v_istopb = -1; /* "tables/tableextension.pyx":1231 * #istopb = self.stopb - 1 * istopb = -1 * startr = 0 # <<<<<<<<<<<<<< * i = istart * inextelement = istart */ __pyx_v_startr = 0; /* "tables/tableextension.pyx":1232 * istopb = -1 * startr = 0 * i = istart # <<<<<<<<<<<<<< * inextelement = istart * inrowsread = 0 */ __pyx_v_i = __pyx_v_istart; /* "tables/tableextension.pyx":1233 * startr = 0 * i = istart * inextelement = istart # <<<<<<<<<<<<<< * inrowsread = 0 * while i-1 > istop: */ __pyx_v_inextelement = __pyx_v_istart; /* "tables/tableextension.pyx":1234 * i = istart * inextelement = istart * inrowsread = 0 # <<<<<<<<<<<<<< * while i-1 > istop: * #if (inextelement <= inrowsread + inrowsinbuf): */ __pyx_v_inrowsread = 0; /* "tables/tableextension.pyx":1235 * inextelement = istart * inrowsread = 0 * while i-1 > istop: # <<<<<<<<<<<<<< * #if (inextelement <= inrowsread + inrowsinbuf): * if (inextelement < i - inrowsinbuf): */ while (1) { __pyx_t_9 = ((__pyx_v_i - 1) > __pyx_v_istop); if (!__pyx_t_9) break; /* "tables/tableextension.pyx":1237 * while i-1 > istop: * #if (inextelement <= inrowsread + inrowsinbuf): * if (inextelement < i - inrowsinbuf): # <<<<<<<<<<<<<< * inrowsread = inrowsread + inrowsinbuf * i = i - inrowsinbuf */ __pyx_t_9 = (__pyx_v_inextelement < (__pyx_v_i - __pyx_v_inrowsinbuf)); if (__pyx_t_9) { /* "tables/tableextension.pyx":1238 * #if (inextelement <= inrowsread + inrowsinbuf): * if (inextelement < i - inrowsinbuf): * inrowsread = inrowsread + inrowsinbuf # <<<<<<<<<<<<<< * i = i - inrowsinbuf * continue */ __pyx_v_inrowsread = (__pyx_v_inrowsread + __pyx_v_inrowsinbuf); /* "tables/tableextension.pyx":1239 * if (inextelement < i - inrowsinbuf): * inrowsread = inrowsread + inrowsinbuf * i = i - inrowsinbuf # <<<<<<<<<<<<<< * continue * # Compute the end for this iteration */ __pyx_v_i = (__pyx_v_i - __pyx_v_inrowsinbuf); /* "tables/tableextension.pyx":1240 * inrowsread = inrowsread + inrowsinbuf * i = i - inrowsinbuf * continue # <<<<<<<<<<<<<< * # Compute the end for this iteration * stopr = startr + ((istopb - istartb - 1) / istep) */ goto __pyx_L9_continue; goto __pyx_L11; } __pyx_L11:; /* "tables/tableextension.pyx":1242 * continue * # Compute the end for this iteration * stopr = startr + ((istopb - istartb - 1) / istep) # <<<<<<<<<<<<<< * # Read a chunk * inrowsread = inrowsread + self.table._read_records(i - inrowsinbuf + 1, */ __pyx_t_7 = ((__pyx_v_istopb - __pyx_v_istartb) - 1); if (unlikely(__pyx_v_istep == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(PY_LONG_LONG) == sizeof(long) && unlikely(__pyx_v_istep == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_7))) { PyErr_Format(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_stopr = (__pyx_v_startr + __Pyx_div_PY_LONG_LONG(__pyx_t_7, __pyx_v_istep)); /* "tables/tableextension.pyx":1244 * stopr = startr + ((istopb - istartb - 1) / istep) * # Read a chunk * inrowsread = inrowsread + self.table._read_records(i - inrowsinbuf + 1, # <<<<<<<<<<<<<< * inrowsinbuf, self.iobuf) * # Assign the correct part to result */ __pyx_t_11 = PyLong_FromLongLong(__pyx_v_inrowsread); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s___read_records); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_to_py_hsize_t(((__pyx_v_i - __pyx_v_inrowsinbuf) + 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); /* "tables/tableextension.pyx":1245 * # Read a chunk * inrowsread = inrowsread + self.table._read_records(i - inrowsinbuf + 1, * inrowsinbuf, self.iobuf) # <<<<<<<<<<<<<< * # Assign the correct part to result * fields = self.iobuf */ __pyx_t_6 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_inrowsinbuf); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self->iobuf); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_self->iobuf); __Pyx_GIVEREF(__pyx_v_self->iobuf); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Add(__pyx_t_11, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyInt_AsLongLong(__pyx_t_5); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_inrowsread = __pyx_t_2; /* "tables/tableextension.pyx":1247 * inrowsinbuf, self.iobuf) * # Assign the correct part to result * fields = self.iobuf # <<<<<<<<<<<<<< * if field: * fields = get_nested_field(fields, field) */ __pyx_t_5 = __pyx_v_self->iobuf; __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF(__pyx_v_fields); __pyx_v_fields = __pyx_t_5; __pyx_t_5 = 0; /* "tables/tableextension.pyx":1248 * # Assign the correct part to result * fields = self.iobuf * if field: # <<<<<<<<<<<<<< * fields = get_nested_field(fields, field) * if istopb >= 0: */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_field); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { /* "tables/tableextension.pyx":1249 * fields = self.iobuf * if field: * fields = get_nested_field(fields, field) # <<<<<<<<<<<<<< * if istopb >= 0: * result[startr:stopr] = fields[istartb:istopb:istep] */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_nested_field); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_fields); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_fields); __Pyx_GIVEREF(__pyx_v_fields); __Pyx_INCREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); __pyx_t_11 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_v_fields); __pyx_v_fields = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L12; } __pyx_L12:; /* "tables/tableextension.pyx":1250 * if field: * fields = get_nested_field(fields, field) * if istopb >= 0: # <<<<<<<<<<<<<< * result[startr:stopr] = fields[istartb:istopb:istep] * else: */ __pyx_t_9 = (__pyx_v_istopb >= 0); if (__pyx_t_9) { /* "tables/tableextension.pyx":1251 * fields = get_nested_field(fields, field) * if istopb >= 0: * result[startr:stopr] = fields[istartb:istopb:istep] # <<<<<<<<<<<<<< * else: * result[startr:stopr] = fields[istartb::istep] */ __pyx_t_11 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_istartb); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = PyLong_FromLongLong(__pyx_v_istopb); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyLong_FromLongLong(__pyx_v_istep); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PySlice_New(__pyx_t_11, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_GetItem(__pyx_v_fields, __pyx_t_10); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__Pyx_PySequence_SetSlice(__pyx_v_result, __pyx_v_startr, __pyx_v_stopr, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13; } /*else*/ { /* "tables/tableextension.pyx":1253 * result[startr:stopr] = fields[istartb:istopb:istep] * else: * result[startr:stopr] = fields[istartb::istep] # <<<<<<<<<<<<<< * * # Compute some indexes for the next iteration */ __pyx_t_5 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_istartb); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyLong_FromLongLong(__pyx_v_istep); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PySlice_New(__pyx_t_5, Py_None, __pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_GetItem(__pyx_v_fields, __pyx_t_6); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_PySequence_SetSlice(__pyx_v_result, __pyx_v_startr, __pyx_v_stopr, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_L13:; /* "tables/tableextension.pyx":1256 * * # Compute some indexes for the next iteration * startr = stopr # <<<<<<<<<<<<<< * istartb = (i - istartb)%inrowsinbuf * inextelement = inextelement + istep */ __pyx_v_startr = __pyx_v_stopr; /* "tables/tableextension.pyx":1257 * # Compute some indexes for the next iteration * startr = stopr * istartb = (i - istartb)%inrowsinbuf # <<<<<<<<<<<<<< * inextelement = inextelement + istep * i = i - inrowsinbuf */ __pyx_t_7 = (__pyx_v_i - __pyx_v_istartb); if (unlikely(__pyx_v_inrowsinbuf == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_istartb = __Pyx_mod_hsize_t(__pyx_t_7, __pyx_v_inrowsinbuf); /* "tables/tableextension.pyx":1258 * startr = stopr * istartb = (i - istartb)%inrowsinbuf * inextelement = inextelement + istep # <<<<<<<<<<<<<< * i = i - inrowsinbuf * self._riterator = 0 # out of iterator */ __pyx_v_inextelement = (__pyx_v_inextelement + __pyx_v_istep); /* "tables/tableextension.pyx":1259 * istartb = (i - istartb)%inrowsinbuf * inextelement = inextelement + istep * i = i - inrowsinbuf # <<<<<<<<<<<<<< * self._riterator = 0 # out of iterator * return */ __pyx_v_i = (__pyx_v_i - __pyx_v_inrowsinbuf); __pyx_L9_continue:; } goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":1260 * inextelement = inextelement + istep * i = i - inrowsinbuf * self._riterator = 0 # out of iterator # <<<<<<<<<<<<<< * return * */ __pyx_v_self->_riterator = 0; /* "tables/tableextension.pyx":1261 * i = i - inrowsinbuf * self._riterator = 0 # out of iterator * return # <<<<<<<<<<<<<< * * _fillCol = previous_api(_fill_col) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("tables.tableextension.Row._fill_col", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fields); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_11append(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_10append[] = "Add a new row of data to the end of the dataset.\n\n Once you have filled the proper fields for the current\n row, calling this method actually appends the new data to the\n *output buffer* (which will eventually be\n dumped to disk). If you have not set the value of a field, the\n default value of the column will be used.\n\n .. warning::\n\n After completion of the loop in which :meth:`Row.append` has\n been called, it is always convenient to make a call to\n :meth:`Table.flush` in order to avoid losing the last rows that\n may still remain in internal buffers.\n\n Examples\n --------\n\n ::\n\n row = table.row\n for i in xrange(nrows):\n row['col1'] = i-1\n row['col2'] = 'a'\n row['col3'] = -1.0\n row.append()\n table.flush()\n\n "; static PyObject *__pyx_pw_6tables_14tableextension_3Row_11append(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("append (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_10append(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1265 * _fillCol = previous_api(_fill_col) * * def append(self): # <<<<<<<<<<<<<< * """Add a new row of data to the end of the dataset. * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_10append(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyArrayObject *__pyx_v_iobuf = 0; PyArrayObject *__pyx_v_wrec = 0; PyArrayObject *__pyx_v_wreccpy = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("append", 0); /* "tables/tableextension.pyx":1297 * cdef ndarray iobuf, wrec, wreccpy * * if self.ro_filemode: # <<<<<<<<<<<<<< * raise IOError("Attempt to write over a file opened in read-only mode") * */ if (__pyx_v_self->ro_filemode) { /* "tables/tableextension.pyx":1298 * * if self.ro_filemode: * raise IOError("Attempt to write over a file opened in read-only mode") # <<<<<<<<<<<<<< * * if not self.chunked: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_k_tuple_40), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":1300 * raise IOError("Attempt to write over a file opened in read-only mode") * * if not self.chunked: # <<<<<<<<<<<<<< * raise HDF5ExtError("You cannot append rows to a non-chunked table.", * h5tb=False) */ __pyx_t_2 = (!__pyx_v_self->chunked); if (__pyx_t_2) { /* "tables/tableextension.pyx":1301 * * if not self.chunked: * raise HDF5ExtError("You cannot append rows to a non-chunked table.", # <<<<<<<<<<<<<< * h5tb=False) * */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); /* "tables/tableextension.pyx":1302 * if not self.chunked: * raise HDF5ExtError("You cannot append rows to a non-chunked table.", * h5tb=False) # <<<<<<<<<<<<<< * * if self._riterator: */ __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__h5tb), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_42), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "tables/tableextension.pyx":1304 * h5tb=False) * * if self._riterator: # <<<<<<<<<<<<<< * raise NotImplementedError("You cannot append rows when in middle of a table iterator. If what you want is to update records, use Row.update() instead.") * */ if (__pyx_v_self->_riterator) { /* "tables/tableextension.pyx":1305 * * if self._riterator: * raise NotImplementedError("You cannot append rows when in middle of a table iterator. If what you want is to update records, use Row.update() instead.") # <<<<<<<<<<<<<< * * # Commit the private record into the write buffer */ __pyx_t_4 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "tables/tableextension.pyx":1310 * # self.iobuf[self._unsaved_nrows] = self.wrec * # The next is faster * iobuf = self.iobuf; wrec = self.wrec # <<<<<<<<<<<<<< * memcpy(iobuf.data + self._unsaved_nrows * self._stride, * wrec.data, self._rowsize) */ __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self->iobuf))); __pyx_v_iobuf = ((PyArrayObject *)__pyx_v_self->iobuf); __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self->wrec))); __pyx_v_wrec = ((PyArrayObject *)__pyx_v_self->wrec); /* "tables/tableextension.pyx":1312 * iobuf = self.iobuf; wrec = self.wrec * memcpy(iobuf.data + self._unsaved_nrows * self._stride, * wrec.data, self._rowsize) # <<<<<<<<<<<<<< * # Restore the defaults for the private record * # self.wrec[:] = self.wreccpy */ memcpy((__pyx_v_iobuf->data + (__pyx_v_self->_unsaved_nrows * __pyx_v_self->_stride)), __pyx_v_wrec->data, __pyx_v_self->_rowsize); /* "tables/tableextension.pyx":1316 * # self.wrec[:] = self.wreccpy * # The next is faster * wreccpy = self.wreccpy # <<<<<<<<<<<<<< * memcpy(wrec.data, wreccpy.data, self._rowsize) * self._unsaved_nrows = self._unsaved_nrows + 1 */ __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self->wreccpy))); __pyx_v_wreccpy = ((PyArrayObject *)__pyx_v_self->wreccpy); /* "tables/tableextension.pyx":1317 * # The next is faster * wreccpy = self.wreccpy * memcpy(wrec.data, wreccpy.data, self._rowsize) # <<<<<<<<<<<<<< * self._unsaved_nrows = self._unsaved_nrows + 1 * # When the buffer is full, flush it */ memcpy(__pyx_v_wrec->data, __pyx_v_wreccpy->data, __pyx_v_self->_rowsize); /* "tables/tableextension.pyx":1318 * wreccpy = self.wreccpy * memcpy(wrec.data, wreccpy.data, self._rowsize) * self._unsaved_nrows = self._unsaved_nrows + 1 # <<<<<<<<<<<<<< * # When the buffer is full, flush it * if self._unsaved_nrows == self.nrowsinbuf: */ __pyx_v_self->_unsaved_nrows = (__pyx_v_self->_unsaved_nrows + 1); /* "tables/tableextension.pyx":1320 * self._unsaved_nrows = self._unsaved_nrows + 1 * # When the buffer is full, flush it * if self._unsaved_nrows == self.nrowsinbuf: # <<<<<<<<<<<<<< * self._flush_buffered_rows() * */ __pyx_t_2 = (__pyx_v_self->_unsaved_nrows == __pyx_v_self->nrowsinbuf); if (__pyx_t_2) { /* "tables/tableextension.pyx":1321 * # When the buffer is full, flush it * if self._unsaved_nrows == self.nrowsinbuf: * self._flush_buffered_rows() # <<<<<<<<<<<<<< * * def _flush_buffered_rows(self): */ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_45); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } __pyx_L6:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.tableextension.Row.append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_iobuf); __Pyx_XDECREF((PyObject *)__pyx_v_wrec); __Pyx_XDECREF((PyObject *)__pyx_v_wreccpy); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_13_flush_buffered_rows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_3Row_13_flush_buffered_rows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_flush_buffered_rows (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_12_flush_buffered_rows(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1323 * self._flush_buffered_rows() * * def _flush_buffered_rows(self): # <<<<<<<<<<<<<< * if self._unsaved_nrows > 0: * self.table._save_buffered_rows(self.iobuf, self._unsaved_nrows) */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_12_flush_buffered_rows(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_flush_buffered_rows", 0); /* "tables/tableextension.pyx":1324 * * def _flush_buffered_rows(self): * if self._unsaved_nrows > 0: # <<<<<<<<<<<<<< * self.table._save_buffered_rows(self.iobuf, self._unsaved_nrows) * # Reset the buffer unsaved counter */ __pyx_t_1 = (__pyx_v_self->_unsaved_nrows > 0); if (__pyx_t_1) { /* "tables/tableextension.pyx":1325 * def _flush_buffered_rows(self): * if self._unsaved_nrows > 0: * self.table._save_buffered_rows(self.iobuf, self._unsaved_nrows) # <<<<<<<<<<<<<< * # Reset the buffer unsaved counter * self._unsaved_nrows = 0 */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s___save_buffered_rows); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong(__pyx_v_self->_unsaved_nrows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->iobuf); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->iobuf); __Pyx_GIVEREF(__pyx_v_self->iobuf); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":1327 * self.table._save_buffered_rows(self.iobuf, self._unsaved_nrows) * # Reset the buffer unsaved counter * self._unsaved_nrows = 0 # <<<<<<<<<<<<<< * * _flushBufferedRows = previous_api(_flush_buffered_rows) */ __pyx_v_self->_unsaved_nrows = 0; goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.tableextension.Row._flush_buffered_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_15_get_unsaved_nrows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_14tableextension_3Row_15_get_unsaved_nrows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_unsaved_nrows (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_14_get_unsaved_nrows(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1331 * _flushBufferedRows = previous_api(_flush_buffered_rows) * * def _get_unsaved_nrows(self): # <<<<<<<<<<<<<< * return self._unsaved_nrows * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_14_get_unsaved_nrows(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_unsaved_nrows", 0); /* "tables/tableextension.pyx":1332 * * def _get_unsaved_nrows(self): * return self._unsaved_nrows # <<<<<<<<<<<<<< * * _getUnsavedNrows = previous_api(_get_unsaved_nrows) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_unsaved_nrows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("tables.tableextension.Row._get_unsaved_nrows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_17update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_16update[] = "Change the data of the current row in the dataset.\n\n This method allows you to modify values in a table when you are in the\n middle of a table iterator like :meth:`Table.iterrows` or\n :meth:`Table.where`.\n\n Once you have filled the proper fields for the current row, calling\n this method actually changes data in the *output buffer* (which will\n eventually be dumped to disk). If you have not set the value of a\n field, its original value will be used.\n\n .. warning::\n\n After completion of the loop in which :meth:`Row.update` has\n been called, it is always convenient to make a call to\n :meth:`Table.flush` in order to avoid losing changed rows that\n may still remain in internal buffers.\n\n Examples\n --------\n\n ::\n\n for row in table.iterrows(step=10):\n row['col1'] = row.nrow\n row['col2'] = 'b'\n row['col3'] = 0.0\n row.update()\n table.flush()\n\n which modifies every tenth row in table. Or::\n\n for row in table.where('col1 > 3'):\n row['col1'] = row.nrow\n row['col2'] = 'b'\n row['col3'] = 0.0\n row.update()\n table.flush()\n\n which just updates the rows with values bigger than 3 in the first\n column.\n\n "; static PyObject *__pyx_pw_6tables_14tableextension_3Row_17update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_16update(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1336 * _getUnsavedNrows = previous_api(_get_unsaved_nrows) * * def update(self): # <<<<<<<<<<<<<< * """Change the data of the current row in the dataset. * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_16update(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyArrayObject *__pyx_v_iobufcpy = 0; PyArrayObject *__pyx_v_iobuf = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update", 0); /* "tables/tableextension.pyx":1383 * cdef ndarray iobufcpy, iobuf * * if self.ro_filemode: # <<<<<<<<<<<<<< * raise IOError("Attempt to write over a file opened in read-only mode") * */ if (__pyx_v_self->ro_filemode) { /* "tables/tableextension.pyx":1384 * * if self.ro_filemode: * raise IOError("Attempt to write over a file opened in read-only mode") # <<<<<<<<<<<<<< * * if not self._riterator: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":1386 * raise IOError("Attempt to write over a file opened in read-only mode") * * if not self._riterator: # <<<<<<<<<<<<<< * raise NotImplementedError("You are only allowed to update rows through the Row.update() method if you are in the middle of a table iterator.") * */ __pyx_t_2 = (!__pyx_v_self->_riterator); if (__pyx_t_2) { /* "tables/tableextension.pyx":1387 * * if not self._riterator: * raise NotImplementedError("You are only allowed to update rows through the Row.update() method if you are in the middle of a table iterator.") # <<<<<<<<<<<<<< * * if self.mod_elements is None: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "tables/tableextension.pyx":1389 * raise NotImplementedError("You are only allowed to update rows through the Row.update() method if you are in the middle of a table iterator.") * * if self.mod_elements is None: # <<<<<<<<<<<<<< * # Initialize an array for keeping the modified elements * # (just in case Row.update() would be used) */ __pyx_t_2 = (__pyx_v_self->mod_elements == Py_None); if (__pyx_t_2) { /* "tables/tableextension.pyx":1392 * # Initialize an array for keeping the modified elements * # (just in case Row.update() would be used) * self.mod_elements = numpy.empty(shape=self.nrowsinbuf, dtype=SizeType) # <<<<<<<<<<<<<< * # We need a different copy for self.iobuf here * self.iobufcpy = self.iobuf.copy() */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_self->nrowsinbuf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__shape), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->mod_elements); __Pyx_DECREF(__pyx_v_self->mod_elements); __pyx_v_self->mod_elements = __pyx_t_4; __pyx_t_4 = 0; /* "tables/tableextension.pyx":1394 * self.mod_elements = numpy.empty(shape=self.nrowsinbuf, dtype=SizeType) * # We need a different copy for self.iobuf here * self.iobufcpy = self.iobuf.copy() # <<<<<<<<<<<<<< * * # Add this row to the list of elements to be modified */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->iobuf, __pyx_n_s__copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->iobufcpy); __Pyx_DECREF(__pyx_v_self->iobufcpy); __pyx_v_self->iobufcpy = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L5; } __pyx_L5:; /* "tables/tableextension.pyx":1397 * * # Add this row to the list of elements to be modified * self.mod_elements[self._mod_nrows] = self._nrow # <<<<<<<<<<<<<< * # Copy the current buffer row in input to the output buffer * # self.iobufcpy[self._mod_nrows] = self.iobuf[self._row] */ __pyx_t_1 = PyLong_FromLongLong(__pyx_v_self->_nrow); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (__Pyx_SetItemInt(__pyx_v_self->mod_elements, __pyx_v_self->_mod_nrows, __pyx_t_1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":1401 * # self.iobufcpy[self._mod_nrows] = self.iobuf[self._row] * # The next is faster * iobufcpy = self.iobufcpy; iobuf = self.iobuf # <<<<<<<<<<<<<< * memcpy(iobufcpy.data + self._mod_nrows * self._stride, * iobuf.data + self._row * self._stride, self._rowsize) */ __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self->iobufcpy))); __pyx_v_iobufcpy = ((PyArrayObject *)__pyx_v_self->iobufcpy); __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self->iobuf))); __pyx_v_iobuf = ((PyArrayObject *)__pyx_v_self->iobuf); /* "tables/tableextension.pyx":1403 * iobufcpy = self.iobufcpy; iobuf = self.iobuf * memcpy(iobufcpy.data + self._mod_nrows * self._stride, * iobuf.data + self._row * self._stride, self._rowsize) # <<<<<<<<<<<<<< * # Increase the modified buffer count by one * self._mod_nrows = self._mod_nrows + 1 */ memcpy((__pyx_v_iobufcpy->data + (__pyx_v_self->_mod_nrows * __pyx_v_self->_stride)), (__pyx_v_iobuf->data + (__pyx_v_self->_row * __pyx_v_self->_stride)), __pyx_v_self->_rowsize); /* "tables/tableextension.pyx":1405 * iobuf.data + self._row * self._stride, self._rowsize) * # Increase the modified buffer count by one * self._mod_nrows = self._mod_nrows + 1 # <<<<<<<<<<<<<< * # When the buffer is full, flush it * if self._mod_nrows == self.nrowsinbuf: */ __pyx_v_self->_mod_nrows = (__pyx_v_self->_mod_nrows + 1); /* "tables/tableextension.pyx":1407 * self._mod_nrows = self._mod_nrows + 1 * # When the buffer is full, flush it * if self._mod_nrows == self.nrowsinbuf: # <<<<<<<<<<<<<< * self._flush_mod_rows() * */ __pyx_t_2 = (__pyx_v_self->_mod_nrows == __pyx_v_self->nrowsinbuf); if (__pyx_t_2) { /* "tables/tableextension.pyx":1408 * # When the buffer is full, flush it * if self._mod_nrows == self.nrowsinbuf: * self._flush_mod_rows() # <<<<<<<<<<<<<< * * def _flush_mod_rows(self): */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___flush_mod_rows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } __pyx_L6:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.tableextension.Row.update", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_iobufcpy); __Pyx_XDECREF((PyObject *)__pyx_v_iobuf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_19_flush_mod_rows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_18_flush_mod_rows[] = "Flush any possible modified row using Row.update()"; static PyObject *__pyx_pw_6tables_14tableextension_3Row_19_flush_mod_rows(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_flush_mod_rows (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_18_flush_mod_rows(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1410 * self._flush_mod_rows() * * def _flush_mod_rows(self): # <<<<<<<<<<<<<< * """Flush any possible modified row using Row.update()""" * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_18_flush_mod_rows(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_v_table = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_flush_mod_rows", 0); /* "tables/tableextension.pyx":1413 * """Flush any possible modified row using Row.update()""" * * table = self.table # <<<<<<<<<<<<<< * # Save the records on disk * table._update_elements(self._mod_nrows, self.mod_elements, self.iobufcpy) */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_table = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":1415 * table = self.table * # Save the records on disk * table._update_elements(self._mod_nrows, self.mod_elements, self.iobufcpy) # <<<<<<<<<<<<<< * # Reset the counter of modified rows to 0 * self._mod_nrows = 0 */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s___update_elements); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyInt_FromLong(__pyx_v_self->_mod_nrows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->mod_elements); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->mod_elements); __Pyx_GIVEREF(__pyx_v_self->mod_elements); __Pyx_INCREF(__pyx_v_self->iobufcpy); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->iobufcpy); __Pyx_GIVEREF(__pyx_v_self->iobufcpy); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":1417 * table._update_elements(self._mod_nrows, self.mod_elements, self.iobufcpy) * # Reset the counter of modified rows to 0 * self._mod_nrows = 0 # <<<<<<<<<<<<<< * # Mark the modified fields' indexes as dirty. * table._mark_columns_as_dirty(self.modified_fields) */ __pyx_v_self->_mod_nrows = 0; /* "tables/tableextension.pyx":1419 * self._mod_nrows = 0 * # Mark the modified fields' indexes as dirty. * table._mark_columns_as_dirty(self.modified_fields) # <<<<<<<<<<<<<< * * _flushModRows = previous_api(_flush_mod_rows) */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_table, __pyx_n_s_49); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self->modified_fields); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->modified_fields); __Pyx_GIVEREF(__pyx_v_self->modified_fields); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.tableextension.Row._flush_mod_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_table); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6tables_14tableextension_3Row_21__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_20__contains__[] = "__contains__(item)\n\n A true value is returned if item is found in current row, false\n otherwise.\n\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6tables_14tableextension_3Row_20__contains__; #endif static int __pyx_pw_6tables_14tableextension_3Row_21__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_20__contains__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self), ((PyObject *)__pyx_v_item)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1423 * _flushModRows = previous_api(_flush_mod_rows) * * def __contains__(self, item): # <<<<<<<<<<<<<< * """__contains__(item) * */ static int __pyx_pf_6tables_14tableextension_3Row_20__contains__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_item) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); /* "tables/tableextension.pyx":1431 * """ * * return item in self.fetch_all_fields() # <<<<<<<<<<<<<< * * # This method is twice as faster than __getattr__ because there is */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__fetch_all_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_item, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("tables.tableextension.Row.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_23__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_22__getitem__[] = "__getitem__(key)\n\n Get the row field specified by the `key`.\n\n The key can be a string (the name of the field), an integer (the\n position of the field) or a slice (the range of field positions). When\n key is a slice, the returned value is a *tuple* containing the values\n of the specified fields.\n\n Examples\n --------\n\n ::\n\n res = [row['var3'] for row in table.where('var2 < 20')]\n\n which selects the var3 field for all the rows that fulfil the\n condition. Or::\n\n res = [row[4] for row in table if row[1] < 20]\n\n which selects the field in the *4th* position for all the rows that\n fulfil the condition. Or::\n\n res = [row[:] for row in table if row['var2'] < 20]\n\n which selects the all the fields (in the form of a *tuple*) for all the\n rows that fulfil the condition. Or::\n\n res = [row[1::2] for row in table.iterrows(2, 3000, 3)]\n\n which selects all the fields in even positions (in the form of a\n *tuple*) for all the rows in the slice [2:3000:3].\n\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6tables_14tableextension_3Row_22__getitem__; #endif static PyObject *__pyx_pw_6tables_14tableextension_3Row_23__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_22__getitem__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self), ((PyObject *)__pyx_v_key)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1435 * # This method is twice as faster than __getattr__ because there is * # not a lookup in the local dictionary * def __getitem__(self, key): # <<<<<<<<<<<<<< * """__getitem__(key) * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_22__getitem__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_key) { long __pyx_v_offset; PyArrayObject *__pyx_v_field = 0; PyObject *__pyx_v_row = 0; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_fieldscache = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "tables/tableextension.pyx":1476 * cdef object row, fields, fieldscache * * if self._riterator: # <<<<<<<<<<<<<< * # If in the middle of an iterator loop, the user probably wants to * # access the read buffer */ if (__pyx_v_self->_riterator) { /* "tables/tableextension.pyx":1479 * # If in the middle of an iterator loop, the user probably wants to * # access the read buffer * fieldscache = self.rfieldscache; fields = self.rfields # <<<<<<<<<<<<<< * offset = self._row * else: */ __pyx_t_1 = __pyx_v_self->rfieldscache; __Pyx_INCREF(__pyx_t_1); __pyx_v_fieldscache = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __pyx_v_self->rfields; __Pyx_INCREF(__pyx_t_1); __pyx_v_fields = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":1480 * # access the read buffer * fieldscache = self.rfieldscache; fields = self.rfields * offset = self._row # <<<<<<<<<<<<<< * else: * # We are not in an iterator loop, so the user probably wants to access */ __pyx_v_offset = ((long)__pyx_v_self->_row); goto __pyx_L3; } /*else*/ { /* "tables/tableextension.pyx":1484 * # We are not in an iterator loop, so the user probably wants to access * # the write buffer * fieldscache = self.wfieldscache; fields = self.wfields # <<<<<<<<<<<<<< * offset = 0 * */ __pyx_t_1 = __pyx_v_self->wfieldscache; __Pyx_INCREF(__pyx_t_1); __pyx_v_fieldscache = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __pyx_v_self->wfields; __Pyx_INCREF(__pyx_t_1); __pyx_v_fields = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":1485 * # the write buffer * fieldscache = self.wfieldscache; fields = self.wfields * offset = 0 # <<<<<<<<<<<<<< * * try: */ __pyx_v_offset = 0; } __pyx_L3:; /* "tables/tableextension.pyx":1487 * offset = 0 * * try: # <<<<<<<<<<<<<< * # Check whether this object is in the cache dictionary * field = fieldscache[key] */ { __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "tables/tableextension.pyx":1489 * try: * # Check whether this object is in the cache dictionary * field = fieldscache[key] # <<<<<<<<<<<<<< * except (KeyError, TypeError): * try: */ __pyx_t_1 = PyObject_GetItem(__pyx_v_fieldscache, __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __pyx_v_field = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":1490 * # Check whether this object is in the cache dictionary * field = fieldscache[key] * except (KeyError, TypeError): # <<<<<<<<<<<<<< * try: * # Try to get it from fields (str or int keys) */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_KeyError) || PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_5) { __Pyx_AddTraceback("tables.tableextension.Row.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "tables/tableextension.pyx":1491 * field = fieldscache[key] * except (KeyError, TypeError): * try: # <<<<<<<<<<<<<< * # Try to get it from fields (str or int keys) * field = get_nested_field_cache(fields, key, fieldscache) */ { __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "tables/tableextension.pyx":1493 * try: * # Try to get it from fields (str or int keys) * field = get_nested_field_cache(fields, key, fieldscache) # <<<<<<<<<<<<<< * except TypeError: * # No luck yet. Still, the key can be a slice. */ __pyx_t_11 = __pyx_f_6tables_14tableextension_get_nested_field_cache(__pyx_v_fields, __pyx_v_key, __pyx_v_fieldscache); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_11); if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_field)); __pyx_v_field = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L21_try_end; __pyx_L14_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; /* "tables/tableextension.pyx":1494 * # Try to get it from fields (str or int keys) * field = get_nested_field_cache(fields, key, fieldscache) * except TypeError: # <<<<<<<<<<<<<< * # No luck yet. Still, the key can be a slice. * # Fetch the complete row and convert it into a tuple */ __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_5) { __Pyx_AddTraceback("tables.tableextension.Row.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_13); /* "tables/tableextension.pyx":1497 * # No luck yet. Still, the key can be a slice. * # Fetch the complete row and convert it into a tuple * if self._riterator: # <<<<<<<<<<<<<< * row = self.iobuf[self._row].copy().item() * else: */ if (__pyx_v_self->_riterator) { /* "tables/tableextension.pyx":1498 * # Fetch the complete row and convert it into a tuple * if self._riterator: * row = self.iobuf[self._row].copy().item() # <<<<<<<<<<<<<< * else: * row = self.wrec[0].copy().item() */ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_self->iobuf, __pyx_v_self->_row, sizeof(long), PyInt_FromLong); if (!__pyx_t_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__copy); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__item); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_v_row = __pyx_t_14; __pyx_t_14 = 0; goto __pyx_L24; } /*else*/ { /* "tables/tableextension.pyx":1500 * row = self.iobuf[self._row].copy().item() * else: * row = self.wrec[0].copy().item() # <<<<<<<<<<<<<< * # Try with __getitem__() * return row[key] */ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_self->wrec, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__copy); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyObject_GetAttr(__pyx_t_14, __pyx_n_s__item); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_v_row = __pyx_t_14; __pyx_t_14 = 0; } __pyx_L24:; /* "tables/tableextension.pyx":1502 * row = self.wrec[0].copy().item() * # Try with __getitem__() * return row[key] # <<<<<<<<<<<<<< * * if field.ndim == 1: */ __Pyx_XDECREF(__pyx_r); __pyx_t_14 = PyObject_GetItem(__pyx_v_row, __pyx_v_key); if (!__pyx_t_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_r = __pyx_t_14; __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L17_except_return; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L15_exception_handled; } __pyx_L16_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L6_except_error; __pyx_L17_except_return:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L7_except_return; __pyx_L15_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L21_try_end:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L5_exception_handled; } __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L11_try_end:; } /* "tables/tableextension.pyx":1504 * return row[key] * * if field.ndim == 1: # <<<<<<<<<<<<<< * # For an scalar it is not needed a copy (immutable object) * return PyArray_GETITEM(field, field.data + offset * self._stride) */ __pyx_t_16 = (__pyx_v_field->nd == 1); if (__pyx_t_16) { /* "tables/tableextension.pyx":1506 * if field.ndim == 1: * # For an scalar it is not needed a copy (immutable object) * return PyArray_GETITEM(field, field.data + offset * self._stride) # <<<<<<<<<<<<<< * else: * # Do a copy of the array, so that it can be overwritten by the user */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = PyArray_GETITEM(__pyx_v_field, (__pyx_v_field->data + (__pyx_v_offset * __pyx_v_self->_stride))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L25; } /*else*/ { /* "tables/tableextension.pyx":1510 * # Do a copy of the array, so that it can be overwritten by the user * # without damaging the internal self.rfields buffer * return field[offset].copy() # <<<<<<<<<<<<<< * * # This is slightly faster (around 3%) than __setattr__ */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_field), __pyx_v_offset, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } __pyx_L25:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("tables.tableextension.Row.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_field); __Pyx_XDECREF(__pyx_v_row); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_fieldscache); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6tables_14tableextension_3Row_25__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_24__setitem__[] = "__setitem__(key, value)\n\n Set the key row field to the specified value.\n\n Differently from its __getitem__() counterpart, in this case key can\n only be a string (the name of the field). The changes done via\n __setitem__() will not take effect on the data on disk until any of the\n :meth:`Row.append` or :meth:`Row.update` methods are called.\n\n Examples\n --------\n\n ::\n\n for row in table.iterrows(step=10):\n row['col1'] = row.nrow\n row['col2'] = 'b'\n row['col3'] = 0.0\n row.update()\n table.flush()\n\n which modifies every tenth row in the table.\n\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6tables_14tableextension_3Row_24__setitem__; #endif static int __pyx_pw_6tables_14tableextension_3Row_25__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_24__setitem__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1513 * * # This is slightly faster (around 3%) than __setattr__ * def __setitem__(self, object key, object value): # <<<<<<<<<<<<<< * """__setitem__(key, value) * */ static int __pyx_pf_6tables_14tableextension_3Row_24__setitem__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { int __pyx_v_ret; long __pyx_v_offset; PyArrayObject *__pyx_v_field = 0; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_fieldscache = 0; PyObject *__pyx_v_enum = NULL; PyObject *__pyx_v_cenval = NULL; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); /* "tables/tableextension.pyx":1544 * cdef object fields, fieldscache * * if self.ro_filemode: # <<<<<<<<<<<<<< * raise IOError("attempt to write over a file opened in read-only mode") * */ if (__pyx_v_self->ro_filemode) { /* "tables/tableextension.pyx":1545 * * if self.ro_filemode: * raise IOError("attempt to write over a file opened in read-only mode") # <<<<<<<<<<<<<< * * if self._riterator: */ __pyx_t_1 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":1547 * raise IOError("attempt to write over a file opened in read-only mode") * * if self._riterator: # <<<<<<<<<<<<<< * # If in the middle of an iterator loop, or *after*, the user * # probably wants to access the read buffer */ if (__pyx_v_self->_riterator) { /* "tables/tableextension.pyx":1550 * # If in the middle of an iterator loop, or *after*, the user * # probably wants to access the read buffer * fieldscache = self.rfieldscache; fields = self.rfields # <<<<<<<<<<<<<< * offset = self._row * else: */ __pyx_t_1 = __pyx_v_self->rfieldscache; __Pyx_INCREF(__pyx_t_1); __pyx_v_fieldscache = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __pyx_v_self->rfields; __Pyx_INCREF(__pyx_t_1); __pyx_v_fields = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":1551 * # probably wants to access the read buffer * fieldscache = self.rfieldscache; fields = self.rfields * offset = self._row # <<<<<<<<<<<<<< * else: * # We are not in an iterator loop, so the user probably wants to access */ __pyx_v_offset = ((long)__pyx_v_self->_row); goto __pyx_L4; } /*else*/ { /* "tables/tableextension.pyx":1555 * # We are not in an iterator loop, so the user probably wants to access * # the write buffer * fieldscache = self.wfieldscache; fields = self.wfields # <<<<<<<<<<<<<< * offset = 0 * */ __pyx_t_1 = __pyx_v_self->wfieldscache; __Pyx_INCREF(__pyx_t_1); __pyx_v_fieldscache = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __pyx_v_self->wfields; __Pyx_INCREF(__pyx_t_1); __pyx_v_fields = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":1556 * # the write buffer * fieldscache = self.wfieldscache; fields = self.wfields * offset = 0 # <<<<<<<<<<<<<< * * # Check validity of enumerated value. */ __pyx_v_offset = 0; } __pyx_L4:; /* "tables/tableextension.pyx":1559 * * # Check validity of enumerated value. * if self.exist_enum_cols: # <<<<<<<<<<<<<< * if key in self.colenums: * enum = self.colenums[key] */ if (__pyx_v_self->exist_enum_cols) { /* "tables/tableextension.pyx":1560 * # Check validity of enumerated value. * if self.exist_enum_cols: * if key in self.colenums: # <<<<<<<<<<<<<< * enum = self.colenums[key] * for cenval in numpy.asarray(value).flat: */ __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_self->colenums, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { /* "tables/tableextension.pyx":1561 * if self.exist_enum_cols: * if key in self.colenums: * enum = self.colenums[key] # <<<<<<<<<<<<<< * for cenval in numpy.asarray(value).flat: * enum(cenval) # raises ``ValueError`` on invalid values */ __pyx_t_1 = PyObject_GetItem(__pyx_v_self->colenums, __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_enum = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":1562 * if key in self.colenums: * enum = self.colenums[key] * for cenval in numpy.asarray(value).flat: # <<<<<<<<<<<<<< * enum(cenval) # raises ``ValueError`` on invalid values * */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__asarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__flat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_1)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF(__pyx_v_cenval); __pyx_v_cenval = __pyx_t_1; __pyx_t_1 = 0; /* "tables/tableextension.pyx":1563 * enum = self.colenums[key] * for cenval in numpy.asarray(value).flat: * enum(cenval) # raises ``ValueError`` on invalid values # <<<<<<<<<<<<<< * * # Get the field to be modified */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_cenval); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cenval); __Pyx_GIVEREF(__pyx_v_cenval); __pyx_t_3 = PyObject_Call(__pyx_v_enum, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6; } __pyx_L6:; goto __pyx_L5; } __pyx_L5:; /* "tables/tableextension.pyx":1566 * * # Get the field to be modified * field = get_nested_field_cache(fields, key, fieldscache) # <<<<<<<<<<<<<< * if key not in self.modified_fields: * self.modified_fields.add(key) */ __pyx_t_4 = __pyx_f_6tables_14tableextension_get_nested_field_cache(__pyx_v_fields, __pyx_v_key, __pyx_v_fieldscache); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_field = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "tables/tableextension.pyx":1567 * # Get the field to be modified * field = get_nested_field_cache(fields, key, fieldscache) * if key not in self.modified_fields: # <<<<<<<<<<<<<< * self.modified_fields.add(key) * */ __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_self->modified_fields, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { /* "tables/tableextension.pyx":1568 * field = get_nested_field_cache(fields, key, fieldscache) * if key not in self.modified_fields: * self.modified_fields.add(key) # <<<<<<<<<<<<<< * * # Finally, try to set it to the value */ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->modified_fields, __pyx_n_s__add); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L9; } __pyx_L9:; /* "tables/tableextension.pyx":1571 * * # Finally, try to set it to the value * try: # <<<<<<<<<<<<<< * # Optimization for scalar values. This can optimize the writes * # between a 10% and 100%, depending on the number of columns modified */ { __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "tables/tableextension.pyx":1574 * # Optimization for scalar values. This can optimize the writes * # between a 10% and 100%, depending on the number of columns modified * if field.ndim == 1: # <<<<<<<<<<<<<< * ret = PyArray_SETITEM(field, field.data + offset * self._stride, value) * if ret < 0: */ __pyx_t_2 = (__pyx_v_field->nd == 1); if (__pyx_t_2) { /* "tables/tableextension.pyx":1575 * # between a 10% and 100%, depending on the number of columns modified * if field.ndim == 1: * ret = PyArray_SETITEM(field, field.data + offset * self._stride, value) # <<<<<<<<<<<<<< * if ret < 0: * raise TypeError */ __pyx_v_ret = PyArray_SETITEM(__pyx_v_field, (__pyx_v_field->data + (__pyx_v_offset * __pyx_v_self->_stride)), __pyx_v_value); /* "tables/tableextension.pyx":1576 * if field.ndim == 1: * ret = PyArray_SETITEM(field, field.data + offset * self._stride, value) * if ret < 0: # <<<<<<<<<<<<<< * raise TypeError * ##### End of optimization for scalar values */ __pyx_t_2 = (__pyx_v_ret < 0); if (__pyx_t_2) { /* "tables/tableextension.pyx":1577 * ret = PyArray_SETITEM(field, field.data + offset * self._stride, value) * if ret < 0: * raise TypeError # <<<<<<<<<<<<<< * ##### End of optimization for scalar values * else: */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L10_error;} goto __pyx_L19; } __pyx_L19:; goto __pyx_L18; } /*else*/ { /* "tables/tableextension.pyx":1580 * ##### End of optimization for scalar values * else: * field[offset] = value # <<<<<<<<<<<<<< * except TypeError: * raise TypeError("invalid type (%s) for column ``%s``" % (type(value), */ if (__Pyx_SetItemInt(((PyObject *)__pyx_v_field), __pyx_v_offset, __pyx_v_value, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L10_error;} } __pyx_L18:; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L17_try_end; __pyx_L10_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/tableextension.pyx":1581 * else: * field[offset] = value * except TypeError: # <<<<<<<<<<<<<< * raise TypeError("invalid type (%s) for column ``%s``" % (type(value), * key)) */ __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_10) { __Pyx_AddTraceback("tables.tableextension.Row.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1581; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); /* "tables/tableextension.pyx":1583 * except TypeError: * raise TypeError("invalid type (%s) for column ``%s``" % (type(value), * key)) # <<<<<<<<<<<<<< * * def fetch_all_fields(self): */ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value))); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)Py_TYPE(__pyx_v_value))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value))); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_52), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_12)); __Pyx_GIVEREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; __pyx_t_12 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_12, 0, 0, 0); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_exception_handled; } __pyx_L12_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L11_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L17_try_end:; } __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("tables.tableextension.Row.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_field); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_fieldscache); __Pyx_XDECREF(__pyx_v_enum); __Pyx_XDECREF(__pyx_v_cenval); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_27fetch_all_fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_26fetch_all_fields[] = "Retrieve all the fields in the current row.\n\n Contrarily to row[:] (see :ref:`RowSpecialMethods`), this returns row\n data as a NumPy void scalar. For instance::\n\n [row.fetch_all_fields() for row in table.where('col1 < 3')]\n\n will select all the rows that fulfill the given condition\n as a list of NumPy records.\n\n "; static PyObject *__pyx_pw_6tables_14tableextension_3Row_27fetch_all_fields(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fetch_all_fields (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_26fetch_all_fields(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1585 * key)) * * def fetch_all_fields(self): # <<<<<<<<<<<<<< * """Retrieve all the fields in the current row. * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_26fetch_all_fields(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fetch_all_fields", 0); /* "tables/tableextension.pyx":1599 * * # We need to do a cast for recognizing negative row numbers! * if self._nrow < 0: # <<<<<<<<<<<<<< * return ("Warning: Row iterator has not been initialized for table:\n" * " %s\n" */ __pyx_t_1 = (((signed PY_LONG_LONG)__pyx_v_self->_nrow) < 0); if (__pyx_t_1) { /* "tables/tableextension.pyx":1600 * # We need to do a cast for recognizing negative row numbers! * if self._nrow < 0: * return ("Warning: Row iterator has not been initialized for table:\n" # <<<<<<<<<<<<<< * " %s\n" * " You will normally want to use this method in iterator " */ __Pyx_XDECREF(__pyx_r); /* "tables/tableextension.pyx":1603 * " %s\n" * " You will normally want to use this method in iterator " * "contexts." % self.table) # <<<<<<<<<<<<<< * * # Always return a copy of the row so that new data that is written */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_53), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":1607 * # Always return a copy of the row so that new data that is written * # in self.iobuf doesn't overwrite the original returned data. * return self.iobuf[self._row].copy() # <<<<<<<<<<<<<< * * def __str__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->iobuf, __pyx_v_self->_row, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.tableextension.Row.fetch_all_fields", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_29__str__(PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_28__str__[] = "Represent the record as an string"; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6tables_14tableextension_3Row_28__str__; #endif static PyObject *__pyx_pw_6tables_14tableextension_3Row_29__str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_28__str__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1609 * return self.iobuf[self._row].copy() * * def __str__(self): # <<<<<<<<<<<<<< * """Represent the record as an string""" * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_28__str__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_v_tablepathname = NULL; PyObject *__pyx_v_classname = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); /* "tables/tableextension.pyx":1613 * * # We need to do a cast for recognizing negative row numbers! * if self._nrow < 0: # <<<<<<<<<<<<<< * return ("Warning: Row iterator has not been initialized for table:\n" * " %s\n" */ __pyx_t_1 = (((signed PY_LONG_LONG)__pyx_v_self->_nrow) < 0); if (__pyx_t_1) { /* "tables/tableextension.pyx":1614 * # We need to do a cast for recognizing negative row numbers! * if self._nrow < 0: * return ("Warning: Row iterator has not been initialized for table:\n" # <<<<<<<<<<<<<< * " %s\n" * " You will normally want to use this object in iterator " */ __Pyx_XDECREF(__pyx_r); /* "tables/tableextension.pyx":1617 * " %s\n" * " You will normally want to use this object in iterator " * "contexts." % self.table) # <<<<<<<<<<<<<< * * tablepathname = self.table._v_pathname */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_54), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "tables/tableextension.pyx":1619 * "contexts." % self.table) * * tablepathname = self.table._v_pathname # <<<<<<<<<<<<<< * classname = self.__class__.__name__ * return "%s.row (%s), pointing to row #%d" % (tablepathname, classname, */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__table); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___v_pathname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_tablepathname = __pyx_t_2; __pyx_t_2 = 0; /* "tables/tableextension.pyx":1620 * * tablepathname = self.table._v_pathname * classname = self.__class__.__name__ # <<<<<<<<<<<<<< * return "%s.row (%s), pointing to row #%d" % (tablepathname, classname, * self._nrow) */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____name__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_classname = __pyx_t_3; __pyx_t_3 = 0; /* "tables/tableextension.pyx":1621 * tablepathname = self.table._v_pathname * classname = self.__class__.__name__ * return "%s.row (%s), pointing to row #%d" % (tablepathname, classname, # <<<<<<<<<<<<<< * self._nrow) * */ __Pyx_XDECREF(__pyx_r); /* "tables/tableextension.pyx":1622 * classname = self.__class__.__name__ * return "%s.row (%s), pointing to row #%d" % (tablepathname, classname, * self._nrow) # <<<<<<<<<<<<<< * * def __repr__(self): */ __pyx_t_3 = PyLong_FromLongLong(__pyx_v_self->_nrow); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tablepathname); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tablepathname); __Pyx_GIVEREF(__pyx_v_tablepathname); __Pyx_INCREF(__pyx_v_classname); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_classname); __Pyx_GIVEREF(__pyx_v_classname); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_55), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.tableextension.Row.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tablepathname); __Pyx_XDECREF(__pyx_v_classname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_14tableextension_3Row_31__repr__(PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6tables_14tableextension_3Row_30__repr__[] = "Represent the record as an string"; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6tables_14tableextension_3Row_30__repr__; #endif static PyObject *__pyx_pw_6tables_14tableextension_3Row_31__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6tables_14tableextension_3Row_30__repr__(((struct __pyx_obj_6tables_14tableextension_Row *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/tableextension.pyx":1624 * self._nrow) * * def __repr__(self): # <<<<<<<<<<<<<< * """Represent the record as an string""" * */ static PyObject *__pyx_pf_6tables_14tableextension_3Row_30__repr__(struct __pyx_obj_6tables_14tableextension_Row *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "tables/tableextension.pyx":1627 * """Represent the record as an string""" * * return str(self) # <<<<<<<<<<<<<< * * ## Local Variables: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("tables.tableextension.Row.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":194 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fullfill the PEP. */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; int __pyx_v_i; int __pyx_v_ndim; int __pyx_v_endian_detector; int __pyx_v_little_endian; int __pyx_v_t; char *__pyx_v_f; PyArray_Descr *__pyx_v_descr = 0; int __pyx_v_offset; int __pyx_v_hasfields; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getbuffer__", 0); if (__pyx_v_info != NULL) { __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); } /* "numpy.pxd":200 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< * * cdef int copy_shape, i, ndim */ __pyx_t_1 = (__pyx_v_info == NULL); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":203 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "numpy.pxd":204 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * * ndim = PyArray_NDIM(self) */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "numpy.pxd":206 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "numpy.pxd":208 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); if (__pyx_t_1) { /* "numpy.pxd":209 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< * else: * copy_shape = 0 */ __pyx_v_copy_shape = 1; goto __pyx_L4; } /*else*/ { /* "numpy.pxd":211 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_copy_shape = 0; } __pyx_L4:; /* "numpy.pxd":213 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); if (__pyx_t_1) { /* "numpy.pxd":214 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not C contiguous") * */ __pyx_t_2 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS)); __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_1; } if (__pyx_t_3) { /* "numpy.pxd":215 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "numpy.pxd":217 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); if (__pyx_t_3) { /* "numpy.pxd":218 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not Fortran contiguous") * */ __pyx_t_1 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS)); __pyx_t_2 = __pyx_t_1; } else { __pyx_t_2 = __pyx_t_3; } if (__pyx_t_2) { /* "numpy.pxd":219 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "numpy.pxd":221 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "numpy.pxd":222 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "numpy.pxd":223 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ if (__pyx_v_copy_shape) { /* "numpy.pxd":226 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); /* "numpy.pxd":227 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); /* "numpy.pxd":228 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ __pyx_t_5 = __pyx_v_ndim; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "numpy.pxd":229 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< * info.shape[i] = PyArray_DIMS(self)[i] * else: */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); /* "numpy.pxd":230 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< * else: * info.strides = PyArray_STRIDES(self) */ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } goto __pyx_L7; } /*else*/ { /* "numpy.pxd":232 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "numpy.pxd":233 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) */ __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); } __pyx_L7:; /* "numpy.pxd":234 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) */ __pyx_v_info->suboffsets = NULL; /* "numpy.pxd":235 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< * info.readonly = not PyArray_ISWRITEABLE(self) * */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); /* "numpy.pxd":236 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< * * cdef int t */ __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(__pyx_v_self)); /* "numpy.pxd":239 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef list stack */ __pyx_v_f = NULL; /* "numpy.pxd":240 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack * cdef int offset */ __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_4); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); __pyx_t_4 = 0; /* "numpy.pxd":244 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); /* "numpy.pxd":246 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ __pyx_t_2 = (!__pyx_v_hasfields); if (__pyx_t_2) { __pyx_t_3 = (!__pyx_v_copy_shape); __pyx_t_1 = __pyx_t_3; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":248 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; goto __pyx_L10; } /*else*/ { /* "numpy.pxd":251 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); } __pyx_L10:; /* "numpy.pxd":253 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ __pyx_t_1 = (!__pyx_v_hasfields); if (__pyx_t_1) { /* "numpy.pxd":254 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): */ __pyx_t_5 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_5; /* "numpy.pxd":255 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_1 = (__pyx_v_descr->byteorder == '>'); if (__pyx_t_1) { __pyx_t_2 = __pyx_v_little_endian; } else { __pyx_t_2 = __pyx_t_1; } if (!__pyx_t_2) { /* "numpy.pxd":256 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_1 = (__pyx_v_descr->byteorder == '<'); if (__pyx_t_1) { __pyx_t_3 = (!__pyx_v_little_endian); __pyx_t_7 = __pyx_t_3; } else { __pyx_t_7 = __pyx_t_1; } __pyx_t_1 = __pyx_t_7; } else { __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { /* "numpy.pxd":257 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":258 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ __pyx_t_1 = (__pyx_v_t == NPY_BYTE); if (__pyx_t_1) { __pyx_v_f = __pyx_k__b; goto __pyx_L13; } /* "numpy.pxd":259 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ __pyx_t_1 = (__pyx_v_t == NPY_UBYTE); if (__pyx_t_1) { __pyx_v_f = __pyx_k__B; goto __pyx_L13; } /* "numpy.pxd":260 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ __pyx_t_1 = (__pyx_v_t == NPY_SHORT); if (__pyx_t_1) { __pyx_v_f = __pyx_k__h; goto __pyx_L13; } /* "numpy.pxd":261 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ __pyx_t_1 = (__pyx_v_t == NPY_USHORT); if (__pyx_t_1) { __pyx_v_f = __pyx_k__H; goto __pyx_L13; } /* "numpy.pxd":262 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ __pyx_t_1 = (__pyx_v_t == NPY_INT); if (__pyx_t_1) { __pyx_v_f = __pyx_k__i; goto __pyx_L13; } /* "numpy.pxd":263 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ __pyx_t_1 = (__pyx_v_t == NPY_UINT); if (__pyx_t_1) { __pyx_v_f = __pyx_k__I; goto __pyx_L13; } /* "numpy.pxd":264 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ __pyx_t_1 = (__pyx_v_t == NPY_LONG); if (__pyx_t_1) { __pyx_v_f = __pyx_k__l; goto __pyx_L13; } /* "numpy.pxd":265 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ __pyx_t_1 = (__pyx_v_t == NPY_ULONG); if (__pyx_t_1) { __pyx_v_f = __pyx_k__L; goto __pyx_L13; } /* "numpy.pxd":266 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG); if (__pyx_t_1) { __pyx_v_f = __pyx_k__q; goto __pyx_L13; } /* "numpy.pxd":267 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG); if (__pyx_t_1) { __pyx_v_f = __pyx_k__Q; goto __pyx_L13; } /* "numpy.pxd":268 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ __pyx_t_1 = (__pyx_v_t == NPY_FLOAT); if (__pyx_t_1) { __pyx_v_f = __pyx_k__f; goto __pyx_L13; } /* "numpy.pxd":269 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE); if (__pyx_t_1) { __pyx_v_f = __pyx_k__d; goto __pyx_L13; } /* "numpy.pxd":270 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE); if (__pyx_t_1) { __pyx_v_f = __pyx_k__g; goto __pyx_L13; } /* "numpy.pxd":271 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT); if (__pyx_t_1) { __pyx_v_f = __pyx_k__Zf; goto __pyx_L13; } /* "numpy.pxd":272 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE); if (__pyx_t_1) { __pyx_v_f = __pyx_k__Zd; goto __pyx_L13; } /* "numpy.pxd":273 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE); if (__pyx_t_1) { __pyx_v_f = __pyx_k__Zg; goto __pyx_L13; } /* "numpy.pxd":274 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ __pyx_t_1 = (__pyx_v_t == NPY_OBJECT); if (__pyx_t_1) { __pyx_v_f = __pyx_k__O; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":276 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_62), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":277 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "numpy.pxd":278 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L11; } /*else*/ { /* "numpy.pxd":280 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); /* "numpy.pxd":281 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "numpy.pxd":282 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "numpy.pxd":285 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = c'\0' # Terminate format string * */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; /* "numpy.pxd":286 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = '\x00'; } __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { __Pyx_GOTREF(Py_None); __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":288 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); /* "numpy.pxd":289 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = PyArray_HASFIELDS(__pyx_v_self); if (__pyx_t_1) { /* "numpy.pxd":290 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) */ free(__pyx_v_info->format); goto __pyx_L3; } __pyx_L3:; /* "numpy.pxd":291 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.free(info.strides) * # info.shape was stored after info.strides in the same block */ __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); if (__pyx_t_1) { /* "numpy.pxd":292 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ free(__pyx_v_info->strides); goto __pyx_L4; } __pyx_L4:; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":768 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "numpy.pxd":769 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":771 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "numpy.pxd":772 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":774 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "numpy.pxd":775 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":777 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ 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) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "numpy.pxd":778 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); __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_filename = __pyx_f[1]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":780 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ 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) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "numpy.pxd":781 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ __Pyx_XDECREF(__pyx_r); __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_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":783 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ 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) { PyArray_Descr *__pyx_v_child = 0; int __pyx_v_endian_detector; int __pyx_v_little_endian; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_childname = NULL; PyObject *__pyx_v_new_offset = NULL; PyObject *__pyx_v_t = NULL; char *__pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; long __pyx_t_11; char *__pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "numpy.pxd":790 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "numpy.pxd":791 * cdef tuple i * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * cdef tuple fields * */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "numpy.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __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_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF(__pyx_v_childname); __pyx_v_childname = __pyx_t_3; __pyx_t_3 = 0; /* "numpy.pxd":795 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_fields)); __pyx_v_fields = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "numpy.pxd":796 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { PyObject* sequence = ((PyObject *)__pyx_v_fields); #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (1) { __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF(((PyObject *)__pyx_v_child)); __pyx_v_child = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_v_new_offset); __pyx_v_new_offset = __pyx_t_4; __pyx_t_4 = 0; /* "numpy.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "numpy.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_64), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "numpy.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_7 = (__pyx_v_child->byteorder == '>'); if (__pyx_t_7) { __pyx_t_8 = __pyx_v_little_endian; } else { __pyx_t_8 = __pyx_t_7; } if (!__pyx_t_8) { /* "numpy.pxd":802 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ __pyx_t_7 = (__pyx_v_child->byteorder == '<'); if (__pyx_t_7) { __pyx_t_9 = (!__pyx_v_little_endian); __pyx_t_10 = __pyx_t_9; } else { __pyx_t_10 = __pyx_t_7; } __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "numpy.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "numpy.pxd":813 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; /* "numpy.pxd":814 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 120; /* "numpy.pxd":815 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "numpy.pxd":816 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); } /* "numpy.pxd":818 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_11 = 0; (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); /* "numpy.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_7 = (!PyDataType_HASFIELDS(__pyx_v_child)); if (__pyx_t_7) { /* "numpy.pxd":821 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_v_t); __pyx_v_t = __pyx_t_3; __pyx_t_3 = 0; /* "numpy.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_7 = ((__pyx_v_end - __pyx_v_f) < 5); if (__pyx_t_7) { /* "numpy.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "numpy.pxd":826 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ __pyx_t_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 98; goto __pyx_L13; } /* "numpy.pxd":827 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ __pyx_t_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 66; goto __pyx_L13; } /* "numpy.pxd":828 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ __pyx_t_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 104; goto __pyx_L13; } /* "numpy.pxd":829 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ __pyx_t_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 72; goto __pyx_L13; } /* "numpy.pxd":830 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ __pyx_t_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 105; goto __pyx_L13; } /* "numpy.pxd":831 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ __pyx_t_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 73; goto __pyx_L13; } /* "numpy.pxd":832 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ __pyx_t_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 108; goto __pyx_L13; } /* "numpy.pxd":833 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ __pyx_t_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 76; goto __pyx_L13; } /* "numpy.pxd":834 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ __pyx_t_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 113; goto __pyx_L13; } /* "numpy.pxd":835 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ __pyx_t_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 81; goto __pyx_L13; } /* "numpy.pxd":836 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ __pyx_t_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 102; goto __pyx_L13; } /* "numpy.pxd":837 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ __pyx_t_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 100; goto __pyx_L13; } /* "numpy.pxd":838 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ __pyx_t_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 103; goto __pyx_L13; } /* "numpy.pxd":839 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ __pyx_t_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":840 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ __pyx_t_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":841 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ __pyx_t_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L13; } /* "numpy.pxd":842 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ __pyx_t_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { (__pyx_v_f[0]) = 79; goto __pyx_L13; } /*else*/ { /* "numpy.pxd":844 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_62), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "numpy.pxd":845 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: * # Cython ignores struct boundary information ("T{...}"), */ __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L11; } /*else*/ { /* "numpy.pxd":849 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_12; } __pyx_L11:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "numpy.pxd":850 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_child); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_childname); __Pyx_XDECREF(__pyx_v_new_offset); __Pyx_XDECREF(__pyx_v_t); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "numpy.pxd":965 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { PyObject *__pyx_v_baseptr; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("set_array_base", 0); /* "numpy.pxd":967 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< * baseptr = NULL * else: */ __pyx_t_1 = (__pyx_v_base == Py_None); if (__pyx_t_1) { /* "numpy.pxd":968 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":970 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ Py_INCREF(__pyx_v_base); /* "numpy.pxd":971 * else: * Py_INCREF(base) # important to do this before decref below! * baseptr = base # <<<<<<<<<<<<<< * Py_XDECREF(arr.base) * arr.base = baseptr */ __pyx_v_baseptr = ((PyObject *)__pyx_v_base); } __pyx_L3:; /* "numpy.pxd":972 * Py_INCREF(base) # important to do this before decref below! * baseptr = base * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< * arr.base = baseptr * */ Py_XDECREF(__pyx_v_arr->base); /* "numpy.pxd":973 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; __Pyx_RefNannyFinishContext(); } /* "numpy.pxd":975 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); /* "numpy.pxd":976 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< * return None * else: */ __pyx_t_1 = (__pyx_v_arr->base == NULL); if (__pyx_t_1) { /* "numpy.pxd":977 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L3; } /*else*/ { /* "numpy.pxd":979 * return None * else: * return arr.base # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6tables_14tableextension_Table __pyx_vtable_6tables_14tableextension_Table; static PyObject *__pyx_tp_new_6tables_14tableextension_Table(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6tables_14tableextension_Table *p; PyObject *o = __pyx_ptype_6tables_13hdf5extension_Leaf->tp_new(t, a, k); if (!o) return 0; p = ((struct __pyx_obj_6tables_14tableextension_Table *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__pyx_vtabptr_6tables_14tableextension_Table; return o; } static void __pyx_tp_dealloc_6tables_14tableextension_Table(PyObject *o) { PyObject_GC_UnTrack(o); PyObject_GC_Track(o); if (likely(__pyx_ptype_6tables_13hdf5extension_Leaf)) __pyx_ptype_6tables_13hdf5extension_Leaf->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_6tables_14tableextension_Table); } static int __pyx_tp_traverse_6tables_14tableextension_Table(PyObject *o, visitproc v, void *a) { int e; e = ((likely(__pyx_ptype_6tables_13hdf5extension_Leaf)) ? ((__pyx_ptype_6tables_13hdf5extension_Leaf->tp_traverse) ? __pyx_ptype_6tables_13hdf5extension_Leaf->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6tables_14tableextension_Table)); if (e) return e; return 0; } static int __pyx_tp_clear_6tables_14tableextension_Table(PyObject *o) { if (likely(__pyx_ptype_6tables_13hdf5extension_Leaf)) { if (__pyx_ptype_6tables_13hdf5extension_Leaf->tp_clear) __pyx_ptype_6tables_13hdf5extension_Leaf->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6tables_14tableextension_Table); return 0; } static PyMethodDef __pyx_methods_6tables_14tableextension_Table[] = { {__Pyx_NAMESTR("_create_table"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_1_create_table, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_info"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_3_get_info, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6tables_14tableextension_5Table_2_get_info)}, {__Pyx_NAMESTR("_convert_types"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_5_convert_types, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_14tableextension_5Table_4_convert_types)}, {__Pyx_NAMESTR("_open_append"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_7_open_append, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_append_records"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_9_append_records, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_close_append"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_11_close_append, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_update_records"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_13_update_records, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_update_elements"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_15_update_elements, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_read_records"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_17_read_records, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_read_elements"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_19_read_elements, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_remove_rows"), (PyCFunction)__pyx_pw_6tables_14tableextension_5Table_21_remove_rows, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Table = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ #if PY_VERSION_HEX >= 0x02050000 0, /*nb_index*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence_Table = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Table = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Table = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif #if PY_VERSION_HEX >= 0x02060000 0, /*bf_getbuffer*/ #endif #if PY_VERSION_HEX >= 0x02060000 0, /*bf_releasebuffer*/ #endif }; static PyTypeObject __pyx_type_6tables_14tableextension_Table = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.tableextension.Table"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_14tableextension_Table), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_14tableextension_Table, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Table, /*tp_as_number*/ &__pyx_tp_as_sequence_Table, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Table, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Table, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6tables_14tableextension_Table, /*tp_traverse*/ __pyx_tp_clear_6tables_14tableextension_Table, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6tables_14tableextension_Table, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6tables_14tableextension_Table, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif }; static struct __pyx_vtabstruct_6tables_14tableextension_Row __pyx_vtable_6tables_14tableextension_Row; static PyObject *__pyx_tp_new_6tables_14tableextension_Row(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6tables_14tableextension_Row *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; p = ((struct __pyx_obj_6tables_14tableextension_Row *)o); p->__pyx_vtab = __pyx_vtabptr_6tables_14tableextension_Row; p->bufcoords = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->indexvalid = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->indexvalues = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->chunkmap = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->dtype = Py_None; Py_INCREF(Py_None); p->iobuf = Py_None; Py_INCREF(Py_None); p->iobufcpy = Py_None; Py_INCREF(Py_None); p->wrec = Py_None; Py_INCREF(Py_None); p->wreccpy = Py_None; Py_INCREF(Py_None); p->wfields = Py_None; Py_INCREF(Py_None); p->rfields = Py_None; Py_INCREF(Py_None); p->coords = Py_None; Py_INCREF(Py_None); p->condfunc = Py_None; Py_INCREF(Py_None); p->condargs = Py_None; Py_INCREF(Py_None); p->mod_elements = Py_None; Py_INCREF(Py_None); p->colenums = Py_None; Py_INCREF(Py_None); p->rfieldscache = Py_None; Py_INCREF(Py_None); p->wfieldscache = Py_None; Py_INCREF(Py_None); p->_table_file = Py_None; Py_INCREF(Py_None); p->_table_path = Py_None; Py_INCREF(Py_None); p->modified_fields = Py_None; Py_INCREF(Py_None); p->seq_available = Py_None; Py_INCREF(Py_None); if (__pyx_pw_6tables_14tableextension_3Row_1__cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_6tables_14tableextension_Row(PyObject *o) { struct __pyx_obj_6tables_14tableextension_Row *p = (struct __pyx_obj_6tables_14tableextension_Row *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->bufcoords); Py_CLEAR(p->indexvalid); Py_CLEAR(p->indexvalues); Py_CLEAR(p->chunkmap); Py_CLEAR(p->dtype); Py_CLEAR(p->iobuf); Py_CLEAR(p->iobufcpy); Py_CLEAR(p->wrec); Py_CLEAR(p->wreccpy); Py_CLEAR(p->wfields); Py_CLEAR(p->rfields); Py_CLEAR(p->coords); Py_CLEAR(p->condfunc); Py_CLEAR(p->condargs); Py_CLEAR(p->mod_elements); Py_CLEAR(p->colenums); Py_CLEAR(p->rfieldscache); Py_CLEAR(p->wfieldscache); Py_CLEAR(p->_table_file); Py_CLEAR(p->_table_path); Py_CLEAR(p->modified_fields); Py_CLEAR(p->seq_available); PyObject_GC_Track(o); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6tables_14tableextension_Row(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6tables_14tableextension_Row *p = (struct __pyx_obj_6tables_14tableextension_Row *)o; if (p->bufcoords) { e = (*v)(((PyObject*)p->bufcoords), a); if (e) return e; } if (p->indexvalid) { e = (*v)(((PyObject*)p->indexvalid), a); if (e) return e; } if (p->indexvalues) { e = (*v)(((PyObject*)p->indexvalues), a); if (e) return e; } if (p->chunkmap) { e = (*v)(((PyObject*)p->chunkmap), a); if (e) return e; } if (p->dtype) { e = (*v)(p->dtype, a); if (e) return e; } if (p->iobuf) { e = (*v)(p->iobuf, a); if (e) return e; } if (p->iobufcpy) { e = (*v)(p->iobufcpy, a); if (e) return e; } if (p->wrec) { e = (*v)(p->wrec, a); if (e) return e; } if (p->wreccpy) { e = (*v)(p->wreccpy, a); if (e) return e; } if (p->wfields) { e = (*v)(p->wfields, a); if (e) return e; } if (p->rfields) { e = (*v)(p->rfields, a); if (e) return e; } if (p->coords) { e = (*v)(p->coords, a); if (e) return e; } if (p->condfunc) { e = (*v)(p->condfunc, a); if (e) return e; } if (p->condargs) { e = (*v)(p->condargs, a); if (e) return e; } if (p->mod_elements) { e = (*v)(p->mod_elements, a); if (e) return e; } if (p->colenums) { e = (*v)(p->colenums, a); if (e) return e; } if (p->rfieldscache) { e = (*v)(p->rfieldscache, a); if (e) return e; } if (p->wfieldscache) { e = (*v)(p->wfieldscache, a); if (e) return e; } if (p->_table_file) { e = (*v)(p->_table_file, a); if (e) return e; } if (p->_table_path) { e = (*v)(p->_table_path, a); if (e) return e; } if (p->modified_fields) { e = (*v)(p->modified_fields, a); if (e) return e; } if (p->seq_available) { e = (*v)(p->seq_available, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6tables_14tableextension_Row(PyObject *o) { struct __pyx_obj_6tables_14tableextension_Row *p = (struct __pyx_obj_6tables_14tableextension_Row *)o; PyObject* tmp; tmp = ((PyObject*)p->bufcoords); p->bufcoords = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->indexvalid); p->indexvalid = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->indexvalues); p->indexvalues = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->chunkmap); p->chunkmap = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->dtype); p->dtype = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->iobuf); p->iobuf = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->iobufcpy); p->iobufcpy = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->wrec); p->wrec = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->wreccpy); p->wreccpy = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->wfields); p->wfields = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->rfields); p->rfields = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->coords); p->coords = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->condfunc); p->condfunc = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->condargs); p->condargs = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->mod_elements); p->mod_elements = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->colenums); p->colenums = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->rfieldscache); p->rfieldscache = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->wfieldscache); p->wfieldscache = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_table_file); p->_table_file = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_table_path); p->_table_path = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->modified_fields); p->modified_fields = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->seq_available); p->seq_available = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_sq_item_6tables_14tableextension_Row(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static int __pyx_mp_ass_subscript_6tables_14tableextension_Row(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_pw_6tables_14tableextension_3Row_25__setitem__(o, i, v); } else { PyErr_Format(PyExc_NotImplementedError, "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); return -1; } } static PyObject *__pyx_getprop_6tables_14tableextension_3Row_nrow(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6tables_14tableextension_3Row_4nrow_1__get__(o); } static PyObject *__pyx_getprop_6tables_14tableextension_3Row_table(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6tables_14tableextension_3Row_5table_1__get__(o); } static PyMethodDef __pyx_methods_6tables_14tableextension_Row[] = { {__Pyx_NAMESTR("_iter"), (PyCFunction)__pyx_pw_6tables_14tableextension_3Row_3_iter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_14tableextension_3Row_2_iter)}, {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_6tables_14tableextension_3Row_7__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_6tables_14tableextension_3Row_6__next__)}, {__Pyx_NAMESTR("_fill_col"), (PyCFunction)__pyx_pw_6tables_14tableextension_3Row_9_fill_col, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_14tableextension_3Row_8_fill_col)}, {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_6tables_14tableextension_3Row_11append, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6tables_14tableextension_3Row_10append)}, {__Pyx_NAMESTR("_flush_buffered_rows"), (PyCFunction)__pyx_pw_6tables_14tableextension_3Row_13_flush_buffered_rows, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_unsaved_nrows"), (PyCFunction)__pyx_pw_6tables_14tableextension_3Row_15_get_unsaved_nrows, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("update"), (PyCFunction)__pyx_pw_6tables_14tableextension_3Row_17update, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6tables_14tableextension_3Row_16update)}, {__Pyx_NAMESTR("_flush_mod_rows"), (PyCFunction)__pyx_pw_6tables_14tableextension_3Row_19_flush_mod_rows, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6tables_14tableextension_3Row_18_flush_mod_rows)}, {__Pyx_NAMESTR("fetch_all_fields"), (PyCFunction)__pyx_pw_6tables_14tableextension_3Row_27fetch_all_fields, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6tables_14tableextension_3Row_26fetch_all_fields)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6tables_14tableextension_Row[] = { {(char *)"nrow", __pyx_getprop_6tables_14tableextension_3Row_nrow, 0, __Pyx_DOCSTR(__pyx_k_68), 0}, {(char *)"table", __pyx_getprop_6tables_14tableextension_3Row_table, 0, 0, 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Row = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ #if PY_VERSION_HEX >= 0x02050000 0, /*nb_index*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence_Row = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_6tables_14tableextension_Row, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6tables_14tableextension_3Row_21__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Row = { 0, /*mp_length*/ __pyx_pw_6tables_14tableextension_3Row_23__getitem__, /*mp_subscript*/ __pyx_mp_ass_subscript_6tables_14tableextension_Row, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Row = { #if PY_MAJOR_VERSION < 3 0, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif #if PY_VERSION_HEX >= 0x02060000 0, /*bf_getbuffer*/ #endif #if PY_VERSION_HEX >= 0x02060000 0, /*bf_releasebuffer*/ #endif }; static PyTypeObject __pyx_type_6tables_14tableextension_Row = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.tableextension.Row"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_14tableextension_Row), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_14tableextension_Row, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #else 0, /*reserved*/ #endif __pyx_pw_6tables_14tableextension_3Row_31__repr__, /*tp_repr*/ &__pyx_tp_as_number_Row, /*tp_as_number*/ &__pyx_tp_as_sequence_Row, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Row, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ __pyx_pw_6tables_14tableextension_3Row_29__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Row, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("Table row iterator and field accessor.\n\n Instances of this class are used to fetch and set the values\n of individual table fields. It works very much like a dictionary,\n where keys are the pathnames or positions (extended slicing is\n supported) of the fields in the associated table in a specific row.\n\n This class provides an *iterator interface*\n so that you can use the same Row instance to\n access successive table rows one after the other. There are also\n some important methods that are useful for accessing, adding and\n modifying values in tables.\n\n .. rubric:: Row attributes\n\n .. attribute:: nrow\n\n The current row number.\n\n This property is useful for knowing which row is being dealt with in the\n middle of a loop or iterator.\n\n "), /*tp_doc*/ __pyx_tp_traverse_6tables_14tableextension_Row, /*tp_traverse*/ __pyx_tp_clear_6tables_14tableextension_Row, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_pw_6tables_14tableextension_3Row_5__iter__, /*tp_iter*/ __pyx_pw_6tables_14tableextension_3Row_7__next__, /*tp_iternext*/ __pyx_methods_6tables_14tableextension_Row, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6tables_14tableextension_Row, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6tables_14tableextension_Row, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, __Pyx_NAMESTR("tableextension"), __Pyx_DOCSTR(__pyx_k_69), /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0}, {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0}, {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0}, {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0}, {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0}, {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0}, {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0}, {&__pyx_n_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 1}, {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0}, {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0}, {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0}, {&__pyx_n_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 1}, {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0}, {&__pyx_n_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 1}, {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0}, {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0}, {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0}, {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0}, {&__pyx_kp_u_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 1, 0, 0}, {&__pyx_kp_u_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 1, 0, 0}, {&__pyx_kp_u_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 1, 0, 0}, {&__pyx_kp_u_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 1, 0, 0}, {&__pyx_kp_u_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 1, 0, 0}, {&__pyx_kp_u_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 1, 0, 0}, {&__pyx_n_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 1}, {&__pyx_n_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 1}, {&__pyx_n_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 1}, {&__pyx_n_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 1}, {&__pyx_n_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 1}, {&__pyx_n_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 1}, {&__pyx_n_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 1}, {&__pyx_n_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 1}, {&__pyx_n_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 1}, {&__pyx_n_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 1}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, {&__pyx_n_s__CLASS, __pyx_k__CLASS, sizeof(__pyx_k__CLASS), 0, 0, 1, 1}, {&__pyx_n_s__Col, __pyx_k__Col, sizeof(__pyx_k__Col), 0, 0, 1, 1}, {&__pyx_n_s__H5T_STD_I64, __pyx_k__H5T_STD_I64, sizeof(__pyx_k__H5T_STD_I64), 0, 0, 1, 1}, {&__pyx_n_s__HDF5ExtError, __pyx_k__HDF5ExtError, sizeof(__pyx_k__HDF5ExtError), 0, 0, 1, 1}, {&__pyx_n_s__IOError, __pyx_k__IOError, sizeof(__pyx_k__IOError), 0, 0, 1, 1}, {&__pyx_n_s__IObuf, __pyx_k__IObuf, sizeof(__pyx_k__IObuf), 0, 0, 1, 1}, {&__pyx_n_s__IObufcpy, __pyx_k__IObufcpy, sizeof(__pyx_k__IObufcpy), 0, 0, 1, 1}, {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, {&__pyx_n_s__NROWS, __pyx_k__NROWS, sizeof(__pyx_k__NROWS), 0, 0, 1, 1}, {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s__PYTABLES_SYS_ATTRS, __pyx_k__PYTABLES_SYS_ATTRS, sizeof(__pyx_k__PYTABLES_SYS_ATTRS), 0, 0, 1, 1}, {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s__SizeType, __pyx_k__SizeType, sizeof(__pyx_k__SizeType), 0, 0, 1, 1}, {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1}, {&__pyx_n_s__TITLE, __pyx_k__TITLE, sizeof(__pyx_k__TITLE), 0, 0, 1, 1}, {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__VERSION, __pyx_k__VERSION, sizeof(__pyx_k__VERSION), 0, 0, 1, 1}, {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, {&__pyx_n_s____eq__, __pyx_k____eq__, sizeof(__pyx_k____eq__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s___byteorder, __pyx_k___byteorder, sizeof(__pyx_k___byteorder), 0, 0, 1, 1}, {&__pyx_n_s___c_classid, __pyx_k___c_classid, sizeof(__pyx_k___c_classid), 0, 0, 1, 1}, {&__pyx_n_s___chunkcache, __pyx_k___chunkcache, sizeof(__pyx_k___chunkcache), 0, 0, 1, 1}, {&__pyx_n_s___chunked, __pyx_k___chunked, sizeof(__pyx_k___chunked), 0, 0, 1, 1}, {&__pyx_n_s___colenums, __pyx_k___colenums, sizeof(__pyx_k___colenums), 0, 0, 1, 1}, {&__pyx_n_s___convert_types, __pyx_k___convert_types, sizeof(__pyx_k___convert_types), 0, 0, 1, 1}, {&__pyx_n_s___dirtycache, __pyx_k___dirtycache, sizeof(__pyx_k___dirtycache), 0, 0, 1, 1}, {&__pyx_n_s___fillCol, __pyx_k___fillCol, sizeof(__pyx_k___fillCol), 0, 0, 1, 1}, {&__pyx_n_s___fill_col, __pyx_k___fill_col, sizeof(__pyx_k___fill_col), 0, 0, 1, 1}, {&__pyx_n_s___flushBufferedRows, __pyx_k___flushBufferedRows, sizeof(__pyx_k___flushBufferedRows), 0, 0, 1, 1}, {&__pyx_n_s___flushModRows, __pyx_k___flushModRows, sizeof(__pyx_k___flushModRows), 0, 0, 1, 1}, {&__pyx_n_s___flush_mod_rows, __pyx_k___flush_mod_rows, sizeof(__pyx_k___flush_mod_rows), 0, 0, 1, 1}, {&__pyx_n_s___getUnsavedNrows, __pyx_k___getUnsavedNrows, sizeof(__pyx_k___getUnsavedNrows), 0, 0, 1, 1}, {&__pyx_n_s___get_container, __pyx_k___get_container, sizeof(__pyx_k___get_container), 0, 0, 1, 1}, {&__pyx_n_s___get_node, __pyx_k___get_node, sizeof(__pyx_k___get_node), 0, 0, 1, 1}, {&__pyx_n_s___get_unsaved_nrows, __pyx_k___get_unsaved_nrows, sizeof(__pyx_k___get_unsaved_nrows), 0, 0, 1, 1}, {&__pyx_n_s___nslotseq, __pyx_k___nslotseq, sizeof(__pyx_k___nslotseq), 0, 0, 1, 1}, {&__pyx_n_s___read_elements, __pyx_k___read_elements, sizeof(__pyx_k___read_elements), 0, 0, 1, 1}, {&__pyx_n_s___read_records, __pyx_k___read_records, sizeof(__pyx_k___read_records), 0, 0, 1, 1}, {&__pyx_n_s___remove_rows, __pyx_k___remove_rows, sizeof(__pyx_k___remove_rows), 0, 0, 1, 1}, {&__pyx_n_s___save_buffered_rows, __pyx_k___save_buffered_rows, sizeof(__pyx_k___save_buffered_rows), 0, 0, 1, 1}, {&__pyx_n_s___seqcache, __pyx_k___seqcache, sizeof(__pyx_k___seqcache), 0, 0, 1, 1}, {&__pyx_n_s___time64colnames, __pyx_k___time64colnames, sizeof(__pyx_k___time64colnames), 0, 0, 1, 1}, {&__pyx_n_s___update_elements, __pyx_k___update_elements, sizeof(__pyx_k___update_elements), 0, 0, 1, 1}, {&__pyx_n_s___use_index, __pyx_k___use_index, sizeof(__pyx_k___use_index), 0, 0, 1, 1}, {&__pyx_n_s___v_dtype, __pyx_k___v_dtype, sizeof(__pyx_k___v_dtype), 0, 0, 1, 1}, {&__pyx_n_s___v_file, __pyx_k___v_file, sizeof(__pyx_k___v_file), 0, 0, 1, 1}, {&__pyx_n_s___v_leaves, __pyx_k___v_leaves, sizeof(__pyx_k___v_leaves), 0, 0, 1, 1}, {&__pyx_n_s___v_names, __pyx_k___v_names, sizeof(__pyx_k___v_names), 0, 0, 1, 1}, {&__pyx_n_s___v_parent, __pyx_k___v_parent, sizeof(__pyx_k___v_parent), 0, 0, 1, 1}, {&__pyx_n_s___v_pathname, __pyx_k___v_pathname, sizeof(__pyx_k___v_pathname), 0, 0, 1, 1}, {&__pyx_n_s___v_pos, __pyx_k___v_pos, sizeof(__pyx_k___v_pos), 0, 0, 1, 1}, {&__pyx_n_s___v_recarray, __pyx_k___v_recarray, sizeof(__pyx_k___v_recarray), 0, 0, 1, 1}, {&__pyx_n_s___v_wdflts, __pyx_k___v_wdflts, sizeof(__pyx_k___v_wdflts), 0, 0, 1, 1}, {&__pyx_n_s___where_condition, __pyx_k___where_condition, sizeof(__pyx_k___where_condition), 0, 0, 1, 1}, {&__pyx_n_s__add, __pyx_k__add, sizeof(__pyx_k__add), 0, 0, 1, 1}, {&__pyx_n_s__alltrue, __pyx_k__alltrue, sizeof(__pyx_k__alltrue), 0, 0, 1, 1}, {&__pyx_n_s__arange, __pyx_k__arange, sizeof(__pyx_k__arange), 0, 0, 1, 1}, {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1}, {&__pyx_n_s__array, __pyx_k__array, sizeof(__pyx_k__array), 0, 0, 1, 1}, {&__pyx_n_s__asarray, __pyx_k__asarray, sizeof(__pyx_k__asarray), 0, 0, 1, 1}, {&__pyx_n_s__atom_from_hdf5_type, __pyx_k__atom_from_hdf5_type, sizeof(__pyx_k__atom_from_hdf5_type), 0, 0, 1, 1}, {&__pyx_n_s__big, __pyx_k__big, sizeof(__pyx_k__big), 0, 0, 1, 1}, {&__pyx_n_s__bufcoordsData, __pyx_k__bufcoordsData, sizeof(__pyx_k__bufcoordsData), 0, 0, 1, 1}, {&__pyx_n_s__bufcoords_data, __pyx_k__bufcoords_data, sizeof(__pyx_k__bufcoords_data), 0, 0, 1, 1}, {&__pyx_n_s__byteorder, __pyx_k__byteorder, sizeof(__pyx_k__byteorder), 0, 0, 1, 1}, {&__pyx_n_s__byteswap, __pyx_k__byteswap, sizeof(__pyx_k__byteswap), 0, 0, 1, 1}, {&__pyx_n_s__call_on_recarr, __pyx_k__call_on_recarr, sizeof(__pyx_k__call_on_recarr), 0, 0, 1, 1}, {&__pyx_n_s__chunkmap, __pyx_k__chunkmap, sizeof(__pyx_k__chunkmap), 0, 0, 1, 1}, {&__pyx_n_s__chunkmapData, __pyx_k__chunkmapData, sizeof(__pyx_k__chunkmapData), 0, 0, 1, 1}, {&__pyx_n_s__chunkmap_data, __pyx_k__chunkmap_data, sizeof(__pyx_k__chunkmap_data), 0, 0, 1, 1}, {&__pyx_n_s__chunkshape, __pyx_k__chunkshape, sizeof(__pyx_k__chunkshape), 0, 0, 1, 1}, {&__pyx_n_s__coldescrs, __pyx_k__coldescrs, sizeof(__pyx_k__coldescrs), 0, 0, 1, 1}, {&__pyx_n_s__colpathnames, __pyx_k__colpathnames, sizeof(__pyx_k__colpathnames), 0, 0, 1, 1}, {&__pyx_n_s__coltypes, __pyx_k__coltypes, sizeof(__pyx_k__coltypes), 0, 0, 1, 1}, {&__pyx_n_s__complevel, __pyx_k__complevel, sizeof(__pyx_k__complevel), 0, 0, 1, 1}, {&__pyx_n_s__complex, __pyx_k__complex, sizeof(__pyx_k__complex), 0, 0, 1, 1}, {&__pyx_n_s__complib, __pyx_k__complib, sizeof(__pyx_k__complib), 0, 0, 1, 1}, {&__pyx_n_s__coords, __pyx_k__coords, sizeof(__pyx_k__coords), 0, 0, 1, 1}, {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1}, {&__pyx_n_s__create_nested_type, __pyx_k__create_nested_type, sizeof(__pyx_k__create_nested_type), 0, 0, 1, 1}, {&__pyx_n_s__description, __pyx_k__description, sizeof(__pyx_k__description), 0, 0, 1, 1}, {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1}, {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1}, {&__pyx_n_s__enum, __pyx_k__enum, sizeof(__pyx_k__enum), 0, 0, 1, 1}, {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1}, {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1}, {&__pyx_n_s__fetch_all_fields, __pyx_k__fetch_all_fields, sizeof(__pyx_k__fetch_all_fields), 0, 0, 1, 1}, {&__pyx_n_s__field, __pyx_k__field, sizeof(__pyx_k__field), 0, 0, 1, 1}, {&__pyx_n_s__filters, __pyx_k__filters, sizeof(__pyx_k__filters), 0, 0, 1, 1}, {&__pyx_n_s__flat, __pyx_k__flat, sizeof(__pyx_k__flat), 0, 0, 1, 1}, {&__pyx_n_s__fletcher32, __pyx_k__fletcher32, sizeof(__pyx_k__fletcher32), 0, 0, 1, 1}, {&__pyx_n_s__float, __pyx_k__float, sizeof(__pyx_k__float), 0, 0, 1, 1}, {&__pyx_n_s__from_atom, __pyx_k__from_atom, sizeof(__pyx_k__from_atom), 0, 0, 1, 1}, {&__pyx_n_s__get_nested_field, __pyx_k__get_nested_field, sizeof(__pyx_k__get_nested_field), 0, 0, 1, 1}, {&__pyx_n_s__h5tb, __pyx_k__h5tb, sizeof(__pyx_k__h5tb), 0, 0, 1, 1}, {&__pyx_n_s__hdf5_to_np_ext_type, __pyx_k__hdf5_to_np_ext_type, sizeof(__pyx_k__hdf5_to_np_ext_type), 0, 0, 1, 1}, {&__pyx_n_s__indexChunk, __pyx_k__indexChunk, sizeof(__pyx_k__indexChunk), 0, 0, 1, 1}, {&__pyx_n_s__indexValid, __pyx_k__indexValid, sizeof(__pyx_k__indexValid), 0, 0, 1, 1}, {&__pyx_n_s__indexValidData, __pyx_k__indexValidData, sizeof(__pyx_k__indexValidData), 0, 0, 1, 1}, {&__pyx_n_s__indexValues, __pyx_k__indexValues, sizeof(__pyx_k__indexValues), 0, 0, 1, 1}, {&__pyx_n_s__indexValuesData, __pyx_k__indexValuesData, sizeof(__pyx_k__indexValuesData), 0, 0, 1, 1}, {&__pyx_n_s__index_valid_data, __pyx_k__index_valid_data, sizeof(__pyx_k__index_valid_data), 0, 0, 1, 1}, {&__pyx_n_s__index_values_data, __pyx_k__index_values_data, sizeof(__pyx_k__index_values_data), 0, 0, 1, 1}, {&__pyx_n_s__indexchunk, __pyx_k__indexchunk, sizeof(__pyx_k__indexchunk), 0, 0, 1, 1}, {&__pyx_n_s__indexvalid, __pyx_k__indexvalid, sizeof(__pyx_k__indexvalid), 0, 0, 1, 1}, {&__pyx_n_s__indexvalues, __pyx_k__indexvalues, sizeof(__pyx_k__indexvalues), 0, 0, 1, 1}, {&__pyx_n_s__int, __pyx_k__int, sizeof(__pyx_k__int), 0, 0, 1, 1}, {&__pyx_n_s__int64, __pyx_k__int64, sizeof(__pyx_k__int64), 0, 0, 1, 1}, {&__pyx_n_s__iobuf, __pyx_k__iobuf, sizeof(__pyx_k__iobuf), 0, 0, 1, 1}, {&__pyx_n_s__iobufcpy, __pyx_k__iobufcpy, sizeof(__pyx_k__iobufcpy), 0, 0, 1, 1}, {&__pyx_n_s__irrelevant, __pyx_k__irrelevant, sizeof(__pyx_k__irrelevant), 0, 0, 1, 1}, {&__pyx_n_s__item, __pyx_k__item, sizeof(__pyx_k__item), 0, 0, 1, 1}, {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1}, {&__pyx_n_s__iterseqMaxElements, __pyx_k__iterseqMaxElements, sizeof(__pyx_k__iterseqMaxElements), 0, 0, 1, 1}, {&__pyx_n_s__kind, __pyx_k__kind, sizeof(__pyx_k__kind), 0, 0, 1, 1}, {&__pyx_n_s__little, __pyx_k__little, sizeof(__pyx_k__little), 0, 0, 1, 1}, {&__pyx_n_s__mixed, __pyx_k__mixed, sizeof(__pyx_k__mixed), 0, 0, 1, 1}, {&__pyx_n_s__mode, __pyx_k__mode, sizeof(__pyx_k__mode), 0, 0, 1, 1}, {&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1}, {&__pyx_n_s__nrecords, __pyx_k__nrecords, sizeof(__pyx_k__nrecords), 0, 0, 1, 1}, {&__pyx_n_s__nrows, __pyx_k__nrows, sizeof(__pyx_k__nrows), 0, 0, 1, 1}, {&__pyx_n_s__nrowsinbuf, __pyx_k__nrowsinbuf, sizeof(__pyx_k__nrowsinbuf), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__obversion, __pyx_k__obversion, sizeof(__pyx_k__obversion), 0, 0, 1, 1}, {&__pyx_n_s__params, __pyx_k__params, sizeof(__pyx_k__params), 0, 0, 1, 1}, {&__pyx_n_s__platform_byteorder, __pyx_k__platform_byteorder, sizeof(__pyx_k__platform_byteorder), 0, 0, 1, 1}, {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1}, {&__pyx_n_s__previous_api, __pyx_k__previous_api, sizeof(__pyx_k__previous_api), 0, 0, 1, 1}, {&__pyx_n_s__pt_special_kinds, __pyx_k__pt_special_kinds, sizeof(__pyx_k__pt_special_kinds), 0, 0, 1, 1}, {&__pyx_n_s__pttype_to_hdf5, __pyx_k__pttype_to_hdf5, sizeof(__pyx_k__pttype_to_hdf5), 0, 0, 1, 1}, {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1}, {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, {&__pyx_n_s__recarr, __pyx_k__recarr, sizeof(__pyx_k__recarr), 0, 0, 1, 1}, {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1}, {&__pyx_n_s__rowsize, __pyx_k__rowsize, sizeof(__pyx_k__rowsize), 0, 0, 1, 1}, {&__pyx_n_s__sense, __pyx_k__sense, sizeof(__pyx_k__sense), 0, 0, 1, 1}, {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1}, {&__pyx_n_s__shuffle, __pyx_k__shuffle, sizeof(__pyx_k__shuffle), 0, 0, 1, 1}, {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1}, {&__pyx_n_s__sometrue, __pyx_k__sometrue, sizeof(__pyx_k__sometrue), 0, 0, 1, 1}, {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1}, {&__pyx_n_s__step, __pyx_k__step, sizeof(__pyx_k__step), 0, 0, 1, 1}, {&__pyx_n_s__stop, __pyx_k__stop, sizeof(__pyx_k__stop), 0, 0, 1, 1}, {&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1}, {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1}, {&__pyx_n_s__table, __pyx_k__table, sizeof(__pyx_k__table), 0, 0, 1, 1}, {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1}, {&__pyx_n_s__time32, __pyx_k__time32, sizeof(__pyx_k__time32), 0, 0, 1, 1}, {&__pyx_n_s__time64, __pyx_k__time64, sizeof(__pyx_k__time64), 0, 0, 1, 1}, {&__pyx_n_s__title, __pyx_k__title, sizeof(__pyx_k__title), 0, 0, 1, 1}, {&__pyx_n_s__uint, __pyx_k__uint, sizeof(__pyx_k__uint), 0, 0, 1, 1}, {&__pyx_n_s__uint64, __pyx_k__uint64, sizeof(__pyx_k__uint64), 0, 0, 1, 1}, {&__pyx_n_s__whereCond, __pyx_k__whereCond, sizeof(__pyx_k__whereCond), 0, 0, 1, 1}, {&__pyx_n_s__wherecond, __pyx_k__wherecond, sizeof(__pyx_k__wherecond), 0, 0, 1, 1}, {&__pyx_n_s__zeros, __pyx_k__zeros, sizeof(__pyx_k__zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_IOError = __Pyx_GetName(__pyx_b, __pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "tables/tableextension.pyx":171 * cdef H5T_cset_t cset = H5T_CSET_ASCII * * encoded_title = title.encode('utf-8') # <<<<<<<<<<<<<< * encoded_complib = complib.encode('utf-8') * encoded_obversion = obversion.encode('utf-8') */ __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_4); __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4)); /* "tables/tableextension.pyx":172 * * encoded_title = title.encode('utf-8') * encoded_complib = complib.encode('utf-8') # <<<<<<<<<<<<<< * encoded_obversion = obversion.encode('utf-8') * encoded_name = self.name.encode('utf-8') */ __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_5); __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); /* "tables/tableextension.pyx":173 * encoded_title = title.encode('utf-8') * encoded_complib = complib.encode('utf-8') * encoded_obversion = obversion.encode('utf-8') # <<<<<<<<<<<<<< * encoded_name = self.name.encode('utf-8') * */ __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_6); __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6)); /* "tables/tableextension.pyx":174 * encoded_complib = complib.encode('utf-8') * encoded_obversion = obversion.encode('utf-8') * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Get the C pointer */ __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_7); __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7)); /* "tables/tableextension.pyx":201 * data = NULL * * class_ = self._c_classid.encode('utf-8') # <<<<<<<<<<<<<< * self.dataset_id = H5TBOmake_table(ctitle, self.parent_id, encoded_name, * cobversion, class_, self.disk_type_id, */ __pyx_k_tuple_8 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_8); __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8)); /* "tables/tableextension.pyx":211 * data) * if self.dataset_id < 0: * raise HDF5ExtError("Problems creating the table") # <<<<<<<<<<<<<< * * if self._v_file.params['PYTABLES_SYS_ATTRS']: */ __pyx_k_tuple_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_10); __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10)); /* "tables/tableextension.pyx":247 * for i, name in enumerate(self.description._v_names): * snprintf(fieldname, 128, "FIELD_%d_NAME", i) * encoded_name = name.encode('utf-8') # <<<<<<<<<<<<<< * ret = H5ATTRset_attribute_string(self.dataset_id, fieldname, * encoded_name, len(encoded_name), */ __pyx_k_tuple_13 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_13); __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); PyTuple_SET_ITEM(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13)); /* "tables/tableextension.pyx":345 * # operators so this: field_byteorders == "little" doesn't work * # as expected * if numpy.alltrue(field_byteorders.__eq__("little")): # <<<<<<<<<<<<<< * byteorder = "little" * elif numpy.alltrue(field_byteorders.__eq__("big")): */ __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_15); __Pyx_INCREF(((PyObject *)__pyx_n_s__little)); PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_n_s__little)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__little)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15)); /* "tables/tableextension.pyx":347 * if numpy.alltrue(field_byteorders.__eq__("little")): * byteorder = "little" * elif numpy.alltrue(field_byteorders.__eq__("big")): # <<<<<<<<<<<<<< * byteorder = "big" * else: # Yes! someone has done it! */ __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_16); __Pyx_INCREF(((PyObject *)__pyx_n_s__big)); PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_n_s__big)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__big)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16)); /* "tables/tableextension.pyx":372 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Open the dataset */ __pyx_k_tuple_17 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_17); __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); PyTuple_SET_ITEM(__pyx_k_tuple_17, 0, ((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17)); /* "tables/tableextension.pyx":483 * * if ret < 0: * raise HDF5ExtError("Problems appending the records.") # <<<<<<<<<<<<<< * * self.nrows = self.nrows + nrecords */ __pyx_k_tuple_22 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_22); __Pyx_INCREF(((PyObject *)__pyx_kp_s_21)); PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, ((PyObject *)__pyx_kp_s_21)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_21)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22)); /* "tables/tableextension.pyx":495 * if (H5ATTRset_attribute(self.dataset_id, "NROWS", H5T_STD_I64, * 0, NULL, &nrows) < 0): * raise HDF5ExtError("Problems setting the NROWS attribute.") # <<<<<<<<<<<<<< * * # Set the caches to dirty (in fact, and for the append case, */ __pyx_k_tuple_24 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_24); __Pyx_INCREF(((PyObject *)__pyx_kp_s_23)); PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, ((PyObject *)__pyx_kp_s_23)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24)); /* "tables/tableextension.pyx":526 * * if ret < 0: * raise HDF5ExtError("Problems updating the records.") # <<<<<<<<<<<<<< * * # Set the caches to dirty */ __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_26); __Pyx_INCREF(((PyObject *)__pyx_kp_s_25)); PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_kp_s_25)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26)); /* "tables/tableextension.pyx":551 * * if ret < 0: * raise HDF5ExtError("Problems updating the records.") # <<<<<<<<<<<<<< * * # Set the caches to dirty */ __pyx_k_tuple_27 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_27); __Pyx_INCREF(((PyObject *)__pyx_kp_s_25)); PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_kp_s_25)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27)); /* "tables/tableextension.pyx":573 * * if ret < 0: * raise HDF5ExtError("Problems reading records.") # <<<<<<<<<<<<<< * * # Convert some HDF5 types to NumPy after reading. */ __pyx_k_tuple_29 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_29); __Pyx_INCREF(((PyObject *)__pyx_kp_s_28)); PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_kp_s_28)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29)); /* "tables/tableextension.pyx":606 * * if ret < 0: * raise HDF5ExtError("Problems reading chunk records.") # <<<<<<<<<<<<<< * nslot = chunkcache.setitem_(nchunk, rbuf, 0) * return nrecords */ __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_31); __Pyx_INCREF(((PyObject *)__pyx_kp_s_30)); PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_kp_s_30)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_30)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31)); /* "tables/tableextension.pyx":627 * * if ret < 0: * raise HDF5ExtError("Problems reading records.") # <<<<<<<<<<<<<< * * # Convert some HDF5 types to NumPy after reading. */ __pyx_k_tuple_32 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_32); __Pyx_INCREF(((PyObject *)__pyx_kp_s_28)); PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, ((PyObject *)__pyx_kp_s_28)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); /* "tables/tableextension.pyx":646 * self.nrows, rowsize, start, nrecords, * self.nrowsinbuf) < 0): * raise HDF5ExtError("Problems deleting records.") # <<<<<<<<<<<<<< * * self.nrows = self.nrows - nrecords */ __pyx_k_tuple_34 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_34); __Pyx_INCREF(((PyObject *)__pyx_kp_s_33)); PyTuple_SET_ITEM(__pyx_k_tuple_34, 0, ((PyObject *)__pyx_kp_s_33)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_33)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34)); /* "tables/tableextension.pyx":669 * self._remove_rows(self, i, i+1, 1) * else: * raise ValueError("step size may not be 0.") # <<<<<<<<<<<<<< * * */ __pyx_k_tuple_36 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_36); __Pyx_INCREF(((PyObject *)__pyx_kp_s_35)); PyTuple_SET_ITEM(__pyx_k_tuple_36, 0, ((PyObject *)__pyx_kp_s_35)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_35)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36)); /* "tables/tableextension.pyx":798 * wdflts = table._v_wdflts * if wdflts is None: * self.wrec = numpy.zeros(1, dtype=self.dtype) # Defaults are zero # <<<<<<<<<<<<<< * else: * self.wrec = table._v_wdflts.copy() */ __pyx_k_tuple_37 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_37); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37)); /* "tables/tableextension.pyx":1298 * * if self.ro_filemode: * raise IOError("Attempt to write over a file opened in read-only mode") # <<<<<<<<<<<<<< * * if not self.chunked: */ __pyx_k_tuple_40 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_40); __Pyx_INCREF(((PyObject *)__pyx_kp_s_39)); PyTuple_SET_ITEM(__pyx_k_tuple_40, 0, ((PyObject *)__pyx_kp_s_39)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40)); /* "tables/tableextension.pyx":1301 * * if not self.chunked: * raise HDF5ExtError("You cannot append rows to a non-chunked table.", # <<<<<<<<<<<<<< * h5tb=False) * */ __pyx_k_tuple_42 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_42); __Pyx_INCREF(((PyObject *)__pyx_kp_s_41)); PyTuple_SET_ITEM(__pyx_k_tuple_42, 0, ((PyObject *)__pyx_kp_s_41)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42)); /* "tables/tableextension.pyx":1305 * * if self._riterator: * raise NotImplementedError("You cannot append rows when in middle of a table iterator. If what you want is to update records, use Row.update() instead.") # <<<<<<<<<<<<<< * * # Commit the private record into the write buffer */ __pyx_k_tuple_44 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_44); __Pyx_INCREF(((PyObject *)__pyx_kp_s_43)); PyTuple_SET_ITEM(__pyx_k_tuple_44, 0, ((PyObject *)__pyx_kp_s_43)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44)); /* "tables/tableextension.pyx":1384 * * if self.ro_filemode: * raise IOError("Attempt to write over a file opened in read-only mode") # <<<<<<<<<<<<<< * * if not self._riterator: */ __pyx_k_tuple_46 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_46); __Pyx_INCREF(((PyObject *)__pyx_kp_s_39)); PyTuple_SET_ITEM(__pyx_k_tuple_46, 0, ((PyObject *)__pyx_kp_s_39)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46)); /* "tables/tableextension.pyx":1387 * * if not self._riterator: * raise NotImplementedError("You are only allowed to update rows through the Row.update() method if you are in the middle of a table iterator.") # <<<<<<<<<<<<<< * * if self.mod_elements is None: */ __pyx_k_tuple_48 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_48); __Pyx_INCREF(((PyObject *)__pyx_kp_s_47)); PyTuple_SET_ITEM(__pyx_k_tuple_48, 0, ((PyObject *)__pyx_kp_s_47)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_47)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48)); /* "tables/tableextension.pyx":1545 * * if self.ro_filemode: * raise IOError("attempt to write over a file opened in read-only mode") # <<<<<<<<<<<<<< * * if self._riterator: */ __pyx_k_tuple_51 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_51); __Pyx_INCREF(((PyObject *)__pyx_kp_s_50)); PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, ((PyObject *)__pyx_kp_s_50)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_50)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); /* "numpy.pxd":215 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_k_tuple_57 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_57); __Pyx_INCREF(((PyObject *)__pyx_kp_u_56)); PyTuple_SET_ITEM(__pyx_k_tuple_57, 0, ((PyObject *)__pyx_kp_u_56)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_56)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57)); /* "numpy.pxd":219 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_k_tuple_59 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_59); __Pyx_INCREF(((PyObject *)__pyx_kp_u_58)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_kp_u_58)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_58)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); /* "numpy.pxd":257 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_k_tuple_61 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_61); __Pyx_INCREF(((PyObject *)__pyx_kp_u_60)); PyTuple_SET_ITEM(__pyx_k_tuple_61, 0, ((PyObject *)__pyx_kp_u_60)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_60)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61)); /* "numpy.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_k_tuple_64 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_64); __Pyx_INCREF(((PyObject *)__pyx_kp_u_63)); PyTuple_SET_ITEM(__pyx_k_tuple_64, 0, ((PyObject *)__pyx_kp_u_63)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_63)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64)); /* "numpy.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_k_tuple_65 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_65); __Pyx_INCREF(((PyObject *)__pyx_kp_u_60)); PyTuple_SET_ITEM(__pyx_k_tuple_65, 0, ((PyObject *)__pyx_kp_u_60)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_60)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65)); /* "numpy.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_k_tuple_67 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_67); __Pyx_INCREF(((PyObject *)__pyx_kp_u_66)); PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_kp_u_66)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_66)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67)); /* "tables/tableextension.pyx":727 * * # Deprecated API * indexChunk = previous_api_property('indexchunk') # <<<<<<<<<<<<<< * indexValid = previous_api_property('indexvalid') * indexValues = previous_api_property('indexvalues') */ __pyx_k_tuple_79 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_79); __Pyx_INCREF(((PyObject *)__pyx_n_s__indexchunk)); PyTuple_SET_ITEM(__pyx_k_tuple_79, 0, ((PyObject *)__pyx_n_s__indexchunk)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexchunk)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79)); /* "tables/tableextension.pyx":728 * # Deprecated API * indexChunk = previous_api_property('indexchunk') * indexValid = previous_api_property('indexvalid') # <<<<<<<<<<<<<< * indexValues = previous_api_property('indexvalues') * bufcoordsData = previous_api_property('bufcoords_data') */ __pyx_k_tuple_80 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_80); __Pyx_INCREF(((PyObject *)__pyx_n_s__indexvalid)); PyTuple_SET_ITEM(__pyx_k_tuple_80, 0, ((PyObject *)__pyx_n_s__indexvalid)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexvalid)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80)); /* "tables/tableextension.pyx":729 * indexChunk = previous_api_property('indexchunk') * indexValid = previous_api_property('indexvalid') * indexValues = previous_api_property('indexvalues') # <<<<<<<<<<<<<< * bufcoordsData = previous_api_property('bufcoords_data') * indexValuesData = previous_api_property('index_values_data') */ __pyx_k_tuple_81 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_81); __Pyx_INCREF(((PyObject *)__pyx_n_s__indexvalues)); PyTuple_SET_ITEM(__pyx_k_tuple_81, 0, ((PyObject *)__pyx_n_s__indexvalues)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexvalues)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81)); /* "tables/tableextension.pyx":730 * indexValid = previous_api_property('indexvalid') * indexValues = previous_api_property('indexvalues') * bufcoordsData = previous_api_property('bufcoords_data') # <<<<<<<<<<<<<< * indexValuesData = previous_api_property('index_values_data') * chunkmapData = previous_api_property('chunkmap_data') */ __pyx_k_tuple_82 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_82); __Pyx_INCREF(((PyObject *)__pyx_n_s__bufcoords_data)); PyTuple_SET_ITEM(__pyx_k_tuple_82, 0, ((PyObject *)__pyx_n_s__bufcoords_data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bufcoords_data)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82)); /* "tables/tableextension.pyx":731 * indexValues = previous_api_property('indexvalues') * bufcoordsData = previous_api_property('bufcoords_data') * indexValuesData = previous_api_property('index_values_data') # <<<<<<<<<<<<<< * chunkmapData = previous_api_property('chunkmap_data') * indexValidData = previous_api_property('index_valid_data') */ __pyx_k_tuple_83 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_83); __Pyx_INCREF(((PyObject *)__pyx_n_s__index_values_data)); PyTuple_SET_ITEM(__pyx_k_tuple_83, 0, ((PyObject *)__pyx_n_s__index_values_data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index_values_data)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83)); /* "tables/tableextension.pyx":732 * bufcoordsData = previous_api_property('bufcoords_data') * indexValuesData = previous_api_property('index_values_data') * chunkmapData = previous_api_property('chunkmap_data') # <<<<<<<<<<<<<< * indexValidData = previous_api_property('index_valid_data') * whereCond = previous_api_property('wherecond') */ __pyx_k_tuple_84 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_84); __Pyx_INCREF(((PyObject *)__pyx_n_s__chunkmap_data)); PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_n_s__chunkmap_data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chunkmap_data)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84)); /* "tables/tableextension.pyx":733 * indexValuesData = previous_api_property('index_values_data') * chunkmapData = previous_api_property('chunkmap_data') * indexValidData = previous_api_property('index_valid_data') # <<<<<<<<<<<<<< * whereCond = previous_api_property('wherecond') * iterseqMaxElements = previous_api_property('iterseq_max_elements') */ __pyx_k_tuple_85 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_85); __Pyx_INCREF(((PyObject *)__pyx_n_s__index_valid_data)); PyTuple_SET_ITEM(__pyx_k_tuple_85, 0, ((PyObject *)__pyx_n_s__index_valid_data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index_valid_data)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85)); /* "tables/tableextension.pyx":734 * chunkmapData = previous_api_property('chunkmap_data') * indexValidData = previous_api_property('index_valid_data') * whereCond = previous_api_property('wherecond') # <<<<<<<<<<<<<< * iterseqMaxElements = previous_api_property('iterseq_max_elements') * IObuf = previous_api_property('iobuf') */ __pyx_k_tuple_86 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_86); __Pyx_INCREF(((PyObject *)__pyx_n_s__wherecond)); PyTuple_SET_ITEM(__pyx_k_tuple_86, 0, ((PyObject *)__pyx_n_s__wherecond)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__wherecond)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86)); /* "tables/tableextension.pyx":735 * indexValidData = previous_api_property('index_valid_data') * whereCond = previous_api_property('wherecond') * iterseqMaxElements = previous_api_property('iterseq_max_elements') # <<<<<<<<<<<<<< * IObuf = previous_api_property('iobuf') * IObufcpy = previous_api_property('iobufcpy') */ __pyx_k_tuple_88 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_88); __Pyx_INCREF(((PyObject *)__pyx_n_s_87)); PyTuple_SET_ITEM(__pyx_k_tuple_88, 0, ((PyObject *)__pyx_n_s_87)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_87)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88)); /* "tables/tableextension.pyx":736 * whereCond = previous_api_property('wherecond') * iterseqMaxElements = previous_api_property('iterseq_max_elements') * IObuf = previous_api_property('iobuf') # <<<<<<<<<<<<<< * IObufcpy = previous_api_property('iobufcpy') * */ __pyx_k_tuple_89 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_89); __Pyx_INCREF(((PyObject *)__pyx_n_s__iobuf)); PyTuple_SET_ITEM(__pyx_k_tuple_89, 0, ((PyObject *)__pyx_n_s__iobuf)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__iobuf)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89)); /* "tables/tableextension.pyx":737 * iterseqMaxElements = previous_api_property('iterseq_max_elements') * IObuf = previous_api_property('iobuf') * IObufcpy = previous_api_property('iobufcpy') # <<<<<<<<<<<<<< * * # The nrow() method has been converted into a property, which is handier */ __pyx_k_tuple_90 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_90); __Pyx_INCREF(((PyObject *)__pyx_n_s__iobufcpy)); PyTuple_SET_ITEM(__pyx_k_tuple_90, 0, ((PyObject *)__pyx_n_s__iobufcpy)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__iobufcpy)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90)); __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC inittableextension(void); /*proto*/ PyMODINIT_FUNC inittableextension(void) #else PyMODINIT_FUNC PyInit_tableextension(void); /*proto*/ PyMODINIT_FUNC PyInit_tableextension(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_tableextension(void)", 0); if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("tableextension"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_69), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "tables.tableextension")) { if (unlikely(PyDict_SetItemString(modules, "tables.tableextension", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_module_is_main_tables__tableextension) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_ptype_6tables_13hdf5extension_Leaf = __Pyx_ImportType("tables.hdf5extension", "Leaf", sizeof(struct __pyx_obj_6tables_13hdf5extension_Leaf), 1); if (unlikely(!__pyx_ptype_6tables_13hdf5extension_Leaf)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6tables_13hdf5extension_Leaf = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__Pyx_GetVtable(__pyx_ptype_6tables_13hdf5extension_Leaf->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_13hdf5extension_Leaf)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6tables_14tableextension_Table = &__pyx_vtable_6tables_14tableextension_Table; __pyx_vtable_6tables_14tableextension_Table.__pyx_base = *__pyx_vtabptr_6tables_13hdf5extension_Leaf; __pyx_vtable_6tables_14tableextension_Table.get_nested_type = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Table *, hid_t, hid_t, PyObject *, PyObject *))__pyx_f_6tables_14tableextension_5Table_get_nested_type; __pyx_vtable_6tables_14tableextension_Table._convert_time64_ = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Table *, PyArrayObject *, hsize_t, int))__pyx_f_6tables_14tableextension_5Table__convert_time64_; __pyx_vtable_6tables_14tableextension_Table._convert_types = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Table *, PyArrayObject *, hsize_t, int, int __pyx_skip_dispatch))__pyx_f_6tables_14tableextension_5Table__convert_types; __pyx_vtable_6tables_14tableextension_Table._read_chunk = (hsize_t (*)(struct __pyx_obj_6tables_14tableextension_Table *, hsize_t, PyArrayObject *, long))__pyx_f_6tables_14tableextension_5Table__read_chunk; __pyx_type_6tables_14tableextension_Table.tp_base = __pyx_ptype_6tables_13hdf5extension_Leaf; if (PyType_Ready(&__pyx_type_6tables_14tableextension_Table) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6tables_14tableextension_Table.tp_dict, __pyx_vtabptr_6tables_14tableextension_Table) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Table", (PyObject *)&__pyx_type_6tables_14tableextension_Table) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_14tableextension_Table = &__pyx_type_6tables_14tableextension_Table; __pyx_vtabptr_6tables_14tableextension_Row = &__pyx_vtable_6tables_14tableextension_Row; __pyx_vtable_6tables_14tableextension_Row._new_buffer = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Row *, PyObject *))__pyx_f_6tables_14tableextension_3Row__new_buffer; __pyx_vtable_6tables_14tableextension_Row._init_loop = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Row *, hsize_t, PY_LONG_LONG, PY_LONG_LONG, PyObject *, PyObject *))__pyx_f_6tables_14tableextension_3Row__init_loop; __pyx_vtable_6tables_14tableextension_Row.__pyx___next__indexed = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Row *))__pyx_f_6tables_14tableextension_3Row___next__indexed; __pyx_vtable_6tables_14tableextension_Row.__pyx___next__coords = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Row *))__pyx_f_6tables_14tableextension_3Row___next__coords; __pyx_vtable_6tables_14tableextension_Row.__pyx___next__inkernel = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Row *))__pyx_f_6tables_14tableextension_3Row___next__inkernel; __pyx_vtable_6tables_14tableextension_Row.__pyx___next__general = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Row *))__pyx_f_6tables_14tableextension_3Row___next__general; __pyx_vtable_6tables_14tableextension_Row._finish_riterator = (PyObject *(*)(struct __pyx_obj_6tables_14tableextension_Row *))__pyx_f_6tables_14tableextension_3Row__finish_riterator; if (PyType_Ready(&__pyx_type_6tables_14tableextension_Row) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6tables_14tableextension_Row, "__iter__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6tables_14tableextension_3Row_4__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6tables_14tableextension_3Row_4__iter__.doc = __pyx_doc_6tables_14tableextension_3Row_4__iter__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6tables_14tableextension_3Row_4__iter__; } } #endif #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6tables_14tableextension_Row, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6tables_14tableextension_3Row_6__next__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6tables_14tableextension_3Row_6__next__.doc = __pyx_doc_6tables_14tableextension_3Row_6__next__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6tables_14tableextension_3Row_6__next__; } } #endif #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6tables_14tableextension_Row, "__contains__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6tables_14tableextension_3Row_20__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6tables_14tableextension_3Row_20__contains__.doc = __pyx_doc_6tables_14tableextension_3Row_20__contains__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6tables_14tableextension_3Row_20__contains__; } } #endif #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6tables_14tableextension_Row, "__getitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6tables_14tableextension_3Row_22__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6tables_14tableextension_3Row_22__getitem__.doc = __pyx_doc_6tables_14tableextension_3Row_22__getitem__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6tables_14tableextension_3Row_22__getitem__; } } #endif #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6tables_14tableextension_Row, "__setitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6tables_14tableextension_3Row_24__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6tables_14tableextension_3Row_24__setitem__.doc = __pyx_doc_6tables_14tableextension_3Row_24__setitem__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6tables_14tableextension_3Row_24__setitem__; } } #endif #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6tables_14tableextension_Row, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6tables_14tableextension_3Row_28__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6tables_14tableextension_3Row_28__str__.doc = __pyx_doc_6tables_14tableextension_3Row_28__str__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6tables_14tableextension_3Row_28__str__; } } #endif #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6tables_14tableextension_Row, "__repr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6tables_14tableextension_3Row_30__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6tables_14tableextension_3Row_30__repr__.doc = __pyx_doc_6tables_14tableextension_3Row_30__repr__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6tables_14tableextension_3Row_30__repr__; } } #endif if (__Pyx_SetVtable(__pyx_type_6tables_14tableextension_Row.tp_dict, __pyx_vtabptr_6tables_14tableextension_Row) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Row", (PyObject *)&__pyx_type_6tables_14tableextension_Row) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_14tableextension_Row = &__pyx_type_6tables_14tableextension_Row; /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_Node = __Pyx_ImportType("tables.hdf5extension", "Node", sizeof(struct __pyx_obj_6tables_13hdf5extension_Node), 1); if (unlikely(!__pyx_ptype_6tables_13hdf5extension_Node)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_Array = __Pyx_ImportType("tables.hdf5extension", "Array", sizeof(struct __pyx_obj_6tables_13hdf5extension_Array), 1); if (unlikely(!__pyx_ptype_6tables_13hdf5extension_Array)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6tables_13hdf5extension_Array = (struct __pyx_vtabstruct_6tables_13hdf5extension_Array*)__Pyx_GetVtable(__pyx_ptype_6tables_13hdf5extension_Array->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_13hdf5extension_Array)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_17lrucacheextension_NodeCache = __Pyx_ImportType("tables.lrucacheextension", "NodeCache", sizeof(struct __pyx_obj_6tables_17lrucacheextension_NodeCache), 1); if (unlikely(!__pyx_ptype_6tables_17lrucacheextension_NodeCache)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6tables_17lrucacheextension_NodeCache = (struct __pyx_vtabstruct_6tables_17lrucacheextension_NodeCache*)__Pyx_GetVtable(__pyx_ptype_6tables_17lrucacheextension_NodeCache->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_17lrucacheextension_NodeCache)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_17lrucacheextension_BaseCache = __Pyx_ImportType("tables.lrucacheextension", "BaseCache", sizeof(struct __pyx_obj_6tables_17lrucacheextension_BaseCache), 1); if (unlikely(!__pyx_ptype_6tables_17lrucacheextension_BaseCache)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6tables_17lrucacheextension_BaseCache = (struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache*)__Pyx_GetVtable(__pyx_ptype_6tables_17lrucacheextension_BaseCache->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_17lrucacheextension_BaseCache)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_17lrucacheextension_ObjectNode = __Pyx_ImportType("tables.lrucacheextension", "ObjectNode", sizeof(struct __pyx_obj_6tables_17lrucacheextension_ObjectNode), 1); if (unlikely(!__pyx_ptype_6tables_17lrucacheextension_ObjectNode)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_17lrucacheextension_ObjectCache = __Pyx_ImportType("tables.lrucacheextension", "ObjectCache", sizeof(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache), 1); if (unlikely(!__pyx_ptype_6tables_17lrucacheextension_ObjectCache)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6tables_17lrucacheextension_ObjectCache = (struct __pyx_vtabstruct_6tables_17lrucacheextension_ObjectCache*)__Pyx_GetVtable(__pyx_ptype_6tables_17lrucacheextension_ObjectCache->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_17lrucacheextension_ObjectCache)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_17lrucacheextension_NumCache = __Pyx_ImportType("tables.lrucacheextension", "NumCache", sizeof(struct __pyx_obj_6tables_17lrucacheextension_NumCache), 1); if (unlikely(!__pyx_ptype_6tables_17lrucacheextension_NumCache)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_6tables_17lrucacheextension_NumCache = (struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache*)__Pyx_GetVtable(__pyx_ptype_6tables_17lrucacheextension_NumCache->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_17lrucacheextension_NumCache)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ __pyx_t_1 = __Pyx_ImportModule("tables.utilsextension"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_1, "get_native_type", (void (**)(void))&__pyx_f_6tables_14utilsextension_get_native_type, "hid_t (hid_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_1, "cstr_to_pystr", (void (**)(void))&__pyx_f_6tables_14utilsextension_cstr_to_pystr, "PyObject *(const char *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Execution code ---*/ /* "tables/tableextension.pyx":26 * """ * * import sys # <<<<<<<<<<<<<< * import numpy * from time import time */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":27 * * import sys * import numpy # <<<<<<<<<<<<<< * from time import time * */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__numpy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":28 * import sys * import numpy * from time import time # <<<<<<<<<<<<<< * * from tables.description import Col */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__time)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__time)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__time), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__time); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "tables/tableextension.pyx":30 * from time import time * * from tables.description import Col # <<<<<<<<<<<<<< * from tables.exceptions import HDF5ExtError * from tables.conditions import call_on_recarr */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__Col)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__Col)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Col)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_70), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__Col); if (__pyx_t_3 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__Col); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Col, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":31 * * from tables.description import Col * from tables.exceptions import HDF5ExtError # <<<<<<<<<<<<<< * from tables.conditions import call_on_recarr * from tables.utilsextension import (get_nested_field, atom_from_hdf5_type, */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__HDF5ExtError)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__HDF5ExtError)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HDF5ExtError)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_71), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__HDF5ExtError); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__HDF5ExtError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "tables/tableextension.pyx":32 * from tables.description import Col * from tables.exceptions import HDF5ExtError * from tables.conditions import call_on_recarr # <<<<<<<<<<<<<< * from tables.utilsextension import (get_nested_field, atom_from_hdf5_type, * create_nested_type, hdf5_to_np_ext_type, create_nested_type, platform_byteorder, */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__call_on_recarr)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__call_on_recarr)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__call_on_recarr)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_72), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__call_on_recarr); if (__pyx_t_3 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__call_on_recarr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__call_on_recarr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":33 * from tables.exceptions import HDF5ExtError * from tables.conditions import call_on_recarr * from tables.utilsextension import (get_nested_field, atom_from_hdf5_type, # <<<<<<<<<<<<<< * create_nested_type, hdf5_to_np_ext_type, create_nested_type, platform_byteorder, * pttype_to_hdf5, pt_special_kinds, npext_prefixes_to_ptkinds, hdf5_class_to_string, */ __pyx_t_2 = PyList_New(11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__get_nested_field)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__get_nested_field)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__get_nested_field)); __Pyx_INCREF(((PyObject *)__pyx_n_s__atom_from_hdf5_type)); PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__atom_from_hdf5_type)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__atom_from_hdf5_type)); __Pyx_INCREF(((PyObject *)__pyx_n_s__create_nested_type)); PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_s__create_nested_type)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__create_nested_type)); __Pyx_INCREF(((PyObject *)__pyx_n_s__hdf5_to_np_ext_type)); PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__hdf5_to_np_ext_type)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hdf5_to_np_ext_type)); __Pyx_INCREF(((PyObject *)__pyx_n_s__create_nested_type)); PyList_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_s__create_nested_type)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__create_nested_type)); __Pyx_INCREF(((PyObject *)__pyx_n_s__platform_byteorder)); PyList_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_n_s__platform_byteorder)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__platform_byteorder)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pttype_to_hdf5)); PyList_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_n_s__pttype_to_hdf5)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pttype_to_hdf5)); __Pyx_INCREF(((PyObject *)__pyx_n_s__pt_special_kinds)); PyList_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_n_s__pt_special_kinds)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pt_special_kinds)); __Pyx_INCREF(((PyObject *)__pyx_n_s_74)); PyList_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_s_74)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_74)); __Pyx_INCREF(((PyObject *)__pyx_n_s_75)); PyList_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_s_75)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_75)); __Pyx_INCREF(((PyObject *)__pyx_n_s__H5T_STD_I64)); PyList_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_n_s__H5T_STD_I64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__H5T_STD_I64)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_73), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__get_nested_field); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__get_nested_field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_nested_field, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__atom_from_hdf5_type); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__atom_from_hdf5_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__atom_from_hdf5_type, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__create_nested_type); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__create_nested_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__create_nested_type, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__hdf5_to_np_ext_type); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__hdf5_to_np_ext_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__hdf5_to_np_ext_type, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__create_nested_type); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__create_nested_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__create_nested_type, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__platform_byteorder); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__platform_byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__platform_byteorder, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__pttype_to_hdf5); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__pttype_to_hdf5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pttype_to_hdf5, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__pt_special_kinds); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__pt_special_kinds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pt_special_kinds, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s_74); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s_74); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s_74, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s_75); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s_75); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s_75, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__H5T_STD_I64); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__H5T_STD_I64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__H5T_STD_I64, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "tables/tableextension.pyx":37 * pttype_to_hdf5, pt_special_kinds, npext_prefixes_to_ptkinds, hdf5_class_to_string, * H5T_STD_I64) * from tables.utils import SizeType # <<<<<<<<<<<<<< * * from utilsextension cimport get_native_type, cstr_to_pystr */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__SizeType)); PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__SizeType)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SizeType)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_76), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__SizeType); if (__pyx_t_3 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__SizeType); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_3); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SizeType, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/tableextension.pyx":67 * from lrucacheextension cimport ObjectCache, NumCache * * from tables._past import previous_api, previous_api_property # <<<<<<<<<<<<<< * * */ __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__previous_api)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__previous_api)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__previous_api)); __Pyx_INCREF(((PyObject *)__pyx_n_s_78)); PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s_78)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_78)); __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_77), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__previous_api); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__previous_api, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s_78); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s_78); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s_78, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "tables/tableextension.pyx":111 * # The numpy API requires this function to be called before * # using any numpy facilities in an extension module. * import_array() # <<<<<<<<<<<<<< * * #------------------------------------------------------------- */ import_array(); /* "tables/tableextension.pyx":727 * * # Deprecated API * indexChunk = previous_api_property('indexchunk') # <<<<<<<<<<<<<< * indexValid = previous_api_property('indexvalid') * indexValues = previous_api_property('indexvalues') */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_79), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__indexChunk, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":728 * # Deprecated API * indexChunk = previous_api_property('indexchunk') * indexValid = previous_api_property('indexvalid') # <<<<<<<<<<<<<< * indexValues = previous_api_property('indexvalues') * bufcoordsData = previous_api_property('bufcoords_data') */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__indexValid, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":729 * indexChunk = previous_api_property('indexchunk') * indexValid = previous_api_property('indexvalid') * indexValues = previous_api_property('indexvalues') # <<<<<<<<<<<<<< * bufcoordsData = previous_api_property('bufcoords_data') * indexValuesData = previous_api_property('index_values_data') */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_81), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__indexValues, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":730 * indexValid = previous_api_property('indexvalid') * indexValues = previous_api_property('indexvalues') * bufcoordsData = previous_api_property('bufcoords_data') # <<<<<<<<<<<<<< * indexValuesData = previous_api_property('index_values_data') * chunkmapData = previous_api_property('chunkmap_data') */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_82), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__bufcoordsData, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":731 * indexValues = previous_api_property('indexvalues') * bufcoordsData = previous_api_property('bufcoords_data') * indexValuesData = previous_api_property('index_values_data') # <<<<<<<<<<<<<< * chunkmapData = previous_api_property('chunkmap_data') * indexValidData = previous_api_property('index_valid_data') */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__indexValuesData, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":732 * bufcoordsData = previous_api_property('bufcoords_data') * indexValuesData = previous_api_property('index_values_data') * chunkmapData = previous_api_property('chunkmap_data') # <<<<<<<<<<<<<< * indexValidData = previous_api_property('index_valid_data') * whereCond = previous_api_property('wherecond') */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_84), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__chunkmapData, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":733 * indexValuesData = previous_api_property('index_values_data') * chunkmapData = previous_api_property('chunkmap_data') * indexValidData = previous_api_property('index_valid_data') # <<<<<<<<<<<<<< * whereCond = previous_api_property('wherecond') * iterseqMaxElements = previous_api_property('iterseq_max_elements') */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__indexValidData, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":734 * chunkmapData = previous_api_property('chunkmap_data') * indexValidData = previous_api_property('index_valid_data') * whereCond = previous_api_property('wherecond') # <<<<<<<<<<<<<< * iterseqMaxElements = previous_api_property('iterseq_max_elements') * IObuf = previous_api_property('iobuf') */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__whereCond, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":735 * indexValidData = previous_api_property('index_valid_data') * whereCond = previous_api_property('wherecond') * iterseqMaxElements = previous_api_property('iterseq_max_elements') # <<<<<<<<<<<<<< * IObuf = previous_api_property('iobuf') * IObufcpy = previous_api_property('iobufcpy') */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__iterseqMaxElements, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":736 * whereCond = previous_api_property('wherecond') * iterseqMaxElements = previous_api_property('iterseq_max_elements') * IObuf = previous_api_property('iobuf') # <<<<<<<<<<<<<< * IObufcpy = previous_api_property('iobufcpy') * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__IObuf, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":737 * iterseqMaxElements = previous_api_property('iterseq_max_elements') * IObuf = previous_api_property('iobuf') * IObufcpy = previous_api_property('iobufcpy') # <<<<<<<<<<<<<< * * # The nrow() method has been converted into a property, which is handier */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_78); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_90), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s__IObufcpy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":1263 * return * * _fillCol = previous_api(_fill_col) # <<<<<<<<<<<<<< * * def append(self): */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_14tableextension_Row, __pyx_n_s___fill_col); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s___fillCol, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":1329 * self._unsaved_nrows = 0 * * _flushBufferedRows = previous_api(_flush_buffered_rows) # <<<<<<<<<<<<<< * * def _get_unsaved_nrows(self): */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_14tableextension_Row, __pyx_n_s_45); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s___flushBufferedRows, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":1334 * return self._unsaved_nrows * * _getUnsavedNrows = previous_api(_get_unsaved_nrows) # <<<<<<<<<<<<<< * * def update(self): */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_14tableextension_Row, __pyx_n_s___get_unsaved_nrows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s___getUnsavedNrows, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":1421 * table._mark_columns_as_dirty(self.modified_fields) * * _flushModRows = previous_api(_flush_mod_rows) # <<<<<<<<<<<<<< * * def __contains__(self, item): */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_14tableextension_Row, __pyx_n_s___flush_mod_rows); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_14tableextension_Row->tp_dict, __pyx_n_s___flushModRows, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6tables_14tableextension_Row); /* "tables/tableextension.pyx":1 * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<< * * ######################################################################## */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "numpy.pxd":975 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); if (__pyx_m) { __Pyx_AddTraceback("init tables.tableextension", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init tables.tableextension"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* Runtime support code */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* CYTHON_REFNANNY */ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { PyObject *result; result = PyObject_GetAttr(dict, name); if (!result) { if (dict != __pyx_b) { PyErr_Clear(); result = PyObject_GetAttr(__pyx_b, name); } if (!result) { PyErr_SetObject(PyExc_NameError, name); } } return result; } static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; #endif Py_INCREF(local_type); Py_INCREF(local_value); Py_INCREF(local_tb); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_COMPILING_IN_CPYTHON tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; /* Make sure tstate is in a consistent state when we XDECREF these objects (DECREF may run arbitrary code). */ Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } #if PY_VERSION_HEX < 0x02050000 if (PyClass_Check(type)) { #else if (PyType_Check(type)) { #endif #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { type = 0; PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } #endif } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else /* Python 3+ */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyEval_CallObject(type, args); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause && cause != Py_None) { PyObject *fixed_cause; if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) { return (equals == Py_NE); } else if (PyBytes_GET_SIZE(s1) == 1) { if (equals == Py_EQ) return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]); else return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]); } else { int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1)); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyUnicode_CheckExact(s1) & PyUnicode_CheckExact(s2)) { #if CYTHON_PEP393_ENABLED if ((PyUnicode_READY(s1) < 0) || (PyUnicode_READY(s2) < 0)) return -1; if (PyUnicode_GET_LENGTH(s1) != PyUnicode_GET_LENGTH(s2)) { return (equals == Py_NE); } else if (PyUnicode_GET_LENGTH(s1) == 1) { Py_UCS4 ch1 = PyUnicode_READ_CHAR(s1, 0); Py_UCS4 ch2 = PyUnicode_READ_CHAR(s2, 0); return (equals == Py_EQ) ? (ch1 == ch2) : (ch1 != ch2); #else if (PyUnicode_GET_SIZE(s1) != PyUnicode_GET_SIZE(s2)) { return (equals == Py_NE); } else if (PyUnicode_GET_SIZE(s1) == 1) { Py_UNICODE ch1 = PyUnicode_AS_UNICODE(s1)[0]; Py_UNICODE ch2 = PyUnicode_AS_UNICODE(s2)[0]; return (equals == Py_EQ) ? (ch1 == ch2) : (ch1 != ch2); #endif } else { int result = PyUnicode_Compare(s1, s2); if ((result == -1) && unlikely(PyErr_Occurred())) return -1; return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyUnicode_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyUnicode_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (Py_TYPE(obj) == type) return 1; } else { if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } static CYTHON_INLINE hsize_t __Pyx_div_hsize_t(hsize_t a, hsize_t b) { hsize_t q = a / b; hsize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE hsize_t __Pyx_mod_hsize_t(hsize_t a, hsize_t b) { hsize_t r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } static CYTHON_INLINE PY_LONG_LONG __Pyx_mod_PY_LONG_LONG(PY_LONG_LONG a, PY_LONG_LONG b) { PY_LONG_LONG r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } static CYTHON_INLINE PY_LONG_LONG __Pyx_div_PY_LONG_LONG(PY_LONG_LONG a, PY_LONG_LONG b) { PY_LONG_LONG q = a / b; PY_LONG_LONG r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_dealloc != current_tp_dealloc) type = type->tp_base; while (type && type->tp_dealloc == current_tp_dealloc) type = type->tp_base; if (type) type->tp_dealloc(obj); } static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_traverse != current_tp_traverse) type = type->tp_base; while (type && type->tp_traverse == current_tp_traverse) type = type->tp_base; if (type && type->tp_traverse) return type->tp_traverse(obj, v, a); return 0; } static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_clear != current_tp_clear) type = type->tp_base; while (type && type->tp_clear == current_tp_clear) type = type->tp_base; if (type && type->tp_clear) type->tp_clear(obj); } static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else PyErr_GetExcInfo(type, value, tb); #endif } static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(type, value, tb); #endif } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) { PyObject *py_import = 0; PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); if (!py_import) goto bad; if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { /* try package relative import first */ PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; /* try absolute import on failure */ } #endif if (!module) { PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); } } #else if (level>0) { PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); goto bad; } module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); #endif bad: Py_XDECREF(empty_list); Py_XDECREF(py_import); Py_XDECREF(empty_dict); return module; } static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) { #if PY_MAJOR_VERSION < 3 PyErr_Format(PyExc_ImportError, "cannot import name %.230s", PyString_AsString(name)); #else PyErr_Format(PyExc_ImportError, "cannot import name %S", name); #endif } static CYTHON_INLINE hsize_t __Pyx_PyInt_from_py_hsize_t(PyObject* x) { const hsize_t neg_one = (hsize_t)-1, const_zero = (hsize_t)0; const int is_unsigned = const_zero < neg_one; if (sizeof(hsize_t) == sizeof(char)) { if (is_unsigned) return (hsize_t)__Pyx_PyInt_AsUnsignedChar(x); else return (hsize_t)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(hsize_t) == sizeof(short)) { if (is_unsigned) return (hsize_t)__Pyx_PyInt_AsUnsignedShort(x); else return (hsize_t)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(hsize_t) == sizeof(int)) { if (is_unsigned) return (hsize_t)__Pyx_PyInt_AsUnsignedInt(x); else return (hsize_t)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(hsize_t) == sizeof(long)) { if (is_unsigned) return (hsize_t)__Pyx_PyInt_AsUnsignedLong(x); else return (hsize_t)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(hsize_t) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (hsize_t)__Pyx_PyInt_AsUnsignedLongLong(x); else return (hsize_t)__Pyx_PyInt_AsSignedLongLong(x); } else { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else hsize_t val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_VERSION_HEX < 0x03000000 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (hsize_t)-1; } } static CYTHON_INLINE hid_t __Pyx_PyInt_from_py_hid_t(PyObject* x) { const hid_t neg_one = (hid_t)-1, const_zero = (hid_t)0; const int is_unsigned = const_zero < neg_one; if (sizeof(hid_t) == sizeof(char)) { if (is_unsigned) return (hid_t)__Pyx_PyInt_AsUnsignedChar(x); else return (hid_t)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(hid_t) == sizeof(short)) { if (is_unsigned) return (hid_t)__Pyx_PyInt_AsUnsignedShort(x); else return (hid_t)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(hid_t) == sizeof(int)) { if (is_unsigned) return (hid_t)__Pyx_PyInt_AsUnsignedInt(x); else return (hid_t)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(hid_t) == sizeof(long)) { if (is_unsigned) return (hid_t)__Pyx_PyInt_AsUnsignedLong(x); else return (hid_t)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(hid_t) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (hid_t)__Pyx_PyInt_AsUnsignedLongLong(x); else return (hid_t)__Pyx_PyInt_AsSignedLongLong(x); } else { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else hid_t val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_VERSION_HEX < 0x03000000 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (hid_t)-1; } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t val) { const hid_t neg_one = (hid_t)-1, const_zero = (hid_t)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(hid_t) == sizeof(char)) || (sizeof(hid_t) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(hid_t) == sizeof(int)) || (sizeof(hid_t) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(hid_t) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(hid_t), little, !is_unsigned); } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hsize_t(hsize_t val) { const hsize_t neg_one = (hsize_t)-1, const_zero = (hsize_t)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(hsize_t) == sizeof(char)) || (sizeof(hsize_t) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(hsize_t) == sizeof(int)) || (sizeof(hsize_t) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(hsize_t) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); else return PyLong_FromLongLong((PY_LONG_LONG)val); } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; return _PyLong_FromByteArray(bytes, sizeof(hsize_t), little, !is_unsigned); } } #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); } #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return x + y*(__pyx_t_float_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { __pyx_t_float_complex z; z.real = x; z.imag = y; return z; } #endif #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrtf(z.real*z.real + z.imag*z.imag); #else return hypotf(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { float denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(a, a); case 3: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, a); case 4: z = __Pyx_c_prodf(a, a); return __Pyx_c_prodf(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_absf(a); theta = atan2f(a.imag, a.real); } lnr = logf(r); z_r = expf(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cosf(z_theta); z.imag = z_r * sinf(z_theta); return z; } #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); } #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return x + y*(__pyx_t_double_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { __pyx_t_double_complex z; z.real = x; z.imag = y; return z; } #endif #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrt(z.real*z.real + z.imag*z.imag); #else return hypot(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { double denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(a, a); case 3: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, a); case 4: z = __Pyx_c_prod(a, a); return __Pyx_c_prod(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } r = a.real; theta = 0; } else { r = __Pyx_c_abs(a); theta = atan2(a.imag, a.real); } lnr = log(r); z_r = exp(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cos(z_theta); z.imag = z_r * sin(z_theta); return z; } #endif #endif static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned char" : "value too large to convert to unsigned char"); } return (unsigned char)-1; } return (unsigned char)val; } return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned short" : "value too large to convert to unsigned short"); } return (unsigned short)-1; } return (unsigned short)val; } return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to unsigned int" : "value too large to convert to unsigned int"); } return (unsigned int)-1; } return (unsigned int)val; } return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to char" : "value too large to convert to char"); } return (char)-1; } return (char)val; } return (char)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to short" : "value too large to convert to short"); } return (short)-1; } return (short)val; } return (short)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed char" : "value too large to convert to signed char"); } return (signed char)-1; } return (signed char)val; } return (signed char)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed short" : "value too large to convert to signed short"); } return (signed short)-1; } return (signed short)val; } return (signed short)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to signed int" : "value too large to convert to signed int"); } return (signed int)-1; } return (signed int)val; } return (signed int)__Pyx_PyInt_AsSignedLong(x); } static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, (is_unsigned && unlikely(val < 0)) ? "can't convert negative value to int" : "value too large to convert to int"); } return (int)-1; } return (int)val; } return (int)__Pyx_PyInt_AsLong(x); } static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; } return (unsigned long)PyLong_AsUnsignedLong(x); } else { return (unsigned long)PyLong_AsLong(x); } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned long)-1; val = __Pyx_PyInt_AsUnsignedLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; } return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); } } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned PY_LONG_LONG)-1; val = __Pyx_PyInt_AsUnsignedLongLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long)-1; } return (long)PyLong_AsUnsignedLong(x); } else { return (long)PyLong_AsLong(x); } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long)-1; val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to PY_LONG_LONG"); return (PY_LONG_LONG)-1; } return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed long"); return (signed long)-1; } return (signed long)PyLong_AsUnsignedLong(x); } else { return (signed long)PyLong_AsLong(x); } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed long)-1; val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to signed PY_LONG_LONG"); return (signed PY_LONG_LONG)-1; } return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (signed PY_LONG_LONG)-1; val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); #if PY_VERSION_HEX < 0x02050000 return PyErr_Warn(NULL, message); #else return PyErr_WarnEx(NULL, message, 1); #endif } return 0; } #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%s.%s is not a type object", module_name, class_name); goto bad; } if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 if (PyErr_Warn(NULL, warning) < 0) goto bad; #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; #endif } else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) { PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif static void* __Pyx_GetVtable(PyObject *dict) { void* ptr; PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__"); if (!ob) goto bad; #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) ptr = PyCapsule_GetPointer(ob, 0); #else ptr = PyCObject_AsVoidPtr(ob); #endif if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) PyObject *ob = PyCapsule_New(vtable, 0, 0); #else PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); #endif if (!ob) goto bad; if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0) goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } #ifndef __PYX_HAVE_RT_ImportFunction #define __PYX_HAVE_RT_ImportFunction static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); if (!d) goto bad; cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, "%s does not export expected C function %s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C function %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } tmp.p = PyCapsule_GetPointer(cobj, sig); #else {const char *desc, *s1, *s2; desc = (const char *)PyCObject_GetDesc(cobj); if (!desc) goto bad; s1 = desc; s2 = sig; while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, "C function %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } tmp.p = PyCObject_AsVoidPtr(cobj);} #endif *f = tmp.fp; if (!(*f)) goto bad; Py_DECREF(d); return 0; bad: Py_XDECREF(d); return -1; } #endif static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = (start + end) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, /*int argcount,*/ 0, /*int kwonlyargcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, /*int firstlineno,*/ __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_globals = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else /* Python 3+ has unicode identifiers */ if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } /* Type Conversion Functions */ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; #if PY_VERSION_HEX < 0x03000000 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_VERSION_HEX < 0x03000000 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); else { unsigned char *bytes = (unsigned char *) &ival; int one = 1; int little = (int)*(unsigned char*)&one; return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); } #else return PyInt_FromSize_t(ival); #endif } static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) { return (size_t)-1; } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t)-1; } return (size_t)val; } #endif /* Py_PYTHON_H */