Is it possible to use ndarray.choose (or some other ndarray mechanism) with a lookup table of multidimensional arrays such that each element of the input array produces multiple elements in the output array? E.g.
input = array([[0, 1],
[2, 3]])
subs = array([[[ 0, 1],
[ 2, 3]],
[[ 4, 5],
[ 6, 7]],
[[ 8, 9],
[10, 11]],
[[12, 13],
[14, 15]]])
output = array([[ 0, 1, 4, 5],
[ 2, 3, 6, 7],
[ 8, 9, 12, 13],
[10, 11, 14, 15]])