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 45d4f7b commit 3a5930fCopy full SHA for 3a5930f
packages/python/plotly/_plotly_utils/utils.py
@@ -235,15 +235,17 @@ class NotEncodable(Exception):
235
def b64_encode_numpy(obj):
236
# Convert 1D numpy arrays with numeric types to memoryviews with
237
# datatype and shape metadata.
238
- if obj.dtype.kind in ["u", "i", "f"]:
+ dtype = obj.dtype
239
+ if (dtype.kind in ["u", "i", "f"] and
240
+ str(dtype) != "int64" and str(dtype) != "uint64"):
241
# We have a numpy array that is compatible with JavaScript typed
242
# arrays
243
buffer = base64.b64encode(memoryview(
244
obj.ravel(order="C"))
245
).decode("utf-8")
246
return {
247
"bvals": buffer,
- "dtype": str(obj.dtype),
248
+ "dtype": str(dtype),
249
"shape": obj.shape
250
}
251
else:
0 commit comments