home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 538809911 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • mada0007 3
  • dcherian 1
  • mathause 1

author_association 2

  • NONE 3
  • MEMBER 2

issue 1

  • applying ufunc over lon and lat · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
566454958 https://github.com/pydata/xarray/issues/3632#issuecomment-566454958 https://api.github.com/repos/pydata/xarray/issues/3632 MDEyOklzc3VlQ29tbWVudDU2NjQ1NDk1OA== mathause 10194086 2019-12-17T09:19:50Z 2019-12-17T09:19:50Z MEMBER

Maybe the code here does something similar to what you want:

https://github.com/pydata/xarray/blob/f2b2f9f62ea0f1020262a7ff563bfe74258ffaa1/xarray/core/missing.py#L17

``` python import numpy as np import xarray as xr from xarray.core import missing as xrmissing

data = [0, -2, -2, -2, 0, -2, -2, 0] da = xr.DataArray(data, coords=dict(time=np.arange(8)), dims=["time"]) dlt = da < 0 xrmissing._get_nan_block_lengths(dlt.where(~ dlt), "time", dlt.time)

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  applying ufunc over lon and lat  538809911
566392514 https://github.com/pydata/xarray/issues/3632#issuecomment-566392514 https://api.github.com/repos/pydata/xarray/issues/3632 MDEyOklzc3VlQ29tbWVudDU2NjM5MjUxNA== mada0007 44284270 2019-12-17T05:51:07Z 2019-12-17T05:51:07Z NONE

I found the solution, apparent results is stored as a list event thought its just a single number and then the program interprets this as having more than one element which cant be store in output.

Solution was to convert results into numpy array in the original code and then it works.

The code is still not as fast as I would wish though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  applying ufunc over lon and lat  538809911
566374680 https://github.com/pydata/xarray/issues/3632#issuecomment-566374680 https://api.github.com/repos/pydata/xarray/issues/3632 MDEyOklzc3VlQ29tbWVudDU2NjM3NDY4MA== mada0007 44284270 2019-12-17T04:24:25Z 2019-12-17T04:24:25Z NONE

I just check the shape of the output is 180 x 360 and results is [0]

output.shape = (180, 360) result = [0]

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  applying ufunc over lon and lat  538809911
566372152 https://github.com/pydata/xarray/issues/3632#issuecomment-566372152 https://api.github.com/repos/pydata/xarray/issues/3632 MDEyOklzc3VlQ29tbWVudDU2NjM3MjE1Mg== mada0007 44284270 2019-12-17T04:11:54Z 2019-12-17T04:11:54Z NONE

hi dcherian, I have tried that without any success. I was how to really apply the unfunc on a function to work over time for a 3D gridded dataset?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  applying ufunc over lon and lat  538809911
566368337 https://github.com/pydata/xarray/issues/3632#issuecomment-566368337 https://api.github.com/repos/pydata/xarray/issues/3632 MDEyOklzc3VlQ29tbWVudDU2NjM2ODMzNw== dcherian 2448579 2019-12-17T03:51:06Z 2019-12-17T03:51:06Z MEMBER

I would use %debug and inspect what index and result look like. It's hard to debug without a minimal example.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  applying ufunc over lon and lat  538809911

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