📜  numpy.sctype2char()函数– Python

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

numpy.sctype2char()函数– Python

numpy.sctype2char()函数返回标量 dtype 的字符串表示形式。

代码#1:

# Python program explaining
# numpy.sctype2char() function
            
# importing numpy as geek 
import numpy as geek 
  
x = geek.array([1., 2-1.j])
  
gfg = geek.sctype2char(x)
  
print (gfg)

输出 :

D


代码#2:

# Python program explaining
# numpy.sctype2char() function
            
# importing numpy as geek 
import numpy as geek 
  
gfg = geek.sctype2char(list)
  
print (gfg)

输出 :

0