首页
it技术
登录
6mi
u
盘
搜
搜 索
it技术
python的list的各个元素相乘
python的list的各个元素相乘
it
2023-02-21
70
仅作为操作记录,大佬请跳过。
想让10*[0,1,2,3],想得到[0,10,20,30]的结果,但发现不能直接相乘,需要用np.multiply
import
numpy
as
np
print
(
np
.
multiply
(
10
,
[
0
,
1
,
2
,
3
]
)
)
转载请注明原文地址: https://lol.8miu.com/read-2392.html
最新回复
(
0
)