Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/python/plotly/_plotly_utils/basevalidators.py
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ def to_scalar_or_list(v):
pd = get_module("pandas", should_load=False)
if np and np.isscalar(v) and hasattr(v, "item"):
return v.item()
if isinstance(v, (list, tuple)):
if is_simple_array(v):
return [to_scalar_or_list(e) for e in v]
elif np and isinstance(v, np.ndarray):
if v.ndim == 0:
@@ -211,7 +211,7 @@ def is_simple_array(v):
"""
Return whether a value is considered to be an simple array
"""
return isinstance(v, (list, tuple))
return isinstance(v, (list, tuple, range))


def is_array(v):