Print Options
set_printoptions controls precision, threshold and suppress.
Example
np.set_printoptions(precision=2, suppress=True)
print(np.array([1 / 3, 1e-8, 1234.5678]))
np.set_printoptions(precision=8)Result
[ 0.33 0. 1234.57]
Exercise
Decimals.
np.set_printoptions(=2)
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.