-
numpy.typename(char)
[source] -
Return a description for the given data type code.
Parameters: char : str
Data type code.
Returns: out : str
Description of the input data type code.
See also
dtype
,typecodes
Examples
123456789101112131415161718192021222324252627>>> typechars
=
[
'S1'
,
'?'
,
'B'
,
'D'
,
'G'
,
'F'
,
'I'
,
'H'
,
'L'
,
'O'
,
'Q'
,
...
'S'
,
'U'
,
'V'
,
'b'
,
'd'
,
'g'
,
'f'
,
'i'
,
'h'
,
'l'
,
'q'
]
>>>
for
typechar
in
typechars:
...
print
(typechar,
' : '
, np.typename(typechar))
...
S1 : character
? :
bool
B : unsigned char
D :
complex
double precision
G :
complex
long
double precision
F :
complex
single precision
I : unsigned integer
H : unsigned short
L : unsigned
long
integer
O :
object
Q : unsigned
long
long
integer
S : string
U :
unicode
V : void
b : signed char
d : double precision
g :
long
precision
f : single precision
i : integer
h : short
l :
long
integer
q :
long
long
integer
numpy.typename()

2025-01-10 15:47:30
Please login to continue.