Python lists can hold rows of numeric data, but NumPy calculations use homogeneous arrays whose elements share one data type. Converting the input at a clear boundary makes the resulting dimensions and storage type explicit before later calculations depend on them.
The np.array() constructor accepts a nested Python sequence and maps each inner list to a row. Setting dtype=np.float64 during construction keeps decimal values in a known floating-point representation rather than leaving type selection to inference.
Shape and dtype deserve separate checks because a valid array can still be oriented or typed differently from the calculation that consumes it. Assertions make either mismatch stop the script, while the printed values and metadata show the usable result.
Related: Convert array dtype
Related: Create linearly spaced values
Related: Reshape an array
import numpy as np readings = [ [18.5, 19.2, 17.8], [20.1, 18.9, 19.6], ]
temperatures = np.array(readings, dtype=np.float64)
assert temperatures.shape == (2, 3)
assert temperatures.dtype == np.float64
print("temperatures:") print(temperatures) print("shape:", temperatures.shape) print("dtype:", temperatures.dtype)
$ python3 array-create.py temperatures: [[18.5 19.2 17.8] [20.1 18.9 19.6]] shape: (2, 3) dtype: float64