home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 318931493

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/pull/1496#issuecomment-318931493 https://api.github.com/repos/pydata/xarray/issues/1496 318931493 MDEyOklzc3VlQ29tbWVudDMxODkzMTQ5Mw== 6200806 2017-07-30T21:38:45Z 2017-07-30T21:38:45Z CONTRIBUTOR

How difficult would it be to include np.where's option to provide values for both where the condition is met and where it isn't? From their docstring:

If both x and y are specified, the output array contains elements of x where condition is True, and elements from y elsewhere.

From your example above (haven't gone through the code), what you have implemented in this PR is a special case, namely the xarray analog to np.where(a.x + a.y < 5, a, -1).

I recently had a usecase where this would be handy.

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