Skip to content

Commit 96df7b3

Browse files
authored
Merge pull request #439 from jhlegarreta/fix/assign-astype
FIX: Assign result of `astype` to new array
2 parents b94bf06 + 1fd81ef commit 96df7b3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/nifreeze/data/filtering.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def advanced_clip(
110110
np.subtract(1.0, data, out=data)
111111

112112
if dtype in ("uint8", "int16"):
113-
np.round(255 * data, out=data).astype(dtype)
113+
np.round(255 * data, out=data)
114+
data = data.astype(dtype, copy=False)
114115

115116
if inplace:
116117
return None

0 commit comments

Comments
 (0)