dask / dask/distributed

serialize and deserialize do not maintain numpy matrix type

Open
#6,203 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

```distributed.protocol.serialize.serialize```
and
```distributed.protocol.serialize.deserialize```
Does not maintain numpy matrix.
```
#!/usr/bin/env python
import numpy as np
from distributed.protocol.serialize import serialize, deserialize

def main():
m = np.matrix([[1, 2], [3, 4]])
x = serialize(m)
y = deserialize(*x)
print(type(y))

if __name__ == "__main__":
main()
```

For example we should get

But we get

PS I am aware np.matrix has been served a deprecation notice, but thought I would raise issue anyway incase it is indicative of a larger issue

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.