Generally, a piecewise function can take values of any type as an input and return numbers of any type as an output. However, in its current implementation numpy.piecewise forces the output type to be ...