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 56a8945 commit 0a51020Copy full SHA for 0a51020
packages/python/plotly/plotly/io/_json.py
@@ -479,15 +479,15 @@ def clean_to_json_compatible(obj, **kwargs):
479
and isinstance(obj, np.ndarray)
480
and obj.dtype.kind in ("b", "i", "u", "f")
481
):
482
- return obj
+ return np.ascontiguousarray(obj)
483
484
# pandas
485
if pd is not None:
486
if obj is pd.NaT:
487
return None
488
elif isinstance(obj, (pd.Series, pd.DatetimeIndex)):
489
if numpy_allowed and obj.dtype.kind in ("b", "i", "u", "f"):
490
- return obj.values
+ return np.ascontiguousarray(obj.values)
491
elif obj.dtype.kind == "M":
492
if isinstance(obj, pd.Series):
493
dt_values = obj.dt.to_pydatetime().tolist()
0 commit comments