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 mamba's pin #105

Merged
merged 3 commits into from
Mar 29, 2024
Merged

remove mamba's pin #105

merged 3 commits into from
Mar 29, 2024

Conversation

ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented Mar 15, 2024

Follow up on #102.

return w.apply(np.ptp, raw=True, engine='numba')
except (ImportError, TypeError):
except (ImportError, TypeError, numba.core.errors.NumbaTypeError):
Copy link
Member Author

Choose a reason for hiding this comment

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

In a way numba never worked with masked arrays. See numba/numba@25f17bb

However, if we do want numba's speed-ups, we could try to use it when the Window inputs do not create NaNs and require masked-arrays. I could not figure this out yet so, for now, I'm proposing we just check for this numba error and let it default to non-numba behavior. If/when we implement a masked-array workaround we should keep this check anyway to future proof any mask-array that may pass here.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK. I think I got to the bottom of this one. In fact, if the Windows produces NaN, then there is nothing we can do but skip numba and this implementation is OK to do so. However, if the Windows doesn't create NaN, numba will be used without a problem.

TL;DR numba acceleration will happen when the window parameters allow it.

@ocefpaf ocefpaf marked this pull request as ready for review March 20, 2024 16:24
@ocefpaf
Copy link
Member Author

ocefpaf commented Mar 20, 2024

@iwensu0313 can you take a look at this one? it will allow us to install ioos_qc in environments modern Python + mamba. Although, the mamba acceleration there won't be available. See my comment above on the reason why.

@ocefpaf
Copy link
Member Author

ocefpaf commented Mar 29, 2024

Self-merging this one b/c this will allow us to install ioos_qc in environments with modern numba.

@ocefpaf ocefpaf merged commit f527b7d into ioos:main Mar 29, 2024
9 checks passed
@ocefpaf ocefpaf deleted the unpin_mamba branch March 29, 2024 16:41
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.

1 participant