August 2018
Beginner
178 pages
4h 3m
English
Indexing is just getting and setting the value of individual array elements. If you want to access individual elements in the array, you do it in the same way you access elements in a Python list. To see how each indexing call is obtained, let's first create a one-dimensional array using np.linspace. If you want to access the first element of the array, you can use the zero-based index as shown in the following screenshot:

For the zero-based index, we run the cell with one_dim[0] ; this will give us the element with index 0. So in the preceding array, the first element is -0.5 ; we can also find an element at each index by ...
Read now
Unlock full access