Python | numpy.issctype() function

numpy.issctype() function is used to determine whether the given object represents a scalar data-type.If the given object represents a scalar data-type it returns true, otherwise it returns false.

Syntax : numpy.issctype(rep)

Parameters :
rep : any input.



Return : [bool] Boolean result of check whether rep is a scalar dtype.

Code #1 :

filter_none

edit
close

play_arrow

link
brightness_4
code

# Python program explaining
# numpy.issctype() function
  
# importing numpy
import numpy as geek
  
# Checking if integers are scalar type
  
rep = geek.int64
  
# output boolean value
out_val = geek.issctype(rep)
print ("Are integers scalar: ", out_val) 

chevron_right


Output :

Are integers scalar:  True

 

Code #2 :

filter_none

edit
close

play_arrow

link
brightness_4
code

# Python program explaining
# numpy.issctype() function
  
# importing numpy
import numpy as geek
  
# Checking if list is scalar type
  
rep =[ 1, 4, 7]
  
# output boolean value
out_val = geek.issctype(rep)
print ("Is list scalar: ", out_val) 

chevron_right


Output :

Is list scalar:  False


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.