以下程序段中,______能够实现对数组x按列归一化。 import numpy as npx = np.array([[4., 30, 200], [1., 30, 100], [2., 40, 300], [5., 30, 400]])
选项:
A:for i in range(x.shape[0]): x[:,i] = (x[:,i]-x[:,i].min())/(x[:,i].max()-x[:,i].min());
B:for i in range(x.shape[1]): x[i] = (x[i]-x[i].min())/(x[i].max()-x[i].min());
C:(x-x.min(axis=1)) / (x.max(axis=1)-x.min(axis=1));
D:a=(x.max(axis=0)-x.min(axis=0))(x-x.min(axis=0)) / a
发布时间:2024-06-13 10:58:36