We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be1c4ed commit bcbdc4fCopy full SHA for bcbdc4f
packages/python/plotly/_plotly_utils/basevalidators.py
@@ -177,12 +177,14 @@ def is_homogeneous_array(v):
177
):
178
return True
179
if is_numpy_convertable(v):
180
- v_numpy = np.array(v)
181
- # v is essentially a scalar and so shouldn't count as an array
182
- if v_numpy.shape == ():
183
- return False
184
- else:
185
- return True
+ np = get_module("numpy", should_load=True)
+ if np:
+ v_numpy = np.array(v)
+ # v is essentially a scalar and so shouldn't count as an array
+ if v_numpy.shape == ():
+ return False
186
+ else:
187
+ return True
188
return False
189
190
0 commit comments