real_dtype

odl.core.util.dtype_utils.real_dtype(dtype: str | Number | xp.dtype, default=None, backend: ArrayBackend | None = None) str[source]

Returns the real counterpart of dtype if it exists Parameters ———- dtype :

Input dtype

default :

Object to be returned if no real counterpart is found for dtype, except for None, in which case an error is raised.

backend :

If given, the result dtype will be returned in its version specific to that backend (e.g. torch.float32), otherwise as a plain string.