Re: [Numpy-discussion] Which rule makes x[np.newaxis, :] and x[np.newaxis] equivalent?

2017-12-12 Thread Sebastian Berg
On Tue, 2017-12-12 at 14:19 +0100, Joe wrote: > 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." > >

Re: [Numpy-discussion] Which rule makes x[np.newaxis, :] and x[np.newaxis] equivalent?

2017-12-12 Thread Joe
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

Re: [Numpy-discussion] Which rule makes x[np.newaxis, :] and x[np.newaxis] equivalent?

2017-12-12 Thread Nathaniel Smith
On Tue, Dec 12, 2017 at 12:02 AM, Joe 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

[Numpy-discussion] Which rule makes x[np.newaxis,:] and x[np.newaxis] equivalent?

2017-12-12 Thread Joe
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. Kind regards, Joe ___ NumPy-Discussion mailing list