diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-01-06 14:50:07 -0800 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-01-06 14:50:07 -0800 |
commit | 849a8c5f9db1087def26e63393ec48497cee8dd4 (patch) | |
tree | 2b6856084dd2331ef377294c3a8368103258b4f9 /numpy | |
parent | 161bfe73e006af7c71db373aa99bdecce32f9e2a (diff) | |
parent | 36ea64728586003b6a70ea9ff2c2e021481b8fc5 (diff) | |
download | numpy-849a8c5f9db1087def26e63393ec48497cee8dd4.tar.gz |
Merge pull request #2838 from charris/test-numpy-constants
TST: Add tests for constants.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_umath.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py index 892b1fae6..bd281e000 100644 --- a/numpy/core/tests/test_umath.py +++ b/numpy/core/tests/test_umath.py @@ -20,6 +20,19 @@ class _FilterInvalids(object): np.seterr(**self.olderr) +class TestConstants(TestCase): + def test_pi(self): + assert_allclose(ncu.pi, 3.141592653589793, 1e-15) + + + def test_e(self): + assert_allclose(ncu.e, 2.718281828459045, 1e-15) + + + def test_euler_gamma(self): + assert_allclose(ncu.euler_gamma, 0.5772156649015329, 1e-15) + + class TestDivision(TestCase): def test_division_int(self): # int division should follow Python |