Generated by Cython 0.16 on Thu Nov 29 08:42:16 2012

Raw output: pytables.c

     1: ### pytables extensions ###

      /* "pandas/src/pytables.pyx":1
     * ### pytables extensions ###             # <<<<<<<<<<<<<<
     *
     * from numpy cimport ndarray, int32_t, float64_t, int64_t
     */
      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

     2:

     3: from numpy cimport ndarray, int32_t, float64_t, int64_t

     4: cimport numpy as np

     5:

     6: cimport cython

     7:

     8: import numpy as np

      /* "pandas/src/pytables.pyx":8
     * cimport cython
     *
     * import numpy as np             # <<<<<<<<<<<<<<
     * import operator
     * import sys
     */
      __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     9: import operator

      /* "pandas/src/pytables.pyx":9
     *
     * import numpy as np
     * import operator             # <<<<<<<<<<<<<<
     * import sys
     *
     */
      __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__operator, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     10: import sys

      /* "pandas/src/pytables.pyx":10
     * import numpy as np
     * import operator
     * import sys             # <<<<<<<<<<<<<<
     *
     * np.import_array()
     */
      __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     11:

     12: np.import_array()

      /* "pandas/src/pytables.pyx":12
     * import sys
     *
     * np.import_array()             # <<<<<<<<<<<<<<
     * np.import_ufunc()
     *
     */
      import_array();

     13: np.import_ufunc()

      /* "pandas/src/pytables.pyx":13
     *
     * np.import_array()
     * np.import_ufunc()             # <<<<<<<<<<<<<<
     *
     *
     */
      import_ufunc();

     14:

     15:

     16: from cpython cimport (PyDict_New, PyDict_GetItem, PyDict_SetItem,

     17:                       PyDict_Contains, PyDict_Keys,

     18:                       Py_INCREF, PyTuple_SET_ITEM,

     19:                       PyTuple_SetItem,

     20:                       PyTuple_New,

     21:                       PyObject_SetAttrString)

     22:

     23: @cython.boundscheck(False)

     24: @cython.wraparound(False)

     25: def create_hdf_rows_2d(ndarray index, ndarray[np.uint8_t, ndim=1] mask, list values):

    /* "pandas/src/pytables.pyx":25
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def create_hdf_rows_2d(ndarray index, ndarray[np.uint8_t, ndim=1] mask, list values):             # <<<<<<<<<<<<<<
     *     """ return a list of objects ready to be converted to rec-array format """
     *
     */

    static PyObject *__pyx_pf_6pandas_9_pytables_create_hdf_rows_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_values) {
      unsigned int __pyx_v_i;
      unsigned int __pyx_v_b;
      unsigned int __pyx_v_n_index;
      unsigned int __pyx_v_n_blocks;
      unsigned int __pyx_v_tup_size;
      PyArrayObject *__pyx_v_v = 0;
      PyObject *__pyx_v_l = 0;
      PyObject *__pyx_v_tup = 0;
      PyObject *__pyx_v_val = 0;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
      __Pyx_Buffer __pyx_pybuffer_mask;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("create_hdf_rows_2d", 0);
      __pyx_pybuffer_mask.pybuffer.buf = NULL;
      __pyx_pybuffer_mask.refcount = 0;
      __pyx_pybuffernd_mask.data = NULL;
      __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

      /* "pandas/src/pytables.pyx":25
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def create_hdf_rows_2d(ndarray index, ndarray[np.uint8_t, ndim=1] mask, list values):             # <<<<<<<<<<<<<<
     *     """ return a list of objects ready to be converted to rec-array format """
     *
     */
      __pyx_k_tuple_15 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_k_tuple_15);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_n_s__index));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 1, ((PyObject *)__pyx_n_s__mask));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 2, ((PyObject *)__pyx_n_s__values));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 3, ((PyObject *)__pyx_n_s__i));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__b));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 4, ((PyObject *)__pyx_n_s__b));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__n_index));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 5, ((PyObject *)__pyx_n_s__n_index));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n_index));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__n_blocks));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 6, ((PyObject *)__pyx_n_s__n_blocks));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n_blocks));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__tup_size));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 7, ((PyObject *)__pyx_n_s__tup_size));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup_size));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 8, ((PyObject *)__pyx_n_s__v));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 9, ((PyObject *)__pyx_n_s__l));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__tup));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 10, ((PyObject *)__pyx_n_s__tup));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
      PyTuple_SET_ITEM(__pyx_k_tuple_15, 11, ((PyObject *)__pyx_n_s__val));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
      __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));

      /* "pandas/src/pytables.pyx":25
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def create_hdf_rows_2d(ndarray index, ndarray[np.uint8_t, ndim=1] mask, list values):             # <<<<<<<<<<<<<<
     *     """ return a list of objects ready to be converted to rec-array format """
     *
     */
      __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_9_pytables_1create_hdf_rows_2d, NULL, __pyx_n_s_18); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__create_hdf_rows_2d, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_k_codeobj_16 = (PyObject*)__Pyx_PyCode_New(3, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_17, __pyx_n_s__create_hdf_rows_2d, 25, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

     26:     """ return a list of objects ready to be converted to rec-array format """

     27:

     28:     cdef:

     29:         unsigned int i, b, n_index, n_blocks, tup_size

     30:         ndarray v

     31:         list l

     32:         object tup, val

     33:

     34:     n_index   = index.shape[0]

      /* "pandas/src/pytables.pyx":34
     *         object tup, val
     *
     *     n_index   = index.shape[0]             # <<<<<<<<<<<<<<
     *     n_blocks  = len(values)
     *     tup_size  = n_blocks+1
     */
      __pyx_v_n_index = (__pyx_v_index->dimensions[0]);

     35:     n_blocks  = len(values)

      /* "pandas/src/pytables.pyx":35
     *
     *     n_index   = index.shape[0]
     *     n_blocks  = len(values)             # <<<<<<<<<<<<<<
     *     tup_size  = n_blocks+1
     *     l = []
     */
      if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_values));
      __pyx_v_n_blocks = __pyx_t_1;

     36:     tup_size  = n_blocks+1

      /* "pandas/src/pytables.pyx":36
     *     n_index   = index.shape[0]
     *     n_blocks  = len(values)
     *     tup_size  = n_blocks+1             # <<<<<<<<<<<<<<
     *     l = []
     *     for i from 0 <= i < n_index:
     */
      __pyx_v_tup_size = (__pyx_v_n_blocks + 1);

     37:     l = []

      /* "pandas/src/pytables.pyx":37
     *     n_blocks  = len(values)
     *     tup_size  = n_blocks+1
     *     l = []             # <<<<<<<<<<<<<<
     *     for i from 0 <= i < n_index:
     *
     */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_l = __pyx_t_2;
      __pyx_t_2 = 0;

     38:     for i from 0 <= i < n_index:

      /* "pandas/src/pytables.pyx":38
     *     tup_size  = n_blocks+1
     *     l = []
     *     for i from 0 <= i < n_index:             # <<<<<<<<<<<<<<
     *
     *         if not mask[i]:
     */
      __pyx_t_3 = __pyx_v_n_index;
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

     39:

     40:         if not mask[i]:

        /* "pandas/src/pytables.pyx":40
     *     for i from 0 <= i < n_index:
     *
     *         if not mask[i]:             # <<<<<<<<<<<<<<
     *
     *             tup = PyTuple_New(tup_size)
     */
        __pyx_t_4 = __pyx_v_i;
        __pyx_t_5 = (!(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_mask.diminfo[0].strides)));
        if (__pyx_t_5) {

     41:

     42:             tup = PyTuple_New(tup_size)

          /* "pandas/src/pytables.pyx":42
     *         if not mask[i]:
     *
     *             tup = PyTuple_New(tup_size)             # <<<<<<<<<<<<<<
     *             val  = index[i]
     *             PyTuple_SET_ITEM(tup, 0, val)
     */
          __pyx_t_2 = ((PyObject *)PyTuple_New(__pyx_v_tup_size)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_v_tup);
          __pyx_v_tup = __pyx_t_2;
          __pyx_t_2 = 0;

     43:             val  = index[i]

          /* "pandas/src/pytables.pyx":43
     *
     *             tup = PyTuple_New(tup_size)
     *             val  = index[i]             # <<<<<<<<<<<<<<
     *             PyTuple_SET_ITEM(tup, 0, val)
     *             Py_INCREF(val)
     */
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_index), __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF(__pyx_v_val);
          __pyx_v_val = __pyx_t_2;
          __pyx_t_2 = 0;

     44:             PyTuple_SET_ITEM(tup, 0, val)

          /* "pandas/src/pytables.pyx":44
     *             tup = PyTuple_New(tup_size)
     *             val  = index[i]
     *             PyTuple_SET_ITEM(tup, 0, val)             # <<<<<<<<<<<<<<
     *             Py_INCREF(val)
     *
     */
          PyTuple_SET_ITEM(__pyx_v_tup, 0, __pyx_v_val);

     45:             Py_INCREF(val)

          /* "pandas/src/pytables.pyx":45
     *             val  = index[i]
     *             PyTuple_SET_ITEM(tup, 0, val)
     *             Py_INCREF(val)             # <<<<<<<<<<<<<<
     *
     *             for b from 0 <= b < n_blocks:
     */
          Py_INCREF(__pyx_v_val);

     46:

     47:             for b from 0 <= b < n_blocks:

          /* "pandas/src/pytables.pyx":47
     *             Py_INCREF(val)
     *
     *             for b from 0 <= b < n_blocks:             # <<<<<<<<<<<<<<
     *
     *                 v   = values[b][:, i]
     */
          __pyx_t_6 = __pyx_v_n_blocks;
          for (__pyx_v_b = 0; __pyx_v_b < __pyx_t_6; __pyx_v_b++) {

     48:

     49:                 v   = values[b][:, i]

            /* "pandas/src/pytables.pyx":49
     *             for b from 0 <= b < n_blocks:
     *
     *                 v   = values[b][:, i]             # <<<<<<<<<<<<<<
     *                 PyTuple_SET_ITEM(tup, b+1, v)
     *                 Py_INCREF(v)
     */
            __pyx_t_2 = PyLong_FromUnsignedLong(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_k_slice_1);
            PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_k_slice_1);
            __Pyx_GIVEREF(__pyx_k_slice_1);
            PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_GetItem(PyList_GET_ITEM(__pyx_v_values, __pyx_v_b), ((PyObject *)__pyx_t_7)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 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 = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_XDECREF(((PyObject *)__pyx_v_v));
            __pyx_v_v = ((PyArrayObject *)__pyx_t_2);
            __pyx_t_2 = 0;

      /* "pandas/src/pytables.pyx":49
     *             for b from 0 <= b < n_blocks:
     *
     *                 v   = values[b][:, i]             # <<<<<<<<<<<<<<
     *                 PyTuple_SET_ITEM(tup, b+1, v)
     *                 Py_INCREF(v)
     */
      __pyx_k_slice_1 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_k_slice_1);
      __Pyx_GIVEREF(__pyx_k_slice_1);

     50:                 PyTuple_SET_ITEM(tup, b+1, v)

            /* "pandas/src/pytables.pyx":50
     *
     *                 v   = values[b][:, i]
     *                 PyTuple_SET_ITEM(tup, b+1, v)             # <<<<<<<<<<<<<<
     *                 Py_INCREF(v)
     *
     */
            PyTuple_SET_ITEM(__pyx_v_tup, (__pyx_v_b + 1), ((PyObject *)__pyx_v_v));

     51:                 Py_INCREF(v)

            /* "pandas/src/pytables.pyx":51
     *                 v   = values[b][:, i]
     *                 PyTuple_SET_ITEM(tup, b+1, v)
     *                 Py_INCREF(v)             # <<<<<<<<<<<<<<
     *
     *             l.append(tup)
     */
            Py_INCREF(((PyObject *)__pyx_v_v));
          }

     52:

     53:             l.append(tup)

          /* "pandas/src/pytables.pyx":53
     *                 Py_INCREF(v)
     *
     *             l.append(tup)             # <<<<<<<<<<<<<<
     *
     *     return l
     */
          __pyx_t_8 = PyList_Append(__pyx_v_l, __pyx_v_tup); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L5;
        }
        __pyx_L5:;
      }

     54:

     55:     return l

      /* "pandas/src/pytables.pyx":55
     *             l.append(tup)
     *
     *     return l             # <<<<<<<<<<<<<<
     *
     * @cython.boundscheck(False)
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_l));
      __pyx_r = ((PyObject *)__pyx_v_l);
      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_7);
      { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
        __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
      __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
      __Pyx_AddTraceback("pandas._pytables.create_hdf_rows_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      goto __pyx_L2;
      __pyx_L0:;
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
      __pyx_L2:;
      __Pyx_XDECREF((PyObject *)__pyx_v_v);
      __Pyx_XDECREF(__pyx_v_l);
      __Pyx_XDECREF(__pyx_v_tup);
      __Pyx_XDECREF(__pyx_v_val);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6pandas_9_pytables_3create_hdf_rows_3d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static char __pyx_doc_6pandas_9_pytables_2create_hdf_rows_3d[] = " return a list of objects ready to be converted to rec-array format ";
    static PyMethodDef __pyx_mdef_6pandas_9_pytables_3create_hdf_rows_3d = {__Pyx_NAMESTR("create_hdf_rows_3d"), (PyCFunction)__pyx_pw_6pandas_9_pytables_3create_hdf_rows_3d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_9_pytables_2create_hdf_rows_3d)};
    static PyObject *__pyx_pw_6pandas_9_pytables_3create_hdf_rows_3d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyArrayObject *__pyx_v_index = 0;
      PyArrayObject *__pyx_v_columns = 0;
      PyArrayObject *__pyx_v_mask = 0;
      PyObject *__pyx_v_values = 0;
      static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__columns,&__pyx_n_s__mask,&__pyx_n_s__values,0};
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("create_hdf_rows_3d (wrapper)", 0);
      __pyx_self = __pyx_self;
      {
        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:
            values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
            if (likely(values[0])) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__columns);
            if (likely(values[1])) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            case  2:
            values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
            if (likely(values[2])) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            case  3:
            values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
            if (likely(values[3])) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __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_hdf_rows_3d") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __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_index = ((PyArrayObject *)values[0]);
        __pyx_v_columns = ((PyArrayObject *)values[1]);
        __pyx_v_mask = ((PyArrayObject *)values[2]);
        __pyx_v_values = ((PyObject*)values[3]);
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("create_hdf_rows_3d", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_L3_error:;
      __Pyx_AddTraceback("pandas._pytables.create_hdf_rows_3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), __pyx_ptype_5numpy_ndarray, 1, "columns", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = __pyx_pf_6pandas_9_pytables_2create_hdf_rows_3d(__pyx_self, __pyx_v_index, __pyx_v_columns, __pyx_v_mask, __pyx_v_values);
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     56:

     57: @cython.boundscheck(False)

     58: @cython.wraparound(False)

     59: def create_hdf_rows_3d(ndarray index, ndarray columns, ndarray[np.uint8_t, ndim=2] mask, list values):

    /* "pandas/src/pytables.pyx":59
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def create_hdf_rows_3d(ndarray index, ndarray columns, ndarray[np.uint8_t, ndim=2] mask, list values):             # <<<<<<<<<<<<<<
     *     """ return a list of objects ready to be converted to rec-array format """
     *
     */

    static PyObject *__pyx_pf_6pandas_9_pytables_2create_hdf_rows_3d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_columns, PyArrayObject *__pyx_v_mask, PyObject *__pyx_v_values) {
      unsigned int __pyx_v_i;
      unsigned int __pyx_v_n_columns;
      unsigned int __pyx_v_n_index;
      unsigned int __pyx_v_n_blocks;
      unsigned int __pyx_v_tup_size;
      PyArrayObject *__pyx_v_v = 0;
      PyObject *__pyx_v_l = 0;
      PyObject *__pyx_v_tup = 0;
      PyObject *__pyx_v_val = 0;
      long __pyx_v_c;
      PyObject *__pyx_v_b = NULL;
      __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
      __Pyx_Buffer __pyx_pybuffer_mask;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("create_hdf_rows_3d", 0);
      __pyx_pybuffer_mask.pybuffer.buf = NULL;
      __pyx_pybuffer_mask.refcount = 0;
      __pyx_pybuffernd_mask.data = NULL;
      __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

      /* "pandas/src/pytables.pyx":59
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def create_hdf_rows_3d(ndarray index, ndarray columns, ndarray[np.uint8_t, ndim=2] mask, list values):             # <<<<<<<<<<<<<<
     *     """ return a list of objects ready to be converted to rec-array format """
     *
     */
      __pyx_k_tuple_19 = PyTuple_New(16); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_k_tuple_19);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_n_s__index));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__columns));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 1, ((PyObject *)__pyx_n_s__columns));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__columns));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 2, ((PyObject *)__pyx_n_s__mask));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 3, ((PyObject *)__pyx_n_s__values));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 4, ((PyObject *)__pyx_n_s__i));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 5, ((PyObject *)__pyx_n_s__j));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__n_columns));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 6, ((PyObject *)__pyx_n_s__n_columns));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n_columns));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__n_index));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 7, ((PyObject *)__pyx_n_s__n_index));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n_index));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__n_blocks));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 8, ((PyObject *)__pyx_n_s__n_blocks));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n_blocks));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__tup_size));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 9, ((PyObject *)__pyx_n_s__tup_size));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup_size));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 10, ((PyObject *)__pyx_n_s__v));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 11, ((PyObject *)__pyx_n_s__l));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__tup));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 12, ((PyObject *)__pyx_n_s__tup));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 13, ((PyObject *)__pyx_n_s__val));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__c));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 14, ((PyObject *)__pyx_n_s__c));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c));
      __Pyx_INCREF(((PyObject *)__pyx_n_s__b));
      PyTuple_SET_ITEM(__pyx_k_tuple_19, 15, ((PyObject *)__pyx_n_s__b));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b));
      __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));

      /* "pandas/src/pytables.pyx":59
     * @cython.boundscheck(False)
     * @cython.wraparound(False)
     * def create_hdf_rows_3d(ndarray index, ndarray columns, ndarray[np.uint8_t, ndim=2] mask, list values):             # <<<<<<<<<<<<<<
     *     """ return a list of objects ready to be converted to rec-array format """
     *
     */
      __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_9_pytables_3create_hdf_rows_3d, NULL, __pyx_n_s_18); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__create_hdf_rows_3d, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     60:     """ return a list of objects ready to be converted to rec-array format """

     61:

     62:     cdef:

     63:         unsigned int i, j, n_columns, n_index, n_blocks, tup_size

     64:         ndarray v

     65:         list l

     66:         object tup, val

     67:

     68:     n_index   = index.shape[0]

      /* "pandas/src/pytables.pyx":68
     *         object tup, val
     *
     *     n_index   = index.shape[0]             # <<<<<<<<<<<<<<
     *     n_columns = columns.shape[0]
     *     n_blocks  = len(values)
     */
      __pyx_v_n_index = (__pyx_v_index->dimensions[0]);

     69:     n_columns = columns.shape[0]

      /* "pandas/src/pytables.pyx":69
     *
     *     n_index   = index.shape[0]
     *     n_columns = columns.shape[0]             # <<<<<<<<<<<<<<
     *     n_blocks  = len(values)
     *     tup_size  = n_blocks+2
     */
      __pyx_v_n_columns = (__pyx_v_columns->dimensions[0]);

     70:     n_blocks  = len(values)

      /* "pandas/src/pytables.pyx":70
     *     n_index   = index.shape[0]
     *     n_columns = columns.shape[0]
     *     n_blocks  = len(values)             # <<<<<<<<<<<<<<
     *     tup_size  = n_blocks+2
     *     l = []
     */
      if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_values));
      __pyx_v_n_blocks = __pyx_t_1;

     71:     tup_size  = n_blocks+2

      /* "pandas/src/pytables.pyx":71
     *     n_columns = columns.shape[0]
     *     n_blocks  = len(values)
     *     tup_size  = n_blocks+2             # <<<<<<<<<<<<<<
     *     l = []
     *     for i from 0 <= i < n_index:
     */
      __pyx_v_tup_size = (__pyx_v_n_blocks + 2);

     72:     l = []

      /* "pandas/src/pytables.pyx":72
     *     n_blocks  = len(values)
     *     tup_size  = n_blocks+2
     *     l = []             # <<<<<<<<<<<<<<
     *     for i from 0 <= i < n_index:
     *
     */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_l = __pyx_t_2;
      __pyx_t_2 = 0;

     73:     for i from 0 <= i < n_index:

      /* "pandas/src/pytables.pyx":73
     *     tup_size  = n_blocks+2
     *     l = []
     *     for i from 0 <= i < n_index:             # <<<<<<<<<<<<<<
     *
     *         for c from 0 <= c < n_columns:
     */
      __pyx_t_3 = __pyx_v_n_index;
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

     74:

     75:         for c from 0 <= c < n_columns:

        /* "pandas/src/pytables.pyx":75
     *     for i from 0 <= i < n_index:
     *
     *         for c from 0 <= c < n_columns:             # <<<<<<<<<<<<<<
     *
     *             if not mask[i, c]:
     */
        __pyx_t_4 = __pyx_v_n_columns;
        for (__pyx_v_c = 0; __pyx_v_c < __pyx_t_4; __pyx_v_c++) {

     76:

     77:             if not mask[i, c]:

          /* "pandas/src/pytables.pyx":77
     *         for c from 0 <= c < n_columns:
     *
     *             if not mask[i, c]:             # <<<<<<<<<<<<<<
     *
     *                 tup = PyTuple_New(tup_size)
     */
          __pyx_t_5 = __pyx_v_i;
          __pyx_t_6 = __pyx_v_c;
          __pyx_t_7 = (!(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_6, __pyx_pybuffernd_mask.diminfo[1].strides)));
          if (__pyx_t_7) {

     78:

     79:                 tup = PyTuple_New(tup_size)

            /* "pandas/src/pytables.pyx":79
     *             if not mask[i, c]:
     *
     *                 tup = PyTuple_New(tup_size)             # <<<<<<<<<<<<<<
     *
     *                 val  = columns[c]
     */
            __pyx_t_2 = ((PyObject *)PyTuple_New(__pyx_v_tup_size)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_XDECREF(__pyx_v_tup);
            __pyx_v_tup = __pyx_t_2;
            __pyx_t_2 = 0;

     80:

     81:                 val  = columns[c]

            /* "pandas/src/pytables.pyx":81
     *                 tup = PyTuple_New(tup_size)
     *
     *                 val  = columns[c]             # <<<<<<<<<<<<<<
     *                 PyTuple_SET_ITEM(tup, 0, val)
     *                 Py_INCREF(val)
     */
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_columns), __pyx_v_c, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_XDECREF(__pyx_v_val);
            __pyx_v_val = __pyx_t_2;
            __pyx_t_2 = 0;

     82:                 PyTuple_SET_ITEM(tup, 0, val)

            /* "pandas/src/pytables.pyx":82
     *
     *                 val  = columns[c]
     *                 PyTuple_SET_ITEM(tup, 0, val)             # <<<<<<<<<<<<<<
     *                 Py_INCREF(val)
     *
     */
            PyTuple_SET_ITEM(__pyx_v_tup, 0, __pyx_v_val);

     83:                 Py_INCREF(val)

            /* "pandas/src/pytables.pyx":83
     *                 val  = columns[c]
     *                 PyTuple_SET_ITEM(tup, 0, val)
     *                 Py_INCREF(val)             # <<<<<<<<<<<<<<
     *
     *                 val  = index[i]
     */
            Py_INCREF(__pyx_v_val);

     84:

     85:                 val  = index[i]

            /* "pandas/src/pytables.pyx":85
     *                 Py_INCREF(val)
     *
     *                 val  = index[i]             # <<<<<<<<<<<<<<
     *                 PyTuple_SET_ITEM(tup, 1, val)
     *                 Py_INCREF(val)
     */
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_index), __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_v_val);
            __pyx_v_val = __pyx_t_2;
            __pyx_t_2 = 0;

     86:                 PyTuple_SET_ITEM(tup, 1, val)

            /* "pandas/src/pytables.pyx":86
     *
     *                 val  = index[i]
     *                 PyTuple_SET_ITEM(tup, 1, val)             # <<<<<<<<<<<<<<
     *                 Py_INCREF(val)
     *
     */
            PyTuple_SET_ITEM(__pyx_v_tup, 1, __pyx_v_val);

     87:                 Py_INCREF(val)

            /* "pandas/src/pytables.pyx":87
     *                 val  = index[i]
     *                 PyTuple_SET_ITEM(tup, 1, val)
     *                 Py_INCREF(val)             # <<<<<<<<<<<<<<
     *
     *                 for b from 0 <= b < n_blocks:
     */
            Py_INCREF(__pyx_v_val);

     88:

     89:                 for b from 0 <= b < n_blocks:

            /* "pandas/src/pytables.pyx":89
     *                 Py_INCREF(val)
     *
     *                 for b from 0 <= b < n_blocks:             # <<<<<<<<<<<<<<
     *
     *                     v   = values[b][:, i, c]
     */
            __pyx_t_8 = __pyx_v_n_blocks;
            for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9++) {
              __pyx_t_2 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_XDECREF(__pyx_v_b);
              __pyx_v_b = __pyx_t_2;
              __pyx_t_2 = 0;

            /* "pandas/src/pytables.pyx":89
     *                 Py_INCREF(val)
     *
     *                 for b from 0 <= b < n_blocks:             # <<<<<<<<<<<<<<
     *
     *                     v   = values[b][:, i, c]
     */
            __pyx_t_11 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_XDECREF(__pyx_v_b);
            __pyx_v_b = __pyx_t_11;
            __pyx_t_11 = 0;

     90:

     91:                     v   = values[b][:, i, c]

              /* "pandas/src/pytables.pyx":91
     *                 for b from 0 <= b < n_blocks:
     *
     *                     v   = values[b][:, i, c]             # <<<<<<<<<<<<<<
     *                     PyTuple_SET_ITEM(tup, b+2, v)
     *                     Py_INCREF(v)
     */
              __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_v_values), __pyx_v_b); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_10 = PyLong_FromUnsignedLong(__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_11 = PyInt_FromLong(__pyx_v_c); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_INCREF(__pyx_k_slice_2);
              PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_k_slice_2);
              __Pyx_GIVEREF(__pyx_k_slice_2);
              PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
              __Pyx_GIVEREF(__pyx_t_10);
              PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_11);
              __Pyx_GIVEREF(__pyx_t_11);
              __pyx_t_10 = 0;
              __pyx_t_11 = 0;
              __pyx_t_11 = PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_t_12)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
              if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_XDECREF(((PyObject *)__pyx_v_v));
              __pyx_v_v = ((PyArrayObject *)__pyx_t_11);
              __pyx_t_11 = 0;

      /* "pandas/src/pytables.pyx":91
     *                 for b from 0 <= b < n_blocks:
     *
     *                     v   = values[b][:, i, c]             # <<<<<<<<<<<<<<
     *                     PyTuple_SET_ITEM(tup, b+2, v)
     *                     Py_INCREF(v)
     */
      __pyx_k_slice_2 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_k_slice_2);
      __Pyx_GIVEREF(__pyx_k_slice_2);

     92:                     PyTuple_SET_ITEM(tup, b+2, v)

              /* "pandas/src/pytables.pyx":92
     *
     *                     v   = values[b][:, i, c]
     *                     PyTuple_SET_ITEM(tup, b+2, v)             # <<<<<<<<<<<<<<
     *                     Py_INCREF(v)
     *
     */
              __pyx_t_11 = PyNumber_Add(__pyx_v_b, __pyx_int_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_11); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              PyTuple_SET_ITEM(__pyx_v_tup, __pyx_t_1, ((PyObject *)__pyx_v_v));

     93:                     Py_INCREF(v)

              /* "pandas/src/pytables.pyx":93
     *                     v   = values[b][:, i, c]
     *                     PyTuple_SET_ITEM(tup, b+2, v)
     *                     Py_INCREF(v)             # <<<<<<<<<<<<<<
     *
     *                 l.append(tup)
     */
              Py_INCREF(((PyObject *)__pyx_v_v));
              __pyx_t_9 = __Pyx_PyInt_AsLong(__pyx_v_b); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }

     94:

     95:                 l.append(tup)

            /* "pandas/src/pytables.pyx":95
     *                     Py_INCREF(v)
     *
     *                 l.append(tup)             # <<<<<<<<<<<<<<
     *
     *     return l
     */
            __pyx_t_13 = PyList_Append(__pyx_v_l, __pyx_v_tup); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            goto __pyx_L7;
          }
          __pyx_L7:;
        }
      }

     96:

     97:     return l

      /* "pandas/src/pytables.pyx":97
     *                 l.append(tup)
     *
     *     return l             # <<<<<<<<<<<<<<
     */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_l));
      __pyx_r = ((PyObject *)__pyx_v_l);
      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_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
        __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
      __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
      __Pyx_AddTraceback("pandas._pytables.create_hdf_rows_3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      goto __pyx_L2;
      __pyx_L0:;
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
      __pyx_L2:;
      __Pyx_XDECREF((PyObject *)__pyx_v_v);
      __Pyx_XDECREF(__pyx_v_l);
      __Pyx_XDECREF(__pyx_v_tup);
      __Pyx_XDECREF(__pyx_v_val);
      __Pyx_XDECREF(__pyx_v_b);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    static 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;
    }