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

Don't access data when creating DataArray from Variable. #8754

Merged
merged 4 commits into from
Apr 4, 2024

Conversation

dcherian
Copy link
Contributor

@dcherian dcherian commented Feb 15, 2024

This seems to have been around since 2016-ish, so presumably our backend code path is passing arrays around, not Variables.

cc @ilan-gold

@ilan-gold
Copy link
Contributor

Thanks @dcherian for the quick fix!

@@ -4908,7 +4908,7 @@ def test_idxmin(
with pytest.raises(ValueError):
xr.DataArray(5).idxmin()

coordarr0 = xr.DataArray(ar0.coords["x"], dims=["x"])
coordarr0 = xr.DataArray(ar0.coords["x"].data, dims=["x"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear why this needs to be changed?

@ilan-gold
Copy link
Contributor

necro bump on this, would be great to have

@TomNicholas TomNicholas merged commit 56182f7 into pydata:main Apr 4, 2024
29 checks passed
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.

Lazy Loading with DataArray vs. Variable
4 participants