-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Floating point __str__ #6908
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
Comments
Is it me, or are the print options only respected when we want to print arrays? Here's another example of "bad" behavior with scalars:
|
Is anyone working on this issue? |
I don't know of anyone who is. Generally, IIUC the etiquette is that unless someone is really talking about it or has already opened a PR to fix the issue, it is completely up for grabs by anyone. So go for it! Good luck! |
Please consider fixing #6136 at the same time :) |
It seems the |
Judging from the labeling by @rgommers , I suspect not. I think you may very well have to add a good amount of new code in order to enforce printing for numbers. |
I think the float values are also printed by array2string function defined in |
You still have to cast |
I just ran into this issue. printoptions should be respected by all three:
|
prints distinguishing parentheses for scalar types addresses issue numpy#7355, numpy#7913, related to numpy#6908
Closed by #9941 |
Related to (but different from) #6136:
float64.__str__
can truncate different floats to the same string, even whenprintoptions
is set to a high enough precision:Note that
repr(x)
correctly gives'0.20000000000000004'
.The text was updated successfully, but these errors were encountered: