from sklearn import preprocessing
data = [[ 1., -1., 2.],
[ 2., 0., 0.],
[ 0., 1., -1.]]
normalize(data)
# produces
array([[ 0.40824829, -0.40824829, 0.81649658],
[ 1. , 0. , 0. ],
[ 0. , 0.70710678, -0.70710678]])