issues: 354923742
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
354923742 | MDU6SXNzdWUzNTQ5MjM3NDI= | 2388 | Test equality of DataArrays up to transposition | 35968931 | closed | 0 | 2 | 2018-08-28T22:13:01Z | 2018-10-08T12:25:46Z | 2018-10-08T12:25:46Z | MEMBER | While writing some unit tests to check I had wrapped A simple example to demonstrate what I mean: ```python Create two functionally-equivalent dataarraysdata = np.random.randn(4, 3) da1 = xr.DataArray(data, dims=('x', 'y')) da2 = xr.DataArray(data.T, dims=('y', 'x')) This test will failxarray.tests.assert_equal(da1, da2)
It would make certain types of unit tests simpler and clearer to have a function like
I would have thought that a test that does this would just transpose one into the shape of the other before comparison? |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2388/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |