As shown in the screenshot a 2D numpy array is truncated for printing purposes. I would like to have all elements displayed. Is there an option setting to enable that behavior?
-
numpy.set_printoptions(threshold=numpy.nan) maybe you can try itYang MingHui– Yang MingHui2018-02-04 01:45:48 +00:00Commented Feb 4, 2018 at 1:45
Add a comment
|
1 Answer
See the docs on print options. Specifically:
threshold : int, optional
Total number of array elements which trigger summarization rather than full repr (default 1000).
So setting threshold to np.inf means it is never summarized.
np.set_printoptions(threshold=np.inf)
