Skip to content

Conversation

@maarten-ic
Copy link
Collaborator

>>> entry = imas.DBEntry("ascii.nc", "r")
>>> eq = entry.get("equilibrium", autoconvert=False, lazy=True)
>>> # Previous behaviour:
>>> eq.ids_properties.homogeneous_time
<IDSInt0D (IDS:equilibrium, ids_properties/homogeneous_time, INT_0D)>
ndarray(array(1, dtype=int32))
>>> # New behaviour, matches with non-lazy IDS:
>>> eq.ids_properties.homogeneous_time
<IDSInt0D (IDS:equilibrium, ids_properties/homogeneous_time, INT_0D)>
int(1)

… from netCDF files

```python
>>> entry = imas.DBEntry("ascii.nc", "r")
>>> eq = entry.get("equilibrium", autoconvert=False, lazy=True)
>>> # Previous behaviour:
>>> eq.ids_properties.homogeneous_time
<IDSInt0D (IDS:equilibrium, ids_properties/homogeneous_time, INT_0D)>
ndarray(array(1, dtype=int32))
>>> # New behaviour, matches with non-lazy IDS:
>>> eq.ids_properties.homogeneous_time
<IDSInt0D (IDS:equilibrium, ids_properties/homogeneous_time, INT_0D)>
int(1)
```
@olivhoenen olivhoenen merged commit 2d26092 into iterorganization:develop Jul 8, 2025
10 checks passed
@maarten-ic maarten-ic deleted the bugfix/netcdf-lazy-load-0d-ndarrays branch July 8, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants