home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 750419141

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/4727#issuecomment-750419141 https://api.github.com/repos/pydata/xarray/issues/4727 750419141 MDEyOklzc3VlQ29tbWVudDc1MDQxOTE0MQ== 2272878 2020-12-23T18:23:20Z 2020-12-23T18:23:20Z CONTRIBUTOR

My concern with assert_identical is the name. It implies, to me, that there is no difference at all between the two objects. It was highly unexpected for me that it didn't do that. I think at the very least it should be clarified in the documentation that it doesn't do that.

If the default for assert_identical isn't change, I wonder whether a new function might be worthwhile. I am concerned having to append check_dtype=True for every test would hurt test clarity. And there is also the problem with

Also, just checking dtype won't be sufficient in all cases. Consider this:

```Python import numpy as np import xarray as xr

a = xr.DataArray(np.array(1.0, dtype=np.object))
b = xr.DataArray(np.array(1, dtype=np.object))

xr.testing.assert_identical(a, b)
```

I think for the purpose of testing being able to make sure the result is exactly what you expect is important.

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