Skip to content

Conversation

@mx-moth
Copy link
Contributor

@mx-moth mx-moth commented Apr 24, 2023

Support for timedelta64 variables and _FillValue / missing_value shenanigans.

@mx-moth mx-moth requested a review from frizwi April 24, 2023 04:25
@mx-moth mx-moth self-assigned this Apr 24, 2023
@mx-moth mx-moth force-pushed the timedelta-fill-value branch from 27d7d53 to 42ecdc2 Compare April 24, 2023 04:30
Depending on the variable type, the masked value will be one of:

* np.nan - for floats
* np.nan + j * np.nan - for complex numbers
* np.datetime64('nat') - for datetimes
* np.timedelta64('nat') - for timedeltas

The change makes emsarray use `xarray.core.dtypes.maybe_promote` to
determine the correct mask value, preventing similar future issues if
the fill value rules in xarray change.
@mx-moth mx-moth force-pushed the timedelta-fill-value branch from 42ecdc2 to ba6f6b6 Compare April 24, 2023 04:39
@mx-moth mx-moth merged commit 5fe4e6b into main Apr 24, 2023
@mx-moth mx-moth deleted the timedelta-fill-value branch June 27, 2023 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants