protocols/pyon: make received numpy arrays writable

This commit is contained in:
Sebastien Bourdeauducq 2015-10-26 00:21:51 +08:00
parent 62bcadfa44
commit fe809f81ab

View File

@ -145,6 +145,7 @@ def encode(x, pretty=False):
def _nparray(shape, dtype, data):
a = numpy.frombuffer(base64.b64decode(data), dtype=dtype)
a = a.copy()
return a.reshape(shape)