A Thursday 02 July 2009 20:15:13 Dan Yamins escrigué:
> > What's wrong with recarrays? In any case, if you need a true ndarray
> > object
> > you can always do:
> >
> > ndarr = recarr.view(np.ndarray)
> >
> > and you are done.
>
> I have a question about this though. The object "ndarr" will consi
Elaine Angelino wrote:
> Hi there --
>
> Is there a fast way to make a numpy ndarray from column data?
>
> For example, suppose I want to make an ndarray with 2 rows and 3 columns
> of different data types based on the following column data:
>
> C0 = [1,2]
> C1 = ['a','b']
> C2 = [3.3,4.4]
>
>
> What's wrong with recarrays? In any case, if you need a true ndarray
> object
> you can always do:
>
> ndarr = recarr.view(np.ndarray)
>
> and you are done.
>
I have a question about this though. The object "ndarr" will consist of
"records", e.g.:
In [96]: type(ndarr[0])
Out[96]:
If
A Thursday 02 July 2009 03:02:53 Elaine Angelino escrigué:
> Hi there --
>
> Is there a fast way to make a numpy ndarray from column data?
>
> For example, suppose I want to make an ndarray with 2 rows and 3 columns of
> different data types based on the following column data:
>
> C0 = [1,2]
> C1 =
Hi there --
Is there a fast way to make a numpy ndarray from column data?
For example, suppose I want to make an ndarray with 2 rows and 3 columns of
different data types based on the following column data:
C0 = [1,2]
C1 = ['a','b']
C2 = [3.3,4.4]
I could create an empty ndarray and fill the co