Closed wllgrnt closed 1 year ago
Repro:
import numpy from typed_python import SerializationContext res = SerializationContext().serialize(numpy.sin) print(res)
res should be a bytes object. Note that pickle.dumps(numpy.sin) does return a bytes object, as expected.
res
pickle.dumps(numpy.sin)
We get TypeError: cannot pickle 'numpy.ufunc' object.
TypeError: cannot pickle 'numpy.ufunc' object
Repro:
Expected behaviour
res
should be a bytes object. Note thatpickle.dumps(numpy.sin)
does return a bytes object, as expected.Actual behaviour.
We get
TypeError: cannot pickle 'numpy.ufunc' object
.