valid_dtype#

ivy.valid_dtype(dtype_in, /)[source]#

Determine whether the provided data type is supported by the current framework.

Parameters:

dtype_in (Optional[Union[Dtype, NativeDtype, str]]) – The data type for which to check for backend support

Return type:

bool

Returns:

ret – Boolean, whether or not the data-type string is supported.

Examples

>>> print(ivy.valid_dtype(None))
True
>>> print(ivy.valid_dtype(ivy.float64))
True
>>> print(ivy.valid_dtype('bool'))
True
>>> print(ivy.valid_dtype(ivy.native_float16))
True