glmdenoise.utils.normalisemax module¶
-
glmdenoise.utils.normalisemax.normalisemax(m, dim=None)[source]¶ Divide array by the max value along some dimension
f = normalisemax(m,dim)
<m> is a matrix <dim> (optional) is the dimension of <m> to operate upon. default to 2 if <m> is a row vector and to 1 otherwise. special case is 0 which means operate globally.
divide <m> by the max value along some dimension (or globally).
example: (normalisemax([[1, 2, 3]])==[[1/3, 2/3, 1]]).all()