On Thu, Dec 31, 2015 at 12:10 PM, Benjamin Root <ben.v.r...@gmail.com> wrote: > TBH, I wouldn't have expected it to work, but now that I see it, it does > make some sense. I would have thought that it would error out as being > ambiguous (prepend? append?). I have always used ellipses to make it > explicit where the new axis should go. But, thinking in terms of how regular > indexing works, I guess it isn't all that ambiguous.
Yeah, I'm not really a fan of the rule that indexing with too-few axes implicitly adds a "..." on the right A[0] -> A[0, ...] but given that we do have that rule, then A[None] -> A[None, ...] does make sense. -n -- Nathaniel J. Smith -- http://vorpus.org _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion