Skip to content

Commit 3b6d7fe

Browse files
committed
RF: Avoid unneeded reference
1 parent bec78b6 commit 3b6d7fe

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

nibabel/arrayproxy.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,8 @@ def _get_scaled(self, dtype, slicer):
362362
use_dtype = scl_slope.dtype if dtype is None else dtype
363363
slope = scl_slope.astype(use_dtype)
364364
inter = scl_inter.astype(use_dtype)
365-
# Read array
366-
raw_data = self._get_unscaled(slicer=slicer)
367-
# Upcast as necessary for big slopes, intercepts
368-
scaled = apply_read_scaling(raw_data, slope, inter)
369-
del raw_data
365+
# Read array and upcast as necessary for big slopes, intercepts
366+
scaled = apply_read_scaling(self._get_unscaled(slicer=slicer), slope, inter)
370367
if dtype is not None:
371368
scaled = scaled.astype(np.promote_types(scaled.dtype, dtype), copy=False)
372369
return scaled

0 commit comments

Comments
 (0)