Skip to content

Conversation

@SimonHeybrock
Copy link
Member

Closes #3156.

My comment in the linked issue actually overlooked that removing attrs is not enough to simplify the code, since we may still have binned data in dataset items, each with their own coords. Therefore, the core aspect cannot be simplified.

I found this minor leftover from the pre-alignment-flag implementation, which I fix here, making behavior of transform_coords consistent between DataArray and Dataset, even in the "empty" case.

@SimonHeybrock SimonHeybrock requested a review from jl-wynen October 5, 2023 06:46
Copy link
Member

@jl-wynen jl-wynen left a comment

Choose a reason for hiding this comment

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

Add a test?

@SimonHeybrock
Copy link
Member Author

Add a test?

Of what?

@jl-wynen
Copy link
Member

jl-wynen commented Oct 5, 2023

That coords are kept for empty datasets.

@SimonHeybrock
Copy link
Member Author

That coords are kept for empty datasets.

There was an existing test for this, and I had to modify it, see diff?

@jl-wynen
Copy link
Member

jl-wynen commented Oct 5, 2023

Oh, I missed that

@SimonHeybrock SimonHeybrock merged commit 5b12dc3 into main Oct 5, 2023
@SimonHeybrock SimonHeybrock deleted the simplify-dataset-transform branch October 5, 2023 09:28
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.

Optimise transform coords for dataset

3 participants