dtype_info_name

astropy.utils.data_info.dtype_info_name(dtype)[source]

Return a human-oriented string name of the dtype arg. This can be use by astropy methods that present type information about a data object.

The output is mostly equivalent to dtype.name which takes the form <type_name>[B] where <type_name> is like int or bool and [B] is an optional number of bits which gets included only for numeric types.

For bytes, string and unicode types, the output is shown below, where <N> is the number of characters. This representation corresponds to the Python type that matches the dtype:

Numpy          S<N>      U<N>
Python      bytes<N>   str<N>
Parameters
dtypestr, np.dtype, type

Input dtype as an object that can be converted via np.dtype()

Returns
dtype_info_namestr

String name of dtype