Choose

Added choose function to copy numpy.choose function.
Check the last example in this page:

http://docs.scipy.org/doc/numpy/reference/generated/numpy.choose.html

The algo isn't what you did. You also need to update make_node() as the output don't always have the same number of dim as a.