home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 666610284

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/4290#issuecomment-666610284 https://api.github.com/repos/pydata/xarray/issues/4290 666610284 MDEyOklzc3VlQ29tbWVudDY2NjYxMDI4NA== 5635139 2020-07-30T19:10:27Z 2020-07-30T19:10:27Z MEMBER

We mirror numpy for DataArray and, per @keewis , Mapping for Dataset. I think we should have a fairly high bar for deviating from those.

For those who think bool(xr.Dataset(dict(x=False))) should evaluate to False, what do you think dict(x=False) should evaluate to?

IIUC, this is somewhat of an edge case — it's only possible to coerce DataArray to bool when there's exactly one element. (Not that we shouldn't resolve)

This question seems to me to be conceptually similar to the question I described in #3315: "Should we treat a named DataArray and a single-variable Dataset as if they are the same?"

👍

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