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

Make l1b_data class compatible w/ future xarray by defining __slots__ #16

Open
j-haacker opened this issue May 29, 2024 · 1 comment
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@j-haacker
Copy link
Owner

Is your feature request related to a problem? Please describe.
xarray warns:

FutureWarning: xarray subclass l1b_data should explicitly define slots

Describe the solution you'd like
Adapt class l1b_data such that it will not break in future xarray releases.

Note: this is not related to issues with xarray v2024.3.0

@j-haacker j-haacker added the enhancement New feature or request label May 29, 2024
@j-haacker j-haacker assigned j-haacker and unassigned j-haacker May 29, 2024
@j-haacker j-haacker added the good first issue Good for newcomers label May 29, 2024
@j-haacker
Copy link
Owner Author

It seems defining slots can save memory if used correctly.

A simple solution might be to just add __slots__ = (,) to the class, but maybe one should take the effort to restructure init to only load used fields -- and to define slots for those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant