home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 290760342

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-290760342 https://api.github.com/repos/pydata/xarray/issues/1346 290760342 MDEyOklzc3VlQ29tbWVudDI5MDc2MDM0Mg== 1217238 2017-03-31T16:24:04Z 2017-03-31T16:24:04Z MEMBER

Yes, this is probably related to the fact that .mean() in xarray uses bottleneck if available, and bottleneck has a slightly different mean implementation, quite possibly with a less numerically stable algorithm.

The fact that the dtype is float32 is a sign that this is probably a numerical precision issue. Try casting with .astype(np.float64) and see if the problem goes away.

If you really cared about performance using float32, the other thing to do to improve conditioning is to subtract and add a number close to the mean, e.g., (ds.var167 - 270).mean() + 270.

{
    "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 0.69ms · About: xarray-datasette