We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12ab42a commit 59fe206Copy full SHA for 59fe206
packages/python/plotly/_plotly_utils/utils.py
@@ -44,7 +44,7 @@ def to_typed_array_spec(v):
44
v = copy_to_readonly_numpy_array(v)
45
46
np = get_module("numpy", should_load=False)
47
- if not isinstance(v, np.ndarray):
+ if not np or not isinstance(v, np.ndarray):
48
return v
49
50
dtype = str(v.dtype)
@@ -96,7 +96,7 @@ def is_skipped_key(key):
96
are skipped for conversion to the typed array spec
97
"""
98
skipped_keys = ["geojson", "layer", "range"]
99
- return any(skipped_key in key for skipped_key in skipped_keys)
+ return any(skipped_key == key for skipped_key in skipped_keys)
100
101
102
def convert_to_base64(obj):
0 commit comments