File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/python/plotly/_plotly_utils Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ def to_typed_array_spec(v):
51
51
52
52
# convert default Big Ints until we could support them in plotly.js
53
53
<
A6D3
div class="diff-text-inner"> if dtype == "int64" :
54
- max = v .max () if v else 0
55
- min = v .min () if v else 0
54
+ max = v .max () if v . size > 0 else 0
55
+ min = v .min () if v . size > 0 else 0
56
56
if max <= int8max and min >= int8min :
57
57
v = v .astype ("int8" )
58
58
elif max <= int16max and min >= int16min :
@@ -63,8 +63,8 @@ def to_typed_array_spec(v):
63
63
return v
64
64
65
65
elif dtype == "uint64" :
66
- max = v .max () if v else 0
67
- min = v .min () if v else 0
66
+ max = v .max () if v . size > 0 else 0
67
+ min = v .min () if v . size > 0 else 0
68
68
if max <= uint8max and min >= 0 :
69
69
v = v .astype ("uint8" )
70
70
elif max <= uint16max and min >= 0 :
You can’t perform that action at this time.
0 commit comments