W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
python_numpy_array_astype_1.py:
import numpy as np arr = np.array([1.1, 2.1, 3.1]) newarr = arr.astype('i') print(newarr) print(newarr.dtype)