3. Slicing NumPy Arrays. In Python, you can extract a portion of a NumPy array using slicing. Slicing is done by specifying a start and end index, separated by a colon :
.
For example, numbers[1:4]
returns a new NumPy array with items from the second to the fourth (excluding the fourth) item in the original array.