diff options
author | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2018-12-17 12:28:24 +0100 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2018-12-17 12:28:24 +0100 |
commit | cebdc9244c019224846cb8d2668080fe386a6adc (patch) | |
tree | aedec55da0f9dd4fc4d6c7eb0f58489a956e2e8c /silx/io/utils.py | |
parent | 159ef14fb9e198bb0066ea14e6b980f065de63dd (diff) |
New upstream version 0.9.0+dfsg
Diffstat (limited to 'silx/io/utils.py')
-rw-r--r-- | silx/io/utils.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/silx/io/utils.py b/silx/io/utils.py index 5b0de54..654bfe3 100644 --- a/silx/io/utils.py +++ b/silx/io/utils.py @@ -55,6 +55,10 @@ except ImportError as e: logger = logging.getLogger(__name__) +NEXUS_HDF5_EXT = [".h5", ".nx5", ".nxs", ".hdf", ".hdf5", ".cxi"] +"""List of possible extensions for HDF5 file formats.""" + + class H5Type(enum.Enum): """Identify a set of HDF5 concepts""" DATASET = 1 @@ -204,7 +208,7 @@ def save1D(fname, x, y, xlabel=None, ylabels=None, filetype=None, # make sure y_array is a 2D array even for a single curve if len(y_array.shape) == 1: - y_array.shape = (1, y_array.shape[0]) + y_array = y_array.reshape(1, y_array.shape[0]) elif len(y_array.shape) > 2 or len(y_array.shape) < 1: raise IndexError("y must be a 1D or 2D array") @@ -820,7 +824,7 @@ def get_data(url): if fabio_file.nframes == 1: if index != 0: - raise ValueError("Only a single frame availalbe. Slice %s out of range" % index) + raise ValueError("Only a single frame available. Slice %s out of range" % index) data = fabio_file.data else: data = fabio_file.getframe(index).data |