Commit d0491ca3 authored by payno's avatar payno

[io]fix: allows to load 1D array when load from h5py

parent daae2189
Pipeline #22865 failed with stage
in 6 minutes and 54 seconds
......@@ -127,9 +127,14 @@ def load_data(data_url, name):
else:
if data_url.is_valid():
try:
return utils.get_data(data_url)
data = utils.get_data(data_url)
except ValueError as e:
_logger.error(e)
else:
if name =='spectra':
if data.ndim == 1:
return data.reshape(data.shape[0], 1, 1)
return data
else:
_logger.warning('invalid url for', name, ', will not load it')
......
Markdown is supported
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