Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-06 Thread Sebastian Berg
On Sun, 2013-01-06 at 08:58 +0100, Dag Sverre Seljebotn wrote: On 01/05/2013 10:31 PM, Nathaniel Smith wrote: On 5 Jan 2013 12:16, Matthew Brett matthew.br...@gmail.com wrote: Hi, Following on from Nathaniel's explorations of the scalar - array casting rules, some resources on rank-0

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-06 Thread Nathaniel Smith
On 6 Jan 2013 07:59, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: Try to enumerate all the fundamentally different things (if you count memory use/running time) that can happen for ndarrays a, b, and arbitrary x here: a += b[x] That's already quite a lot, your proposal adds even

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-06 Thread Dag Sverre Seljebotn
On 01/06/2013 10:41 AM, Sebastian Berg wrote: On Sun, 2013-01-06 at 08:58 +0100, Dag Sverre Seljebotn wrote: On 01/05/2013 10:31 PM, Nathaniel Smith wrote: On 5 Jan 2013 12:16, Matthew Brett matthew.br...@gmail.com wrote: Hi, Following on from Nathaniel's explorations of the scalar - array

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-06 Thread Dag Sverre Seljebotn
On 01/06/2013 11:16 AM, Nathaniel Smith wrote: On 6 Jan 2013 07:59, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no mailto:d.s.seljeb...@astro.uio.no wrote: Try to enumerate all the fundamentally different things (if you count memory use/running time) that can happen for ndarrays a, b, and

Re: [Numpy-discussion] Remove support for numeric and numarray in 1.8

2013-01-06 Thread Nathaniel Smith
On Sun, Jan 6, 2013 at 2:38 AM, Charles R Harris charlesr.har...@gmail.com wrote: Thoughts? To be clear, what you're talking about is basically deleting these two packages: numpy.oldnumeric numpy.numarray plus the compatibility C API in numpy/numarray/include ? So this would only affect

Re: [Numpy-discussion] Remove support for numeric and numarray in 1.8

2013-01-06 Thread Charles R Harris
On Sun, Jan 6, 2013 at 7:42 AM, Nathaniel Smith n...@pobox.com wrote: On Sun, Jan 6, 2013 at 2:38 AM, Charles R Harris charlesr.har...@gmail.com wrote: Thoughts? To be clear, what you're talking about is basically deleting these two packages: numpy.oldnumeric numpy.numarray plus the

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-06 Thread Nathaniel Smith
On Sun, Jan 6, 2013 at 10:35 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: I should have been more precise: I like the proposal, but also believe the additional complexity introduced have significant costs that must be considered. a) Making += behave differently for readonly

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-06 Thread Charles R Harris
On Sat, Jan 5, 2013 at 2:31 PM, Nathaniel Smith n...@pobox.com wrote: On 5 Jan 2013 12:16, Matthew Brett matthew.br...@gmail.com wrote: Hi, Following on from Nathaniel's explorations of the scalar - array casting rules, some resources on rank-0 arrays. The discussion that Nathaniel

[Numpy-discussion] high dimensional array - python scalar/index

2013-01-06 Thread Sebastian Berg
Question for everyone, is this really reasonable: import numpy as np from operator import index index(np.array([[5]])) 5 int(np.array([[5]])) 5 [0,1,2,3][np.array([[2]])] 2 To me, this does not make sense, why should we allow to use a high dimensional object like a normal scalar (its ok for

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-06 Thread Matthew Brett
Hi, On Sun, Jan 6, 2013 at 5:53 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, Jan 5, 2013 at 2:31 PM, Nathaniel Smith n...@pobox.com wrote: On 5 Jan 2013 12:16, Matthew Brett matthew.br...@gmail.com wrote: Hi, Following on from Nathaniel's explorations of the scalar -

Re: [Numpy-discussion] high dimensional array - python scalar/index

2013-01-06 Thread josef . pktd
On Sun, Jan 6, 2013 at 12:57 PM, Sebastian Berg sebast...@sipsolutions.net wrote: Question for everyone, is this really reasonable: import numpy as np from operator import index index(np.array([[5]])) 5 int(np.array([[5]])) 5 [0,1,2,3][np.array([[2]])] 2 Not sure I understand the point

Re: [Numpy-discussion] Rank-0 arrays - reprise

2013-01-06 Thread Dag Sverre Seljebotn
On 01/06/2013 05:52 PM, Nathaniel Smith wrote: On Sun, Jan 6, 2013 at 10:35 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: I should have been more precise: I like the proposal, but also believe the additional complexity introduced have significant costs that must be considered.

Re: [Numpy-discussion] high dimensional array - python scalar/index

2013-01-06 Thread Sebastian Berg
On Sun, 2013-01-06 at 13:28 -0500, josef.p...@gmail.com wrote: On Sun, Jan 6, 2013 at 12:57 PM, Sebastian Berg sebast...@sipsolutions.net wrote: Question for everyone, is this really reasonable: import numpy as np from operator import index index(np.array([[5]])) 5

Re: [Numpy-discussion] Remove support for numeric and numarray in 1.8

2013-01-06 Thread Charles R Harris
On Sun, Jan 6, 2013 at 8:09 AM, Charles R Harris charlesr.har...@gmail.comwrote: On Sun, Jan 6, 2013 at 7:42 AM, Nathaniel Smith n...@pobox.com wrote: On Sun, Jan 6, 2013 at 2:38 AM, Charles R Harris charlesr.har...@gmail.com wrote: Thoughts? To be clear, what you're talking about is

Re: [Numpy-discussion] Which Python to use for Mac binaries

2013-01-06 Thread Chris Barker - NOAA Federal
On Sun, Jan 6, 2013 at 2:04 AM, Ralf Gommers ralf.gomm...@gmail.com wrote: Which exact Python do we need to use on Mac? Do we need to use the binary installer from python.org? Yes, the one from python.org. Or can I install it from source? you could install from source using the same method

Re: [Numpy-discussion] Remove support for numeric and numarray in 1.8

2013-01-06 Thread Nathaniel Smith
On Sun, Jan 6, 2013 at 10:36 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sun, Jan 6, 2013 at 8:09 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Sun, Jan 6, 2013 at 7:42 AM, Nathaniel Smith n...@pobox.com wrote: On Sun, Jan 6, 2013 at 2:38 AM, Charles R Harris

Re: [Numpy-discussion] Remove support for numeric and numarray in 1.8

2013-01-06 Thread Charles R Harris
On Sun, Jan 6, 2013 at 5:07 PM, Nathaniel Smith n...@pobox.com wrote: On Sun, Jan 6, 2013 at 10:36 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sun, Jan 6, 2013 at 8:09 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Sun, Jan 6, 2013 at 7:42 AM, Nathaniel

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-06 Thread Olivier Delalleau
2013/1/5 Nathaniel Smith n...@pobox.com: On Fri, Jan 4, 2013 at 5:25 PM, Andrew Collette andrew.colle...@gmail.com wrote: I agree the current behavior is confusing. Regardless of the details of what to do, I suppose my main objection is that, to me, it's really unexpected that adding a

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-06 Thread Nathaniel Smith
On Mon, Jan 7, 2013 at 1:43 AM, Olivier Delalleau sh...@keba.be wrote: 2013/1/5 Nathaniel Smith n...@pobox.com: On Fri, Jan 4, 2013 at 5:25 PM, Andrew Collette andrew.colle...@gmail.com wrote: I agree the current behavior is confusing. Regardless of the details of what to do, I suppose my

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2013-01-06 Thread Olivier Delalleau
2013/1/6 Nathaniel Smith n...@pobox.com: On Mon, Jan 7, 2013 at 1:43 AM, Olivier Delalleau sh...@keba.be wrote: 2013/1/5 Nathaniel Smith n...@pobox.com: On Fri, Jan 4, 2013 at 5:25 PM, Andrew Collette andrew.colle...@gmail.com wrote: I agree the current behavior is confusing. Regardless of

Re: [Numpy-discussion] Remove support for numeric and numarray in 1.8

2013-01-06 Thread Raul Cota
I realize we may be a minority but it would be very nice if support for numeric could be kept for a few more versions. We don't have any particular needs for numarray. We just under went through an extremely long and painful process to upgrade our software