home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1170142019

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/6733#issuecomment-1170142019 https://api.github.com/repos/pydata/xarray/issues/6733 1170142019 IC_kwDOAMm_X85FvvND 2448579 2022-06-29T15:41:45Z 2022-06-29T15:41:45Z MEMBER

Where a cast is specified in encoding, could xarray not cast the data first to get that isolated copy and then set the fill on the cast array?

If you cast float to int you might lose information neeeded to accurately do the filling step.

the only possible gotcha here for users is that data stored in a netcdf file as integer type data but with a _FillValue is loaded as a float using np.NaN because there is no np.nan equivalent for integer types.

Yes. but your data originated as floating point so this is correct.

ncdump asserts that there has to be a missing data value, which is 65535 unless set otherwise, but xarray is using the presence of the _FillValue attribute to signal the presence of missing data.

You can specify missing_value and/or _FillValue attributes. So you could try that. Xarray does not follow the default "fill values" because it can be confusing; it is valid to store 65535 as u2 for example.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1286995366
Powered by Datasette · Queries took 0.813ms · About: xarray-datasette