Commit fa23903a authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

[io][utils] Fix some typos

parent d7fdc64b
......@@ -33,6 +33,8 @@ import h5py
from datetime import datetime
import numpy
from silx.io.dictdump import dicttoh5
_logger = logging.getLogger(__file__)
......@@ -71,7 +73,7 @@ def advancement_display(iteration, total, prefix='', suffix='', decimals=1, leng
def write_process(h5_file, entry, dimensions, W, data, processing_order,
data_path='/', overwrite=True):
data_path='/', overwrite=True):
"""
Write a stack of components and its parameters into .h5
......@@ -92,7 +94,7 @@ def write_process(h5_file, entry, dimensions, W, data, processing_order,
def get_interpretation(my_data):
"""Return hdf5 attribute for this type of data"""
if isinstance(my_data, numpy.ndarray):
if my_data.ndim is 1:
if my_data.ndim == 1:
return 'spectrum'
elif my_data.ndim in (2, 3):
return 'image'
......@@ -154,4 +156,4 @@ def write_process(h5_file, entry, dimensions, W, data, processing_order,
nx_data["components"] = h5f[source_addr]
for key, value in dimensions.items():
save_key(nx_parameters_path, key_path=key, value=value)
\ No newline at end of file
save_key(nx_parameters_path, key_path=key, value=value)
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