issue_comments: 824503658
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/1887#issuecomment-824503658 | https://api.github.com/repos/pydata/xarray/issues/1887 | 824503658 | MDEyOklzc3VlQ29tbWVudDgyNDUwMzY1OA== | 5635139 | 2021-04-22T03:04:41Z | 2021-04-22T03:04:51Z | MEMBER | I'm still working through this. Using this to jot down my notes, no need to respond. One property that seems to be lacking is that if ```python In [171]: a Out[171]: array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]]) In [172]: mask Out[172]: array([ True, False, True]) In [173]: a[mask] Out[173]: array([[ 0, 1, 2, 3], [ 8, 9, 10, 11]]) ``` ...as expected, but now let's make a 2D mask... ```python In [174]: full_mask = np.broadcast_to(mask[:, np.newaxis], (3,4)) In [175]: full_mask Out[175]: array([[ True, True, True, True], [False, False, False, False], [ True, True, True, True]]) In [176]: a[full_mask] Out[176]: array([ 0, 1, 2, 3, 8, 9, 10, 11]) # flattened! ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
294241734 |