rai_toolbox.negate#

rai_toolbox.negate(func)[source]#

A wrapper that negates (applies the - operator) to the function’s output.

Parameters:
funcCallable[…, Negateable]

Examples

>>> from rai_toolbox import negate
>>> f = negate(lambda x: 2 * x)
>>> f(1)
-2