Open In App

numpy.dtype.kind() function – Python

Improve
Improve
Like Article
Like
Save
Share
Report

numpy.dtype.kind() function determine the character code by identifying the general kind of data.

Syntax : numpy.dtype.kind(type)

Parameters :
type : [dtype] The input data-type.
Return : Return the character code by identifying the general kind of data.

Code #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)


Output :

f

 
Code #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)


Output :

i

Last Updated : 18 Jun, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads