return_as#

gwpy.utils.decorators.return_as(
returntype: Callable[[R], ReturnType],
) Callable[[Callable[P, R]], Callable[P, ReturnType]][source]#

Decorate a function to cast the return as the given type.

Parameters:
returntypetype

the desired return type of the decorated function