diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2010-11-24 20:10:10 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2010-11-24 20:14:00 -0700 |
commit | cfd4c05c121e33f0813f6e1523f846a4d7e17ce3 (patch) | |
tree | 8f204ab24d4c98bd9caa454506e8222ee3935206 /numpy/lib/tests/test_regression.py | |
parent | f0c3443b27391efb1b14161729e2df8ec24b5fcc (diff) | |
download | numpy-cfd4c05c121e33f0813f6e1523f846a4d7e17ce3.tar.gz |
TST: Add regression test for ticket #1676.
Diffstat (limited to 'numpy/lib/tests/test_regression.py')
-rw-r--r-- | numpy/lib/tests/test_regression.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py index a8804ac3a..a67355957 100644 --- a/numpy/lib/tests/test_regression.py +++ b/numpy/lib/tests/test_regression.py @@ -188,6 +188,18 @@ class TestRegression(TestCase): assert_(isinstance(np.polyder(np.poly1d([1]), 1), np.poly1d)) assert_(isinstance(np.polyder([1], 1), np.ndarray)) + def test_append_fields_dtype_list(self): + """Ticket #1676""" + from numpy.lib.recfunctions import append_fields + F = False + base = np.array([1,2,3], dtype=np.int32) + data = np.eye(3).astype(np.int32) + names = ['a','b','c'] + dlist = [np.float64, np.int32, np.int32] + try: + a = append_fields(base, names, data, dlist) + except: + raise AssertionError() if __name__ == "__main__": run_module_suite() |