home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 511244685

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/3129#issuecomment-511244685 https://api.github.com/repos/pydata/xarray/issues/3129 511244685 MDEyOklzc3VlQ29tbWVudDUxMTI0NDY4NQ== 2380665 2019-07-14T23:38:14Z 2019-07-14T23:38:14Z CONTRIBUTOR

In https://github.com/DavidMertz/xarray/tree/feature/2885-broadcast_like-merge-branch I have created a temporary method .broadcast_like_naive() and have created a test against the naive implementation that is identical to the test against the refactored code.

We actually get the failure in the call to .broadcast_like() itself, i.e. not in the assertion about the result:

```python _______ TestDataArray.test_broadcast_like ________

self = <xarray.tests.test_dataarray.TestDataArray object at 0x7f2287e3a828>

def test_broadcast_like(self):
    arr1 = DataArray(np.ones((2, 3)), dims=['x', 'y'],
                     coords={'x': ['a', 'b'], 'y': ['a', 'b', 'c']})
    arr2 = DataArray(np.ones((3, 2)), dims=['x', 'y'],
                     coords={'x': ['a', 'b', 'c'], 'y': ['a', 'b']})
    orig1, orig2 = broadcast(arr1, arr2)
  new1 = arr2.broadcast_like(arr1)

xarray/tests/test_dataarray.py:1276: [...] E ValueError: conflicting sizes for dimension 'y': length 2 on the data but length 3 on coordinate 'y' ```

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