home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 495799492 and user = 23738400 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

  • OriolAbril · 3 ✖

issue 1

  • Linear algebra support · 3 ✖

author_association 1

  • CONTRIBUTOR 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
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
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

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