Sunday, January 18, 2026
HomeLanguagesPython | numpy.issubdtype() function

Python | numpy.issubdtype() function

numpy.issubdtype() function is used to determine whether the first argument is a typecode lower/equal in type hierarchy from second argument.If the first argument is lower or equal it returns true, otherwise it returns false.

Syntax : numpy.issubdtype(arg1, arg2)

Parameters :
arg1, arg2 : [dtype_like] dtype or string representing a typecode.

Return : [bool] Boolean result.

Code #1 :




# Python program explaining
# numpy.issubdtype() function
  
# importing numpy
import numpy as geek
  
# selecting the argument
  
arg1 = geek.int64
arg2 = geek.int32
  
# output boolean value
out_val = geek.issubdtype(arg1, arg2)
print ("Is the first argument lower: ", out_val) 


Output :

Is the first argument lower:  False

 

Code #2 :




# Python program explaining
# numpy.issubdtype() function
  
# importing numpy
import numpy as geek
  
# selecting the argument
  
arg1 ='S2'
arg2 = geek.string_
  
# output boolean value
out_val = geek.issubdtype(arg1, arg2)
print ("Is the first argument lower: ", out_val) 


Output :

Is the first argument lower:  True
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32474 POSTS0 COMMENTS
Milvus
118 POSTS0 COMMENTS
Nango Kala
6846 POSTS0 COMMENTS
Nicole Veronica
11977 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12063 POSTS0 COMMENTS
Shaida Kate Naidoo
6985 POSTS0 COMMENTS
Ted Musemwa
7219 POSTS0 COMMENTS
Thapelo Manthata
6933 POSTS0 COMMENTS
Umr Jansen
6911 POSTS0 COMMENTS