home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 568610773

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/3643#issuecomment-568610773 https://api.github.com/repos/pydata/xarray/issues/3643 568610773 MDEyOklzc3VlQ29tbWVudDU2ODYxMDc3Mw== 14808389 2019-12-24T00:08:34Z 2019-12-24T00:08:34Z MEMBER

While trying to get the tests to pass, I encountered a few issues: * the implementation of __array_ufunc__: https://github.com/pydata/xarray/blob/3cbc459caa010f9b5042d3fa312b66c9b2b6c403/xarray/core/arithmetic.py#L37-L39 checks if it handles all types. However, the way it is implemented will cause it to return NotImplemented for duck arrays, even if it would be fine to treat them the same as ndarray. Adding and not hasattr(x, "__array_function__") will make my tests pass, but I thought I'd ask first. * I've been testing if the aggregation functions work, both as method and as function. This works fine for mean but not for median: calling np.median(da) returns a numpy scalar instead of the data array wrapping a 0d array returned by da.median(). I can't seem to find the reason why this happens, mostly because I don't know where to look.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  539988974
Powered by Datasette · Queries took 0.642ms · About: xarray-datasette