bluesky / databroker

Unified API pulling data from multiple sources
https://blueskyproject.io/databroker
BSD 3-Clause "New" or "Revised" License
33 stars 45 forks source link

FutureWarning: xarray --return type of Dataset.dims will be changed #800

Open prjemian opened 7 months ago

prjemian commented 7 months ago

From one of our training notebooks, we get this FutureWarning as we try to read a run from a cat = databroker.catalog[catalog].v2 instance:

run = cat[-1]
metadata=run.metadata
data=run.primary.read()

/home/apsu/Apps/miniconda3/envs/bluesky_2024_1/lib/python3.11/site-packages/xarray/core/utils.py:494: FutureWarning: The return type of Dataset.dims will be changed to return a set of dimension names in future, in order to be more consistent with DataArray.dims. To access a mapping from dimension names to lengths, please use Dataset.sizes.

Thanks @lcgallington, for the report.