New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation #12987
Comments
Hmmm, the largest value that works for me is (and not
in any case, that benchmark should probably just use a reasonable value for the threshold. The question is whether we should nevertheless go back to a warning. |
This was introduced in #12353 |
@seberg: can you show the output when you pass |
Sorry, sure, may look at it myself (on the other hand, I do not know printing super well), this is on 1.16.1, sys.maxsize is In [1]: np.set_printoptions(2**31)
In [2]: np.arange(10).astype(np.float64)
OverflowError: signed integer is greater than maximum Full Error below:
|
with numpy version 1.15.4
maxsize value is similar with latest numpy also |
Well, just checked the dragon4 code is limited to a precision of |
Threshold and precision are independent. Threshold is about omitting elements, not about omitting digits. |
@eric-wieser, ooopst, somehow kept on that line. I guess that had nothing to do with the initial report and is much less reasonable to set to a large value in any case. |
@gowthamcr: Ignoring @seberg's confusion, this is intended behavior, so I'm closing this issue. You should be using |
my English not so good. |
replace “np.set_printoptions(threshold=np.nan)“ with ”np.set_printoptions(threshold=sys.maxsize) it worked for me! |
@bharath5673 which version of python did you use? cause I have the same problem |
Locking this, there's enough discussion at https://stackoverflow.com/questions/1987694/how-to-print-the-full-numpy-array-without-truncation, we don't need more in our bug tracker |
Issue is observed while runing Candle P1B3 benchmark
File "p1b3_baseline_keras2.py", line 26, in
import p1b3 as benchmark
File "/Pilot1/P1B3/p1b3.py", line 37, in
np.set_printoptions(threshold=np.nan)
File "/usr/local/lib/python3.5/dist-packages/numpy/core/arrayprint.py", line 246, in set_printoptions
floatmode, legacy)
File "/usr/local/lib/python3.5/dist-packages/numpy/core/arrayprint.py", line 93, in _make_options_dict
raise ValueError("threshold must be numeric and non-NAN, try "
ValueError: threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation
The text was updated successfully, but these errors were encountered: