Closed
Description
(Commented in #4792)
There, seems to be an issue with scalar domains and three or more conditions:
>>> np.piecewise(3, [True, False, False],[4,2,0])
ValueError: function list and condition list must be the same
Funny enough it works fine with two conditions (this is what has been tested):
>>> np.piecewise(3, [True, False],[4,2])
array(4)
The three conditions version works fine with select:
>>> np.select([True, False, False],[4,2,0])
array(4)
Tested on python 3.4 with numpy 1.9.0 and python 2.7.6 with numpy 1.8.2