将标量乘以一维数组numpy并在python 2.7中获得一维数组

时间:2018-10-09 17:02:29

标签: python arrays numpy typeerror scalar

x= np.linspace(0,1,n)
r2fun = np.zeros(n)
r2fun = -np.math.sin((np.math.pi*x)/end)

我收到此错误 TypeError:只能将size-1数组转换为Python标量

0 个答案:

没有答案
相关问题