title: Can someone explain this numpy slicing behaviour?
body: <p>Could someone explain me why the second assertion below fails? I do not understand why using a slice or a range for indexing would make a difference in this case.</p>
  <pre><code>import numpy as np
  
  d = np.zeros(shape = (1,2,3))
  assert d[:, 0, slice(0,2)].shape == d[:, 0, range(0,2)].shape #This doesn't trigger an exception as both operands return (1,2)
  assert d[0, :, slice(0,2)].shape == d[0, :, range(0,2)].shape #This does because (1,2) != (2,1)...
  </code></pre>