Rescale each array slice along the first dimension of `arr` independently.
(
arr: np.ndarray, minv: float | None = 0.0, maxv: float | None = 1.0, dtype: DtypeLike = np.float32
)
| 261 | |
| 262 | |
| 263 | def rescale_instance_array( |
| 264 | arr: np.ndarray, minv: float | None = 0.0, maxv: float | None = 1.0, dtype: DtypeLike = np.float32 |
| 265 | ) -> np.ndarray: |
| 266 | """ |
| 267 | Rescale each array slice along the first dimension of `arr` independently. |
| 268 | """ |
| 269 | out: np.ndarray = np.zeros(arr.shape, dtype or arr.dtype) |
| 270 | for i in range(arr.shape[0]): |
| 271 | out[i] = rescale_array(arr[i], minv, maxv, dtype) |
| 272 | |
| 273 | return out |
| 274 | |
| 275 | |
| 276 | def rescale_array_int_max(arr: np.ndarray, dtype: DtypeLike = np.uint16) -> np.ndarray: |
nothing calls this directly
no test coverage detected
searching dependent graphs…