[Numpy-svn] r5010 - trunk/numpy/core/tests
numpy-svn at scipy.org
numpy-svn at scipy.org
Thu Apr 10 05:15:15 EDT 2008
Author: stefan
Date: 2008-04-10 04:15:00 -0500 (Thu, 10 Apr 2008)
New Revision: 5010
Modified:
trunk/numpy/core/tests/test_regression.py
Log:
Add check for printing complex dtypes, closes #693.
Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py 2008-04-09 23:52:17 UTC (rev 5009)
+++ trunk/numpy/core/tests/test_regression.py 2008-04-10 09:15:00 UTC (rev 5010)
@@ -989,6 +989,16 @@
assert_almost_equal(fdouble, 1.234)
assert_almost_equal(flongdouble, 1.234)
+ def check_complex_dtype_printing(self, level=rlevel):
+ dt = np.dtype([('top', [('tiles', ('>f4', (64, 64)), (1,)),
+ ('rtile', '>f4', (64, 36))], (3,)),
+ ('bottom', [('bleft', ('>f4', (8, 64)), (1,)),
+ ('bright', '>f4', (8, 36))])])
+ assert_equal(str(dt),
+ "[('top', [('tiles', ('>f4', (64, 64)), (1,)), "
+ "('rtile', '>f4', (64, 36))], (3,)), "
+ "('bottom', [('bleft', ('>f4', (8, 64)), (1,)), "
+ "('bright', '>f4', (8, 36))])]")
if __name__ == "__main__":
NumpyTest().run()
More information about the Numpy-svn
mailing list