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):
5151
5252 # convert default Big Ints until we could support them in plotly.js
5353 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
5656 if max <= int8max and min >= int8min :
5757 v = v .astype ("int8" )
5858 elif max <= int16max and min >= int16min :
@@ -63,8 +63,8 @@ def to_typed_array_spec(v):
6363 return v
6464
6565 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
6868 if max <= uint8max and min >= 0 :
6969 v = v .astype ("uint8" )
7070 elif max <= uint16max and min >= 0 :
You can’t perform that action at this time.
0 commit comments