revert_netcdf_compatible

revert_netcdf_compatible#

eoio.utils.read_utils.revert_netcdf_compatible(attr: Any) → Any[source]#

Reverts a NetCDF-compatible attribute back to its original type if possible.

Deprecated since version Use: eoio.serialisation.decode_attrs() instead. This function infers the original type from the encoded value, so it converts any numeric-looking string to a number and any JSON-parseable string to a dict or list, whether or not that was the original type.

Parameters:

attr – The attribute to revert.

Returns:

The reverted version of the attribute.