/* Generated by Cython 0.17.4 on Fri May 17 18:38:11 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__hdf5extension #define __PYX_HAVE_API__tables__hdf5extension #include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include "time.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 "H5VLARRAY.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[] = { "hdf5extension.pyx", "numpy.pxd", "type.pxd", "bool.pxd", "complex.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_UnImplemented; struct __pyx_obj_6tables_13hdf5extension_Array; struct __pyx_obj_6tables_13hdf5extension_AttributeSet; struct __pyx_obj_6tables_13hdf5extension_Group; struct __pyx_obj_6tables_13hdf5extension_VLArray; struct __pyx_obj_6tables_13hdf5extension_File; /* "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; /* "tables/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; }; /* "tables/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; }; /* "tables/hdf5extension.pyx":2021 * * * cdef class UnImplemented(Leaf): # <<<<<<<<<<<<<< * * def _open_unimplemented(self): */ struct __pyx_obj_6tables_13hdf5extension_UnImplemented { struct __pyx_obj_6tables_13hdf5extension_Leaf __pyx_base; }; /* "tables/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; }; /* "tables/hdf5extension.pyx":607 * * * cdef class AttributeSet: # <<<<<<<<<<<<<< * cdef object name * */ struct __pyx_obj_6tables_13hdf5extension_AttributeSet { PyObject_HEAD PyObject *name; }; /* "tables/hdf5extension.pyx":897 * * * cdef class Group(Node): # <<<<<<<<<<<<<< * cdef hid_t group_id * */ struct __pyx_obj_6tables_13hdf5extension_Group { struct __pyx_obj_6tables_13hdf5extension_Node __pyx_base; hid_t group_id; }; /* "tables/hdf5extension.pyx":1757 * * * cdef class VLArray(Leaf): # <<<<<<<<<<<<<< * # Instance variables * cdef hsize_t nrecords */ struct __pyx_obj_6tables_13hdf5extension_VLArray { struct __pyx_obj_6tables_13hdf5extension_Leaf __pyx_base; hsize_t nrecords; }; /* "tables/hdf5extension.pyx":296 * # Python classes) * * cdef class File: # <<<<<<<<<<<<<< * cdef hid_t file_id * cdef hid_t access_plist */ struct __pyx_obj_6tables_13hdf5extension_File { PyObject_HEAD hid_t file_id; hid_t access_plist; PyObject *name; }; /* "tables/hdf5extension.pyx":1064 * * * cdef class Leaf(Node): # <<<<<<<<<<<<<< * # Instance variables declared in .pxd * */ 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/hdf5extension.pyx":2021 * * * cdef class UnImplemented(Leaf): # <<<<<<<<<<<<<< * * def _open_unimplemented(self): */ struct __pyx_vtabstruct_6tables_13hdf5extension_UnImplemented { struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf __pyx_base; }; static struct __pyx_vtabstruct_6tables_13hdf5extension_UnImplemented *__pyx_vtabptr_6tables_13hdf5extension_UnImplemented; /* "tables/hdf5extension.pyx":1163 * * * cdef class Array(Leaf): # <<<<<<<<<<<<<< * # Instance variables declared in .pxd * */ 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; /* "tables/hdf5extension.pyx":1757 * * * cdef class VLArray(Leaf): # <<<<<<<<<<<<<< * # Instance variables * cdef hsize_t nrecords */ struct __pyx_vtabstruct_6tables_13hdf5extension_VLArray { struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf __pyx_base; }; static struct __pyx_vtabstruct_6tables_13hdf5extension_VLArray *__pyx_vtabptr_6tables_13hdf5extension_VLArray; #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 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; } } 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_RaiseUnboundLocalError(const char *varname); 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*/ #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) PyErr_SetObject(PyExc_KeyError, key); return NULL; } Py_INCREF(value); return value; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif 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 PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (unlikely(PyErr_Occurred())) return NULL; value = default_value; } Py_INCREF(value); #else if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { value = PyDict_GetItem(d, key); if (unlikely(!value)) { value = default_value; } Py_INCREF(value); } else { PyObject *m; m = __Pyx_GetAttrString(d, "get"); if (!m) return NULL; value = PyObject_CallFunctionObjArgs(m, key, (default_value == Py_None) ? NULL : default_value, NULL); Py_DECREF(m); } #endif return value; } 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*/ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*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))) static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } 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_RaiseNoneNotIterableError(void); 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 hid_t __Pyx_PyInt_from_py_hid_t(PyObject *); static CYTHON_INLINE hsize_t __Pyx_PyInt_from_py_hsize_t(PyObject *); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hsize_t(hsize_t); static CYTHON_INLINE hbool_t __Pyx_PyInt_from_py_hbool_t(PyObject *); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_hid_t(hid_t); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uintptr_t(uintptr_t); static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_htri_t(htri_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 int __Pyx_check_binary_version(void); static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ #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 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 'cpython.buffer' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'libc.stdio' */ /* 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 '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.utilsextension' */ static hsize_t *(*__pyx_f_6tables_14utilsextension_malloc_dims)(PyObject *); /*proto*/ 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; static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_File = 0; static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_AttributeSet = 0; static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Group = 0; static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_VLArray = 0; static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_UnImplemented = 0; static int __pyx_v_6tables_13hdf5extension_H5T_CSET_DEFAULT; static hsize_t *__pyx_f_6tables_13hdf5extension_npy_malloc_dims(int, npy_intp *); /*proto*/ static PyObject *__pyx_f_6tables_13hdf5extension_getshape(int, hsize_t *); /*proto*/ static PyObject *__pyx_f_6tables_13hdf5extension_get_attribute_string_or_none(hid_t, char *); /*proto*/ static PyObject *__pyx_f_6tables_13hdf5extension_get_dtype_scalar(hid_t, enum H5T_class_t, size_t); /*proto*/ #define __Pyx_MODULE_NAME "tables.hdf5extension" int __pyx_module_is_main_tables__hdf5extension = 0; /* Implementation of 'tables.hdf5extension' */ static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_super; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_map; static PyObject *__pyx_pf_6tables_13hdf5extension_4File__g_new(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_pymode, PyObject *__pyx_v_params); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_2get_file_image(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_4get_filesize(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_6get_userblock_size(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_8_get_file_id(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_10fileno(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_12_flush_file(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self, PyObject *__pyx_v_scope); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_14_close_file(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self); /* proto */ static void __pyx_pf_6tables_13hdf5extension_4File_16__dealloc__(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet__g_new(struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet_2_g_list_attr(CYTHON_UNUSED struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet_4_g_setattr(struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet_6_g_getattr(struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_attrname); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet_8_g_remove(struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_attrname); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Node__g_new(struct __pyx_obj_6tables_13hdf5extension_Node *__pyx_v_self, PyObject *__pyx_v_where, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_init); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Node_2_g_delete(struct __pyx_obj_6tables_13hdf5extension_Node *__pyx_v_self, PyObject *__pyx_v_parent); /* proto */ static void __pyx_pf_6tables_13hdf5extension_4Node_4__dealloc__(struct __pyx_obj_6tables_13hdf5extension_Node *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group__g_create(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_2_g_open(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_4_g_get_objinfo(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, PyObject *__pyx_v_h5name); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_6_g_list_group(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, PyObject *__pyx_v_parent); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_8_g_get_gchild_attr(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, PyObject *__pyx_v_group_name, PyObject *__pyx_v_attr_name); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_10_g_get_lchild_attr(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, PyObject *__pyx_v_leaf_name, PyObject *__pyx_v_attr_name); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_12_g_flush_group(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_14_g_close_group(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_16_g_move_node(CYTHON_UNUSED struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, hid_t __pyx_v_oldparent, PyObject *__pyx_v_oldname, hid_t __pyx_v_newparent, PyObject *__pyx_v_newname, PyObject *__pyx_v_oldpathname, PyObject *__pyx_v_newpathname); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf__get_storage_size(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf_2_g_new(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self, PyObject *__pyx_v_where, PyObject *__pyx_v_name, PyObject *__pyx_v_init); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf_4_g_truncate(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self, hsize_t __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf_6_g_flush(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf_8_g_close(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array__create_array(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_nparr, PyObject *__pyx_v_title, PyObject *__pyx_v_atom); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_2_create_carray(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyObject *__pyx_v_title); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_4_open_array(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_6_append(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_nparr); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_8_read_array(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, hsize_t __pyx_v_step, PyArrayObject *__pyx_v_nparr); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_10_g_read_slice(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_startl, PyArrayObject *__pyx_v_stopl, PyArrayObject *__pyx_v_stepl, PyArrayObject *__pyx_v_nparr); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_12_g_read_coords(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_coords, PyArrayObject *__pyx_v_nparr); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_14perform_selection(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyObject *__pyx_v_space_id, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_step, PyObject *__pyx_v_idx, PyObject *__pyx_v_mode); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_16_g_read_selection(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyObject *__pyx_v_selection, PyArrayObject *__pyx_v_nparr); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_18_g_write_slice(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_startl, PyArrayObject *__pyx_v_stepl, PyArrayObject *__pyx_v_countl, PyArrayObject *__pyx_v_nparr); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_20_g_write_coords(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_coords, PyArrayObject *__pyx_v_nparr); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_22_g_write_selection(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyObject *__pyx_v_selection, PyArrayObject *__pyx_v_nparr); /* proto */ static void __pyx_pf_6tables_13hdf5extension_5Array_24__dealloc__(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray__create_array(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self, PyObject *__pyx_v_title); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_2_open_array(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_4_append(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self, PyArrayObject *__pyx_v_nparr, int __pyx_v_nobjects); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_6_modify(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self, hsize_t __pyx_v_nrow, PyArrayObject *__pyx_v_nparr, int __pyx_v_nobjects); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_8_get_memory_size(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_10_read_array(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, hsize_t __pyx_v_step); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_13UnImplemented__open_unimplemented(struct __pyx_obj_6tables_13hdf5extension_UnImplemented *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6tables_13hdf5extension_13UnImplemented_2_g_close(struct __pyx_obj_6tables_13hdf5extension_UnImplemented *__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[] = "\000"; static char __pyx_k_3[] = "i%s"; static char __pyx_k_4[] = "u%s"; static char __pyx_k_5[] = "f%s"; static char __pyx_k_6[] = "variable length strings are not supported yet"; static char __pyx_k_8[] = "S%s"; static char __pyx_k_9[] = "Invalid or not supported driver: '%s'"; static char __pyx_k_10[] = "r+"; static char __pyx_k_11[] = "an invalid mode string ``%s`` passed the ``check_file_access()`` test; please report this to the authors"; static char __pyx_k_12[] = "The DRIVER_CORE_IMAGE parameter will be ignored by the '%s' driver"; static char __pyx_k_13[] = "The DRIVER_CORE_IMAGE must be a string of bytes"; static char __pyx_k_15[] = "Support for image files is only availabe in HDF5 >= 1.8.9"; static char __pyx_k_17[] = "DRIVER_CORE_BACKING_STORE"; static char __pyx_k_18[] = "The HDF5 file already esists: the USER_BLOCK_SIZE will be ignored"; static char __pyx_k_20[] = "The USER_BLOCK_SIZE must be a power od 2 greather than 512 or zero"; static char __pyx_k_22[] = "Unable to set the user block size"; static char __pyx_k_24[] = "The H5FD_DIRECT driver is not available"; static char __pyx_k_26[] = "DRIVER_DIRECT_ALIGNMENT"; static char __pyx_k_27[] = "DRIVER_DIRECT_BLOCK_SIZE"; static char __pyx_k_28[] = "DRIVER_DIRECT_CBUF_SIZE"; static char __pyx_k_29[] = "The H5FD_WINDOWS driver is not available"; static char __pyx_k_31[] = "DRIVER_CORE_INCREMENT"; static char __pyx_k_32[] = "Unable to set the file image"; static char __pyx_k_34[] = "Unable to set the file access property list"; static char __pyx_k_36[] = "Unable to open/create file '%s'"; static char __pyx_k_37[] = "set_blosc_max_threads"; static char __pyx_k_38[] = "Unable to retrieve the size of the buffer for the file image. Plese note that not all drivers provide support for image files."; static char __pyx_k_40[] = "Unable to allecote meomory fir the file image"; static char __pyx_k_42[] = "Unable to retrieve the file image. Plese note that not all drivers provide support for image files."; static char __pyx_k_44[] = "Unable to retrieve the HDF5 file size"; static char __pyx_k_46[] = "Unable to get the creation property list"; static char __pyx_k_48[] = "unable to retrieve the user block size"; static char __pyx_k_50[] = "Problems getting file descriptor for file ``%s``"; static char __pyx_k_51[] = "Problems closing the file '%s'"; static char __pyx_k_52[] = "utf-8"; static char __pyx_k_54[] = "Can't set attribute '%s' in node:\n %s."; static char __pyx_k_57[] = "Can't get type info on attribute %s in node %s."; static char __pyx_k_58[] = "Can't read attribute %s in node %s."; static char __pyx_k_60[] = "Unsupported type for attribute '%s' in node '%s'. Offending HDF5 class: %d"; static char __pyx_k_61[] = "Can't get dims info on attribute %s in node %s."; static char __pyx_k_62[] = "Attribute %s exists in node %s, but can't get it."; static char __pyx_k_64[] = "Attribute '%s' exists in node '%s', but cannot be deleted."; static char __pyx_k_66[] = "problems deleting the node ``%s``"; static char __pyx_k_68[] = "Can't create the group %s."; static char __pyx_k_70[] = "Can't open the group: '%s'."; static char __pyx_k_75[] = "Non-existing node ``%s`` under ``%s``"; static char __pyx_k_78[] = "Problems closing the Group %s"; static char __pyx_k_81[] = "Problems moving the node %s to %s"; static char __pyx_k_82[] = "Problems truncating the leaf: %s"; static char __pyx_k_83[] = "Unexpected classname: %s"; static char __pyx_k_86[] = ""; static char __pyx_k_90[] = "Problems creating the %s."; static char __pyx_k_98[] = "Problems getting ndims!"; 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__S[] = "S"; static char __pyx_k__U[] = "U"; static char __pyx_k__V[] = "V"; static char __pyx_k__a[] = "a"; static char __pyx_k__b[] = "b"; static char __pyx_k__c[] = "c"; 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__u[] = "u"; static char __pyx_k__w[] = "w"; static char __pyx_k_100[] = "Unable to get array info."; static char __pyx_k_103[] = "Problems appending the elements"; static char __pyx_k_105[] = "Problems reading the array data."; static char __pyx_k_110[] = "Internal error modifying the elements (H5ARRAYwrite_records returned errorcode -%i)"; static char __pyx_k_111[] = "Problems writing the array data."; static char __pyx_k_119[] = "Problems creating the VLArray."; static char __pyx_k_122[] = "Problems appending the records."; static char __pyx_k_124[] = "Problems modifying the record."; static char __pyx_k_126[] = "Asking for a range of rows exceeding the available ones!."; static char __pyx_k_128[] = "VLArray._read_array: Problems reading the array data."; static char __pyx_k_130[] = "VLArray._read_array: error freeing the data buffer."; static char __pyx_k_133[] = "ndarray is not C contiguous"; static char __pyx_k_135[] = "ndarray is not Fortran contiguous"; static char __pyx_k_137[] = "Non-native byte order not supported"; static char __pyx_k_139[] = "unknown dtype code in numpy.pxd (%d)"; static char __pyx_k_140[] = "Format string allocated too short, see comment in numpy.pxd"; static char __pyx_k_143[] = "Format string allocated too short."; static char __pyx_k_145[] = "Cython interface between several PyTables classes and HDF5 library.\n\nClasses (type extensions):\n\n File\n AttributeSet\n Node\n Leaf\n Group\n Array\n VLArray\n UnImplemented\n\nFunctions:\n\nMisc variables:\n\n"; static char __pyx_k_146[] = "tables.exceptions"; static char __pyx_k_147[] = "tables.utils"; static char __pyx_k_148[] = "tables.atom"; static char __pyx_k_149[] = "tables.description"; static char __pyx_k_150[] = "tables.utilsextension"; static char __pyx_k_151[] = "npext_prefixes_to_ptkinds"; static char __pyx_k_152[] = "hdf5_class_to_string"; static char __pyx_k_153[] = "tables._past"; static char __pyx_k__O8[] = "O8"; static char __pyx_k__Zd[] = "Zd"; static char __pyx_k__Zf[] = "Zf"; static char __pyx_k__Zg[] = "Zg"; static char __pyx_k__b1[] = "b1"; static char __pyx_k__i8[] = "i8"; static char __pyx_k__os[] = "os"; static char __pyx_k__AND[] = "AND"; static char __pyx_k__idx[] = "idx"; static char __pyx_k__map[] = "map"; static char __pyx_k__Atom[] = "Atom"; static char __pyx_k__Leaf[] = "Leaf"; static char __pyx_k__NOTB[] = "NOTB"; static char __pyx_k__atom[] = "atom"; static char __pyx_k__base[] = "base"; static char __pyx_k__copy[] = "copy"; static char __pyx_k__dflt[] = "dflt"; static char __pyx_k__h5bt[] = "h5bt"; static char __pyx_k__init[] = "init"; static char __pyx_k__intp[] = "intp"; static char __pyx_k__kind[] = "kind"; static char __pyx_k__mode[] = "mode"; static char __pyx_k__name[] = "name"; static char __pyx_k__node[] = "node"; static char __pyx_k__nrow[] = "nrow"; static char __pyx_k__path[] = "path"; 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__type[] = "type"; static char __pyx_k__warn[] = "warn"; static char __pyx_k__CLASS[] = "CLASS"; static char __pyx_k__Group[] = "Group"; static char __pyx_k__TITLE[] = "TITLE"; static char __pyx_k__Table[] = "Table"; static char __pyx_k__array[] = "array"; static char __pyx_k__count[] = "count"; static char __pyx_k__dtype[] = "dtype"; static char __pyx_k__dumps[] = "dumps"; static char __pyx_k__empty[] = "empty"; static char __pyx_k__flags[] = "flags"; static char __pyx_k__flush[] = "flush"; static char __pyx_k__int32[] = "int32"; static char __pyx_k__nparr[] = "nparr"; static char __pyx_k__nrows[] = "nrows"; static char __pyx_k__numpy[] = "numpy"; static char __pyx_k__range[] = "range"; static char __pyx_k__shape[] = "shape"; static char __pyx_k__start[] = "start"; static char __pyx_k__stepl[] = "stepl"; static char __pyx_k__stopl[] = "stopl"; static char __pyx_k__super[] = "super"; static char __pyx_k__title[] = "title"; static char __pyx_k__value[] = "value"; static char __pyx_k__where[] = "where"; static char __pyx_k__zeros[] = "zeros"; static char __pyx_k__CArray[] = "CArray"; static char __pyx_k__DRIVER[] = "DRIVER"; static char __pyx_k__EArray[] = "EArray"; static char __pyx_k__EXTDIM[] = "EXTDIM"; static char __pyx_k___g_new[] = "_g_new"; static char __pyx_k___v_new[] = "_v_new"; static char __pyx_k__buffer[] = "buffer"; static char __pyx_k__bytes_[] = "bytes_"; static char __pyx_k__coords[] = "coords"; static char __pyx_k__countl[] = "countl"; static char __pyx_k__encode[] = "encode"; static char __pyx_k__exists[] = "exists"; static char __pyx_k__extdim[] = "extdim"; static char __pyx_k__insert[] = "insert"; static char __pyx_k__params[] = "params"; static char __pyx_k__pickle[] = "pickle"; static char __pyx_k__pymode[] = "pymode"; static char __pyx_k__rstrip[] = "rstrip"; static char __pyx_k__startl[] = "startl"; static char __pyx_k__time64[] = "time64"; static char __pyx_k__Unknown[] = "Unknown"; static char __pyx_k__VERSION[] = "VERSION"; static char __pyx_k__VLArray[] = "VLArray"; static char __pyx_k___v_file[] = "_v_file"; static char __pyx_k___v_name[] = "_v_name"; static char __pyx_k___v_node[] = "_v_node"; static char __pyx_k__cPickle[] = "cPickle"; static char __pyx_k__complib[] = "complib"; static char __pyx_k__filters[] = "filters"; static char __pyx_k__generic[] = "generic"; static char __pyx_k__maindim[] = "maindim"; static char __pyx_k__ndarray[] = "ndarray"; static char __pyx_k__newname[] = "newname"; static char __pyx_k__oldname[] = "oldname"; static char __pyx_k__shuffle[] = "shuffle"; static char __pyx_k__SizeType[] = "SizeType"; static char __pyx_k__SoftLink[] = "SoftLink"; static char __pyx_k____main__[] = "__main__"; static char __pyx_k____name__[] = "__name__"; static char __pyx_k____test__[] = "__test__"; static char __pyx_k__attrname[] = "attrname"; static char __pyx_k__byteswap[] = "byteswap"; static char __pyx_k__nobjects[] = "nobjects"; static char __pyx_k__space_id[] = "space_id"; static char __pyx_k__unicode_[] = "unicode_"; static char __pyx_k__warnings[] = "warnings"; static char __pyx_k__H5FD_CORE[] = "H5FD_CORE"; static char __pyx_k__H5FD_SEC2[] = "H5FD_SEC2"; static char __pyx_k__NamedType[] = "NamedType"; static char __pyx_k__TypeError[] = "TypeError"; static char __pyx_k____class__[] = "__class__"; static char __pyx_k___isPTFile[] = "_isPTFile"; static char __pyx_k___v_parent[] = "_v_parent"; static char __pyx_k__attr_name[] = "attr_name"; static char __pyx_k__byteorder[] = "byteorder"; static char __pyx_k__complevel[] = "complevel"; static char __pyx_k__enumerate[] = "enumerate"; static char __pyx_k__leaf_name[] = "leaf_name"; static char __pyx_k__newparent[] = "newparent"; static char __pyx_k__oldparent[] = "oldparent"; static char __pyx_k__selection[] = "selection"; static char __pyx_k__writeable[] = "writeable"; static char __pyx_k__H5FD_STDIO[] = "H5FD_STDIO"; static char __pyx_k__NoSuchNode[] = "NoSuchNode"; static char __pyx_k__ValueError[] = "ValueError"; static char __pyx_k___c_classid[] = "_c_classid"; static char __pyx_k___closeFile[] = "_closeFile"; static char __pyx_k___flushFile[] = "_flushFile"; static char __pyx_k___g_getAttr[] = "_g_getAttr"; static char __pyx_k___g_getattr[] = "_g_getattr"; static char __pyx_k___g_setAttr[] = "_g_setAttr"; static char __pyx_k___g_setattr[] = "_g_setattr"; static char __pyx_k___getFileId[] = "_getFileId"; static char __pyx_k___openArray[] = "_openArray"; static char __pyx_k___readArray[] = "_readArray"; static char __pyx_k___v_version[] = "_v_version"; static char __pyx_k__byteorders[] = "byteorders"; static char __pyx_k__chunkshape[] = "chunkshape"; static char __pyx_k__fletcher32[] = "fletcher32"; static char __pyx_k__from_dtype[] = "from_dtype"; static char __pyx_k__group_name[] = "group_name"; static char __pyx_k__H5FD_DIRECT[] = "H5FD_DIRECT"; static char __pyx_k___atomicsize[] = "_atomicsize"; static char __pyx_k___atomictype[] = "_atomictype"; static char __pyx_k___close_file[] = "_close_file"; static char __pyx_k___flush_file[] = "_flush_file"; static char __pyx_k___g_listAttr[] = "_g_listAttr"; static char __pyx_k___g_moveNode[] = "_g_moveNode"; static char __pyx_k___open_array[] = "_open_array"; static char __pyx_k___read_array[] = "_read_array"; static char __pyx_k___v_objectid[] = "_v_objectid"; static char __pyx_k___v_pathname[] = "_v_pathname"; static char __pyx_k__newpathname[] = "newpathname"; static char __pyx_k__oldpathname[] = "oldpathname"; static char __pyx_k__ExternalLink[] = "ExternalLink"; static char __pyx_k__H5FD_WINDOWS[] = "H5FD_WINDOWS"; static char __pyx_k__HDF5ExtError[] = "HDF5ExtError"; static char __pyx_k__RuntimeError[] = "RuntimeError"; static char __pyx_k___atomicdtype[] = "_atomicdtype"; static char __pyx_k___atomicshape[] = "_atomicshape"; static char __pyx_k___createArray[] = "_createArray"; static char __pyx_k___g_listGroup[] = "_g_listGroup"; static char __pyx_k___g_list_attr[] = "_g_list_attr"; static char __pyx_k___g_move_node[] = "_g_move_node"; static char __pyx_k___g_readSlice[] = "_g_readSlice"; static char __pyx_k___get_file_id[] = "_get_file_id"; static char __pyx_k__previous_api[] = "previous_api"; static char __pyx_k___createCArray[] = "_createCArray"; static char __pyx_k___create_array[] = "_create_array"; static char __pyx_k___g_closeGroup[] = "_g_closeGroup"; static char __pyx_k___g_flushGroup[] = "_g_flushGroup"; static char __pyx_k___g_list_group[] = "_g_list_group"; static char __pyx_k___g_readCoords[] = "_g_readCoords"; static char __pyx_k___g_read_slice[] = "_g_read_slice"; static char __pyx_k___g_writeSlice[] = "_g_writeSlice"; static char __pyx_k___create_carray[] = "_create_carray"; static char __pyx_k___g_close_group[] = "_g_close_group"; static char __pyx_k___g_flush_group[] = "_g_flush_group"; static char __pyx_k___g_read_coords[] = "_g_read_coords"; static char __pyx_k___g_writeCoords[] = "_g_writeCoords"; static char __pyx_k___g_write_slice[] = "_g_write_slice"; static char __pyx_k__pttype_to_hdf5[] = "pttype_to_hdf5"; static char __pyx_k__DataTypeWarning[] = "DataTypeWarning"; static char __pyx_k__USER_BLOCK_SIZE[] = "USER_BLOCK_SIZE"; static char __pyx_k___g_write_coords[] = "_g_write_coords"; static char __pyx_k__encode_filename[] = "encode_filename"; static char __pyx_k__CHUNK_CACHE_SIZE[] = "CHUNK_CACHE_SIZE"; static char __pyx_k___g_getGChildAttr[] = "_g_getGChildAttr"; static char __pyx_k___g_getLChildAttr[] = "_g_getLChildAttr"; static char __pyx_k___g_readSelection[] = "_g_readSelection"; static char __pyx_k___v_unimplemented[] = "_v_unimplemented"; static char __pyx_k__descr_from_dtype[] = "descr_from_dtype"; static char __pyx_k__pt_special_kinds[] = "pt_special_kinds"; static char __pyx_k__pure_numpy_types[] = "pure_numpy_types"; static char __pyx_k__DRIVER_CORE_IMAGE[] = "DRIVER_CORE_IMAGE"; static char __pyx_k__MAX_BLOSC_THREADS[] = "MAX_BLOSC_THREADS"; static char __pyx_k___g_read_selection[] = "_g_read_selection"; static char __pyx_k___g_writeSelection[] = "_g_writeSelection"; static char __pyx_k__atom_to_hdf5_type[] = "atom_to_hdf5_type"; static char __pyx_k__check_file_access[] = "check_file_access"; static char __pyx_k__correct_byteorder[] = "correct_byteorder"; static char __pyx_k__perform_selection[] = "perform_selection"; static char __pyx_k__CHUNK_CACHE_NELMTS[] = "CHUNK_CACHE_NELMTS"; static char __pyx_k__HAVE_DIRECT_DRIVER[] = "HAVE_DIRECT_DRIVER"; static char __pyx_k__PYTABLES_SYS_ATTRS[] = "PYTABLES_SYS_ATTRS"; static char __pyx_k___g_get_gchild_attr[] = "_g_get_gchild_attr"; static char __pyx_k___g_get_lchild_attr[] = "_g_get_lchild_attr"; static char __pyx_k___g_write_selection[] = "_g_write_selection"; static char __pyx_k___supported_drivers[] = "_supported_drivers"; static char __pyx_k__create_nested_type[] = "create_nested_type"; static char __pyx_k__platform_byteorder[] = "platform_byteorder"; static char __pyx_k__CHUNK_CACHE_PREEMPT[] = "CHUNK_CACHE_PREEMPT"; static char __pyx_k__HAVE_WINDOWS_DRIVER[] = "HAVE_WINDOWS_DRIVER"; static char __pyx_k__METADATA_CACHE_SIZE[] = "METADATA_CACHE_SIZE"; 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_b_1; static PyObject *__pyx_kp_s_10; static PyObject *__pyx_kp_s_100; static PyObject *__pyx_kp_s_103; static PyObject *__pyx_kp_s_105; static PyObject *__pyx_kp_s_11; static PyObject *__pyx_kp_s_110; static PyObject *__pyx_kp_s_111; static PyObject *__pyx_kp_s_119; static PyObject *__pyx_kp_s_12; static PyObject *__pyx_kp_s_122; static PyObject *__pyx_kp_s_124; static PyObject *__pyx_kp_s_126; static PyObject *__pyx_kp_s_128; static PyObject *__pyx_kp_s_13; static PyObject *__pyx_kp_s_130; static PyObject *__pyx_kp_u_133; static PyObject *__pyx_kp_u_135; static PyObject *__pyx_kp_u_137; static PyObject *__pyx_kp_u_139; static PyObject *__pyx_kp_u_140; static PyObject *__pyx_kp_u_143; static PyObject *__pyx_n_s_146; static PyObject *__pyx_n_s_147; static PyObject *__pyx_n_s_148; static PyObject *__pyx_n_s_149; static PyObject *__pyx_kp_s_15; static PyObject *__pyx_n_s_150; static PyObject *__pyx_n_s_151; static PyObject *__pyx_n_s_152; static PyObject *__pyx_n_s_153; static PyObject *__pyx_n_s_17; static PyObject *__pyx_kp_s_18; static PyObject *__pyx_kp_s_20; static PyObject *__pyx_kp_s_22; static PyObject *__pyx_kp_s_24; static PyObject *__pyx_n_s_26; static PyObject *__pyx_n_s_27; static PyObject *__pyx_n_s_28; static PyObject *__pyx_kp_s_29; static PyObject *__pyx_kp_s_3; static PyObject *__pyx_n_s_31; static PyObject *__pyx_kp_s_32; static PyObject *__pyx_kp_s_34; static PyObject *__pyx_kp_s_36; static PyObject *__pyx_n_s_37; static PyObject *__pyx_kp_s_38; static PyObject *__pyx_kp_s_4; static PyObject *__pyx_kp_s_40; static PyObject *__pyx_kp_s_42; static PyObject *__pyx_kp_s_44; static PyObject *__pyx_kp_s_46; static PyObject *__pyx_kp_s_48; static PyObject *__pyx_kp_s_5; static PyObject *__pyx_kp_s_50; static PyObject *__pyx_kp_s_51; static PyObject *__pyx_kp_s_52; static PyObject *__pyx_kp_s_54; static PyObject *__pyx_kp_s_57; static PyObject *__pyx_kp_s_58; static PyObject *__pyx_kp_s_6; static PyObject *__pyx_kp_s_60; static PyObject *__pyx_kp_s_61; static PyObject *__pyx_kp_s_62; static PyObject *__pyx_kp_s_64; static PyObject *__pyx_kp_s_66; static PyObject *__pyx_kp_s_68; static PyObject *__pyx_kp_s_70; static PyObject *__pyx_kp_s_75; static PyObject *__pyx_kp_s_78; static PyObject *__pyx_kp_s_8; static PyObject *__pyx_kp_s_81; static PyObject *__pyx_kp_s_82; static PyObject *__pyx_kp_s_83; static PyObject *__pyx_kp_s_86; static PyObject *__pyx_kp_s_9; static PyObject *__pyx_kp_s_90; static PyObject *__pyx_kp_s_98; static PyObject *__pyx_n_s__AND; static PyObject *__pyx_n_s__Atom; static PyObject *__pyx_n_s__CArray; static PyObject *__pyx_n_s__CHUNK_CACHE_NELMTS; static PyObject *__pyx_n_s__CHUNK_CACHE_PREEMPT; static PyObject *__pyx_n_s__CHUNK_CACHE_SIZE; static PyObject *__pyx_n_s__DRIVER; static PyObject *__pyx_n_s__DRIVER_CORE_IMAGE; static PyObject *__pyx_n_s__DataTypeWarning; static PyObject *__pyx_n_s__EArray; static PyObject *__pyx_n_s__ExternalLink; static PyObject *__pyx_n_s__Group; static PyObject *__pyx_n_s__H5FD_CORE; static PyObject *__pyx_n_s__H5FD_DIRECT; static PyObject *__pyx_n_s__H5FD_SEC2; static PyObject *__pyx_n_s__H5FD_STDIO; static PyObject *__pyx_n_s__H5FD_WINDOWS; static PyObject *__pyx_n_s__HAVE_DIRECT_DRIVER; static PyObject *__pyx_n_s__HAVE_WINDOWS_DRIVER; static PyObject *__pyx_n_s__HDF5ExtError; static PyObject *__pyx_n_s__Leaf; static PyObject *__pyx_n_s__MAX_BLOSC_THREADS; static PyObject *__pyx_n_s__METADATA_CACHE_SIZE; static PyObject *__pyx_n_s__NOTB; static PyObject *__pyx_n_s__NamedType; static PyObject *__pyx_n_s__NoSuchNode; static PyObject *__pyx_n_s__O8; static PyObject *__pyx_n_s__PYTABLES_SYS_ATTRS; static PyObject *__pyx_n_s__RuntimeError; static PyObject *__pyx_n_s__S; static PyObject *__pyx_n_s__SizeType; static PyObject *__pyx_n_s__SoftLink; static PyObject *__pyx_n_s__Table; static PyObject *__pyx_n_s__TypeError; static PyObject *__pyx_n_s__U; static PyObject *__pyx_n_s__USER_BLOCK_SIZE; static PyObject *__pyx_n_s__Unknown; static PyObject *__pyx_n_s__V; static PyObject *__pyx_n_s__VLArray; static PyObject *__pyx_n_s__ValueError; static PyObject *__pyx_n_s____class__; static PyObject *__pyx_n_s____main__; static PyObject *__pyx_n_s____name__; static PyObject *__pyx_n_s____test__; static PyObject *__pyx_n_s___atomicdtype; static PyObject *__pyx_n_s___atomicshape; static PyObject *__pyx_n_s___atomicsize; static PyObject *__pyx_n_s___atomictype; static PyObject *__pyx_n_s___c_classid; static PyObject *__pyx_n_s___closeFile; static PyObject *__pyx_n_s___close_file; static PyObject *__pyx_n_s___createArray; static PyObject *__pyx_n_s___createCArray; static PyObject *__pyx_n_s___create_array; static PyObject *__pyx_n_s___create_carray; static PyObject *__pyx_n_s___flushFile; static PyObject *__pyx_n_s___flush_file; static PyObject *__pyx_n_s___g_closeGroup; static PyObject *__pyx_n_s___g_close_group; static PyObject *__pyx_n_s___g_flushGroup; static PyObject *__pyx_n_s___g_flush_group; static PyObject *__pyx_n_s___g_getAttr; static PyObject *__pyx_n_s___g_getGChildAttr; static PyObject *__pyx_n_s___g_getLChildAttr; static PyObject *__pyx_n_s___g_get_gchild_attr; static PyObject *__pyx_n_s___g_get_lchild_attr; static PyObject *__pyx_n_s___g_getattr; static PyObject *__pyx_n_s___g_listAttr; static PyObject *__pyx_n_s___g_listGroup; static PyObject *__pyx_n_s___g_list_attr; static PyObject *__pyx_n_s___g_list_group; static PyObject *__pyx_n_s___g_moveNode; static PyObject *__pyx_n_s___g_move_node; static PyObject *__pyx_n_s___g_new; static PyObject *__pyx_n_s___g_readCoords; static PyObject *__pyx_n_s___g_readSelection; static PyObject *__pyx_n_s___g_readSlice; static PyObject *__pyx_n_s___g_read_coords; static PyObject *__pyx_n_s___g_read_selection; static PyObject *__pyx_n_s___g_read_slice; static PyObject *__pyx_n_s___g_setAttr; static PyObject *__pyx_n_s___g_setattr; static PyObject *__pyx_n_s___g_writeCoords; static PyObject *__pyx_n_s___g_writeSelection; static PyObject *__pyx_n_s___g_writeSlice; static PyObject *__pyx_n_s___g_write_coords; static PyObject *__pyx_n_s___g_write_selection; static PyObject *__pyx_n_s___g_write_slice; static PyObject *__pyx_n_s___getFileId; static PyObject *__pyx_n_s___get_file_id; static PyObject *__pyx_n_s___isPTFile; static PyObject *__pyx_n_s___openArray; static PyObject *__pyx_n_s___open_array; static PyObject *__pyx_n_s___readArray; static PyObject *__pyx_n_s___read_array; static PyObject *__pyx_n_s___supported_drivers; static PyObject *__pyx_n_s___v_file; static PyObject *__pyx_n_s___v_name; static PyObject *__pyx_n_s___v_new; static PyObject *__pyx_n_s___v_node; static PyObject *__pyx_n_s___v_objectid; static PyObject *__pyx_n_s___v_parent; static PyObject *__pyx_n_s___v_pathname; static PyObject *__pyx_n_s___v_unimplemented; static PyObject *__pyx_n_s___v_version; static PyObject *__pyx_n_s__a; static PyObject *__pyx_n_s__array; static PyObject *__pyx_n_s__atom; static PyObject *__pyx_n_s__atom_from_hdf5_type; static PyObject *__pyx_n_s__atom_to_hdf5_type; static PyObject *__pyx_n_s__attr_name; static PyObject *__pyx_n_s__attrname; static PyObject *__pyx_n_s__b; static PyObject *__pyx_n_s__b1; static PyObject *__pyx_n_s__base; static PyObject *__pyx_n_s__buffer; static PyObject *__pyx_n_s__byteorder; static PyObject *__pyx_n_s__byteorders; static PyObject *__pyx_n_s__bytes_; static PyObject *__pyx_n_s__byteswap; static PyObject *__pyx_n_s__c; static PyObject *__pyx_n_s__cPickle; static PyObject *__pyx_n_s__check_file_access; static PyObject *__pyx_n_s__chunkshape; static PyObject *__pyx_n_s__complevel; static PyObject *__pyx_n_s__complib; static PyObject *__pyx_n_s__coords; static PyObject *__pyx_n_s__copy; static PyObject *__pyx_n_s__correct_byteorder; static PyObject *__pyx_n_s__count; static PyObject *__pyx_n_s__countl; static PyObject *__pyx_n_s__create_nested_type; static PyObject *__pyx_n_s__descr_from_dtype; static PyObject *__pyx_n_s__dflt; static PyObject *__pyx_n_s__dtype; static PyObject *__pyx_n_s__dumps; static PyObject *__pyx_n_s__empty; static PyObject *__pyx_n_s__encode; static PyObject *__pyx_n_s__encode_filename; static PyObject *__pyx_n_s__enumerate; static PyObject *__pyx_n_s__exists; static PyObject *__pyx_n_s__extdim; static PyObject *__pyx_n_s__f; static PyObject *__pyx_n_s__filters; static PyObject *__pyx_n_s__flags; static PyObject *__pyx_n_s__fletcher32; static PyObject *__pyx_n_s__flush; static PyObject *__pyx_n_s__from_dtype; static PyObject *__pyx_n_s__generic; static PyObject *__pyx_n_s__group_name; static PyObject *__pyx_n_s__h5bt; static PyObject *__pyx_n_s__hdf5_to_np_ext_type; static PyObject *__pyx_n_s__i; static PyObject *__pyx_n_s__i8; static PyObject *__pyx_n_s__idx; static PyObject *__pyx_n_s__init; static PyObject *__pyx_n_s__insert; static PyObject *__pyx_n_s__int32; static PyObject *__pyx_n_s__intp; static PyObject *__pyx_n_s__kind; static PyObject *__pyx_n_s__leaf_name; static PyObject *__pyx_n_s__maindim; static PyObject *__pyx_n_s__map; static PyObject *__pyx_n_s__mode; static PyObject *__pyx_n_s__name; static PyObject *__pyx_n_s__ndarray; static PyObject *__pyx_n_s__newname; static PyObject *__pyx_n_s__newparent; static PyObject *__pyx_n_s__newpathname; static PyObject *__pyx_n_s__nobjects; static PyObject *__pyx_n_s__node; static PyObject *__pyx_n_s__nparr; static PyObject *__pyx_n_s__nrow; static PyObject *__pyx_n_s__nrows; static PyObject *__pyx_n_s__numpy; static PyObject *__pyx_n_s__oldname; static PyObject *__pyx_n_s__oldparent; static PyObject *__pyx_n_s__oldpathname; static PyObject *__pyx_n_s__os; static PyObject *__pyx_n_s__params; static PyObject *__pyx_n_s__path; static PyObject *__pyx_n_s__perform_selection; static PyObject *__pyx_n_s__pickle; static PyObject *__pyx_n_s__platform_byteorder; 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__pure_numpy_types; static PyObject *__pyx_n_s__pymode; static PyObject *__pyx_n_s__r; static PyObject *__pyx_n_s__range; static PyObject *__pyx_n_s__rstrip; static PyObject *__pyx_n_s__selection; static PyObject *__pyx_n_s__shape; static PyObject *__pyx_n_s__shuffle; static PyObject *__pyx_n_s__size; static PyObject *__pyx_n_s__space_id; static PyObject *__pyx_n_s__start; static PyObject *__pyx_n_s__startl; static PyObject *__pyx_n_s__step; static PyObject *__pyx_n_s__stepl; static PyObject *__pyx_n_s__stop; static PyObject *__pyx_n_s__stopl; static PyObject *__pyx_n_s__super; static PyObject *__pyx_n_s__time; static PyObject *__pyx_n_s__time64; static PyObject *__pyx_n_s__title; static PyObject *__pyx_n_s__type; static PyObject *__pyx_n_s__u; static PyObject *__pyx_n_s__unicode_; static PyObject *__pyx_n_s__value; static PyObject *__pyx_n_s__w; static PyObject *__pyx_n_s__warn; static PyObject *__pyx_n_s__warnings; static PyObject *__pyx_n_s__where; static PyObject *__pyx_n_s__writeable; static PyObject *__pyx_n_s__zeros; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_int_15; static PyObject *__pyx_k_tuple_2; static PyObject *__pyx_k_tuple_7; static PyObject *__pyx_k_tuple_14; static PyObject *__pyx_k_tuple_16; static PyObject *__pyx_k_tuple_19; static PyObject *__pyx_k_tuple_21; static PyObject *__pyx_k_tuple_23; static PyObject *__pyx_k_tuple_25; static PyObject *__pyx_k_tuple_30; static PyObject *__pyx_k_tuple_33; static PyObject *__pyx_k_tuple_35; static PyObject *__pyx_k_tuple_39; static PyObject *__pyx_k_tuple_41; static PyObject *__pyx_k_tuple_43; static PyObject *__pyx_k_tuple_45; static PyObject *__pyx_k_tuple_47; static PyObject *__pyx_k_tuple_49; static PyObject *__pyx_k_tuple_53; static PyObject *__pyx_k_tuple_55; static PyObject *__pyx_k_tuple_56; static PyObject *__pyx_k_tuple_59; static PyObject *__pyx_k_tuple_63; static PyObject *__pyx_k_tuple_65; static PyObject *__pyx_k_tuple_67; static PyObject *__pyx_k_tuple_69; static PyObject *__pyx_k_tuple_71; static PyObject *__pyx_k_tuple_72; static PyObject *__pyx_k_tuple_73; static PyObject *__pyx_k_tuple_74; static PyObject *__pyx_k_tuple_76; static PyObject *__pyx_k_tuple_77; static PyObject *__pyx_k_tuple_79; static PyObject *__pyx_k_tuple_80; static PyObject *__pyx_k_tuple_84; static PyObject *__pyx_k_tuple_85; static PyObject *__pyx_k_tuple_87; static PyObject *__pyx_k_tuple_88; static PyObject *__pyx_k_tuple_89; static PyObject *__pyx_k_tuple_91; static PyObject *__pyx_k_tuple_92; static PyObject *__pyx_k_tuple_93; static PyObject *__pyx_k_tuple_94; static PyObject *__pyx_k_tuple_95; static PyObject *__pyx_k_tuple_96; static PyObject *__pyx_k_tuple_97; static PyObject *__pyx_k_tuple_99; static PyObject *__pyx_k_tuple_101; static PyObject *__pyx_k_tuple_102; static PyObject *__pyx_k_tuple_104; static PyObject *__pyx_k_tuple_106; static PyObject *__pyx_k_tuple_107; static PyObject *__pyx_k_tuple_108; static PyObject *__pyx_k_tuple_109; static PyObject *__pyx_k_tuple_112; static PyObject *__pyx_k_tuple_113; static PyObject *__pyx_k_tuple_114; static PyObject *__pyx_k_tuple_115; static PyObject *__pyx_k_tuple_116; static PyObject *__pyx_k_tuple_117; static PyObject *__pyx_k_tuple_118; static PyObject *__pyx_k_tuple_120; static PyObject *__pyx_k_tuple_121; static PyObject *__pyx_k_tuple_123; static PyObject *__pyx_k_tuple_125; static PyObject *__pyx_k_tuple_127; static PyObject *__pyx_k_tuple_129; static PyObject *__pyx_k_tuple_131; static PyObject *__pyx_k_tuple_132; static PyObject *__pyx_k_tuple_134; static PyObject *__pyx_k_tuple_136; static PyObject *__pyx_k_tuple_138; static PyObject *__pyx_k_tuple_141; static PyObject *__pyx_k_tuple_142; static PyObject *__pyx_k_tuple_144; static PyObject *__pyx_k_tuple_154; /* "tables/hdf5extension.pyx":176 * # Helper functions * * cdef hsize_t *npy_malloc_dims(int rank, npy_intp *pdims): # <<<<<<<<<<<<<< * """Returns a malloced hsize_t dims from a npy_intp *pdims.""" * */ static hsize_t *__pyx_f_6tables_13hdf5extension_npy_malloc_dims(int __pyx_v_rank, npy_intp *__pyx_v_pdims) { int __pyx_v_i; hsize_t *__pyx_v_dims; hsize_t *__pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("npy_malloc_dims", 0); /* "tables/hdf5extension.pyx":182 * cdef hsize_t *dims * * dims = NULL # <<<<<<<<<<<<<< * if rank > 0: * dims = malloc(rank * sizeof(hsize_t)) */ __pyx_v_dims = NULL; /* "tables/hdf5extension.pyx":183 * * dims = NULL * if rank > 0: # <<<<<<<<<<<<<< * dims = malloc(rank * sizeof(hsize_t)) * for i from 0 <= i < rank: */ __pyx_t_1 = (__pyx_v_rank > 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":184 * dims = NULL * if rank > 0: * dims = malloc(rank * sizeof(hsize_t)) # <<<<<<<<<<<<<< * for i from 0 <= i < rank: * dims[i] = pdims[i] */ __pyx_v_dims = ((hsize_t *)malloc((__pyx_v_rank * (sizeof(hsize_t))))); /* "tables/hdf5extension.pyx":185 * if rank > 0: * dims = malloc(rank * sizeof(hsize_t)) * for i from 0 <= i < rank: # <<<<<<<<<<<<<< * dims[i] = pdims[i] * return dims */ __pyx_t_2 = __pyx_v_rank; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "tables/hdf5extension.pyx":186 * dims = malloc(rank * sizeof(hsize_t)) * for i from 0 <= i < rank: * dims[i] = pdims[i] # <<<<<<<<<<<<<< * return dims * */ (__pyx_v_dims[__pyx_v_i]) = (__pyx_v_pdims[__pyx_v_i]); } goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":187 * for i from 0 <= i < rank: * dims[i] = pdims[i] * return dims # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_dims; goto __pyx_L0; __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":190 * * * cdef object getshape(int rank, hsize_t *dims): # <<<<<<<<<<<<<< * """Return a shape (tuple) from a dims C array of rank dimensions.""" * */ static PyObject *__pyx_f_6tables_13hdf5extension_getshape(int __pyx_v_rank, hsize_t *__pyx_v_dims) { int __pyx_v_i; PyObject *__pyx_v_shape = 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("getshape", 0); /* "tables/hdf5extension.pyx":196 * cdef object shape * * shape = [] # <<<<<<<<<<<<<< * for i from 0 <= i < rank: * shape.append(SizeType(dims[i])) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_shape = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":197 * * shape = [] * for i from 0 <= i < rank: # <<<<<<<<<<<<<< * shape.append(SizeType(dims[i])) * */ __pyx_t_2 = __pyx_v_rank; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "tables/hdf5extension.pyx":198 * shape = [] * for i from 0 <= i < rank: * shape.append(SizeType(dims[i])) # <<<<<<<<<<<<<< * * return tuple(shape) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_dims[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __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 = 198; __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_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __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_4)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_shape, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "tables/hdf5extension.pyx":200 * shape.append(SizeType(dims[i])) * * return tuple(shape) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __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; 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_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.hdf5extension.getshape", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_shape); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":204 * * # Helper function for quickly fetch an attribute string * cdef object get_attribute_string_or_none(hid_t node_id, char* attr_name): # <<<<<<<<<<<<<< * """Returns a string/unicode attribute if it exists in node_id. * */ static PyObject *__pyx_f_6tables_13hdf5extension_get_attribute_string_or_none(hid_t __pyx_v_node_id, char *__pyx_v_attr_name) { char *__pyx_v_attr_value; int __pyx_v_cset; PyObject *__pyx_v_retvalue = 0; hsize_t __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations herr_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; 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("get_attribute_string_or_none", 0); /* "tables/hdf5extension.pyx":213 * * cdef char *attr_value * cdef int cset = H5T_CSET_DEFAULT # <<<<<<<<<<<<<< * cdef object retvalue * cdef hsize_t size */ __pyx_v_cset = __pyx_v_6tables_13hdf5extension_H5T_CSET_DEFAULT; /* "tables/hdf5extension.pyx":217 * cdef hsize_t size * * attr_value = NULL # <<<<<<<<<<<<<< * retvalue = None # Default value * if H5ATTRfind_attribute(node_id, attr_name): */ __pyx_v_attr_value = NULL; /* "tables/hdf5extension.pyx":218 * * attr_value = NULL * retvalue = None # Default value # <<<<<<<<<<<<<< * if H5ATTRfind_attribute(node_id, attr_name): * size = H5ATTRget_attribute_string(node_id, attr_name, &attr_value, &cset) */ __Pyx_INCREF(Py_None); __pyx_v_retvalue = Py_None; /* "tables/hdf5extension.pyx":219 * attr_value = NULL * retvalue = None # Default value * if H5ATTRfind_attribute(node_id, attr_name): # <<<<<<<<<<<<<< * size = H5ATTRget_attribute_string(node_id, attr_name, &attr_value, &cset) * if size == 0: */ __pyx_t_1 = H5ATTRfind_attribute(__pyx_v_node_id, __pyx_v_attr_name); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":220 * retvalue = None # Default value * if H5ATTRfind_attribute(node_id, attr_name): * size = H5ATTRget_attribute_string(node_id, attr_name, &attr_value, &cset) # <<<<<<<<<<<<<< * if size == 0: * return None */ __pyx_v_size = H5ATTRget_attribute_string(__pyx_v_node_id, __pyx_v_attr_name, (&__pyx_v_attr_value), (&__pyx_v_cset)); /* "tables/hdf5extension.pyx":221 * if H5ATTRfind_attribute(node_id, attr_name): * size = H5ATTRget_attribute_string(node_id, attr_name, &attr_value, &cset) * if size == 0: # <<<<<<<<<<<<<< * return None * if cset == H5T_CSET_UTF8: */ __pyx_t_2 = (__pyx_v_size == 0); if (__pyx_t_2) { /* "tables/hdf5extension.pyx":222 * size = H5ATTRget_attribute_string(node_id, attr_name, &attr_value, &cset) * if size == 0: * return None # <<<<<<<<<<<<<< * if cset == H5T_CSET_UTF8: * retvalue = PyUnicode_DecodeUTF8(attr_value, size, NULL) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L4; } __pyx_L4:; /* "tables/hdf5extension.pyx":223 * if size == 0: * return None * if cset == H5T_CSET_UTF8: # <<<<<<<<<<<<<< * retvalue = PyUnicode_DecodeUTF8(attr_value, size, NULL) * retvalue = numpy.unicode_(retvalue) */ __pyx_t_2 = (__pyx_v_cset == H5T_CSET_UTF8); if (__pyx_t_2) { /* "tables/hdf5extension.pyx":224 * return None * if cset == H5T_CSET_UTF8: * retvalue = PyUnicode_DecodeUTF8(attr_value, size, NULL) # <<<<<<<<<<<<<< * retvalue = numpy.unicode_(retvalue) * else: */ __pyx_t_3 = PyUnicode_DecodeUTF8(__pyx_v_attr_value, __pyx_v_size, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_retvalue); __pyx_v_retvalue = __pyx_t_3; __pyx_t_3 = 0; /* "tables/hdf5extension.pyx":225 * if cset == H5T_CSET_UTF8: * retvalue = PyUnicode_DecodeUTF8(attr_value, size, NULL) * retvalue = numpy.unicode_(retvalue) # <<<<<<<<<<<<<< * else: * retvalue = PyBytes_FromStringAndSize(attr_value, size) */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_retvalue); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_retvalue); __Pyx_GIVEREF(__pyx_v_retvalue); __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __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_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_v_retvalue); __pyx_v_retvalue = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L5; } /*else*/ { /* "tables/hdf5extension.pyx":227 * retvalue = numpy.unicode_(retvalue) * else: * retvalue = PyBytes_FromStringAndSize(attr_value, size) # <<<<<<<<<<<<<< * # AV: oct 2012 * # since now we use the string size got form HDF5 we have to stip */ __pyx_t_5 = ((PyObject *)PyBytes_FromStringAndSize(__pyx_v_attr_value, __pyx_v_size)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_v_retvalue); __pyx_v_retvalue = __pyx_t_5; __pyx_t_5 = 0; /* "tables/hdf5extension.pyx":235 * # assume that strlen(attr_value) is the actual length of the attibute * # and numpy.bytes_(attr_value) can give a truncated pickle sting * retvalue = retvalue.rstrip(b'\x00') # <<<<<<<<<<<<<< * retvalue = numpy.bytes_(retvalue) * */ __pyx_t_5 = PyObject_GetAttr(__pyx_v_retvalue, __pyx_n_s__rstrip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_v_retvalue); __pyx_v_retvalue = __pyx_t_3; __pyx_t_3 = 0; /* "tables/hdf5extension.pyx":236 * # and numpy.bytes_(attr_value) can give a truncated pickle sting * retvalue = retvalue.rstrip(b'\x00') * retvalue = numpy.bytes_(retvalue) # <<<<<<<<<<<<<< * * # Important to release attr_value, because it has been malloc'ed! */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__bytes_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_retvalue); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_retvalue); __Pyx_GIVEREF(__pyx_v_retvalue); __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_v_retvalue); __pyx_v_retvalue = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L5:; /* "tables/hdf5extension.pyx":239 * * # Important to release attr_value, because it has been malloc'ed! * if attr_value: # <<<<<<<<<<<<<< * free(attr_value) * */ __pyx_t_2 = (__pyx_v_attr_value != 0); if (__pyx_t_2) { /* "tables/hdf5extension.pyx":240 * # Important to release attr_value, because it has been malloc'ed! * if attr_value: * free(attr_value) # <<<<<<<<<<<<<< * * return retvalue */ free(((void *)__pyx_v_attr_value)); goto __pyx_L6; } __pyx_L6:; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":242 * free(attr_value) * * return retvalue # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_retvalue); __pyx_r = __pyx_v_retvalue; goto __pyx_L0; __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_AddTraceback("tables.hdf5extension.get_attribute_string_or_none", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_retvalue); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":246 * * # Get the numpy dtype scalar attribute from an HDF5 type as fast as possible * cdef object get_dtype_scalar(hid_t type_id, H5T_class_t class_id, # <<<<<<<<<<<<<< * size_t itemsize): * cdef H5T_sign_t sign */ static PyObject *__pyx_f_6tables_13hdf5extension_get_dtype_scalar(hid_t __pyx_v_type_id, enum H5T_class_t __pyx_v_class_id, size_t __pyx_v_itemsize) { enum H5T_sign_t __pyx_v_sign; PyObject *__pyx_v_stype = 0; PyObject *__pyx_v_ntype = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; htri_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_dtype_scalar", 0); /* "tables/hdf5extension.pyx":251 * cdef object stype * * if class_id == H5T_BITFIELD: # <<<<<<<<<<<<<< * stype = "b1" * elif class_id == H5T_INTEGER: */ __pyx_t_1 = (__pyx_v_class_id == H5T_BITFIELD); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":252 * * if class_id == H5T_BITFIELD: * stype = "b1" # <<<<<<<<<<<<<< * elif class_id == H5T_INTEGER: * # Get the sign */ __Pyx_INCREF(((PyObject *)__pyx_n_s__b1)); __pyx_v_stype = ((PyObject *)__pyx_n_s__b1); goto __pyx_L3; } /* "tables/hdf5extension.pyx":253 * if class_id == H5T_BITFIELD: * stype = "b1" * elif class_id == H5T_INTEGER: # <<<<<<<<<<<<<< * # Get the sign * sign = H5Tget_sign(type_id) */ __pyx_t_1 = (__pyx_v_class_id == H5T_INTEGER); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":255 * elif class_id == H5T_INTEGER: * # Get the sign * sign = H5Tget_sign(type_id) # <<<<<<<<<<<<<< * if (sign > 0): * stype = "i%s" % (itemsize) */ __pyx_v_sign = H5Tget_sign(__pyx_v_type_id); /* "tables/hdf5extension.pyx":256 * # Get the sign * sign = H5Tget_sign(type_id) * if (sign > 0): # <<<<<<<<<<<<<< * stype = "i%s" % (itemsize) * else: */ __pyx_t_1 = (__pyx_v_sign > 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":257 * sign = H5Tget_sign(type_id) * if (sign > 0): * stype = "i%s" % (itemsize) # <<<<<<<<<<<<<< * else: * stype = "u%s" % (itemsize) */ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_stype = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } /*else*/ { /* "tables/hdf5extension.pyx":259 * stype = "i%s" % (itemsize) * else: * stype = "u%s" % (itemsize) # <<<<<<<<<<<<<< * elif class_id == H5T_FLOAT: * stype = "f%s" % (itemsize) */ __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_stype = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L4:; goto __pyx_L3; } /* "tables/hdf5extension.pyx":260 * else: * stype = "u%s" % (itemsize) * elif class_id == H5T_FLOAT: # <<<<<<<<<<<<<< * stype = "f%s" % (itemsize) * elif class_id == H5T_STRING: */ __pyx_t_1 = (__pyx_v_class_id == H5T_FLOAT); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":261 * stype = "u%s" % (itemsize) * elif class_id == H5T_FLOAT: * stype = "f%s" % (itemsize) # <<<<<<<<<<<<<< * elif class_id == H5T_STRING: * if H5Tis_variable_str(type_id): */ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_stype = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /* "tables/hdf5extension.pyx":262 * elif class_id == H5T_FLOAT: * stype = "f%s" % (itemsize) * elif class_id == H5T_STRING: # <<<<<<<<<<<<<< * if H5Tis_variable_str(type_id): * raise TypeError("variable length strings are not supported yet") */ __pyx_t_1 = (__pyx_v_class_id == H5T_STRING); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":263 * stype = "f%s" % (itemsize) * elif class_id == H5T_STRING: * if H5Tis_variable_str(type_id): # <<<<<<<<<<<<<< * raise TypeError("variable length strings are not supported yet") * stype = "S%s" % (itemsize) */ __pyx_t_4 = H5Tis_variable_str(__pyx_v_type_id); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":264 * elif class_id == H5T_STRING: * if H5Tis_variable_str(type_id): * raise TypeError("variable length strings are not supported yet") # <<<<<<<<<<<<<< * stype = "S%s" % (itemsize) * */ __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __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[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "tables/hdf5extension.pyx":265 * if H5Tis_variable_str(type_id): * raise TypeError("variable length strings are not supported yet") * stype = "S%s" % (itemsize) # <<<<<<<<<<<<<< * * # Try to get a NumPy type. If this can't be done, return None. */ __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_stype = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":268 * * # Try to get a NumPy type. If this can't be done, return None. * try: # <<<<<<<<<<<<<< * ntype = numpy.dtype(stype) * except TypeError: */ { __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "tables/hdf5extension.pyx":269 * # Try to get a NumPy type. If this can't be done, return None. * try: * ntype = numpy.dtype(stype) # <<<<<<<<<<<<<< * except TypeError: * ntype = None */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_v_stype)) { __Pyx_RaiseUnboundLocalError("stype"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_stype); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stype); __Pyx_GIVEREF(__pyx_v_stype); __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_ntype = __pyx_t_8; __pyx_t_8 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "tables/hdf5extension.pyx":270 * try: * ntype = numpy.dtype(stype) * except TypeError: # <<<<<<<<<<<<<< * ntype = None * return ntype */ __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_9) { __Pyx_AddTraceback("tables.hdf5extension.get_dtype_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); /* "tables/hdf5extension.pyx":271 * ntype = numpy.dtype(stype) * except TypeError: * ntype = None # <<<<<<<<<<<<<< * return ntype * */ __Pyx_INCREF(Py_None); __Pyx_XDECREF(__pyx_v_ntype); __pyx_v_ntype = Py_None; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L13_try_end:; } /* "tables/hdf5extension.pyx":272 * except TypeError: * ntype = None * return ntype # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ntype); __pyx_r = __pyx_v_ntype; 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_XDECREF(__pyx_t_8); __Pyx_AddTraceback("tables.hdf5extension.get_dtype_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_stype); __Pyx_XDECREF(__pyx_v_ntype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_4File_1_g_new(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4File_1_g_new(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_pymode = 0; PyObject *__pyx_v_params = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_new (wrapper)", 0); __pyx_v_params = PyDict_New(); if (unlikely(!__pyx_v_params)) return NULL; __Pyx_GOTREF(__pyx_v_params); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__pymode,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__name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pymode)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_new", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_params, values, pos_args, "_g_new") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __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_name = values[0]; __pyx_v_pymode = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_new", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_DECREF(__pyx_v_params); __pyx_v_params = 0; __Pyx_AddTraceback("tables.hdf5extension.File._g_new", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_4File__g_new(((struct __pyx_obj_6tables_13hdf5extension_File *)__pyx_v_self), __pyx_v_name, __pyx_v_pymode, __pyx_v_params); __Pyx_XDECREF(__pyx_v_params); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":301 * cdef object name * * def _g_new(self, name, pymode, **params): # <<<<<<<<<<<<<< * cdef herr_t err = 0 * cdef hid_t access_plist, create_plist = H5P_DEFAULT */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File__g_new(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_pymode, PyObject *__pyx_v_params) { herr_t __pyx_v_err; hid_t __pyx_v_access_plist; hid_t __pyx_v_create_plist; size_t __pyx_v_img_buf_len; size_t __pyx_v_user_block_size; void *__pyx_v_img_buf_p; PyObject *__pyx_v_encname = 0; PyObject *__pyx_v_driver = NULL; PyObject *__pyx_v_image = NULL; PyObject *__pyx_v_backing_store = NULL; PyObject *__pyx_v_exists = NULL; PyObject *__pyx_v_is_pow_of_2 = NULL; PyObject *__pyx_v_e = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; size_t __pyx_t_8; int __pyx_t_9; double __pyx_t_10; size_t __pyx_t_11; size_t __pyx_t_12; hbool_t __pyx_t_13; Py_ssize_t __pyx_t_14; char *__pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_new", 0); /* "tables/hdf5extension.pyx":302 * * def _g_new(self, name, pymode, **params): * cdef herr_t err = 0 # <<<<<<<<<<<<<< * cdef hid_t access_plist, create_plist = H5P_DEFAULT * cdef size_t img_buf_len = 0, user_block_size = 0 */ __pyx_v_err = 0; /* "tables/hdf5extension.pyx":303 * def _g_new(self, name, pymode, **params): * cdef herr_t err = 0 * cdef hid_t access_plist, create_plist = H5P_DEFAULT # <<<<<<<<<<<<<< * cdef size_t img_buf_len = 0, user_block_size = 0 * cdef void *img_buf_p = NULL */ __pyx_v_create_plist = H5P_DEFAULT; /* "tables/hdf5extension.pyx":304 * cdef herr_t err = 0 * cdef hid_t access_plist, create_plist = H5P_DEFAULT * cdef size_t img_buf_len = 0, user_block_size = 0 # <<<<<<<<<<<<<< * cdef void *img_buf_p = NULL * cdef bytes encname */ __pyx_v_img_buf_len = 0; __pyx_v_user_block_size = 0; /* "tables/hdf5extension.pyx":305 * cdef hid_t access_plist, create_plist = H5P_DEFAULT * cdef size_t img_buf_len = 0, user_block_size = 0 * cdef void *img_buf_p = NULL # <<<<<<<<<<<<<< * cdef bytes encname * #cdef bytes logfile_name */ __pyx_v_img_buf_p = NULL; /* "tables/hdf5extension.pyx":310 * * # Check if we can handle the driver * driver = params["DRIVER"] # <<<<<<<<<<<<<< * if driver is not None and driver not in _supported_drivers: * raise ValueError("Invalid or not supported driver: '%s'" % driver) */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__DRIVER)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_driver = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":311 * # Check if we can handle the driver * driver = params["DRIVER"] * if driver is not None and driver not in _supported_drivers: # <<<<<<<<<<<<<< * raise ValueError("Invalid or not supported driver: '%s'" % driver) * */ __pyx_t_2 = (__pyx_v_driver != Py_None); if (__pyx_t_2) { __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___supported_drivers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_driver, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { /* "tables/hdf5extension.pyx":312 * driver = params["DRIVER"] * if driver is not None and driver not in _supported_drivers: * raise ValueError("Invalid or not supported driver: '%s'" % driver) # <<<<<<<<<<<<<< * * # Create a new file using default properties */ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_driver); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 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 = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":315 * * # Create a new file using default properties * self.name = name # <<<<<<<<<<<<<< * * # Encode the filename in case it is unicode */ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_name; /* "tables/hdf5extension.pyx":318 * * # Encode the filename in case it is unicode * encname = encode_filename(name) # <<<<<<<<<<<<<< * * # These fields can be seen from Python. */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__encode_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encname = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":321 * * # These fields can be seen from Python. * self._v_new = None # this will be computed later # <<<<<<<<<<<<<< * # """Is this file going to be created from scratch?""" * */ if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_new, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":324 * # """Is this file going to be created from scratch?""" * * self._isPTFile = True # assume a PyTables file by default # <<<<<<<<<<<<<< * # """Does this HDF5 file have a PyTables format?""" * */ __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isPTFile, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":327 * # """Does this HDF5 file have a PyTables format?""" * * assert pymode in ('r', 'r+', 'a', 'w'), ("an invalid mode string ``%s`` " # <<<<<<<<<<<<<< * "passed the ``check_file_access()`` test; " * "please report this to the authors" % pymode) */ #ifndef CYTHON_WITHOUT_ASSERTIONS __Pyx_INCREF(__pyx_v_pymode); __pyx_t_6 = __pyx_v_pymode; __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!((int)__pyx_t_4)) { __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_kp_s_10), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = ((int)__pyx_t_2); } else { __pyx_t_3 = ((int)__pyx_t_4); } if (!__pyx_t_3) { __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__a), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = ((int)__pyx_t_4); } else { __pyx_t_2 = __pyx_t_3; } if (!__pyx_t_2) { __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = ((int)__pyx_t_3); } else { __pyx_t_4 = __pyx_t_2; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) { /* "tables/hdf5extension.pyx":329 * assert pymode in ('r', 'r+', 'a', 'w'), ("an invalid mode string ``%s`` " * "passed the ``check_file_access()`` test; " * "please report this to the authors" % pymode) # <<<<<<<<<<<<<< * * image = params.get('DRIVER_CORE_IMAGE') */ __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_v_pymode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_6)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "tables/hdf5extension.pyx":331 * "please report this to the authors" % pymode) * * image = params.get('DRIVER_CORE_IMAGE') # <<<<<<<<<<<<<< * if image: * if driver != "H5FD_CORE": */ __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__DRIVER_CORE_IMAGE), Py_None); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_image = __pyx_t_6; __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":332 * * image = params.get('DRIVER_CORE_IMAGE') * if image: # <<<<<<<<<<<<<< * if driver != "H5FD_CORE": * warnings.warn("The DRIVER_CORE_IMAGE parameter will be ignored by " */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_image); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { /* "tables/hdf5extension.pyx":333 * image = params.get('DRIVER_CORE_IMAGE') * if image: * if driver != "H5FD_CORE": # <<<<<<<<<<<<<< * warnings.warn("The DRIVER_CORE_IMAGE parameter will be ignored by " * "the '%s' driver" % driver) */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_driver, ((PyObject *)__pyx_n_s__H5FD_CORE), Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":334 * if image: * if driver != "H5FD_CORE": * warnings.warn("The DRIVER_CORE_IMAGE parameter will be ignored by " # <<<<<<<<<<<<<< * "the '%s' driver" % driver) * elif not PyBytes_Check(image): */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__warnings); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__warn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":335 * if driver != "H5FD_CORE": * warnings.warn("The DRIVER_CORE_IMAGE parameter will be ignored by " * "the '%s' driver" % driver) # <<<<<<<<<<<<<< * elif not PyBytes_Check(image): * raise TypeError("The DRIVER_CORE_IMAGE must be a string of bytes") */ __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), __pyx_v_driver); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __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_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } /* "tables/hdf5extension.pyx":336 * warnings.warn("The DRIVER_CORE_IMAGE parameter will be ignored by " * "the '%s' driver" % driver) * elif not PyBytes_Check(image): # <<<<<<<<<<<<<< * raise TypeError("The DRIVER_CORE_IMAGE must be a string of bytes") * elif not H5_HAVE_IMAGE_FILE: */ __pyx_t_4 = (!PyBytes_Check(__pyx_v_image)); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":337 * "the '%s' driver" % driver) * elif not PyBytes_Check(image): * raise TypeError("The DRIVER_CORE_IMAGE must be a string of bytes") # <<<<<<<<<<<<<< * elif not H5_HAVE_IMAGE_FILE: * raise RuntimeError("Support for image files is only availabe in " */ __pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } /* "tables/hdf5extension.pyx":338 * elif not PyBytes_Check(image): * raise TypeError("The DRIVER_CORE_IMAGE must be a string of bytes") * elif not H5_HAVE_IMAGE_FILE: # <<<<<<<<<<<<<< * raise RuntimeError("Support for image files is only availabe in " * "HDF5 >= 1.8.9") */ __pyx_t_4 = (!H5_HAVE_IMAGE_FILE); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":339 * raise TypeError("The DRIVER_CORE_IMAGE must be a string of bytes") * elif not H5_HAVE_IMAGE_FILE: * raise RuntimeError("Support for image files is only availabe in " # <<<<<<<<<<<<<< * "HDF5 >= 1.8.9") * */ __pyx_t_6 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; goto __pyx_L4; } __pyx_L4:; /* "tables/hdf5extension.pyx":345 * # that the file or directory exists and permissions are right. * # But only if we are using file backed storage. * backing_store = params.get("DRIVER_CORE_BACKING_STORE", 1) # <<<<<<<<<<<<<< * if driver != "H5FD_CORE" or backing_store: * check_file_access(name, pymode) */ __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s_17), __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_backing_store = __pyx_t_6; __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":346 * # But only if we are using file backed storage. * backing_store = params.get("DRIVER_CORE_BACKING_STORE", 1) * if driver != "H5FD_CORE" or backing_store: # <<<<<<<<<<<<<< * check_file_access(name, pymode) * */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_driver, ((PyObject *)__pyx_n_s__H5FD_CORE), Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_backing_store); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_t_2; } else { __pyx_t_3 = __pyx_t_4; } if (__pyx_t_3) { /* "tables/hdf5extension.pyx":347 * backing_store = params.get("DRIVER_CORE_BACKING_STORE", 1) * if driver != "H5FD_CORE" or backing_store: * check_file_access(name, pymode) # <<<<<<<<<<<<<< * * # Should a new file be created? */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__check_file_access); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyTuple_New(2); 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_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_INCREF(__pyx_v_pymode); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pymode); __Pyx_GIVEREF(__pyx_v_pymode); __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6; } __pyx_L6:; /* "tables/hdf5extension.pyx":350 * * # Should a new file be created? * if image: # <<<<<<<<<<<<<< * exists = True * else: */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_image); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "tables/hdf5extension.pyx":351 * # Should a new file be created? * if image: * exists = True # <<<<<<<<<<<<<< * else: * exists = os.path.exists(name) */ __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_exists = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L7; } /*else*/ { /* "tables/hdf5extension.pyx":353 * exists = True * else: * exists = os.path.exists(name) # <<<<<<<<<<<<<< * self._v_new = not (pymode in ('r', 'r+') or (pymode == 'a' and exists)) * */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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_GetAttr(__pyx_t_1, __pyx_n_s__exists); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __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_1)); __pyx_t_1 = 0; __pyx_v_exists = __pyx_t_6; __pyx_t_6 = 0; } __pyx_L7:; /* "tables/hdf5extension.pyx":354 * else: * exists = os.path.exists(name) * self._v_new = not (pymode in ('r', 'r+') or (pymode == 'a' and exists)) # <<<<<<<<<<<<<< * * user_block_size = params.get("USER_BLOCK_SIZE", 0) */ __Pyx_INCREF(__pyx_v_pymode); __pyx_t_6 = __pyx_v_pymode; __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!((int)__pyx_t_3)) { __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_kp_s_10), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = ((int)__pyx_t_4); } else { __pyx_t_2 = ((int)__pyx_t_3); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __pyx_t_2; if (!__pyx_t_3) { __pyx_t_6 = PyObject_RichCompare(__pyx_v_pymode, ((PyObject *)__pyx_n_s__a), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_exists); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __pyx_t_4; } else { __pyx_t_7 = __pyx_t_2; } __pyx_t_2 = __pyx_t_7; } else { __pyx_t_2 = __pyx_t_3; } __pyx_t_6 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_new, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":356 * self._v_new = not (pymode in ('r', 'r+') or (pymode == 'a' and exists)) * * user_block_size = params.get("USER_BLOCK_SIZE", 0) # <<<<<<<<<<<<<< * if user_block_size and not self._v_new: * warnings.warn("The HDF5 file already esists: the USER_BLOCK_SIZE " */ __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__USER_BLOCK_SIZE), __pyx_int_0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_user_block_size = __pyx_t_8; /* "tables/hdf5extension.pyx":357 * * user_block_size = params.get("USER_BLOCK_SIZE", 0) * if user_block_size and not self._v_new: # <<<<<<<<<<<<<< * warnings.warn("The HDF5 file already esists: the USER_BLOCK_SIZE " * "will be ignored") */ if (__pyx_v_user_block_size) { __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_new); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = (!__pyx_t_2); __pyx_t_2 = __pyx_t_3; } else { __pyx_t_2 = __pyx_v_user_block_size; } if (__pyx_t_2) { /* "tables/hdf5extension.pyx":358 * user_block_size = params.get("USER_BLOCK_SIZE", 0) * if user_block_size and not self._v_new: * warnings.warn("The HDF5 file already esists: the USER_BLOCK_SIZE " # <<<<<<<<<<<<<< * "will be ignored") * elif user_block_size: */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__warnings); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__warn); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8; } /* "tables/hdf5extension.pyx":360 * warnings.warn("The HDF5 file already esists: the USER_BLOCK_SIZE " * "will be ignored") * elif user_block_size: # <<<<<<<<<<<<<< * user_block_size = int(user_block_size) * is_pow_of_2 = ((user_block_size & (user_block_size - 1)) == 0) */ if (__pyx_v_user_block_size) { /* "tables/hdf5extension.pyx":361 * "will be ignored") * elif user_block_size: * user_block_size = int(user_block_size) # <<<<<<<<<<<<<< * is_pow_of_2 = ((user_block_size & (user_block_size - 1)) == 0) * if user_block_size < 512 or not is_pow_of_2: */ __pyx_v_user_block_size = __pyx_v_user_block_size; /* "tables/hdf5extension.pyx":362 * elif user_block_size: * user_block_size = int(user_block_size) * is_pow_of_2 = ((user_block_size & (user_block_size - 1)) == 0) # <<<<<<<<<<<<<< * if user_block_size < 512 or not is_pow_of_2: * raise ValueError("The USER_BLOCK_SIZE must be a power od 2 greather " */ __pyx_t_6 = __Pyx_PyBool_FromLong(((__pyx_v_user_block_size & (__pyx_v_user_block_size - 1)) == 0)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_is_pow_of_2 = __pyx_t_6; __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":363 * user_block_size = int(user_block_size) * is_pow_of_2 = ((user_block_size & (user_block_size - 1)) == 0) * if user_block_size < 512 or not is_pow_of_2: # <<<<<<<<<<<<<< * raise ValueError("The USER_BLOCK_SIZE must be a power od 2 greather " * "than 512 or zero") */ __pyx_t_2 = (__pyx_v_user_block_size < 512); if (!__pyx_t_2) { __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_is_pow_of_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = (!__pyx_t_3); __pyx_t_3 = __pyx_t_7; } else { __pyx_t_3 = __pyx_t_2; } if (__pyx_t_3) { /* "tables/hdf5extension.pyx":364 * is_pow_of_2 = ((user_block_size & (user_block_size - 1)) == 0) * if user_block_size < 512 or not is_pow_of_2: * raise ValueError("The USER_BLOCK_SIZE must be a power od 2 greather " # <<<<<<<<<<<<<< * "than 512 or zero") * */ __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; /* "tables/hdf5extension.pyx":368 * * # File creation property list * create_plist = H5Pcreate(H5P_FILE_CREATE) # <<<<<<<<<<<<<< * err = H5Pset_userblock(create_plist, user_block_size) * if err < 0: */ __pyx_v_create_plist = H5Pcreate(H5P_FILE_CREATE); /* "tables/hdf5extension.pyx":369 * # File creation property list * create_plist = H5Pcreate(H5P_FILE_CREATE) * err = H5Pset_userblock(create_plist, user_block_size) # <<<<<<<<<<<<<< * if err < 0: * H5Pclose(create_plist) */ __pyx_v_err = H5Pset_userblock(__pyx_v_create_plist, __pyx_v_user_block_size); /* "tables/hdf5extension.pyx":370 * create_plist = H5Pcreate(H5P_FILE_CREATE) * err = H5Pset_userblock(create_plist, user_block_size) * if err < 0: # <<<<<<<<<<<<<< * H5Pclose(create_plist) * raise HDF5ExtError("Unable to set the user block size") */ __pyx_t_3 = (__pyx_v_err < 0); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":371 * err = H5Pset_userblock(create_plist, user_block_size) * if err < 0: * H5Pclose(create_plist) # <<<<<<<<<<<<<< * raise HDF5ExtError("Unable to set the user block size") * */ H5Pclose(__pyx_v_create_plist); /* "tables/hdf5extension.pyx":372 * if err < 0: * H5Pclose(create_plist) * raise HDF5ExtError("Unable to set the user block size") # <<<<<<<<<<<<<< * * # File access property list */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_23), NULL); 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_DECREF(__pyx_t_6); __pyx_t_6 = 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 = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; goto __pyx_L8; } __pyx_L8:; /* "tables/hdf5extension.pyx":375 * * # File access property list * access_plist = H5Pcreate(H5P_FILE_ACCESS) # <<<<<<<<<<<<<< * * # Set parameters for chunk cache */ __pyx_v_access_plist = H5Pcreate(H5P_FILE_ACCESS); /* "tables/hdf5extension.pyx":379 * # Set parameters for chunk cache * H5Pset_cache(access_plist, 0, * params["CHUNK_CACHE_NELMTS"], # <<<<<<<<<<<<<< * params["CHUNK_CACHE_SIZE"], * params["CHUNK_CACHE_PREEMPT"]) */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__CHUNK_CACHE_NELMTS)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":380 * H5Pset_cache(access_plist, 0, * params["CHUNK_CACHE_NELMTS"], * params["CHUNK_CACHE_SIZE"], # <<<<<<<<<<<<<< * params["CHUNK_CACHE_PREEMPT"]) * */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__CHUNK_CACHE_SIZE)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":381 * params["CHUNK_CACHE_NELMTS"], * params["CHUNK_CACHE_SIZE"], * params["CHUNK_CACHE_PREEMPT"]) # <<<<<<<<<<<<<< * * # Set the I/O driver */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__CHUNK_CACHE_PREEMPT)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; H5Pset_cache(__pyx_v_access_plist, 0, __pyx_t_9, __pyx_t_8, __pyx_t_10); /* "tables/hdf5extension.pyx":384 * * # Set the I/O driver * if driver == "H5FD_SEC2": # <<<<<<<<<<<<<< * err = H5Pset_fapl_sec2(access_plist) * elif driver == "H5FD_DIRECT": */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_driver, ((PyObject *)__pyx_n_s__H5FD_SEC2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":385 * # Set the I/O driver * if driver == "H5FD_SEC2": * err = H5Pset_fapl_sec2(access_plist) # <<<<<<<<<<<<<< * elif driver == "H5FD_DIRECT": * if not H5_HAVE_DIRECT_DRIVER: */ __pyx_v_err = H5Pset_fapl_sec2(__pyx_v_access_plist); goto __pyx_L11; } /* "tables/hdf5extension.pyx":386 * if driver == "H5FD_SEC2": * err = H5Pset_fapl_sec2(access_plist) * elif driver == "H5FD_DIRECT": # <<<<<<<<<<<<<< * if not H5_HAVE_DIRECT_DRIVER: * H5Pclose(create_plist) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_driver, ((PyObject *)__pyx_n_s__H5FD_DIRECT), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":387 * err = H5Pset_fapl_sec2(access_plist) * elif driver == "H5FD_DIRECT": * if not H5_HAVE_DIRECT_DRIVER: # <<<<<<<<<<<<<< * H5Pclose(create_plist) * H5Pclose(access_plist) */ __pyx_t_3 = (!H5_HAVE_DIRECT_DRIVER); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":388 * elif driver == "H5FD_DIRECT": * if not H5_HAVE_DIRECT_DRIVER: * H5Pclose(create_plist) # <<<<<<<<<<<<<< * H5Pclose(access_plist) * raise RuntimeError("The H5FD_DIRECT driver is not available") */ H5Pclose(__pyx_v_create_plist); /* "tables/hdf5extension.pyx":389 * if not H5_HAVE_DIRECT_DRIVER: * H5Pclose(create_plist) * H5Pclose(access_plist) # <<<<<<<<<<<<<< * raise RuntimeError("The H5FD_DIRECT driver is not available") * err = pt_H5Pset_fapl_direct(access_plist, */ H5Pclose(__pyx_v_access_plist); /* "tables/hdf5extension.pyx":390 * H5Pclose(create_plist) * H5Pclose(access_plist) * raise RuntimeError("The H5FD_DIRECT driver is not available") # <<<<<<<<<<<<<< * err = pt_H5Pset_fapl_direct(access_plist, * params["DRIVER_DIRECT_ALIGNMENT"], */ __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __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 = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L12; } __pyx_L12:; /* "tables/hdf5extension.pyx":392 * raise RuntimeError("The H5FD_DIRECT driver is not available") * err = pt_H5Pset_fapl_direct(access_plist, * params["DRIVER_DIRECT_ALIGNMENT"], # <<<<<<<<<<<<<< * params["DRIVER_DIRECT_BLOCK_SIZE"], * params["DRIVER_DIRECT_CBUF_SIZE"]) */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s_26)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":393 * err = pt_H5Pset_fapl_direct(access_plist, * params["DRIVER_DIRECT_ALIGNMENT"], * params["DRIVER_DIRECT_BLOCK_SIZE"], # <<<<<<<<<<<<<< * params["DRIVER_DIRECT_CBUF_SIZE"]) * #elif driver == "H5FD_LOG": */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s_27)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":394 * params["DRIVER_DIRECT_ALIGNMENT"], * params["DRIVER_DIRECT_BLOCK_SIZE"], * params["DRIVER_DIRECT_CBUF_SIZE"]) # <<<<<<<<<<<<<< * #elif driver == "H5FD_LOG": * # if "DRIVER_LOG_FILE" not in params: */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s_28)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_err = pt_H5Pset_fapl_direct(__pyx_v_access_plist, __pyx_t_8, __pyx_t_11, __pyx_t_12); goto __pyx_L11; } /* "tables/hdf5extension.pyx":405 * # params["DRIVER_LOG_FLAGS"], * # params["DRIVER_LOG_BUF_SIZE"]) * elif driver == "H5FD_WINDOWS": # <<<<<<<<<<<<<< * if not H5_HAVE_WINDOWS_DRIVER: * H5Pclose(access_plist) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_driver, ((PyObject *)__pyx_n_s__H5FD_WINDOWS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":406 * # params["DRIVER_LOG_BUF_SIZE"]) * elif driver == "H5FD_WINDOWS": * if not H5_HAVE_WINDOWS_DRIVER: # <<<<<<<<<<<<<< * H5Pclose(access_plist) * H5Pclose(create_plist) */ __pyx_t_3 = (!H5_HAVE_WINDOWS_DRIVER); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":407 * elif driver == "H5FD_WINDOWS": * if not H5_HAVE_WINDOWS_DRIVER: * H5Pclose(access_plist) # <<<<<<<<<<<<<< * H5Pclose(create_plist) * raise RuntimeError("The H5FD_WINDOWS driver is not available") */ H5Pclose(__pyx_v_access_plist); /* "tables/hdf5extension.pyx":408 * if not H5_HAVE_WINDOWS_DRIVER: * H5Pclose(access_plist) * H5Pclose(create_plist) # <<<<<<<<<<<<<< * raise RuntimeError("The H5FD_WINDOWS driver is not available") * err = pt_H5Pset_fapl_windows(access_plist) */ H5Pclose(__pyx_v_create_plist); /* "tables/hdf5extension.pyx":409 * H5Pclose(access_plist) * H5Pclose(create_plist) * raise RuntimeError("The H5FD_WINDOWS driver is not available") # <<<<<<<<<<<<<< * err = pt_H5Pset_fapl_windows(access_plist) * elif driver == "H5FD_STDIO": */ __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __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 = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L13; } __pyx_L13:; /* "tables/hdf5extension.pyx":410 * H5Pclose(create_plist) * raise RuntimeError("The H5FD_WINDOWS driver is not available") * err = pt_H5Pset_fapl_windows(access_plist) # <<<<<<<<<<<<<< * elif driver == "H5FD_STDIO": * err = H5Pset_fapl_stdio(access_plist) */ __pyx_v_err = pt_H5Pset_fapl_windows(__pyx_v_access_plist); goto __pyx_L11; } /* "tables/hdf5extension.pyx":411 * raise RuntimeError("The H5FD_WINDOWS driver is not available") * err = pt_H5Pset_fapl_windows(access_plist) * elif driver == "H5FD_STDIO": # <<<<<<<<<<<<<< * err = H5Pset_fapl_stdio(access_plist) * elif driver == "H5FD_CORE": */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_driver, ((PyObject *)__pyx_n_s__H5FD_STDIO), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":412 * err = pt_H5Pset_fapl_windows(access_plist) * elif driver == "H5FD_STDIO": * err = H5Pset_fapl_stdio(access_plist) # <<<<<<<<<<<<<< * elif driver == "H5FD_CORE": * err = H5Pset_fapl_core(access_plist, */ __pyx_v_err = H5Pset_fapl_stdio(__pyx_v_access_plist); goto __pyx_L11; } /* "tables/hdf5extension.pyx":413 * elif driver == "H5FD_STDIO": * err = H5Pset_fapl_stdio(access_plist) * elif driver == "H5FD_CORE": # <<<<<<<<<<<<<< * err = H5Pset_fapl_core(access_plist, * params["DRIVER_CORE_INCREMENT"], */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_driver, ((PyObject *)__pyx_n_s__H5FD_CORE), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":415 * elif driver == "H5FD_CORE": * err = H5Pset_fapl_core(access_plist, * params["DRIVER_CORE_INCREMENT"], # <<<<<<<<<<<<<< * backing_store) * if image: */ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s_31)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_PyInt_AsSize_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":416 * err = H5Pset_fapl_core(access_plist, * params["DRIVER_CORE_INCREMENT"], * backing_store) # <<<<<<<<<<<<<< * if image: * img_buf_len = len(image) */ __pyx_t_13 = __Pyx_PyInt_from_py_hbool_t(__pyx_v_backing_store); if (unlikely((__pyx_t_13 == (hbool_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_err = H5Pset_fapl_core(__pyx_v_access_plist, __pyx_t_12, __pyx_t_13); /* "tables/hdf5extension.pyx":417 * params["DRIVER_CORE_INCREMENT"], * backing_store) * if image: # <<<<<<<<<<<<<< * img_buf_len = len(image) * img_buf_p = PyBytes_AsString(image) */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_image); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "tables/hdf5extension.pyx":418 * backing_store) * if image: * img_buf_len = len(image) # <<<<<<<<<<<<<< * img_buf_p = PyBytes_AsString(image) * err = pt_H5Pset_file_image(access_plist, img_buf_p, img_buf_len) */ __pyx_t_14 = PyObject_Length(__pyx_v_image); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_img_buf_len = __pyx_t_14; /* "tables/hdf5extension.pyx":419 * if image: * img_buf_len = len(image) * img_buf_p = PyBytes_AsString(image) # <<<<<<<<<<<<<< * err = pt_H5Pset_file_image(access_plist, img_buf_p, img_buf_len) * if err < 0: */ __pyx_t_15 = PyBytes_AsString(__pyx_v_image); if (unlikely(__pyx_t_15 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_img_buf_p = ((void *)__pyx_t_15); /* "tables/hdf5extension.pyx":420 * img_buf_len = len(image) * img_buf_p = PyBytes_AsString(image) * err = pt_H5Pset_file_image(access_plist, img_buf_p, img_buf_len) # <<<<<<<<<<<<<< * if err < 0: * H5Pclose(create_plist) */ __pyx_v_err = pt_H5Pset_file_image(__pyx_v_access_plist, __pyx_v_img_buf_p, __pyx_v_img_buf_len); /* "tables/hdf5extension.pyx":421 * img_buf_p = PyBytes_AsString(image) * err = pt_H5Pset_file_image(access_plist, img_buf_p, img_buf_len) * if err < 0: # <<<<<<<<<<<<<< * H5Pclose(create_plist) * H5Pclose(access_plist) */ __pyx_t_3 = (__pyx_v_err < 0); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":422 * err = pt_H5Pset_file_image(access_plist, img_buf_p, img_buf_len) * if err < 0: * H5Pclose(create_plist) # <<<<<<<<<<<<<< * H5Pclose(access_plist) * raise HDF5ExtError("Unable to set the file image") */ H5Pclose(__pyx_v_create_plist); /* "tables/hdf5extension.pyx":423 * if err < 0: * H5Pclose(create_plist) * H5Pclose(access_plist) # <<<<<<<<<<<<<< * raise HDF5ExtError("Unable to set the file image") * */ H5Pclose(__pyx_v_access_plist); /* "tables/hdf5extension.pyx":424 * H5Pclose(create_plist) * H5Pclose(access_plist) * raise HDF5ExtError("Unable to set the file image") # <<<<<<<<<<<<<< * * #elif driver == "H5FD_FAMILY": */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L15; } __pyx_L15:; goto __pyx_L14; } __pyx_L14:; goto __pyx_L11; } __pyx_L11:; /* "tables/hdf5extension.pyx":436 * # err = H5Pset_fapl_split(access_plist, meta_ext, meta_plist_id, raw_ext, * # raw_plist_id) * if err < 0: # <<<<<<<<<<<<<< * e = HDF5ExtError("Unable to set the file access property list") * H5Pclose(create_plist) */ __pyx_t_3 = (__pyx_v_err < 0); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":437 * # raw_plist_id) * if err < 0: * e = HDF5ExtError("Unable to set the file access property list") # <<<<<<<<<<<<<< * H5Pclose(create_plist) * H5Pclose(access_plist) */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_35), NULL); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_e = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":438 * if err < 0: * e = HDF5ExtError("Unable to set the file access property list") * H5Pclose(create_plist) # <<<<<<<<<<<<<< * H5Pclose(access_plist) * raise e */ H5Pclose(__pyx_v_create_plist); /* "tables/hdf5extension.pyx":439 * e = HDF5ExtError("Unable to set the file access property list") * H5Pclose(create_plist) * H5Pclose(access_plist) # <<<<<<<<<<<<<< * raise e * */ H5Pclose(__pyx_v_access_plist); /* "tables/hdf5extension.pyx":440 * H5Pclose(create_plist) * H5Pclose(access_plist) * raise e # <<<<<<<<<<<<<< * * if pymode == 'r': */ __Pyx_Raise(__pyx_v_e, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L16; } __pyx_L16:; /* "tables/hdf5extension.pyx":442 * raise e * * if pymode == 'r': # <<<<<<<<<<<<<< * self.file_id = H5Fopen(encname, H5F_ACC_RDONLY, access_plist) * elif pymode == 'r+': */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_pymode, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":443 * * if pymode == 'r': * self.file_id = H5Fopen(encname, H5F_ACC_RDONLY, access_plist) # <<<<<<<<<<<<<< * elif pymode == 'r+': * self.file_id = H5Fopen(encname, H5F_ACC_RDWR, access_plist) */ __pyx_t_15 = PyBytes_AsString(((PyObject *)__pyx_v_encname)); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->file_id = H5Fopen(__pyx_t_15, H5F_ACC_RDONLY, __pyx_v_access_plist); goto __pyx_L17; } /* "tables/hdf5extension.pyx":444 * if pymode == 'r': * self.file_id = H5Fopen(encname, H5F_ACC_RDONLY, access_plist) * elif pymode == 'r+': # <<<<<<<<<<<<<< * self.file_id = H5Fopen(encname, H5F_ACC_RDWR, access_plist) * elif pymode == 'a': */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_pymode, ((PyObject *)__pyx_kp_s_10), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":445 * self.file_id = H5Fopen(encname, H5F_ACC_RDONLY, access_plist) * elif pymode == 'r+': * self.file_id = H5Fopen(encname, H5F_ACC_RDWR, access_plist) # <<<<<<<<<<<<<< * elif pymode == 'a': * if exists: */ __pyx_t_15 = PyBytes_AsString(((PyObject *)__pyx_v_encname)); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->file_id = H5Fopen(__pyx_t_15, H5F_ACC_RDWR, __pyx_v_access_plist); goto __pyx_L17; } /* "tables/hdf5extension.pyx":446 * elif pymode == 'r+': * self.file_id = H5Fopen(encname, H5F_ACC_RDWR, access_plist) * elif pymode == 'a': # <<<<<<<<<<<<<< * if exists: * # A test for logging. */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_pymode, ((PyObject *)__pyx_n_s__a), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":447 * self.file_id = H5Fopen(encname, H5F_ACC_RDWR, access_plist) * elif pymode == 'a': * if exists: # <<<<<<<<<<<<<< * # A test for logging. * ## H5Pset_sieve_buf_size(access_plist, 0) */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_exists); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { /* "tables/hdf5extension.pyx":451 * ## H5Pset_sieve_buf_size(access_plist, 0) * ## H5Pset_fapl_log (access_plist, "test.log", H5FD_LOG_LOC_WRITE, 0) * self.file_id = H5Fopen(encname, H5F_ACC_RDWR, access_plist) # <<<<<<<<<<<<<< * else: * self.file_id = H5Fcreate(encname, H5F_ACC_TRUNC, create_plist, */ __pyx_t_15 = PyBytes_AsString(((PyObject *)__pyx_v_encname)); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->file_id = H5Fopen(__pyx_t_15, H5F_ACC_RDWR, __pyx_v_access_plist); goto __pyx_L18; } /*else*/ { /* "tables/hdf5extension.pyx":453 * self.file_id = H5Fopen(encname, H5F_ACC_RDWR, access_plist) * else: * self.file_id = H5Fcreate(encname, H5F_ACC_TRUNC, create_plist, # <<<<<<<<<<<<<< * access_plist) * elif pymode == 'w': */ __pyx_t_15 = PyBytes_AsString(((PyObject *)__pyx_v_encname)); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":454 * else: * self.file_id = H5Fcreate(encname, H5F_ACC_TRUNC, create_plist, * access_plist) # <<<<<<<<<<<<<< * elif pymode == 'w': * self.file_id = H5Fcreate(encname, H5F_ACC_TRUNC, create_plist, */ __pyx_v_self->file_id = H5Fcreate(__pyx_t_15, H5F_ACC_TRUNC, __pyx_v_create_plist, __pyx_v_access_plist); } __pyx_L18:; goto __pyx_L17; } /* "tables/hdf5extension.pyx":455 * self.file_id = H5Fcreate(encname, H5F_ACC_TRUNC, create_plist, * access_plist) * elif pymode == 'w': # <<<<<<<<<<<<<< * self.file_id = H5Fcreate(encname, H5F_ACC_TRUNC, create_plist, * access_plist) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_pymode, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":456 * access_plist) * elif pymode == 'w': * self.file_id = H5Fcreate(encname, H5F_ACC_TRUNC, create_plist, # <<<<<<<<<<<<<< * access_plist) * */ __pyx_t_15 = PyBytes_AsString(((PyObject *)__pyx_v_encname)); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":457 * elif pymode == 'w': * self.file_id = H5Fcreate(encname, H5F_ACC_TRUNC, create_plist, * access_plist) # <<<<<<<<<<<<<< * * if self.file_id < 0: */ __pyx_v_self->file_id = H5Fcreate(__pyx_t_15, H5F_ACC_TRUNC, __pyx_v_create_plist, __pyx_v_access_plist); goto __pyx_L17; } __pyx_L17:; /* "tables/hdf5extension.pyx":459 * access_plist) * * if self.file_id < 0: # <<<<<<<<<<<<<< * e = HDF5ExtError("Unable to open/create file '%s'" % name) * H5Pclose(create_plist) */ __pyx_t_3 = (__pyx_v_self->file_id < 0); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":460 * * if self.file_id < 0: * e = HDF5ExtError("Unable to open/create file '%s'" % name) # <<<<<<<<<<<<<< * H5Pclose(create_plist) * H5Pclose(access_plist) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); 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_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_36), __pyx_v_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_v_e = __pyx_t_6; __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":461 * if self.file_id < 0: * e = HDF5ExtError("Unable to open/create file '%s'" % name) * H5Pclose(create_plist) # <<<<<<<<<<<<<< * H5Pclose(access_plist) * raise e */ H5Pclose(__pyx_v_create_plist); /* "tables/hdf5extension.pyx":462 * e = HDF5ExtError("Unable to open/create file '%s'" % name) * H5Pclose(create_plist) * H5Pclose(access_plist) # <<<<<<<<<<<<<< * raise e * */ H5Pclose(__pyx_v_access_plist); /* "tables/hdf5extension.pyx":463 * H5Pclose(create_plist) * H5Pclose(access_plist) * raise e # <<<<<<<<<<<<<< * * H5Pclose(create_plist) */ __Pyx_Raise(__pyx_v_e, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L19; } __pyx_L19:; /* "tables/hdf5extension.pyx":465 * raise e * * H5Pclose(create_plist) # <<<<<<<<<<<<<< * H5Pclose(access_plist) * */ H5Pclose(__pyx_v_create_plist); /* "tables/hdf5extension.pyx":466 * * H5Pclose(create_plist) * H5Pclose(access_plist) # <<<<<<<<<<<<<< * * # Set the cache size */ H5Pclose(__pyx_v_access_plist); /* "tables/hdf5extension.pyx":469 * * # Set the cache size * set_cache_size(self.file_id, params["METADATA_CACHE_SIZE"]) # <<<<<<<<<<<<<< * * # Set the maximum number of threads for Blosc */ __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__METADATA_CACHE_SIZE)); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_12 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; set_cache_size(__pyx_v_self->file_id, __pyx_t_12); /* "tables/hdf5extension.pyx":472 * * # Set the maximum number of threads for Blosc * set_blosc_max_threads(params["MAX_BLOSC_THREADS"]) # <<<<<<<<<<<<<< * * # XXX: add the possibility to pass a pre-allocated buffer */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s_37); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__MAX_BLOSC_THREADS)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __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); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.hdf5extension.File._g_new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encname); __Pyx_XDECREF(__pyx_v_driver); __Pyx_XDECREF(__pyx_v_image); __Pyx_XDECREF(__pyx_v_backing_store); __Pyx_XDECREF(__pyx_v_exists); __Pyx_XDECREF(__pyx_v_is_pow_of_2); __Pyx_XDECREF(__pyx_v_e); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_4File_3get_file_image(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_4File_2get_file_image[] = "Retrieves an in-memory image of an existing, open HDF5 file.\n\n .. note:: this method requires HDF5 >= 1.8.9.\n\n .. versionadded:: 3.0\n\n "; static PyObject *__pyx_pw_6tables_13hdf5extension_4File_3get_file_image(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_file_image (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4File_2get_file_image(((struct __pyx_obj_6tables_13hdf5extension_File *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":475 * * # XXX: add the possibility to pass a pre-allocated buffer * def get_file_image(self): # <<<<<<<<<<<<<< * """Retrieves an in-memory image of an existing, open HDF5 file. * */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_2get_file_image(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self) { Py_ssize_t __pyx_v_size; size_t __pyx_v_buf_len; PyObject *__pyx_v_image = 0; char *__pyx_v_cimage; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; char *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_file_image", 0); /* "tables/hdf5extension.pyx":484 * """ * * cdef ssize_t size = 0 # <<<<<<<<<<<<<< * cdef size_t buf_len = 0 * cdef bytes image */ __pyx_v_size = 0; /* "tables/hdf5extension.pyx":485 * * cdef ssize_t size = 0 * cdef size_t buf_len = 0 # <<<<<<<<<<<<<< * cdef bytes image * cdef char* cimage */ __pyx_v_buf_len = 0; /* "tables/hdf5extension.pyx":489 * cdef char* cimage * * self.flush() # <<<<<<<<<<<<<< * * # retrieve the size of the buffer for the file image */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __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 = 489; __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/hdf5extension.pyx":492 * * # retrieve the size of the buffer for the file image * size = pt_H5Fget_file_image(self.file_id, NULL, buf_len) # <<<<<<<<<<<<<< * if size < 0: * raise HDF5ExtError("Unable to retrieve the size of the buffer for the " */ __pyx_v_size = pt_H5Fget_file_image(__pyx_v_self->file_id, NULL, __pyx_v_buf_len); /* "tables/hdf5extension.pyx":493 * # retrieve the size of the buffer for the file image * size = pt_H5Fget_file_image(self.file_id, NULL, buf_len) * if size < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Unable to retrieve the size of the buffer for the " * "file image. Plese note that not all drivers " */ __pyx_t_3 = (__pyx_v_size < 0); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":494 * size = pt_H5Fget_file_image(self.file_id, NULL, buf_len) * if size < 0: * raise HDF5ExtError("Unable to retrieve the size of the buffer for the " # <<<<<<<<<<<<<< * "file image. Plese note that not all drivers " * "provide support for image files.") */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __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 = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":499 * * # allocate the memory buffer * image = PyBytes_FromStringAndSize(NULL, size) # <<<<<<<<<<<<<< * if not image: * raise RuntimeError("Unable to allecote meomory fir the file image") */ __pyx_t_1 = ((PyObject *)PyBytes_FromStringAndSize(NULL, __pyx_v_size)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_image = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":500 * # allocate the memory buffer * image = PyBytes_FromStringAndSize(NULL, size) * if not image: # <<<<<<<<<<<<<< * raise RuntimeError("Unable to allecote meomory fir the file image") * */ __pyx_t_3 = (((PyObject *)__pyx_v_image) != Py_None) && (PyBytes_GET_SIZE(((PyObject *)__pyx_v_image)) != 0); __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":501 * image = PyBytes_FromStringAndSize(NULL, size) * if not image: * raise RuntimeError("Unable to allecote meomory fir the file image") # <<<<<<<<<<<<<< * * cimage = image */ __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __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 = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "tables/hdf5extension.pyx":503 * raise RuntimeError("Unable to allecote meomory fir the file image") * * cimage = image # <<<<<<<<<<<<<< * buf_len = size * size = pt_H5Fget_file_image(self.file_id, cimage, buf_len) */ __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_image)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cimage = __pyx_t_5; /* "tables/hdf5extension.pyx":504 * * cimage = image * buf_len = size # <<<<<<<<<<<<<< * size = pt_H5Fget_file_image(self.file_id, cimage, buf_len) * if size < 0: */ __pyx_v_buf_len = __pyx_v_size; /* "tables/hdf5extension.pyx":505 * cimage = image * buf_len = size * size = pt_H5Fget_file_image(self.file_id, cimage, buf_len) # <<<<<<<<<<<<<< * if size < 0: * raise HDF5ExtError("Unable to retrieve the file image. " */ __pyx_v_size = pt_H5Fget_file_image(__pyx_v_self->file_id, ((void *)__pyx_v_cimage), __pyx_v_buf_len); /* "tables/hdf5extension.pyx":506 * buf_len = size * size = pt_H5Fget_file_image(self.file_id, cimage, buf_len) * if size < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Unable to retrieve the file image. " * "Plese note that not all drivers provide support " */ __pyx_t_4 = (__pyx_v_size < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":507 * size = pt_H5Fget_file_image(self.file_id, cimage, buf_len) * if size < 0: * raise HDF5ExtError("Unable to retrieve the file image. " # <<<<<<<<<<<<<< * "Plese note that not all drivers provide support " * "for image files.") */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __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 = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "tables/hdf5extension.pyx":511 * "for image files.") * * return image # <<<<<<<<<<<<<< * * def get_filesize(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_image)); __pyx_r = ((PyObject *)__pyx_v_image); 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.hdf5extension.File.get_file_image", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_image); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_4File_5get_filesize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_4File_4get_filesize[] = "Returns the size of an HDF5 file.\n\n The returned size is that of the entire file, as opposed to only\n the HDF5 portion of the file. I.e., size includes the user block,\n if any, the HDF5 portion of the file, and any data that may have\n been appended beyond the data written through the HDF5 Library.\n\n .. versionadded:: 3.0\n\n "; static PyObject *__pyx_pw_6tables_13hdf5extension_4File_5get_filesize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_filesize (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4File_4get_filesize(((struct __pyx_obj_6tables_13hdf5extension_File *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":513 * return image * * def get_filesize(self): # <<<<<<<<<<<<<< * """Returns the size of an HDF5 file. * */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_4get_filesize(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self) { herr_t __pyx_v_err; hsize_t __pyx_v_size; 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("get_filesize", 0); /* "tables/hdf5extension.pyx":525 * """ * * cdef herr_t err = 0 # <<<<<<<<<<<<<< * cdef hsize_t size = 0 * */ __pyx_v_err = 0; /* "tables/hdf5extension.pyx":526 * * cdef herr_t err = 0 * cdef hsize_t size = 0 # <<<<<<<<<<<<<< * * err = H5Fget_filesize(self.file_id, &size) */ __pyx_v_size = 0; /* "tables/hdf5extension.pyx":528 * cdef hsize_t size = 0 * * err = H5Fget_filesize(self.file_id, &size) # <<<<<<<<<<<<<< * if err < 0: * raise HDF5ExtError("Unable to retrieve the HDF5 file size") */ __pyx_v_err = H5Fget_filesize(__pyx_v_self->file_id, (&__pyx_v_size)); /* "tables/hdf5extension.pyx":529 * * err = H5Fget_filesize(self.file_id, &size) * if err < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Unable to retrieve the HDF5 file size") * */ __pyx_t_1 = (__pyx_v_err < 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":530 * err = H5Fget_filesize(self.file_id, &size) * if err < 0: * raise HDF5ExtError("Unable to retrieve the HDF5 file size") # <<<<<<<<<<<<<< * * return size */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":532 * raise HDF5ExtError("Unable to retrieve the HDF5 file size") * * return size # <<<<<<<<<<<<<< * * def get_userblock_size(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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.hdf5extension.File.get_filesize", __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_13hdf5extension_4File_7get_userblock_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_4File_6get_userblock_size[] = "Retrieves the size of a user block.\n\n .. versionadded:: 3.0\n\n "; static PyObject *__pyx_pw_6tables_13hdf5extension_4File_7get_userblock_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_userblock_size (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4File_6get_userblock_size(((struct __pyx_obj_6tables_13hdf5extension_File *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":534 * return size * * def get_userblock_size(self): # <<<<<<<<<<<<<< * """Retrieves the size of a user block. * */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_6get_userblock_size(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self) { herr_t __pyx_v_err; hsize_t __pyx_v_size; hid_t __pyx_v_create_plist; 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("get_userblock_size", 0); /* "tables/hdf5extension.pyx":541 * """ * * cdef herr_t err = 0 # <<<<<<<<<<<<<< * cdef hsize_t size = 0 * cdef hid_t create_plist */ __pyx_v_err = 0; /* "tables/hdf5extension.pyx":542 * * cdef herr_t err = 0 * cdef hsize_t size = 0 # <<<<<<<<<<<<<< * cdef hid_t create_plist * */ __pyx_v_size = 0; /* "tables/hdf5extension.pyx":545 * cdef hid_t create_plist * * create_plist = H5Fget_create_plist(self.file_id) # <<<<<<<<<<<<<< * if create_plist < 0: * raise HDF5ExtError("Unable to get the creation property list") */ __pyx_v_create_plist = H5Fget_create_plist(__pyx_v_self->file_id); /* "tables/hdf5extension.pyx":546 * * create_plist = H5Fget_create_plist(self.file_id) * if create_plist < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Unable to get the creation property list") * */ __pyx_t_1 = (__pyx_v_create_plist < 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":547 * create_plist = H5Fget_create_plist(self.file_id) * if create_plist < 0: * raise HDF5ExtError("Unable to get the creation property list") # <<<<<<<<<<<<<< * * err = H5Pget_userblock(create_plist, &size) */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":549 * raise HDF5ExtError("Unable to get the creation property list") * * err = H5Pget_userblock(create_plist, &size) # <<<<<<<<<<<<<< * if err < 0: * H5Pclose(create_plist) */ __pyx_v_err = H5Pget_userblock(__pyx_v_create_plist, (&__pyx_v_size)); /* "tables/hdf5extension.pyx":550 * * err = H5Pget_userblock(create_plist, &size) * if err < 0: # <<<<<<<<<<<<<< * H5Pclose(create_plist) * raise HDF5ExtError("unable to retrieve the user block size") */ __pyx_t_1 = (__pyx_v_err < 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":551 * err = H5Pget_userblock(create_plist, &size) * if err < 0: * H5Pclose(create_plist) # <<<<<<<<<<<<<< * raise HDF5ExtError("unable to retrieve the user block size") * */ H5Pclose(__pyx_v_create_plist); /* "tables/hdf5extension.pyx":552 * if err < 0: * H5Pclose(create_plist) * raise HDF5ExtError("unable to retrieve the user block size") # <<<<<<<<<<<<<< * * H5Pclose(create_plist) */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "tables/hdf5extension.pyx":554 * raise HDF5ExtError("unable to retrieve the user block size") * * H5Pclose(create_plist) # <<<<<<<<<<<<<< * * return size */ H5Pclose(__pyx_v_create_plist); /* "tables/hdf5extension.pyx":556 * H5Pclose(create_plist) * * return size # <<<<<<<<<<<<<< * * # Accessor definitions */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __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_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.hdf5extension.File.get_userblock_size", __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_13hdf5extension_4File_9_get_file_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4File_9_get_file_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_file_id (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4File_8_get_file_id(((struct __pyx_obj_6tables_13hdf5extension_File *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":559 * * # Accessor definitions * def _get_file_id(self): # <<<<<<<<<<<<<< * return self.file_id * */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_8_get_file_id(struct __pyx_obj_6tables_13hdf5extension_File *__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_file_id", 0); /* "tables/hdf5extension.pyx":560 * # Accessor definitions * def _get_file_id(self): * return self.file_id # <<<<<<<<<<<<<< * * def fileno(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->file_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __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.hdf5extension.File._get_file_id", __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_13hdf5extension_4File_11fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_4File_10fileno[] = "Return the underlying OS integer file descriptor.\n\n This is needed for lower-level file interfaces, such as the ``fcntl``\n module.\n\n "; static PyObject *__pyx_pw_6tables_13hdf5extension_4File_11fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fileno (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4File_10fileno(((struct __pyx_obj_6tables_13hdf5extension_File *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":562 * return self.file_id * * def fileno(self): # <<<<<<<<<<<<<< * """Return the underlying OS integer file descriptor. * */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_10fileno(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self) { void *__pyx_v_file_handle; uintptr_t *__pyx_v_descriptor; herr_t __pyx_v_err; 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("fileno", 0); /* "tables/hdf5extension.pyx":573 * cdef uintptr_t *descriptor * cdef herr_t err * err = H5Fget_vfd_handle(self.file_id, H5P_DEFAULT, &file_handle) # <<<<<<<<<<<<<< * if err < 0: * raise HDF5ExtError( */ __pyx_v_err = H5Fget_vfd_handle(__pyx_v_self->file_id, H5P_DEFAULT, (&__pyx_v_file_handle)); /* "tables/hdf5extension.pyx":574 * cdef herr_t err * err = H5Fget_vfd_handle(self.file_id, H5P_DEFAULT, &file_handle) * if err < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError( * "Problems getting file descriptor for file ``%s``" % self.name) */ __pyx_t_1 = (__pyx_v_err < 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":575 * err = H5Fget_vfd_handle(self.file_id, H5P_DEFAULT, &file_handle) * if err < 0: * raise HDF5ExtError( # <<<<<<<<<<<<<< * "Problems getting file descriptor for file ``%s``" % self.name) * # Convert the 'void *file_handle' into an 'int *descriptor' */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "tables/hdf5extension.pyx":576 * if err < 0: * raise HDF5ExtError( * "Problems getting file descriptor for file ``%s``" % self.name) # <<<<<<<<<<<<<< * # Convert the 'void *file_handle' into an 'int *descriptor' * descriptor = file_handle */ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_50), __pyx_v_self->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__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 = 575; __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; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":578 * "Problems getting file descriptor for file ``%s``" % self.name) * # Convert the 'void *file_handle' into an 'int *descriptor' * descriptor = file_handle # <<<<<<<<<<<<<< * return descriptor[0] * */ __pyx_v_descriptor = ((uintptr_t *)__pyx_v_file_handle); /* "tables/hdf5extension.pyx":579 * # Convert the 'void *file_handle' into an 'int *descriptor' * descriptor = file_handle * return descriptor[0] # <<<<<<<<<<<<<< * * _getFileId = previous_api(_get_file_id) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_to_py_uintptr_t((__pyx_v_descriptor[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.hdf5extension.File.fileno", __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_13hdf5extension_4File_13_flush_file(PyObject *__pyx_v_self, PyObject *__pyx_v_scope); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4File_13_flush_file(PyObject *__pyx_v_self, PyObject *__pyx_v_scope) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_flush_file (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4File_12_flush_file(((struct __pyx_obj_6tables_13hdf5extension_File *)__pyx_v_self), ((PyObject *)__pyx_v_scope)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":583 * _getFileId = previous_api(_get_file_id) * * def _flush_file(self, scope): # <<<<<<<<<<<<<< * # Close the file * H5Fflush(self.file_id, scope) */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_12_flush_file(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self, PyObject *__pyx_v_scope) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations enum H5F_scope_t __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_flush_file", 0); /* "tables/hdf5extension.pyx":585 * def _flush_file(self, scope): * # Close the file * H5Fflush(self.file_id, scope) # <<<<<<<<<<<<<< * * _flushFile = previous_api(_flush_file) */ __pyx_t_1 = ((enum H5F_scope_t)PyInt_AsLong(__pyx_v_scope)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5Fflush(__pyx_v_self->file_id, __pyx_t_1); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("tables.hdf5extension.File._flush_file", __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_13hdf5extension_4File_15_close_file(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4File_15_close_file(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_close_file (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4File_14_close_file(((struct __pyx_obj_6tables_13hdf5extension_File *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":589 * _flushFile = previous_api(_flush_file) * * def _close_file(self): # <<<<<<<<<<<<<< * # Close the file * H5Fclose( self.file_id ) */ static PyObject *__pyx_pf_6tables_13hdf5extension_4File_14_close_file(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_close_file", 0); /* "tables/hdf5extension.pyx":591 * def _close_file(self): * # Close the file * H5Fclose( self.file_id ) # <<<<<<<<<<<<<< * self.file_id = 0 # Means file closed * */ H5Fclose(__pyx_v_self->file_id); /* "tables/hdf5extension.pyx":592 * # Close the file * H5Fclose( self.file_id ) * self.file_id = 0 # Means file closed # <<<<<<<<<<<<<< * * _closeFile = previous_api(_close_file) */ __pyx_v_self->file_id = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6tables_13hdf5extension_4File_17__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6tables_13hdf5extension_4File_17__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6tables_13hdf5extension_4File_16__dealloc__(((struct __pyx_obj_6tables_13hdf5extension_File *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "tables/hdf5extension.pyx":598 * # This method is moved out of scope, until we provide code to delete * # the memory booked by this extension types * def __dealloc__(self): # <<<<<<<<<<<<<< * cdef int ret * if self.file_id > 0: */ static void __pyx_pf_6tables_13hdf5extension_4File_16__dealloc__(struct __pyx_obj_6tables_13hdf5extension_File *__pyx_v_self) { int __pyx_v_ret; __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("__dealloc__", 0); /* "tables/hdf5extension.pyx":600 * def __dealloc__(self): * cdef int ret * if self.file_id > 0: # <<<<<<<<<<<<<< * # Close the HDF5 file because user didn't do that! * ret = H5Fclose(self.file_id) */ __pyx_t_1 = (__pyx_v_self->file_id > 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":602 * if self.file_id > 0: * # Close the HDF5 file because user didn't do that! * ret = H5Fclose(self.file_id) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Problems closing the file '%s'" % self.name) */ __pyx_v_ret = H5Fclose(__pyx_v_self->file_id); /* "tables/hdf5extension.pyx":603 * # Close the HDF5 file because user didn't do that! * ret = H5Fclose(self.file_id) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems closing the file '%s'" % self.name) * */ __pyx_t_1 = (__pyx_v_ret < 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":604 * ret = H5Fclose(self.file_id) * if ret < 0: * raise HDF5ExtError("Problems closing the file '%s'" % self.name) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_51), __pyx_v_self->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__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 = 604; __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; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.hdf5extension.File.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_12AttributeSet_1_g_new(PyObject *__pyx_v_self, PyObject *__pyx_v_node); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_12AttributeSet_1_g_new(PyObject *__pyx_v_self, PyObject *__pyx_v_node) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_new (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_12AttributeSet__g_new(((struct __pyx_obj_6tables_13hdf5extension_AttributeSet *)__pyx_v_self), ((PyObject *)__pyx_v_node)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":610 * cdef object name * * def _g_new(self, node): # <<<<<<<<<<<<<< * self.name = node._v_name * */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet__g_new(struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node) { 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("_g_new", 0); /* "tables/hdf5extension.pyx":611 * * def _g_new(self, node): * self.name = node._v_name # <<<<<<<<<<<<<< * * def _g_list_attr(self, node): */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_node, __pyx_n_s___v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __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_AddTraceback("tables.hdf5extension.AttributeSet._g_new", __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_13hdf5extension_12AttributeSet_3_g_list_attr(PyObject *__pyx_v_self, PyObject *__pyx_v_node); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_12AttributeSet_2_g_list_attr[] = "Return a tuple with the attribute list"; static PyObject *__pyx_pw_6tables_13hdf5extension_12AttributeSet_3_g_list_attr(PyObject *__pyx_v_self, PyObject *__pyx_v_node) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_list_attr (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_12AttributeSet_2_g_list_attr(((struct __pyx_obj_6tables_13hdf5extension_AttributeSet *)__pyx_v_self), ((PyObject *)__pyx_v_node)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":613 * self.name = node._v_name * * def _g_list_attr(self, node): # <<<<<<<<<<<<<< * "Return a tuple with the attribute list" * a = Aiterate(node._v_objectid) */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet_2_g_list_attr(CYTHON_UNUSED struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node) { PyObject *__pyx_v_a = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; hid_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_list_attr", 0); /* "tables/hdf5extension.pyx":615 * def _g_list_attr(self, node): * "Return a tuple with the attribute list" * a = Aiterate(node._v_objectid) # <<<<<<<<<<<<<< * return a * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_node, __pyx_n_s___v_objectid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = Aiterate(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_a = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":616 * "Return a tuple with the attribute list" * a = Aiterate(node._v_objectid) * return a # <<<<<<<<<<<<<< * * _g_listAttr = previous_api(_g_list_attr) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_a); __pyx_r = __pyx_v_a; 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.hdf5extension.AttributeSet._g_list_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_a); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_12AttributeSet_5_g_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_12AttributeSet_4_g_setattr[] = "Save Python or NumPy objects as HDF5 attributes.\n\n Scalar Python objects, scalar NumPy & 0-dim NumPy objects will all be\n saved as H5T_SCALAR type. N-dim NumPy objects will be saved as H5T_ARRAY\n type.\n\n "; static PyObject *__pyx_pw_6tables_13hdf5extension_12AttributeSet_5_g_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_node = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_setattr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__node,&__pyx_n_s__name,&__pyx_n_s__value,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__node)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_setattr", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_setattr", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_setattr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __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_node = values[0]; __pyx_v_name = values[1]; __pyx_v_value = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_setattr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.AttributeSet._g_setattr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_12AttributeSet_4_g_setattr(((struct __pyx_obj_6tables_13hdf5extension_AttributeSet *)__pyx_v_self), __pyx_v_node, __pyx_v_name, __pyx_v_value); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":620 * _g_listAttr = previous_api(_g_list_attr) * * def _g_setattr(self, node, name, object value): # <<<<<<<<<<<<<< * """Save Python or NumPy objects as HDF5 attributes. * */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet_4_g_setattr(struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { int __pyx_v_ret; hid_t __pyx_v_dset_id; hid_t __pyx_v_type_id; hsize_t *__pyx_v_dims; PyArrayObject *__pyx_v_ndv = 0; PyObject *__pyx_v_byteorder = 0; PyObject *__pyx_v_rabyteorder = 0; PyObject *__pyx_v_baseatom = 0; char *__pyx_v_cname; PyObject *__pyx_v_encoded_name = 0; int __pyx_v_cset; PyObject *__pyx_v_description = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; hid_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); Py_ssize_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_setattr", 0); __Pyx_INCREF(__pyx_v_value); /* "tables/hdf5extension.pyx":634 * cdef ndarray ndv * cdef object byteorder, rabyteorder, baseatom * cdef char* cname = NULL # <<<<<<<<<<<<<< * cdef bytes encoded_name * cdef int cset = H5T_CSET_DEFAULT */ __pyx_v_cname = NULL; /* "tables/hdf5extension.pyx":636 * cdef char* cname = NULL * cdef bytes encoded_name * cdef int cset = H5T_CSET_DEFAULT # <<<<<<<<<<<<<< * * encoded_name = name.encode('utf-8') */ __pyx_v_cset = __pyx_v_6tables_13hdf5extension_H5T_CSET_DEFAULT; /* "tables/hdf5extension.pyx":638 * cdef int cset = H5T_CSET_DEFAULT * * encoded_name = name.encode('utf-8') # <<<<<<<<<<<<<< * # get the C pointer * cname = encoded_name */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_name, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __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 = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":640 * encoded_name = name.encode('utf-8') * # get the C pointer * cname = encoded_name # <<<<<<<<<<<<<< * * # The dataset id of the node */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cname = __pyx_t_3; /* "tables/hdf5extension.pyx":643 * * # The dataset id of the node * dset_id = node._v_objectid # <<<<<<<<<<<<<< * * # Convert a NumPy scalar into a NumPy 0-dim ndarray */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_node, __pyx_n_s___v_objectid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dset_id = __pyx_t_4; /* "tables/hdf5extension.pyx":646 * * # Convert a NumPy scalar into a NumPy 0-dim ndarray * if isinstance(value, numpy.generic): # <<<<<<<<<<<<<< * value = numpy.array(value) * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); 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_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__generic); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyObject_IsInstance(__pyx_v_value, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "tables/hdf5extension.pyx":647 * # Convert a NumPy scalar into a NumPy 0-dim ndarray * if isinstance(value, numpy.generic): * value = numpy.array(value) # <<<<<<<<<<<<<< * * # Check if value is a NumPy ndarray and of a supported type */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __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(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __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_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_v_value); __pyx_v_value = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":650 * * # Check if value is a NumPy ndarray and of a supported type * if (isinstance(value, numpy.ndarray) and # <<<<<<<<<<<<<< * value.dtype.kind in ('V', 'S', 'b', 'i', 'u', 'f', 'c')): * # get a contiguous array: fixes #270 and gh-176 */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ndarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = PyObject_IsInstance(__pyx_v_value, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "tables/hdf5extension.pyx":651 * # Check if value is a NumPy ndarray and of a supported type * if (isinstance(value, numpy.ndarray) and * value.dtype.kind in ('V', 'S', 'b', 'i', 'u', 'f', 'c')): # <<<<<<<<<<<<<< * # get a contiguous array: fixes #270 and gh-176 * #value = numpy.ascontiguousarray(value) */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__kind); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__V), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!((int)__pyx_t_7)) { __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__S), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __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 = 651; __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_7); } if (!__pyx_t_9) { __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__b), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = ((int)__pyx_t_7); } else { __pyx_t_8 = __pyx_t_9; } if (!__pyx_t_8) { __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__i), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = ((int)__pyx_t_9); } else { __pyx_t_7 = __pyx_t_8; } if (!__pyx_t_7) { __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__u), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __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 = 651; __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 = __pyx_t_7; } if (!__pyx_t_9) { __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__f), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = ((int)__pyx_t_7); } else { __pyx_t_8 = __pyx_t_9; } if (!__pyx_t_8) { __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__c), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = ((int)__pyx_t_9); } else { __pyx_t_7 = __pyx_t_8; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __pyx_t_7; __pyx_t_7 = __pyx_t_8; } else { __pyx_t_7 = __pyx_t_5; } if (__pyx_t_7) { /* "tables/hdf5extension.pyx":654 * # get a contiguous array: fixes #270 and gh-176 * #value = numpy.ascontiguousarray(value) * value = value.copy() # <<<<<<<<<<<<<< * if value.dtype.kind == 'V': * description, rabyteorder = descr_from_dtype(value.dtype) */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_v_value); __pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":655 * #value = numpy.ascontiguousarray(value) * value = value.copy() * if value.dtype.kind == 'V': # <<<<<<<<<<<<<< * description, rabyteorder = descr_from_dtype(value.dtype) * byteorder = byteorders[rabyteorder] */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__kind); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__V), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "tables/hdf5extension.pyx":656 * value = value.copy() * if value.dtype.kind == 'V': * description, rabyteorder = descr_from_dtype(value.dtype) # <<<<<<<<<<<<<< * byteorder = byteorders[rabyteorder] * type_id = create_nested_type(description, byteorder) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__descr_from_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __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); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __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_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #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 = 656; __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 = 656; __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 = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_1 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __pyx_v_description = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_rabyteorder = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":657 * if value.dtype.kind == 'V': * description, rabyteorder = descr_from_dtype(value.dtype) * byteorder = byteorders[rabyteorder] # <<<<<<<<<<<<<< * type_id = create_nested_type(description, byteorder) * else: */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__byteorders); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_GetItem(__pyx_t_6, __pyx_v_rabyteorder); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_byteorder = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":658 * description, rabyteorder = descr_from_dtype(value.dtype) * byteorder = byteorders[rabyteorder] * type_id = create_nested_type(description, byteorder) # <<<<<<<<<<<<<< * else: * # Get the associated native HDF5 type of the scalar type */ __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 = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_description); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_description); __Pyx_GIVEREF(__pyx_v_description); __Pyx_INCREF(__pyx_v_byteorder); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_byteorder); __Pyx_GIVEREF(__pyx_v_byteorder); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __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_6)); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_type_id = __pyx_t_4; goto __pyx_L5; } /*else*/ { /* "tables/hdf5extension.pyx":661 * else: * # Get the associated native HDF5 type of the scalar type * baseatom = Atom.from_dtype(value.dtype.base) # <<<<<<<<<<<<<< * byteorder = byteorders[value.dtype.byteorder] * type_id = atom_to_hdf5_type(baseatom, byteorder) */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Atom); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__from_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__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 = 661; __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_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_baseatom = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":662 * # Get the associated native HDF5 type of the scalar type * baseatom = Atom.from_dtype(value.dtype.base) * byteorder = byteorders[value.dtype.byteorder] # <<<<<<<<<<<<<< * type_id = atom_to_hdf5_type(baseatom, byteorder) * # Get dimensionality info */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__byteorders); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__dtype); 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_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__byteorder); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_6); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __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_6); __pyx_t_6 = 0; __pyx_v_byteorder = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":663 * baseatom = Atom.from_dtype(value.dtype.base) * byteorder = byteorders[value.dtype.byteorder] * type_id = atom_to_hdf5_type(baseatom, byteorder) # <<<<<<<<<<<<<< * # Get dimensionality info * ndv = value */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__atom_to_hdf5_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(2); 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_INCREF(__pyx_v_baseatom); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_baseatom); __Pyx_GIVEREF(__pyx_v_baseatom); __Pyx_INCREF(__pyx_v_byteorder); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_byteorder); __Pyx_GIVEREF(__pyx_v_byteorder); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __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_6)); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_type_id = __pyx_t_4; } __pyx_L5:; /* "tables/hdf5extension.pyx":665 * type_id = atom_to_hdf5_type(baseatom, byteorder) * # Get dimensionality info * ndv = value # <<<<<<<<<<<<<< * dims = npy_malloc_dims(ndv.ndim, ndv.shape) * # Actually write the attribute */ __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_value))); __pyx_v_ndv = ((PyArrayObject *)__pyx_v_value); /* "tables/hdf5extension.pyx":666 * # Get dimensionality info * ndv = value * dims = npy_malloc_dims(ndv.ndim, ndv.shape) # <<<<<<<<<<<<<< * # Actually write the attribute * ret = H5ATTRset_attribute(dset_id, cname, type_id, */ __pyx_v_dims = __pyx_f_6tables_13hdf5extension_npy_malloc_dims(__pyx_v_ndv->nd, __pyx_v_ndv->dimensions); /* "tables/hdf5extension.pyx":669 * # Actually write the attribute * ret = H5ATTRset_attribute(dset_id, cname, type_id, * ndv.ndim, dims, ndv.data) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in node:\n %s." % */ __pyx_v_ret = H5ATTRset_attribute(__pyx_v_dset_id, __pyx_v_cname, __pyx_v_type_id, __pyx_v_ndv->nd, __pyx_v_dims, __pyx_v_ndv->data); /* "tables/hdf5extension.pyx":670 * ret = H5ATTRset_attribute(dset_id, cname, type_id, * ndv.ndim, dims, ndv.data) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't set attribute '%s' in node:\n %s." % * (name, self._v_node)) */ __pyx_t_7 = (__pyx_v_ret < 0); if (__pyx_t_7) { /* "tables/hdf5extension.pyx":671 * ndv.ndim, dims, ndv.data) * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in node:\n %s." % # <<<<<<<<<<<<<< * (name, self._v_node)) * # Release resources */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "tables/hdf5extension.pyx":672 * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in node:\n %s." % * (name, self._v_node)) # <<<<<<<<<<<<<< * # Release resources * free(dims) */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_node); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_54), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __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 = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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 = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "tables/hdf5extension.pyx":674 * (name, self._v_node)) * # Release resources * free(dims) # <<<<<<<<<<<<<< * H5Tclose(type_id) * else: */ free(((void *)__pyx_v_dims)); /* "tables/hdf5extension.pyx":675 * # Release resources * free(dims) * H5Tclose(type_id) # <<<<<<<<<<<<<< * else: * # Object cannot be natively represented in HDF5. */ H5Tclose(__pyx_v_type_id); goto __pyx_L4; } /*else*/ { /* "tables/hdf5extension.pyx":678 * else: * # Object cannot be natively represented in HDF5. * if (isinstance(value, numpy.ndarray) and # <<<<<<<<<<<<<< * value.dtype.kind == 'U' and * value.shape == ()): */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ndarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { /* "tables/hdf5extension.pyx":679 * # Object cannot be natively represented in HDF5. * if (isinstance(value, numpy.ndarray) and * value.dtype.kind == 'U' and # <<<<<<<<<<<<<< * value.shape == ()): * value = value[()].encode('utf-8') */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__kind); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__U), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "tables/hdf5extension.pyx":680 * if (isinstance(value, numpy.ndarray) and * value.dtype.kind == 'U' and * value.shape == ()): # <<<<<<<<<<<<<< * value = value[()].encode('utf-8') * cset = H5T_CSET_UTF8 */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = __pyx_t_8; } else { __pyx_t_9 = __pyx_t_5; } __pyx_t_5 = __pyx_t_9; } else { __pyx_t_5 = __pyx_t_7; } if (__pyx_t_5) { /* "tables/hdf5extension.pyx":681 * value.dtype.kind == 'U' and * value.shape == ()): * value = value[()].encode('utf-8') # <<<<<<<<<<<<<< * cset = H5T_CSET_UTF8 * else: */ __pyx_t_6 = PyObject_GetItem(__pyx_v_value, ((PyObject *)__pyx_empty_tuple)); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_v_value); __pyx_v_value = __pyx_t_6; __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":682 * value.shape == ()): * value = value[()].encode('utf-8') * cset = H5T_CSET_UTF8 # <<<<<<<<<<<<<< * else: * # Convert this object to a null-terminated string */ __pyx_v_cset = H5T_CSET_UTF8; goto __pyx_L9; } /*else*/ { /* "tables/hdf5extension.pyx":686 * # Convert this object to a null-terminated string * # (binary pickles are not supported at this moment) * value = pickle.dumps(value, 0) # <<<<<<<<<<<<<< * * ret = H5ATTRset_attribute_string(dset_id, cname, value, len(value), cset) */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__pickle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__dumps); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __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 = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __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_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_v_value); __pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L9:; /* "tables/hdf5extension.pyx":688 * value = pickle.dumps(value, 0) * * ret = H5ATTRset_attribute_string(dset_id, cname, value, len(value), cset) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in node:\n %s." % */ __pyx_t_3 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = H5ATTRset_attribute_string(__pyx_v_dset_id, __pyx_v_cname, __pyx_t_3, __pyx_t_12, __pyx_v_cset); /* "tables/hdf5extension.pyx":689 * * ret = H5ATTRset_attribute_string(dset_id, cname, value, len(value), cset) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't set attribute '%s' in node:\n %s." % * (name, self._v_node)) */ __pyx_t_5 = (__pyx_v_ret < 0); if (__pyx_t_5) { /* "tables/hdf5extension.pyx":690 * ret = H5ATTRset_attribute_string(dset_id, cname, value, len(value), cset) * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in node:\n %s." % # <<<<<<<<<<<<<< * (name, self._v_node)) * */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "tables/hdf5extension.pyx":691 * if ret < 0: * raise HDF5ExtError("Can't set attribute '%s' in node:\n %s." % * (name, self._v_node)) # <<<<<<<<<<<<<< * * _g_setAttr = previous_api(_g_setattr) */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_node); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_54), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __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 = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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 = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; } __pyx_L4:; __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_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("tables.hdf5extension.AttributeSet._g_setattr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ndv); __Pyx_XDECREF(__pyx_v_byteorder); __Pyx_XDECREF(__pyx_v_rabyteorder); __Pyx_XDECREF(__pyx_v_baseatom); __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XDECREF(__pyx_v_description); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_12AttributeSet_7_g_getattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_12AttributeSet_6_g_getattr[] = "Get HDF5 attributes and retrieve them as NumPy objects.\n\n H5T_SCALAR types will be retrieved as scalar NumPy.\n H5T_ARRAY types will be retrieved as ndarray NumPy objects.\n\n "; static PyObject *__pyx_pw_6tables_13hdf5extension_12AttributeSet_7_g_getattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_node = 0; PyObject *__pyx_v_attrname = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_getattr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__node,&__pyx_n_s__attrname,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__node)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__attrname)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_getattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_getattr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __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_node = values[0]; __pyx_v_attrname = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_getattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.AttributeSet._g_getattr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_12AttributeSet_6_g_getattr(((struct __pyx_obj_6tables_13hdf5extension_AttributeSet *)__pyx_v_self), __pyx_v_node, __pyx_v_attrname); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":696 * * # Get attributes * def _g_getattr(self, node, attrname): # <<<<<<<<<<<<<< * """Get HDF5 attributes and retrieve them as NumPy objects. * */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet_6_g_getattr(struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_attrname) { hsize_t *__pyx_v_dims; enum H5T_class_t __pyx_v_class_id; size_t __pyx_v_type_size; hid_t __pyx_v_dset_id; hid_t __pyx_v_type_id; int __pyx_v_rank; int __pyx_v_ret; void *__pyx_v_rbuf; char *__pyx_v_str_value; char **__pyx_v_str_values; PyArrayObject *__pyx_v_ndvalue = 0; PyObject *__pyx_v_shape = 0; PyObject *__pyx_v_retvalue = 0; int __pyx_v_i; int __pyx_v_nelements; char *__pyx_v_cattrname; PyObject *__pyx_v_encoded_attrname = 0; int __pyx_v_cset; PyObject *__pyx_v_dtype_ = NULL; PyObject *__pyx_v_stype_ = NULL; PyObject *__pyx_v_shape_ = NULL; hid_t __pyx_v_native_type_id; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; hid_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; enum H5T_class_t __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); int __pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; int __pyx_t_19; PyObject *__pyx_t_20 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_getattr", 0); /* "tables/hdf5extension.pyx":710 * cdef int rank, ret, enumtype * cdef void *rbuf * cdef char *str_value, **str_values = NULL # <<<<<<<<<<<<<< * cdef ndarray ndvalue * cdef object shape, stype_atom, shape_atom, retvalue */ __pyx_v_str_values = NULL; /* "tables/hdf5extension.pyx":714 * cdef object shape, stype_atom, shape_atom, retvalue * cdef int i, nelements * cdef char* cattrname = NULL # <<<<<<<<<<<<<< * cdef bytes encoded_attrname * cdef int cset = H5T_CSET_DEFAULT */ __pyx_v_cattrname = NULL; /* "tables/hdf5extension.pyx":716 * cdef char* cattrname = NULL * cdef bytes encoded_attrname * cdef int cset = H5T_CSET_DEFAULT # <<<<<<<<<<<<<< * * encoded_attrname = attrname.encode('utf-8') */ __pyx_v_cset = __pyx_v_6tables_13hdf5extension_H5T_CSET_DEFAULT; /* "tables/hdf5extension.pyx":718 * cdef int cset = H5T_CSET_DEFAULT * * encoded_attrname = attrname.encode('utf-8') # <<<<<<<<<<<<<< * # Get the C pointer * cattrname = encoded_attrname */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_attrname, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_56), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __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 = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_attrname = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":720 * encoded_attrname = attrname.encode('utf-8') * # Get the C pointer * cattrname = encoded_attrname # <<<<<<<<<<<<<< * * # The dataset id of the node */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_attrname)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cattrname = __pyx_t_3; /* "tables/hdf5extension.pyx":723 * * # The dataset id of the node * dset_id = node._v_objectid # <<<<<<<<<<<<<< * dims = NULL * */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_node, __pyx_n_s___v_objectid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dset_id = __pyx_t_4; /* "tables/hdf5extension.pyx":724 * # The dataset id of the node * dset_id = node._v_objectid * dims = NULL # <<<<<<<<<<<<<< * * ret = H5ATTRget_type_ndims(dset_id, cattrname, &type_id, &class_id, */ __pyx_v_dims = NULL; /* "tables/hdf5extension.pyx":727 * * ret = H5ATTRget_type_ndims(dset_id, cattrname, &type_id, &class_id, * &type_size, &rank ) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't get type info on attribute %s in node %s." % */ __pyx_v_ret = H5ATTRget_type_ndims(__pyx_v_dset_id, __pyx_v_cattrname, (&__pyx_v_type_id), (&__pyx_v_class_id), (&__pyx_v_type_size), (&__pyx_v_rank)); /* "tables/hdf5extension.pyx":728 * ret = H5ATTRget_type_ndims(dset_id, cattrname, &type_id, &class_id, * &type_size, &rank ) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't get type info on attribute %s in node %s." % * (attrname, self.name)) */ __pyx_t_5 = (__pyx_v_ret < 0); if (__pyx_t_5) { /* "tables/hdf5extension.pyx":729 * &type_size, &rank ) * if ret < 0: * raise HDF5ExtError("Can't get type info on attribute %s in node %s." % # <<<<<<<<<<<<<< * (attrname, self.name)) * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); 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); /* "tables/hdf5extension.pyx":730 * if ret < 0: * raise HDF5ExtError("Can't get type info on attribute %s in node %s." % * (attrname, self.name)) # <<<<<<<<<<<<<< * * # Call a fast function for scalar values and typical class types */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_attrname); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attrname); __Pyx_GIVEREF(__pyx_v_attrname); __Pyx_INCREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_57), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __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 = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 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 = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":733 * * # Call a fast function for scalar values and typical class types * if (rank == 0 and class_id == H5T_STRING): # <<<<<<<<<<<<<< * type_size = H5ATTRget_attribute_string(dset_id, cattrname, &str_value, * &cset) */ __pyx_t_5 = (__pyx_v_rank == 0); if (__pyx_t_5) { __pyx_t_7 = (__pyx_v_class_id == H5T_STRING); __pyx_t_8 = __pyx_t_7; } else { __pyx_t_8 = __pyx_t_5; } if (__pyx_t_8) { /* "tables/hdf5extension.pyx":735 * if (rank == 0 and class_id == H5T_STRING): * type_size = H5ATTRget_attribute_string(dset_id, cattrname, &str_value, * &cset) # <<<<<<<<<<<<<< * if type_size == 0: * raise HDF5ExtError("Can't read attribute %s in node %s." % */ __pyx_v_type_size = H5ATTRget_attribute_string(__pyx_v_dset_id, __pyx_v_cattrname, (&__pyx_v_str_value), (&__pyx_v_cset)); /* "tables/hdf5extension.pyx":736 * type_size = H5ATTRget_attribute_string(dset_id, cattrname, &str_value, * &cset) * if type_size == 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't read attribute %s in node %s." % * (attrname, self.name)) */ __pyx_t_8 = (__pyx_v_type_size == 0); if (__pyx_t_8) { /* "tables/hdf5extension.pyx":737 * &cset) * if type_size == 0: * raise HDF5ExtError("Can't read attribute %s in node %s." % # <<<<<<<<<<<<<< * (attrname, self.name)) * if cset == H5T_CSET_UTF8: */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "tables/hdf5extension.pyx":738 * if type_size == 0: * raise HDF5ExtError("Can't read attribute %s in node %s." % * (attrname, self.name)) # <<<<<<<<<<<<<< * if cset == H5T_CSET_UTF8: * retvalue = PyUnicode_DecodeUTF8(str_value, strlen(str_value), NULL) */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_attrname); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attrname); __Pyx_GIVEREF(__pyx_v_attrname); __Pyx_INCREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_58), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __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 = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), 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_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__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 = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "tables/hdf5extension.pyx":739 * raise HDF5ExtError("Can't read attribute %s in node %s." % * (attrname, self.name)) * if cset == H5T_CSET_UTF8: # <<<<<<<<<<<<<< * retvalue = PyUnicode_DecodeUTF8(str_value, strlen(str_value), NULL) * retvalue = numpy.unicode_(retvalue) */ __pyx_t_8 = (__pyx_v_cset == H5T_CSET_UTF8); if (__pyx_t_8) { /* "tables/hdf5extension.pyx":740 * (attrname, self.name)) * if cset == H5T_CSET_UTF8: * retvalue = PyUnicode_DecodeUTF8(str_value, strlen(str_value), NULL) # <<<<<<<<<<<<<< * retvalue = numpy.unicode_(retvalue) * else: */ __pyx_t_2 = PyUnicode_DecodeUTF8(__pyx_v_str_value, strlen(__pyx_v_str_value), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_retvalue = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":741 * if cset == H5T_CSET_UTF8: * retvalue = PyUnicode_DecodeUTF8(str_value, strlen(str_value), NULL) * retvalue = numpy.unicode_(retvalue) # <<<<<<<<<<<<<< * else: * retvalue = PyBytes_FromStringAndSize(str_value, type_size) */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__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 = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_retvalue); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_retvalue); __Pyx_GIVEREF(__pyx_v_retvalue); __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_v_retvalue); __pyx_v_retvalue = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L6; } /*else*/ { /* "tables/hdf5extension.pyx":743 * retvalue = numpy.unicode_(retvalue) * else: * retvalue = PyBytes_FromStringAndSize(str_value, type_size) # <<<<<<<<<<<<<< * # AV: oct 2012 * # since now we use the string size got form HDF5 we have to strip */ __pyx_t_6 = ((PyObject *)PyBytes_FromStringAndSize(__pyx_v_str_value, __pyx_v_type_size)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_v_retvalue = __pyx_t_6; __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":751 * # strlen(attr_value) is the actual length of the attibute * # and numpy.bytes_(attr_value) can give a truncated pickle sting * retvalue = retvalue.rstrip(b'\x00') # <<<<<<<<<<<<<< * retvalue = numpy.bytes_(retvalue) # bytes * # Important to release attr_value, because it has been malloc'ed! */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_retvalue, __pyx_n_s__rstrip); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_v_retvalue); __pyx_v_retvalue = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":752 * # and numpy.bytes_(attr_value) can give a truncated pickle sting * retvalue = retvalue.rstrip(b'\x00') * retvalue = numpy.bytes_(retvalue) # bytes # <<<<<<<<<<<<<< * # Important to release attr_value, because it has been malloc'ed! * if str_value: */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__bytes_); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__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 = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_retvalue); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_retvalue); __Pyx_GIVEREF(__pyx_v_retvalue); __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_v_retvalue); __pyx_v_retvalue = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L6:; /* "tables/hdf5extension.pyx":754 * retvalue = numpy.bytes_(retvalue) # bytes * # Important to release attr_value, because it has been malloc'ed! * if str_value: # <<<<<<<<<<<<<< * free(str_value) * H5Tclose(type_id) */ __pyx_t_8 = (__pyx_v_str_value != 0); if (__pyx_t_8) { /* "tables/hdf5extension.pyx":755 * # Important to release attr_value, because it has been malloc'ed! * if str_value: * free(str_value) # <<<<<<<<<<<<<< * H5Tclose(type_id) * return retvalue */ free(__pyx_v_str_value); goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":756 * if str_value: * free(str_value) * H5Tclose(type_id) # <<<<<<<<<<<<<< * return retvalue * elif (rank == 0 and class_id in (H5T_BITFIELD, H5T_INTEGER, H5T_FLOAT)): */ H5Tclose(__pyx_v_type_id); /* "tables/hdf5extension.pyx":757 * free(str_value) * H5Tclose(type_id) * return retvalue # <<<<<<<<<<<<<< * elif (rank == 0 and class_id in (H5T_BITFIELD, H5T_INTEGER, H5T_FLOAT)): * dtype_ = get_dtype_scalar(type_id, class_id, type_size) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_retvalue); __pyx_r = __pyx_v_retvalue; goto __pyx_L0; goto __pyx_L4; } /* "tables/hdf5extension.pyx":758 * H5Tclose(type_id) * return retvalue * elif (rank == 0 and class_id in (H5T_BITFIELD, H5T_INTEGER, H5T_FLOAT)): # <<<<<<<<<<<<<< * dtype_ = get_dtype_scalar(type_id, class_id, type_size) * if dtype_ is None: */ __pyx_t_8 = (__pyx_v_rank == 0); if (__pyx_t_8) { __pyx_t_9 = __pyx_v_class_id; __pyx_t_5 = ((int)(__pyx_t_9 == H5T_BITFIELD)); if (!__pyx_t_5) { __pyx_t_7 = ((int)(__pyx_t_9 == H5T_INTEGER)); __pyx_t_10 = __pyx_t_7; } else { __pyx_t_10 = __pyx_t_5; } if (!__pyx_t_10) { __pyx_t_5 = ((int)(__pyx_t_9 == H5T_FLOAT)); __pyx_t_7 = __pyx_t_5; } else { __pyx_t_7 = __pyx_t_10; } __pyx_t_10 = __pyx_t_7; __pyx_t_7 = __pyx_t_10; } else { __pyx_t_7 = __pyx_t_8; } if (__pyx_t_7) { /* "tables/hdf5extension.pyx":759 * return retvalue * elif (rank == 0 and class_id in (H5T_BITFIELD, H5T_INTEGER, H5T_FLOAT)): * dtype_ = get_dtype_scalar(type_id, class_id, type_size) # <<<<<<<<<<<<<< * if dtype_ is None: * warnings.warn("Unsupported type for attribute '%s' in node '%s'. " */ __pyx_t_1 = __pyx_f_6tables_13hdf5extension_get_dtype_scalar(__pyx_v_type_id, __pyx_v_class_id, __pyx_v_type_size); 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_v_dtype_ = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":760 * elif (rank == 0 and class_id in (H5T_BITFIELD, H5T_INTEGER, H5T_FLOAT)): * dtype_ = get_dtype_scalar(type_id, class_id, type_size) * if dtype_ is None: # <<<<<<<<<<<<<< * warnings.warn("Unsupported type for attribute '%s' in node '%s'. " * "Offending HDF5 class: %d" % (attrname, self.name, */ __pyx_t_7 = (__pyx_v_dtype_ == Py_None); if (__pyx_t_7) { /* "tables/hdf5extension.pyx":761 * dtype_ = get_dtype_scalar(type_id, class_id, type_size) * if dtype_ is None: * warnings.warn("Unsupported type for attribute '%s' in node '%s'. " # <<<<<<<<<<<<<< * "Offending HDF5 class: %d" % (attrname, self.name, * class_id), DataTypeWarning) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__warnings); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__warn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":763 * warnings.warn("Unsupported type for attribute '%s' in node '%s'. " * "Offending HDF5 class: %d" % (attrname, self.name, * class_id), DataTypeWarning) # <<<<<<<<<<<<<< * self._v_unimplemented.append(attrname) * return None */ __pyx_t_1 = PyInt_FromLong(__pyx_v_class_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_attrname); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_attrname); __Pyx_GIVEREF(__pyx_v_attrname); __Pyx_INCREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_60), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DataTypeWarning); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":764 * "Offending HDF5 class: %d" % (attrname, self.name, * class_id), DataTypeWarning) * self._v_unimplemented.append(attrname) # <<<<<<<<<<<<<< * return None * shape = () */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_unimplemented); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_attrname); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __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_11); __pyx_t_11 = 0; /* "tables/hdf5extension.pyx":765 * class_id), DataTypeWarning) * self._v_unimplemented.append(attrname) * return None # <<<<<<<<<<<<<< * shape = () * else: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L8; } __pyx_L8:; /* "tables/hdf5extension.pyx":766 * self._v_unimplemented.append(attrname) * return None * shape = () # <<<<<<<<<<<<<< * else: * # General case */ __Pyx_INCREF(((PyObject *)__pyx_empty_tuple)); __pyx_v_shape = ((PyObject *)__pyx_empty_tuple); goto __pyx_L4; } /*else*/ { /* "tables/hdf5extension.pyx":771 * * # Get the dimensional info * dims = malloc(rank * sizeof(hsize_t)) # <<<<<<<<<<<<<< * ret = H5ATTRget_dims(dset_id, cattrname, dims) * if ret < 0: */ __pyx_v_dims = ((hsize_t *)malloc((__pyx_v_rank * (sizeof(hsize_t))))); /* "tables/hdf5extension.pyx":772 * # Get the dimensional info * dims = malloc(rank * sizeof(hsize_t)) * ret = H5ATTRget_dims(dset_id, cattrname, dims) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't get dims info on attribute %s in node %s." % */ __pyx_v_ret = H5ATTRget_dims(__pyx_v_dset_id, __pyx_v_cattrname, __pyx_v_dims); /* "tables/hdf5extension.pyx":773 * dims = malloc(rank * sizeof(hsize_t)) * ret = H5ATTRget_dims(dset_id, cattrname, dims) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't get dims info on attribute %s in node %s." % * (attrname, self.name)) */ __pyx_t_7 = (__pyx_v_ret < 0); if (__pyx_t_7) { /* "tables/hdf5extension.pyx":774 * ret = H5ATTRget_dims(dset_id, cattrname, dims) * if ret < 0: * raise HDF5ExtError("Can't get dims info on attribute %s in node %s." % # <<<<<<<<<<<<<< * (attrname, self.name)) * shape = getshape(rank, dims) */ __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); /* "tables/hdf5extension.pyx":775 * if ret < 0: * raise HDF5ExtError("Can't get dims info on attribute %s in node %s." % * (attrname, self.name)) # <<<<<<<<<<<<<< * shape = getshape(rank, dims) * # dims is not needed anymore */ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_attrname); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_attrname); __Pyx_GIVEREF(__pyx_v_attrname); __Pyx_INCREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_61), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(((PyObject *)__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 = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 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 = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; /* "tables/hdf5extension.pyx":776 * raise HDF5ExtError("Can't get dims info on attribute %s in node %s." % * (attrname, self.name)) * shape = getshape(rank, dims) # <<<<<<<<<<<<<< * # dims is not needed anymore * free( dims) */ __pyx_t_2 = __pyx_f_6tables_13hdf5extension_getshape(__pyx_v_rank, __pyx_v_dims); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_shape = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":778 * shape = getshape(rank, dims) * # dims is not needed anymore * free( dims) # <<<<<<<<<<<<<< * * # Get the NumPy dtype from the type_id */ free(((void *)__pyx_v_dims)); /* "tables/hdf5extension.pyx":781 * * # Get the NumPy dtype from the type_id * try: # <<<<<<<<<<<<<< * stype_, shape_ = hdf5_to_np_ext_type(type_id, pure_numpy_types=True) * dtype_ = numpy.dtype(stype_, shape_) */ { __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); /*try:*/ { /* "tables/hdf5extension.pyx":782 * # Get the NumPy dtype from the type_id * try: * stype_, shape_ = hdf5_to_np_ext_type(type_id, pure_numpy_types=True) # <<<<<<<<<<<<<< * dtype_ = numpy.dtype(stype_, shape_) * except TypeError: */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__hdf5_to_np_ext_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_to_py_hid_t(__pyx_v_type_id); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 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 = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__pure_numpy_types), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; 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 = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_11 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_11); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_15(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L18_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_11 = __pyx_t_15(__pyx_t_2); if (unlikely(!__pyx_t_11)) goto __pyx_L18_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L19_unpacking_done; __pyx_L18_unpacking_failed:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __pyx_L19_unpacking_done:; } __pyx_v_stype_ = __pyx_t_6; __pyx_t_6 = 0; __pyx_v_shape_ = __pyx_t_11; __pyx_t_11 = 0; /* "tables/hdf5extension.pyx":783 * try: * stype_, shape_ = hdf5_to_np_ext_type(type_id, pure_numpy_types=True) * dtype_ = numpy.dtype(stype_, shape_) # <<<<<<<<<<<<<< * except TypeError: * if class_id == H5T_STRING and H5Tis_variable_str(type_id): */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__dtype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_11); __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 = 783; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_stype_); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_stype_); __Pyx_GIVEREF(__pyx_v_stype_); __Pyx_INCREF(__pyx_v_shape_); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_shape_); __Pyx_GIVEREF(__pyx_v_shape_); __pyx_t_6 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L10_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_dtype_ = __pyx_t_6; __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L17_try_end; __pyx_L10_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":784 * stype_, shape_ = hdf5_to_np_ext_type(type_id, pure_numpy_types=True) * dtype_ = numpy.dtype(stype_, shape_) * except TypeError: # <<<<<<<<<<<<<< * if class_id == H5T_STRING and H5Tis_variable_str(type_id): * nelements = H5ATTRget_attribute_vlen_string_array(dset_id, cattrname, */ __pyx_t_16 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_16) { __Pyx_AddTraceback("tables.hdf5extension.AttributeSet._g_getattr", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_11); /* "tables/hdf5extension.pyx":785 * dtype_ = numpy.dtype(stype_, shape_) * except TypeError: * if class_id == H5T_STRING and H5Tis_variable_str(type_id): # <<<<<<<<<<<<<< * nelements = H5ATTRget_attribute_vlen_string_array(dset_id, cattrname, * &str_values, &cset) */ __pyx_t_7 = (__pyx_v_class_id == H5T_STRING); if (__pyx_t_7) { __pyx_t_8 = H5Tis_variable_str(__pyx_v_type_id); } else { __pyx_t_8 = __pyx_t_7; } if (__pyx_t_8) { /* "tables/hdf5extension.pyx":787 * if class_id == H5T_STRING and H5Tis_variable_str(type_id): * nelements = H5ATTRget_attribute_vlen_string_array(dset_id, cattrname, * &str_values, &cset) # <<<<<<<<<<<<<< * if nelements < 0: * raise HDF5ExtError("Can't read attribute %s in node %s." % */ __pyx_v_nelements = H5ATTRget_attribute_vlen_string_array(__pyx_v_dset_id, __pyx_v_cattrname, (&__pyx_v_str_values), (&__pyx_v_cset)); /* "tables/hdf5extension.pyx":788 * nelements = H5ATTRget_attribute_vlen_string_array(dset_id, cattrname, * &str_values, &cset) * if nelements < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't read attribute %s in node %s." % * (attrname, self.name)) */ __pyx_t_8 = (__pyx_v_nelements < 0); if (__pyx_t_8) { /* "tables/hdf5extension.pyx":789 * &str_values, &cset) * if nelements < 0: * raise HDF5ExtError("Can't read attribute %s in node %s." % # <<<<<<<<<<<<<< * (attrname, self.name)) * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_2); /* "tables/hdf5extension.pyx":790 * if nelements < 0: * raise HDF5ExtError("Can't read attribute %s in node %s." % * (attrname, self.name)) # <<<<<<<<<<<<<< * * # The following generator expressions do not work with Cython 0.15.1 */ __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_v_attrname); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_attrname); __Pyx_GIVEREF(__pyx_v_attrname); __Pyx_INCREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_58), ((PyObject *)__pyx_t_17)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_18)); __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, ((PyObject *)__pyx_t_18)); __Pyx_GIVEREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __Pyx_Raise(__pyx_t_18, 0, 0, 0); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} goto __pyx_L23; } __pyx_L23:; /* "tables/hdf5extension.pyx":793 * * # The following generator expressions do not work with Cython 0.15.1 * if cset == H5T_CSET_UTF8: # <<<<<<<<<<<<<< * #retvalue = numpy.fromiter( * # PyUnicode_DecodeUTF8(str_values[i], */ __pyx_t_8 = (__pyx_v_cset == H5T_CSET_UTF8); if (__pyx_t_8) { /* "tables/hdf5extension.pyx":799 * # NULL) * # for i in range(nelements), "O8") * retvalue = numpy.array([ # <<<<<<<<<<<<<< * PyUnicode_DecodeUTF8(str_values[i], * strlen(str_values[i]), */ __pyx_t_18 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_17 = PyObject_GetAttr(__pyx_t_18, __pyx_n_s__array); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_18); /* "tables/hdf5extension.pyx":803 * strlen(str_values[i]), * NULL) * for i in range(nelements)], "O8") # <<<<<<<<<<<<<< * * else: */ __pyx_t_16 = __pyx_v_nelements; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_16; __pyx_t_19+=1) { __pyx_v_i = __pyx_t_19; /* "tables/hdf5extension.pyx":802 * PyUnicode_DecodeUTF8(str_values[i], * strlen(str_values[i]), * NULL) # <<<<<<<<<<<<<< * for i in range(nelements)], "O8") * */ __pyx_t_2 = PyUnicode_DecodeUTF8(((char *)(__pyx_v_str_values[__pyx_v_i])), strlen(((char *)(__pyx_v_str_values[__pyx_v_i]))), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_t_18)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_18)); __Pyx_GIVEREF(((PyObject *)__pyx_t_18)); __Pyx_INCREF(((PyObject *)__pyx_n_s__O8)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__O8)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O8)); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_retvalue = __pyx_t_18; __pyx_t_18 = 0; goto __pyx_L24; } /*else*/ { /* "tables/hdf5extension.pyx":808 * #retvalue = numpy.fromiter( * # str_values[i] for i in range(nelements), "O8") * retvalue = numpy.array( # <<<<<<<<<<<<<< * [str_values[i] for i in range(nelements)], "O8") * retvalue.shape = shape */ __pyx_t_18 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_2 = PyObject_GetAttr(__pyx_t_18, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "tables/hdf5extension.pyx":809 * # str_values[i] for i in range(nelements), "O8") * retvalue = numpy.array( * [str_values[i] for i in range(nelements)], "O8") # <<<<<<<<<<<<<< * retvalue.shape = shape * */ __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_16 = __pyx_v_nelements; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_16; __pyx_t_19+=1) { __pyx_v_i = __pyx_t_19; __pyx_t_17 = PyBytes_FromString(((char *)(__pyx_v_str_values[__pyx_v_i]))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_17)); if (unlikely(__Pyx_PyList_Append(__pyx_t_18, (PyObject*)__pyx_t_17))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; } __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(((PyObject *)__pyx_t_18)); PyTuple_SET_ITEM(__pyx_t_17, 0, ((PyObject *)__pyx_t_18)); __Pyx_GIVEREF(((PyObject *)__pyx_t_18)); __Pyx_INCREF(((PyObject *)__pyx_n_s__O8)); PyTuple_SET_ITEM(__pyx_t_17, 1, ((PyObject *)__pyx_n_s__O8)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O8)); __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0; __pyx_t_18 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; __pyx_v_retvalue = __pyx_t_18; __pyx_t_18 = 0; } __pyx_L24:; /* "tables/hdf5extension.pyx":810 * retvalue = numpy.array( * [str_values[i] for i in range(nelements)], "O8") * retvalue.shape = shape # <<<<<<<<<<<<<< * * # Important to release attr_value, because it has been malloc'ed! */ if (PyObject_SetAttr(__pyx_v_retvalue, __pyx_n_s__shape, __pyx_v_shape) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} /* "tables/hdf5extension.pyx":813 * * # Important to release attr_value, because it has been malloc'ed! * for i in range(nelements): # <<<<<<<<<<<<<< * free(str_values[i]); * free(str_values) */ __pyx_t_16 = __pyx_v_nelements; for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_16; __pyx_t_19+=1) { __pyx_v_i = __pyx_t_19; /* "tables/hdf5extension.pyx":814 * # Important to release attr_value, because it has been malloc'ed! * for i in range(nelements): * free(str_values[i]); # <<<<<<<<<<<<<< * free(str_values) * */ free((__pyx_v_str_values[__pyx_v_i])); } /* "tables/hdf5extension.pyx":815 * for i in range(nelements): * free(str_values[i]); * free(str_values) # <<<<<<<<<<<<<< * * return retvalue */ free(__pyx_v_str_values); /* "tables/hdf5extension.pyx":817 * free(str_values) * * return retvalue # <<<<<<<<<<<<<< * * # This class is not supported. Instead of raising a TypeError, issue a */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_retvalue); __pyx_r = __pyx_v_retvalue; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L13_except_return; goto __pyx_L22; } __pyx_L22:; /* "tables/hdf5extension.pyx":822 * # warning explaining the problem. This will allow to continue browsing * # native HDF5 files, while informing the user about the problem. * warnings.warn("Unsupported type for attribute '%s' in node '%s'. " # <<<<<<<<<<<<<< * "Offending HDF5 class: %d" % (attrname, self.name, * class_id), DataTypeWarning) */ __pyx_t_18 = __Pyx_GetName(__pyx_m, __pyx_n_s__warnings); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_17 = PyObject_GetAttr(__pyx_t_18, __pyx_n_s__warn); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "tables/hdf5extension.pyx":824 * warnings.warn("Unsupported type for attribute '%s' in node '%s'. " * "Offending HDF5 class: %d" % (attrname, self.name, * class_id), DataTypeWarning) # <<<<<<<<<<<<<< * self._v_unimplemented.append(attrname) * return None */ __pyx_t_18 = PyInt_FromLong(__pyx_v_class_id); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_attrname); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_attrname); __Pyx_GIVEREF(__pyx_v_attrname); __Pyx_INCREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_60), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_18)); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__DataTypeWarning); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_20, 0, ((PyObject *)__pyx_t_18)); __Pyx_GIVEREF(((PyObject *)__pyx_t_18)); PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_18 = 0; __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":825 * "Offending HDF5 class: %d" % (attrname, self.name, * class_id), DataTypeWarning) * self._v_unimplemented.append(attrname) # <<<<<<<<<<<<<< * return None * */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_unimplemented); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_20 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_attrname); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; /* "tables/hdf5extension.pyx":826 * class_id), DataTypeWarning) * self._v_unimplemented.append(attrname) * return None # <<<<<<<<<<<<<< * * # Get the native type (so that it is HDF5 who is the responsible to deal */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L13_except_return; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_exception_handled; } __pyx_L12_except_error:; __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); goto __pyx_L1_error; __pyx_L13_except_return:; __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); goto __pyx_L0; __pyx_L11_exception_handled:; __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); __pyx_L17_try_end:; } } __pyx_L4:; /* "tables/hdf5extension.pyx":830 * # Get the native type (so that it is HDF5 who is the responsible to deal * # with non-native byteorders on-disk) * native_type_id = get_native_type(type_id) # <<<<<<<<<<<<<< * * # Get the container for data */ __pyx_v_native_type_id = __pyx_f_6tables_14utilsextension_get_native_type(__pyx_v_type_id); /* "tables/hdf5extension.pyx":833 * * # Get the container for data * ndvalue = numpy.empty(dtype=dtype_, shape=shape) # <<<<<<<<<<<<<< * # Get the pointer to the buffer data area * rbuf = ndvalue.data */ __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_1 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_11)); if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__dtype), __pyx_v_dtype_) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__shape), __pyx_v_shape) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 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 = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ndvalue = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":835 * ndvalue = numpy.empty(dtype=dtype_, shape=shape) * # Get the pointer to the buffer data area * rbuf = ndvalue.data # <<<<<<<<<<<<<< * # Actually read the attribute from disk * ret = H5ATTRget_attribute(dset_id, cattrname, native_type_id, rbuf) */ __pyx_t_3 = __pyx_v_ndvalue->data; __pyx_v_rbuf = __pyx_t_3; /* "tables/hdf5extension.pyx":837 * rbuf = ndvalue.data * # Actually read the attribute from disk * ret = H5ATTRget_attribute(dset_id, cattrname, native_type_id, rbuf) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Attribute %s exists in node %s, but can't get it." % */ __pyx_v_ret = H5ATTRget_attribute(__pyx_v_dset_id, __pyx_v_cattrname, __pyx_v_native_type_id, __pyx_v_rbuf); /* "tables/hdf5extension.pyx":838 * # Actually read the attribute from disk * ret = H5ATTRget_attribute(dset_id, cattrname, native_type_id, rbuf) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Attribute %s exists in node %s, but can't get it." % * (attrname, self.name)) */ __pyx_t_8 = (__pyx_v_ret < 0); if (__pyx_t_8) { /* "tables/hdf5extension.pyx":839 * ret = H5ATTRget_attribute(dset_id, cattrname, native_type_id, rbuf) * if ret < 0: * raise HDF5ExtError("Attribute %s exists in node %s, but can't get it." % # <<<<<<<<<<<<<< * (attrname, self.name)) * H5Tclose(native_type_id) */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); /* "tables/hdf5extension.pyx":840 * if ret < 0: * raise HDF5ExtError("Attribute %s exists in node %s, but can't get it." % * (attrname, self.name)) # <<<<<<<<<<<<<< * H5Tclose(native_type_id) * H5Tclose(type_id) */ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_attrname); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_attrname); __Pyx_GIVEREF(__pyx_v_attrname); __Pyx_INCREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_62), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __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 = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 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 = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L31; } __pyx_L31:; /* "tables/hdf5extension.pyx":841 * raise HDF5ExtError("Attribute %s exists in node %s, but can't get it." % * (attrname, self.name)) * H5Tclose(native_type_id) # <<<<<<<<<<<<<< * H5Tclose(type_id) * */ H5Tclose(__pyx_v_native_type_id); /* "tables/hdf5extension.pyx":842 * (attrname, self.name)) * H5Tclose(native_type_id) * H5Tclose(type_id) # <<<<<<<<<<<<<< * * if rank > 0: # multidimensional case */ H5Tclose(__pyx_v_type_id); /* "tables/hdf5extension.pyx":844 * H5Tclose(type_id) * * if rank > 0: # multidimensional case # <<<<<<<<<<<<<< * retvalue = ndvalue * else: */ __pyx_t_8 = (__pyx_v_rank > 0); if (__pyx_t_8) { /* "tables/hdf5extension.pyx":845 * * if rank > 0: # multidimensional case * retvalue = ndvalue # <<<<<<<<<<<<<< * else: * retvalue = ndvalue[()] # 0-dim ndarray becomes a NumPy scalar */ __Pyx_INCREF(((PyObject *)__pyx_v_ndvalue)); __pyx_v_retvalue = ((PyObject *)__pyx_v_ndvalue); goto __pyx_L32; } /*else*/ { /* "tables/hdf5extension.pyx":847 * retvalue = ndvalue * else: * retvalue = ndvalue[()] # 0-dim ndarray becomes a NumPy scalar # <<<<<<<<<<<<<< * * return retvalue */ __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_ndvalue), ((PyObject *)__pyx_empty_tuple)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_retvalue = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L32:; /* "tables/hdf5extension.pyx":849 * retvalue = ndvalue[()] # 0-dim ndarray becomes a NumPy scalar * * return retvalue # <<<<<<<<<<<<<< * * _g_getAttr = previous_api(_g_getattr) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_retvalue); __pyx_r = __pyx_v_retvalue; 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_6); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_20); __Pyx_AddTraceback("tables.hdf5extension.AttributeSet._g_getattr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ndvalue); __Pyx_XDECREF(__pyx_v_shape); __Pyx_XDECREF(__pyx_v_retvalue); __Pyx_XDECREF(__pyx_v_encoded_attrname); __Pyx_XDECREF(__pyx_v_dtype_); __Pyx_XDECREF(__pyx_v_stype_); __Pyx_XDECREF(__pyx_v_shape_); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_12AttributeSet_9_g_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_12AttributeSet_9_g_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_node = 0; PyObject *__pyx_v_attrname = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_remove (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__node,&__pyx_n_s__attrname,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__node)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__attrname)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_remove", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_remove") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __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_node = values[0]; __pyx_v_attrname = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_remove", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.AttributeSet._g_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_12AttributeSet_8_g_remove(((struct __pyx_obj_6tables_13hdf5extension_AttributeSet *)__pyx_v_self), __pyx_v_node, __pyx_v_attrname); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":853 * _g_getAttr = previous_api(_g_getattr) * * def _g_remove(self, node, attrname): # <<<<<<<<<<<<<< * cdef int ret * cdef hid_t dset_id */ static PyObject *__pyx_pf_6tables_13hdf5extension_12AttributeSet_8_g_remove(struct __pyx_obj_6tables_13hdf5extension_AttributeSet *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_attrname) { int __pyx_v_ret; hid_t __pyx_v_dset_id; char *__pyx_v_cattrname; PyObject *__pyx_v_encoded_attrname = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; hid_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_remove", 0); /* "tables/hdf5extension.pyx":856 * cdef int ret * cdef hid_t dset_id * cdef char *cattrname = NULL # <<<<<<<<<<<<<< * cdef bytes encoded_attrname * */ __pyx_v_cattrname = NULL; /* "tables/hdf5extension.pyx":859 * cdef bytes encoded_attrname * * encoded_attrname = attrname.encode('utf-8') # <<<<<<<<<<<<<< * # Get the C pointer * cattrname = encoded_attrname */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_attrname, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __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 = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_attrname = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":861 * encoded_attrname = attrname.encode('utf-8') * # Get the C pointer * cattrname = encoded_attrname # <<<<<<<<<<<<<< * * # The dataset id of the node */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_attrname)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cattrname = __pyx_t_3; /* "tables/hdf5extension.pyx":864 * * # The dataset id of the node * dset_id = node._v_objectid # <<<<<<<<<<<<<< * * ret = H5Adelete(dset_id, cattrname) */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_node, __pyx_n_s___v_objectid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dset_id = __pyx_t_4; /* "tables/hdf5extension.pyx":866 * dset_id = node._v_objectid * * ret = H5Adelete(dset_id, cattrname) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Attribute '%s' exists in node '%s', but cannot be " */ __pyx_v_ret = H5Adelete(__pyx_v_dset_id, __pyx_v_cattrname); /* "tables/hdf5extension.pyx":867 * * ret = H5Adelete(dset_id, cattrname) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Attribute '%s' exists in node '%s', but cannot be " * "deleted." % (attrname, self.name)) */ __pyx_t_5 = (__pyx_v_ret < 0); if (__pyx_t_5) { /* "tables/hdf5extension.pyx":868 * ret = H5Adelete(dset_id, cattrname) * if ret < 0: * raise HDF5ExtError("Attribute '%s' exists in node '%s', but cannot be " # <<<<<<<<<<<<<< * "deleted." % (attrname, self.name)) * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "tables/hdf5extension.pyx":869 * if ret < 0: * raise HDF5ExtError("Attribute '%s' exists in node '%s', but cannot be " * "deleted." % (attrname, self.name)) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_attrname); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attrname); __Pyx_GIVEREF(__pyx_v_attrname); __Pyx_INCREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_64), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __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 = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 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 = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __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_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.hdf5extension.AttributeSet._g_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoded_attrname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_4Node_1_g_new(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4Node_1_g_new(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_where = 0; PyObject *__pyx_v_name = 0; CYTHON_UNUSED PyObject *__pyx_v_init = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_new (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__where,&__pyx_n_s__name,&__pyx_n_s__init,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__where)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_new", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__init)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_new", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_new") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __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_where = values[0]; __pyx_v_name = values[1]; __pyx_v_init = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_new", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Node._g_new", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_4Node__g_new(((struct __pyx_obj_6tables_13hdf5extension_Node *)__pyx_v_self), __pyx_v_where, __pyx_v_name, __pyx_v_init); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":875 * # Instance variables declared in .pxd * * def _g_new(self, where, name, init): # <<<<<<<<<<<<<< * self.name = name * # """The name of this node in its parent group.""" */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Node__g_new(struct __pyx_obj_6tables_13hdf5extension_Node *__pyx_v_self, PyObject *__pyx_v_where, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_init) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; hid_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_new", 0); /* "tables/hdf5extension.pyx":876 * * def _g_new(self, where, name, init): * self.name = name # <<<<<<<<<<<<<< * # """The name of this node in its parent group.""" * self.parent_id = where._v_objectid */ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_name; /* "tables/hdf5extension.pyx":878 * self.name = name * # """The name of this node in its parent group.""" * self.parent_id = where._v_objectid # <<<<<<<<<<<<<< * # """The identifier of the parent group.""" * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_where, __pyx_n_s___v_objectid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->parent_id = __pyx_t_2; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("tables.hdf5extension.Node._g_new", __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_13hdf5extension_4Node_3_g_delete(PyObject *__pyx_v_self, PyObject *__pyx_v_parent); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4Node_3_g_delete(PyObject *__pyx_v_self, PyObject *__pyx_v_parent) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_delete (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4Node_2_g_delete(((struct __pyx_obj_6tables_13hdf5extension_Node *)__pyx_v_self), ((PyObject *)__pyx_v_parent)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":881 * # """The identifier of the parent group.""" * * def _g_delete(self, parent): # <<<<<<<<<<<<<< * cdef int ret * cdef bytes encoded_name */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Node_2_g_delete(struct __pyx_obj_6tables_13hdf5extension_Node *__pyx_v_self, PyObject *__pyx_v_parent) { int __pyx_v_ret; PyObject *__pyx_v_encoded_name = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; hid_t __pyx_t_3; char *__pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_delete", 0); /* "tables/hdf5extension.pyx":885 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Delete this node */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->name, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __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 = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":888 * * # Delete this node * ret = H5Ldelete(parent._v_objectid, encoded_name, H5P_DEFAULT) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("problems deleting the node ``%s``" % self.name) */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_s___v_objectid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = H5Ldelete(__pyx_t_3, __pyx_t_4, H5P_DEFAULT); /* "tables/hdf5extension.pyx":889 * # Delete this node * ret = H5Ldelete(parent._v_objectid, encoded_name, H5P_DEFAULT) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("problems deleting the node ``%s``" % self.name) * return ret */ __pyx_t_5 = (__pyx_v_ret < 0); if (__pyx_t_5) { /* "tables/hdf5extension.pyx":890 * ret = H5Ldelete(parent._v_objectid, encoded_name, H5P_DEFAULT) * if ret < 0: * raise HDF5ExtError("problems deleting the node ``%s``" % self.name) # <<<<<<<<<<<<<< * return ret * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_66), __pyx_v_self->name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __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_6)); __pyx_t_6 = 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 = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":891 * if ret < 0: * raise HDF5ExtError("problems deleting the node ``%s``" % self.name) * return ret # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromLong(__pyx_v_ret); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __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_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.hdf5extension.Node._g_delete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6tables_13hdf5extension_4Node_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6tables_13hdf5extension_4Node_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6tables_13hdf5extension_4Node_4__dealloc__(((struct __pyx_obj_6tables_13hdf5extension_Node *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "tables/hdf5extension.pyx":893 * return ret * * def __dealloc__(self): # <<<<<<<<<<<<<< * self.parent_id = 0 * */ static void __pyx_pf_6tables_13hdf5extension_4Node_4__dealloc__(struct __pyx_obj_6tables_13hdf5extension_Node *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "tables/hdf5extension.pyx":894 * * def __dealloc__(self): * self.parent_id = 0 # <<<<<<<<<<<<<< * * */ __pyx_v_self->parent_id = 0; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_1_g_create(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_1_g_create(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_create (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_5Group__g_create(((struct __pyx_obj_6tables_13hdf5extension_Group *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":900 * cdef hid_t group_id * * def _g_create(self): # <<<<<<<<<<<<<< * cdef hid_t ret * cdef bytes encoded_name */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group__g_create(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self) { hid_t __pyx_v_ret; PyObject *__pyx_v_encoded_name = 0; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_create", 0); /* "tables/hdf5extension.pyx":904 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # @TODO: set property list --> utf-8 */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->__pyx_base.name, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __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 = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":909 * * # Create a new group * ret = H5Gcreate(self.parent_id, encoded_name, H5P_DEFAULT, H5P_DEFAULT, # <<<<<<<<<<<<<< * H5P_DEFAULT) * if ret < 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 = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":910 * # Create a new group * ret = H5Gcreate(self.parent_id, encoded_name, H5P_DEFAULT, H5P_DEFAULT, * H5P_DEFAULT) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't create the group %s." % self.name) */ __pyx_v_ret = H5Gcreate(__pyx_v_self->__pyx_base.parent_id, __pyx_t_3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* "tables/hdf5extension.pyx":911 * ret = H5Gcreate(self.parent_id, encoded_name, H5P_DEFAULT, H5P_DEFAULT, * H5P_DEFAULT) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't create the group %s." % self.name) * self.group_id = ret */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":912 * H5P_DEFAULT) * if ret < 0: * raise HDF5ExtError("Can't create the group %s." % self.name) # <<<<<<<<<<<<<< * self.group_id = ret * return self.group_id */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_68), __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __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_5)); __pyx_t_5 = 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 = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":913 * if ret < 0: * raise HDF5ExtError("Can't create the group %s." % self.name) * self.group_id = ret # <<<<<<<<<<<<<< * return self.group_id * */ __pyx_v_self->group_id = __pyx_v_ret; /* "tables/hdf5extension.pyx":914 * raise HDF5ExtError("Can't create the group %s." % self.name) * self.group_id = ret * return self.group_id # <<<<<<<<<<<<<< * * def _g_open(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->group_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __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_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tables.hdf5extension.Group._g_create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_3_g_open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_3_g_open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_open (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_5Group_2_g_open(((struct __pyx_obj_6tables_13hdf5extension_Group *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":916 * return self.group_id * * def _g_open(self): # <<<<<<<<<<<<<< * cdef hid_t ret * cdef bytes encoded_name */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_2_g_open(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self) { hid_t __pyx_v_ret; PyObject *__pyx_v_encoded_name = 0; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_open", 0); /* "tables/hdf5extension.pyx":920 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * ret = H5Gopen(self.parent_id, encoded_name, H5P_DEFAULT) */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->__pyx_base.name, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_69), NULL); 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); __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 = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":922 * encoded_name = self.name.encode('utf-8') * * ret = H5Gopen(self.parent_id, encoded_name, H5P_DEFAULT) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Can't open the group: '%s'." % self.name) */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = H5Gopen(__pyx_v_self->__pyx_base.parent_id, __pyx_t_3, H5P_DEFAULT); /* "tables/hdf5extension.pyx":923 * * ret = H5Gopen(self.parent_id, encoded_name, H5P_DEFAULT) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Can't open the group: '%s'." % self.name) * self.group_id = ret */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":924 * ret = H5Gopen(self.parent_id, encoded_name, H5P_DEFAULT) * if ret < 0: * raise HDF5ExtError("Can't open the group: '%s'." % self.name) # <<<<<<<<<<<<<< * self.group_id = ret * return self.group_id */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); 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_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_70), __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_5 = PyTuple_New(1); 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); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __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_5)); __pyx_t_5 = 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 = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":925 * if ret < 0: * raise HDF5ExtError("Can't open the group: '%s'." % self.name) * self.group_id = ret # <<<<<<<<<<<<<< * return self.group_id * */ __pyx_v_self->group_id = __pyx_v_ret; /* "tables/hdf5extension.pyx":926 * raise HDF5ExtError("Can't open the group: '%s'." % self.name) * self.group_id = ret * return self.group_id # <<<<<<<<<<<<<< * * def _g_get_objinfo(self, object h5name): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->group_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __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_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tables.hdf5extension.Group._g_open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_5_g_get_objinfo(PyObject *__pyx_v_self, PyObject *__pyx_v_h5name); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Group_4_g_get_objinfo[] = "Check whether 'name' is a children of 'self' and return its type."; static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_5_g_get_objinfo(PyObject *__pyx_v_self, PyObject *__pyx_v_h5name) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_get_objinfo (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_5Group_4_g_get_objinfo(((struct __pyx_obj_6tables_13hdf5extension_Group *)__pyx_v_self), ((PyObject *)__pyx_v_h5name)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":928 * return self.group_id * * def _g_get_objinfo(self, object h5name): # <<<<<<<<<<<<<< * """Check whether 'name' is a children of 'self' and return its type.""" * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_4_g_get_objinfo(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, PyObject *__pyx_v_h5name) { int __pyx_v_ret; PyObject *__pyx_v_node_type = 0; PyObject *__pyx_v_encoded_name = 0; char *__pyx_v_cname; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_get_objinfo", 0); /* "tables/hdf5extension.pyx":936 * cdef char *cname * * encoded_name = h5name.encode('utf-8') # <<<<<<<<<<<<<< * # Get the C pointer * cname = encoded_name */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_h5name, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __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 = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":938 * encoded_name = h5name.encode('utf-8') * # Get the C pointer * cname = encoded_name # <<<<<<<<<<<<<< * * ret = get_linkinfo(self.group_id, cname) */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cname = __pyx_t_3; /* "tables/hdf5extension.pyx":940 * cname = encoded_name * * ret = get_linkinfo(self.group_id, cname) # <<<<<<<<<<<<<< * if ret == -2 or ret == H5L_TYPE_ERROR: * node_type = "NoSuchNode" */ __pyx_v_ret = get_linkinfo(__pyx_v_self->group_id, __pyx_v_cname); /* "tables/hdf5extension.pyx":941 * * ret = get_linkinfo(self.group_id, cname) * if ret == -2 or ret == H5L_TYPE_ERROR: # <<<<<<<<<<<<<< * node_type = "NoSuchNode" * elif ret == H5L_TYPE_SOFT: */ __pyx_t_4 = (__pyx_v_ret == -2); if (!__pyx_t_4) { __pyx_t_5 = (__pyx_v_ret == H5L_TYPE_ERROR); __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_4; } if (__pyx_t_6) { /* "tables/hdf5extension.pyx":942 * ret = get_linkinfo(self.group_id, cname) * if ret == -2 or ret == H5L_TYPE_ERROR: * node_type = "NoSuchNode" # <<<<<<<<<<<<<< * elif ret == H5L_TYPE_SOFT: * node_type = "SoftLink" */ __Pyx_INCREF(((PyObject *)__pyx_n_s__NoSuchNode)); __pyx_v_node_type = ((PyObject *)__pyx_n_s__NoSuchNode); goto __pyx_L3; } /* "tables/hdf5extension.pyx":943 * if ret == -2 or ret == H5L_TYPE_ERROR: * node_type = "NoSuchNode" * elif ret == H5L_TYPE_SOFT: # <<<<<<<<<<<<<< * node_type = "SoftLink" * elif ret == H5L_TYPE_EXTERNAL: */ __pyx_t_6 = (__pyx_v_ret == H5L_TYPE_SOFT); if (__pyx_t_6) { /* "tables/hdf5extension.pyx":944 * node_type = "NoSuchNode" * elif ret == H5L_TYPE_SOFT: * node_type = "SoftLink" # <<<<<<<<<<<<<< * elif ret == H5L_TYPE_EXTERNAL: * node_type = "ExternalLink" */ __Pyx_INCREF(((PyObject *)__pyx_n_s__SoftLink)); __pyx_v_node_type = ((PyObject *)__pyx_n_s__SoftLink); goto __pyx_L3; } /* "tables/hdf5extension.pyx":945 * elif ret == H5L_TYPE_SOFT: * node_type = "SoftLink" * elif ret == H5L_TYPE_EXTERNAL: # <<<<<<<<<<<<<< * node_type = "ExternalLink" * elif ret == H5L_TYPE_HARD: */ __pyx_t_6 = (__pyx_v_ret == H5L_TYPE_EXTERNAL); if (__pyx_t_6) { /* "tables/hdf5extension.pyx":946 * node_type = "SoftLink" * elif ret == H5L_TYPE_EXTERNAL: * node_type = "ExternalLink" # <<<<<<<<<<<<<< * elif ret == H5L_TYPE_HARD: * ret = get_objinfo(self.group_id, cname) */ __Pyx_INCREF(((PyObject *)__pyx_n_s__ExternalLink)); __pyx_v_node_type = ((PyObject *)__pyx_n_s__ExternalLink); goto __pyx_L3; } /* "tables/hdf5extension.pyx":947 * elif ret == H5L_TYPE_EXTERNAL: * node_type = "ExternalLink" * elif ret == H5L_TYPE_HARD: # <<<<<<<<<<<<<< * ret = get_objinfo(self.group_id, cname) * if ret == -2: */ __pyx_t_6 = (__pyx_v_ret == H5L_TYPE_HARD); if (__pyx_t_6) { /* "tables/hdf5extension.pyx":948 * node_type = "ExternalLink" * elif ret == H5L_TYPE_HARD: * ret = get_objinfo(self.group_id, cname) # <<<<<<<<<<<<<< * if ret == -2: * node_type = "NoSuchNode" */ __pyx_v_ret = get_objinfo(__pyx_v_self->group_id, __pyx_v_cname); /* "tables/hdf5extension.pyx":949 * elif ret == H5L_TYPE_HARD: * ret = get_objinfo(self.group_id, cname) * if ret == -2: # <<<<<<<<<<<<<< * node_type = "NoSuchNode" * elif ret == H5O_TYPE_UNKNOWN: */ __pyx_t_6 = (__pyx_v_ret == -2); if (__pyx_t_6) { /* "tables/hdf5extension.pyx":950 * ret = get_objinfo(self.group_id, cname) * if ret == -2: * node_type = "NoSuchNode" # <<<<<<<<<<<<<< * elif ret == H5O_TYPE_UNKNOWN: * node_type = "Unknown" */ __Pyx_INCREF(((PyObject *)__pyx_n_s__NoSuchNode)); __pyx_v_node_type = ((PyObject *)__pyx_n_s__NoSuchNode); goto __pyx_L4; } /* "tables/hdf5extension.pyx":951 * if ret == -2: * node_type = "NoSuchNode" * elif ret == H5O_TYPE_UNKNOWN: # <<<<<<<<<<<<<< * node_type = "Unknown" * elif ret == H5O_TYPE_GROUP: */ __pyx_t_6 = (__pyx_v_ret == H5O_TYPE_UNKNOWN); if (__pyx_t_6) { /* "tables/hdf5extension.pyx":952 * node_type = "NoSuchNode" * elif ret == H5O_TYPE_UNKNOWN: * node_type = "Unknown" # <<<<<<<<<<<<<< * elif ret == H5O_TYPE_GROUP: * node_type = "Group" */ __Pyx_INCREF(((PyObject *)__pyx_n_s__Unknown)); __pyx_v_node_type = ((PyObject *)__pyx_n_s__Unknown); goto __pyx_L4; } /* "tables/hdf5extension.pyx":953 * elif ret == H5O_TYPE_UNKNOWN: * node_type = "Unknown" * elif ret == H5O_TYPE_GROUP: # <<<<<<<<<<<<<< * node_type = "Group" * elif ret == H5O_TYPE_DATASET: */ __pyx_t_6 = (__pyx_v_ret == H5O_TYPE_GROUP); if (__pyx_t_6) { /* "tables/hdf5extension.pyx":954 * node_type = "Unknown" * elif ret == H5O_TYPE_GROUP: * node_type = "Group" # <<<<<<<<<<<<<< * elif ret == H5O_TYPE_DATASET: * node_type = "Leaf" */ __Pyx_INCREF(((PyObject *)__pyx_n_s__Group)); __pyx_v_node_type = ((PyObject *)__pyx_n_s__Group); goto __pyx_L4; } /* "tables/hdf5extension.pyx":955 * elif ret == H5O_TYPE_GROUP: * node_type = "Group" * elif ret == H5O_TYPE_DATASET: # <<<<<<<<<<<<<< * node_type = "Leaf" * elif ret == H5O_TYPE_NAMED_DATATYPE: */ __pyx_t_6 = (__pyx_v_ret == H5O_TYPE_DATASET); if (__pyx_t_6) { /* "tables/hdf5extension.pyx":956 * node_type = "Group" * elif ret == H5O_TYPE_DATASET: * node_type = "Leaf" # <<<<<<<<<<<<<< * elif ret == H5O_TYPE_NAMED_DATATYPE: * node_type = "NamedType" # Not supported yet */ __Pyx_INCREF(((PyObject *)__pyx_n_s__Leaf)); __pyx_v_node_type = ((PyObject *)__pyx_n_s__Leaf); goto __pyx_L4; } /* "tables/hdf5extension.pyx":957 * elif ret == H5O_TYPE_DATASET: * node_type = "Leaf" * elif ret == H5O_TYPE_NAMED_DATATYPE: # <<<<<<<<<<<<<< * node_type = "NamedType" # Not supported yet * else: */ __pyx_t_6 = (__pyx_v_ret == H5O_TYPE_NAMED_DATATYPE); if (__pyx_t_6) { /* "tables/hdf5extension.pyx":958 * node_type = "Leaf" * elif ret == H5O_TYPE_NAMED_DATATYPE: * node_type = "NamedType" # Not supported yet # <<<<<<<<<<<<<< * else: * node_type = "Unknown" */ __Pyx_INCREF(((PyObject *)__pyx_n_s__NamedType)); __pyx_v_node_type = ((PyObject *)__pyx_n_s__NamedType); goto __pyx_L4; } /*else*/ { /* "tables/hdf5extension.pyx":960 * node_type = "NamedType" # Not supported yet * else: * node_type = "Unknown" # <<<<<<<<<<<<<< * return node_type * */ __Pyx_INCREF(((PyObject *)__pyx_n_s__Unknown)); __pyx_v_node_type = ((PyObject *)__pyx_n_s__Unknown); } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":961 * else: * node_type = "Unknown" * return node_type # <<<<<<<<<<<<<< * * def _g_list_group(self, parent): */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_node_type)) { __Pyx_RaiseUnboundLocalError("node_type"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_v_node_type); __pyx_r = __pyx_v_node_type; 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.hdf5extension.Group._g_get_objinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_node_type); __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_7_g_list_group(PyObject *__pyx_v_self, PyObject *__pyx_v_parent); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Group_6_g_list_group[] = "Return a tuple with the groups and the leaves hanging from self."; static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_7_g_list_group(PyObject *__pyx_v_self, PyObject *__pyx_v_parent) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_list_group (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_5Group_6_g_list_group(((struct __pyx_obj_6tables_13hdf5extension_Group *)__pyx_v_self), ((PyObject *)__pyx_v_parent)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":963 * return node_type * * def _g_list_group(self, parent): # <<<<<<<<<<<<<< * """Return a tuple with the groups and the leaves hanging from self.""" * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_6_g_list_group(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, PyObject *__pyx_v_parent) { PyObject *__pyx_v_encoded_name = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; hid_t __pyx_t_3; hid_t __pyx_t_4; char *__pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_list_group", 0); /* "tables/hdf5extension.pyx":968 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * return Giterate(parent._v_objectid, self._v_objectid, encoded_name) */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->__pyx_base.name, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __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 = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":970 * encoded_name = self.name.encode('utf-8') * * return Giterate(parent._v_objectid, self._v_objectid, encoded_name) # <<<<<<<<<<<<<< * * _g_listGroup = previous_api(_g_list_group) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_s___v_objectid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __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___v_objectid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = Giterate(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __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_AddTraceback("tables.hdf5extension.Group._g_list_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_9_g_get_gchild_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Group_8_g_get_gchild_attr[] = "Return an attribute of a child `Group`.\n\n If the attribute does not exist, ``None`` is returned.\n\n "; static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_9_g_get_gchild_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_group_name = 0; PyObject *__pyx_v_attr_name = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_get_gchild_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__group_name,&__pyx_n_s__attr_name,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__group_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__attr_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_get_gchild_attr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_get_gchild_attr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __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_group_name = values[0]; __pyx_v_attr_name = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_get_gchild_attr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Group._g_get_gchild_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_5Group_8_g_get_gchild_attr(((struct __pyx_obj_6tables_13hdf5extension_Group *)__pyx_v_self), __pyx_v_group_name, __pyx_v_attr_name); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":974 * _g_listGroup = previous_api(_g_list_group) * * def _g_get_gchild_attr(self, group_name, attr_name): # <<<<<<<<<<<<<< * """Return an attribute of a child `Group`. * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_8_g_get_gchild_attr(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, PyObject *__pyx_v_group_name, PyObject *__pyx_v_attr_name) { hid_t __pyx_v_gchild_id; PyObject *__pyx_v_retvalue = 0; PyObject *__pyx_v_encoded_group_name = 0; PyObject *__pyx_v_encoded_attr_name = 0; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_get_gchild_attr", 0); /* "tables/hdf5extension.pyx":986 * cdef bytes encoded_attr_name * * encoded_group_name = group_name.encode('utf-8') # <<<<<<<<<<<<<< * encoded_attr_name = attr_name.encode('utf-8') * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_group_name, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_73), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __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 = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_group_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":987 * * encoded_group_name = group_name.encode('utf-8') * encoded_attr_name = attr_name.encode('utf-8') # <<<<<<<<<<<<<< * * # Open the group */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_attr_name, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __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 = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_attr_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":990 * * # Open the group * retvalue = None # Default value # <<<<<<<<<<<<<< * gchild_id = H5Gopen(self.group_id, encoded_group_name, H5P_DEFAULT) * if gchild_id < 0: */ __Pyx_INCREF(Py_None); __pyx_v_retvalue = Py_None; /* "tables/hdf5extension.pyx":991 * # Open the group * retvalue = None # Default value * gchild_id = H5Gopen(self.group_id, encoded_group_name, H5P_DEFAULT) # <<<<<<<<<<<<<< * if gchild_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_group_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_gchild_id = H5Gopen(__pyx_v_self->group_id, __pyx_t_3, H5P_DEFAULT); /* "tables/hdf5extension.pyx":992 * retvalue = None # Default value * gchild_id = H5Gopen(self.group_id, encoded_group_name, H5P_DEFAULT) * if gchild_id < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (group_name, self._v_pathname)) */ __pyx_t_4 = (__pyx_v_gchild_id < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":993 * gchild_id = H5Gopen(self.group_id, encoded_group_name, H5P_DEFAULT) * if gchild_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % # <<<<<<<<<<<<<< * (group_name, self._v_pathname)) * retvalue = get_attribute_string_or_none(gchild_id, encoded_attr_name) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "tables/hdf5extension.pyx":994 * if gchild_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (group_name, self._v_pathname)) # <<<<<<<<<<<<<< * retvalue = get_attribute_string_or_none(gchild_id, encoded_attr_name) * # Close child group */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_pathname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __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 = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_group_name); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_group_name); __Pyx_GIVEREF(__pyx_v_group_name); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_75), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(((PyObject *)__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 = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __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 = 993; __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 = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":995 * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (group_name, self._v_pathname)) * retvalue = get_attribute_string_or_none(gchild_id, encoded_attr_name) # <<<<<<<<<<<<<< * # Close child group * H5Gclose(gchild_id) */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_attr_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_f_6tables_13hdf5extension_get_attribute_string_or_none(__pyx_v_gchild_id, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_v_retvalue); __pyx_v_retvalue = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":997 * retvalue = get_attribute_string_or_none(gchild_id, encoded_attr_name) * # Close child group * H5Gclose(gchild_id) # <<<<<<<<<<<<<< * * return retvalue */ H5Gclose(__pyx_v_gchild_id); /* "tables/hdf5extension.pyx":999 * H5Gclose(gchild_id) * * return retvalue # <<<<<<<<<<<<<< * * _g_getGChildAttr = previous_api(_g_get_gchild_attr) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_retvalue); __pyx_r = __pyx_v_retvalue; 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_AddTraceback("tables.hdf5extension.Group._g_get_gchild_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_retvalue); __Pyx_XDECREF(__pyx_v_encoded_group_name); __Pyx_XDECREF(__pyx_v_encoded_attr_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_11_g_get_lchild_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Group_10_g_get_lchild_attr[] = "Return an attribute of a child `Leaf`.\n\n If the attribute does not exist, ``None`` is returned.\n\n "; static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_11_g_get_lchild_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_leaf_name = 0; PyObject *__pyx_v_attr_name = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_get_lchild_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__leaf_name,&__pyx_n_s__attr_name,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__leaf_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__attr_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_get_lchild_attr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_get_lchild_attr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __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_leaf_name = values[0]; __pyx_v_attr_name = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_get_lchild_attr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Group._g_get_lchild_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_5Group_10_g_get_lchild_attr(((struct __pyx_obj_6tables_13hdf5extension_Group *)__pyx_v_self), __pyx_v_leaf_name, __pyx_v_attr_name); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1003 * _g_getGChildAttr = previous_api(_g_get_gchild_attr) * * def _g_get_lchild_attr(self, leaf_name, attr_name): # <<<<<<<<<<<<<< * """Return an attribute of a child `Leaf`. * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_10_g_get_lchild_attr(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, PyObject *__pyx_v_leaf_name, PyObject *__pyx_v_attr_name) { hid_t __pyx_v_leaf_id; PyObject *__pyx_v_retvalue = 0; PyObject *__pyx_v_encoded_leaf_name = 0; PyObject *__pyx_v_encoded_attr_name = 0; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_get_lchild_attr", 0); /* "tables/hdf5extension.pyx":1015 * cdef bytes encoded_attr_name * * encoded_leaf_name = leaf_name.encode('utf-8') # <<<<<<<<<<<<<< * encoded_attr_name = attr_name.encode('utf-8') * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_leaf_name, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __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 = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_leaf_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1016 * * encoded_leaf_name = leaf_name.encode('utf-8') * encoded_attr_name = attr_name.encode('utf-8') # <<<<<<<<<<<<<< * * # Open the dataset */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_attr_name, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __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 = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_attr_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1019 * * # Open the dataset * leaf_id = H5Dopen(self.group_id, encoded_leaf_name, H5P_DEFAULT) # <<<<<<<<<<<<<< * if leaf_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_leaf_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_leaf_id = H5Dopen(__pyx_v_self->group_id, __pyx_t_3, H5P_DEFAULT); /* "tables/hdf5extension.pyx":1020 * # Open the dataset * leaf_id = H5Dopen(self.group_id, encoded_leaf_name, H5P_DEFAULT) * if leaf_id < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (leaf_name, self._v_pathname)) */ __pyx_t_4 = (__pyx_v_leaf_id < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1021 * leaf_id = H5Dopen(self.group_id, encoded_leaf_name, H5P_DEFAULT) * if leaf_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % # <<<<<<<<<<<<<< * (leaf_name, self._v_pathname)) * retvalue = get_attribute_string_or_none(leaf_id, encoded_attr_name) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "tables/hdf5extension.pyx":1022 * if leaf_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (leaf_name, self._v_pathname)) # <<<<<<<<<<<<<< * retvalue = get_attribute_string_or_none(leaf_id, encoded_attr_name) * # Close the dataset */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_pathname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __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 = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_leaf_name); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_leaf_name); __Pyx_GIVEREF(__pyx_v_leaf_name); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_75), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(((PyObject *)__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 = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __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 = 1021; __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 = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1023 * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (leaf_name, self._v_pathname)) * retvalue = get_attribute_string_or_none(leaf_id, encoded_attr_name) # <<<<<<<<<<<<<< * # Close the dataset * H5Dclose(leaf_id) */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_attr_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __pyx_f_6tables_13hdf5extension_get_attribute_string_or_none(__pyx_v_leaf_id, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_retvalue = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1025 * retvalue = get_attribute_string_or_none(leaf_id, encoded_attr_name) * # Close the dataset * H5Dclose(leaf_id) # <<<<<<<<<<<<<< * return retvalue * */ H5Dclose(__pyx_v_leaf_id); /* "tables/hdf5extension.pyx":1026 * # Close the dataset * H5Dclose(leaf_id) * return retvalue # <<<<<<<<<<<<<< * * _g_getLChildAttr = previous_api(_g_get_lchild_attr) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_retvalue); __pyx_r = __pyx_v_retvalue; 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_AddTraceback("tables.hdf5extension.Group._g_get_lchild_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_retvalue); __Pyx_XDECREF(__pyx_v_encoded_leaf_name); __Pyx_XDECREF(__pyx_v_encoded_attr_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_13_g_flush_group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_13_g_flush_group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_flush_group (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_5Group_12_g_flush_group(((struct __pyx_obj_6tables_13hdf5extension_Group *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1030 * _g_getLChildAttr = previous_api(_g_get_lchild_attr) * * def _g_flush_group(self): # <<<<<<<<<<<<<< * # Close the group * H5Fflush(self.group_id, H5F_SCOPE_GLOBAL) */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_12_g_flush_group(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_flush_group", 0); /* "tables/hdf5extension.pyx":1032 * def _g_flush_group(self): * # Close the group * H5Fflush(self.group_id, H5F_SCOPE_GLOBAL) # <<<<<<<<<<<<<< * * _g_flushGroup = previous_api(_g_flush_group) */ H5Fflush(__pyx_v_self->group_id, H5F_SCOPE_GLOBAL); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_15_g_close_group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_15_g_close_group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_close_group (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_5Group_14_g_close_group(((struct __pyx_obj_6tables_13hdf5extension_Group *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1036 * _g_flushGroup = previous_api(_g_flush_group) * * def _g_close_group(self): # <<<<<<<<<<<<<< * cdef int ret * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_14_g_close_group(struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self) { int __pyx_v_ret; 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("_g_close_group", 0); /* "tables/hdf5extension.pyx":1039 * cdef int ret * * ret = H5Gclose(self.group_id) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Problems closing the Group %s" % self.name) */ __pyx_v_ret = H5Gclose(__pyx_v_self->group_id); /* "tables/hdf5extension.pyx":1040 * * ret = H5Gclose(self.group_id) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems closing the Group %s" % self.name) * self.group_id = 0 # indicate that this group is closed */ __pyx_t_1 = (__pyx_v_ret < 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1041 * ret = H5Gclose(self.group_id) * if ret < 0: * raise HDF5ExtError("Problems closing the Group %s" % self.name) # <<<<<<<<<<<<<< * self.group_id = 0 # indicate that this group is closed * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_78), __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__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 = 1041; __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; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1042 * if ret < 0: * raise HDF5ExtError("Problems closing the Group %s" % self.name) * self.group_id = 0 # indicate that this group is closed # <<<<<<<<<<<<<< * * _g_closeGroup = previous_api(_g_close_group) */ __pyx_v_self->group_id = 0; __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.hdf5extension.Group._g_close_group", __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_13hdf5extension_5Group_17_g_move_node(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Group_17_g_move_node(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { hid_t __pyx_v_oldparent; PyObject *__pyx_v_oldname = 0; hid_t __pyx_v_newparent; PyObject *__pyx_v_newname = 0; PyObject *__pyx_v_oldpathname = 0; PyObject *__pyx_v_newpathname = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_move_node (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldparent,&__pyx_n_s__oldname,&__pyx_n_s__newparent,&__pyx_n_s__newname,&__pyx_n_s__oldpathname,&__pyx_n_s__newpathname,0}; PyObject* values[6] = {0,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 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); 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__oldparent)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldname)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_move_node", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newparent)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_move_node", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newname)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_move_node", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldpathname)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_move_node", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newpathname)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_move_node", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_move_node") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { 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); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_oldparent = __Pyx_PyInt_from_py_hid_t(values[0]); if (unlikely((__pyx_v_oldparent == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_oldname = values[1]; __pyx_v_newparent = __Pyx_PyInt_from_py_hid_t(values[2]); if (unlikely((__pyx_v_newparent == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_newname = values[3]; __pyx_v_oldpathname = values[4]; __pyx_v_newpathname = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_move_node", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Group._g_move_node", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_5Group_16_g_move_node(((struct __pyx_obj_6tables_13hdf5extension_Group *)__pyx_v_self), __pyx_v_oldparent, __pyx_v_oldname, __pyx_v_newparent, __pyx_v_newname, __pyx_v_oldpathname, __pyx_v_newpathname); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1046 * _g_closeGroup = previous_api(_g_close_group) * * def _g_move_node(self, hid_t oldparent, oldname, hid_t newparent, newname, # <<<<<<<<<<<<<< * oldpathname, newpathname): * cdef int ret */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Group_16_g_move_node(CYTHON_UNUSED struct __pyx_obj_6tables_13hdf5extension_Group *__pyx_v_self, hid_t __pyx_v_oldparent, PyObject *__pyx_v_oldname, hid_t __pyx_v_newparent, PyObject *__pyx_v_newname, PyObject *__pyx_v_oldpathname, PyObject *__pyx_v_newpathname) { int __pyx_v_ret; PyObject *__pyx_v_encoded_oldname = 0; PyObject *__pyx_v_encoded_newname = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; char *__pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_move_node", 0); /* "tables/hdf5extension.pyx":1051 * cdef bytes encoded_oldname, encoded_newname * * encoded_oldname = oldname.encode('utf-8') # <<<<<<<<<<<<<< * encoded_newname = newname.encode('utf-8') * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_oldname, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_79), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __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 = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_oldname = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1052 * * encoded_oldname = oldname.encode('utf-8') * encoded_newname = newname.encode('utf-8') # <<<<<<<<<<<<<< * * ret = H5Lmove(oldparent, encoded_oldname, newparent, encoded_newname, */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_newname, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __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 = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_newname = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1054 * encoded_newname = newname.encode('utf-8') * * ret = H5Lmove(oldparent, encoded_oldname, newparent, encoded_newname, # <<<<<<<<<<<<<< * H5P_DEFAULT, H5P_DEFAULT) * if ret < 0: */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_oldname)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_newname)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1055 * * ret = H5Lmove(oldparent, encoded_oldname, newparent, encoded_newname, * H5P_DEFAULT, H5P_DEFAULT) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Problems moving the node %s to %s" % */ __pyx_v_ret = H5Lmove(__pyx_v_oldparent, __pyx_t_3, __pyx_v_newparent, __pyx_t_4, H5P_DEFAULT, H5P_DEFAULT); /* "tables/hdf5extension.pyx":1056 * ret = H5Lmove(oldparent, encoded_oldname, newparent, encoded_newname, * H5P_DEFAULT, H5P_DEFAULT) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems moving the node %s to %s" % * (oldpathname, newpathname) ) */ __pyx_t_5 = (__pyx_v_ret < 0); if (__pyx_t_5) { /* "tables/hdf5extension.pyx":1057 * H5P_DEFAULT, H5P_DEFAULT) * if ret < 0: * raise HDF5ExtError("Problems moving the node %s to %s" % # <<<<<<<<<<<<<< * (oldpathname, newpathname) ) * return ret */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "tables/hdf5extension.pyx":1058 * if ret < 0: * raise HDF5ExtError("Problems moving the node %s to %s" % * (oldpathname, newpathname) ) # <<<<<<<<<<<<<< * return ret * */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_oldpathname); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_oldpathname); __Pyx_GIVEREF(__pyx_v_oldpathname); __Pyx_INCREF(__pyx_v_newpathname); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_newpathname); __Pyx_GIVEREF(__pyx_v_newpathname); __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_81), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __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 = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__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 = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1059 * raise HDF5ExtError("Problems moving the node %s to %s" % * (oldpathname, newpathname) ) * return ret # <<<<<<<<<<<<<< * * _g_moveNode = previous_api(_g_move_node) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyInt_FromLong(__pyx_v_ret); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __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_6); __Pyx_AddTraceback("tables.hdf5extension.Group._g_move_node", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoded_oldname); __Pyx_XDECREF(__pyx_v_encoded_newname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_4Leaf_1_get_storage_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4Leaf_1_get_storage_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_storage_size (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4Leaf__get_storage_size(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1067 * # Instance variables declared in .pxd * * def _get_storage_size(self): # <<<<<<<<<<<<<< * return H5Dget_storage_size(self.dataset_id) * */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf__get_storage_size(struct __pyx_obj_6tables_13hdf5extension_Leaf *__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_storage_size", 0); /* "tables/hdf5extension.pyx":1068 * * def _get_storage_size(self): * return H5Dget_storage_size(self.dataset_id) # <<<<<<<<<<<<<< * * def _g_new(self, where, name, init): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_hsize_t(H5Dget_storage_size(__pyx_v_self->dataset_id)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __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.hdf5extension.Leaf._get_storage_size", __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_13hdf5extension_4Leaf_3_g_new(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4Leaf_3_g_new(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_where = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_init = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_new (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__where,&__pyx_n_s__name,&__pyx_n_s__init,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__where)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_new", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__init)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_new", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_new") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __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_where = values[0]; __pyx_v_name = values[1]; __pyx_v_init = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_new", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Leaf._g_new", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_4Leaf_2_g_new(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_where, __pyx_v_name, __pyx_v_init); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1070 * return H5Dget_storage_size(self.dataset_id) * * def _g_new(self, where, name, init): # <<<<<<<<<<<<<< * if init: * # Put this info to 0 just when the class is initialized */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf_2_g_new(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self, PyObject *__pyx_v_where, PyObject *__pyx_v_name, PyObject *__pyx_v_init) { 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("_g_new", 0); /* "tables/hdf5extension.pyx":1071 * * def _g_new(self, where, name, init): * if init: # <<<<<<<<<<<<<< * # Put this info to 0 just when the class is initialized * self.dataset_id = -1 */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_init); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1073 * if init: * # Put this info to 0 just when the class is initialized * self.dataset_id = -1 # <<<<<<<<<<<<<< * self.type_id = -1 * self.base_type_id = -1 */ __pyx_v_self->dataset_id = -1; /* "tables/hdf5extension.pyx":1074 * # Put this info to 0 just when the class is initialized * self.dataset_id = -1 * self.type_id = -1 # <<<<<<<<<<<<<< * self.base_type_id = -1 * self.disk_type_id = -1 */ __pyx_v_self->type_id = -1; /* "tables/hdf5extension.pyx":1075 * self.dataset_id = -1 * self.type_id = -1 * self.base_type_id = -1 # <<<<<<<<<<<<<< * self.disk_type_id = -1 * super(Leaf, self)._g_new(where, name, init) */ __pyx_v_self->base_type_id = -1; /* "tables/hdf5extension.pyx":1076 * self.type_id = -1 * self.base_type_id = -1 * self.disk_type_id = -1 # <<<<<<<<<<<<<< * super(Leaf, self)._g_new(where, name, init) * */ __pyx_v_self->disk_type_id = -1; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1077 * self.base_type_id = -1 * self.disk_type_id = -1 * super(Leaf, self)._g_new(where, name, init) # <<<<<<<<<<<<<< * * cdef _get_type_ids(self): */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6tables_13hdf5extension_Leaf))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_6tables_13hdf5extension_Leaf))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6tables_13hdf5extension_Leaf))); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __pyx_t_3 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __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___g_new); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_where); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_where); __Pyx_GIVEREF(__pyx_v_where); __Pyx_INCREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_INCREF(__pyx_v_init); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_init); __Pyx_GIVEREF(__pyx_v_init); __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __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_3)); __pyx_t_3 = 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_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.hdf5extension.Leaf._g_new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1079 * super(Leaf, self)._g_new(where, name, init) * * cdef _get_type_ids(self): # <<<<<<<<<<<<<< * """Get the disk and native HDF5 types associated with this leaf. * */ static PyObject *__pyx_f_6tables_13hdf5extension_4Leaf__get_type_ids(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self) { hid_t __pyx_v_disk_type_id; hid_t __pyx_v_native_type_id; 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_type_ids", 0); /* "tables/hdf5extension.pyx":1089 * cdef hid_t disk_type_id, native_type_id * * disk_type_id = H5Dget_type(self.dataset_id) # <<<<<<<<<<<<<< * native_type_id = get_native_type(disk_type_id) * return (disk_type_id, native_type_id) */ __pyx_v_disk_type_id = H5Dget_type(__pyx_v_self->dataset_id); /* "tables/hdf5extension.pyx":1090 * * disk_type_id = H5Dget_type(self.dataset_id) * native_type_id = get_native_type(disk_type_id) # <<<<<<<<<<<<<< * return (disk_type_id, native_type_id) * */ __pyx_v_native_type_id = __pyx_f_6tables_14utilsextension_get_native_type(__pyx_v_disk_type_id); /* "tables/hdf5extension.pyx":1091 * disk_type_id = H5Dget_type(self.dataset_id) * native_type_id = get_native_type(disk_type_id) * return (disk_type_id, native_type_id) # <<<<<<<<<<<<<< * * cdef _convert_time64(self, ndarray nparr, int sense): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_hid_t(__pyx_v_disk_type_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_to_py_hid_t(__pyx_v_native_type_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __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); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __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_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("tables.hdf5extension.Leaf._get_type_ids", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1093 * return (disk_type_id, native_type_id) * * cdef _convert_time64(self, ndarray nparr, int sense): # <<<<<<<<<<<<<< * """Converts a NumPy of Time64 elements between NumPy and HDF5 formats. * */ static PyObject *__pyx_f_6tables_13hdf5extension_4Leaf__convert_time64(CYTHON_UNUSED struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self, PyArrayObject *__pyx_v_nparr, int __pyx_v_sense) { void *__pyx_v_t64buf; long __pyx_v_byteoffset; long __pyx_v_bytestride; long __pyx_v_nelements; hsize_t __pyx_v_nrecords; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; Py_ssize_t __pyx_t_4; size_t __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/hdf5extension.pyx":1106 * cdef hsize_t nrecords * * byteoffset = 0 # NumPy objects doesn't have an offset # <<<<<<<<<<<<<< * if (nparr).shape == (): * # 0-dim array does contain *one* element */ __pyx_v_byteoffset = 0; /* "tables/hdf5extension.pyx":1107 * * byteoffset = 0 # NumPy objects doesn't have an offset * if (nparr).shape == (): # <<<<<<<<<<<<<< * # 0-dim array does contain *one* element * nrecords = 1 */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_nparr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1109 * if (nparr).shape == (): * # 0-dim array does contain *one* element * nrecords = 1 # <<<<<<<<<<<<<< * bytestride = 8 * else: */ __pyx_v_nrecords = 1; /* "tables/hdf5extension.pyx":1110 * # 0-dim array does contain *one* element * nrecords = 1 * bytestride = 8 # <<<<<<<<<<<<<< * else: * nrecords = len(nparr) */ __pyx_v_bytestride = 8; goto __pyx_L3; } /*else*/ { /* "tables/hdf5extension.pyx":1112 * bytestride = 8 * else: * nrecords = len(nparr) # <<<<<<<<<<<<<< * bytestride = nparr.strides[0] # supports multi-dimensional recarray * nelements = nparr.size / nrecords */ __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_nparr)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_nrecords = __pyx_t_4; /* "tables/hdf5extension.pyx":1113 * else: * nrecords = len(nparr) * bytestride = nparr.strides[0] # supports multi-dimensional recarray # <<<<<<<<<<<<<< * nelements = nparr.size / nrecords * t64buf = nparr.data */ __pyx_v_bytestride = (__pyx_v_nparr->strides[0]); } __pyx_L3:; /* "tables/hdf5extension.pyx":1114 * nrecords = len(nparr) * bytestride = nparr.strides[0] # supports multi-dimensional recarray * nelements = nparr.size / nrecords # <<<<<<<<<<<<<< * t64buf = nparr.data * */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_nparr), __pyx_n_s__size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_AsSize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_nrecords == 0)) { PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(hsize_t) == sizeof(long) && unlikely(__pyx_v_nrecords == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(((size_t)__pyx_t_5)))) { PyErr_Format(PyExc_OverflowError, "value too large to perform division"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_nelements = __Pyx_div_hsize_t(((size_t)__pyx_t_5), __pyx_v_nrecords); /* "tables/hdf5extension.pyx":1115 * bytestride = nparr.strides[0] # supports multi-dimensional recarray * nelements = nparr.size / nrecords * t64buf = nparr.data # <<<<<<<<<<<<<< * * conv_float64_timeval32( */ __pyx_t_6 = __pyx_v_nparr->data; __pyx_v_t64buf = __pyx_t_6; /* "tables/hdf5extension.pyx":1118 * * conv_float64_timeval32( * t64buf, byteoffset, bytestride, nrecords, nelements, sense) # <<<<<<<<<<<<<< * * # can't do since cdef'd */ 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_2); __Pyx_AddTraceback("tables.hdf5extension.Leaf._convert_time64", __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_13hdf5extension_4Leaf_5_g_truncate(PyObject *__pyx_v_self, PyObject *__pyx_arg_size); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_4Leaf_4_g_truncate[] = "Truncate a Leaf to `size` nrows."; static PyObject *__pyx_pw_6tables_13hdf5extension_4Leaf_5_g_truncate(PyObject *__pyx_v_self, PyObject *__pyx_arg_size) { hsize_t __pyx_v_size; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_truncate (wrapper)", 0); assert(__pyx_arg_size); { __pyx_v_size = __Pyx_PyInt_from_py_hsize_t(__pyx_arg_size); if (unlikely((__pyx_v_size == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Leaf._g_truncate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_4Leaf_4_g_truncate(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), ((hsize_t)__pyx_v_size)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1123 * #_convertTime64 = previous_api(_convert_time64) * * def _g_truncate(self, hsize_t size): # <<<<<<<<<<<<<< * """Truncate a Leaf to `size` nrows.""" * */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf_4_g_truncate(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self, hsize_t __pyx_v_size) { hsize_t __pyx_v_ret; PyObject *__pyx_v_classname = NULL; PyObject *__pyx_v_shape = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_truncate", 0); /* "tables/hdf5extension.pyx":1128 * cdef hsize_t ret * * ret = truncate_dset(self.dataset_id, self.maindim, size) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Problems truncating the leaf: %s" % self) */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__maindim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ret = truncate_dset(__pyx_v_self->dataset_id, __pyx_t_2, __pyx_v_size); /* "tables/hdf5extension.pyx":1129 * * ret = truncate_dset(self.dataset_id, self.maindim, size) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems truncating the leaf: %s" % self) * */ __pyx_t_3 = (__pyx_v_ret < 0); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1130 * ret = truncate_dset(self.dataset_id, self.maindim, size) * if ret < 0: * raise HDF5ExtError("Problems truncating the leaf: %s" % self) # <<<<<<<<<<<<<< * * classname = self.__class__.__name__ */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_82), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 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_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __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_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1132 * raise HDF5ExtError("Problems truncating the leaf: %s" % self) * * classname = self.__class__.__name__ # <<<<<<<<<<<<<< * if classname in ('EArray', 'CArray'): * # Update the new dimensionality */ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s____name__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_classname = __pyx_t_5; __pyx_t_5 = 0; /* "tables/hdf5extension.pyx":1133 * * classname = self.__class__.__name__ * if classname in ('EArray', 'CArray'): # <<<<<<<<<<<<<< * # Update the new dimensionality * self.dims[self.maindim] = size */ __Pyx_INCREF(__pyx_v_classname); __pyx_t_5 = __pyx_v_classname; __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__EArray), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!((int)__pyx_t_3)) { __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__CArray), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = ((int)__pyx_t_6); } else { __pyx_t_7 = ((int)__pyx_t_3); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __pyx_t_7; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1135 * if classname in ('EArray', 'CArray'): * # Update the new dimensionality * self.dims[self.maindim] = size # <<<<<<<<<<<<<< * # Update the shape * shape = list(self.shape) */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__maindim); 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_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-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_self->dims[__pyx_t_8]) = __pyx_v_size; /* "tables/hdf5extension.pyx":1137 * self.dims[self.maindim] = size * # Update the shape * shape = list(self.shape) # <<<<<<<<<<<<<< * shape[self.maindim] = SizeType(size) * self.shape = tuple(shape) */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __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 = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_shape = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "tables/hdf5extension.pyx":1138 * # Update the shape * shape = list(self.shape) * shape[self.maindim] = SizeType(size) # <<<<<<<<<<<<<< * self.shape = tuple(shape) * elif classname in ('Table', 'VLArray'): */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__maindim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetItem(((PyObject *)__pyx_v_shape), __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __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/hdf5extension.pyx":1139 * shape = list(self.shape) * shape[self.maindim] = SizeType(size) * self.shape = tuple(shape) # <<<<<<<<<<<<<< * elif classname in ('Table', 'VLArray'): * self.nrows = size */ __pyx_t_4 = ((PyObject *)PyList_AsTuple(__pyx_v_shape)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__shape, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L4; } /* "tables/hdf5extension.pyx":1140 * shape[self.maindim] = SizeType(size) * self.shape = tuple(shape) * elif classname in ('Table', 'VLArray'): # <<<<<<<<<<<<<< * self.nrows = size * else: */ __Pyx_INCREF(__pyx_v_classname); __pyx_t_4 = __pyx_v_classname; __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__Table), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!((int)__pyx_t_3)) { __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__VLArray), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = ((int)__pyx_t_7); } else { __pyx_t_6 = ((int)__pyx_t_3); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_6; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1141 * self.shape = tuple(shape) * elif classname in ('Table', 'VLArray'): * self.nrows = size # <<<<<<<<<<<<<< * else: * raise ValueError("Unexpected classname: %s" % classname) */ __pyx_t_4 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nrows, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; } /*else*/ { /* "tables/hdf5extension.pyx":1143 * self.nrows = size * else: * raise ValueError("Unexpected classname: %s" % classname) # <<<<<<<<<<<<<< * * def _g_flush(self): */ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_83), __pyx_v_classname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 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 = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tables.hdf5extension.Leaf._g_truncate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_classname); __Pyx_XDECREF(__pyx_v_shape); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_4Leaf_7_g_flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4Leaf_7_g_flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_flush (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4Leaf_6_g_flush(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1145 * raise ValueError("Unexpected classname: %s" % classname) * * def _g_flush(self): # <<<<<<<<<<<<<< * # Flush the dataset (in fact, the entire buffers in file!) * if self.dataset_id >= 0: */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf_6_g_flush(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_g_flush", 0); /* "tables/hdf5extension.pyx":1147 * def _g_flush(self): * # Flush the dataset (in fact, the entire buffers in file!) * if self.dataset_id >= 0: # <<<<<<<<<<<<<< * H5Fflush(self.dataset_id, H5F_SCOPE_GLOBAL) * */ __pyx_t_1 = (__pyx_v_self->dataset_id >= 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1148 * # Flush the dataset (in fact, the entire buffers in file!) * if self.dataset_id >= 0: * H5Fflush(self.dataset_id, H5F_SCOPE_GLOBAL) # <<<<<<<<<<<<<< * * def _g_close(self): */ H5Fflush(__pyx_v_self->dataset_id, H5F_SCOPE_GLOBAL); goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_4Leaf_9_g_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_4Leaf_9_g_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_close (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_4Leaf_8_g_close(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1150 * H5Fflush(self.dataset_id, H5F_SCOPE_GLOBAL) * * def _g_close(self): # <<<<<<<<<<<<<< * # Close dataset in HDF5 space * # Release resources */ static PyObject *__pyx_pf_6tables_13hdf5extension_4Leaf_8_g_close(struct __pyx_obj_6tables_13hdf5extension_Leaf *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_g_close", 0); /* "tables/hdf5extension.pyx":1153 * # Close dataset in HDF5 space * # Release resources * if self.type_id >= 0: # <<<<<<<<<<<<<< * H5Tclose(self.type_id) * if self.disk_type_id >= 0: */ __pyx_t_1 = (__pyx_v_self->type_id >= 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1154 * # Release resources * if self.type_id >= 0: * H5Tclose(self.type_id) # <<<<<<<<<<<<<< * if self.disk_type_id >= 0: * H5Tclose(self.disk_type_id) */ H5Tclose(__pyx_v_self->type_id); goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1155 * if self.type_id >= 0: * H5Tclose(self.type_id) * if self.disk_type_id >= 0: # <<<<<<<<<<<<<< * H5Tclose(self.disk_type_id) * if self.base_type_id >= 0: */ __pyx_t_1 = (__pyx_v_self->disk_type_id >= 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1156 * H5Tclose(self.type_id) * if self.disk_type_id >= 0: * H5Tclose(self.disk_type_id) # <<<<<<<<<<<<<< * if self.base_type_id >= 0: * H5Tclose(self.base_type_id) */ H5Tclose(__pyx_v_self->disk_type_id); goto __pyx_L4; } __pyx_L4:; /* "tables/hdf5extension.pyx":1157 * if self.disk_type_id >= 0: * H5Tclose(self.disk_type_id) * if self.base_type_id >= 0: # <<<<<<<<<<<<<< * H5Tclose(self.base_type_id) * if self.dataset_id >= 0: */ __pyx_t_1 = (__pyx_v_self->base_type_id >= 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1158 * H5Tclose(self.disk_type_id) * if self.base_type_id >= 0: * H5Tclose(self.base_type_id) # <<<<<<<<<<<<<< * if self.dataset_id >= 0: * H5Dclose(self.dataset_id) */ H5Tclose(__pyx_v_self->base_type_id); goto __pyx_L5; } __pyx_L5:; /* "tables/hdf5extension.pyx":1159 * if self.base_type_id >= 0: * H5Tclose(self.base_type_id) * if self.dataset_id >= 0: # <<<<<<<<<<<<<< * H5Dclose(self.dataset_id) * */ __pyx_t_1 = (__pyx_v_self->dataset_id >= 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1160 * H5Tclose(self.base_type_id) * if self.dataset_id >= 0: * H5Dclose(self.dataset_id) # <<<<<<<<<<<<<< * * */ H5Dclose(__pyx_v_self->dataset_id); goto __pyx_L6; } __pyx_L6:; __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_1_create_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_1_create_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_nparr = 0; PyObject *__pyx_v_title = 0; PyObject *__pyx_v_atom = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_create_array (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nparr,&__pyx_n_s__title,&__pyx_n_s__atom,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__nparr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__title)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_create_array", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__atom)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_create_array", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __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_array") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __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_nparr = ((PyArrayObject *)values[0]); __pyx_v_title = values[1]; __pyx_v_atom = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_create_array", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Array._create_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array__create_array(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), __pyx_v_nparr, __pyx_v_title, __pyx_v_atom); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1166 * # Instance variables declared in .pxd * * def _create_array(self, ndarray nparr, object title, object atom): # <<<<<<<<<<<<<< * cdef int i * cdef herr_t ret */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array__create_array(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_nparr, PyObject *__pyx_v_title, PyObject *__pyx_v_atom) { void *__pyx_v_rbuf; PyObject *__pyx_v_complib = 0; PyObject *__pyx_v_version = 0; PyObject *__pyx_v_class_ = 0; PyObject *__pyx_v_dtype_ = 0; PyObject *__pyx_v_atom_ = 0; PyObject *__pyx_v_shape = 0; PyArrayObject *__pyx_v_dims = 0; PyObject *__pyx_v_encoded_title = 0; PyObject *__pyx_v_encoded_name = 0; enum H5T_cset_t __pyx_v_cset; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; hid_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; char *__pyx_t_11; char *__pyx_t_12; int __pyx_t_13; int __pyx_t_14; char *__pyx_t_15; int __pyx_t_16; int __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_create_array", 0); /* "tables/hdf5extension.pyx":1174 * cdef ndarray dims * cdef bytes encoded_title, encoded_name * cdef H5T_cset_t cset = H5T_CSET_ASCII # <<<<<<<<<<<<<< * * encoded_title = title.encode('utf-8') */ __pyx_v_cset = H5T_CSET_ASCII; /* "tables/hdf5extension.pyx":1176 * cdef H5T_cset_t cset = H5T_CSET_ASCII * * encoded_title = title.encode('utf-8') # <<<<<<<<<<<<<< * encoded_name = self.name.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 = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_84), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __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 = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_title = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1177 * * encoded_title = title.encode('utf-8') * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Get the HDF5 type associated with this numpy type */ __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 = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __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 = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1180 * * # Get the HDF5 type associated with this numpy type * shape = (nparr).shape # <<<<<<<<<<<<<< * if atom is None or atom.shape == (): * dtype_ = nparr.dtype.base */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_nparr), __pyx_n_s__shape); 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_v_shape = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1181 * # Get the HDF5 type associated with this numpy type * shape = (nparr).shape * if atom is None or atom.shape == (): # <<<<<<<<<<<<<< * dtype_ = nparr.dtype.base * atom_ = Atom.from_dtype(dtype_) */ __pyx_t_3 = (__pyx_v_atom == Py_None); if (!__pyx_t_3) { __pyx_t_1 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_3; } if (__pyx_t_5) { /* "tables/hdf5extension.pyx":1182 * shape = (nparr).shape * if atom is None or atom.shape == (): * dtype_ = nparr.dtype.base # <<<<<<<<<<<<<< * atom_ = Atom.from_dtype(dtype_) * else: */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_nparr), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dtype_ = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1183 * if atom is None or atom.shape == (): * dtype_ = nparr.dtype.base * atom_ = Atom.from_dtype(dtype_) # <<<<<<<<<<<<<< * else: * atom_ = atom */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Atom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__from_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __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(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_dtype_); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dtype_); __Pyx_GIVEREF(__pyx_v_dtype_); __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_atom_ = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L3; } /*else*/ { /* "tables/hdf5extension.pyx":1185 * atom_ = Atom.from_dtype(dtype_) * else: * atom_ = atom # <<<<<<<<<<<<<< * shape = shape[:-len(atom_.shape)] * self.disk_type_id = atom_to_hdf5_type(atom_, self.byteorder) */ __Pyx_INCREF(__pyx_v_atom); __pyx_v_atom_ = __pyx_v_atom; /* "tables/hdf5extension.pyx":1186 * else: * atom_ = atom * shape = shape[:-len(atom_.shape)] # <<<<<<<<<<<<<< * self.disk_type_id = atom_to_hdf5_type(atom_, self.byteorder) * */ __pyx_t_6 = PyObject_GetAttr(__pyx_v_atom_, __pyx_n_s__shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_shape, 0, (-__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_v_shape); __pyx_v_shape = __pyx_t_6; __pyx_t_6 = 0; } __pyx_L3:; /* "tables/hdf5extension.pyx":1187 * atom_ = atom * shape = shape[:-len(atom_.shape)] * self.disk_type_id = atom_to_hdf5_type(atom_, self.byteorder) # <<<<<<<<<<<<<< * * # Allocate space for the dimension axis info and fill it */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__atom_to_hdf5_type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_atom_); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_atom_); __Pyx_GIVEREF(__pyx_v_atom_); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx_base.disk_type_id = __pyx_t_8; /* "tables/hdf5extension.pyx":1190 * * # Allocate space for the dimension axis info and fill it * dims = numpy.array(shape, dtype=numpy.intp) # <<<<<<<<<<<<<< * self.rank = len(shape) * self.dims = npy_malloc_dims(self.rank, (dims.data)) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __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(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__intp); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dims = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; /* "tables/hdf5extension.pyx":1191 * # Allocate space for the dimension axis info and fill it * dims = numpy.array(shape, dtype=numpy.intp) * self.rank = len(shape) # <<<<<<<<<<<<<< * self.dims = npy_malloc_dims(self.rank, (dims.data)) * # Get the pointer to the buffer data area */ __pyx_t_7 = PyObject_Length(__pyx_v_shape); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->rank = __pyx_t_7; /* "tables/hdf5extension.pyx":1192 * dims = numpy.array(shape, dtype=numpy.intp) * self.rank = len(shape) * self.dims = npy_malloc_dims(self.rank, (dims.data)) # <<<<<<<<<<<<<< * # Get the pointer to the buffer data area * rbuf = nparr.data */ __pyx_v_self->__pyx_base.dims = __pyx_f_6tables_13hdf5extension_npy_malloc_dims(__pyx_v_self->rank, ((npy_intp *)__pyx_v_dims->data)); /* "tables/hdf5extension.pyx":1194 * self.dims = npy_malloc_dims(self.rank, (dims.data)) * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * # Save the array * complib = (self.filters.complib or '').encode('utf-8') */ __pyx_t_11 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_11; /* "tables/hdf5extension.pyx":1196 * rbuf = nparr.data * # Save the array * complib = (self.filters.complib or '').encode('utf-8') # <<<<<<<<<<<<<< * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') */ __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__complib); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_5) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(((PyObject *)__pyx_kp_s_86)); __pyx_t_10 = __pyx_kp_s_86; } else { __pyx_t_10 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_10)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_complib = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; /* "tables/hdf5extension.pyx":1197 * # Save the array * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') # <<<<<<<<<<<<<< * class_ = self._c_classid.encode('utf-8') * self.dataset_id = H5ARRAYmake(self.parent_id, encoded_name, version, */ __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_version); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_10)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_version = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; /* "tables/hdf5extension.pyx":1198 * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') # <<<<<<<<<<<<<< * self.dataset_id = H5ARRAYmake(self.parent_id, encoded_name, version, * self.rank, self.dims, */ __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___c_classid); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_10)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_class_ = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; /* "tables/hdf5extension.pyx":1199 * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') * self.dataset_id = H5ARRAYmake(self.parent_id, encoded_name, version, # <<<<<<<<<<<<<< * self.rank, self.dims, * self.extdim, self.disk_type_id, NULL, NULL, */ __pyx_t_11 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_version)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1201 * self.dataset_id = H5ARRAYmake(self.parent_id, encoded_name, version, * self.rank, self.dims, * self.extdim, self.disk_type_id, NULL, NULL, # <<<<<<<<<<<<<< * self.filters.complevel, complib, * self.filters.shuffle, */ __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "tables/hdf5extension.pyx":1202 * self.rank, self.dims, * self.extdim, self.disk_type_id, NULL, NULL, * self.filters.complevel, complib, # <<<<<<<<<<<<<< * self.filters.shuffle, * self.filters.fletcher32, */ __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__complevel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = PyBytes_AsString(((PyObject *)__pyx_v_complib)); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1203 * self.extdim, self.disk_type_id, NULL, NULL, * self.filters.complevel, complib, * self.filters.shuffle, # <<<<<<<<<<<<<< * self.filters.fletcher32, * rbuf) */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__shuffle); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_16 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "tables/hdf5extension.pyx":1204 * self.filters.complevel, complib, * self.filters.shuffle, * self.filters.fletcher32, # <<<<<<<<<<<<<< * rbuf) * if self.dataset_id < 0: */ __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__fletcher32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_17 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "tables/hdf5extension.pyx":1199 * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') * self.dataset_id = H5ARRAYmake(self.parent_id, encoded_name, version, # <<<<<<<<<<<<<< * self.rank, self.dims, * self.extdim, self.disk_type_id, NULL, NULL, */ __pyx_v_self->__pyx_base.dataset_id = H5ARRAYmake(__pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_11, __pyx_t_12, __pyx_v_self->rank, __pyx_v_self->__pyx_base.dims, __pyx_t_13, __pyx_v_self->__pyx_base.disk_type_id, NULL, NULL, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_v_rbuf); /* "tables/hdf5extension.pyx":1206 * self.filters.fletcher32, * rbuf) * if self.dataset_id < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems creating the %s." % self.__class__.__name__) * */ __pyx_t_5 = (__pyx_v_self->__pyx_base.dataset_id < 0); if (__pyx_t_5) { /* "tables/hdf5extension.pyx":1207 * rbuf) * if self.dataset_id < 0: * raise HDF5ExtError("Problems creating the %s." % self.__class__.__name__) # <<<<<<<<<<<<<< * * if self._v_file.params['PYTABLES_SYS_ATTRS']: */ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_90), __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_10)); __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 = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_10)); __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; /* "tables/hdf5extension.pyx":1209 * raise HDF5ExtError("Problems creating the %s." % self.__class__.__name__) * * if self._v_file.params['PYTABLES_SYS_ATTRS']: # <<<<<<<<<<<<<< * if PY_MAJOR_VERSION > 2: * cset = H5T_CSET_UTF8 */ __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_file); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PYTABLES_SYS_ATTRS)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_5) { /* "tables/hdf5extension.pyx":1210 * * if self._v_file.params['PYTABLES_SYS_ATTRS']: * if PY_MAJOR_VERSION > 2: # <<<<<<<<<<<<<< * cset = H5T_CSET_UTF8 * # Set the conforming array attributes */ __pyx_t_5 = (PY_MAJOR_VERSION > 2); if (__pyx_t_5) { /* "tables/hdf5extension.pyx":1211 * if self._v_file.params['PYTABLES_SYS_ATTRS']: * if PY_MAJOR_VERSION > 2: * cset = H5T_CSET_UTF8 # <<<<<<<<<<<<<< * # Set the conforming array attributes * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, */ __pyx_v_cset = H5T_CSET_UTF8; goto __pyx_L6; } __pyx_L6:; /* "tables/hdf5extension.pyx":1213 * cset = H5T_CSET_UTF8 * # Set the conforming array attributes * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, # <<<<<<<<<<<<<< * len(class_), cset) * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, */ __pyx_t_15 = PyBytes_AsString(((PyObject *)__pyx_v_class_)); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1214 * # Set the conforming array attributes * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, * len(class_), cset) # <<<<<<<<<<<<<< * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, * len(version), cset) */ 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 = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_class_)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__CLASS, __pyx_t_15, __pyx_t_7, __pyx_v_cset); /* "tables/hdf5extension.pyx":1215 * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, * len(class_), cset) * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, # <<<<<<<<<<<<<< * len(version), cset) * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, */ __pyx_t_15 = PyBytes_AsString(((PyObject *)__pyx_v_version)); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1216 * len(class_), cset) * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, * len(version), cset) # <<<<<<<<<<<<<< * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, * len(encoded_title), cset) */ if (unlikely(((PyObject *)__pyx_v_version) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_version)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__VERSION, __pyx_t_15, __pyx_t_7, __pyx_v_cset); /* "tables/hdf5extension.pyx":1217 * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, * len(version), cset) * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, # <<<<<<<<<<<<<< * len(encoded_title), cset) * */ __pyx_t_15 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_title)); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1218 * len(version), cset) * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, * len(encoded_title), cset) # <<<<<<<<<<<<<< * * # Get the native type (so that it is HDF5 who is the responsible to deal */ 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 = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_encoded_title)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__TITLE, __pyx_t_15, __pyx_t_7, __pyx_v_cset); goto __pyx_L5; } __pyx_L5:; /* "tables/hdf5extension.pyx":1222 * # Get the native type (so that it is HDF5 who is the responsible to deal * # with non-native byteorders on-disk) * self.type_id = get_native_type(self.disk_type_id) # <<<<<<<<<<<<<< * * return (self.dataset_id, shape, atom_) */ __pyx_v_self->__pyx_base.type_id = __pyx_f_6tables_14utilsextension_get_native_type(__pyx_v_self->__pyx_base.disk_type_id); /* "tables/hdf5extension.pyx":1224 * self.type_id = get_native_type(self.disk_type_id) * * return (self.dataset_id, shape, atom_) # <<<<<<<<<<<<<< * * _createArray = previous_api(_create_array) */ __Pyx_XDECREF(__pyx_r); __pyx_t_10 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->__pyx_base.dataset_id); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); __Pyx_INCREF(__pyx_v_atom_); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_atom_); __Pyx_GIVEREF(__pyx_v_atom_); __pyx_t_10 = 0; __pyx_r = ((PyObject *)__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_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("tables.hdf5extension.Array._create_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_complib); __Pyx_XDECREF(__pyx_v_version); __Pyx_XDECREF(__pyx_v_class_); __Pyx_XDECREF(__pyx_v_dtype_); __Pyx_XDECREF(__pyx_v_atom_); __Pyx_XDECREF(__pyx_v_shape); __Pyx_XDECREF((PyObject *)__pyx_v_dims); __Pyx_XDECREF(__pyx_v_encoded_title); __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_3_create_carray(PyObject *__pyx_v_self, PyObject *__pyx_v_title); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_3_create_carray(PyObject *__pyx_v_self, PyObject *__pyx_v_title) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_create_carray (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_2_create_carray(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), ((PyObject *)__pyx_v_title)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1228 * _createArray = previous_api(_create_array) * * def _create_carray(self, object title): # <<<<<<<<<<<<<< * cdef int i * cdef herr_t ret */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_2_create_carray(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyObject *__pyx_v_title) { void *__pyx_v_rbuf; PyObject *__pyx_v_complib = 0; PyObject *__pyx_v_version = 0; PyObject *__pyx_v_class_ = 0; PyArrayObject *__pyx_v_dflts = 0; void *__pyx_v_fill_data; PyArrayObject *__pyx_v_extdim = 0; PyObject *__pyx_v_atom = 0; PyObject *__pyx_v_encoded_title = 0; PyObject *__pyx_v_encoded_name = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; hid_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; char *__pyx_t_10; char *__pyx_t_11; int __pyx_t_12; int __pyx_t_13; char *__pyx_t_14; int __pyx_t_15; int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_create_carray", 0); /* "tables/hdf5extension.pyx":1239 * cdef bytes encoded_title, encoded_name * * encoded_title = title.encode('utf-8') # <<<<<<<<<<<<<< * encoded_name = self.name.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 = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __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 = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_title = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1240 * * encoded_title = title.encode('utf-8') * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * atom = self.atom */ __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 = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_92), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __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 = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1242 * encoded_name = self.name.encode('utf-8') * * atom = self.atom # <<<<<<<<<<<<<< * self.disk_type_id = atom_to_hdf5_type(atom, self.byteorder) * */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_atom = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1243 * * atom = self.atom * self.disk_type_id = atom_to_hdf5_type(atom, self.byteorder) # <<<<<<<<<<<<<< * * self.rank = len(self.shape) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__atom_to_hdf5_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_atom); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_atom); __Pyx_GIVEREF(__pyx_v_atom); PyTuple_SET_ITEM(__pyx_t_3, 1, __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 = 1243; __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_t_4 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx_base.disk_type_id = __pyx_t_4; /* "tables/hdf5extension.pyx":1245 * self.disk_type_id = atom_to_hdf5_type(atom, self.byteorder) * * self.rank = len(self.shape) # <<<<<<<<<<<<<< * self.dims = malloc_dims(self.shape) * if self.chunkshape: */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->rank = __pyx_t_5; /* "tables/hdf5extension.pyx":1246 * * self.rank = len(self.shape) * self.dims = malloc_dims(self.shape) # <<<<<<<<<<<<<< * if self.chunkshape: * self.dims_chunk = malloc_dims(self.chunkshape) */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_self->__pyx_base.dims = __pyx_f_6tables_14utilsextension_malloc_dims(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1247 * self.rank = len(self.shape) * self.dims = malloc_dims(self.shape) * if self.chunkshape: # <<<<<<<<<<<<<< * self.dims_chunk = malloc_dims(self.chunkshape) * */ __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 = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { /* "tables/hdf5extension.pyx":1248 * self.dims = malloc_dims(self.shape) * if self.chunkshape: * self.dims_chunk = malloc_dims(self.chunkshape) # <<<<<<<<<<<<<< * * rbuf = NULL # The data pointer. We don't have data to save initially */ __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 = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_self->dims_chunk = __pyx_f_6tables_14utilsextension_malloc_dims(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1250 * self.dims_chunk = malloc_dims(self.chunkshape) * * rbuf = NULL # The data pointer. We don't have data to save initially # <<<<<<<<<<<<<< * # Encode strings * complib = (self.filters.complib or '').encode('utf-8') */ __pyx_v_rbuf = NULL; /* "tables/hdf5extension.pyx":1252 * rbuf = NULL # The data pointer. We don't have data to save initially * # Encode strings * complib = (self.filters.complib or '').encode('utf-8') # <<<<<<<<<<<<<< * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') */ __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 = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__complib); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_6) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(((PyObject *)__pyx_kp_s_86)); __pyx_t_2 = __pyx_kp_s_86; } else { __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_93), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_complib = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1253 * # Encode strings * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') # <<<<<<<<<<<<<< * class_ = self._c_classid.encode('utf-8') * */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_version = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1254 * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') # <<<<<<<<<<<<<< * * # Get the fill values */ __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 = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_class_ = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1257 * * # Get the fill values * if isinstance(atom.dflt, numpy.ndarray) or atom.dflt: # <<<<<<<<<<<<<< * dflts = numpy.array(atom.dflt, dtype=atom.dtype) * fill_data = dflts.data */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__dflt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ndarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = PyObject_IsInstance(__pyx_t_2, __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_6) { __pyx_t_1 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__dflt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_7; } else { __pyx_t_8 = __pyx_t_6; } if (__pyx_t_8) { /* "tables/hdf5extension.pyx":1258 * # Get the fill values * if isinstance(atom.dflt, numpy.ndarray) or atom.dflt: * dflts = numpy.array(atom.dflt, dtype=atom.dtype) # <<<<<<<<<<<<<< * fill_data = dflts.data * else: */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __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_GetAttr(__pyx_v_atom, __pyx_n_s__dflt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __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 = 1258; __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 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_9 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dflts = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "tables/hdf5extension.pyx":1259 * if isinstance(atom.dflt, numpy.ndarray) or atom.dflt: * dflts = numpy.array(atom.dflt, dtype=atom.dtype) * fill_data = dflts.data # <<<<<<<<<<<<<< * else: * dflts = numpy.zeros((), dtype=atom.dtype) */ __pyx_t_10 = __pyx_v_dflts->data; __pyx_v_fill_data = __pyx_t_10; goto __pyx_L4; } /*else*/ { /* "tables/hdf5extension.pyx":1261 * fill_data = dflts.data * else: * dflts = numpy.zeros((), dtype=atom.dtype) # <<<<<<<<<<<<<< * fill_data = NULL * if atom.shape == (): */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_3 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_96), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __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_9)); __pyx_t_9 = 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 = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dflts = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "tables/hdf5extension.pyx":1262 * else: * dflts = numpy.zeros((), dtype=atom.dtype) * fill_data = NULL # <<<<<<<<<<<<<< * if atom.shape == (): * # The default is preferred as a scalar value instead of 0-dim array */ __pyx_v_fill_data = NULL; } __pyx_L4:; /* "tables/hdf5extension.pyx":1263 * dflts = numpy.zeros((), dtype=atom.dtype) * fill_data = NULL * if atom.shape == (): # <<<<<<<<<<<<<< * # The default is preferred as a scalar value instead of 0-dim array * atom.dflt = dflts[()] */ __pyx_t_3 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__shape); 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_9 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_8) { /* "tables/hdf5extension.pyx":1265 * if atom.shape == (): * # The default is preferred as a scalar value instead of 0-dim array * atom.dflt = dflts[()] # <<<<<<<<<<<<<< * else: * atom.dflt = dflts */ __pyx_t_9 = PyObject_GetItem(((PyObject *)__pyx_v_dflts), ((PyObject *)__pyx_empty_tuple)); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (PyObject_SetAttr(__pyx_v_atom, __pyx_n_s__dflt, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5; } /*else*/ { /* "tables/hdf5extension.pyx":1267 * atom.dflt = dflts[()] * else: * atom.dflt = dflts # <<<<<<<<<<<<<< * * # Create the CArray/EArray */ if (PyObject_SetAttr(__pyx_v_atom, __pyx_n_s__dflt, ((PyObject *)__pyx_v_dflts)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; /* "tables/hdf5extension.pyx":1271 * # Create the CArray/EArray * self.dataset_id = H5ARRAYmake( * self.parent_id, encoded_name, version, self.rank, # <<<<<<<<<<<<<< * self.dims, self.extdim, self.disk_type_id, self.dims_chunk, * fill_data, self.filters.complevel, complib, */ __pyx_t_10 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = PyBytes_AsString(((PyObject *)__pyx_v_version)); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1272 * self.dataset_id = H5ARRAYmake( * self.parent_id, encoded_name, version, self.rank, * self.dims, self.extdim, self.disk_type_id, self.dims_chunk, # <<<<<<<<<<<<<< * fill_data, self.filters.complevel, complib, * self.filters.shuffle, self.filters.fletcher32, rbuf) */ __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "tables/hdf5extension.pyx":1273 * self.parent_id, encoded_name, version, self.rank, * self.dims, self.extdim, self.disk_type_id, self.dims_chunk, * fill_data, self.filters.complevel, complib, # <<<<<<<<<<<<<< * self.filters.shuffle, self.filters.fletcher32, rbuf) * if self.dataset_id < 0: */ __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__complevel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = PyBytes_AsString(((PyObject *)__pyx_v_complib)); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1274 * self.dims, self.extdim, self.disk_type_id, self.dims_chunk, * fill_data, self.filters.complevel, complib, * self.filters.shuffle, self.filters.fletcher32, rbuf) # <<<<<<<<<<<<<< * if self.dataset_id < 0: * raise HDF5ExtError("Problems creating the %s." % self.__class__.__name__) */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__shuffle); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_15 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__filters); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__fletcher32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_16 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "tables/hdf5extension.pyx":1270 * * # Create the CArray/EArray * self.dataset_id = H5ARRAYmake( # <<<<<<<<<<<<<< * self.parent_id, encoded_name, version, self.rank, * self.dims, self.extdim, self.disk_type_id, self.dims_chunk, */ __pyx_v_self->__pyx_base.dataset_id = H5ARRAYmake(__pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_10, __pyx_t_11, __pyx_v_self->rank, __pyx_v_self->__pyx_base.dims, __pyx_t_12, __pyx_v_self->__pyx_base.disk_type_id, __pyx_v_self->dims_chunk, __pyx_v_fill_data, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_v_rbuf); /* "tables/hdf5extension.pyx":1275 * fill_data, self.filters.complevel, complib, * self.filters.shuffle, self.filters.fletcher32, rbuf) * if self.dataset_id < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems creating the %s." % self.__class__.__name__) * */ __pyx_t_8 = (__pyx_v_self->__pyx_base.dataset_id < 0); if (__pyx_t_8) { /* "tables/hdf5extension.pyx":1276 * self.filters.shuffle, self.filters.fletcher32, rbuf) * if self.dataset_id < 0: * raise HDF5ExtError("Problems creating the %s." % self.__class__.__name__) # <<<<<<<<<<<<<< * * if self._v_file.params['PYTABLES_SYS_ATTRS']: */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_90), __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __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 = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_9)); __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "tables/hdf5extension.pyx":1278 * raise HDF5ExtError("Problems creating the %s." % self.__class__.__name__) * * if self._v_file.params['PYTABLES_SYS_ATTRS']: # <<<<<<<<<<<<<< * # Set the conforming array attributes * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, */ __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_file); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PYTABLES_SYS_ATTRS)); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_8) { /* "tables/hdf5extension.pyx":1280 * if self._v_file.params['PYTABLES_SYS_ATTRS']: * # Set the conforming array attributes * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, # <<<<<<<<<<<<<< * len(class_), H5T_CSET_ASCII) * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, */ __pyx_t_14 = PyBytes_AsString(((PyObject *)__pyx_v_class_)); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1281 * # Set the conforming array attributes * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, * len(class_), H5T_CSET_ASCII) # <<<<<<<<<<<<<< * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, * len(version), H5T_CSET_ASCII) */ 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 = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_class_)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__CLASS, __pyx_t_14, __pyx_t_5, H5T_CSET_ASCII); /* "tables/hdf5extension.pyx":1282 * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, * len(class_), H5T_CSET_ASCII) * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, # <<<<<<<<<<<<<< * len(version), H5T_CSET_ASCII) * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, */ __pyx_t_14 = PyBytes_AsString(((PyObject *)__pyx_v_version)); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1283 * len(class_), H5T_CSET_ASCII) * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, * len(version), H5T_CSET_ASCII) # <<<<<<<<<<<<<< * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, * len(encoded_title), H5T_CSET_ASCII) */ if (unlikely(((PyObject *)__pyx_v_version) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_version)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__VERSION, __pyx_t_14, __pyx_t_5, H5T_CSET_ASCII); /* "tables/hdf5extension.pyx":1284 * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, * len(version), H5T_CSET_ASCII) * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, # <<<<<<<<<<<<<< * len(encoded_title), H5T_CSET_ASCII) * if self.extdim >= 0: */ __pyx_t_14 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_title)); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1285 * len(version), H5T_CSET_ASCII) * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, * len(encoded_title), H5T_CSET_ASCII) # <<<<<<<<<<<<<< * if self.extdim >= 0: * extdim = numpy.array([self.extdim], dtype="int32") */ 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 = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_encoded_title)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__TITLE, __pyx_t_14, __pyx_t_5, H5T_CSET_ASCII); /* "tables/hdf5extension.pyx":1286 * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, * len(encoded_title), H5T_CSET_ASCII) * if self.extdim >= 0: # <<<<<<<<<<<<<< * extdim = numpy.array([self.extdim], dtype="int32") * # Attach the EXTDIM attribute in case of enlargeable arrays */ __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_8) { /* "tables/hdf5extension.pyx":1287 * len(encoded_title), H5T_CSET_ASCII) * if self.extdim >= 0: * extdim = numpy.array([self.extdim], dtype="int32") # <<<<<<<<<<<<<< * # Attach the EXTDIM attribute in case of enlargeable arrays * H5ATTRset_attribute(self.dataset_id, "EXTDIM", H5T_NATIVE_INT, */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__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 = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __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__int32)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_2))); __pyx_v_extdim = ((PyArrayObject *)__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1290 * # Attach the EXTDIM attribute in case of enlargeable arrays * H5ATTRset_attribute(self.dataset_id, "EXTDIM", H5T_NATIVE_INT, * 0, NULL, extdim.data) # <<<<<<<<<<<<<< * * # Get the native type (so that it is HDF5 who is the responsible to deal */ H5ATTRset_attribute(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__EXTDIM, H5T_NATIVE_INT, 0, NULL, __pyx_v_extdim->data); goto __pyx_L8; } __pyx_L8:; goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1294 * # Get the native type (so that it is HDF5 who is the responsible to deal * # with non-native byteorders on-disk) * self.type_id = get_native_type(self.disk_type_id) # <<<<<<<<<<<<<< * * return self.dataset_id */ __pyx_v_self->__pyx_base.type_id = __pyx_f_6tables_14utilsextension_get_native_type(__pyx_v_self->__pyx_base.disk_type_id); /* "tables/hdf5extension.pyx":1296 * self.type_id = get_native_type(self.disk_type_id) * * return self.dataset_id # <<<<<<<<<<<<<< * * _createCArray = previous_api(_create_carray) */ __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 = 1296; __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_XDECREF(__pyx_t_9); __Pyx_AddTraceback("tables.hdf5extension.Array._create_carray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_complib); __Pyx_XDECREF(__pyx_v_version); __Pyx_XDECREF(__pyx_v_class_); __Pyx_XDECREF((PyObject *)__pyx_v_dflts); __Pyx_XDECREF((PyObject *)__pyx_v_extdim); __Pyx_XDECREF(__pyx_v_atom); __Pyx_XDECREF(__pyx_v_encoded_title); __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_5_open_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_5_open_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_open_array (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_4_open_array(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1300 * _createCArray = previous_api(_create_carray) * * def _open_array(self): # <<<<<<<<<<<<<< * cdef size_t type_size, type_precision * cdef H5T_class_t class_id */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_4_open_array(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self) { enum H5T_class_t __pyx_v_class_id; char __pyx_v_cbyteorder[11]; int __pyx_v_i; herr_t __pyx_v_ret; PyObject *__pyx_v_shape = 0; PyObject *__pyx_v_chunkshapes = 0; PyObject *__pyx_v_atom = 0; int __pyx_v_fill_status; PyArrayObject *__pyx_v_dflts = 0; void *__pyx_v_fill_data; PyObject *__pyx_v_encoded_name = 0; PyObject *__pyx_v_byteorder = 0; 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 *); hid_t __pyx_t_8; hid_t __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_open_array", 0); /* "tables/hdf5extension.pyx":1314 * cdef str byteorder * * 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 = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __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 = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1317 * * # 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 = 1317; __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/hdf5extension.pyx":1318 * # 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/hdf5extension.pyx":1319 * 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)) * # Get the datatype handles */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "tables/hdf5extension.pyx":1320 * if self.dataset_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (self.name, self._v_parent._v_pathname)) # <<<<<<<<<<<<<< * # Get the datatype handles * self.disk_type_id, self.type_id = self._get_type_ids() */ __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 = 1320; __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 = 1320; __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 = 1320; __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_75), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; __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 = 1319; __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 = 1319; __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 = 1319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1322 * (self.name, self._v_parent._v_pathname)) * # Get the datatype handles * self.disk_type_id, self.type_id = self._get_type_ids() # <<<<<<<<<<<<<< * # Get the atom for this type * atom = atom_from_hdf5_type(self.type_id) */ __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_Array *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_type_ids(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); 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 = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __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 = 1322; __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_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_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 = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_8 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx_base.disk_type_id = __pyx_t_8; __pyx_v_self->__pyx_base.type_id = __pyx_t_9; /* "tables/hdf5extension.pyx":1324 * self.disk_type_id, self.type_id = self._get_type_ids() * # Get the atom for this type * atom = atom_from_hdf5_type(self.type_id) # <<<<<<<<<<<<<< * * # Get the rank for this array object */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__atom_from_hdf5_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->__pyx_base.type_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_atom = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1327 * * # Get the rank for this array object * if H5ARRAYget_ndims(self.dataset_id, &self.rank) < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems getting ndims!") * # Allocate space for the dimension axis info */ __pyx_t_4 = (H5ARRAYget_ndims(__pyx_v_self->__pyx_base.dataset_id, (&__pyx_v_self->rank)) < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1328 * # Get the rank for this array object * if H5ARRAYget_ndims(self.dataset_id, &self.rank) < 0: * raise HDF5ExtError("Problems getting ndims!") # <<<<<<<<<<<<<< * # Allocate space for the dimension axis info * self.dims = malloc(self.rank * sizeof(hsize_t)) */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __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 = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "tables/hdf5extension.pyx":1330 * raise HDF5ExtError("Problems getting ndims!") * # Allocate space for the dimension axis info * self.dims = malloc(self.rank * sizeof(hsize_t)) # <<<<<<<<<<<<<< * self.maxdims = malloc(self.rank * sizeof(hsize_t)) * # Get info on dimensions, class and type (of base class) */ __pyx_v_self->__pyx_base.dims = ((hsize_t *)malloc((__pyx_v_self->rank * (sizeof(hsize_t))))); /* "tables/hdf5extension.pyx":1331 * # Allocate space for the dimension axis info * self.dims = malloc(self.rank * sizeof(hsize_t)) * self.maxdims = malloc(self.rank * sizeof(hsize_t)) # <<<<<<<<<<<<<< * # Get info on dimensions, class and type (of base class) * ret = H5ARRAYget_info(self.dataset_id, self.disk_type_id, */ __pyx_v_self->maxdims = ((hsize_t *)malloc((__pyx_v_self->rank * (sizeof(hsize_t))))); /* "tables/hdf5extension.pyx":1335 * ret = H5ARRAYget_info(self.dataset_id, self.disk_type_id, * self.dims, self.maxdims, * &class_id, cbyteorder) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("Unable to get array info.") */ __pyx_v_ret = H5ARRAYget_info(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.disk_type_id, __pyx_v_self->__pyx_base.dims, __pyx_v_self->maxdims, (&__pyx_v_class_id), __pyx_v_cbyteorder); /* "tables/hdf5extension.pyx":1336 * self.dims, self.maxdims, * &class_id, cbyteorder) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Unable to get array info.") * */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1337 * &class_id, cbyteorder) * if ret < 0: * raise HDF5ExtError("Unable to get array info.") # <<<<<<<<<<<<<< * * byteorder = cstr_to_pystr(cbyteorder) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __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 = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1339 * raise HDF5ExtError("Unable to get array info.") * * byteorder = cstr_to_pystr(cbyteorder) # <<<<<<<<<<<<<< * * # Get the extendable dimension (if any) */ __pyx_t_2 = ((PyObject *)__pyx_f_6tables_14utilsextension_cstr_to_pystr(__pyx_v_cbyteorder)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_byteorder = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1342 * * # Get the extendable dimension (if any) * self.extdim = -1 # default is non-extensible Array # <<<<<<<<<<<<<< * for i from 0 <= i < self.rank: * if self.maxdims[i] == -1: */ if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1343 * # Get the extendable dimension (if any) * self.extdim = -1 # default is non-extensible Array * for i from 0 <= i < self.rank: # <<<<<<<<<<<<<< * if self.maxdims[i] == -1: * self.extdim = i */ __pyx_t_10 = __pyx_v_self->rank; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "tables/hdf5extension.pyx":1344 * self.extdim = -1 # default is non-extensible Array * for i from 0 <= i < self.rank: * if self.maxdims[i] == -1: # <<<<<<<<<<<<<< * self.extdim = i * break */ __pyx_t_4 = ((__pyx_v_self->maxdims[__pyx_v_i]) == -1); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1345 * for i from 0 <= i < self.rank: * if self.maxdims[i] == -1: * self.extdim = i # <<<<<<<<<<<<<< * break * */ __pyx_t_2 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1346 * if self.maxdims[i] == -1: * self.extdim = i * break # <<<<<<<<<<<<<< * * # Get the shape as a python tuple */ goto __pyx_L9_break; goto __pyx_L10; } __pyx_L10:; } __pyx_L9_break:; /* "tables/hdf5extension.pyx":1349 * * # Get the shape as a python tuple * shape = getshape(self.rank, self.dims) # <<<<<<<<<<<<<< * * # Allocate space for the dimension chunking info */ __pyx_t_2 = __pyx_f_6tables_13hdf5extension_getshape(__pyx_v_self->rank, __pyx_v_self->__pyx_base.dims); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_shape = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1352 * * # Allocate space for the dimension chunking info * self.dims_chunk = malloc(self.rank * sizeof(hsize_t)) # <<<<<<<<<<<<<< * if H5ARRAYget_chunkshape(self.dataset_id, self.rank, self.dims_chunk) < 0: * # The Array class is not chunked! */ __pyx_v_self->dims_chunk = ((hsize_t *)malloc((__pyx_v_self->rank * (sizeof(hsize_t))))); /* "tables/hdf5extension.pyx":1353 * # Allocate space for the dimension chunking info * self.dims_chunk = malloc(self.rank * sizeof(hsize_t)) * if H5ARRAYget_chunkshape(self.dataset_id, self.rank, self.dims_chunk) < 0: # <<<<<<<<<<<<<< * # The Array class is not chunked! * chunkshapes = None */ __pyx_t_4 = (H5ARRAYget_chunkshape(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->rank, __pyx_v_self->dims_chunk) < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1355 * if H5ARRAYget_chunkshape(self.dataset_id, self.rank, self.dims_chunk) < 0: * # The Array class is not chunked! * chunkshapes = None # <<<<<<<<<<<<<< * else: * # Get the chunkshape as a python tuple */ __Pyx_INCREF(Py_None); __pyx_v_chunkshapes = Py_None; goto __pyx_L11; } /*else*/ { /* "tables/hdf5extension.pyx":1358 * else: * # Get the chunkshape as a python tuple * chunkshapes = getshape(self.rank, self.dims_chunk) # <<<<<<<<<<<<<< * * # Get the fill value */ __pyx_t_2 = __pyx_f_6tables_13hdf5extension_getshape(__pyx_v_self->rank, __pyx_v_self->dims_chunk); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_chunkshapes = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L11:; /* "tables/hdf5extension.pyx":1361 * * # Get the fill value * dflts = numpy.zeros((), dtype=atom.dtype) # <<<<<<<<<<<<<< * fill_data = dflts.data * H5ARRAYget_fill_value(self.dataset_id, self.type_id, */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_5 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_102), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __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(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dflts = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "tables/hdf5extension.pyx":1362 * # Get the fill value * dflts = numpy.zeros((), dtype=atom.dtype) * fill_data = dflts.data # <<<<<<<<<<<<<< * H5ARRAYget_fill_value(self.dataset_id, self.type_id, * &fill_status, fill_data); */ __pyx_t_3 = __pyx_v_dflts->data; __pyx_v_fill_data = __pyx_t_3; /* "tables/hdf5extension.pyx":1364 * fill_data = dflts.data * H5ARRAYget_fill_value(self.dataset_id, self.type_id, * &fill_status, fill_data); # <<<<<<<<<<<<<< * if fill_status == H5D_FILL_VALUE_UNDEFINED: * # This can only happen with datasets created with other libraries */ H5ARRAYget_fill_value(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, (&__pyx_v_fill_status), __pyx_v_fill_data); /* "tables/hdf5extension.pyx":1365 * H5ARRAYget_fill_value(self.dataset_id, self.type_id, * &fill_status, fill_data); * if fill_status == H5D_FILL_VALUE_UNDEFINED: # <<<<<<<<<<<<<< * # This can only happen with datasets created with other libraries * # than PyTables. */ __pyx_t_4 = (__pyx_v_fill_status == H5D_FILL_VALUE_UNDEFINED); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1368 * # This can only happen with datasets created with other libraries * # than PyTables. * dflts = None # <<<<<<<<<<<<<< * if dflts is not None and atom.shape == (): * # The default is preferred as a scalar value instead of 0-dim array */ __Pyx_INCREF(Py_None); __Pyx_DECREF(((PyObject *)__pyx_v_dflts)); __pyx_v_dflts = ((PyArrayObject *)Py_None); goto __pyx_L12; } __pyx_L12:; /* "tables/hdf5extension.pyx":1369 * # than PyTables. * dflts = None * if dflts is not None and atom.shape == (): # <<<<<<<<<<<<<< * # The default is preferred as a scalar value instead of 0-dim array * atom.dflt = dflts[()] */ __pyx_t_4 = (((PyObject *)__pyx_v_dflts) != Py_None); if (__pyx_t_4) { __pyx_t_5 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = __pyx_t_11; } else { __pyx_t_12 = __pyx_t_4; } if (__pyx_t_12) { /* "tables/hdf5extension.pyx":1371 * if dflts is not None and atom.shape == (): * # The default is preferred as a scalar value instead of 0-dim array * atom.dflt = dflts[()] # <<<<<<<<<<<<<< * else: * atom.dflt = dflts */ __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_v_dflts), ((PyObject *)__pyx_empty_tuple)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_v_atom, __pyx_n_s__dflt, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L13; } /*else*/ { /* "tables/hdf5extension.pyx":1373 * atom.dflt = dflts[()] * else: * atom.dflt = dflts # <<<<<<<<<<<<<< * * # Get the byteorder */ if (PyObject_SetAttr(__pyx_v_atom, __pyx_n_s__dflt, ((PyObject *)__pyx_v_dflts)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L13:; /* "tables/hdf5extension.pyx":1376 * * # Get the byteorder * self.byteorder = correct_byteorder(atom.type, byteorder) # <<<<<<<<<<<<<< * * return (self.dataset_id, atom, shape, chunkshapes) */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__correct_byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __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); __Pyx_INCREF(((PyObject *)__pyx_v_byteorder)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_byteorder)); __Pyx_GIVEREF(((PyObject *)__pyx_v_byteorder)); __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 = 1376; __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; if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__byteorder, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "tables/hdf5extension.pyx":1378 * self.byteorder = correct_byteorder(atom.type, byteorder) * * return (self.dataset_id, atom, shape, chunkshapes) # <<<<<<<<<<<<<< * * _openArray = previous_api(_open_array) */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->__pyx_base.dataset_id); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __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); __Pyx_INCREF(__pyx_v_atom); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_atom); __Pyx_GIVEREF(__pyx_v_atom); __Pyx_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); __Pyx_INCREF(__pyx_v_chunkshapes); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_chunkshapes); __Pyx_GIVEREF(__pyx_v_chunkshapes); __pyx_t_5 = 0; __pyx_r = ((PyObject *)__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_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.hdf5extension.Array._open_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_shape); __Pyx_XDECREF(__pyx_v_chunkshapes); __Pyx_XDECREF(__pyx_v_atom); __Pyx_XDECREF((PyObject *)__pyx_v_dflts); __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XDECREF(__pyx_v_byteorder); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_7_append(PyObject *__pyx_v_self, PyObject *__pyx_v_nparr); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_7_append(PyObject *__pyx_v_self, PyObject *__pyx_v_nparr) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_append (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_6_append(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), ((PyArrayObject *)__pyx_v_nparr)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1382 * _openArray = previous_api(_open_array) * * def _append(self, ndarray nparr): # <<<<<<<<<<<<<< * cdef int ret, extdim * cdef hsize_t *dims_arr */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_6_append(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_nparr) { int __pyx_v_ret; int __pyx_v_extdim; hsize_t *__pyx_v_dims_arr; void *__pyx_v_rbuf; PyObject *__pyx_v_shape = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_append", 0); /* "tables/hdf5extension.pyx":1389 * * # Allocate space for the dimension axis info * dims_arr = npy_malloc_dims(self.rank, nparr.shape) # <<<<<<<<<<<<<< * # Get the pointer to the buffer data area * rbuf = nparr.data */ __pyx_v_dims_arr = __pyx_f_6tables_13hdf5extension_npy_malloc_dims(__pyx_v_self->rank, __pyx_v_nparr->dimensions); /* "tables/hdf5extension.pyx":1391 * dims_arr = npy_malloc_dims(self.rank, nparr.shape) * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': */ __pyx_t_1 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_1; /* "tables/hdf5extension.pyx":1393 * rbuf = nparr.data * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 0) * */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1394 * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': * self._convert_time64(nparr, 0) # <<<<<<<<<<<<<< * * # Append the records */ __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_Array *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1397 * * # Append the records * extdim = self.extdim # <<<<<<<<<<<<<< * with nogil: * ret = H5ARRAYappend_records(self.dataset_id, self.type_id, self.rank, */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_extdim = __pyx_t_5; /* "tables/hdf5extension.pyx":1398 * # Append the records * extdim = self.extdim * with nogil: # <<<<<<<<<<<<<< * ret = H5ARRAYappend_records(self.dataset_id, self.type_id, self.rank, * self.dims, dims_arr, extdim, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1400 * with nogil: * ret = H5ARRAYappend_records(self.dataset_id, self.type_id, self.rank, * self.dims, dims_arr, extdim, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5ARRAYappend_records(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_self->rank, __pyx_v_self->__pyx_base.dims, __pyx_v_dims_arr, __pyx_v_extdim, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1398 * # Append the records * extdim = self.extdim * with nogil: # <<<<<<<<<<<<<< * ret = H5ARRAYappend_records(self.dataset_id, self.type_id, self.rank, * self.dims, dims_arr, extdim, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1402 * self.dims, dims_arr, extdim, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems appending the elements") * */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1403 * * if ret < 0: * raise HDF5ExtError("Problems appending the elements") # <<<<<<<<<<<<<< * * free(dims_arr) */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1405 * raise HDF5ExtError("Problems appending the elements") * * free(dims_arr) # <<<<<<<<<<<<<< * # Update the new dimensionality * shape = list(self.shape) */ free(__pyx_v_dims_arr); /* "tables/hdf5extension.pyx":1407 * free(dims_arr) * # Update the new dimensionality * shape = list(self.shape) # <<<<<<<<<<<<<< * shape[self.extdim] = SizeType(self.dims[self.extdim]) * self.shape = tuple(shape) */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_shape = __pyx_t_3; __pyx_t_3 = 0; /* "tables/hdf5extension.pyx":1408 * # Update the new dimensionality * shape = list(self.shape) * shape[self.extdim] = SizeType(self.dims[self.extdim]) # <<<<<<<<<<<<<< * self.shape = tuple(shape) * */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_self->__pyx_base.dims[__pyx_t_6])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __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); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __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_7)); __pyx_t_7 = 0; __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_v_shape, __pyx_t_7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1409 * shape = list(self.shape) * shape[self.extdim] = SizeType(self.dims[self.extdim]) * self.shape = tuple(shape) # <<<<<<<<<<<<<< * * def _read_array(self, hsize_t start, hsize_t stop, hsize_t step, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__shape, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __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_7); __Pyx_AddTraceback("tables.hdf5extension.Array._append", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_shape); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_9_read_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_9_read_array(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_nparr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_read_array (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__stop,&__pyx_n_s__step,&__pyx_n_s__nparr,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("_read_array", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __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("_read_array", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nparr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_read_array", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __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_array") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __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 = 1411; __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 = 1411; __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 = 1411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nparr = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_read_array", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Array._read_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_8_read_array(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_nparr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1411 * self.shape = tuple(shape) * * def _read_array(self, hsize_t start, hsize_t stop, hsize_t step, # <<<<<<<<<<<<<< * ndarray nparr): * cdef herr_t ret */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_8_read_array(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, hsize_t __pyx_v_step, PyArrayObject *__pyx_v_nparr) { herr_t __pyx_v_ret; void *__pyx_v_rbuf; hsize_t __pyx_v_nrows; int __pyx_v_extdim; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_array", 0); /* "tables/hdf5extension.pyx":1419 * * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * * # Number of rows to read */ __pyx_t_1 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_1; /* "tables/hdf5extension.pyx":1422 * * # Number of rows to read * nrows = get_len_of_range(start, stop, step) # <<<<<<<<<<<<<< * if hasattr(self, "extdim"): * extdim = self.extdim */ __pyx_v_nrows = get_len_of_range(__pyx_v_start, __pyx_v_stop, __pyx_v_step); /* "tables/hdf5extension.pyx":1423 * # Number of rows to read * nrows = get_len_of_range(start, stop, step) * if hasattr(self, "extdim"): # <<<<<<<<<<<<<< * extdim = self.extdim * else: */ __pyx_t_2 = ((PyObject *)__pyx_n_s__extdim); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1424 * nrows = get_len_of_range(start, stop, step) * if hasattr(self, "extdim"): * extdim = self.extdim # <<<<<<<<<<<<<< * else: * extdim = -1 */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extdim); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_extdim = __pyx_t_4; goto __pyx_L3; } /*else*/ { /* "tables/hdf5extension.pyx":1426 * extdim = self.extdim * else: * extdim = -1 # <<<<<<<<<<<<<< * * # Do the physical read */ __pyx_v_extdim = -1; } __pyx_L3:; /* "tables/hdf5extension.pyx":1429 * * # Do the physical read * with nogil: # <<<<<<<<<<<<<< * ret = H5ARRAYread(self.dataset_id, self.type_id, start, nrows, step, * extdim, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1431 * with nogil: * ret = H5ARRAYread(self.dataset_id, self.type_id, start, nrows, step, * extdim, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5ARRAYread(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_start, __pyx_v_nrows, __pyx_v_step, __pyx_v_extdim, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1429 * * # Do the physical read * with nogil: # <<<<<<<<<<<<<< * ret = H5ARRAYread(self.dataset_id, self.type_id, start, nrows, step, * extdim, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1433 * extdim, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems reading the array data.") * */ __pyx_t_3 = (__pyx_v_ret < 0); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1434 * * if ret < 0: * raise HDF5ExtError("Problems reading the array data.") # <<<<<<<<<<<<<< * * if self.atom.kind == 'time': */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_106), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1436 * raise HDF5ExtError("Problems reading the array data.") * * if self.atom.kind == 'time': # <<<<<<<<<<<<<< * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__kind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__time), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1438 * if self.atom.kind == 'time': * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: # <<<<<<<<<<<<<< * nparr.byteswap(True) * */ __pyx_t_5 = PyInt_FromLong(H5Tget_order(__pyx_v_self->__pyx_base.type_id)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__platform_byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1439 * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: * nparr.byteswap(True) # <<<<<<<<<<<<<< * * # Convert some HDF5 types to NumPy after reading. */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_nparr), __pyx_n_s__byteswap); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __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); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9; } __pyx_L9:; goto __pyx_L8; } __pyx_L8:; /* "tables/hdf5extension.pyx":1442 * * # Convert some HDF5 types to NumPy after reading. * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 1) * */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1443 * # Convert some HDF5 types to NumPy after reading. * if self.atom.type == 'time64': * self._convert_time64(nparr, 1) # <<<<<<<<<<<<<< * * return */ __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_Array *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L10; } __pyx_L10:; /* "tables/hdf5extension.pyx":1445 * self._convert_time64(nparr, 1) * * return # <<<<<<<<<<<<<< * * _readArray = previous_api(_read_array) */ __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_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.hdf5extension.Array._read_array", __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_13hdf5extension_5Array_11_g_read_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_11_g_read_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_startl = 0; PyArrayObject *__pyx_v_stopl = 0; PyArrayObject *__pyx_v_stepl = 0; PyArrayObject *__pyx_v_nparr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_read_slice (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__startl,&__pyx_n_s__stopl,&__pyx_n_s__stepl,&__pyx_n_s__nparr,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__startl)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stopl)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_read_slice", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stepl)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_read_slice", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nparr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_read_slice", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_read_slice") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __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_startl = ((PyArrayObject *)values[0]); __pyx_v_stopl = ((PyArrayObject *)values[1]); __pyx_v_stepl = ((PyArrayObject *)values[2]); __pyx_v_nparr = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_read_slice", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Array._g_read_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_startl), __pyx_ptype_5numpy_ndarray, 1, "startl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stopl), __pyx_ptype_5numpy_ndarray, 1, "stopl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stepl), __pyx_ptype_5numpy_ndarray, 1, "stepl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_10_g_read_slice(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), __pyx_v_startl, __pyx_v_stopl, __pyx_v_stepl, __pyx_v_nparr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1449 * _readArray = previous_api(_read_array) * * def _g_read_slice(self, ndarray startl, ndarray stopl, ndarray stepl, # <<<<<<<<<<<<<< * ndarray nparr): * cdef herr_t ret */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_10_g_read_slice(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_startl, PyArrayObject *__pyx_v_stopl, PyArrayObject *__pyx_v_stepl, PyArrayObject *__pyx_v_nparr) { herr_t __pyx_v_ret; hsize_t *__pyx_v_start; hsize_t *__pyx_v_stop; hsize_t *__pyx_v_step; void *__pyx_v_rbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; 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("_g_read_slice", 0); /* "tables/hdf5extension.pyx":1456 * * # Get the pointer to the buffer data area of startl, stopl and stepl arrays * start = startl.data # <<<<<<<<<<<<<< * stop = stopl.data * step = stepl.data */ __pyx_v_start = ((hsize_t *)__pyx_v_startl->data); /* "tables/hdf5extension.pyx":1457 * # Get the pointer to the buffer data area of startl, stopl and stepl arrays * start = startl.data * stop = stopl.data # <<<<<<<<<<<<<< * step = stepl.data * # Get the pointer to the buffer data area */ __pyx_v_stop = ((hsize_t *)__pyx_v_stopl->data); /* "tables/hdf5extension.pyx":1458 * start = startl.data * stop = stopl.data * step = stepl.data # <<<<<<<<<<<<<< * # Get the pointer to the buffer data area * rbuf = nparr.data */ __pyx_v_step = ((hsize_t *)__pyx_v_stepl->data); /* "tables/hdf5extension.pyx":1460 * step = stepl.data * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * * # Do the physical read */ __pyx_t_1 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_1; /* "tables/hdf5extension.pyx":1463 * * # Do the physical read * with nogil: # <<<<<<<<<<<<<< * ret = H5ARRAYreadSlice(self.dataset_id, self.type_id, * start, stop, step, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1465 * with nogil: * ret = H5ARRAYreadSlice(self.dataset_id, self.type_id, * start, stop, step, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5ARRAYreadSlice(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1463 * * # Do the physical read * with nogil: # <<<<<<<<<<<<<< * ret = H5ARRAYreadSlice(self.dataset_id, self.type_id, * start, stop, step, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1467 * start, stop, step, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems reading the array data.") * */ __pyx_t_2 = (__pyx_v_ret < 0); if (__pyx_t_2) { /* "tables/hdf5extension.pyx":1468 * * if ret < 0: * raise HDF5ExtError("Problems reading the array data.") # <<<<<<<<<<<<<< * * if self.atom.kind == 'time': */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_107), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__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 = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "tables/hdf5extension.pyx":1470 * raise HDF5ExtError("Problems reading the array data.") * * if self.atom.kind == 'time': # <<<<<<<<<<<<<< * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: */ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__kind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__time), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "tables/hdf5extension.pyx":1472 * if self.atom.kind == 'time': * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: # <<<<<<<<<<<<<< * nparr.byteswap(True) * */ __pyx_t_4 = PyInt_FromLong(H5Tget_order(__pyx_v_self->__pyx_base.type_id)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__platform_byteorder); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "tables/hdf5extension.pyx":1473 * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: * nparr.byteswap(True) # <<<<<<<<<<<<<< * * # Convert some HDF5 types to NumPy after reading */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_nparr), __pyx_n_s__byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __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 = 1473; __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_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8; } __pyx_L8:; goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1476 * * # Convert some HDF5 types to NumPy after reading * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 1) * */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "tables/hdf5extension.pyx":1477 * # Convert some HDF5 types to NumPy after reading * if self.atom.type == 'time64': * self._convert_time64(nparr, 1) # <<<<<<<<<<<<<< * * return */ __pyx_t_3 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_Array *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L9; } __pyx_L9:; /* "tables/hdf5extension.pyx":1479 * self._convert_time64(nparr, 1) * * return # <<<<<<<<<<<<<< * * _g_readSlice = previous_api(_g_read_slice) */ __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_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tables.hdf5extension.Array._g_read_slice", __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_13hdf5extension_5Array_13_g_read_coords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Array_12_g_read_coords[] = "Read coordinates in an already created NumPy array."; static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_13_g_read_coords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_coords = 0; PyArrayObject *__pyx_v_nparr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_read_coords (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__coords,&__pyx_n_s__nparr,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__nparr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_read_coords", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_read_coords") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __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_nparr = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_read_coords", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Array._g_read_coords", __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 = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_12_g_read_coords(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), __pyx_v_coords, __pyx_v_nparr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1483 * _g_readSlice = previous_api(_g_read_slice) * * def _g_read_coords(self, ndarray coords, ndarray nparr): # <<<<<<<<<<<<<< * """Read coordinates in an already created NumPy array.""" * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_12_g_read_coords(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_coords, PyArrayObject *__pyx_v_nparr) { herr_t __pyx_v_ret; hid_t __pyx_v_space_id; hid_t __pyx_v_mem_space_id; hsize_t __pyx_v_size; void *__pyx_v_rbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; hsize_t __pyx_t_2; char *__pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_read_coords", 0); /* "tables/hdf5extension.pyx":1494 * * # Get the dataspace handle * space_id = H5Dget_space(self.dataset_id) # <<<<<<<<<<<<<< * # Create a memory dataspace handle * size = nparr.size */ __pyx_v_space_id = H5Dget_space(__pyx_v_self->__pyx_base.dataset_id); /* "tables/hdf5extension.pyx":1496 * space_id = H5Dget_space(self.dataset_id) * # Create a memory dataspace handle * size = nparr.size # <<<<<<<<<<<<<< * mem_space_id = H5Screate_simple(1, &size, NULL) * */ __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 = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_2; /* "tables/hdf5extension.pyx":1497 * # Create a memory dataspace handle * size = nparr.size * mem_space_id = H5Screate_simple(1, &size, NULL) # <<<<<<<<<<<<<< * * # Select the dataspace to be read */ __pyx_v_mem_space_id = H5Screate_simple(1, (&__pyx_v_size), NULL); /* "tables/hdf5extension.pyx":1501 * # Select the dataspace to be read * H5Sselect_elements(space_id, H5S_SELECT_SET, * size, coords.data) # <<<<<<<<<<<<<< * * # Get the pointer to the buffer data area */ H5Sselect_elements(__pyx_v_space_id, H5S_SELECT_SET, ((size_t)__pyx_v_size), ((hsize_t *)__pyx_v_coords->data)); /* "tables/hdf5extension.pyx":1504 * * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * * # Do the actual read */ __pyx_t_3 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_3; /* "tables/hdf5extension.pyx":1507 * * # Do the actual read * with nogil: # <<<<<<<<<<<<<< * ret = H5Dread(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1509 * with nogil: * ret = H5Dread(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5Dread(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_mem_space_id, __pyx_v_space_id, H5P_DEFAULT, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1507 * * # Do the actual read * with nogil: # <<<<<<<<<<<<<< * ret = H5Dread(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1511 * H5P_DEFAULT, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems reading the array data.") * */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1512 * * if ret < 0: * raise HDF5ExtError("Problems reading the array data.") # <<<<<<<<<<<<<< * * # Terminate access to the memory dataspace */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1512; __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 = 1512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; /* "tables/hdf5extension.pyx":1515 * * # Terminate access to the memory dataspace * H5Sclose(mem_space_id) # <<<<<<<<<<<<<< * # Terminate access to the dataspace * H5Sclose(space_id) */ H5Sclose(__pyx_v_mem_space_id); /* "tables/hdf5extension.pyx":1517 * H5Sclose(mem_space_id) * # Terminate access to the dataspace * H5Sclose(space_id) # <<<<<<<<<<<<<< * * if self.atom.kind == 'time': */ H5Sclose(__pyx_v_space_id); /* "tables/hdf5extension.pyx":1519 * H5Sclose(space_id) * * if self.atom.kind == 'time': # <<<<<<<<<<<<<< * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__kind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __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_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__time), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1521 * if self.atom.kind == 'time': * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: # <<<<<<<<<<<<<< * nparr.byteswap(True) * */ __pyx_t_5 = PyInt_FromLong(H5Tget_order(__pyx_v_self->__pyx_base.type_id)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__platform_byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1522 * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: * nparr.byteswap(True) # <<<<<<<<<<<<<< * * # Convert some HDF5 types to NumPy after reading */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_nparr), __pyx_n_s__byteswap); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L8; } __pyx_L8:; goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1525 * * # Convert some HDF5 types to NumPy after reading * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 1) * */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __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_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__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 = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1526 * # Convert some HDF5 types to NumPy after reading * if self.atom.type == 'time64': * self._convert_time64(nparr, 1) # <<<<<<<<<<<<<< * * return */ __pyx_t_1 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_Array *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L9; } __pyx_L9:; /* "tables/hdf5extension.pyx":1528 * self._convert_time64(nparr, 1) * * return # <<<<<<<<<<<<<< * * _g_readCoords = previous_api(_g_read_coords) */ __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_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("tables.hdf5extension.Array._g_read_coords", __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_13hdf5extension_5Array_15perform_selection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Array_14perform_selection[] = "Performs a selection using start/count/step in the given axis.\n\n All other axes have their full range selected. The selection is\n added to the current `space_id` selection using the given mode.\n\n Note: This is a backport from the h5py project.\n\n "; static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_15perform_selection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space_id = 0; PyObject *__pyx_v_start = 0; PyObject *__pyx_v_count = 0; PyObject *__pyx_v_step = 0; PyObject *__pyx_v_idx = 0; PyObject *__pyx_v_mode = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("perform_selection (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__space_id,&__pyx_n_s__start,&__pyx_n_s__count,&__pyx_n_s__step,&__pyx_n_s__idx,&__pyx_n_s__mode,0}; PyObject* values[6] = {0,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 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); 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__space_id)) != 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("perform_selection", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("perform_selection", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __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("perform_selection", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__idx)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("perform_selection", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mode)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("perform_selection", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "perform_selection") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { 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); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_space_id = values[0]; __pyx_v_start = values[1]; __pyx_v_count = values[2]; __pyx_v_step = values[3]; __pyx_v_idx = values[4]; __pyx_v_mode = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("perform_selection", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Array.perform_selection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_14perform_selection(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), __pyx_v_space_id, __pyx_v_start, __pyx_v_count, __pyx_v_step, __pyx_v_idx, __pyx_v_mode); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1532 * _g_readCoords = previous_api(_g_read_coords) * * def perform_selection(self, space_id, start, count, step, idx, mode): # <<<<<<<<<<<<<< * """Performs a selection using start/count/step in the given axis. * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_14perform_selection(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyObject *__pyx_v_space_id, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_step, PyObject *__pyx_v_idx, PyObject *__pyx_v_mode) { int __pyx_v_select_mode; PyArrayObject *__pyx_v_start_ = 0; PyArrayObject *__pyx_v_count_ = 0; PyArrayObject *__pyx_v_step_ = 0; hsize_t *__pyx_v_startp; hsize_t *__pyx_v_countp; hsize_t *__pyx_v_stepp; PyObject *__pyx_v_startl = NULL; PyObject *__pyx_v_countl = NULL; PyObject *__pyx_v_stepl = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_select_modes = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; hid_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("perform_selection", 0); /* "tables/hdf5extension.pyx":1547 * * # Build arrays for the selection parameters * startl, countl, stepl = [], [], [] # <<<<<<<<<<<<<< * for i, x in enumerate(self.shape): * if i != idx: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_startl = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_countl = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_stepl = __pyx_t_3; __pyx_t_3 = 0; /* "tables/hdf5extension.pyx":1548 * # Build arrays for the selection parameters * startl, countl, stepl = [], [], [] * for i, x in enumerate(self.shape): # <<<<<<<<<<<<<< * if i != idx: * startl.append(0) */ __Pyx_INCREF(__pyx_int_0); __pyx_t_3 = __pyx_int_0; __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_5(__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 = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF(__pyx_v_x); __pyx_v_x = __pyx_t_2; __pyx_t_2 = 0; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF(__pyx_v_i); __pyx_v_i = __pyx_t_3; __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1549 * startl, countl, stepl = [], [], [] * for i, x in enumerate(self.shape): * if i != idx: # <<<<<<<<<<<<<< * startl.append(0) * countl.append(x) */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_v_idx, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { /* "tables/hdf5extension.pyx":1550 * for i, x in enumerate(self.shape): * if i != idx: * startl.append(0) # <<<<<<<<<<<<<< * countl.append(x) * stepl.append(1) */ __pyx_t_7 = PyList_Append(__pyx_v_startl, __pyx_int_0); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1551 * if i != idx: * startl.append(0) * countl.append(x) # <<<<<<<<<<<<<< * stepl.append(1) * else: */ __pyx_t_7 = PyList_Append(__pyx_v_countl, __pyx_v_x); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1552 * startl.append(0) * countl.append(x) * stepl.append(1) # <<<<<<<<<<<<<< * else: * startl.append(start) */ __pyx_t_7 = PyList_Append(__pyx_v_stepl, __pyx_int_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } /*else*/ { /* "tables/hdf5extension.pyx":1554 * stepl.append(1) * else: * startl.append(start) # <<<<<<<<<<<<<< * countl.append(count) * stepl.append(step) */ __pyx_t_7 = PyList_Append(__pyx_v_startl, __pyx_v_start); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1555 * else: * startl.append(start) * countl.append(count) # <<<<<<<<<<<<<< * stepl.append(step) * start_ = numpy.array(startl, dtype="i8") */ __pyx_t_7 = PyList_Append(__pyx_v_countl, __pyx_v_count); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1556 * startl.append(start) * countl.append(count) * stepl.append(step) # <<<<<<<<<<<<<< * start_ = numpy.array(startl, dtype="i8") * count_ = numpy.array(countl, dtype="i8") */ __pyx_t_7 = PyList_Append(__pyx_v_stepl, __pyx_v_step); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "tables/hdf5extension.pyx":1557 * countl.append(count) * stepl.append(step) * start_ = numpy.array(startl, dtype="i8") # <<<<<<<<<<<<<< * count_ = numpy.array(countl, dtype="i8") * step_ = numpy.array(stepl, dtype="i8") */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_startl)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_startl)); __Pyx_GIVEREF(((PyObject *)__pyx_v_startl)); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __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__i8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_start_ = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; /* "tables/hdf5extension.pyx":1558 * stepl.append(step) * start_ = numpy.array(startl, dtype="i8") * count_ = numpy.array(countl, dtype="i8") # <<<<<<<<<<<<<< * step_ = numpy.array(stepl, dtype="i8") * */ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __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 = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_countl)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_countl)); __Pyx_GIVEREF(((PyObject *)__pyx_v_countl)); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __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__i8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __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_8)); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_count_ = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1559 * start_ = numpy.array(startl, dtype="i8") * count_ = numpy.array(countl, dtype="i8") * step_ = numpy.array(stepl, dtype="i8") # <<<<<<<<<<<<<< * * # Get the pointers to array data */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __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 = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_stepl)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_stepl)); __Pyx_GIVEREF(((PyObject *)__pyx_v_stepl)); __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __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_1)); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_step_ = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1562 * * # Get the pointers to array data * startp = start_.data # <<<<<<<<<<<<<< * countp = count_.data * stepp = step_.data */ __pyx_v_startp = ((hsize_t *)__pyx_v_start_->data); /* "tables/hdf5extension.pyx":1563 * # Get the pointers to array data * startp = start_.data * countp = count_.data # <<<<<<<<<<<<<< * stepp = step_.data * */ __pyx_v_countp = ((hsize_t *)__pyx_v_count_->data); /* "tables/hdf5extension.pyx":1564 * startp = start_.data * countp = count_.data * stepp = step_.data # <<<<<<<<<<<<<< * * # Do the actual selection */ __pyx_v_stepp = ((hsize_t *)__pyx_v_step_->data); /* "tables/hdf5extension.pyx":1567 * * # Do the actual selection * select_modes = {"AND": H5S_SELECT_AND, "NOTB": H5S_SELECT_NOTB} # <<<<<<<<<<<<<< * assert mode in select_modes * select_mode = select_modes[mode] */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_8 = PyInt_FromLong(H5S_SELECT_AND); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__AND), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyInt_FromLong(H5S_SELECT_NOTB); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__NOTB), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_select_modes = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1568 * # Do the actual selection * select_modes = {"AND": H5S_SELECT_AND, "NOTB": H5S_SELECT_NOTB} * assert mode in select_modes # <<<<<<<<<<<<<< * select_mode = select_modes[mode] * H5Sselect_hyperslab(space_id, select_mode, */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_6 = (__Pyx_PyDict_Contains(__pyx_v_mode, ((PyObject *)__pyx_v_select_modes), Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_t_6)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif /* "tables/hdf5extension.pyx":1569 * select_modes = {"AND": H5S_SELECT_AND, "NOTB": H5S_SELECT_NOTB} * assert mode in select_modes * select_mode = select_modes[mode] # <<<<<<<<<<<<<< * H5Sselect_hyperslab(space_id, select_mode, * startp, stepp, countp, NULL) */ __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_select_modes), __pyx_v_mode); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_select_mode = __pyx_t_9; /* "tables/hdf5extension.pyx":1570 * assert mode in select_modes * select_mode = select_modes[mode] * H5Sselect_hyperslab(space_id, select_mode, # <<<<<<<<<<<<<< * startp, stepp, countp, NULL) * */ __pyx_t_10 = __Pyx_PyInt_from_py_hid_t(__pyx_v_space_id); if (unlikely((__pyx_t_10 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1571 * select_mode = select_modes[mode] * H5Sselect_hyperslab(space_id, select_mode, * startp, stepp, countp, NULL) # <<<<<<<<<<<<<< * * def _g_read_selection(self, object selection, ndarray nparr): */ H5Sselect_hyperslab(__pyx_t_10, ((enum H5S_seloper_t)__pyx_v_select_mode), __pyx_v_startp, __pyx_v_stepp, __pyx_v_countp, NULL); __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_8); __Pyx_AddTraceback("tables.hdf5extension.Array.perform_selection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_start_); __Pyx_XDECREF((PyObject *)__pyx_v_count_); __Pyx_XDECREF((PyObject *)__pyx_v_step_); __Pyx_XDECREF(__pyx_v_startl); __Pyx_XDECREF(__pyx_v_countl); __Pyx_XDECREF(__pyx_v_stepl); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_x); __Pyx_XDECREF(__pyx_v_select_modes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_17_g_read_selection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Array_16_g_read_selection[] = "Read a selection in an already created NumPy array."; static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_17_g_read_selection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_selection = 0; PyArrayObject *__pyx_v_nparr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_read_selection (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__selection,&__pyx_n_s__nparr,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__selection)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nparr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_read_selection", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_read_selection") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; __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_selection = values[0]; __pyx_v_nparr = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_read_selection", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Array._g_read_selection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_16_g_read_selection(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), __pyx_v_selection, __pyx_v_nparr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1573 * startp, stepp, countp, NULL) * * def _g_read_selection(self, object selection, ndarray nparr): # <<<<<<<<<<<<<< * """Read a selection in an already created NumPy array.""" * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_16_g_read_selection(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyObject *__pyx_v_selection, PyArrayObject *__pyx_v_nparr) { herr_t __pyx_v_ret; hid_t __pyx_v_space_id; hid_t __pyx_v_mem_space_id; hsize_t __pyx_v_size; void *__pyx_v_rbuf; PyObject *__pyx_v_args = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; hsize_t __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_read_selection", 0); /* "tables/hdf5extension.pyx":1584 * * # Get the dataspace handle * space_id = H5Dget_space(self.dataset_id) # <<<<<<<<<<<<<< * # Create a memory dataspace handle * size = nparr.size */ __pyx_v_space_id = H5Dget_space(__pyx_v_self->__pyx_base.dataset_id); /* "tables/hdf5extension.pyx":1586 * space_id = H5Dget_space(self.dataset_id) * # Create a memory dataspace handle * size = nparr.size # <<<<<<<<<<<<<< * mem_space_id = H5Screate_simple(1, &size, NULL) * */ __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 = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_2; /* "tables/hdf5extension.pyx":1587 * # Create a memory dataspace handle * size = nparr.size * mem_space_id = H5Screate_simple(1, &size, NULL) # <<<<<<<<<<<<<< * * # Select the dataspace to be read */ __pyx_v_mem_space_id = H5Screate_simple(1, (&__pyx_v_size), NULL); /* "tables/hdf5extension.pyx":1591 * # Select the dataspace to be read * # Start by selecting everything * H5Sselect_all(space_id) # <<<<<<<<<<<<<< * # Now refine with outstanding selections * for args in selection: */ H5Sselect_all(__pyx_v_space_id); /* "tables/hdf5extension.pyx":1593 * H5Sselect_all(space_id) * # Now refine with outstanding selections * for args in selection: # <<<<<<<<<<<<<< * self.perform_selection(space_id, *args) * */ if (PyList_CheckExact(__pyx_v_selection) || PyTuple_CheckExact(__pyx_v_selection)) { __pyx_t_1 = __pyx_v_selection; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_selection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_5)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF(__pyx_v_args); __pyx_v_args = __pyx_t_5; __pyx_t_5 = 0; /* "tables/hdf5extension.pyx":1594 * # Now refine with outstanding selections * for args in selection: * self.perform_selection(space_id, *args) # <<<<<<<<<<<<<< * * # Get the pointer to the buffer data area */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__perform_selection); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_to_py_hid_t(__pyx_v_space_id); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __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_8)); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1597 * * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * * # Do the actual read */ __pyx_t_9 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_9; /* "tables/hdf5extension.pyx":1600 * * # Do the actual read * with nogil: # <<<<<<<<<<<<<< * ret = H5Dread(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1602 * with nogil: * ret = H5Dread(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5Dread(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_mem_space_id, __pyx_v_space_id, H5P_DEFAULT, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1600 * * # Do the actual read * with nogil: # <<<<<<<<<<<<<< * ret = H5Dread(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1604 * H5P_DEFAULT, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems reading the array data.") * */ __pyx_t_10 = (__pyx_v_ret < 0); if (__pyx_t_10) { /* "tables/hdf5extension.pyx":1605 * * if ret < 0: * raise HDF5ExtError("Problems reading the array data.") # <<<<<<<<<<<<<< * * # Terminate access to the memory dataspace */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "tables/hdf5extension.pyx":1608 * * # Terminate access to the memory dataspace * H5Sclose(mem_space_id) # <<<<<<<<<<<<<< * # Terminate access to the dataspace * H5Sclose(space_id) */ H5Sclose(__pyx_v_mem_space_id); /* "tables/hdf5extension.pyx":1610 * H5Sclose(mem_space_id) * # Terminate access to the dataspace * H5Sclose(space_id) # <<<<<<<<<<<<<< * * if self.atom.kind == 'time': */ H5Sclose(__pyx_v_space_id); /* "tables/hdf5extension.pyx":1612 * H5Sclose(space_id) * * if self.atom.kind == 'time': # <<<<<<<<<<<<<< * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: */ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__kind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__time), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_10) { /* "tables/hdf5extension.pyx":1614 * if self.atom.kind == 'time': * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: # <<<<<<<<<<<<<< * nparr.byteswap(True) * */ __pyx_t_6 = PyInt_FromLong(H5Tget_order(__pyx_v_self->__pyx_base.type_id)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__platform_byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_10) { /* "tables/hdf5extension.pyx":1615 * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: * nparr.byteswap(True) # <<<<<<<<<<<<<< * * # Convert some HDF5 types to NumPy after reading */ __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_nparr), __pyx_n_s__byteswap); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __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 = 1615; __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_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __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_6)); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L10; } __pyx_L10:; goto __pyx_L9; } __pyx_L9:; /* "tables/hdf5extension.pyx":1618 * * # Convert some HDF5 types to NumPy after reading * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 1) * */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { /* "tables/hdf5extension.pyx":1619 * # Convert some HDF5 types to NumPy after reading * if self.atom.type == 'time64': * self._convert_time64(nparr, 1) # <<<<<<<<<<<<<< * * return */ __pyx_t_1 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_Array *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L11; } __pyx_L11:; /* "tables/hdf5extension.pyx":1621 * self._convert_time64(nparr, 1) * * return # <<<<<<<<<<<<<< * * _g_readSelection = previous_api(_g_read_selection) */ __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_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("tables.hdf5extension.Array._g_read_selection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_19_g_write_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Array_18_g_write_slice[] = "Write a slice in an already created NumPy array."; static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_19_g_write_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_startl = 0; PyArrayObject *__pyx_v_stepl = 0; PyArrayObject *__pyx_v_countl = 0; PyArrayObject *__pyx_v_nparr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_write_slice (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__startl,&__pyx_n_s__stepl,&__pyx_n_s__countl,&__pyx_n_s__nparr,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__startl)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stepl)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_write_slice", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__countl)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_write_slice", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nparr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_write_slice", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_write_slice") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __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_startl = ((PyArrayObject *)values[0]); __pyx_v_stepl = ((PyArrayObject *)values[1]); __pyx_v_countl = ((PyArrayObject *)values[2]); __pyx_v_nparr = ((PyArrayObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_write_slice", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Array._g_write_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_startl), __pyx_ptype_5numpy_ndarray, 1, "startl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stepl), __pyx_ptype_5numpy_ndarray, 1, "stepl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_countl), __pyx_ptype_5numpy_ndarray, 1, "countl", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_18_g_write_slice(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), __pyx_v_startl, __pyx_v_stepl, __pyx_v_countl, __pyx_v_nparr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1625 * _g_readSelection = previous_api(_g_read_selection) * * def _g_write_slice(self, ndarray startl, ndarray stepl, ndarray countl, # <<<<<<<<<<<<<< * ndarray nparr): * """Write a slice in an already created NumPy array.""" */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_18_g_write_slice(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_startl, PyArrayObject *__pyx_v_stepl, PyArrayObject *__pyx_v_countl, PyArrayObject *__pyx_v_nparr) { int __pyx_v_ret; void *__pyx_v_rbuf; hsize_t *__pyx_v_start; hsize_t *__pyx_v_step; hsize_t *__pyx_v_count; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_write_slice", 0); /* "tables/hdf5extension.pyx":1634 * * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * # Get the start, step and count values * start = startl.data */ __pyx_t_1 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_1; /* "tables/hdf5extension.pyx":1636 * rbuf = nparr.data * # Get the start, step and count values * start = startl.data # <<<<<<<<<<<<<< * step = stepl.data * count = countl.data */ __pyx_v_start = ((hsize_t *)__pyx_v_startl->data); /* "tables/hdf5extension.pyx":1637 * # Get the start, step and count values * start = startl.data * step = stepl.data # <<<<<<<<<<<<<< * count = countl.data * */ __pyx_v_step = ((hsize_t *)__pyx_v_stepl->data); /* "tables/hdf5extension.pyx":1638 * start = startl.data * step = stepl.data * count = countl.data # <<<<<<<<<<<<<< * * # Convert some NumPy types to HDF5 before storing. */ __pyx_v_count = ((hsize_t *)__pyx_v_countl->data); /* "tables/hdf5extension.pyx":1641 * * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 0) * */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1642 * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': * self._convert_time64(nparr, 0) # <<<<<<<<<<<<<< * * # Modify the elements: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_Array *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1645 * * # Modify the elements: * with nogil: # <<<<<<<<<<<<<< * ret = H5ARRAYwrite_records(self.dataset_id, self.type_id, self.rank, * start, step, count, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1647 * with nogil: * ret = H5ARRAYwrite_records(self.dataset_id, self.type_id, self.rank, * start, step, count, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5ARRAYwrite_records(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_self->rank, __pyx_v_start, __pyx_v_step, __pyx_v_count, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1645 * * # Modify the elements: * with nogil: # <<<<<<<<<<<<<< * ret = H5ARRAYwrite_records(self.dataset_id, self.type_id, self.rank, * start, step, count, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1649 * start, step, count, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Internal error modifying the elements " * "(H5ARRAYwrite_records returned errorcode -%i)" % (-ret)) */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1650 * * if ret < 0: * raise HDF5ExtError("Internal error modifying the elements " # <<<<<<<<<<<<<< * "(H5ARRAYwrite_records returned errorcode -%i)" % (-ret)) * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "tables/hdf5extension.pyx":1651 * if ret < 0: * raise HDF5ExtError("Internal error modifying the elements " * "(H5ARRAYwrite_records returned errorcode -%i)" % (-ret)) # <<<<<<<<<<<<<< * * return */ __pyx_t_3 = PyInt_FromLong((-__pyx_v_ret)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_110), __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; __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_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; __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_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[0]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1653 * "(H5ARRAYwrite_records returned errorcode -%i)" % (-ret)) * * return # <<<<<<<<<<<<<< * * _g_writeSlice = previous_api(_g_write_slice) */ __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_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tables.hdf5extension.Array._g_write_slice", __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_13hdf5extension_5Array_21_g_write_coords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Array_20_g_write_coords[] = "Write a selection in an already created NumPy array."; static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_21_g_write_coords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_coords = 0; PyArrayObject *__pyx_v_nparr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_write_coords (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__coords,&__pyx_n_s__nparr,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__nparr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_write_coords", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_write_coords") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __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_nparr = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_write_coords", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Array._g_write_coords", __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 = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_20_g_write_coords(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), __pyx_v_coords, __pyx_v_nparr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1657 * _g_writeSlice = previous_api(_g_write_slice) * * def _g_write_coords(self, ndarray coords, ndarray nparr): # <<<<<<<<<<<<<< * """Write a selection in an already created NumPy array.""" * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_20_g_write_coords(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyArrayObject *__pyx_v_coords, PyArrayObject *__pyx_v_nparr) { herr_t __pyx_v_ret; hid_t __pyx_v_space_id; hid_t __pyx_v_mem_space_id; hsize_t __pyx_v_size; void *__pyx_v_rbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; hsize_t __pyx_t_2; char *__pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_write_coords", 0); /* "tables/hdf5extension.pyx":1668 * * # Get the dataspace handle * space_id = H5Dget_space(self.dataset_id) # <<<<<<<<<<<<<< * # Create a memory dataspace handle * size = nparr.size */ __pyx_v_space_id = H5Dget_space(__pyx_v_self->__pyx_base.dataset_id); /* "tables/hdf5extension.pyx":1670 * space_id = H5Dget_space(self.dataset_id) * # Create a memory dataspace handle * size = nparr.size # <<<<<<<<<<<<<< * mem_space_id = H5Screate_simple(1, &size, NULL) * */ __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 = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_2; /* "tables/hdf5extension.pyx":1671 * # Create a memory dataspace handle * size = nparr.size * mem_space_id = H5Screate_simple(1, &size, NULL) # <<<<<<<<<<<<<< * * # Select the dataspace to be written */ __pyx_v_mem_space_id = H5Screate_simple(1, (&__pyx_v_size), NULL); /* "tables/hdf5extension.pyx":1675 * # Select the dataspace to be written * H5Sselect_elements(space_id, H5S_SELECT_SET, * size, coords.data) # <<<<<<<<<<<<<< * * # Get the pointer to the buffer data area */ H5Sselect_elements(__pyx_v_space_id, H5S_SELECT_SET, ((size_t)__pyx_v_size), ((hsize_t *)__pyx_v_coords->data)); /* "tables/hdf5extension.pyx":1678 * * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * * # Convert some NumPy types to HDF5 before storing. */ __pyx_t_3 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_3; /* "tables/hdf5extension.pyx":1681 * * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 0) * */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __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__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "tables/hdf5extension.pyx":1682 * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': * self._convert_time64(nparr, 0) # <<<<<<<<<<<<<< * * # Do the actual write */ __pyx_t_1 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_Array *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1685 * * # Do the actual write * with nogil: # <<<<<<<<<<<<<< * ret = H5Dwrite(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1687 * with nogil: * ret = H5Dwrite(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5Dwrite(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_mem_space_id, __pyx_v_space_id, H5P_DEFAULT, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1685 * * # Do the actual write * with nogil: # <<<<<<<<<<<<<< * ret = H5Dwrite(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1689 * H5P_DEFAULT, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems writing the array data.") * */ __pyx_t_5 = (__pyx_v_ret < 0); if (__pyx_t_5) { /* "tables/hdf5extension.pyx":1690 * * if ret < 0: * raise HDF5ExtError("Problems writing the array data.") # <<<<<<<<<<<<<< * * # Terminate access to the memory dataspace */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_112), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1693 * * # Terminate access to the memory dataspace * H5Sclose(mem_space_id) # <<<<<<<<<<<<<< * # Terminate access to the dataspace * H5Sclose(space_id) */ H5Sclose(__pyx_v_mem_space_id); /* "tables/hdf5extension.pyx":1695 * H5Sclose(mem_space_id) * # Terminate access to the dataspace * H5Sclose(space_id) # <<<<<<<<<<<<<< * * return */ H5Sclose(__pyx_v_space_id); /* "tables/hdf5extension.pyx":1697 * H5Sclose(space_id) * * return # <<<<<<<<<<<<<< * * _g_writeCoords = previous_api(_g_write_coords) */ __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_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("tables.hdf5extension.Array._g_write_coords", __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_13hdf5extension_5Array_23_g_write_selection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6tables_13hdf5extension_5Array_22_g_write_selection[] = "Write a selection in an already created NumPy array."; static PyObject *__pyx_pw_6tables_13hdf5extension_5Array_23_g_write_selection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_selection = 0; PyArrayObject *__pyx_v_nparr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_write_selection (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__selection,&__pyx_n_s__nparr,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__selection)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nparr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_g_write_selection", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_g_write_selection") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __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_selection = values[0]; __pyx_v_nparr = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_g_write_selection", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.Array._g_write_selection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_5Array_22_g_write_selection(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self), __pyx_v_selection, __pyx_v_nparr); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1701 * _g_writeCoords = previous_api(_g_write_coords) * * def _g_write_selection(self, object selection, ndarray nparr): # <<<<<<<<<<<<<< * """Write a selection in an already created NumPy array.""" * */ static PyObject *__pyx_pf_6tables_13hdf5extension_5Array_22_g_write_selection(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self, PyObject *__pyx_v_selection, PyArrayObject *__pyx_v_nparr) { herr_t __pyx_v_ret; hid_t __pyx_v_space_id; hid_t __pyx_v_mem_space_id; hsize_t __pyx_v_size; void *__pyx_v_rbuf; PyObject *__pyx_v_args = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; hsize_t __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_g_write_selection", 0); /* "tables/hdf5extension.pyx":1712 * * # Get the dataspace handle * space_id = H5Dget_space(self.dataset_id) # <<<<<<<<<<<<<< * # Create a memory dataspace handle * size = nparr.size */ __pyx_v_space_id = H5Dget_space(__pyx_v_self->__pyx_base.dataset_id); /* "tables/hdf5extension.pyx":1714 * space_id = H5Dget_space(self.dataset_id) * # Create a memory dataspace handle * size = nparr.size # <<<<<<<<<<<<<< * mem_space_id = H5Screate_simple(1, &size, NULL) * */ __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 = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_from_py_hsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_2; /* "tables/hdf5extension.pyx":1715 * # Create a memory dataspace handle * size = nparr.size * mem_space_id = H5Screate_simple(1, &size, NULL) # <<<<<<<<<<<<<< * * # Select the dataspace to be written */ __pyx_v_mem_space_id = H5Screate_simple(1, (&__pyx_v_size), NULL); /* "tables/hdf5extension.pyx":1719 * # Select the dataspace to be written * # Start by selecting everything * H5Sselect_all(space_id) # <<<<<<<<<<<<<< * # Now refine with outstanding selections * for args in selection: */ H5Sselect_all(__pyx_v_space_id); /* "tables/hdf5extension.pyx":1721 * H5Sselect_all(space_id) * # Now refine with outstanding selections * for args in selection: # <<<<<<<<<<<<<< * self.perform_selection(space_id, *args) * */ if (PyList_CheckExact(__pyx_v_selection) || PyTuple_CheckExact(__pyx_v_selection)) { __pyx_t_1 = __pyx_v_selection; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_selection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; } for (;;) { if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_5 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_5)) { if (PyErr_Occurred()) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF(__pyx_v_args); __pyx_v_args = __pyx_t_5; __pyx_t_5 = 0; /* "tables/hdf5extension.pyx":1722 * # Now refine with outstanding selections * for args in selection: * self.perform_selection(space_id, *args) # <<<<<<<<<<<<<< * * # Get the pointer to the buffer data area */ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__perform_selection); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_to_py_hid_t(__pyx_v_space_id); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __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_8)); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1725 * * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * * # Convert some NumPy types to HDF5 before storing. */ __pyx_t_9 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_9; /* "tables/hdf5extension.pyx":1728 * * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 0) * */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { /* "tables/hdf5extension.pyx":1729 * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': * self._convert_time64(nparr, 0) # <<<<<<<<<<<<<< * * # Do the actual write */ __pyx_t_1 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_Array *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } __pyx_L5:; /* "tables/hdf5extension.pyx":1732 * * # Do the actual write * with nogil: # <<<<<<<<<<<<<< * ret = H5Dwrite(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1734 * with nogil: * ret = H5Dwrite(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5Dwrite(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_mem_space_id, __pyx_v_space_id, H5P_DEFAULT, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1732 * * # Do the actual write * with nogil: # <<<<<<<<<<<<<< * ret = H5Dwrite(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1736 * H5P_DEFAULT, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems writing the array data.") * */ __pyx_t_10 = (__pyx_v_ret < 0); if (__pyx_t_10) { /* "tables/hdf5extension.pyx":1737 * * if ret < 0: * raise HDF5ExtError("Problems writing the array data.") # <<<<<<<<<<<<<< * * # Terminate access to the memory dataspace */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_113), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L9; } __pyx_L9:; /* "tables/hdf5extension.pyx":1740 * * # Terminate access to the memory dataspace * H5Sclose(mem_space_id) # <<<<<<<<<<<<<< * # Terminate access to the dataspace * H5Sclose(space_id) */ H5Sclose(__pyx_v_mem_space_id); /* "tables/hdf5extension.pyx":1742 * H5Sclose(mem_space_id) * # Terminate access to the dataspace * H5Sclose(space_id) # <<<<<<<<<<<<<< * * return */ H5Sclose(__pyx_v_space_id); /* "tables/hdf5extension.pyx":1744 * H5Sclose(space_id) * * return # <<<<<<<<<<<<<< * * _g_writeSelection = previous_api(_g_write_selection) */ __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_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("tables.hdf5extension.Array._g_write_selection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static void __pyx_pw_6tables_13hdf5extension_5Array_25__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6tables_13hdf5extension_5Array_25__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6tables_13hdf5extension_5Array_24__dealloc__(((struct __pyx_obj_6tables_13hdf5extension_Array *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } /* "tables/hdf5extension.pyx":1748 * _g_writeSelection = previous_api(_g_write_selection) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.dims: * free(self.dims) */ static void __pyx_pf_6tables_13hdf5extension_5Array_24__dealloc__(struct __pyx_obj_6tables_13hdf5extension_Array *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "tables/hdf5extension.pyx":1749 * * def __dealloc__(self): * if self.dims: # <<<<<<<<<<<<<< * free(self.dims) * if self.maxdims: */ __pyx_t_1 = (__pyx_v_self->__pyx_base.dims != 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1750 * def __dealloc__(self): * if self.dims: * free(self.dims) # <<<<<<<<<<<<<< * if self.maxdims: * free(self.maxdims) */ free(((void *)__pyx_v_self->__pyx_base.dims)); goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1751 * if self.dims: * free(self.dims) * if self.maxdims: # <<<<<<<<<<<<<< * free(self.maxdims) * if self.dims_chunk: */ __pyx_t_1 = (__pyx_v_self->maxdims != 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1752 * free(self.dims) * if self.maxdims: * free(self.maxdims) # <<<<<<<<<<<<<< * if self.dims_chunk: * free(self.dims_chunk) */ free(((void *)__pyx_v_self->maxdims)); goto __pyx_L4; } __pyx_L4:; /* "tables/hdf5extension.pyx":1753 * if self.maxdims: * free(self.maxdims) * if self.dims_chunk: # <<<<<<<<<<<<<< * free(self.dims_chunk) * */ __pyx_t_1 = (__pyx_v_self->dims_chunk != 0); if (__pyx_t_1) { /* "tables/hdf5extension.pyx":1754 * free(self.maxdims) * if self.dims_chunk: * free(self.dims_chunk) # <<<<<<<<<<<<<< * * */ free(__pyx_v_self->dims_chunk); goto __pyx_L5; } __pyx_L5:; __Pyx_RefNannyFinishContext(); } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_7VLArray_1_create_array(PyObject *__pyx_v_self, PyObject *__pyx_v_title); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_7VLArray_1_create_array(PyObject *__pyx_v_self, PyObject *__pyx_v_title) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_create_array (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_7VLArray__create_array(((struct __pyx_obj_6tables_13hdf5extension_VLArray *)__pyx_v_self), ((PyObject *)__pyx_v_title)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1761 * cdef hsize_t nrecords * * def _create_array(self, object title): # <<<<<<<<<<<<<< * cdef int rank * cdef hsize_t *dims */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray__create_array(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self, PyObject *__pyx_v_title) { int __pyx_v_rank; hsize_t *__pyx_v_dims; void *__pyx_v_rbuf; PyObject *__pyx_v_complib = 0; PyObject *__pyx_v_version = 0; PyObject *__pyx_v_class_ = 0; PyObject *__pyx_v_atom = 0; PyObject *__pyx_v_scatom = 0; PyObject *__pyx_v_encoded_title = 0; PyObject *__pyx_v_encoded_name = 0; enum H5T_cset_t __pyx_v_cset; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; hid_t __pyx_t_6; Py_ssize_t __pyx_t_7; char *__pyx_t_8; char *__pyx_t_9; hsize_t __pyx_t_10; int __pyx_t_11; char *__pyx_t_12; int __pyx_t_13; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *(*__pyx_t_16)(PyObject *); hid_t __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_create_array", 0); /* "tables/hdf5extension.pyx":1769 * cdef object type_, itemsize, atom, scatom * cdef bytes encoded_title, encoded_name * cdef H5T_cset_t cset = H5T_CSET_ASCII # <<<<<<<<<<<<<< * * encoded_title = title.encode('utf-8') */ __pyx_v_cset = H5T_CSET_ASCII; /* "tables/hdf5extension.pyx":1771 * cdef H5T_cset_t cset = H5T_CSET_ASCII * * encoded_title = title.encode('utf-8') # <<<<<<<<<<<<<< * encoded_name = self.name.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 = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_114), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __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 = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_title = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1772 * * encoded_title = title.encode('utf-8') * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * atom = self.atom */ __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 = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_115), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __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 = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1774 * encoded_name = self.name.encode('utf-8') * * atom = self.atom # <<<<<<<<<<<<<< * if not hasattr(atom, 'size'): # it is a pseudo-atom * atom = atom.base */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_atom = __pyx_t_1; __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1775 * * atom = self.atom * if not hasattr(atom, 'size'): # it is a pseudo-atom # <<<<<<<<<<<<<< * atom = atom.base * */ __pyx_t_1 = ((PyObject *)__pyx_n_s__size); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_HasAttr(__pyx_v_atom, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1776 * atom = self.atom * if not hasattr(atom, 'size'): # it is a pseudo-atom * atom = atom.base # <<<<<<<<<<<<<< * * # Get the HDF5 type of the *scalar* atom */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_v_atom); __pyx_v_atom = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1779 * * # Get the HDF5 type of the *scalar* atom * scatom = atom.copy(shape=()) # <<<<<<<<<<<<<< * self.base_type_id = atom_to_hdf5_type(scatom, self.byteorder) * */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__shape), ((PyObject *)__pyx_empty_tuple)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __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; __pyx_v_scatom = __pyx_t_5; __pyx_t_5 = 0; /* "tables/hdf5extension.pyx":1780 * # Get the HDF5 type of the *scalar* atom * scatom = atom.copy(shape=()) * self.base_type_id = atom_to_hdf5_type(scatom, self.byteorder) # <<<<<<<<<<<<<< * * # Allocate space for the dimension axis info */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__atom_to_hdf5_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_scatom); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_scatom); __Pyx_GIVEREF(__pyx_v_scatom); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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 = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx_base.base_type_id = __pyx_t_6; /* "tables/hdf5extension.pyx":1783 * * # Allocate space for the dimension axis info * rank = len(atom.shape) # <<<<<<<<<<<<<< * dims = malloc_dims(atom.shape) * */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_rank = __pyx_t_7; /* "tables/hdf5extension.pyx":1784 * # Allocate space for the dimension axis info * rank = len(atom.shape) * dims = malloc_dims(atom.shape) # <<<<<<<<<<<<<< * * rbuf = NULL # We don't have data to save initially */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_dims = __pyx_f_6tables_14utilsextension_malloc_dims(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1786 * dims = malloc_dims(atom.shape) * * rbuf = NULL # We don't have data to save initially # <<<<<<<<<<<<<< * * # Encode strings */ __pyx_v_rbuf = NULL; /* "tables/hdf5extension.pyx":1789 * * # Encode strings * complib = (self.filters.complib or '').encode('utf-8') # <<<<<<<<<<<<<< * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') */ __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 = 1789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__complib); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!__pyx_t_4) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(((PyObject *)__pyx_kp_s_86)); __pyx_t_2 = __pyx_kp_s_86; } else { __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1789; __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_116), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1789; __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 = 1789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_complib = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1790 * # Encode strings * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') # <<<<<<<<<<<<<< * class_ = self._c_classid.encode('utf-8') * */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___v_version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __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 = 1790; __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_117), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __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 = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_version = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1791 * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') # <<<<<<<<<<<<<< * * # Create the vlarray */ __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 = 1791; __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 = 1791; __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_118), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __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 = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_class_ = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1794 * * # Create the vlarray * self.dataset_id = H5VLARRAYmake(self.parent_id, encoded_name, version, # <<<<<<<<<<<<<< * rank, dims, self.base_type_id, * self.chunkshape[0], rbuf, */ __pyx_t_8 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = PyBytes_AsString(((PyObject *)__pyx_v_version)); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1796 * self.dataset_id = H5VLARRAYmake(self.parent_id, encoded_name, version, * rank, dims, self.base_type_id, * self.chunkshape[0], rbuf, # <<<<<<<<<<<<<< * self.filters.complevel, complib, * self.filters.shuffle, */ __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 = 1796; __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 = 1796; __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 = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1797 * rank, dims, self.base_type_id, * self.chunkshape[0], rbuf, * self.filters.complevel, 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 = 1797; __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 = 1797; __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 = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_complib)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1798 * self.chunkshape[0], rbuf, * self.filters.complevel, complib, * self.filters.shuffle, # <<<<<<<<<<<<<< * self.filters.fletcher32, * rbuf) */ __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 = 1798; __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 = 1798; __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 = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1799 * self.filters.complevel, complib, * self.filters.shuffle, * self.filters.fletcher32, # <<<<<<<<<<<<<< * rbuf) * if dims: */ __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 = 1799; __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 = 1799; __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 = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1794 * * # Create the vlarray * self.dataset_id = H5VLARRAYmake(self.parent_id, encoded_name, version, # <<<<<<<<<<<<<< * rank, dims, self.base_type_id, * self.chunkshape[0], rbuf, */ __pyx_v_self->__pyx_base.dataset_id = H5VLARRAYmake(__pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_8, __pyx_t_9, __pyx_v_rank, __pyx_v_dims, __pyx_v_self->__pyx_base.base_type_id, __pyx_t_10, __pyx_v_rbuf, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_v_rbuf); /* "tables/hdf5extension.pyx":1801 * self.filters.fletcher32, * rbuf) * if dims: # <<<<<<<<<<<<<< * free(dims) * if self.dataset_id < 0: */ __pyx_t_4 = (__pyx_v_dims != 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1802 * rbuf) * if dims: * free(dims) # <<<<<<<<<<<<<< * if self.dataset_id < 0: * raise HDF5ExtError("Problems creating the VLArray.") */ free(((void *)__pyx_v_dims)); goto __pyx_L4; } __pyx_L4:; /* "tables/hdf5extension.pyx":1803 * if dims: * free(dims) * if self.dataset_id < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems creating the VLArray.") * self.nrecords = 0 # Initialize the number of records saved */ __pyx_t_4 = (__pyx_v_self->__pyx_base.dataset_id < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1804 * free(dims) * if self.dataset_id < 0: * raise HDF5ExtError("Problems creating the VLArray.") # <<<<<<<<<<<<<< * self.nrecords = 0 # Initialize the number of records saved * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_120), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __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 = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; /* "tables/hdf5extension.pyx":1805 * if self.dataset_id < 0: * raise HDF5ExtError("Problems creating the VLArray.") * self.nrecords = 0 # Initialize the number of records saved # <<<<<<<<<<<<<< * * if self._v_file.params['PYTABLES_SYS_ATTRS']: */ __pyx_v_self->nrecords = 0; /* "tables/hdf5extension.pyx":1807 * self.nrecords = 0 # Initialize the number of records saved * * 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 = 1807; __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 = 1807; __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 = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1808 * * if self._v_file.params['PYTABLES_SYS_ATTRS']: * if PY_MAJOR_VERSION > 2: # <<<<<<<<<<<<<< * cset = H5T_CSET_UTF8 * # Set the conforming array attributes */ __pyx_t_4 = (PY_MAJOR_VERSION > 2); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1809 * if self._v_file.params['PYTABLES_SYS_ATTRS']: * if PY_MAJOR_VERSION > 2: * cset = H5T_CSET_UTF8 # <<<<<<<<<<<<<< * # Set the conforming array attributes * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, */ __pyx_v_cset = H5T_CSET_UTF8; goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1811 * cset = H5T_CSET_UTF8 * # Set the conforming array attributes * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, # <<<<<<<<<<<<<< * len(class_), cset) * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, */ __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_class_)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1812 * # Set the conforming array attributes * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, * len(class_), cset) # <<<<<<<<<<<<<< * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, * len(version), cset) */ 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 = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_class_)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__CLASS, __pyx_t_12, __pyx_t_7, __pyx_v_cset); /* "tables/hdf5extension.pyx":1813 * H5ATTRset_attribute_string(self.dataset_id, "CLASS", class_, * len(class_), cset) * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, # <<<<<<<<<<<<<< * len(version), cset) * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, */ __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_version)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1814 * len(class_), cset) * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, * len(version), cset) # <<<<<<<<<<<<<< * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, * len(encoded_title), cset) */ if (unlikely(((PyObject *)__pyx_v_version) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_version)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__VERSION, __pyx_t_12, __pyx_t_7, __pyx_v_cset); /* "tables/hdf5extension.pyx":1815 * H5ATTRset_attribute_string(self.dataset_id, "VERSION", version, * len(version), cset) * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, # <<<<<<<<<<<<<< * len(encoded_title), cset) * */ __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_title)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":1816 * len(version), cset) * H5ATTRset_attribute_string(self.dataset_id, "TITLE", encoded_title, * len(encoded_title), cset) # <<<<<<<<<<<<<< * * # Get the datatype handles */ 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 = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_encoded_title)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} H5ATTRset_attribute_string(__pyx_v_self->__pyx_base.dataset_id, __pyx_k__TITLE, __pyx_t_12, __pyx_t_7, __pyx_v_cset); goto __pyx_L6; } __pyx_L6:; /* "tables/hdf5extension.pyx":1819 * * # Get the datatype handles * self.disk_type_id, self.type_id = self._get_type_ids() # <<<<<<<<<<<<<< * * return self.dataset_id */ __pyx_t_1 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_VLArray *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_type_ids(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __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 = 1819; __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_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __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_15 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_5 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L9_unpacking_done:; } __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 = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_17 = __Pyx_PyInt_from_py_hid_t(__pyx_t_5); if (unlikely((__pyx_t_17 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->__pyx_base.disk_type_id = __pyx_t_6; __pyx_v_self->__pyx_base.type_id = __pyx_t_17; /* "tables/hdf5extension.pyx":1821 * self.disk_type_id, self.type_id = self._get_type_ids() * * return self.dataset_id # <<<<<<<<<<<<<< * * _createArray = previous_api(_create_array) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->__pyx_base.dataset_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __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_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("tables.hdf5extension.VLArray._create_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_complib); __Pyx_XDECREF(__pyx_v_version); __Pyx_XDECREF(__pyx_v_class_); __Pyx_XDECREF(__pyx_v_atom); __Pyx_XDECREF(__pyx_v_scatom); __Pyx_XDECREF(__pyx_v_encoded_title); __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_7VLArray_3_open_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_7VLArray_3_open_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_open_array (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_7VLArray_2_open_array(((struct __pyx_obj_6tables_13hdf5extension_VLArray *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1825 * _createArray = previous_api(_create_array) * * def _open_array(self): # <<<<<<<<<<<<<< * cdef char cbyteorder[11] # "irrelevant" fits easily here * cdef int i, enumtype */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_2_open_array(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self) { char __pyx_v_cbyteorder[11]; hsize_t __pyx_v_nrecords; hsize_t __pyx_v_chunksize; PyObject *__pyx_v_encoded_name = 0; PyObject *__pyx_v_byteorder = 0; PyObject *__pyx_v_atom = 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 *); hid_t __pyx_t_8; hid_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_open_array", 0); /* "tables/hdf5extension.pyx":1835 * cdef str byteorder * * 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 = 1835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_121), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1835; __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 = 1835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1838 * * # 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 = 1838; __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/hdf5extension.pyx":1839 * # 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/hdf5extension.pyx":1840 * 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)) * # Get the datatype handles */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "tables/hdf5extension.pyx":1841 * if self.dataset_id < 0: * raise HDF5ExtError("Non-existing node ``%s`` under ``%s``" % * (self.name, self._v_parent._v_pathname)) # <<<<<<<<<<<<<< * # Get the datatype handles * self.disk_type_id, self.type_id = self._get_type_ids() */ __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 = 1841; __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 = 1841; __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 = 1841; __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_75), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1840; __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 = 1840; __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 = 1840; __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 = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1843 * (self.name, self._v_parent._v_pathname)) * # Get the datatype handles * self.disk_type_id, self.type_id = self._get_type_ids() # <<<<<<<<<<<<<< * # Get the atom for this type * atom = atom_from_hdf5_type(self.type_id) */ __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_VLArray *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_type_ids(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); 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 = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __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 = 1843; __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_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_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 = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L5_unpacking_done:; } __pyx_t_8 = __Pyx_PyInt_from_py_hid_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyInt_from_py_hid_t(__pyx_t_2); if (unlikely((__pyx_t_9 == (hid_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx_base.disk_type_id = __pyx_t_8; __pyx_v_self->__pyx_base.type_id = __pyx_t_9; /* "tables/hdf5extension.pyx":1845 * self.disk_type_id, self.type_id = self._get_type_ids() * # Get the atom for this type * atom = atom_from_hdf5_type(self.type_id) # <<<<<<<<<<<<<< * * # Get info on dimensions & types (of base class) */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__atom_from_hdf5_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->__pyx_base.type_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_atom = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1849 * # Get info on dimensions & types (of base class) * H5VLARRAYget_info(self.dataset_id, self.disk_type_id, &nrecords, * cbyteorder) # <<<<<<<<<<<<<< * * byteorder = cstr_to_pystr(cbyteorder) */ H5VLARRAYget_info(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.disk_type_id, (&__pyx_v_nrecords), __pyx_v_cbyteorder); /* "tables/hdf5extension.pyx":1851 * cbyteorder) * * byteorder = cstr_to_pystr(cbyteorder) # <<<<<<<<<<<<<< * * # Get some properties of the atomic type */ __pyx_t_2 = ((PyObject *)__pyx_f_6tables_14utilsextension_cstr_to_pystr(__pyx_v_cbyteorder)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_byteorder = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1854 * * # Get some properties of the atomic type * self._atomicdtype = atom.dtype # <<<<<<<<<<<<<< * self._atomictype = atom.type * self._atomicshape = atom.shape */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___atomicdtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1855 * # Get some properties of the atomic type * self._atomicdtype = atom.dtype * self._atomictype = atom.type # <<<<<<<<<<<<<< * self._atomicshape = atom.shape * self._atomicsize = atom.size */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___atomictype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1856 * self._atomicdtype = atom.dtype * self._atomictype = atom.type * self._atomicshape = atom.shape # <<<<<<<<<<<<<< * self._atomicsize = atom.size * */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___atomicshape, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1857 * self._atomictype = atom.type * self._atomicshape = atom.shape * self._atomicsize = atom.size # <<<<<<<<<<<<<< * * # Get the byteorder */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___atomicsize, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1860 * * # Get the byteorder * self.byteorder = correct_byteorder(atom.type, byteorder) # <<<<<<<<<<<<<< * * # Get the chunkshape (VLArrays are unidimensional entities) */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__correct_byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(__pyx_v_atom, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __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 = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_byteorder)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_byteorder)); __Pyx_GIVEREF(((PyObject *)__pyx_v_byteorder)); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __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_5)); __pyx_t_5 = 0; if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__byteorder, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1863 * * # Get the chunkshape (VLArrays are unidimensional entities) * H5ARRAYget_chunkshape(self.dataset_id, 1, &chunksize) # <<<<<<<<<<<<<< * * self.nrecords = nrecords # Initialize the number of records saved */ H5ARRAYget_chunkshape(__pyx_v_self->__pyx_base.dataset_id, 1, (&__pyx_v_chunksize)); /* "tables/hdf5extension.pyx":1865 * H5ARRAYget_chunkshape(self.dataset_id, 1, &chunksize) * * self.nrecords = nrecords # Initialize the number of records saved # <<<<<<<<<<<<<< * return self.dataset_id, SizeType(nrecords), (SizeType(chunksize),), atom * */ __pyx_v_self->nrecords = __pyx_v_nrecords; /* "tables/hdf5extension.pyx":1866 * * self.nrecords = nrecords # Initialize the number of records saved * return self.dataset_id, SizeType(nrecords), (SizeType(chunksize),), atom # <<<<<<<<<<<<<< * * _openArray = previous_api(_open_array) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_to_py_hid_t(__pyx_v_self->__pyx_base.dataset_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_nrecords); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __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_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_chunksize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_10)); __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); __Pyx_INCREF(__pyx_v_atom); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_atom); __Pyx_GIVEREF(__pyx_v_atom); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_10 = 0; __pyx_r = ((PyObject *)__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_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("tables.hdf5extension.VLArray._open_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XDECREF(__pyx_v_byteorder); __Pyx_XDECREF(__pyx_v_atom); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_7VLArray_5_append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_7VLArray_5_append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_nparr = 0; int __pyx_v_nobjects; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_append (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nparr,&__pyx_n_s__nobjects,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__nparr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nobjects)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_append", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_append") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __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_nparr = ((PyArrayObject *)values[0]); __pyx_v_nobjects = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_nobjects == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_append", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.VLArray._append", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_7VLArray_4_append(((struct __pyx_obj_6tables_13hdf5extension_VLArray *)__pyx_v_self), __pyx_v_nparr, __pyx_v_nobjects); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1870 * _openArray = previous_api(_open_array) * * def _append(self, ndarray nparr, int nobjects): # <<<<<<<<<<<<<< * cdef int ret * cdef void *rbuf */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_4_append(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self, PyArrayObject *__pyx_v_nparr, int __pyx_v_nobjects) { int __pyx_v_ret; void *__pyx_v_rbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_append", 0); /* "tables/hdf5extension.pyx":1875 * * # Get the pointer to the buffer data area * if nobjects: # <<<<<<<<<<<<<< * rbuf = nparr.data * # Convert some NumPy types to HDF5 before storing. */ if (__pyx_v_nobjects) { /* "tables/hdf5extension.pyx":1876 * # Get the pointer to the buffer data area * if nobjects: * rbuf = nparr.data # <<<<<<<<<<<<<< * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': */ __pyx_t_1 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_1; /* "tables/hdf5extension.pyx":1878 * rbuf = nparr.data * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 0) * else: */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1879 * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': * self._convert_time64(nparr, 0) # <<<<<<<<<<<<<< * else: * rbuf = NULL */ __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_VLArray *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } /*else*/ { /* "tables/hdf5extension.pyx":1881 * self._convert_time64(nparr, 0) * else: * rbuf = NULL # <<<<<<<<<<<<<< * * # Append the records: */ __pyx_v_rbuf = NULL; } __pyx_L3:; /* "tables/hdf5extension.pyx":1884 * * # Append the records: * with nogil: # <<<<<<<<<<<<<< * ret = H5VLARRAYappend_records(self.dataset_id, self.type_id, * nobjects, self.nrecords, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1886 * with nogil: * ret = H5VLARRAYappend_records(self.dataset_id, self.type_id, * nobjects, self.nrecords, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5VLARRAYappend_records(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_nobjects, __pyx_v_self->nrecords, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1884 * * # Append the records: * with nogil: # <<<<<<<<<<<<<< * ret = H5VLARRAYappend_records(self.dataset_id, self.type_id, * nobjects, self.nrecords, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1888 * nobjects, self.nrecords, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems appending the records.") * */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1889 * * if ret < 0: * raise HDF5ExtError("Problems appending the records.") # <<<<<<<<<<<<<< * * self.nrecords = self.nrecords + 1 */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_123), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "tables/hdf5extension.pyx":1891 * raise HDF5ExtError("Problems appending the records.") * * self.nrecords = self.nrecords + 1 # <<<<<<<<<<<<<< * * def _modify(self, hsize_t nrow, ndarray nparr, int nobjects): */ __pyx_v_self->nrecords = (__pyx_v_self->nrecords + 1); __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.hdf5extension.VLArray._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_13hdf5extension_7VLArray_7_modify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_7VLArray_7_modify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { hsize_t __pyx_v_nrow; PyArrayObject *__pyx_v_nparr = 0; int __pyx_v_nobjects; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_modify (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nrow,&__pyx_n_s__nparr,&__pyx_n_s__nobjects,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__nrow)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nparr)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_modify", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nobjects)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_modify", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_modify") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __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_nrow = __Pyx_PyInt_from_py_hsize_t(values[0]); if (unlikely((__pyx_v_nrow == (hsize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nparr = ((PyArrayObject *)values[1]); __pyx_v_nobjects = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_nobjects == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_modify", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.VLArray._modify", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nparr), __pyx_ptype_5numpy_ndarray, 1, "nparr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_6tables_13hdf5extension_7VLArray_6_modify(((struct __pyx_obj_6tables_13hdf5extension_VLArray *)__pyx_v_self), __pyx_v_nrow, __pyx_v_nparr, __pyx_v_nobjects); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1893 * self.nrecords = self.nrecords + 1 * * def _modify(self, hsize_t nrow, ndarray nparr, int nobjects): # <<<<<<<<<<<<<< * cdef int ret * cdef void *rbuf */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_6_modify(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self, hsize_t __pyx_v_nrow, PyArrayObject *__pyx_v_nparr, int __pyx_v_nobjects) { int __pyx_v_ret; void *__pyx_v_rbuf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_modify", 0); /* "tables/hdf5extension.pyx":1898 * * # Get the pointer to the buffer data area * rbuf = nparr.data # <<<<<<<<<<<<<< * if nobjects: * # Convert some NumPy types to HDF5 before storing. */ __pyx_t_1 = __pyx_v_nparr->data; __pyx_v_rbuf = __pyx_t_1; /* "tables/hdf5extension.pyx":1899 * # Get the pointer to the buffer data area * rbuf = nparr.data * if nobjects: # <<<<<<<<<<<<<< * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': */ if (__pyx_v_nobjects) { /* "tables/hdf5extension.pyx":1901 * if nobjects: * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 0) * */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1902 * # Convert some NumPy types to HDF5 before storing. * if self.atom.type == 'time64': * self._convert_time64(nparr, 0) # <<<<<<<<<<<<<< * * # Append the records: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_VLArray *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), __pyx_v_nparr, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4; } __pyx_L4:; goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1905 * * # Append the records: * with nogil: # <<<<<<<<<<<<<< * ret = H5VLARRAYmodify_records(self.dataset_id, self.type_id, * nrow, nobjects, rbuf) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1907 * with nogil: * ret = H5VLARRAYmodify_records(self.dataset_id, self.type_id, * nrow, nobjects, rbuf) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5VLARRAYmodify_records(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_nrow, __pyx_v_nobjects, __pyx_v_rbuf); } /* "tables/hdf5extension.pyx":1905 * * # Append the records: * with nogil: # <<<<<<<<<<<<<< * ret = H5VLARRAYmodify_records(self.dataset_id, self.type_id, * nrow, nobjects, rbuf) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1909 * nrow, nobjects, rbuf) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("Problems modifying the record.") * */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1910 * * if ret < 0: * raise HDF5ExtError("Problems modifying the record.") # <<<<<<<<<<<<<< * * return nobjects */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_125), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; /* "tables/hdf5extension.pyx":1912 * raise HDF5ExtError("Problems modifying the record.") * * return nobjects # <<<<<<<<<<<<<< * * # Because the size of each "row" is unknown, there is no easy way to */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyInt_FromLong(__pyx_v_nobjects); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __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.hdf5extension.VLArray._modify", __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_13hdf5extension_7VLArray_9_get_memory_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_7VLArray_9_get_memory_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_memory_size (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_7VLArray_8_get_memory_size(((struct __pyx_obj_6tables_13hdf5extension_VLArray *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1916 * # Because the size of each "row" is unknown, there is no easy way to * # calculate this value * def _get_memory_size(self): # <<<<<<<<<<<<<< * cdef hid_t space_id * cdef hsize_t size */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_8_get_memory_size(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self) { hid_t __pyx_v_space_id; hsize_t __pyx_v_size; herr_t __pyx_v_ret; PyObject *__pyx_r = NULL; __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("_get_memory_size", 0); /* "tables/hdf5extension.pyx":1921 * cdef herr_t ret * * if self.nrows == 0: # <<<<<<<<<<<<<< * size = 0 * else: */ __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 = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1922 * * if self.nrows == 0: * size = 0 # <<<<<<<<<<<<<< * else: * # Get the dataspace handle */ __pyx_v_size = 0; goto __pyx_L3; } /*else*/ { /* "tables/hdf5extension.pyx":1925 * else: * # Get the dataspace handle * space_id = H5Dget_space(self.dataset_id) # <<<<<<<<<<<<<< * # Return the size of the entire dataset * ret = H5Dvlen_get_buf_size(self.dataset_id, self.type_id, space_id, */ __pyx_v_space_id = H5Dget_space(__pyx_v_self->__pyx_base.dataset_id); /* "tables/hdf5extension.pyx":1928 * # Return the size of the entire dataset * ret = H5Dvlen_get_buf_size(self.dataset_id, self.type_id, space_id, * &size) # <<<<<<<<<<<<<< * if ret < 0: * size = -1 */ __pyx_v_ret = H5Dvlen_get_buf_size(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_space_id, (&__pyx_v_size)); /* "tables/hdf5extension.pyx":1929 * ret = H5Dvlen_get_buf_size(self.dataset_id, self.type_id, space_id, * &size) * if ret < 0: # <<<<<<<<<<<<<< * size = -1 * */ __pyx_t_3 = (__pyx_v_ret < 0); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":1930 * &size) * if ret < 0: * size = -1 # <<<<<<<<<<<<<< * * # Terminate access to the dataspace */ __pyx_v_size = -1; goto __pyx_L4; } __pyx_L4:; /* "tables/hdf5extension.pyx":1933 * * # Terminate access to the dataspace * H5Sclose(space_id) # <<<<<<<<<<<<<< * * return size */ H5Sclose(__pyx_v_space_id); } __pyx_L3:; /* "tables/hdf5extension.pyx":1935 * H5Sclose(space_id) * * return size # <<<<<<<<<<<<<< * * def _read_array(self, hsize_t start, hsize_t stop, hsize_t step): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_to_py_hsize_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __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_AddTraceback("tables.hdf5extension.VLArray._get_memory_size", __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_13hdf5extension_7VLArray_11_read_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_7VLArray_11_read_array(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; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_read_array (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("_read_array", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __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("_read_array", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __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_array") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __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 = 1937; __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 = 1937; __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 = 1937; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_read_array", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("tables.hdf5extension.VLArray._read_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6tables_13hdf5extension_7VLArray_10_read_array(((struct __pyx_obj_6tables_13hdf5extension_VLArray *)__pyx_v_self), __pyx_v_start, __pyx_v_stop, __pyx_v_step); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":1937 * return size * * def _read_array(self, hsize_t start, hsize_t stop, hsize_t step): # <<<<<<<<<<<<<< * cdef int i * cdef size_t vllen */ static PyObject *__pyx_pf_6tables_13hdf5extension_7VLArray_10_read_array(struct __pyx_obj_6tables_13hdf5extension_VLArray *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, hsize_t __pyx_v_step) { int __pyx_v_i; size_t __pyx_v_vllen; herr_t __pyx_v_ret; hvl_t *__pyx_v_rdata; hsize_t __pyx_v_nrows; hid_t __pyx_v_space_id; hid_t __pyx_v_mem_space_id; PyObject *__pyx_v_buf = 0; PyObject *__pyx_v_nparr = 0; PyObject *__pyx_v_shape = 0; PyObject *__pyx_v_datalist = 0; 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; size_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_array", 0); /* "tables/hdf5extension.pyx":1948 * * # Compute the number of rows to read * nrows = get_len_of_range(start, stop, step) # <<<<<<<<<<<<<< * if start + nrows > self.nrows: * raise HDF5ExtError( */ __pyx_v_nrows = get_len_of_range(__pyx_v_start, __pyx_v_stop, __pyx_v_step); /* "tables/hdf5extension.pyx":1949 * # Compute the number of rows to read * nrows = get_len_of_range(start, stop, step) * if start + nrows > self.nrows: # <<<<<<<<<<<<<< * raise HDF5ExtError( * "Asking for a range of rows exceeding the available ones!.", */ __pyx_t_1 = __Pyx_PyInt_to_py_hsize_t((__pyx_v_start + __pyx_v_nrows)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __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 = 1949; __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 = 1949; __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 = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1950 * nrows = get_len_of_range(start, stop, step) * if start + nrows > self.nrows: * raise HDF5ExtError( # <<<<<<<<<<<<<< * "Asking for a range of rows exceeding the available ones!.", * h5bt=False) */ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); /* "tables/hdf5extension.pyx":1952 * raise HDF5ExtError( * "Asking for a range of rows exceeding the available ones!.", * h5bt=False) # <<<<<<<<<<<<<< * * # Now, read the chunk of rows */ __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__h5bt), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_127), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __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_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; /* "tables/hdf5extension.pyx":1955 * * # Now, read the chunk of rows * with nogil: # <<<<<<<<<<<<<< * # Allocate the necessary memory for keeping the row handlers * rdata = malloc(nrows*sizeof(hvl_t)) */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "tables/hdf5extension.pyx":1957 * with nogil: * # Allocate the necessary memory for keeping the row handlers * rdata = malloc(nrows*sizeof(hvl_t)) # <<<<<<<<<<<<<< * # Get the dataspace handle * space_id = H5Dget_space(self.dataset_id) */ __pyx_v_rdata = ((hvl_t *)malloc((((size_t)__pyx_v_nrows) * (sizeof(hvl_t))))); /* "tables/hdf5extension.pyx":1959 * rdata = malloc(nrows*sizeof(hvl_t)) * # Get the dataspace handle * space_id = H5Dget_space(self.dataset_id) # <<<<<<<<<<<<<< * # Create a memory dataspace handle * mem_space_id = H5Screate_simple(1, &nrows, NULL) */ __pyx_v_space_id = H5Dget_space(__pyx_v_self->__pyx_base.dataset_id); /* "tables/hdf5extension.pyx":1961 * space_id = H5Dget_space(self.dataset_id) * # Create a memory dataspace handle * mem_space_id = H5Screate_simple(1, &nrows, NULL) # <<<<<<<<<<<<<< * # Select the data to be read * H5Sselect_hyperslab(space_id, H5S_SELECT_SET, &start, &step, &nrows, */ __pyx_v_mem_space_id = H5Screate_simple(1, (&__pyx_v_nrows), NULL); /* "tables/hdf5extension.pyx":1964 * # Select the data to be read * H5Sselect_hyperslab(space_id, H5S_SELECT_SET, &start, &step, &nrows, * NULL) # <<<<<<<<<<<<<< * # Do the actual read * ret = H5Dread(self.dataset_id, self.type_id, mem_space_id, space_id, */ H5Sselect_hyperslab(__pyx_v_space_id, H5S_SELECT_SET, (&__pyx_v_start), (&__pyx_v_step), (&__pyx_v_nrows), NULL); /* "tables/hdf5extension.pyx":1967 * # Do the actual read * ret = H5Dread(self.dataset_id, self.type_id, mem_space_id, space_id, * H5P_DEFAULT, rdata) # <<<<<<<<<<<<<< * * if ret < 0: */ __pyx_v_ret = H5Dread(__pyx_v_self->__pyx_base.dataset_id, __pyx_v_self->__pyx_base.type_id, __pyx_v_mem_space_id, __pyx_v_space_id, H5P_DEFAULT, __pyx_v_rdata); } /* "tables/hdf5extension.pyx":1955 * * # Now, read the chunk of rows * with nogil: # <<<<<<<<<<<<<< * # Allocate the necessary memory for keeping the row handlers * rdata = malloc(nrows*sizeof(hvl_t)) */ /*finally:*/ { Py_BLOCK_THREADS } } /* "tables/hdf5extension.pyx":1969 * H5P_DEFAULT, rdata) * * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError( * "VLArray._read_array: Problems reading the array data.") */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1970 * * if ret < 0: * raise HDF5ExtError( # <<<<<<<<<<<<<< * "VLArray._read_array: Problems reading the array data.") * */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_129), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __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 = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; /* "tables/hdf5extension.pyx":1973 * "VLArray._read_array: Problems reading the array data.") * * datalist = [] # <<<<<<<<<<<<<< * for i from 0 <= i < nrows: * # Number of atoms in row */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_datalist = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":1974 * * datalist = [] * for i from 0 <= i < nrows: # <<<<<<<<<<<<<< * # Number of atoms in row * vllen = rdata[i].len */ __pyx_t_5 = __pyx_v_nrows; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { /* "tables/hdf5extension.pyx":1976 * for i from 0 <= i < nrows: * # Number of atoms in row * vllen = rdata[i].len # <<<<<<<<<<<<<< * # Get the pointer to the buffer data area * if vllen > 0: */ __pyx_t_6 = (__pyx_v_rdata[__pyx_v_i]).len; __pyx_v_vllen = __pyx_t_6; /* "tables/hdf5extension.pyx":1978 * vllen = rdata[i].len * # Get the pointer to the buffer data area * if vllen > 0: # <<<<<<<<<<<<<< * # Create a buffer to keep this info. It is important to do a * # copy, because we will dispose the buffer memory later on by */ __pyx_t_4 = (__pyx_v_vllen > 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1983 * # calling the H5Dvlen_reclaim. PyBytes_FromStringAndSize does this. * buf = PyBytes_FromStringAndSize(rdata[i].p, * vllen*self._atomicsize) # <<<<<<<<<<<<<< * else: * # Case where there is info with zero lentgh */ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_vllen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___atomicsize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = ((PyObject *)PyBytes_FromStringAndSize(((char *)(__pyx_v_rdata[__pyx_v_i]).p), __pyx_t_7)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_v_buf); __pyx_v_buf = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L10; } /*else*/ { /* "tables/hdf5extension.pyx":1986 * else: * # Case where there is info with zero lentgh * buf = None # <<<<<<<<<<<<<< * # Compute the shape for the read array * shape = list(self._atomicshape) */ __Pyx_INCREF(Py_None); __Pyx_XDECREF(__pyx_v_buf); __pyx_v_buf = Py_None; } __pyx_L10:; /* "tables/hdf5extension.pyx":1988 * buf = None * # Compute the shape for the read array * shape = list(self._atomicshape) # <<<<<<<<<<<<<< * shape.insert(0, vllen) # put the length at the beginning of the shape * nparr = numpy.ndarray( */ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___atomicshape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_v_shape); __pyx_v_shape = __pyx_t_3; __pyx_t_3 = 0; /* "tables/hdf5extension.pyx":1989 * # Compute the shape for the read array * shape = list(self._atomicshape) * shape.insert(0, vllen) # put the length at the beginning of the shape # <<<<<<<<<<<<<< * nparr = numpy.ndarray( * buffer=buf, dtype=self._atomicdtype.base, shape=shape) */ __pyx_t_3 = PyObject_GetAttr(__pyx_v_shape, __pyx_n_s__insert); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_vllen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __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 = 1989; __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1990 * shape = list(self._atomicshape) * shape.insert(0, vllen) # put the length at the beginning of the shape * nparr = numpy.ndarray( # <<<<<<<<<<<<<< * buffer=buf, dtype=self._atomicdtype.base, shape=shape) * # Set the writeable flag for this ndarray object */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__ndarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __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 = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); /* "tables/hdf5extension.pyx":1991 * shape.insert(0, vllen) # put the length at the beginning of the shape * nparr = numpy.ndarray( * buffer=buf, dtype=self._atomicdtype.base, shape=shape) # <<<<<<<<<<<<<< * # Set the writeable flag for this ndarray object * nparr.flags.writeable = True */ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__buffer), __pyx_v_buf) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___atomicdtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__base); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__shape), __pyx_v_shape) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_v_nparr); __pyx_v_nparr = __pyx_t_8; __pyx_t_8 = 0; /* "tables/hdf5extension.pyx":1993 * buffer=buf, dtype=self._atomicdtype.base, shape=shape) * # Set the writeable flag for this ndarray object * nparr.flags.writeable = True # <<<<<<<<<<<<<< * if self.atom.kind == 'time': * # Swap the byteorder by hand (this is not currently supported by HDF5) */ __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_GetAttr(__pyx_v_nparr, __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_t_1, __pyx_n_s__writeable, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "tables/hdf5extension.pyx":1994 * # Set the writeable flag for this ndarray object * nparr.flags.writeable = True * if self.atom.kind == 'time': # <<<<<<<<<<<<<< * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__kind); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__time), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1996 * if self.atom.kind == 'time': * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: # <<<<<<<<<<<<<< * nparr.byteswap(True) * # Convert some HDF5 types to NumPy after reading. */ __pyx_t_1 = PyInt_FromLong(H5Tget_order(__pyx_v_self->__pyx_base.type_id)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__platform_byteorder); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":1997 * # Swap the byteorder by hand (this is not currently supported by HDF5) * if H5Tget_order(self.type_id) != platform_byteorder: * nparr.byteswap(True) # <<<<<<<<<<<<<< * # Convert some HDF5 types to NumPy after reading. * if self.atom.type == 'time64': */ __pyx_t_2 = PyObject_GetAttr(__pyx_v_nparr, __pyx_n_s__byteswap); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1997; __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_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12; } __pyx_L12:; goto __pyx_L11; } __pyx_L11:; /* "tables/hdf5extension.pyx":1999 * nparr.byteswap(True) * # Convert some HDF5 types to NumPy after reading. * if self.atom.type == 'time64': # <<<<<<<<<<<<<< * self._convert_time64(nparr, 1) * # Append this array to the output list */ __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__atom); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __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_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__time64), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_4) { /* "tables/hdf5extension.pyx":2000 * # Convert some HDF5 types to NumPy after reading. * if self.atom.type == 'time64': * self._convert_time64(nparr, 1) # <<<<<<<<<<<<<< * # Append this array to the output list * datalist.append(nparr) */ if (!(likely(((__pyx_v_nparr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_nparr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __pyx_v_nparr; __Pyx_INCREF(__pyx_t_8); __pyx_t_1 = ((struct __pyx_vtabstruct_6tables_13hdf5extension_VLArray *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._convert_time64(((struct __pyx_obj_6tables_13hdf5extension_Leaf *)__pyx_v_self), ((PyArrayObject *)__pyx_t_8), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L13; } __pyx_L13:; /* "tables/hdf5extension.pyx":2002 * self._convert_time64(nparr, 1) * # Append this array to the output list * datalist.append(nparr) # <<<<<<<<<<<<<< * * # Release resources */ __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_datalist, __pyx_v_nparr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "tables/hdf5extension.pyx":2006 * # Release resources * # Reclaim all the (nested) VL data * ret = H5Dvlen_reclaim(self.type_id, mem_space_id, H5P_DEFAULT, rdata) # <<<<<<<<<<<<<< * if ret < 0: * raise HDF5ExtError("VLArray._read_array: error freeing the data buffer.") */ __pyx_v_ret = H5Dvlen_reclaim(__pyx_v_self->__pyx_base.type_id, __pyx_v_mem_space_id, H5P_DEFAULT, __pyx_v_rdata); /* "tables/hdf5extension.pyx":2007 * # Reclaim all the (nested) VL data * ret = H5Dvlen_reclaim(self.type_id, mem_space_id, H5P_DEFAULT, rdata) * if ret < 0: # <<<<<<<<<<<<<< * raise HDF5ExtError("VLArray._read_array: error freeing the data buffer.") * # Terminate access to the memory dataspace */ __pyx_t_4 = (__pyx_v_ret < 0); if (__pyx_t_4) { /* "tables/hdf5extension.pyx":2008 * ret = H5Dvlen_reclaim(self.type_id, mem_space_id, H5P_DEFAULT, rdata) * if ret < 0: * raise HDF5ExtError("VLArray._read_array: error freeing the data buffer.") # <<<<<<<<<<<<<< * # Terminate access to the memory dataspace * H5Sclose(mem_space_id) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__HDF5ExtError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_131), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L14; } __pyx_L14:; /* "tables/hdf5extension.pyx":2010 * raise HDF5ExtError("VLArray._read_array: error freeing the data buffer.") * # Terminate access to the memory dataspace * H5Sclose(mem_space_id) # <<<<<<<<<<<<<< * # Terminate access to the dataspace * H5Sclose(space_id) */ H5Sclose(__pyx_v_mem_space_id); /* "tables/hdf5extension.pyx":2012 * H5Sclose(mem_space_id) * # Terminate access to the dataspace * H5Sclose(space_id) # <<<<<<<<<<<<<< * # Free the amount of row pointers to VL row data * free(rdata) */ H5Sclose(__pyx_v_space_id); /* "tables/hdf5extension.pyx":2014 * H5Sclose(space_id) * # Free the amount of row pointers to VL row data * free(rdata) # <<<<<<<<<<<<<< * * return datalist */ free(__pyx_v_rdata); /* "tables/hdf5extension.pyx":2016 * free(rdata) * * return datalist # <<<<<<<<<<<<<< * * _readArray = previous_api(_read_array) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_datalist); __pyx_r = __pyx_v_datalist; 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_XDECREF(__pyx_t_8); __Pyx_AddTraceback("tables.hdf5extension.VLArray._read_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_nparr); __Pyx_XDECREF(__pyx_v_shape); __Pyx_XDECREF(__pyx_v_datalist); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_13UnImplemented_1_open_unimplemented(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_13UnImplemented_1_open_unimplemented(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_open_unimplemented (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_13UnImplemented__open_unimplemented(((struct __pyx_obj_6tables_13hdf5extension_UnImplemented *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":2023 * cdef class UnImplemented(Leaf): * * def _open_unimplemented(self): # <<<<<<<<<<<<<< * cdef object shape * cdef char cbyteorder[11] # "irrelevant" fits easily here */ static PyObject *__pyx_pf_6tables_13hdf5extension_13UnImplemented__open_unimplemented(struct __pyx_obj_6tables_13hdf5extension_UnImplemented *__pyx_v_self) { PyObject *__pyx_v_shape = 0; char __pyx_v_cbyteorder[11]; PyObject *__pyx_v_encoded_name = 0; PyObject *__pyx_v_byteorder = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; char *__pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_open_unimplemented", 0); /* "tables/hdf5extension.pyx":2029 * cdef str byteorder * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Get info on dimensions */ __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 = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_132), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __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 = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_encoded_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":2032 * * # Get info on dimensions * shape = H5UIget_info(self.parent_id, encoded_name, cbyteorder) # <<<<<<<<<<<<<< * shape = tuple(map(SizeType, shape)) * self.dataset_id = H5Dopen(self.parent_id, encoded_name, H5P_DEFAULT) */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = H5UIget_info(__pyx_v_self->__pyx_base.__pyx_base.parent_id, __pyx_t_3, __pyx_v_cbyteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_shape = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":2033 * # Get info on dimensions * shape = H5UIget_info(self.parent_id, encoded_name, cbyteorder) * shape = tuple(map(SizeType, shape)) # <<<<<<<<<<<<<< * self.dataset_id = H5Dopen(self.parent_id, encoded_name, H5P_DEFAULT) * byteorder = cstr_to_pystr(cbyteorder) */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__SizeType); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __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 = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_v_shape); __pyx_v_shape = __pyx_t_2; __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":2034 * shape = H5UIget_info(self.parent_id, encoded_name, cbyteorder) * shape = tuple(map(SizeType, shape)) * self.dataset_id = H5Dopen(self.parent_id, encoded_name, H5P_DEFAULT) # <<<<<<<<<<<<<< * byteorder = cstr_to_pystr(cbyteorder) * */ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_encoded_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __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/hdf5extension.pyx":2035 * shape = tuple(map(SizeType, shape)) * self.dataset_id = H5Dopen(self.parent_id, encoded_name, H5P_DEFAULT) * byteorder = cstr_to_pystr(cbyteorder) # <<<<<<<<<<<<<< * * return (shape, byteorder, self.dataset_id) */ __pyx_t_2 = ((PyObject *)__pyx_f_6tables_14utilsextension_cstr_to_pystr(__pyx_v_cbyteorder)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_byteorder = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":2037 * byteorder = cstr_to_pystr(cbyteorder) * * return (shape, byteorder, self.dataset_id) # <<<<<<<<<<<<<< * * def _g_close(self): */ __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 = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); __Pyx_INCREF(((PyObject *)__pyx_v_byteorder)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_byteorder)); __Pyx_GIVEREF(((PyObject *)__pyx_v_byteorder)); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = ((PyObject *)__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_XDECREF(__pyx_t_2); __Pyx_AddTraceback("tables.hdf5extension.UnImplemented._open_unimplemented", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_shape); __Pyx_XDECREF(__pyx_v_encoded_name); __Pyx_XDECREF(__pyx_v_byteorder); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6tables_13hdf5extension_13UnImplemented_3_g_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6tables_13hdf5extension_13UnImplemented_3_g_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_close (wrapper)", 0); __pyx_r = __pyx_pf_6tables_13hdf5extension_13UnImplemented_2_g_close(((struct __pyx_obj_6tables_13hdf5extension_UnImplemented *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "tables/hdf5extension.pyx":2039 * return (shape, byteorder, self.dataset_id) * * def _g_close(self): # <<<<<<<<<<<<<< * H5Dclose(self.dataset_id) * */ static PyObject *__pyx_pf_6tables_13hdf5extension_13UnImplemented_2_g_close(struct __pyx_obj_6tables_13hdf5extension_UnImplemented *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_g_close", 0); /* "tables/hdf5extension.pyx":2040 * * def _g_close(self): * H5Dclose(self.dataset_id) # <<<<<<<<<<<<<< * * */ H5Dclose(__pyx_v_self->__pyx_base.dataset_id); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __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_134), 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_136), 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_138), 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_139), __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_141), 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_142), 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_144), 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_139), __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 PyObject *__pyx_tp_new_6tables_13hdf5extension_Node(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6tables_13hdf5extension_Node *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; p = ((struct __pyx_obj_6tables_13hdf5extension_Node *)o); p->name = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6tables_13hdf5extension_Node(PyObject *o) { struct __pyx_obj_6tables_13hdf5extension_Node *p = (struct __pyx_obj_6tables_13hdf5extension_Node *)o; PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6tables_13hdf5extension_4Node_5__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->name); PyObject_GC_Track(o); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6tables_13hdf5extension_Node(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6tables_13hdf5extension_Node *p = (struct __pyx_obj_6tables_13hdf5extension_Node *)o; if (p->name) { e = (*v)(p->name, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6tables_13hdf5extension_Node(PyObject *o) { struct __pyx_obj_6tables_13hdf5extension_Node *p = (struct __pyx_obj_6tables_13hdf5extension_Node *)o; PyObject* tmp; tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6tables_13hdf5extension_Node[] = { {__Pyx_NAMESTR("_g_new"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4Node_1_g_new, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_delete"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4Node_3_g_delete, METH_O, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Node = { 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_Node = { 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_Node = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Node = { #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_13hdf5extension_Node = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.hdf5extension.Node"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_13hdf5extension_Node), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_13hdf5extension_Node, /*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_Node, /*tp_as_number*/ &__pyx_tp_as_sequence_Node, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Node, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Node, /*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_13hdf5extension_Node, /*tp_traverse*/ __pyx_tp_clear_6tables_13hdf5extension_Node, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6tables_13hdf5extension_Node, /*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_13hdf5extension_Node, /*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_13hdf5extension_Leaf __pyx_vtable_6tables_13hdf5extension_Leaf; static PyObject *__pyx_tp_new_6tables_13hdf5extension_Leaf(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6tables_13hdf5extension_Leaf *p; PyObject *o = __pyx_tp_new_6tables_13hdf5extension_Node(t, a, k); if (!o) return 0; p = ((struct __pyx_obj_6tables_13hdf5extension_Leaf *)o); p->__pyx_vtab = __pyx_vtabptr_6tables_13hdf5extension_Leaf; return o; } static PyMethodDef __pyx_methods_6tables_13hdf5extension_Leaf[] = { {__Pyx_NAMESTR("_get_storage_size"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4Leaf_1_get_storage_size, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_new"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4Leaf_3_g_new, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_truncate"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4Leaf_5_g_truncate, METH_O, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_4Leaf_4_g_truncate)}, {__Pyx_NAMESTR("_g_flush"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4Leaf_7_g_flush, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_close"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4Leaf_9_g_close, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Leaf = { 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_Leaf = { 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_Leaf = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Leaf = { #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_13hdf5extension_Leaf = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.hdf5extension.Leaf"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_13hdf5extension_Leaf), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_13hdf5extension_Node, /*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_Leaf, /*tp_as_number*/ &__pyx_tp_as_sequence_Leaf, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Leaf, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Leaf, /*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_13hdf5extension_Node, /*tp_traverse*/ __pyx_tp_clear_6tables_13hdf5extension_Node, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6tables_13hdf5extension_Leaf, /*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_13hdf5extension_Leaf, /*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_13hdf5extension_Array __pyx_vtable_6tables_13hdf5extension_Array; static PyObject *__pyx_tp_new_6tables_13hdf5extension_Array(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6tables_13hdf5extension_Array *p; PyObject *o = __pyx_tp_new_6tables_13hdf5extension_Node(t, a, k); if (!o) return 0; p = ((struct __pyx_obj_6tables_13hdf5extension_Array *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__pyx_vtabptr_6tables_13hdf5extension_Array; return o; } static void __pyx_tp_dealloc_6tables_13hdf5extension_Array(PyObject *o) { PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6tables_13hdf5extension_5Array_25__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } PyObject_GC_Track(o); __pyx_tp_dealloc_6tables_13hdf5extension_Node(o); } static PyMethodDef __pyx_methods_6tables_13hdf5extension_Array[] = { {__Pyx_NAMESTR("_create_array"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_1_create_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_create_carray"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_3_create_carray, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_open_array"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_5_open_array, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_append"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_7_append, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_read_array"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_9_read_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_read_slice"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_11_g_read_slice, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_read_coords"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_13_g_read_coords, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Array_12_g_read_coords)}, {__Pyx_NAMESTR("perform_selection"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_15perform_selection, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Array_14perform_selection)}, {__Pyx_NAMESTR("_g_read_selection"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_17_g_read_selection, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Array_16_g_read_selection)}, {__Pyx_NAMESTR("_g_write_slice"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_19_g_write_slice, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Array_18_g_write_slice)}, {__Pyx_NAMESTR("_g_write_coords"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_21_g_write_coords, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Array_20_g_write_coords)}, {__Pyx_NAMESTR("_g_write_selection"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Array_23_g_write_selection, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Array_22_g_write_selection)}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Array = { 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_Array = { 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_Array = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Array = { #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_13hdf5extension_Array = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.hdf5extension.Array"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_13hdf5extension_Array), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_13hdf5extension_Array, /*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_Array, /*tp_as_number*/ &__pyx_tp_as_sequence_Array, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Array, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Array, /*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_13hdf5extension_Node, /*tp_traverse*/ __pyx_tp_clear_6tables_13hdf5extension_Node, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6tables_13hdf5extension_Array, /*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_13hdf5extension_Array, /*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 PyObject *__pyx_tp_new_6tables_13hdf5extension_File(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6tables_13hdf5extension_File *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; p = ((struct __pyx_obj_6tables_13hdf5extension_File *)o); p->name = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6tables_13hdf5extension_File(PyObject *o) { struct __pyx_obj_6tables_13hdf5extension_File *p = (struct __pyx_obj_6tables_13hdf5extension_File *)o; PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6tables_13hdf5extension_4File_17__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->name); PyObject_GC_Track(o); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6tables_13hdf5extension_File(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6tables_13hdf5extension_File *p = (struct __pyx_obj_6tables_13hdf5extension_File *)o; if (p->name) { e = (*v)(p->name, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6tables_13hdf5extension_File(PyObject *o) { struct __pyx_obj_6tables_13hdf5extension_File *p = (struct __pyx_obj_6tables_13hdf5extension_File *)o; PyObject* tmp; tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6tables_13hdf5extension_File[] = { {__Pyx_NAMESTR("_g_new"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4File_1_g_new, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("get_file_image"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4File_3get_file_image, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_4File_2get_file_image)}, {__Pyx_NAMESTR("get_filesize"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4File_5get_filesize, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_4File_4get_filesize)}, {__Pyx_NAMESTR("get_userblock_size"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4File_7get_userblock_size, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_4File_6get_userblock_size)}, {__Pyx_NAMESTR("_get_file_id"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4File_9_get_file_id, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("fileno"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4File_11fileno, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_4File_10fileno)}, {__Pyx_NAMESTR("_flush_file"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4File_13_flush_file, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_close_file"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_4File_15_close_file, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_File = { 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_File = { 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_File = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_File = { #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_13hdf5extension_File = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.hdf5extension.File"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_13hdf5extension_File), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_13hdf5extension_File, /*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_File, /*tp_as_number*/ &__pyx_tp_as_sequence_File, /*tp_as_sequence*/ &__pyx_tp_as_mapping_File, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_File, /*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_13hdf5extension_File, /*tp_traverse*/ __pyx_tp_clear_6tables_13hdf5extension_File, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6tables_13hdf5extension_File, /*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_13hdf5extension_File, /*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 PyObject *__pyx_tp_new_6tables_13hdf5extension_AttributeSet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6tables_13hdf5extension_AttributeSet *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; p = ((struct __pyx_obj_6tables_13hdf5extension_AttributeSet *)o); p->name = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6tables_13hdf5extension_AttributeSet(PyObject *o) { struct __pyx_obj_6tables_13hdf5extension_AttributeSet *p = (struct __pyx_obj_6tables_13hdf5extension_AttributeSet *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->name); PyObject_GC_Track(o); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6tables_13hdf5extension_AttributeSet(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6tables_13hdf5extension_AttributeSet *p = (struct __pyx_obj_6tables_13hdf5extension_AttributeSet *)o; if (p->name) { e = (*v)(p->name, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6tables_13hdf5extension_AttributeSet(PyObject *o) { struct __pyx_obj_6tables_13hdf5extension_AttributeSet *p = (struct __pyx_obj_6tables_13hdf5extension_AttributeSet *)o; PyObject* tmp; tmp = ((PyObject*)p->name); p->name = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6tables_13hdf5extension_AttributeSet[] = { {__Pyx_NAMESTR("_g_new"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_12AttributeSet_1_g_new, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_list_attr"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_12AttributeSet_3_g_list_attr, METH_O, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_12AttributeSet_2_g_list_attr)}, {__Pyx_NAMESTR("_g_setattr"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_12AttributeSet_5_g_setattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_12AttributeSet_4_g_setattr)}, {__Pyx_NAMESTR("_g_getattr"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_12AttributeSet_7_g_getattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_12AttributeSet_6_g_getattr)}, {__Pyx_NAMESTR("_g_remove"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_12AttributeSet_9_g_remove, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_AttributeSet = { 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_AttributeSet = { 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_AttributeSet = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_AttributeSet = { #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_13hdf5extension_AttributeSet = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.hdf5extension.AttributeSet"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_13hdf5extension_AttributeSet), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_13hdf5extension_AttributeSet, /*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_AttributeSet, /*tp_as_number*/ &__pyx_tp_as_sequence_AttributeSet, /*tp_as_sequence*/ &__pyx_tp_as_mapping_AttributeSet, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_AttributeSet, /*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_13hdf5extension_AttributeSet, /*tp_traverse*/ __pyx_tp_clear_6tables_13hdf5extension_AttributeSet, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6tables_13hdf5extension_AttributeSet, /*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_13hdf5extension_AttributeSet, /*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 PyObject *__pyx_tp_new_6tables_13hdf5extension_Group(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6tables_13hdf5extension_Node(t, a, k); if (!o) return 0; return o; } static PyMethodDef __pyx_methods_6tables_13hdf5extension_Group[] = { {__Pyx_NAMESTR("_g_create"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Group_1_g_create, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_open"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Group_3_g_open, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_get_objinfo"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Group_5_g_get_objinfo, METH_O, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Group_4_g_get_objinfo)}, {__Pyx_NAMESTR("_g_list_group"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Group_7_g_list_group, METH_O, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Group_6_g_list_group)}, {__Pyx_NAMESTR("_g_get_gchild_attr"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Group_9_g_get_gchild_attr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Group_8_g_get_gchild_attr)}, {__Pyx_NAMESTR("_g_get_lchild_attr"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Group_11_g_get_lchild_attr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6tables_13hdf5extension_5Group_10_g_get_lchild_attr)}, {__Pyx_NAMESTR("_g_flush_group"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Group_13_g_flush_group, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_close_group"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Group_15_g_close_group, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_move_node"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_5Group_17_g_move_node, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Group = { 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_Group = { 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_Group = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Group = { #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_13hdf5extension_Group = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.hdf5extension.Group"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_13hdf5extension_Group), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_13hdf5extension_Node, /*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_Group, /*tp_as_number*/ &__pyx_tp_as_sequence_Group, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Group, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Group, /*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_13hdf5extension_Node, /*tp_traverse*/ __pyx_tp_clear_6tables_13hdf5extension_Node, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6tables_13hdf5extension_Group, /*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_13hdf5extension_Group, /*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_13hdf5extension_VLArray __pyx_vtable_6tables_13hdf5extension_VLArray; static PyObject *__pyx_tp_new_6tables_13hdf5extension_VLArray(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6tables_13hdf5extension_VLArray *p; PyObject *o = __pyx_tp_new_6tables_13hdf5extension_Node(t, a, k); if (!o) return 0; p = ((struct __pyx_obj_6tables_13hdf5extension_VLArray *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__pyx_vtabptr_6tables_13hdf5extension_VLArray; return o; } static PyMethodDef __pyx_methods_6tables_13hdf5extension_VLArray[] = { {__Pyx_NAMESTR("_create_array"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_7VLArray_1_create_array, METH_O, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_open_array"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_7VLArray_3_open_array, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_append"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_7VLArray_5_append, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_modify"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_7VLArray_7_modify, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_get_memory_size"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_7VLArray_9_get_memory_size, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_read_array"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_7VLArray_11_read_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_VLArray = { 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_VLArray = { 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_VLArray = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_VLArray = { #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_13hdf5extension_VLArray = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.hdf5extension.VLArray"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_13hdf5extension_VLArray), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_13hdf5extension_Node, /*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_VLArray, /*tp_as_number*/ &__pyx_tp_as_sequence_VLArray, /*tp_as_sequence*/ &__pyx_tp_as_mapping_VLArray, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_VLArray, /*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_13hdf5extension_Node, /*tp_traverse*/ __pyx_tp_clear_6tables_13hdf5extension_Node, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6tables_13hdf5extension_VLArray, /*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_13hdf5extension_VLArray, /*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_13hdf5extension_UnImplemented __pyx_vtable_6tables_13hdf5extension_UnImplemented; static PyObject *__pyx_tp_new_6tables_13hdf5extension_UnImplemented(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6tables_13hdf5extension_UnImplemented *p; PyObject *o = __pyx_tp_new_6tables_13hdf5extension_Node(t, a, k); if (!o) return 0; p = ((struct __pyx_obj_6tables_13hdf5extension_UnImplemented *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__pyx_vtabptr_6tables_13hdf5extension_UnImplemented; return o; } static PyMethodDef __pyx_methods_6tables_13hdf5extension_UnImplemented[] = { {__Pyx_NAMESTR("_open_unimplemented"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_13UnImplemented_1_open_unimplemented, METH_NOARGS, __Pyx_DOCSTR(0)}, {__Pyx_NAMESTR("_g_close"), (PyCFunction)__pyx_pw_6tables_13hdf5extension_13UnImplemented_3_g_close, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_UnImplemented = { 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_UnImplemented = { 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_UnImplemented = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_UnImplemented = { #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_13hdf5extension_UnImplemented = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("tables.hdf5extension.UnImplemented"), /*tp_name*/ sizeof(struct __pyx_obj_6tables_13hdf5extension_UnImplemented), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6tables_13hdf5extension_Node, /*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_UnImplemented, /*tp_as_number*/ &__pyx_tp_as_sequence_UnImplemented, /*tp_as_sequence*/ &__pyx_tp_as_mapping_UnImplemented, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_UnImplemented, /*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_13hdf5extension_Node, /*tp_traverse*/ __pyx_tp_clear_6tables_13hdf5extension_Node, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6tables_13hdf5extension_UnImplemented, /*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_13hdf5extension_UnImplemented, /*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("hdf5extension"), __Pyx_DOCSTR(__pyx_k_145), /* 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_b_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0, 0}, {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, {&__pyx_kp_s_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 1, 0}, {&__pyx_kp_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 0}, {&__pyx_kp_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 0}, {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, {&__pyx_kp_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 0}, {&__pyx_kp_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 0}, {&__pyx_kp_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 0}, {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0}, {&__pyx_kp_s_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 0, 1, 0}, {&__pyx_kp_s_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 1, 0}, {&__pyx_kp_s_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 1, 0}, {&__pyx_kp_s_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 1, 0}, {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, {&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 0}, {&__pyx_kp_u_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 1, 0, 0}, {&__pyx_kp_u_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 1, 0, 0}, {&__pyx_kp_u_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 1, 0, 0}, {&__pyx_kp_u_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 1, 0, 0}, {&__pyx_kp_u_140, __pyx_k_140, sizeof(__pyx_k_140), 0, 1, 0, 0}, {&__pyx_kp_u_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 1, 0, 0}, {&__pyx_n_s_146, __pyx_k_146, sizeof(__pyx_k_146), 0, 0, 1, 1}, {&__pyx_n_s_147, __pyx_k_147, sizeof(__pyx_k_147), 0, 0, 1, 1}, {&__pyx_n_s_148, __pyx_k_148, sizeof(__pyx_k_148), 0, 0, 1, 1}, {&__pyx_n_s_149, __pyx_k_149, sizeof(__pyx_k_149), 0, 0, 1, 1}, {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, {&__pyx_n_s_150, __pyx_k_150, sizeof(__pyx_k_150), 0, 0, 1, 1}, {&__pyx_n_s_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 1, 1}, {&__pyx_n_s_152, __pyx_k_152, sizeof(__pyx_k_152), 0, 0, 1, 1}, {&__pyx_n_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 1}, {&__pyx_n_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 1}, {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, {&__pyx_n_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 1}, {&__pyx_n_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 1}, {&__pyx_n_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 1}, {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, {&__pyx_n_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 1}, {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0}, {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0}, {&__pyx_n_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 1}, {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0}, {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0}, {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0}, {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0}, {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0}, {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0}, {&__pyx_kp_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 0}, {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0}, {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0}, {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0}, {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0}, {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0}, {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0}, {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0}, {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0}, {&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0}, {&__pyx_kp_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 0}, {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0}, {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, {&__pyx_kp_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 0}, {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0}, {&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0}, {&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0}, {&__pyx_kp_s_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 1, 0}, {&__pyx_n_s__AND, __pyx_k__AND, sizeof(__pyx_k__AND), 0, 0, 1, 1}, {&__pyx_n_s__Atom, __pyx_k__Atom, sizeof(__pyx_k__Atom), 0, 0, 1, 1}, {&__pyx_n_s__CArray, __pyx_k__CArray, sizeof(__pyx_k__CArray), 0, 0, 1, 1}, {&__pyx_n_s__CHUNK_CACHE_NELMTS, __pyx_k__CHUNK_CACHE_NELMTS, sizeof(__pyx_k__CHUNK_CACHE_NELMTS), 0, 0, 1, 1}, {&__pyx_n_s__CHUNK_CACHE_PREEMPT, __pyx_k__CHUNK_CACHE_PREEMPT, sizeof(__pyx_k__CHUNK_CACHE_PREEMPT), 0, 0, 1, 1}, {&__pyx_n_s__CHUNK_CACHE_SIZE, __pyx_k__CHUNK_CACHE_SIZE, sizeof(__pyx_k__CHUNK_CACHE_SIZE), 0, 0, 1, 1}, {&__pyx_n_s__DRIVER, __pyx_k__DRIVER, sizeof(__pyx_k__DRIVER), 0, 0, 1, 1}, {&__pyx_n_s__DRIVER_CORE_IMAGE, __pyx_k__DRIVER_CORE_IMAGE, sizeof(__pyx_k__DRIVER_CORE_IMAGE), 0, 0, 1, 1}, {&__pyx_n_s__DataTypeWarning, __pyx_k__DataTypeWarning, sizeof(__pyx_k__DataTypeWarning), 0, 0, 1, 1}, {&__pyx_n_s__EArray, __pyx_k__EArray, sizeof(__pyx_k__EArray), 0, 0, 1, 1}, {&__pyx_n_s__ExternalLink, __pyx_k__ExternalLink, sizeof(__pyx_k__ExternalLink), 0, 0, 1, 1}, {&__pyx_n_s__Group, __pyx_k__Group, sizeof(__pyx_k__Group), 0, 0, 1, 1}, {&__pyx_n_s__H5FD_CORE, __pyx_k__H5FD_CORE, sizeof(__pyx_k__H5FD_CORE), 0, 0, 1, 1}, {&__pyx_n_s__H5FD_DIRECT, __pyx_k__H5FD_DIRECT, sizeof(__pyx_k__H5FD_DIRECT), 0, 0, 1, 1}, {&__pyx_n_s__H5FD_SEC2, __pyx_k__H5FD_SEC2, sizeof(__pyx_k__H5FD_SEC2), 0, 0, 1, 1}, {&__pyx_n_s__H5FD_STDIO, __pyx_k__H5FD_STDIO, sizeof(__pyx_k__H5FD_STDIO), 0, 0, 1, 1}, {&__pyx_n_s__H5FD_WINDOWS, __pyx_k__H5FD_WINDOWS, sizeof(__pyx_k__H5FD_WINDOWS), 0, 0, 1, 1}, {&__pyx_n_s__HAVE_DIRECT_DRIVER, __pyx_k__HAVE_DIRECT_DRIVER, sizeof(__pyx_k__HAVE_DIRECT_DRIVER), 0, 0, 1, 1}, {&__pyx_n_s__HAVE_WINDOWS_DRIVER, __pyx_k__HAVE_WINDOWS_DRIVER, sizeof(__pyx_k__HAVE_WINDOWS_DRIVER), 0, 0, 1, 1}, {&__pyx_n_s__HDF5ExtError, __pyx_k__HDF5ExtError, sizeof(__pyx_k__HDF5ExtError), 0, 0, 1, 1}, {&__pyx_n_s__Leaf, __pyx_k__Leaf, sizeof(__pyx_k__Leaf), 0, 0, 1, 1}, {&__pyx_n_s__MAX_BLOSC_THREADS, __pyx_k__MAX_BLOSC_THREADS, sizeof(__pyx_k__MAX_BLOSC_THREADS), 0, 0, 1, 1}, {&__pyx_n_s__METADATA_CACHE_SIZE, __pyx_k__METADATA_CACHE_SIZE, sizeof(__pyx_k__METADATA_CACHE_SIZE), 0, 0, 1, 1}, {&__pyx_n_s__NOTB, __pyx_k__NOTB, sizeof(__pyx_k__NOTB), 0, 0, 1, 1}, {&__pyx_n_s__NamedType, __pyx_k__NamedType, sizeof(__pyx_k__NamedType), 0, 0, 1, 1}, {&__pyx_n_s__NoSuchNode, __pyx_k__NoSuchNode, sizeof(__pyx_k__NoSuchNode), 0, 0, 1, 1}, {&__pyx_n_s__O8, __pyx_k__O8, sizeof(__pyx_k__O8), 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__S, __pyx_k__S, sizeof(__pyx_k__S), 0, 0, 1, 1}, {&__pyx_n_s__SizeType, __pyx_k__SizeType, sizeof(__pyx_k__SizeType), 0, 0, 1, 1}, {&__pyx_n_s__SoftLink, __pyx_k__SoftLink, sizeof(__pyx_k__SoftLink), 0, 0, 1, 1}, {&__pyx_n_s__Table, __pyx_k__Table, sizeof(__pyx_k__Table), 0, 0, 1, 1}, {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, {&__pyx_n_s__U, __pyx_k__U, sizeof(__pyx_k__U), 0, 0, 1, 1}, {&__pyx_n_s__USER_BLOCK_SIZE, __pyx_k__USER_BLOCK_SIZE, sizeof(__pyx_k__USER_BLOCK_SIZE), 0, 0, 1, 1}, {&__pyx_n_s__Unknown, __pyx_k__Unknown, sizeof(__pyx_k__Unknown), 0, 0, 1, 1}, {&__pyx_n_s__V, __pyx_k__V, sizeof(__pyx_k__V), 0, 0, 1, 1}, {&__pyx_n_s__VLArray, __pyx_k__VLArray, sizeof(__pyx_k__VLArray), 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____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___atomicdtype, __pyx_k___atomicdtype, sizeof(__pyx_k___atomicdtype), 0, 0, 1, 1}, {&__pyx_n_s___atomicshape, __pyx_k___atomicshape, sizeof(__pyx_k___atomicshape), 0, 0, 1, 1}, {&__pyx_n_s___atomicsize, __pyx_k___atomicsize, sizeof(__pyx_k___atomicsize), 0, 0, 1, 1}, {&__pyx_n_s___atomictype, __pyx_k___atomictype, sizeof(__pyx_k___atomictype), 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___closeFile, __pyx_k___closeFile, sizeof(__pyx_k___closeFile), 0, 0, 1, 1}, {&__pyx_n_s___close_file, __pyx_k___close_file, sizeof(__pyx_k___close_file), 0, 0, 1, 1}, {&__pyx_n_s___createArray, __pyx_k___createArray, sizeof(__pyx_k___createArray), 0, 0, 1, 1}, {&__pyx_n_s___createCArray, __pyx_k___createCArray, sizeof(__pyx_k___createCArray), 0, 0, 1, 1}, {&__pyx_n_s___create_array, __pyx_k___create_array, sizeof(__pyx_k___create_array), 0, 0, 1, 1}, {&__pyx_n_s___create_carray, __pyx_k___create_carray, sizeof(__pyx_k___create_carray), 0, 0, 1, 1}, {&__pyx_n_s___flushFile, __pyx_k___flushFile, sizeof(__pyx_k___flushFile), 0, 0, 1, 1}, {&__pyx_n_s___flush_file, __pyx_k___flush_file, sizeof(__pyx_k___flush_file), 0, 0, 1, 1}, {&__pyx_n_s___g_closeGroup, __pyx_k___g_closeGroup, sizeof(__pyx_k___g_closeGroup), 0, 0, 1, 1}, {&__pyx_n_s___g_close_group, __pyx_k___g_close_group, sizeof(__pyx_k___g_close_group), 0, 0, 1, 1}, {&__pyx_n_s___g_flushGroup, __pyx_k___g_flushGroup, sizeof(__pyx_k___g_flushGroup), 0, 0, 1, 1}, {&__pyx_n_s___g_flush_group, __pyx_k___g_flush_group, sizeof(__pyx_k___g_flush_group), 0, 0, 1, 1}, {&__pyx_n_s___g_getAttr, __pyx_k___g_getAttr, sizeof(__pyx_k___g_getAttr), 0, 0, 1, 1}, {&__pyx_n_s___g_getGChildAttr, __pyx_k___g_getGChildAttr, sizeof(__pyx_k___g_getGChildAttr), 0, 0, 1, 1}, {&__pyx_n_s___g_getLChildAttr, __pyx_k___g_getLChildAttr, sizeof(__pyx_k___g_getLChildAttr), 0, 0, 1, 1}, {&__pyx_n_s___g_get_gchild_attr, __pyx_k___g_get_gchild_attr, sizeof(__pyx_k___g_get_gchild_attr), 0, 0, 1, 1}, {&__pyx_n_s___g_get_lchild_attr, __pyx_k___g_get_lchild_attr, sizeof(__pyx_k___g_get_lchild_attr), 0, 0, 1, 1}, {&__pyx_n_s___g_getattr, __pyx_k___g_getattr, sizeof(__pyx_k___g_getattr), 0, 0, 1, 1}, {&__pyx_n_s___g_listAttr, __pyx_k___g_listAttr, sizeof(__pyx_k___g_listAttr), 0, 0, 1, 1}, {&__pyx_n_s___g_listGroup, __pyx_k___g_listGroup, sizeof(__pyx_k___g_listGroup), 0, 0, 1, 1}, {&__pyx_n_s___g_list_attr, __pyx_k___g_list_attr, sizeof(__pyx_k___g_list_attr), 0, 0, 1, 1}, {&__pyx_n_s___g_list_group, __pyx_k___g_list_group, sizeof(__pyx_k___g_list_group), 0, 0, 1, 1}, {&__pyx_n_s___g_moveNode, __pyx_k___g_moveNode, sizeof(__pyx_k___g_moveNode), 0, 0, 1, 1}, {&__pyx_n_s___g_move_node, __pyx_k___g_move_node, sizeof(__pyx_k___g_move_node), 0, 0, 1, 1}, {&__pyx_n_s___g_new, __pyx_k___g_new, sizeof(__pyx_k___g_new), 0, 0, 1, 1}, {&__pyx_n_s___g_readCoords, __pyx_k___g_readCoords, sizeof(__pyx_k___g_readCoords), 0, 0, 1, 1}, {&__pyx_n_s___g_readSelection, __pyx_k___g_readSelection, sizeof(__pyx_k___g_readSelection), 0, 0, 1, 1}, {&__pyx_n_s___g_readSlice, __pyx_k___g_readSlice, sizeof(__pyx_k___g_readSlice), 0, 0, 1, 1}, {&__pyx_n_s___g_read_coords, __pyx_k___g_read_coords, sizeof(__pyx_k___g_read_coords), 0, 0, 1, 1}, {&__pyx_n_s___g_read_selection, __pyx_k___g_read_selection, sizeof(__pyx_k___g_read_selection), 0, 0, 1, 1}, {&__pyx_n_s___g_read_slice, __pyx_k___g_read_slice, sizeof(__pyx_k___g_read_slice), 0, 0, 1, 1}, {&__pyx_n_s___g_setAttr, __pyx_k___g_setAttr, sizeof(__pyx_k___g_setAttr), 0, 0, 1, 1}, {&__pyx_n_s___g_setattr, __pyx_k___g_setattr, sizeof(__pyx_k___g_setattr), 0, 0, 1, 1}, {&__pyx_n_s___g_writeCoords, __pyx_k___g_writeCoords, sizeof(__pyx_k___g_writeCoords), 0, 0, 1, 1}, {&__pyx_n_s___g_writeSelection, __pyx_k___g_writeSelection, sizeof(__pyx_k___g_writeSelection), 0, 0, 1, 1}, {&__pyx_n_s___g_writeSlice, __pyx_k___g_writeSlice, sizeof(__pyx_k___g_writeSlice), 0, 0, 1, 1}, {&__pyx_n_s___g_write_coords, __pyx_k___g_write_coords, sizeof(__pyx_k___g_write_coords), 0, 0, 1, 1}, {&__pyx_n_s___g_write_selection, __pyx_k___g_write_selection, sizeof(__pyx_k___g_write_selection), 0, 0, 1, 1}, {&__pyx_n_s___g_write_slice, __pyx_k___g_write_slice, sizeof(__pyx_k___g_write_slice), 0, 0, 1, 1}, {&__pyx_n_s___getFileId, __pyx_k___getFileId, sizeof(__pyx_k___getFileId), 0, 0, 1, 1}, {&__pyx_n_s___get_file_id, __pyx_k___get_file_id, sizeof(__pyx_k___get_file_id), 0, 0, 1, 1}, {&__pyx_n_s___isPTFile, __pyx_k___isPTFile, sizeof(__pyx_k___isPTFile), 0, 0, 1, 1}, {&__pyx_n_s___openArray, __pyx_k___openArray, sizeof(__pyx_k___openArray), 0, 0, 1, 1}, {&__pyx_n_s___open_array, __pyx_k___open_array, sizeof(__pyx_k___open_array), 0, 0, 1, 1}, {&__pyx_n_s___readArray, __pyx_k___readArray, sizeof(__pyx_k___readArray), 0, 0, 1, 1}, {&__pyx_n_s___read_array, __pyx_k___read_array, sizeof(__pyx_k___read_array), 0, 0, 1, 1}, {&__pyx_n_s___supported_drivers, __pyx_k___supported_drivers, sizeof(__pyx_k___supported_drivers), 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_name, __pyx_k___v_name, sizeof(__pyx_k___v_name), 0, 0, 1, 1}, {&__pyx_n_s___v_new, __pyx_k___v_new, sizeof(__pyx_k___v_new), 0, 0, 1, 1}, {&__pyx_n_s___v_node, __pyx_k___v_node, sizeof(__pyx_k___v_node), 0, 0, 1, 1}, {&__pyx_n_s___v_objectid, __pyx_k___v_objectid, sizeof(__pyx_k___v_objectid), 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_unimplemented, __pyx_k___v_unimplemented, sizeof(__pyx_k___v_unimplemented), 0, 0, 1, 1}, {&__pyx_n_s___v_version, __pyx_k___v_version, sizeof(__pyx_k___v_version), 0, 0, 1, 1}, {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1}, {&__pyx_n_s__array, __pyx_k__array, sizeof(__pyx_k__array), 0, 0, 1, 1}, {&__pyx_n_s__atom, __pyx_k__atom, sizeof(__pyx_k__atom), 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__atom_to_hdf5_type, __pyx_k__atom_to_hdf5_type, sizeof(__pyx_k__atom_to_hdf5_type), 0, 0, 1, 1}, {&__pyx_n_s__attr_name, __pyx_k__attr_name, sizeof(__pyx_k__attr_name), 0, 0, 1, 1}, {&__pyx_n_s__attrname, __pyx_k__attrname, sizeof(__pyx_k__attrname), 0, 0, 1, 1}, {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1}, {&__pyx_n_s__b1, __pyx_k__b1, sizeof(__pyx_k__b1), 0, 0, 1, 1}, {&__pyx_n_s__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1}, {&__pyx_n_s__buffer, __pyx_k__buffer, sizeof(__pyx_k__buffer), 0, 0, 1, 1}, {&__pyx_n_s__byteorder, __pyx_k__byteorder, sizeof(__pyx_k__byteorder), 0, 0, 1, 1}, {&__pyx_n_s__byteorders, __pyx_k__byteorders, sizeof(__pyx_k__byteorders), 0, 0, 1, 1}, {&__pyx_n_s__bytes_, __pyx_k__bytes_, sizeof(__pyx_k__bytes_), 0, 0, 1, 1}, {&__pyx_n_s__byteswap, __pyx_k__byteswap, sizeof(__pyx_k__byteswap), 0, 0, 1, 1}, {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1}, {&__pyx_n_s__cPickle, __pyx_k__cPickle, sizeof(__pyx_k__cPickle), 0, 0, 1, 1}, {&__pyx_n_s__check_file_access, __pyx_k__check_file_access, sizeof(__pyx_k__check_file_access), 0, 0, 1, 1}, {&__pyx_n_s__chunkshape, __pyx_k__chunkshape, sizeof(__pyx_k__chunkshape), 0, 0, 1, 1}, {&__pyx_n_s__complevel, __pyx_k__complevel, sizeof(__pyx_k__complevel), 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__correct_byteorder, __pyx_k__correct_byteorder, sizeof(__pyx_k__correct_byteorder), 0, 0, 1, 1}, {&__pyx_n_s__count, __pyx_k__count, sizeof(__pyx_k__count), 0, 0, 1, 1}, {&__pyx_n_s__countl, __pyx_k__countl, sizeof(__pyx_k__countl), 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__descr_from_dtype, __pyx_k__descr_from_dtype, sizeof(__pyx_k__descr_from_dtype), 0, 0, 1, 1}, {&__pyx_n_s__dflt, __pyx_k__dflt, sizeof(__pyx_k__dflt), 0, 0, 1, 1}, {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, {&__pyx_n_s__dumps, __pyx_k__dumps, sizeof(__pyx_k__dumps), 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__encode_filename, __pyx_k__encode_filename, sizeof(__pyx_k__encode_filename), 0, 0, 1, 1}, {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1}, {&__pyx_n_s__exists, __pyx_k__exists, sizeof(__pyx_k__exists), 0, 0, 1, 1}, {&__pyx_n_s__extdim, __pyx_k__extdim, sizeof(__pyx_k__extdim), 0, 0, 1, 1}, {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1}, {&__pyx_n_s__filters, __pyx_k__filters, sizeof(__pyx_k__filters), 0, 0, 1, 1}, {&__pyx_n_s__flags, __pyx_k__flags, sizeof(__pyx_k__flags), 0, 0, 1, 1}, {&__pyx_n_s__fletcher32, __pyx_k__fletcher32, sizeof(__pyx_k__fletcher32), 0, 0, 1, 1}, {&__pyx_n_s__flush, __pyx_k__flush, sizeof(__pyx_k__flush), 0, 0, 1, 1}, {&__pyx_n_s__from_dtype, __pyx_k__from_dtype, sizeof(__pyx_k__from_dtype), 0, 0, 1, 1}, {&__pyx_n_s__generic, __pyx_k__generic, sizeof(__pyx_k__generic), 0, 0, 1, 1}, {&__pyx_n_s__group_name, __pyx_k__group_name, sizeof(__pyx_k__group_name), 0, 0, 1, 1}, {&__pyx_n_s__h5bt, __pyx_k__h5bt, sizeof(__pyx_k__h5bt), 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__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, {&__pyx_n_s__i8, __pyx_k__i8, sizeof(__pyx_k__i8), 0, 0, 1, 1}, {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 0, 0, 1, 1}, {&__pyx_n_s__init, __pyx_k__init, sizeof(__pyx_k__init), 0, 0, 1, 1}, {&__pyx_n_s__insert, __pyx_k__insert, sizeof(__pyx_k__insert), 0, 0, 1, 1}, {&__pyx_n_s__int32, __pyx_k__int32, sizeof(__pyx_k__int32), 0, 0, 1, 1}, {&__pyx_n_s__intp, __pyx_k__intp, sizeof(__pyx_k__intp), 0, 0, 1, 1}, {&__pyx_n_s__kind, __pyx_k__kind, sizeof(__pyx_k__kind), 0, 0, 1, 1}, {&__pyx_n_s__leaf_name, __pyx_k__leaf_name, sizeof(__pyx_k__leaf_name), 0, 0, 1, 1}, {&__pyx_n_s__maindim, __pyx_k__maindim, sizeof(__pyx_k__maindim), 0, 0, 1, 1}, {&__pyx_n_s__map, __pyx_k__map, sizeof(__pyx_k__map), 0, 0, 1, 1}, {&__pyx_n_s__mode, __pyx_k__mode, sizeof(__pyx_k__mode), 0, 0, 1, 1}, {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1}, {&__pyx_n_s__ndarray, __pyx_k__ndarray, sizeof(__pyx_k__ndarray), 0, 0, 1, 1}, {&__pyx_n_s__newname, __pyx_k__newname, sizeof(__pyx_k__newname), 0, 0, 1, 1}, {&__pyx_n_s__newparent, __pyx_k__newparent, sizeof(__pyx_k__newparent), 0, 0, 1, 1}, {&__pyx_n_s__newpathname, __pyx_k__newpathname, sizeof(__pyx_k__newpathname), 0, 0, 1, 1}, {&__pyx_n_s__nobjects, __pyx_k__nobjects, sizeof(__pyx_k__nobjects), 0, 0, 1, 1}, {&__pyx_n_s__node, __pyx_k__node, sizeof(__pyx_k__node), 0, 0, 1, 1}, {&__pyx_n_s__nparr, __pyx_k__nparr, sizeof(__pyx_k__nparr), 0, 0, 1, 1}, {&__pyx_n_s__nrow, __pyx_k__nrow, sizeof(__pyx_k__nrow), 0, 0, 1, 1}, {&__pyx_n_s__nrows, __pyx_k__nrows, sizeof(__pyx_k__nrows), 0, 0, 1, 1}, {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, {&__pyx_n_s__oldname, __pyx_k__oldname, sizeof(__pyx_k__oldname), 0, 0, 1, 1}, {&__pyx_n_s__oldparent, __pyx_k__oldparent, sizeof(__pyx_k__oldparent), 0, 0, 1, 1}, {&__pyx_n_s__oldpathname, __pyx_k__oldpathname, sizeof(__pyx_k__oldpathname), 0, 0, 1, 1}, {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1}, {&__pyx_n_s__params, __pyx_k__params, sizeof(__pyx_k__params), 0, 0, 1, 1}, {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1}, {&__pyx_n_s__perform_selection, __pyx_k__perform_selection, sizeof(__pyx_k__perform_selection), 0, 0, 1, 1}, {&__pyx_n_s__pickle, __pyx_k__pickle, sizeof(__pyx_k__pickle), 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__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__pure_numpy_types, __pyx_k__pure_numpy_types, sizeof(__pyx_k__pure_numpy_types), 0, 0, 1, 1}, {&__pyx_n_s__pymode, __pyx_k__pymode, sizeof(__pyx_k__pymode), 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__rstrip, __pyx_k__rstrip, sizeof(__pyx_k__rstrip), 0, 0, 1, 1}, {&__pyx_n_s__selection, __pyx_k__selection, sizeof(__pyx_k__selection), 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__space_id, __pyx_k__space_id, sizeof(__pyx_k__space_id), 0, 0, 1, 1}, {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1}, {&__pyx_n_s__startl, __pyx_k__startl, sizeof(__pyx_k__startl), 0, 0, 1, 1}, {&__pyx_n_s__step, __pyx_k__step, sizeof(__pyx_k__step), 0, 0, 1, 1}, {&__pyx_n_s__stepl, __pyx_k__stepl, sizeof(__pyx_k__stepl), 0, 0, 1, 1}, {&__pyx_n_s__stop, __pyx_k__stop, sizeof(__pyx_k__stop), 0, 0, 1, 1}, {&__pyx_n_s__stopl, __pyx_k__stopl, sizeof(__pyx_k__stopl), 0, 0, 1, 1}, {&__pyx_n_s__super, __pyx_k__super, sizeof(__pyx_k__super), 0, 0, 1, 1}, {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 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__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1}, {&__pyx_n_s__u, __pyx_k__u, sizeof(__pyx_k__u), 0, 0, 1, 1}, {&__pyx_n_s__unicode_, __pyx_k__unicode_, sizeof(__pyx_k__unicode_), 0, 0, 1, 1}, {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1}, {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1}, {&__pyx_n_s__warn, __pyx_k__warn, sizeof(__pyx_k__warn), 0, 0, 1, 1}, {&__pyx_n_s__warnings, __pyx_k__warnings, sizeof(__pyx_k__warnings), 0, 0, 1, 1}, {&__pyx_n_s__where, __pyx_k__where, sizeof(__pyx_k__where), 0, 0, 1, 1}, {&__pyx_n_s__writeable, __pyx_k__writeable, sizeof(__pyx_k__writeable), 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_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __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 = 312; __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[0]; __pyx_lineno = 339; __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 = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_super = __Pyx_GetName(__pyx_b, __pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __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 = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __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/hdf5extension.pyx":235 * # assume that strlen(attr_value) is the actual length of the attibute * # and numpy.bytes_(attr_value) can give a truncated pickle sting * retvalue = retvalue.rstrip(b'\x00') # <<<<<<<<<<<<<< * retvalue = numpy.bytes_(retvalue) * */ __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_2); __Pyx_INCREF(((PyObject *)__pyx_kp_b_1)); PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_kp_b_1)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_1)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2)); /* "tables/hdf5extension.pyx":264 * elif class_id == H5T_STRING: * if H5Tis_variable_str(type_id): * raise TypeError("variable length strings are not supported yet") # <<<<<<<<<<<<<< * stype = "S%s" % (itemsize) * */ __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_7); __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_6)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7)); /* "tables/hdf5extension.pyx":337 * "the '%s' driver" % driver) * elif not PyBytes_Check(image): * raise TypeError("The DRIVER_CORE_IMAGE must be a string of bytes") # <<<<<<<<<<<<<< * elif not H5_HAVE_IMAGE_FILE: * raise RuntimeError("Support for image files is only availabe in " */ __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_14); __Pyx_INCREF(((PyObject *)__pyx_kp_s_13)); PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_13)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); /* "tables/hdf5extension.pyx":339 * raise TypeError("The DRIVER_CORE_IMAGE must be a string of bytes") * elif not H5_HAVE_IMAGE_FILE: * raise RuntimeError("Support for image files is only availabe in " # <<<<<<<<<<<<<< * "HDF5 >= 1.8.9") * */ __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_16); __Pyx_INCREF(((PyObject *)__pyx_kp_s_15)); PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_kp_s_15)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_15)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16)); /* "tables/hdf5extension.pyx":358 * user_block_size = params.get("USER_BLOCK_SIZE", 0) * if user_block_size and not self._v_new: * warnings.warn("The HDF5 file already esists: the USER_BLOCK_SIZE " # <<<<<<<<<<<<<< * "will be ignored") * elif user_block_size: */ __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_19); __Pyx_INCREF(((PyObject *)__pyx_kp_s_18)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_kp_s_18)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); /* "tables/hdf5extension.pyx":364 * is_pow_of_2 = ((user_block_size & (user_block_size - 1)) == 0) * if user_block_size < 512 or not is_pow_of_2: * raise ValueError("The USER_BLOCK_SIZE must be a power od 2 greather " # <<<<<<<<<<<<<< * "than 512 or zero") * */ __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_21); __Pyx_INCREF(((PyObject *)__pyx_kp_s_20)); PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_20)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21)); /* "tables/hdf5extension.pyx":372 * if err < 0: * H5Pclose(create_plist) * raise HDF5ExtError("Unable to set the user block size") # <<<<<<<<<<<<<< * * # File access property list */ __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_23); __Pyx_INCREF(((PyObject *)__pyx_kp_s_22)); PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23)); /* "tables/hdf5extension.pyx":390 * H5Pclose(create_plist) * H5Pclose(access_plist) * raise RuntimeError("The H5FD_DIRECT driver is not available") # <<<<<<<<<<<<<< * err = pt_H5Pset_fapl_direct(access_plist, * params["DRIVER_DIRECT_ALIGNMENT"], */ __pyx_k_tuple_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_25); __Pyx_INCREF(((PyObject *)__pyx_kp_s_24)); PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_kp_s_24)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); /* "tables/hdf5extension.pyx":409 * H5Pclose(access_plist) * H5Pclose(create_plist) * raise RuntimeError("The H5FD_WINDOWS driver is not available") # <<<<<<<<<<<<<< * err = pt_H5Pset_fapl_windows(access_plist) * elif driver == "H5FD_STDIO": */ __pyx_k_tuple_30 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_30); __Pyx_INCREF(((PyObject *)__pyx_kp_s_29)); PyTuple_SET_ITEM(__pyx_k_tuple_30, 0, ((PyObject *)__pyx_kp_s_29)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30)); /* "tables/hdf5extension.pyx":424 * H5Pclose(create_plist) * H5Pclose(access_plist) * raise HDF5ExtError("Unable to set the file image") # <<<<<<<<<<<<<< * * #elif driver == "H5FD_FAMILY": */ __pyx_k_tuple_33 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_33); __Pyx_INCREF(((PyObject *)__pyx_kp_s_32)); PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_kp_s_32)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33)); /* "tables/hdf5extension.pyx":437 * # raw_plist_id) * if err < 0: * e = HDF5ExtError("Unable to set the file access property list") # <<<<<<<<<<<<<< * H5Pclose(create_plist) * H5Pclose(access_plist) */ __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_35); __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_34)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); /* "tables/hdf5extension.pyx":494 * size = pt_H5Fget_file_image(self.file_id, NULL, buf_len) * if size < 0: * raise HDF5ExtError("Unable to retrieve the size of the buffer for the " # <<<<<<<<<<<<<< * "file image. Plese note that not all drivers " * "provide support for image files.") */ __pyx_k_tuple_39 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_39); __Pyx_INCREF(((PyObject *)__pyx_kp_s_38)); PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_kp_s_38)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39)); /* "tables/hdf5extension.pyx":501 * image = PyBytes_FromStringAndSize(NULL, size) * if not image: * raise RuntimeError("Unable to allecote meomory fir the file image") # <<<<<<<<<<<<<< * * cimage = image */ __pyx_k_tuple_41 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_41); __Pyx_INCREF(((PyObject *)__pyx_kp_s_40)); PyTuple_SET_ITEM(__pyx_k_tuple_41, 0, ((PyObject *)__pyx_kp_s_40)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41)); /* "tables/hdf5extension.pyx":507 * size = pt_H5Fget_file_image(self.file_id, cimage, buf_len) * if size < 0: * raise HDF5ExtError("Unable to retrieve the file image. " # <<<<<<<<<<<<<< * "Plese note that not all drivers provide support " * "for image files.") */ __pyx_k_tuple_43 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_43); __Pyx_INCREF(((PyObject *)__pyx_kp_s_42)); PyTuple_SET_ITEM(__pyx_k_tuple_43, 0, ((PyObject *)__pyx_kp_s_42)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43)); /* "tables/hdf5extension.pyx":530 * err = H5Fget_filesize(self.file_id, &size) * if err < 0: * raise HDF5ExtError("Unable to retrieve the HDF5 file size") # <<<<<<<<<<<<<< * * return size */ __pyx_k_tuple_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_45); __Pyx_INCREF(((PyObject *)__pyx_kp_s_44)); PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_s_44)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_44)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45)); /* "tables/hdf5extension.pyx":547 * create_plist = H5Fget_create_plist(self.file_id) * if create_plist < 0: * raise HDF5ExtError("Unable to get the creation property list") # <<<<<<<<<<<<<< * * err = H5Pget_userblock(create_plist, &size) */ __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_47); __Pyx_INCREF(((PyObject *)__pyx_kp_s_46)); PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_kp_s_46)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_46)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47)); /* "tables/hdf5extension.pyx":552 * if err < 0: * H5Pclose(create_plist) * raise HDF5ExtError("unable to retrieve the user block size") # <<<<<<<<<<<<<< * * H5Pclose(create_plist) */ __pyx_k_tuple_49 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_49); __Pyx_INCREF(((PyObject *)__pyx_kp_s_48)); PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_kp_s_48)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_48)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49)); /* "tables/hdf5extension.pyx":638 * cdef int cset = H5T_CSET_DEFAULT * * encoded_name = name.encode('utf-8') # <<<<<<<<<<<<<< * # get the C pointer * cname = encoded_name */ __pyx_k_tuple_53 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_53); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_53, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53)); /* "tables/hdf5extension.pyx":681 * value.dtype.kind == 'U' and * value.shape == ()): * value = value[()].encode('utf-8') # <<<<<<<<<<<<<< * cset = H5T_CSET_UTF8 * else: */ __pyx_k_tuple_55 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_55); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_55, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55)); /* "tables/hdf5extension.pyx":718 * cdef int cset = H5T_CSET_DEFAULT * * encoded_attrname = attrname.encode('utf-8') # <<<<<<<<<<<<<< * # Get the C pointer * cattrname = encoded_attrname */ __pyx_k_tuple_56 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_56); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_56, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56)); /* "tables/hdf5extension.pyx":751 * # strlen(attr_value) is the actual length of the attibute * # and numpy.bytes_(attr_value) can give a truncated pickle sting * retvalue = retvalue.rstrip(b'\x00') # <<<<<<<<<<<<<< * retvalue = numpy.bytes_(retvalue) # bytes * # Important to release attr_value, because it has been malloc'ed! */ __pyx_k_tuple_59 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_59); __Pyx_INCREF(((PyObject *)__pyx_kp_b_1)); PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_kp_b_1)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_1)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); /* "tables/hdf5extension.pyx":859 * cdef bytes encoded_attrname * * encoded_attrname = attrname.encode('utf-8') # <<<<<<<<<<<<<< * # Get the C pointer * cattrname = encoded_attrname */ __pyx_k_tuple_63 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_63); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_63, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); /* "tables/hdf5extension.pyx":885 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Delete this node */ __pyx_k_tuple_65 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_65); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_65, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65)); /* "tables/hdf5extension.pyx":904 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # @TODO: set property list --> utf-8 */ __pyx_k_tuple_67 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_67); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67)); /* "tables/hdf5extension.pyx":920 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * ret = H5Gopen(self.parent_id, encoded_name, H5P_DEFAULT) */ __pyx_k_tuple_69 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_69); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_69, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69)); /* "tables/hdf5extension.pyx":936 * cdef char *cname * * encoded_name = h5name.encode('utf-8') # <<<<<<<<<<<<<< * # Get the C pointer * cname = encoded_name */ __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_71); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71)); /* "tables/hdf5extension.pyx":968 * cdef bytes encoded_name * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * return Giterate(parent._v_objectid, self._v_objectid, encoded_name) */ __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_72); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72)); /* "tables/hdf5extension.pyx":986 * cdef bytes encoded_attr_name * * encoded_group_name = group_name.encode('utf-8') # <<<<<<<<<<<<<< * encoded_attr_name = attr_name.encode('utf-8') * */ __pyx_k_tuple_73 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_73); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_73, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73)); /* "tables/hdf5extension.pyx":987 * * encoded_group_name = group_name.encode('utf-8') * encoded_attr_name = attr_name.encode('utf-8') # <<<<<<<<<<<<<< * * # Open the group */ __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_74); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74)); /* "tables/hdf5extension.pyx":1015 * cdef bytes encoded_attr_name * * encoded_leaf_name = leaf_name.encode('utf-8') # <<<<<<<<<<<<<< * encoded_attr_name = attr_name.encode('utf-8') * */ __pyx_k_tuple_76 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_76); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_76, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76)); /* "tables/hdf5extension.pyx":1016 * * encoded_leaf_name = leaf_name.encode('utf-8') * encoded_attr_name = attr_name.encode('utf-8') # <<<<<<<<<<<<<< * * # Open the dataset */ __pyx_k_tuple_77 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_77); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_77, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77)); /* "tables/hdf5extension.pyx":1051 * cdef bytes encoded_oldname, encoded_newname * * encoded_oldname = oldname.encode('utf-8') # <<<<<<<<<<<<<< * encoded_newname = newname.encode('utf-8') * */ __pyx_k_tuple_79 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_79); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_79, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79)); /* "tables/hdf5extension.pyx":1052 * * encoded_oldname = oldname.encode('utf-8') * encoded_newname = newname.encode('utf-8') # <<<<<<<<<<<<<< * * ret = H5Lmove(oldparent, encoded_oldname, newparent, encoded_newname, */ __pyx_k_tuple_80 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_80); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_80, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80)); /* "tables/hdf5extension.pyx":1176 * cdef H5T_cset_t cset = H5T_CSET_ASCII * * encoded_title = title.encode('utf-8') # <<<<<<<<<<<<<< * encoded_name = self.name.encode('utf-8') * */ __pyx_k_tuple_84 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_84); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84)); /* "tables/hdf5extension.pyx":1177 * * encoded_title = title.encode('utf-8') * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Get the HDF5 type associated with this numpy type */ __pyx_k_tuple_85 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_85); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_85, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85)); /* "tables/hdf5extension.pyx":1196 * rbuf = nparr.data * # Save the array * complib = (self.filters.complib or '').encode('utf-8') # <<<<<<<<<<<<<< * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') */ __pyx_k_tuple_87 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_87); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87)); /* "tables/hdf5extension.pyx":1197 * # Save the array * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') # <<<<<<<<<<<<<< * class_ = self._c_classid.encode('utf-8') * self.dataset_id = H5ARRAYmake(self.parent_id, encoded_name, version, */ __pyx_k_tuple_88 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_88); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_88, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88)); /* "tables/hdf5extension.pyx":1198 * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') # <<<<<<<<<<<<<< * self.dataset_id = H5ARRAYmake(self.parent_id, encoded_name, version, * self.rank, self.dims, */ __pyx_k_tuple_89 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_89); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_89, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89)); /* "tables/hdf5extension.pyx":1239 * cdef bytes encoded_title, encoded_name * * encoded_title = title.encode('utf-8') # <<<<<<<<<<<<<< * encoded_name = self.name.encode('utf-8') * */ __pyx_k_tuple_91 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_91); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_91, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_91)); /* "tables/hdf5extension.pyx":1240 * * encoded_title = title.encode('utf-8') * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * atom = self.atom */ __pyx_k_tuple_92 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_92); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_92, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92)); /* "tables/hdf5extension.pyx":1252 * rbuf = NULL # The data pointer. We don't have data to save initially * # Encode strings * complib = (self.filters.complib or '').encode('utf-8') # <<<<<<<<<<<<<< * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') */ __pyx_k_tuple_93 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_93); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_93, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_93)); /* "tables/hdf5extension.pyx":1253 * # Encode strings * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') # <<<<<<<<<<<<<< * class_ = self._c_classid.encode('utf-8') * */ __pyx_k_tuple_94 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_94); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_94, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94)); /* "tables/hdf5extension.pyx":1254 * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') # <<<<<<<<<<<<<< * * # Get the fill values */ __pyx_k_tuple_95 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_95); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_95, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95)); /* "tables/hdf5extension.pyx":1261 * fill_data = dflts.data * else: * dflts = numpy.zeros((), dtype=atom.dtype) # <<<<<<<<<<<<<< * fill_data = NULL * if atom.shape == (): */ __pyx_k_tuple_96 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_96); __Pyx_INCREF(((PyObject *)__pyx_empty_tuple)); PyTuple_SET_ITEM(__pyx_k_tuple_96, 0, ((PyObject *)__pyx_empty_tuple)); __Pyx_GIVEREF(((PyObject *)__pyx_empty_tuple)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96)); /* "tables/hdf5extension.pyx":1314 * cdef str byteorder * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Open the dataset */ __pyx_k_tuple_97 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_97); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97)); /* "tables/hdf5extension.pyx":1328 * # Get the rank for this array object * if H5ARRAYget_ndims(self.dataset_id, &self.rank) < 0: * raise HDF5ExtError("Problems getting ndims!") # <<<<<<<<<<<<<< * # Allocate space for the dimension axis info * self.dims = malloc(self.rank * sizeof(hsize_t)) */ __pyx_k_tuple_99 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_99); __Pyx_INCREF(((PyObject *)__pyx_kp_s_98)); PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_kp_s_98)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_98)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99)); /* "tables/hdf5extension.pyx":1337 * &class_id, cbyteorder) * if ret < 0: * raise HDF5ExtError("Unable to get array info.") # <<<<<<<<<<<<<< * * byteorder = cstr_to_pystr(cbyteorder) */ __pyx_k_tuple_101 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_101); __Pyx_INCREF(((PyObject *)__pyx_kp_s_100)); PyTuple_SET_ITEM(__pyx_k_tuple_101, 0, ((PyObject *)__pyx_kp_s_100)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_100)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101)); /* "tables/hdf5extension.pyx":1361 * * # Get the fill value * dflts = numpy.zeros((), dtype=atom.dtype) # <<<<<<<<<<<<<< * fill_data = dflts.data * H5ARRAYget_fill_value(self.dataset_id, self.type_id, */ __pyx_k_tuple_102 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_102); __Pyx_INCREF(((PyObject *)__pyx_empty_tuple)); PyTuple_SET_ITEM(__pyx_k_tuple_102, 0, ((PyObject *)__pyx_empty_tuple)); __Pyx_GIVEREF(((PyObject *)__pyx_empty_tuple)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102)); /* "tables/hdf5extension.pyx":1403 * * if ret < 0: * raise HDF5ExtError("Problems appending the elements") # <<<<<<<<<<<<<< * * free(dims_arr) */ __pyx_k_tuple_104 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_104); __Pyx_INCREF(((PyObject *)__pyx_kp_s_103)); PyTuple_SET_ITEM(__pyx_k_tuple_104, 0, ((PyObject *)__pyx_kp_s_103)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_103)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104)); /* "tables/hdf5extension.pyx":1434 * * if ret < 0: * raise HDF5ExtError("Problems reading the array data.") # <<<<<<<<<<<<<< * * if self.atom.kind == 'time': */ __pyx_k_tuple_106 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_106); __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); PyTuple_SET_ITEM(__pyx_k_tuple_106, 0, ((PyObject *)__pyx_kp_s_105)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106)); /* "tables/hdf5extension.pyx":1468 * * if ret < 0: * raise HDF5ExtError("Problems reading the array data.") # <<<<<<<<<<<<<< * * if self.atom.kind == 'time': */ __pyx_k_tuple_107 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_107); __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_kp_s_105)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107)); /* "tables/hdf5extension.pyx":1512 * * if ret < 0: * raise HDF5ExtError("Problems reading the array data.") # <<<<<<<<<<<<<< * * # Terminate access to the memory dataspace */ __pyx_k_tuple_108 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_108); __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_kp_s_105)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108)); /* "tables/hdf5extension.pyx":1605 * * if ret < 0: * raise HDF5ExtError("Problems reading the array data.") # <<<<<<<<<<<<<< * * # Terminate access to the memory dataspace */ __pyx_k_tuple_109 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_109); __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); PyTuple_SET_ITEM(__pyx_k_tuple_109, 0, ((PyObject *)__pyx_kp_s_105)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109)); /* "tables/hdf5extension.pyx":1690 * * if ret < 0: * raise HDF5ExtError("Problems writing the array data.") # <<<<<<<<<<<<<< * * # Terminate access to the memory dataspace */ __pyx_k_tuple_112 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_112); __Pyx_INCREF(((PyObject *)__pyx_kp_s_111)); PyTuple_SET_ITEM(__pyx_k_tuple_112, 0, ((PyObject *)__pyx_kp_s_111)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_111)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112)); /* "tables/hdf5extension.pyx":1737 * * if ret < 0: * raise HDF5ExtError("Problems writing the array data.") # <<<<<<<<<<<<<< * * # Terminate access to the memory dataspace */ __pyx_k_tuple_113 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_113); __Pyx_INCREF(((PyObject *)__pyx_kp_s_111)); PyTuple_SET_ITEM(__pyx_k_tuple_113, 0, ((PyObject *)__pyx_kp_s_111)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_111)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113)); /* "tables/hdf5extension.pyx":1771 * cdef H5T_cset_t cset = H5T_CSET_ASCII * * encoded_title = title.encode('utf-8') # <<<<<<<<<<<<<< * encoded_name = self.name.encode('utf-8') * */ __pyx_k_tuple_114 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_114); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_114, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114)); /* "tables/hdf5extension.pyx":1772 * * encoded_title = title.encode('utf-8') * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * atom = self.atom */ __pyx_k_tuple_115 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_115); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_115, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115)); /* "tables/hdf5extension.pyx":1789 * * # Encode strings * complib = (self.filters.complib or '').encode('utf-8') # <<<<<<<<<<<<<< * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') */ __pyx_k_tuple_116 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_116); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_116, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116)); /* "tables/hdf5extension.pyx":1790 * # Encode strings * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') # <<<<<<<<<<<<<< * class_ = self._c_classid.encode('utf-8') * */ __pyx_k_tuple_117 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_117); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_117, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117)); /* "tables/hdf5extension.pyx":1791 * complib = (self.filters.complib or '').encode('utf-8') * version = self._v_version.encode('utf-8') * class_ = self._c_classid.encode('utf-8') # <<<<<<<<<<<<<< * * # Create the vlarray */ __pyx_k_tuple_118 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_118); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_118, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118)); /* "tables/hdf5extension.pyx":1804 * free(dims) * if self.dataset_id < 0: * raise HDF5ExtError("Problems creating the VLArray.") # <<<<<<<<<<<<<< * self.nrecords = 0 # Initialize the number of records saved * */ __pyx_k_tuple_120 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_120); __Pyx_INCREF(((PyObject *)__pyx_kp_s_119)); PyTuple_SET_ITEM(__pyx_k_tuple_120, 0, ((PyObject *)__pyx_kp_s_119)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_119)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120)); /* "tables/hdf5extension.pyx":1835 * cdef str byteorder * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Open the dataset */ __pyx_k_tuple_121 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_121); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_121, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_121)); /* "tables/hdf5extension.pyx":1889 * * if ret < 0: * raise HDF5ExtError("Problems appending the records.") # <<<<<<<<<<<<<< * * self.nrecords = self.nrecords + 1 */ __pyx_k_tuple_123 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_123); __Pyx_INCREF(((PyObject *)__pyx_kp_s_122)); PyTuple_SET_ITEM(__pyx_k_tuple_123, 0, ((PyObject *)__pyx_kp_s_122)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_122)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123)); /* "tables/hdf5extension.pyx":1910 * * if ret < 0: * raise HDF5ExtError("Problems modifying the record.") # <<<<<<<<<<<<<< * * return nobjects */ __pyx_k_tuple_125 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_125); __Pyx_INCREF(((PyObject *)__pyx_kp_s_124)); PyTuple_SET_ITEM(__pyx_k_tuple_125, 0, ((PyObject *)__pyx_kp_s_124)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_124)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125)); /* "tables/hdf5extension.pyx":1950 * nrows = get_len_of_range(start, stop, step) * if start + nrows > self.nrows: * raise HDF5ExtError( # <<<<<<<<<<<<<< * "Asking for a range of rows exceeding the available ones!.", * h5bt=False) */ __pyx_k_tuple_127 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_127); __Pyx_INCREF(((PyObject *)__pyx_kp_s_126)); PyTuple_SET_ITEM(__pyx_k_tuple_127, 0, ((PyObject *)__pyx_kp_s_126)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_126)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127)); /* "tables/hdf5extension.pyx":1970 * * if ret < 0: * raise HDF5ExtError( # <<<<<<<<<<<<<< * "VLArray._read_array: Problems reading the array data.") * */ __pyx_k_tuple_129 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_129); __Pyx_INCREF(((PyObject *)__pyx_kp_s_128)); PyTuple_SET_ITEM(__pyx_k_tuple_129, 0, ((PyObject *)__pyx_kp_s_128)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_128)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_129)); /* "tables/hdf5extension.pyx":2008 * ret = H5Dvlen_reclaim(self.type_id, mem_space_id, H5P_DEFAULT, rdata) * if ret < 0: * raise HDF5ExtError("VLArray._read_array: error freeing the data buffer.") # <<<<<<<<<<<<<< * # Terminate access to the memory dataspace * H5Sclose(mem_space_id) */ __pyx_k_tuple_131 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_131); __Pyx_INCREF(((PyObject *)__pyx_kp_s_130)); PyTuple_SET_ITEM(__pyx_k_tuple_131, 0, ((PyObject *)__pyx_kp_s_130)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_130)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131)); /* "tables/hdf5extension.pyx":2029 * cdef str byteorder * * encoded_name = self.name.encode('utf-8') # <<<<<<<<<<<<<< * * # Get info on dimensions */ __pyx_k_tuple_132 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_132); __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); PyTuple_SET_ITEM(__pyx_k_tuple_132, 0, ((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132)); /* "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_134 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_134)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_134); __Pyx_INCREF(((PyObject *)__pyx_kp_u_133)); PyTuple_SET_ITEM(__pyx_k_tuple_134, 0, ((PyObject *)__pyx_kp_u_133)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_133)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_134)); /* "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_136 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_136)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_136); __Pyx_INCREF(((PyObject *)__pyx_kp_u_135)); PyTuple_SET_ITEM(__pyx_k_tuple_136, 0, ((PyObject *)__pyx_kp_u_135)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_135)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_136)); /* "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_138 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_138)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_138); __Pyx_INCREF(((PyObject *)__pyx_kp_u_137)); PyTuple_SET_ITEM(__pyx_k_tuple_138, 0, ((PyObject *)__pyx_kp_u_137)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_137)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_138)); /* "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_141 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_141); __Pyx_INCREF(((PyObject *)__pyx_kp_u_140)); PyTuple_SET_ITEM(__pyx_k_tuple_141, 0, ((PyObject *)__pyx_kp_u_140)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_140)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141)); /* "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_142 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_142)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_142); __Pyx_INCREF(((PyObject *)__pyx_kp_u_137)); PyTuple_SET_ITEM(__pyx_k_tuple_142, 0, ((PyObject *)__pyx_kp_u_137)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_137)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_142)); /* "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_144 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_144)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_144); __Pyx_INCREF(((PyObject *)__pyx_kp_u_143)); PyTuple_SET_ITEM(__pyx_k_tuple_144, 0, ((PyObject *)__pyx_kp_u_143)); __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_143)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_144)); /* "tables/hdf5extension.pyx":276 * * _supported_drivers = ( * "H5FD_SEC2", # <<<<<<<<<<<<<< * "H5FD_DIRECT", * #"H5FD_LOG", */ __pyx_k_tuple_154 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_154); __Pyx_INCREF(((PyObject *)__pyx_n_s__H5FD_SEC2)); PyTuple_SET_ITEM(__pyx_k_tuple_154, 0, ((PyObject *)__pyx_n_s__H5FD_SEC2)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__H5FD_SEC2)); __Pyx_INCREF(((PyObject *)__pyx_n_s__H5FD_DIRECT)); PyTuple_SET_ITEM(__pyx_k_tuple_154, 1, ((PyObject *)__pyx_n_s__H5FD_DIRECT)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__H5FD_DIRECT)); __Pyx_INCREF(((PyObject *)__pyx_n_s__H5FD_WINDOWS)); PyTuple_SET_ITEM(__pyx_k_tuple_154, 2, ((PyObject *)__pyx_n_s__H5FD_WINDOWS)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__H5FD_WINDOWS)); __Pyx_INCREF(((PyObject *)__pyx_n_s__H5FD_STDIO)); PyTuple_SET_ITEM(__pyx_k_tuple_154, 3, ((PyObject *)__pyx_n_s__H5FD_STDIO)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__H5FD_STDIO)); __Pyx_INCREF(((PyObject *)__pyx_n_s__H5FD_CORE)); PyTuple_SET_ITEM(__pyx_k_tuple_154, 4, ((PyObject *)__pyx_n_s__H5FD_CORE)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__H5FD_CORE)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_154)); __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_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_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 inithdf5extension(void); /*proto*/ PyMODINIT_FUNC inithdf5extension(void) #else PyMODINIT_FUNC PyInit_hdf5extension(void); /*proto*/ PyMODINIT_FUNC PyInit_hdf5extension(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = 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_hdf5extension(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("hdf5extension"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_145), 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.hdf5extension")) { if (unlikely(PyDict_SetItemString(modules, "tables.hdf5extension", __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__hdf5extension) { 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 ---*/ if (PyType_Ready(&__pyx_type_6tables_13hdf5extension_Node) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Node", (PyObject *)&__pyx_type_6tables_13hdf5extension_Node) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_Node = &__pyx_type_6tables_13hdf5extension_Node; __pyx_vtabptr_6tables_13hdf5extension_Leaf = &__pyx_vtable_6tables_13hdf5extension_Leaf; __pyx_vtable_6tables_13hdf5extension_Leaf._get_type_ids = (PyObject *(*)(struct __pyx_obj_6tables_13hdf5extension_Leaf *))__pyx_f_6tables_13hdf5extension_4Leaf__get_type_ids; __pyx_vtable_6tables_13hdf5extension_Leaf._convert_time64 = (PyObject *(*)(struct __pyx_obj_6tables_13hdf5extension_Leaf *, PyArrayObject *, int))__pyx_f_6tables_13hdf5extension_4Leaf__convert_time64; __pyx_type_6tables_13hdf5extension_Leaf.tp_base = __pyx_ptype_6tables_13hdf5extension_Node; if (PyType_Ready(&__pyx_type_6tables_13hdf5extension_Leaf) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6tables_13hdf5extension_Leaf.tp_dict, __pyx_vtabptr_6tables_13hdf5extension_Leaf) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Leaf", (PyObject *)&__pyx_type_6tables_13hdf5extension_Leaf) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_Leaf = &__pyx_type_6tables_13hdf5extension_Leaf; __pyx_vtabptr_6tables_13hdf5extension_Array = &__pyx_vtable_6tables_13hdf5extension_Array; __pyx_vtable_6tables_13hdf5extension_Array.__pyx_base = *__pyx_vtabptr_6tables_13hdf5extension_Leaf; __pyx_type_6tables_13hdf5extension_Array.tp_base = __pyx_ptype_6tables_13hdf5extension_Leaf; if (PyType_Ready(&__pyx_type_6tables_13hdf5extension_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6tables_13hdf5extension_Array.tp_dict, __pyx_vtabptr_6tables_13hdf5extension_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Array", (PyObject *)&__pyx_type_6tables_13hdf5extension_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_Array = &__pyx_type_6tables_13hdf5extension_Array; if (PyType_Ready(&__pyx_type_6tables_13hdf5extension_File) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "File", (PyObject *)&__pyx_type_6tables_13hdf5extension_File) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_File = &__pyx_type_6tables_13hdf5extension_File; if (PyType_Ready(&__pyx_type_6tables_13hdf5extension_AttributeSet) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "AttributeSet", (PyObject *)&__pyx_type_6tables_13hdf5extension_AttributeSet) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_AttributeSet = &__pyx_type_6tables_13hdf5extension_AttributeSet; __pyx_type_6tables_13hdf5extension_Group.tp_base = __pyx_ptype_6tables_13hdf5extension_Node; if (PyType_Ready(&__pyx_type_6tables_13hdf5extension_Group) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "Group", (PyObject *)&__pyx_type_6tables_13hdf5extension_Group) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_Group = &__pyx_type_6tables_13hdf5extension_Group; __pyx_vtabptr_6tables_13hdf5extension_VLArray = &__pyx_vtable_6tables_13hdf5extension_VLArray; __pyx_vtable_6tables_13hdf5extension_VLArray.__pyx_base = *__pyx_vtabptr_6tables_13hdf5extension_Leaf; __pyx_type_6tables_13hdf5extension_VLArray.tp_base = __pyx_ptype_6tables_13hdf5extension_Leaf; if (PyType_Ready(&__pyx_type_6tables_13hdf5extension_VLArray) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6tables_13hdf5extension_VLArray.tp_dict, __pyx_vtabptr_6tables_13hdf5extension_VLArray) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "VLArray", (PyObject *)&__pyx_type_6tables_13hdf5extension_VLArray) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_VLArray = &__pyx_type_6tables_13hdf5extension_VLArray; __pyx_vtabptr_6tables_13hdf5extension_UnImplemented = &__pyx_vtable_6tables_13hdf5extension_UnImplemented; __pyx_vtable_6tables_13hdf5extension_UnImplemented.__pyx_base = *__pyx_vtabptr_6tables_13hdf5extension_Leaf; __pyx_type_6tables_13hdf5extension_UnImplemented.tp_base = __pyx_ptype_6tables_13hdf5extension_Leaf; if (PyType_Ready(&__pyx_type_6tables_13hdf5extension_UnImplemented) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetVtable(__pyx_type_6tables_13hdf5extension_UnImplemented.tp_dict, __pyx_vtabptr_6tables_13hdf5extension_UnImplemented) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "UnImplemented", (PyObject *)&__pyx_type_6tables_13hdf5extension_UnImplemented) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_6tables_13hdf5extension_UnImplemented = &__pyx_type_6tables_13hdf5extension_UnImplemented; /*--- 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_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[3]; __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[4]; __pyx_lineno = 15; __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, "malloc_dims", (void (**)(void))&__pyx_f_6tables_14utilsextension_malloc_dims, "hsize_t *(PyObject *)") < 0) {__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/hdf5extension.pyx":32 * """ * * import os # <<<<<<<<<<<<<< * import warnings * */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0, -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); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__os, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":33 * * import os * import warnings # <<<<<<<<<<<<<< * * from cpython cimport PY_MAJOR_VERSION */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__warnings), 0, -1); 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__warnings, __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; /* "tables/hdf5extension.pyx":36 * * from cpython cimport PY_MAJOR_VERSION * if PY_MAJOR_VERSION < 3: # <<<<<<<<<<<<<< * import cPickle as pickle * else: */ __pyx_t_3 = (PY_MAJOR_VERSION < 3); if (__pyx_t_3) { /* "tables/hdf5extension.pyx":37 * from cpython cimport PY_MAJOR_VERSION * if PY_MAJOR_VERSION < 3: * import cPickle as pickle # <<<<<<<<<<<<<< * else: * import pickle */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__cPickle), 0, -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); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pickle, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L2; } /*else*/ { /* "tables/hdf5extension.pyx":39 * import cPickle as pickle * else: * import pickle # <<<<<<<<<<<<<< * * import numpy */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pickle), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pickle, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L2:; /* "tables/hdf5extension.pyx":41 * import pickle * * import numpy # <<<<<<<<<<<<<< * * from tables.exceptions import HDF5ExtError, DataTypeWarning */ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __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 = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":43 * import numpy * * from tables.exceptions import HDF5ExtError, DataTypeWarning # <<<<<<<<<<<<<< * * from tables.utils import (check_file_access, byteorders, correct_byteorder, */ __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __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_INCREF(((PyObject *)__pyx_n_s__DataTypeWarning)); PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__DataTypeWarning)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DataTypeWarning)); __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_146), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __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 = 43; __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 = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__DataTypeWarning); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__DataTypeWarning); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DataTypeWarning, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "tables/hdf5extension.pyx":45 * from tables.exceptions import HDF5ExtError, DataTypeWarning * * from tables.utils import (check_file_access, byteorders, correct_byteorder, # <<<<<<<<<<<<<< * SizeType) * */ __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s__check_file_access)); PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__check_file_access)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__check_file_access)); __Pyx_INCREF(((PyObject *)__pyx_n_s__byteorders)); PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__byteorders)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__byteorders)); __Pyx_INCREF(((PyObject *)__pyx_n_s__correct_byteorder)); PyList_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_n_s__correct_byteorder)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__correct_byteorder)); __Pyx_INCREF(((PyObject *)__pyx_n_s__SizeType)); PyList_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_n_s__SizeType)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SizeType)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_147), ((PyObject *)__pyx_t_4), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__check_file_access); if (__pyx_t_4 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__check_file_access); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__check_file_access, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__byteorders); if (__pyx_t_4 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__byteorders); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__byteorders, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__correct_byteorder); if (__pyx_t_4 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__correct_byteorder); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__correct_byteorder, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__SizeType); if (__pyx_t_4 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__SizeType); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SizeType, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":48 * SizeType) * * from tables.atom import Atom # <<<<<<<<<<<<<< * * from tables.description import descr_from_dtype */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__Atom)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__Atom)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Atom)); __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_148), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__Atom); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__Atom); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Atom, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "tables/hdf5extension.pyx":50 * from tables.atom import Atom * * from tables.description import descr_from_dtype # <<<<<<<<<<<<<< * * from tables.utilsextension import (encode_filename, set_blosc_max_threads, */ __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s__descr_from_dtype)); PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__descr_from_dtype)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__descr_from_dtype)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_149), ((PyObject *)__pyx_t_4), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__descr_from_dtype); if (__pyx_t_4 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__descr_from_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__descr_from_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":52 * from tables.description import descr_from_dtype * * from tables.utilsextension import (encode_filename, set_blosc_max_threads, # <<<<<<<<<<<<<< * atom_to_hdf5_type, atom_from_hdf5_type, hdf5_to_np_ext_type, create_nested_type, * 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 = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_n_s__encode_filename)); PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__encode_filename)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__encode_filename)); __Pyx_INCREF(((PyObject *)__pyx_n_s_37)); PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s_37)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_37)); __Pyx_INCREF(((PyObject *)__pyx_n_s__atom_to_hdf5_type)); PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_s__atom_to_hdf5_type)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__atom_to_hdf5_type)); __Pyx_INCREF(((PyObject *)__pyx_n_s__atom_from_hdf5_type)); PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__atom_from_hdf5_type)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__atom_from_hdf5_type)); __Pyx_INCREF(((PyObject *)__pyx_n_s__hdf5_to_np_ext_type)); PyList_SET_ITEM(__pyx_t_2, 4, ((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, 5, ((PyObject *)__pyx_n_s__create_nested_type)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__create_nested_type)); __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_151)); PyList_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_s_151)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_151)); __Pyx_INCREF(((PyObject *)__pyx_n_s_152)); PyList_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_s_152)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s_152)); __Pyx_INCREF(((PyObject *)__pyx_n_s__platform_byteorder)); PyList_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_n_s__platform_byteorder)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__platform_byteorder)); __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s_150), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__encode_filename); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__encode_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__encode_filename, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s_37); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s_37); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s_37, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__atom_to_hdf5_type); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__atom_to_hdf5_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__atom_to_hdf5_type, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __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 = 52; __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 = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __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 = 52; __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 = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __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 = 52; __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 = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __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 = 52; __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 = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __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 = 52; __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 = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s_151); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s_151); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s_151, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s_152); if (__pyx_t_2 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s_152); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s_152, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __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 = 52; __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 = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "tables/hdf5extension.pyx":57 * platform_byteorder) * * from tables._past import previous_api # <<<<<<<<<<<<<< * * */ __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_n_s__previous_api)); PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__previous_api)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__previous_api)); __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_153), ((PyObject *)__pyx_t_4), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__previous_api); if (__pyx_t_4 == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__previous_api); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__previous_api, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":100 * H5_HAVE_IMAGE_FILE, pt_H5Pset_file_image, pt_H5Fget_file_image) * * cdef int H5T_CSET_DEFAULT = 16 # <<<<<<<<<<<<<< * * from utilsextension cimport malloc_dims, get_native_type, cstr_to_pystr */ __pyx_v_6tables_13hdf5extension_H5T_CSET_DEFAULT = 16; /* "tables/hdf5extension.pyx":170 * # The numpy API requires this function to be called before * # using any numpy facilities in an extension module. * import_array() # <<<<<<<<<<<<<< * * #--------------------------------------------------------------------------- */ import_array(); /* "tables/hdf5extension.pyx":276 * * _supported_drivers = ( * "H5FD_SEC2", # <<<<<<<<<<<<<< * "H5FD_DIRECT", * #"H5FD_LOG", */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s___supported_drivers, ((PyObject *)__pyx_k_tuple_154)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "tables/hdf5extension.pyx":290 * ) * * HAVE_DIRECT_DRIVER = bool(H5_HAVE_DIRECT_DRIVER) # <<<<<<<<<<<<<< * HAVE_WINDOWS_DRIVER = bool(H5_HAVE_WINDOWS_DRIVER) * */ __pyx_t_2 = PyInt_FromLong(H5_HAVE_DIRECT_DRIVER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__HAVE_DIRECT_DRIVER, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":291 * * HAVE_DIRECT_DRIVER = bool(H5_HAVE_DIRECT_DRIVER) * HAVE_WINDOWS_DRIVER = bool(H5_HAVE_WINDOWS_DRIVER) # <<<<<<<<<<<<<< * * # Type extensions declarations (these are subclassed by PyTables */ __pyx_t_2 = PyInt_FromLong(H5_HAVE_WINDOWS_DRIVER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__HAVE_WINDOWS_DRIVER, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "tables/hdf5extension.pyx":581 * return descriptor[0] * * _getFileId = previous_api(_get_file_id) # <<<<<<<<<<<<<< * * def _flush_file(self, scope): */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_File, __pyx_n_s___get_file_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __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); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __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; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_File->tp_dict, __pyx_n_s___getFileId, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_File); /* "tables/hdf5extension.pyx":587 * H5Fflush(self.file_id, scope) * * _flushFile = previous_api(_flush_file) # <<<<<<<<<<<<<< * * def _close_file(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 = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_File, __pyx_n_s___flush_file); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __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_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_File->tp_dict, __pyx_n_s___flushFile, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_File); /* "tables/hdf5extension.pyx":594 * self.file_id = 0 # Means file closed * * _closeFile = previous_api(_close_file) # <<<<<<<<<<<<<< * * # This method is moved out of scope, until we provide code to delete */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_File, __pyx_n_s___close_file); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_File->tp_dict, __pyx_n_s___closeFile, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_File); /* "tables/hdf5extension.pyx":618 * return a * * _g_listAttr = previous_api(_g_list_attr) # <<<<<<<<<<<<<< * * def _g_setattr(self, node, name, object value): */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_AttributeSet, __pyx_n_s___g_list_attr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __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); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __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; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_AttributeSet->tp_dict, __pyx_n_s___g_listAttr, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_AttributeSet); /* "tables/hdf5extension.pyx":693 * (name, self._v_node)) * * _g_setAttr = previous_api(_g_setattr) # <<<<<<<<<<<<<< * * # Get attributes */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_AttributeSet, __pyx_n_s___g_setattr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __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_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_AttributeSet->tp_dict, __pyx_n_s___g_setAttr, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_AttributeSet); /* "tables/hdf5extension.pyx":851 * return retvalue * * _g_getAttr = previous_api(_g_getattr) # <<<<<<<<<<<<<< * * def _g_remove(self, node, attrname): */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_AttributeSet, __pyx_n_s___g_getattr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_AttributeSet->tp_dict, __pyx_n_s___g_getAttr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_AttributeSet); /* "tables/hdf5extension.pyx":972 * return Giterate(parent._v_objectid, self._v_objectid, encoded_name) * * _g_listGroup = previous_api(_g_list_group) # <<<<<<<<<<<<<< * * def _g_get_gchild_attr(self, group_name, attr_name): */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group, __pyx_n_s___g_list_group); 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_t_5 = PyTuple_New(1); 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); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group->tp_dict, __pyx_n_s___g_listGroup, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Group); /* "tables/hdf5extension.pyx":1001 * return retvalue * * _g_getGChildAttr = previous_api(_g_get_gchild_attr) # <<<<<<<<<<<<<< * * def _g_get_lchild_attr(self, leaf_name, attr_name): */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group, __pyx_n_s___g_get_gchild_attr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __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_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group->tp_dict, __pyx_n_s___g_getGChildAttr, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Group); /* "tables/hdf5extension.pyx":1028 * return retvalue * * _g_getLChildAttr = previous_api(_g_get_lchild_attr) # <<<<<<<<<<<<<< * * def _g_flush_group(self): */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group, __pyx_n_s___g_get_lchild_attr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group->tp_dict, __pyx_n_s___g_getLChildAttr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Group); /* "tables/hdf5extension.pyx":1034 * H5Fflush(self.group_id, H5F_SCOPE_GLOBAL) * * _g_flushGroup = previous_api(_g_flush_group) # <<<<<<<<<<<<<< * * def _g_close_group(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 = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group, __pyx_n_s___g_flush_group); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __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); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __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; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group->tp_dict, __pyx_n_s___g_flushGroup, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Group); /* "tables/hdf5extension.pyx":1044 * self.group_id = 0 # indicate that this group is closed * * _g_closeGroup = previous_api(_g_close_group) # <<<<<<<<<<<<<< * * def _g_move_node(self, hid_t oldparent, oldname, hid_t newparent, newname, */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group, __pyx_n_s___g_close_group); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __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_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group->tp_dict, __pyx_n_s___g_closeGroup, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Group); /* "tables/hdf5extension.pyx":1061 * return ret * * _g_moveNode = previous_api(_g_move_node) # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group, __pyx_n_s___g_move_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Group->tp_dict, __pyx_n_s___g_moveNode, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Group); /* "tables/hdf5extension.pyx":1226 * return (self.dataset_id, shape, atom_) * * _createArray = previous_api(_create_array) # <<<<<<<<<<<<<< * * def _create_carray(self, object title): */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___create_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __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); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __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; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___createArray, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1298 * return self.dataset_id * * _createCArray = previous_api(_create_carray) # <<<<<<<<<<<<<< * * def _open_array(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 = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___create_carray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __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_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___createCArray, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1380 * return (self.dataset_id, atom, shape, chunkshapes) * * _openArray = previous_api(_open_array) # <<<<<<<<<<<<<< * * def _append(self, ndarray nparr): */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___open_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___openArray, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1447 * return * * _readArray = previous_api(_read_array) # <<<<<<<<<<<<<< * * def _g_read_slice(self, ndarray startl, ndarray stopl, ndarray stepl, */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___read_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __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); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __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; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___readArray, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1481 * return * * _g_readSlice = previous_api(_g_read_slice) # <<<<<<<<<<<<<< * * def _g_read_coords(self, ndarray coords, ndarray nparr): */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___g_read_slice); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; __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_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___g_readSlice, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1530 * return * * _g_readCoords = previous_api(_g_read_coords) # <<<<<<<<<<<<<< * * def perform_selection(self, space_id, start, count, step, idx, mode): */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___g_read_coords); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___g_readCoords, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1623 * return * * _g_readSelection = previous_api(_g_read_selection) # <<<<<<<<<<<<<< * * def _g_write_slice(self, ndarray startl, ndarray stepl, ndarray countl, */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___g_read_selection); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __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); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __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; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___g_readSelection, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1655 * return * * _g_writeSlice = previous_api(_g_write_slice) # <<<<<<<<<<<<<< * * def _g_write_coords(self, ndarray coords, ndarray nparr): */ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___g_write_slice); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __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_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___g_writeSlice, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1699 * return * * _g_writeCoords = previous_api(_g_write_coords) # <<<<<<<<<<<<<< * * def _g_write_selection(self, object selection, ndarray nparr): */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___g_write_coords); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___g_writeCoords, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1746 * return * * _g_writeSelection = previous_api(_g_write_selection) # <<<<<<<<<<<<<< * * def __dealloc__(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 = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array, __pyx_n_s___g_write_selection); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __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); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __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; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array->tp_dict, __pyx_n_s___g_writeSelection, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_Array); /* "tables/hdf5extension.pyx":1823 * return self.dataset_id * * _createArray = previous_api(_create_array) # <<<<<<<<<<<<<< * * def _open_array(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 = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_VLArray, __pyx_n_s___create_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __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_2)); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_VLArray->tp_dict, __pyx_n_s___createArray, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_VLArray); /* "tables/hdf5extension.pyx":1868 * return self.dataset_id, SizeType(nrecords), (SizeType(chunksize),), atom * * _openArray = previous_api(_open_array) # <<<<<<<<<<<<<< * * def _append(self, ndarray nparr, int nobjects): */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_VLArray, __pyx_n_s___open_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_VLArray->tp_dict, __pyx_n_s___openArray, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_VLArray); /* "tables/hdf5extension.pyx":2018 * return datalist * * _readArray = previous_api(_read_array) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__previous_api); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetName((PyObject *)__pyx_ptype_6tables_13hdf5extension_VLArray, __pyx_n_s___read_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __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); __pyx_t_4 = 0; __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __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; if (PyDict_SetItem((PyObject *)__pyx_ptype_6tables_13hdf5extension_VLArray->tp_dict, __pyx_n_s___readArray, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_6tables_13hdf5extension_VLArray); /* "tables/hdf5extension.pyx":1 * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<< * * ######################################################################## */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 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_4); __Pyx_XDECREF(__pyx_t_5); if (__pyx_m) { __Pyx_AddTraceback("init tables.hdf5extension", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init tables.hdf5extension"); } __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 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_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } 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 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_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 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 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 void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } 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 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 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 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); } } static CYTHON_INLINE hbool_t __Pyx_PyInt_from_py_hbool_t(PyObject* x) { const hbool_t neg_one = (hbool_t)-1, const_zero = (hbool_t)0; const int is_unsigned = const_zero < neg_one; if (sizeof(hbool_t) == sizeof(char)) { if (is_unsigned) return (hbool_t)__Pyx_PyInt_AsUnsignedChar(x); else return (hbool_t)__Pyx_PyInt_AsSignedChar(x); } else if (sizeof(hbool_t) == sizeof(short)) { if (is_unsigned) return (hbool_t)__Pyx_PyInt_AsUnsignedShort(x); else return (hbool_t)__Pyx_PyInt_AsSignedShort(x); } else if (sizeof(hbool_t) == sizeof(int)) { if (is_unsigned) return (hbool_t)__Pyx_PyInt_AsUnsignedInt(x); else return (hbool_t)__Pyx_PyInt_AsSignedInt(x); } else if (sizeof(hbool_t) == sizeof(long)) { if (is_unsigned) return (hbool_t)__Pyx_PyInt_AsUnsignedLong(x); else return (hbool_t)__Pyx_PyInt_AsSignedLong(x); } else if (sizeof(hbool_t) == sizeof(PY_LONG_LONG)) { if (is_unsigned) return (hbool_t)__Pyx_PyInt_AsUnsignedLongLong(x); else return (hbool_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 hbool_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 (hbool_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_uintptr_t(uintptr_t val) { const uintptr_t neg_one = (uintptr_t)-1, const_zero = (uintptr_t)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(uintptr_t) == sizeof(char)) || (sizeof(uintptr_t) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(uintptr_t) == sizeof(int)) || (sizeof(uintptr_t) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(uintptr_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(uintptr_t), little, !is_unsigned); } } static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_htri_t(htri_t val) { const htri_t neg_one = (htri_t)-1, const_zero = (htri_t)0; const int is_unsigned = const_zero < neg_one; if ((sizeof(htri_t) == sizeof(char)) || (sizeof(htri_t) == sizeof(short))) { return PyInt_FromLong((long)val); } else if ((sizeof(htri_t) == sizeof(int)) || (sizeof(htri_t) == sizeof(long))) { if (is_unsigned) return PyLong_FromUnsignedLong((unsigned long)val); else return PyInt_FromLong((long)val); } else if (sizeof(htri_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(htri_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 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; } 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_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 #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 */