home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 908406439

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/5733#issuecomment-908406439 https://api.github.com/repos/pydata/xarray/issues/5733 908406439 IC_kwDOAMm_X842JS6n 35968931 2021-08-30T14:48:23Z 2021-08-30T14:48:23Z MEMBER

I think we definitely need a flag, because we have two conflicting use cases: 1) Developers who use asserts in test suites and might well care about differences like python xr.testing.assert_allclose(ds1.data, ds2.data) # ok np.testing.assert_allclose(ds1.data.values, ds2.data.values) # fails 2) Users for whom xarray allows to forget about dimension order, and would expect transposed data to be equal.

The easiest way to cover both is to have an option to switch between them.

In my opinion the only question is what the default comparison behaviour should be. I like the idea of adding a check_dim_order kwarg to assert_equal, assert_allclose, and assert_identical, but have the flag default to False for the first two functions and True for the last one.

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