home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 207283854 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • shoyer 2
  • RafalSkolasinski 2
  • stale[bot] 2
  • keewis 1

author_association 2

  • NONE 4
  • MEMBER 3

issue 1

  • variable length of a dimension in DataArray · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
751364613 https://github.com/pydata/xarray/issues/1265#issuecomment-751364613 https://api.github.com/repos/pydata/xarray/issues/1265 MDEyOklzc3VlQ29tbWVudDc1MTM2NDYxMw== keewis 14808389 2020-12-26T15:05:59Z 2020-12-26T15:05:59Z MEMBER

instead of the workarounds mentioned in https://github.com/pydata/xarray/issues/1265#issuecomment-279464724 this should work once the integration with awkward is implemented (see also #4285)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  variable length of a dimension in DataArray 207283854
751244884 https://github.com/pydata/xarray/issues/1265#issuecomment-751244884 https://api.github.com/repos/pydata/xarray/issues/1265 MDEyOklzc3VlQ29tbWVudDc1MTI0NDg4NA== stale[bot] 26384082 2020-12-25T12:49:53Z 2020-12-25T12:49:53Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  variable length of a dimension in DataArray 207283854
456683093 https://github.com/pydata/xarray/issues/1265#issuecomment-456683093 https://api.github.com/repos/pydata/xarray/issues/1265 MDEyOklzc3VlQ29tbWVudDQ1NjY4MzA5Mw== stale[bot] 26384082 2019-01-23T06:12:26Z 2019-01-23T06:12:26Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  variable length of a dimension in DataArray 207283854
280422799 https://github.com/pydata/xarray/issues/1265#issuecomment-280422799 https://api.github.com/repos/pydata/xarray/issues/1265 MDEyOklzc3VlQ29tbWVudDI4MDQyMjc5OQ== RafalSkolasinski 10928117 2017-02-16T18:51:30Z 2017-02-16T18:51:30Z NONE

Hi, I tried to came with a bit more interesting but still simple example

```python from itertools import product import numpy as np import pandas as pd

import holoviews as hv hv.notebook_extension()

def energies(L, a): k = np.pi * np.arange(1, L//a) / L return {'exact': k2, 'approx': 2*(1 - np.cos(k * a)) / a2}

L = np.arange(10, 21, 2) a = np.array([1, .5, .25])

data = [] for Li, ai in product(L, a): output = dict(L=Li, a=ai) output.update(**energies(Li, ai)) data.append(output)

df = pd.DataFrame(data)

hmap_data = {} for n, row in df.iterrows(): key = row.L, row.a val = (hv.Points((np.arange(len(row.exact)), row.exact), kdims=['n', 'E']) * hv.Points((np.arange(len(row.approx)), row.approx), kdims=['n', 'E'])) hmap_data[key] = val

hv.HoloMap(hmap_data, kdims=['L', 'a']).select(n=(0, 20), E=(0, 20)) ```

example is simple and don't include any serious simulation. I compare here energies of particle in 1D box vs what would came out from tight-binding simulation. Example is very simple but it captures situation that happens often when calculating spectrum of a finite system: for different system size we get different amount of energy levels.

That simple example is manageable without any pandas or xarray machinery but imagine real simulation made with kwant for series of different input parameters (system dimensions, gate voltages, chemical potentials, etc...)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  variable length of a dimension in DataArray 207283854
279516519 https://github.com/pydata/xarray/issues/1265#issuecomment-279516519 https://api.github.com/repos/pydata/xarray/issues/1265 MDEyOklzc3VlQ29tbWVudDI3OTUxNjUxOQ== shoyer 1217238 2017-02-13T20:45:14Z 2017-02-13T20:45:14Z MEMBER

I'm definitely happy to look at a more realistic / complete example. My PhD work was actually doing quantum simulations.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  variable length of a dimension in DataArray 207283854
279514589 https://github.com/pydata/xarray/issues/1265#issuecomment-279514589 https://api.github.com/repos/pydata/xarray/issues/1265 MDEyOklzc3VlQ29tbWVudDI3OTUxNDU4OQ== RafalSkolasinski 10928117 2017-02-13T20:37:48Z 2017-02-13T20:37:48Z NONE

I believe that this is a common problem in simulation of quantum mechanical problems. I will try to come with a bit more realistic / practical example that I hope will help with choosing the best solution.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  variable length of a dimension in DataArray 207283854
279464724 https://github.com/pydata/xarray/issues/1265#issuecomment-279464724 https://api.github.com/repos/pydata/xarray/issues/1265 MDEyOklzc3VlQ29tbWVudDI3OTQ2NDcyNA== shoyer 1217238 2017-02-13T17:40:02Z 2017-02-13T17:40:02Z MEMBER

Xarray adds labels to NumPy array, so it can't handle variable length arrays any better than NumPy.

Basically, your options are to either (a) store stored numpy arrays using dtype=object (not really recommended), (b) pad each array up to a common length with NaNs (used to mark missing values in xarray) or (c) put multiple variables in an xarray.Dataset and use different dimension names for the variable length dimension.

Depending on your exact use case, either (b) or (c) could be a good solution.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  variable length of a dimension in DataArray 207283854

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