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/328#issuecomment-94074862,https://api.github.com/repos/pydata/xarray/issues/328,94074862,MDEyOklzc3VlQ29tbWVudDk0MDc0ODYy,1217238,2015-04-17T21:03:12Z,2015-04-17T21:03:12Z,MEMBER,"Basic support for dask.array is merged on master. Continued in https://github.com/xray/xray/issues/394 ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,58310637 https://github.com/pydata/xarray/issues/328#issuecomment-87509188,https://api.github.com/repos/pydata/xarray/issues/328,87509188,MDEyOklzc3VlQ29tbWVudDg3NTA5MTg4,1217238,2015-03-30T01:39:02Z,2015-03-30T01:39:02Z,MEMBER,"@mrocklin It occurs to me now that a much simpler version of the functionality I'm looking for with `take_nd` would be `dask.array.insert` modeled after `np.insert`, which we could combine with array indexing. For the purposes of xray, we would only need support for insert with a scalar value, e.g., like `da.insert(x, [1, 5, 6], np.nan, axis=1)`. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,58310637 https://github.com/pydata/xarray/issues/328#issuecomment-75476521,https://api.github.com/repos/pydata/xarray/issues/328,75476521,MDEyOklzc3VlQ29tbWVudDc1NDc2NTIx,1217238,2015-02-23T00:56:51Z,2015-02-23T00:56:51Z,MEMBER,"Yes, take_nd is very similar to fancy indexing but only non-negative indices are valid (-1 means insert NaN). ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,58310637 https://github.com/pydata/xarray/issues/328#issuecomment-75475215,https://api.github.com/repos/pydata/xarray/issues/328,75475215,MDEyOklzc3VlQ29tbWVudDc1NDc1MjE1,1217238,2015-02-23T00:30:02Z,2015-02-23T00:31:00Z,MEMBER,"> support for interleaved concatenation (necessary for transformations by group, which are quite common) Turns out what I was thinking of here can be written as a one liner in terms of `concatenate` and `take`: ``` def interleaved_concatenate(arrays, indices, axis=0): return np.take(np.concatenate(arrays, axis), np.concatenate(indices)) ``` So I've crossed that one off the line. > support super-imposing array values inter-leaved on top of a constant array of NaN (necessary for many alignment operations) What I need here is something similar to the private `take_nd` functions that pandas defines that works like `np.take`, but that uses `-1` as a sentinel value for ""missing"": ``` In [1]: import pandas In [2]: import numpy as np In [3]: x = np.arange(5) In [4]: pandas.core.common.take_nd(x, [0, -1, 1, -1, 2]) Out[4]: array([ 0., nan, 1., nan, 2.]) ``` (In xray, I implement this a little differently so that I can take along all multiple axes simultaneously using array indexing, but this version would suffice.) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,58310637