📌  相关文章
📜  numpy.dtype.kind()函数Python

📅  最后修改于: 2022-05-13 01:55:12.587000             🧑  作者: Mango

numpy.dtype.kind()函数Python

numpy.dtype.kind()函数通过识别一般数据类型来确定字符代码。

代码#1:

# Python program explaining
# numpy.dtype.kind() function
            
# importing numpy as geek 
import numpy as geek 
  
dtype = geek.dtype('f4')
  
gfg = dtype.kind
  
print (gfg)

输出 :

f


代码#2:

# Python program explaining
# numpy.dtype.kind() function
            
# importing numpy as geek 
import numpy as geek 
  
dtype = geek.dtype('i4')
  
gfg = dtype.kind
  
print (gfg)

输出 :

i