Skip to content

Commit df67816

Browse files
committed
BF: stride_tricks produces unbroadcastable array
1 parent f70961a commit df67816

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 = strided_scalar(self._shape)
612+
fake_data = np.zeros(self._shape)
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)