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

Allow creating DataArrays with nD coordinate variables #8126

Merged
merged 10 commits into from
Sep 22, 2023

Conversation

dcherian
Copy link
Contributor

cc @blaylockbk

@dcherian dcherian requested a review from benbovy September 8, 2023 15:58
@dcherian dcherian marked this pull request as ready for review September 8, 2023 15:59
Copy link
Collaborator

@headtr1ck headtr1ck left a comment

Choose a reason for hiding this comment

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

Looks good

xarray/tests/test_dataarray.py Outdated Show resolved Hide resolved
xarray/tests/test_dataarray.py Outdated Show resolved Hide resolved
xarray/tests/test_dataarray.py Outdated Show resolved Hide resolved
xarray/tests/test_dataarray.py Outdated Show resolved Hide resolved
@headtr1ck headtr1ck added the plan to merge Final call for comments label Sep 10, 2023
@@ -7085,3 +7082,32 @@ def test_error_on_ellipsis_without_list(self) -> None:
da = DataArray([[1, 2], [1, 2]], dims=("x", "y"))
with pytest.raises(ValueError):
da.stack(flat=...) # type: ignore


def test_nD_coord_dataarray() -> None:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@benbovy can you review these tests please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gentle ping @benbovy

Copy link
Member

@benbovy benbovy left a comment

Choose a reason for hiding this comment

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

LGTM too, thanks @dcherian

@dcherian dcherian merged commit cdf0726 into pydata:main Sep 22, 2023
24 checks passed
@dcherian dcherian deleted the nD-coords-dataarray branch September 22, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to merge Final call for comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotting accessor error for datasets with Dimension name matches coordinate names
4 participants