bundles / numpy latest / numpy / lib / format / descr_to_dtype
function
numpy.lib.format:descr_to_dtype
source: build-install/usr/lib/python3.14/site-packages/numpy/lib/_format_impl.py :310
Signature
def descr_to_dtype ( descr ) Summary
Returns a dtype based off the given description.
Extended Summary
This is essentially the reverse of dtype_to_descr. It will remove the valueless padding fields created by, i.e. simple fields like dtype('float32'), and then convert the description to its corresponding dtype.
Parameters
descr: objectThe object retrieved by dtype.descr. Can be passed to numpy.dtype in order to replicate the input dtype.
Returns
dtype: dtypeThe dtype constructed by the description.
Aliases
-
numpy.lib._format_impl.descr_to_dtype