set_default_dtype#
- ivy.set_default_dtype(dtype, /)[source]#
Set the datatype dtype as default data type.
- Parameters:
dtype (
Union
[Dtype
,NativeDtype
,str
]) – the data_type to set as default data type
Examples
With
ivy.Dtype
input:>>> ivy.set_default_dtype(ivy.bool) >>> ivy.default_dtype_stack ['bool'] >>> ivy.unset_default_dtype()
>>> ivy.set_default_dtype("float64") >>> ivy.default_dtype_stack ['float64'] >>> ivy.unset_default_dtype()
With
ivy.NativeDtype
input:>>> ivy.set_default_dtype(ivy.native_uint64) >>> ivy.default_dtype_stack ['uint64']