[Numpy-discussion] The meaning of threshold in numpy.set_printoptions()?
Peng Yu
pengyu.ut at gmail.com
Mon Dec 11 22:39:24 EST 2017
Hi,
The help says.
threshold : int, optional
Total number of array elements which trigger summarization
rather than full repr (default 1000).
But the following code shows that 7 triggers summarization instead of
5. Does anybody know how to interpret the meaning of `threshold`?
Thanks.
In [1]: import numpy as np
...: np.set_printoptions(threshold=5)
...: print(np.arange(6))
...: print(np.arange(7))
...:
[0 1 2 3 4 5]
[0 1 2 ..., 4 5 6]
--
Regards,
Peng
More information about the NumPy-Discussion
mailing list