summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_regression.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2009-03-09 01:00:12 +0000
committerCharles Harris <charlesr.harris@gmail.com>2009-03-09 01:00:12 +0000
commit4a632534604d686ff9ac5a9629ce06f7c895cd1e (patch)
treeffad618c34abb2aa0a2dfae19924101b4371a870 /numpy/lib/tests/test_regression.py
parent3926a6c68334efd6334f998cfa03cf18a152a46f (diff)
downloadnumpy-4a632534604d686ff9ac5a9629ce06f7c895cd1e.tar.gz
Fix ticket #944.
Diffstat (limited to 'numpy/lib/tests/test_regression.py')
-rw-r--r--numpy/lib/tests/test_regression.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py
index 189b2e481..e465dc4b6 100644
--- a/numpy/lib/tests/test_regression.py
+++ b/numpy/lib/tests/test_regression.py
@@ -1,10 +1,9 @@
from numpy.testing import *
import numpy as np
-rlevel = 1
-class TestRegression(TestCase):
- def test_polyfit_build(self,level=rlevel):
+class TestRegression(object):
+ def test_polyfit_build(self):
"""Ticket #628"""
ref = [-1.06123820e-06, 5.70886914e-04, -1.13822012e-01,
9.95368241e+00, -3.14526520e+02]
@@ -25,6 +24,12 @@ class TestRegression(TestCase):
tested = np.polyfit(x, y, 4)
assert_array_almost_equal(ref, tested)
+ def test_polyint_type(self) :
+ """Ticket #944"""
+ msg = "Wrong type, should be complex"
+ x = np.polyint(np.ones(3, dtype=np.complex))
+ assert_(np.asarray(x).dtype == np.complex, msg)
+
if __name__ == "__main__":
run_module_suite()