home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 526955510

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/3238#issuecomment-526955510 https://api.github.com/repos/pydata/xarray/issues/3238 526955510 MDEyOklzc3VlQ29tbWVudDUyNjk1NTUxMA== 14808389 2019-09-01T21:47:42Z 2019-09-01T21:47:42Z MEMBER

@jthielen: I tried my tests (those that are currently written) with your PR to hgrecco/pint#764. From the ones I have been using, np.prod, np.all and np.any (and also __matmul__, but you seem to be working on that) are missing. The question is, how many of these should be supported? Also, there might be better ways to compare quantities, but if not: would it be possible to implement np.allclose? I have been using a workaround, but it seems pretty fragile to me. You may be aware of this, but np.minimum and np.maximum and probably others similar to these are working strangely, even with plain pint: if both arguments are quantities, equal units are required, but the result is not a quantity. It correctly fails if the second argument is not a quantity, but works silently if only the second argument is a quantity (still, the result is a plain array).

As I'm not too content with it: could someone have a look at the way they are written? If there are any serious problems, it might be easier to correct them now and I can keep them in mind for new tests.

Lastly, a status report: Assuming there are no bugs in my tests and using andrewgsavage/pint#6, there are some issues with np.argmax/np.argmin, np.median, np.sum (and probably np.prod, but that is currently hidden). Indexing (sel, isel and loc) seems to work except if a single value (e.g. 1 * ureg.m) / index is passed.

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