home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1206194852

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/6876#issuecomment-1206194852 https://api.github.com/repos/pydata/xarray/issues/6876 1206194852 IC_kwDOAMm_X85H5RKk 14808389 2022-08-05T08:37:28Z 2022-08-05T08:38:54Z MEMBER

I'm not sure about this, but I think the reason is that we're using bottleneck to speed up the computation, which returns a python float object for scalars. To be able to wrap it, xarray will convert it to a 0d array, which by default has a dtype of float64.

np.{min,max} returns np.float32 instances, so the dtype information is not lost with that.

To work around that, you can disable bottleneck: python xr.set_options(use_bottleneck=False)

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