Thursday, October 16, 2025
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
32361 POSTS0 COMMENTS
Milvus
88 POSTS0 COMMENTS
Nango Kala
6728 POSTS0 COMMENTS
Nicole Veronica
11892 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11954 POSTS0 COMMENTS
Shaida Kate Naidoo
6852 POSTS0 COMMENTS
Ted Musemwa
7113 POSTS0 COMMENTS
Thapelo Manthata
6805 POSTS0 COMMENTS
Umr Jansen
6801 POSTS0 COMMENTS