issues: 813246980
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
813246980 | MDExOlB1bGxSZXF1ZXN0NTc3NDI1Njcy | 4941 | Use definition of DTypeLike from Numpy if found | 548266 | closed | 0 | 5 | 2021-02-22T08:06:40Z | 2021-02-23T19:31:14Z | 2021-02-23T19:20:55Z | CONTRIBUTOR | 0 | pydata/xarray/pulls/4941 | This allows application of numpy ufuncs to DataArrays to typecheck correctly with Numpy 1.20 E.g. without this fix: ``` import xarray as xr import numpy as np def applyufunctodataarray() -> xr.DataArray: a = xr.DataArray(np.array([-1,2,3])) b = np.abs(a) return b ``` will result in:
I have not yet documented this or added tests. Please let me know if this change is acceptable and I am happy to do that.
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4941/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0 } |
13221727 | pull |