-
Notifications
You must be signed in to change notification settings - Fork 947
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
math.inf / float('inf') do not work with BoundedFloatText
#1531
Comments
I think it isn't implemented. If you want to submit a pr, I think supporting None might be easiest, since I don't think that inf serializes to json. |
@jasongrout It appears by default Also, import json
json.dumps({'x': float('inf')})
# '{"x": Infinity}' And Javascript also supports |
JSON does not support +/- infinity or NaN. They could of course be serialized to strings, but they will then require deserializing. C.f.: https://stackoverflow.com/questions/1423081/json-left-out-infinity-and-nan-json-status-in-ecmascript |
Also c.f. the json spec: http://www.json.org/ And I tried it again in Chrome:
|
That said, Python does have an option to have proper IEEE float support: see the |
Just run into this issue - supporting None as an alternative would be helpful - in the current version it's possible to set the values to inf, but the widget breaks (somehow sets the value to None, guessing that the inf gets turned into a JS undefined somewhere) |
If anyone wants to implement this using None, that would likely be accepted. :) |
This is a related issue in ipykernel/jupyter_client: jupyter/jupyter_client#708 |
I've tried all the following methods to create a LowerOnlyBoundedFloatText, but they all seem to throw one error or the other.
Any suggestions?
The text was updated successfully, but these errors were encountered: