Skip to content

Commit

Permalink
6699 Fix type error
Browse files Browse the repository at this point in the history
Signed-off-by: jmnolte <[email protected]>
  • Loading branch information
jmnolte committed Jul 12, 2023
1 parent b322fdf commit 8675f57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion monai/transforms/spatial/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -3440,7 +3440,7 @@ def randomize(self, array):

def filter_count(self, image_np: NdarrayOrTensor, locations: np.ndarray) -> tuple[NdarrayOrTensor, np.ndarray]:
if self.sort_fn == GridPatchSort.RANDOM:
idx = self.R.permutation(tuple(range(image_np.shape[0]))))
idx = self.R.permutation(tuple(range(image_np.shape[0])))
idx = idx[: self.num_patches]
idx_np = convert_data_type(idx, np.ndarray)[0]
return image_np[idx], locations[idx_np]
Expand Down

0 comments on commit 8675f57

Please sign in to comment.