It uses the tuple as an array address and retrieves the element directly. It extends to the more complex cases as expected, where the first method can lead to unexpected results. Slicing Following is an example of slicing. This snippet attempts to retrieve the second row of the entire a multiarray. Thus the exception.
Ellipses are essentially a shorthand, filling in for unspecified dimensions.
Only the first, left-most ellipsis can be expanded. The ellipses will expand to the number of unspecified dimensions that remain. Go ahead and create some test arrays and try your hand at indexing and slicing. Getting the hang of indexing and slicing is a good start towards more powerful NumPy usage. With an understanding of basic manipulation of the multiarray in hand, let's take a quick tour of four modules that are included with the default NumPy package.