[Numpy-discussion] creating rec arrays

Francesc Altet faltet@carabos....
Mon Jan 21 02:58:25 CST 2008

A Sunday 20 January 2008, Nicholas escrigué:
> I am trying to package a set of vector arrays into a single rec array
> with column titles.
>  c = numpy.rec.fromarrays([a,b],names='a,b')
> the problem is there is no 'copy' argument in .fromarrays which I can
> set to False. i.e. is there a way to do this without the overhead of
> copying?

You can't because of implementation issues: a recarray is implemented as 
a row-wise object, so the copy is absolutely needed.

BTW, perhaps column-wise recarray would be a great addition to NumPy, 
although I'm not sure whether this object would be much better than a 
dictionary of homogeneous arrays.


>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data

More information about the Numpy-discussion mailing list