两个数组:
a = numpy.array([[2,3,2],[5,6,1]])
b = numpy.array([3,5])
c = a * b
我想要的是:
c = [[6,9,6],
[25,30,5]]
但是,我收到了这个错误:
ValueError: operands could not be broadcast together with shapes (2,3) (2)
如何将nD 数组与 1D 数组相乘len(1D-array) == len(nD array)
,在哪里?