## Key Ideas

• NumPy is Python library written in C to provide fast numerical methods for scientific computation.
• NumPy arrays
• Slicing

## In-Class Activity

• Install NumPy on your machine:
• Windows: python -m pip install numpy
• Mac: pip3 install --user numpy
• Work through numpy-tutorial1.py.

## Active Learning

1. Create a one-dimensional array called v with 10 integers. Each integer should be a random number between 1 and 100.
2. Create a new array which consists of the odd indices of previously created array v.
3. Create a new array in backwards ordering from v.
4. What will be the output of the following code:
```a = np.array([1, 2, 3, 4, 5])
b = a[1:4]
b[0] = 200
print(a[1])
```
5. Create a two-dimensional array called m with 25 integers in a 5 by 5 matrix. Each integer should be a random number between 1 and 100.
6. Create a new array from m, in which the elements of each row are in reverse order.
7. Create another array from m, where the rows are in reverse order.
8. Create another array from m, where columns and rows are in reverse order.
9. Create another array from m, where the first and last row and the first and last column are cut off.