home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 659232211

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
659232211 MDExOlB1bGxSZXF1ZXN0NDUxMTAzOTk5 4237 per-variable fill values 14808389 closed 0     13 2020-07-17T12:52:17Z 2020-08-24T22:14:27Z 2020-08-24T22:03:15Z MEMBER   0 pydata/xarray/pulls/4237

This allows specifying different fill values per variable, defaulting to dtypes.NA. There's no documentation updates, yet: I'll work on that once I'm sure I found every function for which this change makes sense.

Here's a demo on how this works: ```python In [3]: ds = xr.Dataset( ...: {"a": ("x", [2, 3]), "b": ("x", [-9, 4])}, ...: coords={"x": [0, 1], "u": ("x", ["a", "b"])}, ...: ) ...: ds Out[3]: <xarray.Dataset> Dimensions: (x: 2) Coordinates: * x (x) int64 0 1 u (x) <U1 'a' 'b' Data variables: a (x) int64 2 3 b (x) int64 -9 4 In [4]: ds.reindex(x=[-1, 0]) Out[4]: <xarray.Dataset> Dimensions: (x: 2) Coordinates: * x (x) int64 -1 0 u (x) object nan 'a' Data variables: a (x) float64 nan 2.0 b (x) float64 nan -9.0 In [5]: ds.reindex(x=[-1, 0], fill_value={"u": "z", "a": 10}) Out[5]: <xarray.Dataset> Dimensions: (x: 2) Coordinates: * x (x) int64 -1 0 u (x) <U1 'z' 'a' Data variables: a (x) int64 10 2 b (x) float64 nan -9.0 ``` </details>
  • [x] Closes #4165
  • [x] Tests added
  • [x] Passes isort . && black . && mypy . && flake8
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4237/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 13 rows from issue in issue_comments
Powered by Datasette · Queries took 76.185ms · About: xarray-datasette