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

Check for NaNs and raise warning #200

Open
ayoubft opened this issue May 18, 2023 · 7 comments
Open

Check for NaNs and raise warning #200

ayoubft opened this issue May 18, 2023 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ayoubft
Copy link
Contributor

ayoubft commented May 18, 2023

As discussed with @observingClouds and @milankl, and raised in this BitInformation.jl issue: the elements in an array should be checked whether they are finite and raise a warning if they are not. As having many NaNs in the dataset may yield unexpected results.

A check could be using is_null() from xarray like:

ds.is_null().sum()

Or perhaps by iterating through a dataset and issuing a warning upon encountering the first NaN value.

@observingClouds
Copy link
Owner

ds.is_null().any() is probably the way to go. The function is embarrassingly parallel. This shouldn't have much influence on the performance. I probably would call this when we need to load the data anyway.

@observingClouds observingClouds added the enhancement New feature or request label May 19, 2023
@observingClouds observingClouds added the good first issue Good for newcomers label Jun 24, 2023
@ambiguousphoton
Copy link

ambiguousphoton commented Jul 31, 2023

If this issue is still open please assign it to me, I would like to work on it.

@observingClouds
Copy link
Owner

Hi @ambiguousphoton,
Thank you for your interest in this project. I just assigned you to this issue. I'm looking forward to review your contribution and am happy to help.
Cheers!

@Shaheer-Ahmd
Copy link

@observingClouds I would love to implement this.
Can you please guide me about where is this check needed in the codebase?

@observingClouds
Copy link
Owner

@Shaheer-Ahmd sry for the late response. If you are still interested, the implementation could be added before

if dim is None and axis is None:
. Please note though that we also want to have tests implemented for this feature.

@observingClouds
Copy link
Owner

unassigned @ambiguousphoton due to inactivity

@observingClouds
Copy link
Owner

This issue will be fixed by #260

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

Successfully merging a pull request may close this issue.

4 participants