我想以一定的精度漂亮地打印数组,但又不抑制较小的值
例如:
my_format = <mixed formatting to precision 3>
with np.printoptions(formatter=my_format ):
print(10.**np.arange(-7, 0, 1))
预期输出:
[1.e-07 1.e-06 1.e-05 1.e-04 0.001 0.01 0.1 ]
我知道How to pretty-printing a numpy.array without scientific notation and with given precision?,但是它没有我特定问题的答案