有如下语句:import numpy as npA=np.arange(12) .reshape(3,4)则A[:,1]的值是__1__注意答案不要有空格
举一反三
- 有如下语句:import numpy as npA=np.arange(12) .reshape(3,4)则A[1]的值是[0,1,2,3]
- 如下代码的输出结果是( )import numpy as npa = np.arange(12).reshape(3, 4)print(np.sum(a[1:, 2:]))
- 如下代码的输出结果是( )import numpy as npa = np.arange(12).reshape(3, 4)print(np.sum(a[[0, 2], 2:]))
- 有如下语句:import numpy as npA=np.arange(12)可生成数组[1,2,3,4,5,6,7,8,9,10,11,12]
- 中国大学MOOC: 哪个是下面代码的运行结果?import numpy as npa = np.arange(12).reshape((3,4))print(a.mean())