forked from M-Labs/artiq
protocols/pyon: make received numpy arrays writable
This commit is contained in:
parent
62bcadfa44
commit
fe809f81ab
|
@ -145,6 +145,7 @@ def encode(x, pretty=False):
|
||||||
|
|
||||||
def _nparray(shape, dtype, data):
|
def _nparray(shape, dtype, data):
|
||||||
a = numpy.frombuffer(base64.b64decode(data), dtype=dtype)
|
a = numpy.frombuffer(base64.b64decode(data), dtype=dtype)
|
||||||
|
a = a.copy()
|
||||||
return a.reshape(shape)
|
return a.reshape(shape)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue