home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER" and issue = 140214928 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 2

  • shoyer 2
  • jhamman 2

issue 1

  • Adding cumsum / cumprod reduction operators · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
202510107 https://github.com/pydata/xarray/issues/791#issuecomment-202510107 https://api.github.com/repos/pydata/xarray/issues/791 MDEyOklzc3VlQ29tbWVudDIwMjUxMDEwNw== jhamman 2443309 2016-03-28T18:01:35Z 2016-03-28T18:01:35Z MEMBER

@pwolfram -

We all may have slightly different development workflows but mine goes something like this:

``` bash

checkout conda environment with xarray dependencies

source activate xarray_dev34

cd path_to_xarray

install xarray using setuptools develop option

python setup.py develop

make changes to source code

run test suite

py.test ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Adding cumsum / cumprod reduction operators 140214928
195616194 https://github.com/pydata/xarray/issues/791#issuecomment-195616194 https://api.github.com/repos/pydata/xarray/issues/791 MDEyOklzc3VlQ29tbWVudDE5NTYxNjE5NA== shoyer 1217238 2016-03-12T00:33:11Z 2016-03-12T00:33:11Z MEMBER

Why not make a PR to add nancumsum and nancumprod to NumPy as well? Then it's pretty clear that a back-port in npcompat.py is appropriate. That's actually how nanprod ended up in NumPy :).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Adding cumsum / cumprod reduction operators 140214928
195446904 https://github.com/pydata/xarray/issues/791#issuecomment-195446904 https://api.github.com/repos/pydata/xarray/issues/791 MDEyOklzc3VlQ29tbWVudDE5NTQ0NjkwNA== shoyer 1217238 2016-03-11T16:47:24Z 2016-03-11T16:47:24Z MEMBER

cumsum/cumprod will need a slightly different (simpler) interface than the other reduce methods, because unlike other aggregation functions they don't remove a dimension (the result has the same size as the input). Also, as you point out, NumPy doesn't have a nan-skipping version of these functions.

There was no particular reason why I didn't add these before -- we just never had a compelling enough need to get around to it. I don't think it would be particularly difficult.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Adding cumsum / cumprod reduction operators 140214928
195429158 https://github.com/pydata/xarray/issues/791#issuecomment-195429158 https://api.github.com/repos/pydata/xarray/issues/791 MDEyOklzc3VlQ29tbWVudDE5NTQyOTE1OA== jhamman 2443309 2016-03-11T16:04:15Z 2016-03-11T16:04:15Z MEMBER

I don't think this should be too difficult now that cumulative reductions are available in dask and numpy. I think you'll just have to add the cumsum and cumprod names to the list of NAN_REDUCE_METHODS. You may also need modify some of the logic in _create_nan_agg_method so it doesn't prepend a nan in-front of these two methods.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Adding cumsum / cumprod reduction operators 140214928

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 15.068ms · About: xarray-datasette