Skip to content

Commit

Permalink
casting.py: Remove uname check for WSL1
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacwnewton authored Mar 23, 2024
1 parent f23ca14 commit 50dd737
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions nibabel/casting.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from __future__ import annotations

import warnings
from platform import machine, processor, uname
from platform import machine, processor

import numpy as np

Expand Down Expand Up @@ -275,12 +275,10 @@ def type_info(np_type):
width=width,
)
# Mitigate warning from WSL1 when checking `np.longdouble` (#1309)
# src for '-Microsoft': https://github.com/microsoft/WSL/issues/4555#issuecomment-536862561
with warnings.catch_warnings():
if uname().release.endswith('-Microsoft'):
warnings.filterwarnings(
action='ignore', category=UserWarning, message='Signature.*numpy.longdouble'
)
warnings.filterwarnings(
action='ignore', category=UserWarning, message='Signature.*numpy.longdouble'
)
info = np.finfo(dt)

# Trust the standard IEEE types
Expand Down

0 comments on commit 50dd737

Please sign in to comment.