pwtools
Normalize array by it’s max value. Works also for complex arrays.
Examples
>>> a=np.array([3+4j, 5+4j]) >>> a array([ 3.+4.j, 5.+4.j]) >>> a.max() (5.0+4.0j) >>> a/a.max() array([ 0.75609756+0.19512195j, 1.00000000+0.j ])