8000 Merge branch 'orjson_encoding' into orjson_encoding_instrumentation · tr8dr/plotly.py@2d75dee · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d75dee

Browse files
committed
Merge branch 'orjson_encoding' into orjson_encoding_instrumentation
2 parents c3c4425 + 242d1fa commit 2d75dee

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

packages/python/plotly/_plotly_utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def encode_as_numpy(obj):
186186

187187
if obj is numpy.ma.core.masked:
188188
return float("nan")
189-
elif isinstance(obj, numpy.ndarray):
189+
elif isinstance(obj, numpy.ndarray) and obj.dtype.kind == "M":
190190
try:
191191
return numpy.datetime_as_string(obj).tolist()
192192
except TypeError:

0 commit comments

Comments
 (0)
0