issue_comments: 273544152
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/1217#issuecomment-273544152 | https://api.github.com/repos/pydata/xarray/issues/1217 | 273544152 | MDEyOklzc3VlQ29tbWVudDI3MzU0NDE1Mg== | 10050469 | 2017-01-18T17:34:13Z | 2017-01-18T17:34:13Z | MEMBER |
I'll let @shoyer give a definitive answer here, but I don't think that ```python import xarray as xr import numpy as np d1 = xr.DataArray(np.arange(3), coords={'t1': np.linspace(0, 1, 3)}, dims='t1') d2 = xr.DataArray(np.arange(4), coords={'t2': np.linspace(0, 1, 4)}, dims='t2') d2 * d1 <xarray.DataArray (t2: 4, t1: 3)> array([[0, 0, 0], [0, 1, 2], [0, 2, 4], [0, 3, 6]]) Coordinates: * t2 (t2) float64 0.0 0.3333 0.6667 1.0 * t1 (t1) float64 0.0 0.5 1.0 d2.where(d1 == 1) <xarray.DataArray (t2: 4, t1: 3)> array([[ nan, 0., nan], [ nan, 1., nan], [ nan, 2., nan], [ nan, 3., nan]]) Coordinates: * t2 (t2) float64 0.0 0.3333 0.6667 1.0 * t1 (t1) float64 0.0 0.5 1.0 ``` which "makes sense", but is going to have a huge memory consumption if your arrays are large. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
201617371 |