Skip to content

Commit 59fe206

Browse files
committed
Address review
1 parent 12ab42a commit 59fe206

File tree

1 file changed

+2
-2
lines changed
  • packages/python/plotly/_plotly_utils

1 file changed

+2
-2
lines changed

Diff for: packages/python/plotly/_plotly_utils/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def to_typed_array_spec(v):
4444
v = copy_to_readonly_numpy_array(v)
4545

4646
np = get_module("numpy", should_load=False)
47-
if not isinstance(v, np.ndarray):
47+
if not np or not isinstance(v, np.ndarray):
4848
return v
4949

5050
dtype = str(v.dtype)
@@ -96,7 +96,7 @@ def is_skipped_key(key):
9696
are skipped for conversion to the typed array spec
9797
"""
9898
skipped_keys = ["geojson", "layer", "range"]
99-
return any(skipped_key in key for skipped_key in skipped_keys)
99+
return any(skipped_key == key for skipped_key in skipped_keys)
100100

101101

102102
def convert_to_base64(obj):

0 commit comments

Comments
 (0)