Skip to content

Commit aa6dfaa

Browse files
committed
FIX: make robust to units
1 parent 7c4b000 commit aa6dfaa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2038,7 +2038,8 @@ def _convert_dx(dx, x0, xconv, convert):
20382038
# vector. This is particularly an issue if
20392039
# x0 and dx are lists so x0 + dx just concatenates the lists.
20402040
# We can't just cast x0 and dx to numpy arrays because that
2041-
# removes the units from unit packages like `pint`.
2041+
# removes the units from unit packages like `pint` that
2042+
# wrap numpy arrays.
20422043
try:
20432044
x0 = x0[0]
20442045
except (TypeError, IndexError, KeyError):

0 commit comments

Comments
 (0)