The default recarray iterator seems to be going over columns. Is there a counterpart to pandas’es iterrows/itertuples that iterate row views?
recarray
iterrows
itertuples
In [102]: np.dtype('O,O,O') Out[102]: dtype([('f0', 'O'), ('f1', 'O'), ('f2', 'O')]) In [103]: dt = np.dtype('O,O,O') In [104]: np.recarray((4,), dt) Out[104]: rec.array([(None, None, None), (None, None, None), (None, None, None), (None, None, None)], dtype=[('f0', 'O'), ('f1', 'O'), ('f2', 'O')]) In [105]: arr = np.recarray((4,), dt) In [106]: arr Out[106]: rec.array([(None, None, None), (None, None, None), (None, None, None), (None, None, None)], dtype=[('f0', 'O'), ('f1', 'O'), ('f2', 'O')]) In [107]: arr.f0 Out[107]: array([None, None, None, None], dtype=object) In [108]: arr['f0'] Out[108]: array([None, None, None, None], dtype=object) In [109]: for i in arr: print(repr(i)) (None, None, None) (None, None, None) (None, None, None) (None, None, None) In [110]: arr = np.recarray((4,1), dt) In [111]: arr Out[111]: rec.array([[(None, None, None)], [(None, None, None)], [(None, None, None)], [(None, None, None)]], dtype=[('f0', 'O'), ('f1', 'O'), ('f2', 'O')]) In [112]: for i in arr: print(repr(i)) rec.array([(None, None, None)], dtype=[('f0', 'O'), ('f1', 'O'), ('f2', 'O')]) rec.array([(None, None, None)], dtype=[('f0', 'O'), ('f1', 'O'), ('f2', 'O')]) rec.array([(None, None, None)], dtype=[('f0', 'O'), ('f1', 'O'), ('f2', 'O')]) rec.array([(None, None, None)], dtype=[('f0', 'O'), ('f1', 'O'), ('f2', 'O')])