对于以下python代码表述错误的一项是?
import numpy as np
a = np.array(1, 2, 3],4, 5, 6],7, 8, 9]])
print('a:\n',a)
print('np.cumsum(a):\n',np.cumsum(a))
print('np.cumsum(a,axis=0):\n',np.cumsum(a,axis=0))
print('np.cumsum(a,axis=1):\n',np.cumsum(a,axis=1))
选项:
A:axis=1按照列求累计和
B:axis=0按照行求累计和
C:如未提供axis,则默认按照axis=1进行计算
D:函数功能是返回数组a沿axis轴的累积和
发布时间:2024-06-13 10:58:36