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

Method _std

monai/transforms/intensity/array.py:882–886  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

880
881 @staticmethod
882 def _std(x):
883 if isinstance(x, np.ndarray):
884 return np.std(x)
885 x = torch.std(x.float(), unbiased=False)
886 return x.item() if x.numel() == 1 else x
887
888 def _normalize(self, img: NdarrayOrTensor, sub=None, div=None) -> NdarrayOrTensor:
889 img, *_ = convert_data_type(img, dtype=torch.float32)

Callers 1

_normalizeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected