执行下列程序后,可能出现的结果是 _______。 a = np.arange(9).reshape(3,3) np.random.shuffle(a) print(a)
举一反三
- 执行下列程序后,可能出现的结果是_______。a=np.arange(9).reshape(3,3)np.random.shuffle(a)print(a) A: [[3,4,5],[0,1,2],[6,7,8]] B: [[7,8,9],[1,2,3],[4,5,6]] C: [[1,0,2],[4,3,5],[7,6,8]] D: [[1,3,2],[4,6,5],[7,9,8]]
- b=np.arange(9).reshape(3,3)print(b)程序运行的结果是?
- 如下代码的输出结果是( )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 np t = np.arange(120).reshape(3,4,5,2) t0=np.sum(t,axis=1) print(t0.shape)