From f14d232f20a6f96fcfbab3bd454b5ece3aae94cd Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Wed, 28 Nov 2012 23:07:38 +0200 Subject: [PATCH] TST: linalg: fix cblas/clapack imports in tests --- scipy/linalg/tests/test_blas.py | 7 ++++++- scipy/linalg/tests/test_lapack.py | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/scipy/linalg/tests/test_blas.py b/scipy/linalg/tests/test_blas.py index a4e82fe0bf41..6f7654033585 100644 --- a/scipy/linalg/tests/test_blas.py +++ b/scipy/linalg/tests/test_blas.py @@ -16,7 +16,12 @@ from numpy.testing import TestCase, run_module_suite, assert_equal, \ assert_almost_equal, assert_array_almost_equal -from scipy.linalg import _fblas as fblas, _cblas as cblas, get_blas_funcs +from scipy.linalg import _fblas as fblas, get_blas_funcs + +try: + from scipy.linalg import _cblas as cblas +except ImportError: + cblas = None def test_get_blas_funcs(): # check that it returns Fortran code for arrays that are diff --git a/scipy/linalg/tests/test_lapack.py b/scipy/linalg/tests/test_lapack.py index aa2ba151a394..11e2503962c9 100644 --- a/scipy/linalg/tests/test_lapack.py +++ b/scipy/linalg/tests/test_lapack.py @@ -8,7 +8,11 @@ import numpy as np -from scipy.linalg import _flapack as flapack, _clapack as clapack +from scipy.linalg import _flapack as flapack +try: + from scipy.linalg import _clapack as clapack +except ImportError: + clapack = None from scipy.linalg.lapack import get_lapack_funcs REAL_DTYPES = [np.float32, np.float64]