test_cython_lapack.py 574 B

1234567891011121314151617
  1. from numpy.testing import assert_allclose
  2. from scipy.linalg import cython_lapack as cython_lapack
  3. from scipy.linalg import lapack
  4. class TestLamch:
  5. def test_slamch(self):
  6. for c in [b'e', b's', b'b', b'p', b'n', b'r', b'm', b'u', b'l', b'o']:
  7. assert_allclose(cython_lapack._test_slamch(c),
  8. lapack.slamch(c))
  9. def test_dlamch(self):
  10. for c in [b'e', b's', b'b', b'p', b'n', b'r', b'm', b'u', b'l', b'o']:
  11. assert_allclose(cython_lapack._test_dlamch(c),
  12. lapack.dlamch(c))