make_sibling

xitorch.make_sibling(*pfuncs) → Callable[[Callable], xitorch._core.pure_function.PureFunction][source]

Used as a decor to mark the decorated function as a sibling method of the input pfunc. Sibling method is a method that is virtually belong to the same object, but behaves differently. Changing the state of the decorated function will also change the state of pfunc and its other siblings.