Skip to content

Commit 7ddfbf3

Browse files
committed
BF: Try copying array shape
Suggested by @matthew-brett
1 parent df67816 commit 7ddfbf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/parrec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def __getitem__(self, slicer):
609609
'F')
610610
# Broadcast scaling to shape of original data
611611
slopes, inters = self._slice_scaling
612-
fake_data = np.zeros(self._shape)
612+
fake_data = strided_scalar(self._shape.copy())
613613
_, slopes, inters = np.broadcast_arrays(fake_data, slopes, inters)
614614
# Slice scaling to give output shape
615615
return raw_data * slopes[slicer] + inters[slicer]

0 commit comments

Comments
 (0)