home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 470801183

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/2791#issuecomment-470801183 https://api.github.com/repos/pydata/xarray/issues/2791 470801183 MDEyOklzc3VlQ29tbWVudDQ3MDgwMTE4Mw== 6164157 2019-03-08T04:30:22Z 2019-03-08T04:30:22Z CONTRIBUTOR

I tend towards the former, to coerce singleton arrays to behave as scalars of their dytpe. I think it makes more sense in terms of use cases (at least everything that I needed). I don't mind implementing it if there is agreement as to which of the two to do.

These behaviors would definitely conflict for scalar objects -- in the second case, we would still want to include some indication that it's an xarray.DataArray. NumPy doesn't have a conflict because indexing an array results in a NumPy scalars, which prints like Python builtin scalars.

@shoyer I don't see why would that be the case. If I format something as '{:04d} {:3.5e} {:2.3E}'.format(dataarray) or whatnot, I would expect that the average user would expect to get '0043 4.35000e+02 2.450E+02' in return, without any indication that these are data arrays.

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