Skip to content

Commit

Permalink
Revert "Convert array of axes to list of Python scalars"
Browse files Browse the repository at this point in the history
This reverts commit e6f8e9c.
  • Loading branch information
fepegar committed May 12, 2021
1 parent c0fd895 commit 5c53b2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchio/transforms/augmentation/spatial/random_flip.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _ensure_axes_indices(subject, axes):
def _flip_image(image, axes):
spatial_axes = np.array(axes, int) + 1
data = image.numpy()
data = np.flip(data, axis=spatial_axes.tolist())
data = np.flip(data, axis=spatial_axes)
data = data.copy() # remove negative strides
data = torch.as_tensor(data)
image.set_data(data)

0 comments on commit 5c53b2c

Please sign in to comment.