Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset.dims definition changing in python update #265

Open
lcgallington opened this issue Feb 8, 2024 · 1 comment
Open

Dataset.dims definition changing in python update #265

lcgallington opened this issue Feb 8, 2024 · 1 comment

Comments

@lcgallington
Copy link

In the https://bcda-aps.github.io/bluesky_training/tutor/hello_world.html tutorial, after I run the hello_world demonstration plan and go to read data from the last run, I get a warning message about Dataset.dims needing to be changed to Dataset.sizes in future versions of python.


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.
warnings.warn(

@prjemian
Copy link
Contributor

prjemian commented Feb 8, 2024

@lcgallington Thanks for reporting this. I believe the call to the xarray package comes from an upstream library, such as databroker. The training notebooks don't call xarray directly.

$ git grep xarray | grep "import "
databroker/mongo_normalized.py:import xarray
databroker/mongo_normalized.py:from tiled.adapters.xarray import DatasetAdapter
databroker/projector.py:import xarray
databroker/tests/test_projector.py:import xarray
databroker/v1.py:import xarray

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

No branches or pull requests

2 participants