issue_comments: 604430213
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/3287#issuecomment-604430213 | https://api.github.com/repos/pydata/xarray/issues/3287 | 604430213 | MDEyOklzc3VlQ29tbWVudDYwNDQzMDIxMw== | 6200806 | 2020-03-26T13:26:59Z | 2020-03-26T13:26:59Z | CONTRIBUTOR | Thanks @max-sixty. Contrary to my warning about not doing a PR, I couldn't help myself and dug in a bit. It turns out that string coordinates aren't the problem, it's when the coordinate isn't in sorted order. For example, @chrisroat's original example doesn't error if the coordinate is ```python def test_stack_groupby_unsorted_coord(): data = [[0, 1], [2, 3]] data_flat = [0, 1, 2, 3] dims = ["y", "x"] y_vals = [2, 3]
test_stack_groupby_str_coords()
AssertionError Traceback (most recent call last) [...] AssertionError: Left and right DataArray objects are not equal Differing values: L array([2, 3, 0, 1]) R array([0, 1, 2, 3]) Differing coordinates: L * z (z) MultiIndex - z_leve...(z) int64 2 2 3 3 - z_leve...(z) int64 0 1 0 1 R * z (z) MultiIndex - y (z) int64 3 3 2 2 - x (z) int64 0 1 0 1 ``` I'll return to this tomorrow, in the meantime if this triggers any thoughts about the best path forward, that would be much appreciated! |
{
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
490476815 |