Now let's do some slicing: <pre class='prettyprint lang-py'> print(arr[2].shape) print(arr[2,:].shape) </pre>
We get the same result in both cases. <pre class='prettyprint lang-py'> (3,) </pre>
Why is the result different when I change the indexing? <pre class='prettyprint lang-py'> print(arr[2:,:].shape) (1,3) </pre>
Thank you very much!
You must be logged in to post. Please login or register an account.
I am pretty noob with NumPy, I suggest asking that question here: https://www.reddit.com/r/learnpython/
-Harrison 10 years ago
You must be logged in to post. Please login or register an account.