Re: [Numpy-discussion] array manipulation

2010-08-17 Thread Warren Weckesser
Alex Ter-Sarkissov wrote: > hi, this is probably a very silly question, but I can't get my hear > around it unfortunately( > > I have an array (say, mat=rand(3,5)) from which I 'pull out' a row > (say, s1=mat[1,]). The problem is, the shape of this row s1 is not > [1,5], as I would expect, but

Re: [Numpy-discussion] array manipulation

2010-08-17 Thread Alan G Isaac
On 8/17/2010 12:13 AM, Alex Ter-Sarkissov wrote: > I have an array (say, mat=rand(3,5)) from which I 'pull out' a row > (say, s1=mat[1,]). The problem is, the shape of this row s1 is not > [1,5], as I would expect, but rather [5,], which means that I can't, > for example, concateante mat and s1 row

Re: [Numpy-discussion] array manipulation

2010-08-16 Thread josef . pktd
On Tue, Aug 17, 2010 at 12:13 AM, Alex Ter-Sarkissov wrote: > hi, this is probably a very silly question, but I can't get my hear > around it unfortunately( > > I have an array (say, mat=rand(3,5)) from which I 'pull out' a row > (say, s1=mat[1,]). The problem is, the shape of this row s1 is not >

[Numpy-discussion] array manipulation

2010-08-16 Thread Alex Ter-Sarkissov
hi, this is probably a very silly question, but I can't get my hear around it unfortunately( I have an array (say, mat=rand(3,5)) from which I 'pull out' a row (say, s1=mat[1,]). The problem is, the shape of this row s1 is not [1,5], as I would expect, but rather [5,], which means that I can't, fo

Re: [Numpy-discussion] array manipulation

2009-01-22 Thread Nils Wagner
On Thu, 22 Jan 2009 11:23:43 +0100 Robert Cimrman wrote: > Nils Wagner wrote: >> Hi all, >> >> what is the best way to check if the entries (integers) >> of an array are stored in ascending order ? > > Hi Nils, > > Try np.alltrue( ar[1:] > ar[:-1] ). > > r. Thank you ! Nils _

Re: [Numpy-discussion] array manipulation

2009-01-22 Thread Robert Cimrman
Nils Wagner wrote: > Hi all, > > what is the best way to check if the entries (integers) > of an array are stored in ascending order ? Hi Nils, Try np.alltrue( ar[1:] > ar[:-1] ). r. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://

[Numpy-discussion] array manipulation

2009-01-22 Thread Nils Wagner
Hi all, what is the best way to check if the entries (integers) of an array are stored in ascending order ? Nils ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion