home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 604186105

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/issues/3884#issuecomment-604186105 https://api.github.com/repos/pydata/xarray/issues/3884 604186105 MDEyOklzc3VlQ29tbWVudDYwNDE4NjEwNQ== 1217238 2020-03-26T02:07:27Z 2020-03-26T02:07:27Z MEMBER

The main concern here is type stability. Normally the return value of argmax is an integer dtype array, but NaN isn't a valid integer :(

My suggestion would be to add an optional fill_value argument, similar to the API under discussion for idxmax in https://github.com/pydata/xarray/pull/3871. If fill_value is specified (e.g., with fill_value=np.nan or fill_value=-1) then missing values are returned with the fill value instead of raising an error.

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