📜  字符串数组到浮点数组python代码示例

📅  最后修改于: 2022-03-11 14:46:21.891000             🧑  作者: Mango

代码示例2
import numpy as np
x = np.array(['1.1', '2.2', '3.3'])
y = x.astype(np.float)
print(y) # Output : [1.1, 2.2, 3.3]