Skip to content

Commit a70ab54

Browse files
committed
TYP: Ignore overzealous warning for min/max with numpy scalars
1 parent f3c2168 commit a70ab54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/volumeutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ def array_to_file(
624624
# pre scale thresholds
625625
mn, mx = _dt_min_max(in_dtype, mn, mx)
626626
mn_out, mx_out = _dt_min_max(out_dtype)
627-
pre_clips = max(mn, mn_out), min(mx, mx_out)
627+
pre_clips = max(mn, mn_out), min(mx, mx_out) # type: ignore[type-var]
628628
return _write_data(data, fileobj, out_dtype, order, pre_clips=pre_clips)
629629
# In any case, we do not want to check for nans because we've already
630630
# disallowed scaling that generates nans

0 commit comments

Comments
 (0)