Thanks to visit codestin.com Credit goes to github.com
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 f824169 commit ac9ddceCopy full SHA for ac9ddce
packages/python/plotly/_plotly_utils/utils.py
@@ -51,8 +51,8 @@ def to_typed_array_spec(v):
51
52
# convert default Big Ints until we could support them in plotly.js
53
if dtype == "int64":
54
- max = v.max() if v else 0
55
- min = v.min() if v else 0
+ max = v.max() if v.size > 0 else 0
+ min = v.min() if v.size > 0 else 0
56
if max <= int8max and min >= int8min:
57
v = v.astype("int8")
58
elif max <= int16max and min >= int16min:
@@ -63,8 +63,8 @@ def to_typed_array_spec(v):
63
return v
64
65
elif dtype == "uint64":
66
67
68
if max <= uint8max and min >= 0:
69
v = v.astype("uint8")
70
elif max <= uint16max and min >= 0:
0 commit comments