Skip to content

Commit d3d23db

Browse files
author
Mathieu Scheltienne
committed
fix blue
1 parent 07cea85 commit d3d23db

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

nibabel/casting.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class CastingError(Exception):
2525

2626
# np.sctypes is deprecated in numpy 2.0 and np.core.sctypes should not be used instead.
2727
sctypes = {
28-
"int": [np.int8, np.int16, np.int32, np.int64],
29-
"uint": [np.uint8, np.uint16, np.uint32, np.uint64],
30-
"float": [np.float16, np.float32, np.float64, np.float128],
31-
"complex": [np.complex64, np.complex128, np.complex256],
32-
"others": [bool, object, bytes, str, np.void],
28+
'int': [np.int8, np.int16, np.int32, np.int64],
29+
'uint': [np.uint8, np.uint16, np.uint32, np.uint64],
30+
'float': [np.float16, np.float32, np.float64, np.float128],
31+
'complex': [np.complex64, np.complex128, np.complex256],
32+
'others': [bool, object, bytes, str, np.void],
3333
}
3434

3535

nibabel/tests/test_volumeutils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,7 @@ def test_a2f_nanpos():
597597

598598
def test_a2f_bad_scaling():
599599
# Test that pathological scalers raise an error
600-
NUMERICAL_TYPES = sum(
601-
[sctypes[key] for key in ['int', 'uint', 'float', 'complex']], []
602-
)
600+
NUMERICAL_TYPES = sum([sctypes[key] for key in ['int', 'uint', 'float', 'complex']], [])
603601
for in_type, out_type, slope, inter in itertools.product(
604602
NUMERICAL_TYPES,
605603
NUMERICAL_TYPES,

0 commit comments

Comments
 (0)