第一种方法引用已有库:
1
2
3
4
from sklearn.preprocessing import scale # 归一化
a = np.array([[0, 3452, 6],
[2, 4564, 1]])
print(scale(a))from sklearn.preprocessing import scale # 归一化
a = np.array([[0, 3452, 6],
[2, 4564, 1]])
print(scale(a))
第二种手动处理:
1
2
3
4
5
6
a = np.array(...