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] 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

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] 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] Rank-0 arrays - reprise

2013-01-05 Thread Matthew Brett
Hi, On Sat, Jan 5, 2013 at 12:15 PM, 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 tracked down on rank-0 arrays; it also makes reference to

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

2013-01-05 Thread Nathaniel Smith
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 tracked down on rank-0 arrays; it also makes reference to casting. The

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

2013-01-05 Thread David Cournapeau
On Sat, Jan 5, 2013 at 3: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 tracked

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

2013-01-05 Thread Nathaniel Smith
On Sat, Jan 5, 2013 at 10:10 PM, David Cournapeau courn...@gmail.com wrote: Thanks for the entertaining explanation. Procrastination is a hell of a drug. I don't think 0-dim array being slow is such a big drawback. I would be really surprised if there was no way to make them faster, and

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

2013-01-05 Thread Dag Sverre Seljebotn
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 arrays. The discussion that Nathaniel tracked down on rank-0 arrays;