def arr_normalize(arr, *args, **kwargs):
f_max = arr.max()<EOL>f_min = arr.min()<EOL>f_range = f_max - f_min<EOL>arr_shifted = arr + -f_min<EOL>arr_norm = arr_shifted / f_range<EOL>for key, value in kwargs.items():<EOL><INDENT>if key == '<STR_LIT>': arr_norm *= value<EOL><DEDENT>return arr_norm<EOL>
ARGS
    arr                      array to normalize

**kargs
    scale = <f_scale>        scale the normalized output by <f_scale>


DESC
    Given an input array, <arr>, normalize all values to range
    between 0 and 1.

    If specified in the **kwargs, optionally set the scale with <f_scale>.