Commit 22b1dba5 authored by Valentin Valls's avatar Valentin Valls
Browse files

Make sure the numpy array is writable

parent f0c3e63a
......@@ -70,6 +70,15 @@ class BasePlot(object):
def update_data(self, field, data):
data_dict =
# Data from the network is sometime not writable
# This make it fail silx for some use cases
if data is None:
return None
if isinstance(data, numpy.ndarray):
if not data.flags.writeable:
data = numpy.array(data)
data_dict[field] = data
def remove_data(self, field):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment