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

Function rescale_array_int_max

monai/transforms/utils.py:276–281  ·  view source on GitHub ↗

Rescale the array `arr` to be between the minimum and maximum values of the type `dtype`.

(arr: np.ndarray, dtype: DtypeLike = np.uint16)

Source from the content-addressed store, hash-verified

274
275
276def rescale_array_int_max(arr: np.ndarray, dtype: DtypeLike = np.uint16) -> np.ndarray:
277 """
278 Rescale the array `arr` to be between the minimum and maximum values of the type `dtype`.
279 """
280 info: np.iinfo = np.iinfo(dtype or arr.dtype)
281 return np.asarray(rescale_array(arr, info.min, info.max), dtype=dtype or arr.dtype)
282
283
284def copypaste_arrays(

Callers

nothing calls this directly

Calls 1

rescale_arrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…