def buggy_mkl_svd(function):
 @wraps(function)
 def dec(*args, **kwargs):
  try:
   return function(*args, **kwargs)
  except np.linalg.LinAlgError as exp:
   if ('SVD did not converge' in str(exp)):
    from nose.plugins.skip import SkipTest
    msg = 'Intel MKL SVD convergence error detected, skipping test'
    warn(msg)
    raise SkipTest(msg)
   raise
 return dec

def buggy_mkl_svd ( function ) : @ wraps ( function ) def dec ( * args , ** kwargs ) : try : return function ( * args , ** kwargs ) except np . linalg . LinAlgError as exp : if ( 'SVD did not converge' in str ( exp ) ) : from nose . plugins . skip import SkipTest msg = 'Intel MKL SVD convergence error detected, skipping test' warn ( msg ) raise SkipTest ( msg ) raise return dec
decorator for tests that make calls to svd and intermittently fail .