How can a list of vectors be elegantly normalized, in NumPy?
Here is an example that does not work:
from numpy import * vectors = array([arange
there is already a function in scikit learn:
import sklearn.preprocessing as preprocessing norm =preprocessing.normalize(m, norm='l2')*
More info at:
http://scikit-learn.org/stable/modules/preprocessing.html