revert_and_convert_attrs

revert_and_convert_attrs#

eoio.utils.read_utils.revert_and_convert_attrs(ds: Dataset) → Dataset[source]#

Converts attributes in an xarray Dataset back to their original types if possible.

Deprecated since version Use: eoio.serialisation.decode_attrs() instead, which prefers the encoding marker written by eoio’s own writers and falls back to a deliberately narrow best-effort decode for files written by anything else.

Parameters:

ds – The xarray Dataset to revert attributes in.

Returns:

Dataset with attributes reverted to their original types where possible.