Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
Support pick(data, [[0,1,2],[1,2,3]]) = [[data[0,0], data[0,1], data[0,2], [data[1,1], data[1,2], data[1,3]].
As a side note, add a "fill-value" mode to out-of-bound indices. This seems to be a logical replacement to the original "raise"-mode proposal, which is "not supported yet".
The new functions should also support axis parameter in backward compatible ways.
References
Multi-dimensional take is already implemented as take(data, [[0,3],[-1,-2]]) = [[data[0], data[3]], [data[-1], data[-2]].
Since pick is modeled as batch_take, the extension seems natural.
The expected result for a fill-value mode could be verified as
Description
pick(data, [[0,1,2],[1,2,3]]) = [[data[0,0], data[0,1], data[0,2], [data[1,1], data[1,2], data[1,3]]
.axis
parameter in backward compatible ways.References
take
is already implemented astake(data, [[0,3],[-1,-2]]) = [[data[0], data[3]], [data[-1], data[-2]]
.pick
is modeled asbatch_take
, the extension seems natural.