Filter upstream warning raised by np.finfo(np.longdouble)
on WSL1
#1310
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR filters an upstream warning regarding broken support for
np.longdouble
, raised bynp.finfo(np.longdouble)
whennumpy>=1.25
is used on WSL1.NB: The context in which
type_info
is called onnp.longdouble
is here:nibabel/nibabel/casting.py
Lines 664 to 670 in 0e925ab
nibabel/nibabel/casting.py
Line 685 in 0e925ab
Given that
nibabel
already tries to avoidnp.longdouble
on Windows, I think it should be fine to filter this warning?Notes:
I've tried to detect WSL1 to avoid filtering warnings for any other platforms -- I wanted this to be as minimal a change as is necessary. But, maybe checkingEDIT: Removed.uname
is a bit overkill. 😅Related issues/PRs
Fixes #1309.