(f)
| 747 | import functools |
| 748 | |
| 749 | def _copy_func(f): |
| 750 | # Based on http://stackoverflow.com/a/6528148/190597 (Glenn Maynard) |
| 751 | g = types.FunctionType(f.__code__, f.__globals__, name=f.__name__, |
| 752 | argdefs=f.__defaults__, closure=f.__closure__) |
| 753 | g = functools.update_wrapper(g, f) |
| 754 | g.__kwdefaults__ = f.__kwdefaults__ |
| 755 | return g |
| 756 | |
| 757 | trapezoid = _copy_func(np.trapz) |
| 758 |
no outgoing calls
no test coverage detected