home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 435271342

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/2533#issuecomment-435271342 https://api.github.com/repos/pydata/xarray/issues/2533 435271342 MDEyOklzc3VlQ29tbWVudDQzNTI3MTM0Mg== 1217238 2018-11-02T04:57:31Z 2018-11-02T04:57:31Z MEMBER

@lilyminium thanks for looking into this! I think the specific problem here is due to our use of the shortcut _replace method in DataArray.__array_wrap__ (which is called by NumPy, e.g., inside np.insert): https://github.com/pydata/xarray/blob/6d55f99905d664ef73cb708cfe8c52c2c651e8dc/xarray/core/dataarray.py#L193

I think the clean way to fix this would be to add error checking to DataArray.__array_wrap__. But we currently use this method inside DataArray._unary_op (and maybe elsewhere?), which is called every time you do unwary math with an xarray object (e.g., -). We’ll want to update these uses to use a method that uses the same shortcut to avoid redundant metadata checks.

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