MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / randomize

Method randomize

monai/transforms/spatial/array.py:1520–1524  ·  view source on GitHub ↗
(self, data: NdarrayOrTensor)

Source from the content-addressed store, hash-verified

1518 self._lazy = val
1519
1520 def randomize(self, data: NdarrayOrTensor) -> None:
1521 super().randomize(None)
1522 if not self._do_transform:
1523 return None
1524 self._axis = self.R.randint(data.ndim - 1)
1525
1526 def __call__(self, img: torch.Tensor, randomize: bool = True, lazy: bool | None = None) -> torch.Tensor:
1527 """

Callers 1

__call__Method · 0.95

Calls 1

randomizeMethod · 0.45

Tested by

no test coverage detected