home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 126771341

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/504#issuecomment-126771341 https://api.github.com/repos/pydata/xarray/issues/504 126771341 MDEyOklzc3VlQ29tbWVudDEyNjc3MTM0MQ== 5356122 2015-07-31T17:57:01Z 2015-07-31T17:57:01Z MEMBER

Here's something related that one can do in Numpy- replace all negative entries with 0.

``` In [15]: a = np.arange(-5, 5).reshape(2, 5)

In [16]: a Out[16]: array([[-5, -4, -3, -2, -1], [ 0, 1, 2, 3, 4]])

In [17]: a[a < 0] = 0

In [18]: a Out[18]: array([[0, 0, 0, 0, 0], [0, 1, 2, 3, 4]]) ```

Would it be possible to modify __getitem__ for this common use case?

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