Open In App
Related Articles

numpy.dtype.base() function – Python

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report
numpy.dtype.base() function returns dtype for the base element of the subarrays, regardless of their dimension or shape.
Syntax : numpy.dtype.base() Return : Returns data type of the base element.
Code #1 :
# Python program explaining
# numpy.dtype.base() function
         
# importing numpy as geek 
import numpy as geek 
     
x = geek.dtype('i2')
   
gfg = x.base
   
print (gfg)

                    
Output :
int16
  Code #2 :
# Python program explaining
# numpy.dtype.base() function
         
# importing numpy as geek 
import numpy as geek 
     
x = geek.dtype('8f')
   
gfg = x.base
   
print (gfg)

                    
Output :
float32

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