numpy.lib.format.descr_to_dtype
-
lib.format.descr_to_dtype(descr)
[source] -
Returns a dtype based off the given description.
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
-
-
descrobject
-
The object retreived by dtype.descr. Can be passed to
numpy.dtype()
in order to replicate the input dtype.
-
- Returns
-
-
dtypedtype
-
The dtype constructed by the description.
-
© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.21/reference/generated/numpy.lib.format.descr_to_dtype.html