diff --git a/README.md b/README.md index ff1be02..288647a 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,10 @@ data = nt2.Data("path/to/data") The data is stored in specialized containers which can be accessed via corresponding attributes: ```python -data.fields # < xr.Dataset -data.particles # < special object which returns a pd.DataFrame when .load() is called -data.spectra # < xr.Dataset +data.fields # < xr.Dataset +data.particles # < special object which returns a pd.DataFrame when .load() is called +data.spectra # < xr.Dataset +data.diagnostics # < pd.DataFrame ``` > If using Jupyter notebook, you can quickly preview the loaded metadata by simply running a cell with just `data` in it (or in regular python, by doing `print(data)`). diff --git a/dist/nt2py-1.5.1-py3-none-any.whl b/dist/nt2py-1.5.1-py3-none-any.whl new file mode 100644 index 0000000..9dfd59d Binary files /dev/null and b/dist/nt2py-1.5.1-py3-none-any.whl differ diff --git a/dist/nt2py-1.5.1.tar.gz b/dist/nt2py-1.5.1.tar.gz new file mode 100644 index 0000000..941a45e Binary files /dev/null and b/dist/nt2py-1.5.1.tar.gz differ diff --git a/nt2/__init__.py b/nt2/__init__.py index c9f6533..c9a797c 100644 --- a/nt2/__init__.py +++ b/nt2/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.5.0" +__version__ = "1.5.1" import nt2.containers.data as nt2_data diff --git a/nt2/readers/adios2.py b/nt2/readers/adios2.py index 1694081..3b22ccf 100644 --- a/nt2/readers/adios2.py +++ b/nt2/readers/adios2.py @@ -101,7 +101,10 @@ def ReadArrayAtTimestep( if quantity in f.available_variables(): var = f.inquire_variable(quantity) if var is not None: - return np.array(f.read(var)) + if var.shape() == [0]: + return np.array([]) + else: + return np.array(f.read(var)) else: raise ValueError(f"{quantity} not found in the {filename}") else: