is there any way to determine if an numpy array is record/structure array?
Neither of those are record arrays. Per the docs:
>>> x = np.array([(1.0, 2), (3.0, 4)], dtype=[('x', float), ('y', int)])
>>> y = x.view(np.recarray)
>>> type(x), type(y)
(<type 'numpy.ndarray'>, <class 'numpy.core.records.recarray'>)
ndarray.view
creates a new reference to the same memory, and as you call it also names the fields. There isn't a fundamental type difference between your c0
and c
, they're both ndarrays.