Re: [Numpy-discussion] what would you expect A[none] to do?

2015-12-31 Thread Nathaniel Smith
On Thu, Dec 31, 2015 at 12:10 PM, Benjamin Root wrote: > TBH, I wouldn't have expected it to work, but now that I see it, it does > make some sense. I would have thought that it would error out as being > ambiguous (prepend? append?). I have always used ellipses to make it > explicit where the new

Re: [Numpy-discussion] Numpy funding update

2015-12-31 Thread Robert Kern
On Wed, Dec 30, 2015 at 10:54 AM, Ralf Gommers wrote: > > Hi all, > > A quick good news message: OSDC has made a $5k contribution to NumFOCUS, which is split between support for a women in technology workshop and support for Numpy: http://www.numfocus.org/blog/osdc-donates-5k-to-support-numpy-wome

Re: [Numpy-discussion] what would you expect A[none] to do?

2015-12-31 Thread Benjamin Root
TBH, I wouldn't have expected it to work, but now that I see it, it does make some sense. I would have thought that it would error out as being ambiguous (prepend? append?). I have always used ellipses to make it explicit where the new axis should go. But, thinking in terms of how regular indexing

Re: [Numpy-discussion] Dynamic array list implementation

2015-12-31 Thread Chris Barker
On Wed, Dec 30, 2015 at 6:34 AM, Nicolas P. Rougier < nicolas.roug...@inria.fr> wrote: > > > On 28 Dec 2015, at 19:58, Chris Barker wrote: > > > > >>> python benchmark.py > > Python list, append 10 items: 0.01161 > > Array list, append 10 items: 0.46854 > > > > are you pre-allocating any

Re: [Numpy-discussion] what would you expect A[none] to do?

2015-12-31 Thread Joe Kington
Slicing with None adds a new dimension. It's a common paradigm, though usually you'd use A[np.newaxis] or A[np.newaxis, ...] instead for readibility. (np.newaxis is None, but it's a lot more readable) There's a good argument to be made that slicing with a single None shouldn't add a new axis, a

Re: [Numpy-discussion] what would you expect A[none] to do?

2015-12-31 Thread Sebastian Berg
On Do, 2015-12-31 at 11:36 -0500, Neal Becker wrote: > Neal Becker wrote: > > > In my case, what it does is: > > > > A.shape = (5760,) > > A[none] -> (1, 5760) > > > > In my case, use of none here is just a mistake. But why would you > > want > > this to be accepted at all, and how should it be

Re: [Numpy-discussion] what would you expect A[none] to do?

2015-12-31 Thread Neal Becker
Neal Becker wrote: > In my case, what it does is: > > A.shape = (5760,) > A[none] -> (1, 5760) > > In my case, use of none here is just a mistake. But why would you want > this to be accepted at all, and how should it be interpreted? Actually, in my particular case, if it just acted as a noop,

[Numpy-discussion] what would you expect A[none] to do?

2015-12-31 Thread Neal Becker
In my case, what it does is: A.shape = (5760,) A[none] -> (1, 5760) In my case, use of none here is just a mistake. But why would you want this to be accepted at all, and how should it be interpreted? ___ NumPy-Discussion mailing list NumPy-Discussio