Ah, ok, now that I knew what to look for I guess I found it:
"If the number of objects in the selection tuple is less than N , then :
is assumed for any subsequent dimensions."
https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html
This is the one, right?
Am 12.12.2017 09:09 schrieb Nathaniel Smith:
On Tue, Dec 12, 2017 at 12:02 AM, Joe <solar...@posteo.org> wrote:
Hi,
question says it all. I looked through the basic and advanced
indexing,
but I could not find the rule that is applied to make
x[np.newaxis,:] and x[np.newaxis] the same.
I think it's the general rule that all indexing expressions have an
invisible "..." on the right edge. For example, x[i][j][k] is an
inefficient and IMO somewhat confusing way to write x[i, j, k],
because x[i][j][k] is interpreted as:
-> x[i, ...][j, ...][k, ...]
-> x[i, :, :][j, :][k]
That this also applies to newaxis is a little surprising, but I guess
consistent.
-n
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion