piecewise#

astropy.utils.masked.function_helpers.piecewise(x, condlist, funclist, *args, **kw)[source]#

Evaluate a piecewise-defined function.

Like numpy.piecewise but for masked input array x. Any masks in condlist are ignored.