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
转载请注明原文地址:https://tech.qufami.com/read-9657.html