rescale

rescale.rescale.rescale(input_array: ndarray) ndarray

Rescales an array from 0 to 1.

Takes an array as input, and returns a corresponding array scaled so that 0 corresponds to the minimum and 1 to the maximum value of the input array.

Parameters:

input_array (numpy.ndarray) – The input array to be rescaled.

Returns:

The rescaled array.

Return type:

numpy.ndarray

rescale.rescale.rescale_integer(input_value: int, scaling: int) float

Scales an integer, assuming input is integers.

Parameters:
  • input_value (int) – The input integer to be scaled.

  • scaling (int) – The scaling factor.

Returns:

The scaled value.

Return type:

float