home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 1217425815 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
  • max-sixty 2
  • milliams 1
  • headtr1ck 1

author_association 3

  • MEMBER 4
  • COLLABORATOR 1
  • NONE 1

issue 1

  • NumPy `__array_ufunc__` does not work with typing · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1146873595 https://github.com/pydata/xarray/issues/6524#issuecomment-1146873595 https://api.github.com/repos/pydata/xarray/issues/6524 IC_kwDOAMm_X85EW-b7 shoyer 1217238 2022-06-05T19:54:47Z 2022-06-05T19:54:47Z MEMBER

error: "ndarray[Any, dtype[Any]]" has no attribute "rename"

Yes, it's worth discussing. I don't know if there will be a satisfying resolution, though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  NumPy `__array_ufunc__` does not work with typing 1217425815
1146560227 https://github.com/pydata/xarray/issues/6524#issuecomment-1146560227 https://api.github.com/repos/pydata/xarray/issues/6524 IC_kwDOAMm_X85EVx7j headtr1ck 43316012 2022-06-04T07:42:47Z 2022-06-04T07:42:47Z COLLABORATOR

Should we open an issue on numpy for this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  NumPy `__array_ufunc__` does not work with typing 1217425815
1111813044 https://github.com/pydata/xarray/issues/6524#issuecomment-1111813044 https://api.github.com/repos/pydata/xarray/issues/6524 IC_kwDOAMm_X85CROu0 shoyer 1217238 2022-04-28T06:52:04Z 2022-04-28T06:52:04Z MEMBER

I think this would need to get updated on the NumPy side. Ideally NumPy ufuncs would be typed to check for __array_ufunc__. Something like: ```python from typing import Protocol, TypeVar

class HasArrayUFunc(Protocol): def array_ufunc(ufunc, method, inputs, *kwargs): pass

ArrayOrHasArrayUFunc = TypeVar("ArrayOrHasArrayUFunc", ndarray, HasArrayUFunc)

def exp(x: ArrayOrHasArrayUFunc) -> ArrayOrHasArrayUFunc: ... ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  NumPy `__array_ufunc__` does not work with typing 1217425815
1111671741 https://github.com/pydata/xarray/issues/6524#issuecomment-1111671741 https://api.github.com/repos/pydata/xarray/issues/6524 IC_kwDOAMm_X85CQsO9 max-sixty 5635139 2022-04-28T02:26:07Z 2022-04-28T02:26:07Z MEMBER

Thanks, I see the same thing re pandas. It makes me think it may be coming from xarray, since it's not just np.exp(series).rename("blah") which is raising.

But I'm not sure where it would be coming from. Our __array_ufunc__ isn't typed...!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  NumPy `__array_ufunc__` does not work with typing 1217425815
1111533074 https://github.com/pydata/xarray/issues/6524#issuecomment-1111533074 https://api.github.com/repos/pydata/xarray/issues/6524 IC_kwDOAMm_X85CQKYS milliams 61316 2022-04-27T22:14:16Z 2022-04-27T22:14:16Z NONE

I've checked Pandas, Dask and AstroPy and while they all implement __array_ufunc__ in some way, none of them have typing support yet. I imagine that you are leading the curve with the 3rd-party NumPy typing here so are more likely to be hitting these types of corner cases.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  NumPy `__array_ufunc__` does not work with typing 1217425815
1111436375 https://github.com/pydata/xarray/issues/6524#issuecomment-1111436375 https://api.github.com/repos/pydata/xarray/issues/6524 IC_kwDOAMm_X85CPyxX max-sixty 5635139 2022-04-27T20:12:35Z 2022-04-27T20:13:08Z MEMBER

Thanks for the issue @milliams .

My guess is that the "ndarray[Any, dtype[Any]]" type signature is from np.exp. Do you know whether we get the same result with another library's __array_ufunc__'s arrays, with that library's equivalent rename method?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  NumPy `__array_ufunc__` does not work with typing 1217425815

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 34.12ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows