Write a NumPy program to suppresses the use of scientific notation for small numbers in NumPy array
- برمجة بايثون
- 2021-09-12
- mhanasmh00489829403
الأجوبة
import numpy as np
x=np.array([1.6e-10, 1.6, 1200, .235])
print("Original array elements:")
print(x)
print("Print array values with precision 3:")
np.set_printoptions(suppress=True)
print(x)
Sample Output:
Original array elements: [1.60e-10 1.60e+00 1.20e+03 2.35e-01] Print array values with precision 3: [ 0. 1.6 1200. 0.235]
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال