From 78f7414642a59596d358e536dbb484b6e0f09305 Mon Sep 17 00:00:00 2001 From: Nicolo Fusi Date: Tue, 12 Mar 2013 16:46:35 +0000 Subject: [PATCH] decorator documentation --- GPy/util/decorators.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GPy/util/decorators.py b/GPy/util/decorators.py index 2cdf78f1..c8aa08a2 100644 --- a/GPy/util/decorators.py +++ b/GPy/util/decorators.py @@ -2,6 +2,11 @@ import numpy as np from functools import wraps def silence_errors(f): + """ + This wraps a function and it silences numpy errors that + happen during the execution. After the function has exited, it restores + the previous state of the warnings. + """ @wraps(f) def wrapper(*args, **kwds): status = np.seterr(all='ignore')