ivy.default_dtype(*, dtype=None, item=None, as_native=False)[source]#
  • dtype (Optional[Union[Dtype, str]]) – The dtype to be returned. (default: None)

  • item (Optional[Union[Array, NativeArray]]) – Number or array for inferring the dtype. (default: None)

  • as_native (bool) – Whether to return the dtype as native dtype. (default: False)

Return type:

Union[Dtype, NativeDtype, str]


  • Return dtype as native or ivy dtype if provided, else

  • if item is given, return its dtype, otherwise return the

  • global default dtype.