Re: [Numpy-discussion] ndarray from column data

2009-07-03 Thread Francesc Alted
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

Re: [Numpy-discussion] ndarray from column data

2009-07-02 Thread Robert
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] >

Re: [Numpy-discussion] ndarray from column data

2009-07-02 Thread Dan Yamins
> > 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

Re: [Numpy-discussion] ndarray from column data

2009-07-02 Thread Francesc Alted
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 =

[Numpy-discussion] ndarray from column data

2009-07-01 Thread Elaine Angelino
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