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 > 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 +=

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 wrote: > > > On Sat, Jan 5, 2013 at 2:31 PM, Nathaniel Smith wrote: >> >> On 5 Jan 2013 12:16, "Matthew Brett" wrote: >> > >> > Hi, >> > >> > Following on from Nathaniel's explorations of the scalar - array >> > casting rules, some resources

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 wrote: > On 5 Jan 2013 12:16, "Matthew Brett" 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 "ran

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 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 arrays should be > caref

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

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" wrote: Hi, Following on from Nathaniel's explorations of the scalar - array

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

2013-01-06 Thread Nathaniel Smith
On 6 Jan 2013 07:59, "Dag Sverre Seljebotn" 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 more options. It's

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" wrote: > >> > >> Hi, > >> > >> Following on from Nathaniel's explorations of the scalar - array > >> casting rules, some resources on rank-0 arra

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" 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 a

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

2013-01-05 Thread Nathaniel Smith
On Sat, Jan 5, 2013 at 10:10 PM, David Cournapeau 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 > having unspecified,

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

2013-01-05 Thread David Cournapeau
On Sat, Jan 5, 2013 at 3:31 PM, Nathaniel Smith wrote: > On 5 Jan 2013 12:16, "Matthew Brett" 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 arra

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

2013-01-05 Thread Nathaniel Smith
On 5 Jan 2013 12:16, "Matthew Brett" 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 rank-0 arrays see

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

[Numpy-discussion] Rank-0 arrays - reprise

2013-01-05 Thread Matthew Brett
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 rank-0 arrays seem to have been one way of solving the problem of maintainin