Average measurements along the intended axis

Two experimental runs record energy measurements from detectors A, B and C. Rows represent runs, columns represent detectors, and every entry is in joules.


Python
import numpy as np

energy = np.array([[12.0, 18.0, 24.0],
                   [16.0, 20.0, 30.0]])

by_detector = energy.mean(axis=0)
by_run = energy.mean(axis=1)
overall = energy.mean()


Complete the table with the numerical values produced by this code. Enter exact integers in joules.

ResultMean energy (J)
Detector A in by_detector
Detector B in by_detector
Detector C in by_detector
First run in by_run
Second run in by_run
Overall

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More NumPy Questions: