home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 956492667

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/5734#issuecomment-956492667 https://api.github.com/repos/pydata/xarray/issues/5734 956492667 IC_kwDOAMm_X845Aut7 14371165 2021-11-01T18:44:43Z 2021-11-01T18:44:43Z MEMBER

Maybe it's also on the pint side? Even if numpy_groupies supports the like argument it will crash because pint doesn't support asanyarray.

```python import numpy as np import pint import dask.array as da

pint crashes:

np.asanyarray([1, 2], like=pint.Quantity(1, "s")) Traceback (most recent call last):

File "<ipython-input-11-f8c20802ca08>", line 1, in <module> np.asanyarray([1, 2], like=pint.Quantity(1, "s"))

TypeError: no implementation found for 'numpy.asanyarray' on types that implement array_function: [<class 'pint.quantity.Quantity'>]

dask supports it:

np.asanyarray([1, 2], like=da.array(0)) Out[12]: dask.array<array, shape=(2,), dtype=int32, chunksize=(2,), chunktype=numpy.ndarray> ```

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