Arrays and plots · Learning
English translation
Topics covered
Misinterpreting array axes or time intervals can give a physically incorrect meaning even when the calculation runs.
Overall workflow
Sensor and request → format and unit checks → storage and state changes → query and response checks
Assign meaning to array axes
If rows represent measurement times and columns represent sensor channels, axis=0 aggregation summarizes each channel. A correct Shape does not ensure the intended calculation. Choose elementwise or matrix multiplication according to its physical meaning.
Time and noise
To interpret differences as a rate of change, divide by the measurement time interval. A moving average reduces noise but blurs abrupt changes, and the sample count may differ at boundaries. Compare before and after filtering over the same time interval.
Worked example
, .
import numpy as np
A=np.array([[1,2,3],[4,5,6]])
B=np.array([[2,0],[1,3],[0,1]])
print(A@B)
[[ 4 9] [13 21]]
Reference example
View more examples