home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 300834776

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/1403#issuecomment-300834776 https://api.github.com/repos/pydata/xarray/issues/1403 300834776 MDEyOklzc3VlQ29tbWVudDMwMDgzNDc3Ng== 1217238 2017-05-11T15:56:32Z 2017-05-11T15:56:32Z MEMBER

The problem here is that your coordinates differ slightly on each file: In [14]: abs(advt.TLAT - tarea.TLAT).max() Out[14]: <xarray.DataArray 'TLAT' ()> array(4.547473508864641e-13)

This does come up with some frequency, but unfortunately, it's hard to know a priori whether differences in floating point values are meaningful or just due to loss of numerical precision.

One way to fix this would be to add a tolerance keyword argument of some sort to xarray.Variable.equals(), which we could allow setting via xarray.set_options() for arithmetic. Then you could write something like: with xarray.set_options(float_tolerance=1e-8): result = advt * tarea and still preserve coordinates.

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