Re: [Numpy-discussion] edge-cases of ellipsis indexing

2015-01-05 Thread Antony Lee
I see, thanks! 2015-01-05 2:14 GMT-07:00 Sebastian Berg : > On Mo, 2015-01-05 at 14:13 +0530, Maniteja Nandana wrote: > > Hi Anthony, > > > > > > I am not sure whether the following section in documentation is > > relevant to the behavior you were referring to. > > > > > > When an ellipsis (...)

Re: [Numpy-discussion] edge-cases of ellipsis indexing

2015-01-05 Thread Sebastian Berg
On Mo, 2015-01-05 at 14:13 +0530, Maniteja Nandana wrote: > Hi Anthony, > > > I am not sure whether the following section in documentation is > relevant to the behavior you were referring to. > > > When an ellipsis (...) is present but has no size (i.e. replaces > zero :) the result will still

Re: [Numpy-discussion] edge-cases of ellipsis indexing

2015-01-05 Thread Maniteja Nandana
Hi Anthony, I am not sure whether the following section in documentation is relevant to the behavior you were referring to. When an ellipsis (...) is present but has no size (i.e. replaces zero :) the result will still always be an array. A view if no advanced index is present, otherwise a copy.

[Numpy-discussion] edge-cases of ellipsis indexing

2015-01-04 Thread Antony Lee
While trying to reproduce various fancy indexings for astropy's FITS sections (a loaded-on-demand array), I found the following interesting behavior: >>> np.array([1])[..., 0] array(1) >>> np.array([1])[0] 1 >>> np.array([1])[(0,)] 1 The docs say "Ellipsis expand to the number of : objects needed