def encoding_dtype(xarr):
    """Get dtype encoding info

    Parameters
    ----------
    xarr : xarray.DataArray or np.ndarray
        DataArray to consider

    Returns
    -------
    dict[str, np.dtype]
        Datatype information for encoding (e.g., ``{'dtype': np.float32}``)

    """
    return {'dtype': xarr.dtype}
