下面程序段的执行结果为_______。 import numpy as np t = np.arange(120).reshape(3,4,5,2) t0=np.sum(t,axis=1) print(t0.shape)
举一反三
- 如下代码的输出结果是( )import numpy as npa = np.arange(12).reshape(3, 4)print(np.sum(a[[0, 2], 2:]))
- 如下代码的输出结果是( )import numpy as npa = np.arange(12).reshape(3, 4)print(np.sum(a[1:, 2:]))
- 如下代码的输出是( )import numpy as npa = np.arange(6).reshape(3, 2)b = a.sum(axis=0)c = b.sum(axis=0)
- import numpy as np np.arange(0, 1, 0.1)的结果是?
- 下面程序段的执行结果为_______。 arr = np.arange(12).reshape(2,2,3) np.sum(arr, axis=0)