home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where author_association = "CONTRIBUTOR" and issue = 1396401446 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • DanielGoman 7

issue 1

  • DOC: Added examples to docstrings of DataArray methods (#7123) · 7 ✖

author_association 1

  • CONTRIBUTOR · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1276785285 https://github.com/pydata/xarray/pull/7123#issuecomment-1276785285 https://api.github.com/repos/pydata/xarray/issues/7123 IC_kwDOAMm_X85MGjKF DanielGoman 22195223 2022-10-12T22:09:56Z 2022-10-12T22:09:56Z CONTRIBUTOR

RTD failure is real:

Well I just fixed the issue to that.

Correct me if I'm wrong, but before pushing my corrected version I pulled the latest version from the remote branch, which seems to contain changes that fail the CI.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: Added examples to docstrings of DataArray methods (#7123) 1396401446
1276590336 https://github.com/pydata/xarray/pull/7123#issuecomment-1276590336 https://api.github.com/repos/pydata/xarray/issues/7123 IC_kwDOAMm_X85MFzkA DanielGoman 22195223 2022-10-12T18:44:21Z 2022-10-12T18:44:21Z CONTRIBUTOR

cumsum will be a lot more work, see ongoing work in https://github.com/pydata/xarray/pull/7152 . Thanks for looking in to it.

I see, thanks for the heads up :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: Added examples to docstrings of DataArray methods (#7123) 1396401446
1272324257 https://github.com/pydata/xarray/pull/7123#issuecomment-1272324257 https://api.github.com/repos/pydata/xarray/issues/7123 IC_kwDOAMm_X85L1iCh DanielGoman 22195223 2022-10-08T13:46:26Z 2022-10-08T13:46:26Z CONTRIBUTOR

I'm running into an issue when trying to directly use the DataArray.reduce method.

At first I used DataArray.cumsum to see the expected behavior: ```

data = np.arange(12).reshape(4,3) da = xr.DataArray(data=data, dims=['x', 'y'], coords={'x': [10, 20, 30, 40], 'y': [70, 80, 90]}) da.cumsum(dim='x') <xarray.DataArray (x: 4, y: 3)> array([[ 0, 1, 2], [ 3, 5, 7], [ 9, 12, 15], [18, 22, 26]]) Coordinates: * x (x) int64 10 20 30 40 * y (y) int64 70 80 90 ```

When I'm trying to achieve the same result through DataArray.reduce I'm running into the following crash: ```

func = xr.DataArray.cumsum da.reduce(func=func, dim='x') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/mnt/c/Users/GoMaN/Desktop/GoMaN/Projects/xarray/xarray/core/dataarray.py", line 3442, in reduce var = self.variable.reduce(func, dim, axis, keep_attrs, keepdims, kwargs) File "/mnt/c/Users/GoMaN/Desktop/GoMaN/Projects/xarray/xarray/core/variable.py", line 1883, in reduce data = func(self.data, axis=axis, kwargs) File "/mnt/c/Users/GoMaN/Desktop/GoMaN/Projects/xarray/xarray/core/common.py", line 63, in wrapped_func return self.reduce( AttributeError: 'numpy.ndarray' object has no attribute 'reduce' ```

Am I using DataArray.reduce incorrectly?

Thanks in advance :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: Added examples to docstrings of DataArray methods (#7123) 1396401446
1272301209 https://github.com/pydata/xarray/pull/7123#issuecomment-1272301209 https://api.github.com/repos/pydata/xarray/issues/7123 IC_kwDOAMm_X85L1caZ DanielGoman 22195223 2022-10-08T11:50:04Z 2022-10-08T11:50:04Z CONTRIBUTOR

I'm trying to figure out how to add examples to DataArray.cumsum and DataArray.cumprod, but it's not so clear to me.

It seems like they have partially dynamic docstrings. I have found the following script in xarray/core/common.py: _cum_extra_args_docstring = dedent( """\ dim : str or sequence of str, optional Dimension over which to apply `{name}`. axis : int or sequence of int, optional Axis over which to apply `{name}`. Only one of the 'dim' and 'axis' arguments can be supplied.""" ) However, it is not clear to me where the rest of the docstring is located, nor where the docstrings of each function (cumsum, cumprod) are located.

I'd appreciate if anybody could direct me to the explanation of this design :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: Added examples to docstrings of DataArray methods (#7123) 1396401446
1268677375 https://github.com/pydata/xarray/pull/7123#issuecomment-1268677375 https://api.github.com/repos/pydata/xarray/issues/7123 IC_kwDOAMm_X85Lnnr_ DanielGoman 22195223 2022-10-05T16:43:15Z 2022-10-05T16:43:15Z CONTRIBUTOR

I noticed that DataArray.interp_like takes an argument called kwargs, but not in the traditional manner which allows passing keyworded arguments (**kwargs).

If this is the intended behavior then I think kwargs is kind of a misleading name for this argument.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: Added examples to docstrings of DataArray methods (#7123) 1396401446
1268557144 https://github.com/pydata/xarray/pull/7123#issuecomment-1268557144 https://api.github.com/repos/pydata/xarray/issues/7123 IC_kwDOAMm_X85LnKVY DanielGoman 22195223 2022-10-05T14:55:58Z 2022-10-05T14:55:58Z CONTRIBUTOR

I assume you are on windows? Same always happens to me.

Indeed I am.

Thank you very much, I just tried running the script in the same manner on WSL and that seems to give the expected output. Any ideas about how to avoid this issue on Windows?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: Added examples to docstrings of DataArray methods (#7123) 1396401446
1268355475 https://github.com/pydata/xarray/pull/7123#issuecomment-1268355475 https://api.github.com/repos/pydata/xarray/issues/7123 IC_kwDOAMm_X85LmZGT DanielGoman 22195223 2022-10-05T12:13:14Z 2022-10-05T12:13:14Z CONTRIBUTOR

Thanks for the advice @max-sixty!

I performed doctests on my machine inside a conda venv following the Contributing Guide using Python 3.9, and passed the them.

Yet, it doesn't pass the github tests. Any ideas as to why that might be?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: Added examples to docstrings of DataArray methods (#7123) 1396401446

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 478.411ms · About: xarray-datasette