Friday, September 5, 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
32269 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6638 POSTS0 COMMENTS
Nicole Veronica
11802 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11866 POSTS0 COMMENTS
Shaida Kate Naidoo
6752 POSTS0 COMMENTS
Ted Musemwa
7027 POSTS0 COMMENTS
Thapelo Manthata
6704 POSTS0 COMMENTS
Umr Jansen
6721 POSTS0 COMMENTS