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

Remove sanitize_dtypes redundancy in EchoData methods #1427

Open
leewujung opened this issue Jan 1, 2025 · 0 comments
Open

Remove sanitize_dtypes redundancy in EchoData methods #1427

leewujung opened this issue Jan 1, 2025 · 0 comments
Labels
enhancement This makes echopype better
Milestone

Comments

@leewujung
Copy link
Member

Currently sanitize_dtypes in __get_dataset is called multiple times in EchoData methods __getitem__, __setitem, __setattr__. However, this operation should really only be used when actually setting values. The new xarray.DataTree implementation distinguishes .to_dataset()(returning a Dataset) and .dataset() (returning a DatasetView), so we can take advantage of this to remove this redundancy.

See related discussions in #1419 (comment).

@leewujung leewujung added the enhancement This makes echopype better label Jan 1, 2025
@leewujung leewujung added this to the v0.10.0 milestone Jan 1, 2025
@github-project-automation github-project-automation bot moved this to Todo in Echopype Jan 1, 2025
@leewujung leewujung modified the milestones: v0.10.0, v0.10.1 Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This makes echopype better
Projects
Status: Todo
Development

No branches or pull requests

1 participant