📌  相关文章
📜  numpy.dtype.base()函数Python

📅  最后修改于: 2022-05-13 01:55:36.878000             🧑  作者: Mango

numpy.dtype.base()函数Python

numpy.dtype.base()函数返回子数组的基本元素的 dtype,无论它们的尺寸或形状如何。

代码#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)

输出 :

int16


代码#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)

输出 :

float32