Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`).
Expand Down
Binary file added dist/nt2py-1.5.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/nt2py-1.5.1.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion nt2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.5.0"
__version__ = "1.5.1"

import nt2.containers.data as nt2_data

Expand Down
5 changes: 4 additions & 1 deletion nt2/readers/adios2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading