Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6fcee19

Browse files
committed
Ensure atleast_1d for pint quantity input
1 parent 9b2834c commit 6fcee19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎proplot/internals/inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def _to_numpy_array(data, strip_units=False):
132132
data = data.values
133133
if Quantity is not ndarray and isinstance(data, Quantity):
134134
units = None if strip_units else data.units
135-
data = data.magnitude
135+
data = np.atleast_1d(data.magnitude)
136136
else:
137137
units = None
138138
data = np.atleast_1d(data) # natively preserves masked arrays

0 commit comments

Comments
 (0)