home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 464016154

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/1346#issuecomment-464016154 https://api.github.com/repos/pydata/xarray/issues/1346 464016154 MDEyOklzc3VlQ29tbWVudDQ2NDAxNjE1NA== 691772 2019-02-15T11:41:36Z 2019-02-15T11:41:36Z CONTRIBUTOR

Oh hm, I think I didn't really understand what happens in bottleneck.nanmean(). I understand that integers can overflow and that float32 have varying absolute precision. The max float32 3.4E+38 is not hit here. So how can the mean of a list of ones be 0.5?

Isn't this what bottleneck is doing? Summing up a bunch of float32 values and then dividing by the length?

```

d = np.ones(2**25, dtype=np.float32) d.sum()/np.float32(len(d)) 1.0 ```

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