issues: 98274024
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
98274024 | MDExOlB1bGxSZXF1ZXN0NDEyODY3ODI= | 504 | ENH: where method for masking xray objects according to some criteria | 1217238 | closed | 0 | 12 | 2015-07-30T21:56:00Z | 2015-08-01T20:56:33Z | 2015-08-01T20:56:31Z | MEMBER | 0 | pydata/xarray/pulls/504 | Fixes #503 Example usage: ``` In [13]: x = xray.DataArray(np.arange(9).reshape(3, 3), dims=['x', 'y']) In [14]: x.where(x > 4) Out[14]: <xray.DataArray (x: 3, y: 3)> array([[ nan, nan, nan], [ nan, nan, 5.], [ 6., 7., 8.]]) Coordinates: * y (y) int64 0 1 2 * x (x) int64 0 1 2 ``` Example from "What's new": ``` In [4]: ds = xray.Dataset(coords={'x': range(100), 'y': range(100)}) In [5]: ds['distance'] = np.sqrt(ds.x ** 2 + ds.y ** 2) In [6]: ds.distance.where(ds.distance < 100).plot() Out[6]: <matplotlib.image.AxesImage at 0x11a819690> ``` |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/504/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | pull |