def inner_prod(x, y):
return reduce(operator.add, map(operator.mul, x, y))
极简代码(二)—— 内积
最新推荐文章于 2023-01-10 11:25:33 发布
def inner_prod(x, y):
return reduce(operator.add, map(operator.mul, x, y))