home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 276543337

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/60#issuecomment-276543337 https://api.github.com/repos/pydata/xarray/issues/60 276543337 MDEyOklzc3VlQ29tbWVudDI3NjU0MzMzNw== 1217238 2017-02-01T01:01:27Z 2017-02-01T01:01:27Z MEMBER

Would using obj.fillna(0) not mess with argmax if for instance all the data is negative? Could fill with the min value instead?

Indeed, fillna(0) won't work right. For what I was thinking of, we could use the three argument version of where (#576) here, e.g., obj.where(allna, 0). But fillna with the min value could also work -- that's actually exactly how np.nanargmax works.

Ah yes true. I was slightly anticipating e.g. filling with NaT if the dim was time-like, though time types are not something I am familiar with.

Yes, ideally we would detect the dtype and find an appropriate fill or minimum value, similar to _maybe_promote. The argument to fillna would either be a scalar (for a DataArray)` or a dict (for a Dataset).

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