@@ -749,26 +749,26 @@ from cpython cimport (PyDict_New, PyDict_GetItem, PyDict_SetItem,
749
749
750
750
@ cython.boundscheck (False )
751
751
@ cython.wraparound (False )
752
- def create_hdf_rows_2d (ndarray index , ndarray[np.uint8_t , ndim = 1 ] mask,
752
+ def create_hdf_rows_2d (ndarray indexer0 , ndarray[np.uint8_t , ndim = 1 ] mask,
753
753
list values ):
754
754
""" return a list of objects ready to be converted to rec-array format """
755
755
756
756
cdef:
757
- unsigned int i, b, n_index , n_blocks, tup_size
757
+ unsigned int i, b, n_indexer0 , n_blocks, tup_size
758
758
ndarray v
759
759
list l
760
760
object tup, val
761
761
762
- n_index = index .shape[0 ]
763
- n_blocks = len (values)
764
- tup_size = n_blocks+ 1
762
+ n_indexer0 = indexer0 .shape[0 ]
763
+ n_blocks = len (values)
764
+ tup_size = n_blocks+ 1
765
765
l = []
766
- for i from 0 <= i < n_index :
766
+ for i from 0 <= i < n_indexer0 :
767
767
768
768
if not mask[i]:
769
769
770
770
tup = PyTuple_New(tup_size)
771
- val = index [i]
771
+ val = indexer0 [i]
772
772
PyTuple_SET_ITEM(tup, 0 , val)
773
773
Py_INCREF(val)
774
774
@@ -784,40 +784,40 @@ def create_hdf_rows_2d(ndarray index, ndarray[np.uint8_t, ndim=1] mask,
784
784
785
785
@ cython.boundscheck (False )
786
786
@ cython.wraparound (False )
787
- def create_hdf_rows_3d (ndarray index , ndarray columns ,
787
+ def create_hdf_rows_3d (ndarray indexer0 , ndarray indexer1 ,
788
788
ndarray[np.uint8_t , ndim = 2 ] mask, list values ):
789
789
""" return a list of objects ready to be converted to rec-array format """
790
790
791
791
cdef:
792
- unsigned int i, j, n_columns, n_index , n_blocks, tup_size
792
+ unsigned int i, j, b, n_indexer0, n_indexer1 , n_blocks, tup_size
793
793
ndarray v
794
794
list l
795
795
object tup, val
796
796
797
- n_index = index .shape[0 ]
798
- n_columns = columns .shape[0 ]
799
- n_blocks = len (values)
800
- tup_size = n_blocks+ 2
797
+ n_indexer0 = indexer0 .shape[0 ]
798
+ n_indexer1 = indexer1 .shape[0 ]
799
+ n_blocks = len (values)
800
+ tup_size = n_blocks+ 2
801
801
l = []
802
- for i from 0 <= i < n_index :
802
+ for i from 0 <= i < n_indexer0 :
803
803
804
- for c from 0 <= c < n_columns :
804
+ for j from 0 <= j < n_indexer1 :
805
805
806
- if not mask[i, c ]:
806
+ if not mask[i, j ]:
807
807
808
808
tup = PyTuple_New(tup_size)
809
809
810
- val = index [i]
810
+ val = indexer0 [i]
811
811
PyTuple_SET_ITEM(tup, 0 , val)
812
812
Py_INCREF(val)
813
813
814
- val = columns[c ]
814
+ val = indexer1[j ]
815
815
PyTuple_SET_ITEM(tup, 1 , val)
816
816
Py_INCREF(val)
817
817
818
818
for b from 0 <= b < n_blocks:
819
819
820
- v = values[b][:, i, c ]
820
+ v = values[b][:, i, j ]
821
821
PyTuple_SET_ITEM(tup, b+ 2 , v)
822
822
Py_INCREF(v)
823
823
0 commit comments