Python Numpy; difference between colon and ellipsis indexing
Python Numpy; difference between colon and ellipsis indexing Question: I have been experimenting with Numpy array indexing using both colon and ellipsis. However, I cannot understand the results that I am getting. Below is the example code: >>> a = np.array([[1,2],[3,4]]) >>> a array([[1, 2], [3, 4]]) >>> a[:,np.newaxis] # <– the shape of the …