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 (...)
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
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.
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