From ca4117322549d5a968c427fb23e093c4bba6a0d9 Mon Sep 17 00:00:00 2001 From: James Hensman Date: Wed, 27 Nov 2013 13:47:08 +0000 Subject: [PATCH] better warings for cathcing of blaslib detection --- GPy/util/linalg.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GPy/util/linalg.py b/GPy/util/linalg.py index 9db769e6..cf210bba 100644 --- a/GPy/util/linalg.py +++ b/GPy/util/linalg.py @@ -12,6 +12,7 @@ import ctypes from ctypes import byref, c_char, c_int, c_double # TODO # import scipy.lib.lapack import scipy +import warnings if np.all(np.float64((scipy.__version__).split('.')[:2]) >= np.array([0, 12])): import scipy.linalg.lapack as lapack @@ -25,6 +26,9 @@ try: assert hasattr(_blaslib, 'dsyr_') except AssertionError: _blas_available = False +except AttributeError e: + _blas_available = False + warnings.warn("warning: caught this exception:" + str(e)) def dtrtrs(A, B, lower=0, trans=0, unitdiag=0): """