你可以使用下面的代码
将numpy导入为np
>>> x1 = np.arange(2,9,2) # [2,4,6,8] >>> x2 = np.arange(1,6,2) # [1,3,5] >>> result = x1.dot(x2) >>> print result