Skip to content

Commit

Permalink
Use float if initial param value is int
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Dec 13, 2023
1 parent 11a9056 commit 8689751
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions altair/jupyter/jupyter_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ def __init__(self, trait_values):
super().__init__()

for key, value in trait_values.items():
if isinstance(value, int):
traitlet_type = traitlets.Int()
elif isinstance(value, float):
if isinstance(value, (int, float)):
traitlet_type = traitlets.Float()
elif isinstance(value, str):
traitlet_type = traitlets.Unicode()
Expand Down

0 comments on commit 8689751

Please sign in to comment.