Sensor alerts per machine

Easyboolean maskssum with axis· 10 XP

A factory logs one temperature reading per hour for each machine. Each row of temps is a machine and each column an hour (the numbers are illustrative).

Store, as an array, the number of readings above 80 for each machine (one number per row).

Expected answer

Store it in result: a NumPy array of shape (4,).

import numpy as np

temps = np.array([
    [72, 79, 83, 85, 78, 76],
    [65, 66, 70, 71, 69, 68],
    [81, 84, 88, 90, 86, 79],
    [77, 80, 82, 79, 81, 75],
])
result = ...