Introduction to NumPy

In [1]:
import numpy as np

with np.load("weather_data.npz") as weather:
    temperature = weather["temperature"]
    
    uk_mask = weather["uk"]
    irl_mask = weather["ireland"]
    spain_mask = weather["spain"]
In [2]:
np.max(temperature)
Out[2]:
291.37196350097656
In [3]:
uk_temp = temperature * uk_mask
In [4]:
np.max(uk_temp)
Out[4]:
283.37196350097656
In [5]:
np.max(temperature * irl_mask)
Out[5]:
282.65321350097656
In [6]:
np.max(temperature * spain_mask)
Out[6]:
285.99696350097656