[Numpy-discussion] np.append converts recarray to ndarray -- np.insert works

Sebastian Haase seb.haase@gmail....
Tue Jun 8 05:19:39 CDT 2010


Hi,

Is there a reason that np.append converts recarray to ndarray while
np.insert keeps recarray:

>>> type(a)
<class 'numpy.core.records.recarray'>
>>> type(N.append(a,a))
<type 'numpy.ndarray'>
>>> type(N.insert(a,-1, a))
<class 'numpy.core.records.recarray'>

Thanks,
Sebastian Haase


More information about the NumPy-Discussion mailing list