YDOOK:Python numpy dtype 获取 数据类型

tech2023-02-13  91

Python numpy dtype 获取 数据类型

import numpy as np dt = np.dtype(np.int32) print(dt) print(np.int32) dt = np.dtype(np.int64) print(dt) print(np.int64) dt = np.dtype(np.float) print(dt) print(np.float)

结果

int32 <class 'numpy.int32'> int64 <class 'numpy.int64'> float64 <class 'float'> Process finished with exit code 0
最新回复(0)