issue_comments: 335849053
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/1625#issuecomment-335849053 | https://api.github.com/repos/pydata/xarray/issues/1625 | 335849053 | MDEyOklzc3VlQ29tbWVudDMzNTg0OTA1Mw== | 1217238 | 2017-10-11T15:26:36Z | 2017-10-11T15:26:36Z | MEMBER | This behavior is consistent with the default behavior on pandas, which always does an outer join for arithmetic:
I do agree that we should have support for an explicit fill value in alignment/reindexing and arithmetic. For consistency with pandas (and elsewhere in xarray), let's call it
I can see the logic in using an identity value instead of NaN as a default in arithmetic. One peril of this approach is that it isn't always evident what the right identity is. In fact, according to NumPy: ``` In [16]: import numpy as np In [17]: print(np.add.identity) 0 In [18]: print(np.multiply.identity) 1 In [19]: print(np.subtract.identity) None In [20]: print(np.divide.identity) None ``` Let me give a couple other examples of why I don't think we should use an identity of some sort as the default:
- Suppose we are comparing a model to observations. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
264517839 |