Functor for the NORMLIN projector.
A, the image matrix, is defined by \(\forall i \in \{0,...,shape[0]-1\}\) the i-th row \(A_{i,*}\) is such that \(\| A_{i,*} \|_2 = s\).
>>> from numpy.random import rand, seed
>>> from numpy.linalg import norm
>>> import numpy as np
>>> M = np.round(
rand(5,5), decimals=2)
>>> M
array([[0.37, 0.95, 0.73, 0.6 , 0.16],
[0.16, 0.06, 0.87, 0.6 , 0.71],
[0.02, 0.97, 0.83, 0.21, 0.18],
[0.18, 0.3 , 0.52, 0.43, 0.29],
[0.61, 0.14, 0.29, 0.37, 0.46]])
>>> p = normlin(M.shape, .01)
>>> p(M)
array([[0.00264427, 0.00678935, 0.00521708, 0.00428801, 0.00114347],
[0.00124552, 0.00046707, 0.00677253, 0.00467071, 0.00552701],
[0.00015309, 0.00742494, 0.0063533 , 0.00160746, 0.00137782],
[0.00221263, 0.00368772, 0.00639205, 0.00528573, 0.0035648 ],
[0.00671873, 0.001542 , 0.00319415, 0.0040753 , 0.00506658]])