issues: 575080574
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
575080574 | MDU6SXNzdWU1NzUwODA1NzQ= | 3825 | Accept lambda in methods with one obvious xarray argument | 5635139 | closed | 0 | 3 | 2020-03-04T01:52:46Z | 2020-03-20T17:14:20Z | 2020-03-20T17:14:20Z | MEMBER | Branching from https://github.com/pydata/xarray/issues/3770 Here's the proposal: allow lambdas on methods where the primary argument is a single xarray object, and interpret lambas as though they'd be supplied in a ```python In [1]: import xarray as xr In [2]: import numpy as np In [3]: da = xr.DataArray(np.random.rand(2,3)) In [4]: da.where(da > 0.5) this should be equivalent (currently not valid)In [5]: da.where(lambda x: x > 0.5) the longer version (currently works)In [5]: da.pipe(lambda x: x.where(x > 0.5)) ``` Others I miss from pandas: |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3825/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |