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?
Asked
Active
Viewed 1.7k times
11

WestCoastProjects
- 58,982
- 91
- 316
- 560
-
numpy.set_printoptions(threshold=numpy.nan) maybe you can try it – Yang MingHui Feb 04 '18 at 01:45
1 Answers
12
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)