Back to Numerical Arrays (NumPy)
np.dtypeToDescr
Convert DType to NPY descriptor string.
Syntax
np.dtypeToDescr(dtype)
Description
Convert DType to NPY descriptor string. Format: <endian><type><size> - Endian: '<' (little), '>' (big), '|' (not applicable) - Type: 'b' (bool), 'i' (int), 'u' (uint), 'f' (float), 'c' (complex) - Size: bytes (1, 2, 4, 8, 16)
Parameters
| Name | Description |
|---|---|
| dtype | DType |
Returns
string