Learning machine learning? Try my machine learning flashcards or Machine Learning with Python Cookbook.

# Basic Operations With NumPy Array

```
# Import modules
import numpy as np
```

```
# Create an array
civilian_deaths = np.array([4352, 233, 3245, 256, 2394])
civilian_deaths
```

```
array([4352, 233, 3245, 256, 2394])
```

```
# Mean value of the array
civilian_deaths.mean()
```

```
2096.0
```

```
# Total amount of deaths
civilian_deaths.sum()
```

```
10480
```

```
# Smallest value in the array
civilian_deaths.min()
```

```
233
```

```
# Largest value in the array
civilian_deaths.max()
```

```
4352
```

#### Find an error or bug?

Everything on this site is available on GitHub. Head to and submit a suggested change. You can also message me directly on Twitter.