issues: 130504978
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
130504978 | MDU6SXNzdWUxMzA1MDQ5Nzg= | 738 | reindex_like with tolerance changes the type of returned DataArray | 11950875 | closed | 0 | 1 | 2016-02-01T22:30:36Z | 2016-02-04T23:12:37Z | 2016-02-04T23:12:37Z | CONTRIBUTOR | I am really excited about all of the new changes to xarray! reindexing with tolerance has great potential to clean up some sort of nasty stuff that I use a lot but have tucked away into a corner of my code. I am not sure I am 100% comfortable with it at the moment, however, because it seems to be changing the types of my data in unexpected ways. Bei: ``` test = xr.DataArray([1,2,3], coords=[[0.1, 0.2, 0.3]]) test_i = xr.DataArray([5,6,7,8], coords=[[0.21, 0.31, 0.41, 0.51]]) test.dtype test.reindex_like(test_i, method='pad', tolerance=0.2).dtype ``` the reindexed output has changed from int64 to float64! Even more concerning is the complex example: ``` test = xr.DataArray(np.array([1,2,3], dtype=np.complex), coords=[[0.1, 0.2, 0.3]]) test.dtype test.reindex_like(test_i, method='pad', tolerance=0.2).dtype ``` Conversion from complex to object? Oh no. Hope this isn't anything too big, let me know if I can help. Thank |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/738/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |