home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where issue = 495799492 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 6

  • OriolAbril 3
  • dcherian 2
  • shoyer 1
  • max-sixty 1
  • crusaderky 1
  • weipeng1999 1

author_association 3

  • MEMBER 5
  • CONTRIBUTOR 3
  • NONE 1

issue 1

  • Linear algebra support · 9 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1101533629 https://github.com/pydata/xarray/issues/3322#issuecomment-1101533629 https://api.github.com/repos/pydata/xarray/issues/3322 IC_kwDOAMm_X85BqBG9 dcherian 2448579 2022-04-18T16:14:03Z 2022-04-18T16:14:03Z MEMBER

Closing in favour of xarray-einstats

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Linear algebra support 495799492
1019753466 https://github.com/pydata/xarray/issues/3322#issuecomment-1019753466 https://api.github.com/repos/pydata/xarray/issues/3322 IC_kwDOAMm_X848yDP6 OriolAbril 23738400 2022-01-24T06:10:27Z 2022-01-24T06:10:44Z CONTRIBUTOR

I have created a library for easier linear algebra (plus others) with xarray: https://xarray-einstats.readthedocs.io/en/latest/.

It currently has: * wrappers for many numpy.linalg functions * wrappers for scipy.stats distributions plus a few functions * wrappers for einops functions * a numba.guvectorize-decorated version of numpy.histogram for dataarrays

I have mostly added wrappers for things I personally use, also trying to not overlap with xr-scipy nor xarray-extras, so it might not make much sense as a group, but the modules are completely independent between them and could be reorganized into independent packages or merged into existing ones.

Feedback very welcome!

{
    "total_count": 2,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Linear algebra support 495799492
822464839 https://github.com/pydata/xarray/issues/3322#issuecomment-822464839 https://api.github.com/repos/pydata/xarray/issues/3322 MDEyOklzc3VlQ29tbWVudDgyMjQ2NDgzOQ== OriolAbril 23738400 2021-04-19T13:25:49Z 2021-04-19T13:25:49Z CONTRIBUTOR

Great, thanks for the offer :smile: I think I'll start with a minimal repo back at ArviZ and see how much of that can be used more generally. I probably should have named the example above arviz_dot instead. I definitely want to be able to do arviz_dot(a, b) and have it work automatically because in most ArviZ cases we do have all the information we need for this to be possible. We'll therefore definitely need a higher ArviZ layer, but I think an xarray-linalg would be a great base on which to build and we can keep both in different files/modules so it can be split easily.

I also commented here as I thought it was the most related issue, many of the functions I have in mind are related to linalg, but we'll probably have some other functions too.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Linear algebra support 495799492
822124811 https://github.com/pydata/xarray/issues/3322#issuecomment-822124811 https://api.github.com/repos/pydata/xarray/issues/3322 MDEyOklzc3VlQ29tbWVudDgyMjEyNDgxMQ== dcherian 2448579 2021-04-19T02:28:41Z 2021-04-19T02:28:41Z MEMBER

"xarray linalg library"?

Thanks @OriolAbril . This sounds like a nice xarray-contrib repo if it's general enough. Note that we do have xarray.dot https://xarray.pydata.org/en/stable/generated/xarray.dot.html

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Linear algebra support 495799492
821744766 https://github.com/pydata/xarray/issues/3322#issuecomment-821744766 https://api.github.com/repos/pydata/xarray/issues/3322 MDEyOklzc3VlQ29tbWVudDgyMTc0NDc2Ng== OriolAbril 23738400 2021-04-17T01:30:34Z 2021-04-17T01:36:41Z CONTRIBUTOR

Would there be any interest in an "xarray linalg library"? Some kind of library of that sort would be really useful to ArviZ and our users, I'll probably write some very basic functions myself on a minimal library or add them to ArviZ directly, but if there are other people interested we can try to find synergies and get something more general.

In our case, 99% of the time we want to "batch" over the chain and draw dimensions. So things as simple as:

def xarray_dot(a, b, dim=None): if dim is None: a_dims = set(a.dims) b_dims = set(b.dims) dim_set = a_dims.intersection(b_dims) - {"chain", "draw"} if len(dim_set) == 1: dim = dim_set.pop() else: ValueError if not isinstance(dim, str): raise ValueError return xr.apply_ufunc( np.einsum, "...i,...i", a, b, input_core_dims=[[], [dim], [dim]] )

are already extremely useful.

Being able to invert, cholesky... without using apply_ufunc would be convenient, even more so if we define some conventions. i.e. I generally use dim and dim bis for covariance matrices so they have shape chain, draw, ..., dim, dim bis, so I can invert those independently of their number and order of dimensions without even needing to say which are the "matrix" dimensions.

In our case, being able to ds.transpose("dim1", "dim2") and have it ignore chain, draw would also be convenient, which is probably a very ArviZ specific situation, but maybe there are other libraries/people that commonly have some batch dimensions, even if they use different names for them or if the user chooses those names freely.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Linear algebra support 495799492
533765137 https://github.com/pydata/xarray/issues/3322#issuecomment-533765137 https://api.github.com/repos/pydata/xarray/issues/3322 MDEyOklzc3VlQ29tbWVudDUzMzc2NTEzNw== shoyer 1217238 2019-09-21T03:59:26Z 2019-09-21T03:59:33Z MEMBER

I think the way to write something like an LU decomposition would be to use xarray's apply_ufunc, which in theory could wrap scipy.linalg.lu_factor in one line.

I don't know if this could/should live in xarray proper. We tend to have pretty high standards, which slows development.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Linear algebra support 495799492
533563714 https://github.com/pydata/xarray/issues/3322#issuecomment-533563714 https://api.github.com/repos/pydata/xarray/issues/3322 MDEyOklzc3VlQ29tbWVudDUzMzU2MzcxNA== weipeng1999 38346144 2019-09-20T13:54:40Z 2019-09-20T14:02:46Z NONE

Hi @weipeng1999 , could you link the reference implementation in numpy/scipy?

I think this would be niche-ish. I would personally try to keep xarray free of functionality that only a tiny fraction of the users actually use - particularly when such functionality can be implemented with a trivial wrapper by the users themselves. e.g. at the moment we have exactly one scipy function being wrapped, and that's linear interpolation which is useful to a lot of people.

I think this falls into a more general discussion on how niche a function must be in order to be excluded from the library - @shoyer what's your opinion?

Regardless, I would like to point you to https://xarray-extras.readthedocs.io which is a module that I created exactly for this kind of cases (PRs are welcome).

I realize that I am a totally green finger here are my trial implement I think I have long way to make it commitable

qr.txt

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Linear algebra support 495799492
533248639 https://github.com/pydata/xarray/issues/3322#issuecomment-533248639 https://api.github.com/repos/pydata/xarray/issues/3322 MDEyOklzc3VlQ29tbWVudDUzMzI0ODYzOQ== max-sixty 5635139 2019-09-19T18:16:04Z 2019-09-19T18:16:04Z MEMBER

Somewhat related: https://github.com/pydata/xarray/pull/2766

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Linear algebra support 495799492
533228830 https://github.com/pydata/xarray/issues/3322#issuecomment-533228830 https://api.github.com/repos/pydata/xarray/issues/3322 MDEyOklzc3VlQ29tbWVudDUzMzIyODgzMA== crusaderky 6213168 2019-09-19T17:23:10Z 2019-09-19T17:23:10Z MEMBER

Hi @weipeng1999 , could you link the reference implementation in numpy/scipy?

I think this would be niche-ish. I would personally try to keep xarray free of functionality that only a tiny fraction of the users actually use - particularly when such functionality can be implemented with a trivial wrapper by the users themselves. e.g. at the moment we have exactly one scipy function being wrapped, and that's linear interpolation which is useful to a lot of people.

I think this falls into a more general discussion on how niche a function must be in order to be excluded from the library - @shoyer what's your opinion?

Regardless, I would like to point you to https://xarray-extras.readthedocs.io which is a module that I created exactly for this kind of cases (PRs are welcome).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Linear algebra support 495799492

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