mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
now it actually works
This commit is contained in:
parent
1dc6ee574b
commit
5781fbd582
1 changed files with 4 additions and 3 deletions
|
|
@ -2,9 +2,10 @@ import numpy as np
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
def silence_errors(f):
|
def silence_errors(f):
|
||||||
status = np.seterr(all='ignore')
|
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def wrapper(*args, **kwds):
|
def wrapper(*args, **kwds):
|
||||||
return f(*args, **kwds)
|
status = np.seterr(all='ignore')
|
||||||
np.seterr(**status)
|
result = f(*args, **kwds)
|
||||||
|
np.seterr(**status)
|
||||||
|
return result
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue