Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Benjamin Root
On Thursday, July 12, 2012, Chao YUE wrote: > Thanks all for the discussion. Actually I am trying to use something like > numpy ndarray indexing in the function. Like when I call: > > func(a,'1:3,:,2:4'), it knows I want to retrieve a[1:3,:,2:4], and > func(a,'1:3,:,4') for a[1:3,:,4] ect. > I am

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Chao YUE
Thanks all for the discussion. Actually I am trying to use something like numpy ndarray indexing in the function. Like when I call: func(a,'1:3,:,2:4'), it knows I want to retrieve a[1:3,:,2:4], and func(a,'1:3,:,4') for a[1:3,:,4] ect. I am very close now. #so this function changes the string to

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Benjamin Root
On Thu, Jul 12, 2012 at 4:46 PM, Chao YUE wrote: > Hi Ben, > > it helps a lot. I am nearly finishing a function in a way I think > pythonic. > Just one more question, I have: > > In [24]: b=np.arange(1,11) > > In [25]: b > Out[25]: array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) > > In [26]: b[sl

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Jonathan Helmus
On 07/12/2012 04:46 PM, Chao YUE wrote: > Hi Ben, > > it helps a lot. I am nearly finishing a function in a way I think > pythonic. > Just one more question, I have: > > In [24]: b=np.arange(1,11) > > In [25]: b > Out[25]: array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) > > In [26]: b[slice(1)] >

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Robert Kern
On Thu, Jul 12, 2012 at 9:46 PM, Chao YUE wrote: > Hi Ben, > > it helps a lot. I am nearly finishing a function in a way I think pythonic. > Just one more question, I have: > > In [24]: b=np.arange(1,11) > > In [25]: b > Out[25]: array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) > > In [26]: b[slice

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Chao YUE
Hi Ben, it helps a lot. I am nearly finishing a function in a way I think pythonic. Just one more question, I have: In [24]: b=np.arange(1,11) In [25]: b Out[25]: array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) In [26]: b[slice(1)] Out[26]: array([1]) In [27]: b[slice(4)] Out[27]: array([1, 2,

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Benjamin Root
On Thu, Jul 12, 2012 at 3:38 PM, Chao YUE wrote: > Dear all, > > I want to create a function and I would like one of the arguments of the > function to determine what slicing of numpy array I want to use. > a simple example: > > a=np.arange(100).reshape(10,10) > > suppose I want to have a imaging

[Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Chao YUE
Dear all, I want to create a function and I would like one of the arguments of the function to determine what slicing of numpy array I want to use. a simple example: a=np.arange(100).reshape(10,10) suppose I want to have a imaging function to show image of part of this data: def show_part_of_da

Re: [Numpy-discussion] m-ary logical functions

2012-07-12 Thread Alan G Isaac
On 7/12/2012 1:45 PM, Nathaniel Smith wrote: > I'd actually like to see out= as a kw-only arg. That would be great. Numpy 2.0? Alan Isaac ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discuss

Re: [Numpy-discussion] m-ary logical functions

2012-07-12 Thread Nathaniel Smith
On Thu, Jul 12, 2012 at 3:53 PM, Neal Becker wrote: > I've been bitten several times by this. > > logical_or (a, b, c) > > is silently accepted when I really meant > > logical_or (logical_or (a, b), c) > > because the logic functions are binary, where I expected them to be m-ary. > > Dunno if anyt

Re: [Numpy-discussion] m-ary logical functions

2012-07-12 Thread Martin Luessi
On Thu, Jul 12, 2012 at 10:53 AM, Neal Becker wrote: > I've been bitten several times by this. > > logical_or (a, b, c) > > is silently accepted when I really meant > > logical_or (logical_or (a, b), c) > > because the logic functions are binary, where I expected them to be m-ary. > > Dunno if any

Re: [Numpy-discussion] m-ary logical functions

2012-07-12 Thread Henry Gomersall
On Thu, 2012-07-12 at 16:21 +0100, Nathaniel Smith wrote: > On Thu, Jul 12, 2012 at 4:13 PM, Henry Gomersall > wrote: > > On Thu, 2012-07-12 at 10:53 -0400, Neal Becker wrote: > >> I've been bitten several times by this. > >> > >> logical_or (a, b, c) > >> > >> is silently accepted when I really m

Re: [Numpy-discussion] m-ary logical functions

2012-07-12 Thread Nathaniel Smith
On Thu, Jul 12, 2012 at 4:13 PM, Henry Gomersall wrote: > On Thu, 2012-07-12 at 10:53 -0400, Neal Becker wrote: >> I've been bitten several times by this. >> >> logical_or (a, b, c) >> >> is silently accepted when I really meant >> >> logical_or (logical_or (a, b), c) >> >> because the logic funct

Re: [Numpy-discussion] m-ary logical functions

2012-07-12 Thread Henry Gomersall
On Thu, 2012-07-12 at 10:53 -0400, Neal Becker wrote: > I've been bitten several times by this. > > logical_or (a, b, c) > > is silently accepted when I really meant > > logical_or (logical_or (a, b), c) > > because the logic functions are binary, where I expected them to be > m-ary. I don't

[Numpy-discussion] m-ary logical functions

2012-07-12 Thread Neal Becker
I've been bitten several times by this. logical_or (a, b, c) is silently accepted when I really meant logical_or (logical_or (a, b), c) because the logic functions are binary, where I expected them to be m-ary. Dunno if anything can be done about it. Sure would like it if they were m-ary and

Re: [Numpy-discussion] Remove current 1.7 branch?

2012-07-12 Thread Hänel Nikolaus Valentin
Hi, * Charles R Harris [2012-07-12]: > Travis and I agree that it would be appropriate to remove the current 1.7.x > branch and branch again after a code freeze. That way we can avoid the pain > and potential errors of backports. It is considered bad form to mess with > public repositories that w

Re: [Numpy-discussion] Remove current 1.7 branch?

2012-07-12 Thread Benjamin Root
On Thursday, July 12, 2012, Nathaniel Smith wrote: > On Thu, Jul 12, 2012 at 12:48 PM, Benjamin Root > > > wrote: > > > > > > On Thursday, July 12, 2012, Thouis (Ray) Jones wrote: > >> > >> On Thu, Jul 12, 2012 at 1:28 AM, Charles R Harris > >> > wrote: > >> > Hi All, > >> > > >> > Travis and I a

Re: [Numpy-discussion] Remove current 1.7 branch?

2012-07-12 Thread Nathaniel Smith
On Thu, Jul 12, 2012 at 12:48 PM, Benjamin Root wrote: > > > On Thursday, July 12, 2012, Thouis (Ray) Jones wrote: >> >> On Thu, Jul 12, 2012 at 1:28 AM, Charles R Harris >> wrote: >> > Hi All, >> > >> > Travis and I agree that it would be appropriate to remove the current >> > 1.7.x >> > branch

Re: [Numpy-discussion] Remove current 1.7 branch?

2012-07-12 Thread Benjamin Root
On Thursday, July 12, 2012, Thouis (Ray) Jones wrote: > On Thu, Jul 12, 2012 at 1:28 AM, Charles R Harris > > wrote: > > Hi All, > > > > Travis and I agree that it would be appropriate to remove the current > 1.7.x > > branch and branch again after a code freeze. That way we can avoid the > pain >

Re: [Numpy-discussion] Remove current 1.7 branch?

2012-07-12 Thread Charles R Harris
On Thu, Jul 12, 2012 at 3:06 AM, Charles R Harris wrote: > > > On Thu, Jul 12, 2012 at 2:00 AM, Ralf Gommers > wrote: > >> >> >> On Thu, Jul 12, 2012 at 7:42 AM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> >>> >>> On Wed, Jul 11, 2012 at 11:21 PM, Thouis (Ray) Jones >>> wrote

Re: [Numpy-discussion] Remove current 1.7 branch?

2012-07-12 Thread Charles R Harris
On Thu, Jul 12, 2012 at 2:00 AM, Ralf Gommers wrote: > > > On Thu, Jul 12, 2012 at 7:42 AM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Wed, Jul 11, 2012 at 11:21 PM, Thouis (Ray) Jones wrote: >> >>> On Thu, Jul 12, 2012 at 1:28 AM, Charles R Harris >>> wrote: >>> > Hi Al

Re: [Numpy-discussion] Remove current 1.7 branch?

2012-07-12 Thread Ralf Gommers
On Thu, Jul 12, 2012 at 7:42 AM, Charles R Harris wrote: > > > On Wed, Jul 11, 2012 at 11:21 PM, Thouis (Ray) Jones wrote: > >> On Thu, Jul 12, 2012 at 1:28 AM, Charles R Harris >> wrote: >> > Hi All, >> > >> > Travis and I agree that it would be appropriate to remove the current >> 1.7.x >> > b

[Numpy-discussion] Compile numpy 1.6.2 with ACML 4.4.0 on CentOS6

2012-07-12 Thread Derrick Lin
Hi guys, I have been trying to compile numpy 1.6.2 with the ACML4.4.0 on our AMD based cluster. I mainly followed some guides but most likely outdated like this one: http://projects.scipy.org/numpy/attachment/ticket/740/acml2.log I have compiled CBLAS linked with ACML4.4.0 gfortran, and it appe