home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 399593224

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/2217#issuecomment-399593224 https://api.github.com/repos/pydata/xarray/issues/2217 399593224 MDEyOklzc3VlQ29tbWVudDM5OTU5MzIyNA== 1217238 2018-06-22T21:56:17Z 2018-06-22T21:56:17Z MEMBER

@WeatherGod One problem with your definition of tolerance is that it isn't commutative, even if both indexes have the same tolerance: python a = ImpreciseIndex([0.1, 0.2, 0.3, 0.4]) a.tolerance = 0.1 b = ImpreciseIndex([0.301, 0.401, 0.501, 0.601]) b.tolerance = 0.1 print(a.union(b)) # ImpreciseIndex([0.1, 0.2, 0.3, 0.4, 0.501, 0.601], dtype='float64') print(b.union(a)) # ImpreciseIndex([0.1, 0.2, 0.301, 0.401, 0.501, 0.601], dtype='float64')

If you try a little harder, you could even have cases where the result has a different size, e.g., python a = ImpreciseIndex([1, 2, 3]) a.tolerance = 0.5 b = ImpreciseIndex([1, 1.9, 2.1, 3]) b.tolerance = 0.5 print(a.union(b)) # ImpreciseIndex([1.0, 2.0, 3.0], dtype='float64') print(b.union(a)) # ImpreciseIndex([1.0, 1.9, 2.1, 3.0], dtype='float64')

Maybe these aren't really problems in practice, but it's at least a little strange/surprising.

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