home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 490593787 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

  • zxdawn 4
  • shoyer 2
  • max-sixty 1
  • keewis 1

author_association 2

  • MEMBER 4
  • NONE 4

issue 1

  • Using min() with skipna=True · 8 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
529164506 https://github.com/pydata/xarray/issues/3290#issuecomment-529164506 https://api.github.com/repos/pydata/xarray/issues/3290 MDEyOklzc3VlQ29tbWVudDUyOTE2NDUwNg== zxdawn 30388627 2019-09-08T02:52:56Z 2019-09-08T02:52:56Z NONE

@shoyer Thanks. It's not datetime64 arrays, this is the result of np.isnat(t): File "/public/software/anaconda/anaconda3/envs/python36/lib/python3.6/site-packages/xarray-0.12.3-py3.6.egg/xarray/core/arithmetic.py", line 69, in __array_ufunc__ dask='allowed') File "/public/software/anaconda/anaconda3/envs/python36/lib/python3.6/site-packages/xarray-0.12.3-py3.6.egg/xarray/core/computation.py", line 969, in apply_ufunc keep_attrs=keep_attrs) File "/public/software/anaconda/anaconda3/envs/python36/lib/python3.6/site-packages/xarray-0.12.3-py3.6.egg/xarray/core/computation.py", line 217, in apply_dataarray_vfunc result_var = func(*data_vars) File "/public/software/anaconda/anaconda3/envs/python36/lib/python3.6/site-packages/xarray-0.12.3-py3.6.egg/xarray/core/computation.py", line 564, in apply_variable_ufunc result_data = func(*input_data) TypeError: ufunc 'isnat' is only defined for datetime and timedelta.

I use pd.isnull(t).all() to check it, it works. Actually it's all nan. There's something wrong with the nc file, I will contact the data center. Thank you for all your help :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using min() with skipna=True 490593787
529164037 https://github.com/pydata/xarray/issues/3290#issuecomment-529164037 https://api.github.com/repos/pydata/xarray/issues/3290 MDEyOklzc3VlQ29tbWVudDUyOTE2NDAzNw== shoyer 1217238 2019-09-08T02:41:58Z 2019-09-08T02:41:58Z MEMBER

For datetime64 arrays, use np.isnat() instead of isnan.

On Sat, Sep 7, 2019 at 7:39 PM Xin Zhang notifications@github.com wrote:

@keewis https://github.com/keewis I tried to using np.isnan(t.values).all() to check whether it's all nan. But, I got this error:

print (np.isnan(t.values).all())

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

This is the type of t.values: <class 'numpy.ndarray'>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/issues/3290?email_source=notifications&email_token=AAJJFVWLAIBI55TBPAXWLDLQIRQWHA5CNFSM4IUO4E7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FGMMY#issuecomment-529163827, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJJFVWBG7JHMQIYCYB3IJ3QIRQWHANCNFSM4IUO4E7A .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using min() with skipna=True 490593787
529163827 https://github.com/pydata/xarray/issues/3290#issuecomment-529163827 https://api.github.com/repos/pydata/xarray/issues/3290 MDEyOklzc3VlQ29tbWVudDUyOTE2MzgyNw== zxdawn 30388627 2019-09-08T02:39:30Z 2019-09-08T02:39:30Z NONE

@keewis I tried to using np.isnan(t.values).all() to check whether it's all nan. But, I got this error: print (np.isnan(t.values).all()) TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' This is the type of t.values: <class 'numpy.ndarray'>

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using min() with skipna=True 490593787
529163295 https://github.com/pydata/xarray/issues/3290#issuecomment-529163295 https://api.github.com/repos/pydata/xarray/issues/3290 MDEyOklzc3VlQ29tbWVudDUyOTE2MzI5NQ== keewis 14808389 2019-09-08T02:27:23Z 2019-09-08T02:27:23Z MEMBER

do you actually have any non-nan values in your array? From what I understand of how nanops work is that AlwaysGreaterThan should only be returned by min() if there are no non-nan values.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using min() with skipna=True 490593787
529163060 https://github.com/pydata/xarray/issues/3290#issuecomment-529163060 https://api.github.com/repos/pydata/xarray/issues/3290 MDEyOklzc3VlQ29tbWVudDUyOTE2MzA2MA== zxdawn 30388627 2019-09-08T02:22:01Z 2019-09-08T02:22:01Z NONE

@shoyer Thank. It works now. But, I get another question. This is the result of t = ds['time_utc']: <xarray.DataArray 'time_utc' (time: 1, scanline: 357, ground_pixel: 450)> array([[[nan, nan, ..., nan, nan], [nan, nan, ..., nan, nan], ..., [nan, nan, ..., nan, nan], [nan, nan, ..., nan, nan]]], dtype=object) Coordinates: * scanline (scanline) float64 1.0 2.0 3.0 4.0 ... 354.0 355.0 356.0 357.0 * ground_pixel (ground_pixel) float64 1.0 2.0 3.0 4.0 ... 448.0 449.0 450.0 * time (time) datetime64[ns] 2019-08-25 Attributes: long_name: Time of observation as ISO 8601 date-time string If I want to get the minimum value by t.min(skipna=True), I get the strange type: <xarray.DataArray 'time_utc' ()> array(<xarray.core.dtypes.AlwaysGreaterThan object at 0x7f96ac188550>, dtype=object) Can't convert it to string by str(t.min(skipna=True)).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using min() with skipna=True 490593787
529152703 https://github.com/pydata/xarray/issues/3290#issuecomment-529152703 https://api.github.com/repos/pydata/xarray/issues/3290 MDEyOklzc3VlQ29tbWVudDUyOTE1MjcwMw== shoyer 1217238 2019-09-07T22:43:48Z 2019-09-07T22:44:18Z MEMBER

I think this may have been fixed by https://github.com/pydata/xarray/pull/2924 (which removed the line with dtypes.fill_value(value.dtype) if valid_count == 0 else data)

Can you try upgrading to xarray 0.12.3?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using min() with skipna=True 490593787
529091168 https://github.com/pydata/xarray/issues/3290#issuecomment-529091168 https://api.github.com/repos/pydata/xarray/issues/3290 MDEyOklzc3VlQ29tbWVudDUyOTA5MTE2OA== zxdawn 30388627 2019-09-07T09:33:32Z 2019-09-07T09:33:32Z NONE

@max-sixty Actually, I'm using numpy = 1.13.1 and I need skipna= True. Don't understand the error it shows.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using min() with skipna=True 490593787
529083217 https://github.com/pydata/xarray/issues/3290#issuecomment-529083217 https://api.github.com/repos/pydata/xarray/issues/3290 MDEyOklzc3VlQ29tbWVudDUyOTA4MzIxNw== max-sixty 5635139 2019-09-07T07:40:32Z 2019-09-07T07:40:32Z MEMBER

Thanks for the issue @zxdawn . Did you try doing this?

NotImplementedError: min is not available with skipna=False with the installed version of numpy; upgrade to numpy 1.12

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using min() with skipna=True 490593787

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