源代码
import numpy as np arr = np.array(['apple', 'banana', 'cherry']) print(arr.dtype)
运行结果