home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 484622545 and user = 1386642 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

  • nbren12 · 6 ✖

issue 1

  • interp and reindex should work for 1d -> nd indexing · 6 ✖

author_association 1

  • CONTRIBUTOR 6
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
524579537 https://github.com/pydata/xarray/issues/3252#issuecomment-524579537 https://api.github.com/repos/pydata/xarray/issues/3252 MDEyOklzc3VlQ29tbWVudDUyNDU3OTUzNw== nbren12 1386642 2019-08-24T20:54:02Z 2019-08-24T20:54:02Z CONTRIBUTOR

Ok. I realized this problem occurs only because x was a dimension of the new index idx and the original dataset. Perhaps sel should warn the user or raise an error when this happens.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interp and reindex should work for 1d -> nd indexing 484622545
524578659 https://github.com/pydata/xarray/issues/3252#issuecomment-524578659 https://api.github.com/repos/pydata/xarray/issues/3252 MDEyOklzc3VlQ29tbWVudDUyNDU3ODY1OQ== nbren12 1386642 2019-08-24T20:35:45Z 2019-08-24T20:36:30Z CONTRIBUTOR

Ok. I started playing around with this, but I am getting errors when indexing arrays with ND variables. data.sel(x=nd_x) works, but any subsequent operations complain that IndexVariable objects must be 1-dimensional: ```

import xarray as xr import numpy as np npdata = np.tile(np.arange(10), (5, 1)) ... data = xr.DataArray(npdata, dims=['y', 'x'], ... coords={'x': np.r_[:10], 'y': np.r_[:5]}) ... idx = xr.DataArray(npdata, dims=['z', 'x']) ... ... ans = data.sel(x=idx, method='bfill') ... assert set(ans.dims) == {'z', 'y', 'x'} ... print(ans) Traceback (most recent call last): File "<ipython-input-4-1d0ac0cac680>", line 8, in <module> print(ans) File "/Users/noah/workspace/software/xarray/xarray/core/common.py", line 129, in repr return formatting.array_repr(self) File "/Users/noah/workspace/software/xarray/xarray/core/formatting.py", line 463, in array_repr summary.append(repr(arr.coords)) File "/Users/noah/workspace/software/xarray/xarray/core/coordinates.py", line 78, in repr return formatting.coords_repr(self) File "/Users/noah/workspace/software/xarray/xarray/core/formatting.py", line 381, in coords_repr coords, title="Coordinates", summarizer=summarize_coord, col_width=col_width File "/Users/noah/workspace/software/xarray/xarray/core/formatting.py", line 361, in _mapping_repr summary += [summarizer(k, v, col_width) for k, v in mapping.items()] File "/Users/noah/workspace/software/xarray/xarray/core/formatting.py", line 361, in <listcomp> summary += [summarizer(k, v, col_width) for k, v in mapping.items()] File "/Users/noah/workspace/software/xarray/xarray/core/formatting.py", line 307, in summarize_coord coord = var.variable.to_index_variable() File "/Users/noah/workspace/software/xarray/xarray/core/variable.py", line 440, in to_index_variable self.dims, self._data, self._attrs, encoding=self._encoding, fastpath=True File "/Users/noah/workspace/software/xarray/xarray/core/variable.py", line 1943, in init raise ValueError("%s objects must be 1-dimensional" % type(self).name) ValueError: IndexVariable objects must be 1-dimensional ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interp and reindex should work for 1d -> nd indexing 484622545
524570552 https://github.com/pydata/xarray/issues/3252#issuecomment-524570552 https://api.github.com/repos/pydata/xarray/issues/3252 MDEyOklzc3VlQ29tbWVudDUyNDU3MDU1Mg== nbren12 1386642 2019-08-24T18:13:10Z 2019-08-24T18:13:10Z CONTRIBUTOR

So when would interp use this manual interpolation method? Would it try it only if scipy fails or check the dimensions?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interp and reindex should work for 1d -> nd indexing 484622545
524515190 https://github.com/pydata/xarray/issues/3252#issuecomment-524515190 https://api.github.com/repos/pydata/xarray/issues/3252 MDEyOklzc3VlQ29tbWVudDUyNDUxNTE5MA== nbren12 1386642 2019-08-24T03:40:32Z 2019-08-24T03:40:32Z CONTRIBUTOR

After reading the method='ffill' docs, I agree with you.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interp and reindex should work for 1d -> nd indexing 484622545
524448135 https://github.com/pydata/xarray/issues/3252#issuecomment-524448135 https://api.github.com/repos/pydata/xarray/issues/3252 MDEyOklzc3VlQ29tbWVudDUyNDQ0ODEzNQ== nbren12 1386642 2019-08-23T20:17:06Z 2019-08-23T20:17:06Z CONTRIBUTOR

In my experience, computing w efficiently is the tricky part. The function is slightly different, but metpy uses a lot of tricks to make this work efficiently. A manual for-loop is much cleaner for this kind of stencil calculation IMO. What kind of duck arrays were you thinking of?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interp and reindex should work for 1d -> nd indexing 484622545
524424788 https://github.com/pydata/xarray/issues/3252#issuecomment-524424788 https://api.github.com/repos/pydata/xarray/issues/3252 MDEyOklzc3VlQ29tbWVudDUyNDQyNDc4OA== nbren12 1386642 2019-08-23T18:53:26Z 2019-08-23T18:53:26Z CONTRIBUTOR

I have some numba code which does this for linear interpolation. Does scipy support this pattern?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interp and reindex should work for 1d -> nd indexing 484622545

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