代码示例:(标识:demo_python_numpy_datatype_error)
demo_python_numpy_datatype_error.py
import numpy as np

arr = np.array(['a', '2', '3'], dtype='i')
运行结果: