{ } Raw JSON

bundles / numpy 2.4.4 / numpy / typename

function

numpy:typename

source: /numpy/lib/_type_check_impl.py :585

Signature

def   typename ( char )

Summary

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.

Examples

import numpy as np
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))

See also

dtype

Aliases

  • numpy.typename