numpy.sctype2char(sctype)
[source]
Return the string representation of a scalar dtype.
Parameters: |
|
---|---|
Returns: |
|
Raises: |
|
See also
>>> for sctype in [np.int32, np.double, np.complex, np.string_, np.ndarray]: ... print(np.sctype2char(sctype)) l # may vary d D S O
>>> x = np.array([1., 2-1.j]) >>> np.sctype2char(x) 'D' >>> np.sctype2char(list) 'O'
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.sctype2char.html