NumPy Data type: sctype2char() function
numpy.sctype2char() function
The sctype2char() function is used to get the string representation of a scalar dtype.
Version: 1.15.0
Syntax:
numpy.sctype2char(sctype)
Parameter:
Name | Description | Required / Optional |
---|---|---|
sctype : scalar dtype or object | If a scalar dtype, the corresponding string character is returned. If an object, sctype2char tries to infer its scalar type and then return the corresponding string character. | Required |
Return value:
typechar : str - The string character corresponding to the scalar type.
Raises:
ValueError - If sctype is an object for which the type can not be inferred.
Example: numpy.sctype2char() function
Example: numpy.sctype2char() function
Python Code Editor:
Previous:
Miscellaneous typename()
Next:
mintypecode()