-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Can't pickle UFuncTypeError #16490
Copy link
Copy link
Closed
Labels
Milestone
Description
numpy 1.18.4-py38h8854b6b_0 (conda-forge)
Linux x64
import pickle
import numpy
try:
numpy.ones(1) * "foo"
except Exception as e:
pickle.dumps(e)Output:
Traceback (most recent call last):
File "ufunctypeerror.py", line 6, in <module>
numpy.ones(1) * "foo"
numpy.core._exceptions.UFuncTypeError: ufunc 'multiply' did not contain a loop with signature matching types (dtype('<U32'), dtype('<U32')) -> dtype('<U32')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "ufunctypeerror.py", line 8, in <module>
pickle.dumps(e)
_pickle.PicklingError: Can't pickle <class 'numpy.core._exceptions.UFuncTypeError'>: it's not the same object as numpy.core._exceptions.UFuncTypeError
Reactions are currently unavailable