home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 1421180629 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

  • grahamfindlay 3

issue 1

  • Difficulties with selecting from numpy.datetime64[ns] dimensions · 3 ✖

author_association 1

  • NONE 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1289726681 https://github.com/pydata/xarray/issues/7207#issuecomment-1289726681 https://api.github.com/repos/pydata/xarray/issues/7207 IC_kwDOAMm_X85M36rZ grahamfindlay 4753005 2022-10-24T22:45:36Z 2022-10-24T22:45:36Z NONE

Figured it out. Somehow I got my hands on a piece of data where the timestamps are ever-so-slightly non-monotonic. 2 of the 50k data points are out of order. That makes this a duplicate of #5012 and pandas #42331. Closing this, since those are still open. I would never have figured out what the problem was from the error message 😢, but that's a pandas issue. Sorry for the confusion.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Difficulties with selecting from numpy.datetime64[ns] dimensions 1421180629
1289576610 https://github.com/pydata/xarray/issues/7207#issuecomment-1289576610 https://api.github.com/repos/pydata/xarray/issues/7207 IC_kwDOAMm_X85M3WCi grahamfindlay 4753005 2022-10-24T20:30:44Z 2022-10-24T20:30:44Z NONE

Okay, it gets even weirder. This does not work: ```

dat = np.arange(spgs.time.values.size).astype('float') foo = xr.DataArray(dat, dims=("time",), coords={"time": spgs.time.values}) print(foo)

<xarray.DataArray (time: 52549)> array([0.0000e+00, 1.0000e+00, 2.0000e+00, ..., 5.2546e+04, 5.2547e+04, 5.2548e+04]) Coordinates: * time (time) float64 6.438 9.714 12.99 ... 1.729e+05 1.729e+05 1.729e+05

foo.sel(time=slice(20, 30)) # KeyError This does: foo = xr.DataArray(dat, dims=("time",), coords={"time": dat}) print(foo)

<xarray.DataArray (time: 52549)> array([0.0000e+00, 1.0000e+00, 2.0000e+00, ..., 5.2546e+04, 5.2547e+04, 5.2548e+04]) Coordinates: * time (time) float64 0.0 1.0 2.0 3.0 ... 5.255e+04 5.255e+04 5.255e+04

foo.sel(time=slice(20, 30))

<xarray.DataArray (time: 11)> array([20., 21., 22., 23., 24., 25., 26., 27., 28., 29., 30.]) Coordinates: * time (time) float64 20.0 21.0 22.0 23.0 24.0 ... 27.0 28.0 29.0 30.0 ``` I am baffled.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Difficulties with selecting from numpy.datetime64[ns] dimensions 1421180629
1289560937 https://github.com/pydata/xarray/issues/7207#issuecomment-1289560937 https://api.github.com/repos/pydata/xarray/issues/7207 IC_kwDOAMm_X85M3SNp grahamfindlay 4753005 2022-10-24T20:17:32Z 2022-10-24T20:17:32Z NONE

Update: I was mistaken about the nature of the issue. I can load someone else's data with a datetime64[ns] dimension and select from it just fine. Meanwhile, I cannot select from my DataArray, even when I have replaced the datetime64[ns] dimension time with float64 values.

```

spgs = xr.open_dataarray("mydata.nc") print(spgs)

<xarray.DataArray (channel: 5, frequency: 2049, time: 52549)> [538364505 values with dtype=float32] Coordinates: * frequency (frequency) float32 0.0 0.1526 0.3052 ... 312.2 312.3 312.5 * time (time) float64 6.438 9.714 12.99 ... 1.729e+05 1.729e+05 * channel (channel) object 'lmws' 'spws' 'rips' 'spin' 'dgws' x (channel, time) float64 ... y (channel, time) float64 ... Attributes: units: uV fs: 625.0008026193788

spgs.sel(time=slice(20, 30)) KeyError: 20 ``` Error traceback

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Difficulties with selecting from numpy.datetime64[ns] dimensions 1421180629

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