can_cast

odl.can_cast(array_namespace, from_dtype, to_dtype, casting='safe')

NumPy-like can_cast for Python Array API backends. Supports ‘safe’, ‘same_kind’, and ‘unsafe’ casting.