Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update shapeannotation.py
  • Loading branch information
jjrob13 authored May 14, 2022
commit 5af1ce529467fae671d3ebe9dce1aee07d3c7b6f
2 changes: 1 addition & 1 deletion packages/python/plotly/plotly/shapeannotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def _mean(x):
if len(x) == 0:
raise ValueError("x must have positive length")
# Mean of two of the same elements will just be that element.
# This fixes this https://github.com/plotly/plotly.py/issues/3065
# This fixes https://github.com/plotly/plotly.py/issues/3065
if len(x) == 2 and x[0] == x[1]:
return x[0]
return float(sum(x)) / len(x)
Expand Down