Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-23 Thread Bill Baxter
On 3/24/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > > > Then of course, there's r_ and c_: > > > > c = numpy.c_[a,b] > > > > c = numpy.r_[a[None],b[None]].T > > > > --bb > So, > None is the same as newaxis - right? Yes, newaxis is None. None is newaxis. Same thing. I just don't see much

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-23 Thread Stefan van der Walt
On Fri, Mar 23, 2007 at 11:09:03AM -0400, Robert Pyle wrote: > > In [65]:concatenate((a.reshape(10,1),b.reshape(10,1)),axis=1) > > Out[65]: > > array([[ 0, -10], > > [ 1, -9], > > [ 2, -8], > > [ 3, -7], > > [ 4, -6], > > [ 5, -5], > > [ 6

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-23 Thread Sebastian Haase
On 3/22/07, Bill Baxter <[EMAIL PROTECTED]> wrote: > On 3/23/07, Eric Firing <[EMAIL PROTECTED]> wrote: > > Sebastian Haase wrote: > > > On 3/22/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > > >> On Thu, Mar 22, 2007 at 08:13:22PM -0400, Brian Blais wrote: > > >>> Hello, > > >>> > > >>> I'd

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-23 Thread Robert Pyle
On Mar 22, 2007, at 8:13 PM, Brian Blais wrote: > Hello, > > I'd like to concatenate a couple of 1D arrays to make it a 2D > array, with two columns > (one for each of the original 1D arrays). I thought this would work: > > > In [47]:a=arange(0,10,1) > > In [48]:a > Out[48]:array([0, 1, 2, 3,

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Bill Baxter
On 3/23/07, Eric Firing <[EMAIL PROTECTED]> wrote: > Sebastian Haase wrote: > > On 3/22/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > >> On Thu, Mar 22, 2007 at 08:13:22PM -0400, Brian Blais wrote: > >>> Hello, > >>> > >>> I'd like to concatenate a couple of 1D arrays to make it a 2D array,

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Eric Firing
Sebastian Haase wrote: > On 3/22/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: >> On Thu, Mar 22, 2007 at 08:13:22PM -0400, Brian Blais wrote: >>> Hello, >>> >>> I'd like to concatenate a couple of 1D arrays to make it a 2D array, with >>> two columns >>> (one for each of the original 1D arra

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Sebastian Haase
On 3/22/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > On Thu, Mar 22, 2007 at 08:13:22PM -0400, Brian Blais wrote: > > Hello, > > > > I'd like to concatenate a couple of 1D arrays to make it a 2D array, with > > two columns > > (one for each of the original 1D arrays). I thought this would

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Stefan van der Walt
On Thu, Mar 22, 2007 at 08:13:22PM -0400, Brian Blais wrote: > Hello, > > I'd like to concatenate a couple of 1D arrays to make it a 2D array, with two > columns > (one for each of the original 1D arrays). I thought this would work: > > > In [47]:a=arange(0,10,1) > > In [48]:a > Out[48]:array

Re: [Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Bill Baxter
Try column_stack, and also try the "See also" parts of the Numpy Examples List. very handy for finding things like this. http://www.scipy.org/Numpy_Example_List --bb On 3/23/07, Brian Blais <[EMAIL PROTECTED]> wrote: > Hello, > > I'd like to concatenate a couple of 1D arrays to make it a 2D arra

[Numpy-discussion] concatenating 1-D arrays to 2D

2007-03-22 Thread Brian Blais
Hello, I'd like to concatenate a couple of 1D arrays to make it a 2D array, with two columns (one for each of the original 1D arrays). I thought this would work: In [47]:a=arange(0,10,1) In [48]:a Out[48]:array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) In [49]:b=arange(-10,0,1) In [51]:b Out[51]:arra