From 8689751a1e2bf378fd6182d45c665c7d3120e09d Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Wed, 13 Dec 2023 14:20:43 -0500 Subject: [PATCH] Use float if initial param value is int --- altair/jupyter/jupyter_chart.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/altair/jupyter/jupyter_chart.py b/altair/jupyter/jupyter_chart.py index 9ad739d11..ee9abf025 100644 --- a/altair/jupyter/jupyter_chart.py +++ b/altair/jupyter/jupyter_chart.py @@ -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()