learnergy/math/scale.py
def unitary_scale(x):
    """Scales an array between 0 and 1.

    Args:
        x (array): A numpy array to be scaled.

    Returns:
        The scaled array.

    """

    # Makes sure the array is float typed
    x = x.astype('float32')

    # Gathers array minimum and subtract
    x -= x.min()

    # Normalizes the array using its maximum
    x *= 1.0 / (x.max() + c.EPSILON)

    return x
Scales an array between 0 and 1.

    Args:
        x (array): A numpy array to be scaled.

    Returns:
        The scaled array.

    
Scales an array between 0 and 1.
Scales an array between 0 and 1 .
def unitary_scale(x):
    x = x.astype('float32')
    x -= x.min()
    x *= 1.0 / (x.max() + c.EPSILON)
    return x
def unitary_scale ( x ) : x = x . astype ( 'float32' ) x -= x . min ( ) x *= 1.0 / ( x . max ( ) + c . EPSILON ) return x
Scales an array between 0 and 1.
Scales an array between 0 and 1 .
"""Scales an array between 0 and 1.

    Args:
        x (array): A numpy array to be scaled.

    Returns:
        The scaled array.

    """ # Makes sure the array is float typed # Gathers array minimum and subtract # Normalizes the array using its maximum
The scaled array.
The scaled array .
x
A numpy array to be scaled.
A numpy array to be scaled .