Skip to content

SerializationContext cannot serialize numpy ufuncs #417

@wllgrnt

Description

@wllgrnt

Repro:

import numpy
from typed_python import SerializationContext

res = SerializationContext().serialize(numpy.sin)
print(res)

Expected behaviour

res should be a bytes object. Note that pickle.dumps(numpy.sin) does return a bytes object, as expected.

Actual behaviour.

We get TypeError: cannot pickle 'numpy.ufunc' object.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions