You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7945d40
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: astropy/units/quantity.py
+4-7Lines changed: 4 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -394,20 +394,17 @@ def __reduce__(self):
394
394
# patch to pickle Quantity objects (ndarray subclasses),
395
395
# see http://www.mail-archive.com/[email protected]/msg02446.html
# patch to unpickle Quantity objects (ndarray subclasses),
404
403
# see http://www.mail-archive.com/[email protected]/msg02446.html
405
404
406
405
nd_state, own_state=state
407
-
np.ndarray.__setstate__(self, nd_state)
408
-
409
-
unit, =own_state
410
-
self._unit=unit
406
+
super(Quantity, self).__setstate__(nd_state)
407
+
self.__dict__.update(own_state)
411
408
412
409
defto(self, unit, equivalencies=[]):
413
410
""" Returns a new `Quantity` object with the specified units.
0 commit comments