Indexing and slicing numpy arrays

In this section we will look at indexing and slicing. These work in a similar way to indexing and slicing with standard Python lists, with a few differences

Indexing an array

Indexing in 1 dimension

import numpy as np

a1 =…