diff --git a/FIAT/finite_element.py b/FIAT/finite_element.py index 500821531..999e7151b 100644 --- a/FIAT/finite_element.py +++ b/FIAT/finite_element.py @@ -9,8 +9,6 @@ # Modified by Thomas H. Gibson (t.gibson15@imperial.ac.uk), 2016 import numpy -import scipy -import warnings from FIAT.dual_set import DualSet from FIAT.polynomial_set import PolynomialSet @@ -131,14 +129,7 @@ def __init__(self, poly_set, dual, order, formdegree=None, mapping="affine", ref V = numpy.dot(A, numpy.transpose(B)) self.V = V - # new_coeffs_flat = numpy.linalg.solve(V.T, B) - warnings.filterwarnings("error") - try: - LU, piv = scipy.linalg.lu_factor(V) - new_coeffs_flat = scipy.linalg.lu_solve((LU, piv), B, trans=1) - except scipy.linalg.LinAlgWarning: - raise numpy.linalg.LinAlgError("Singular Vandermonde matrix") - warnings.resetwarnings() + new_coeffs_flat = numpy.linalg.solve(numpy.transpose(V), B) new_shp = new_coeffs_flat.shape[:1] + shp[1:] new_coeffs = new_coeffs_flat.reshape(new_shp) diff --git a/setup.py b/setup.py index 20ba60391..9e06e01ad 100755 --- a/setup.py +++ b/setup.py @@ -27,4 +27,4 @@ download_url=tarball, license="LGPL v3 or later", packages=["FIAT"], - install_requires=["numpy", "recursivenodes", "scipy", "sympy"]) + install_requires=["numpy", "recursivenodes", "sympy"])