home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 264582338 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 5

  • equaeghe 2
  • shoyer 1
  • aldanor 1
  • lamorton 1
  • stale[bot] 1

author_association 2

  • NONE 5
  • MEMBER 1

issue 1

  • Structured numpy arrays, xarray and netCDF(4) · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1112231763 https://github.com/pydata/xarray/issues/1626#issuecomment-1112231763 https://api.github.com/repos/pydata/xarray/issues/1626 IC_kwDOAMm_X85CS09T equaeghe 601177 2022-04-28T13:51:17Z 2022-04-28T13:51:17Z NONE

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

Still relevant.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Structured numpy arrays, xarray and netCDF(4) 264582338
1111579003 https://github.com/pydata/xarray/issues/1626#issuecomment-1111579003 https://api.github.com/repos/pydata/xarray/issues/1626 IC_kwDOAMm_X85CQVl7 stale[bot] 26384082 2022-04-27T23:37:45Z 2022-04-27T23:37:45Z 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
}
  Structured numpy arrays, xarray and netCDF(4) 264582338
687267764 https://github.com/pydata/xarray/issues/1626#issuecomment-687267764 https://api.github.com/repos/pydata/xarray/issues/1626 MDEyOklzc3VlQ29tbWVudDY4NzI2Nzc2NA== aldanor 2418513 2020-09-04T16:55:48Z 2020-09-04T16:55:48Z NONE

This is an ancient issue, but still - wondering if anyone here managed to hack together some workarounds?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Structured numpy arrays, xarray and netCDF(4) 264582338
427195935 https://github.com/pydata/xarray/issues/1626#issuecomment-427195935 https://api.github.com/repos/pydata/xarray/issues/1626 MDEyOklzc3VlQ29tbWVudDQyNzE5NTkzNQ== lamorton 23484003 2018-10-04T22:59:19Z 2018-10-08T15:10:54Z NONE

I just got bit with this as well. I was basically using tuples of indices as coordinates in order to implement a multidimensional sparse array .

My workaround is to use plain dimension index_dim to index the points in the N-dimensional space that I actually populate, and to have several coordinates (say X,Y) that all have index_dim as their only dimension. It's easy enough to see what the coordinates are once you select a value along index_dim, but I have to go outside xarray to locate a populated point based on it's X,Y-coordinates, because I can't slice along those arrays as (A) they aren't aliased to a dimension (B) they have non-unique values.

I've come up with an ugly method for selecting by tuples of X,Y-coordinates:

pairs = zip(x_wanted,y_wanted)

pair2index = {(dataset.x[i].item(), dataset.y[i].item()):i for i in dataset.index_dim.data}

try:

     found_indices = [pair2index[p] for p in pairs]

     found = dataset.isel(index_dim=found_indices)

except KeyError:

     print "Coordinate {} not found in dataset.".format(p)

     raise
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Structured numpy arrays, xarray and netCDF(4) 264582338
363129063 https://github.com/pydata/xarray/issues/1626#issuecomment-363129063 https://api.github.com/repos/pydata/xarray/issues/1626 MDEyOklzc3VlQ29tbWVudDM2MzEyOTA2Mw== equaeghe 601177 2018-02-05T15:59:50Z 2018-02-05T22:01:35Z NONE

I'd also like to see better support for compound types, writing them for starters. I'll collect some information here:

  • In the code @tfurf linked to (_nc4_values_and_dtype), an elif needs to be added to catch structured dtypes. I think they have kind == 'V'.

  • dtype.builtin can be used to detect whether we are indeed dealing with a structured type. Namely dtype.builtin must be 0.

  • The structured type must fist be added to the netCDF4.Dataset using its method createCompoundType. This must be done recursively, with the deepest levels first.

  • The netCDF variable is created in prepare_variable, which calls _nc4_values_and_dtype. There, via self.ds we also have access to the netCDF4 Dataset to be used for the creation of the as mentioned above. However, is self.ds really the Dataset, or some NetCDF4.Group? In any case _nc4_values_and_dtype and its use in prepare_variable needs to be refactored, because we need access to the underlying netCDF4 Dataset.

Is there anything I've missed? Can someone shed light on whether self.ds in prepare_variable can be assumed to the underlying netCDF4 Dataset?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Structured numpy arrays, xarray and netCDF(4) 264582338
335842588 https://github.com/pydata/xarray/issues/1626#issuecomment-335842588 https://api.github.com/repos/pydata/xarray/issues/1626 MDEyOklzc3VlQ29tbWVudDMzNTg0MjU4OA== shoyer 1217238 2017-10-11T15:07:28Z 2017-10-11T15:07:28Z MEMBER

It is a little challenging to make structured arrays work with all of xarray's computational tools. For example, we don't have a good way to handle missing values.

Also, in my experience, non-structured arrays are a nicer to work with in most cases, and a tool like xarray makes it pretty easy to unpack non-structured arrays into multiple arrays in a Dataset, possibly with different dimensions.

That said, we've added some work arounds in the past to ensure that structured arrays work in xarray, and I would be happy to accept contributions to write them to netCDF files. I'm sure there are others who would also find this useful.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Structured numpy arrays, xarray and netCDF(4) 264582338

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