NumPy array slice using None
Using None is equivalent to using numpy.newaxis
, so yes, it's intentional. In fact, they're the same thing, but, of course, newaxis
spells it out better.
The docs:
The newaxis object can be used in all slicing operations to create an axis of length one. newaxis is an alias for ‘None’, and ‘None’ can be used in place of this with the same result.
A related SO question.