On 17/08/20 8:19 am, Sebastian Berg wrote:
[1] The difference is that `arr[()]` extracts a scalar, while
`arr[...]` returns the array (container) unchanged.  This difference
only matters for zero dimensional arrays.  There may be reasons to
prefer one over the other, but I can't think of any right now.

Usually in numpy, omitting trailing indices is equivalent to
filling them with ':', so I would expect a[] to be a slice that
covers the whole array, i.e. equivalent to a[...].

--
Greg
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/OD2TSWVKA236LEP4I6GO42HKAW5MVCFS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to