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

Function _create_scale

monai/transforms/utils.py:1042–1044  ·  view source on GitHub ↗
(spatial_dims: int, scaling_factor: Sequence[float] | float, array_func=np.diag)

Source from the content-addressed store, hash-verified

1040
1041
1042def _create_scale(spatial_dims: int, scaling_factor: Sequence[float] | float, array_func=np.diag) -> NdarrayOrTensor:
1043 scaling_factor = ensure_tuple_size(scaling_factor, dim=spatial_dims, pad_val=1.0)
1044 return array_func(scaling_factor[:spatial_dims] + (1.0,)) # type: ignore
1045
1046
1047def create_translate(

Callers 1

create_scaleFunction · 0.85

Calls 1

ensure_tuple_sizeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…