A model of the temperature of a thin metal plate builds two coordinate arrays: and
PHYSICS · Subjective · Fermi University Physics · Computational Physics · Scientific programming for physicists · Scientific programming for physicists
Computational Physics, Ch Arrays: a field is a rectangle of numbers
Problem
A model of the temperature of a thin metal plate builds two coordinate arrays: x = np.linspace(0, 0.2, 41).reshape(41, 1) and y = np.linspace(0, 0.5, 101).reshape(1, 101), with x and y in metres. It then computes T = 300 + 50*x*y with T in kelvin.
(a) State the shape of T and the total number of temperature values it holds.
(b) Say whether building T requires NumPy to first make a full (41,101) copy of x and a full (41,101) copy of y, or whether it manages without copying either one.