summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-08-10 00:24:48 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-08-10 00:24:48 +0000
commit4b1569e2208baf36a5ebd0de0877946bd86b2a38 (patch)
tree161b13d702aa557bf462caed7802c52b858abde8
parent8959e33dfc7c2eef00cfdca74d3b750675cfc79d (diff)
downloadnumpy-4b1569e2208baf36a5ebd0de0877946bd86b2a38.tar.gz
Add unit-test for recent comma-string updates
-rw-r--r--numpy/core/tests/test_numerictypes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/tests/test_numerictypes.py b/numpy/core/tests/test_numerictypes.py
index 6611d0c1c..ae52f8603 100644
--- a/numpy/core/tests/test_numerictypes.py
+++ b/numpy/core/tests/test_numerictypes.py
@@ -331,6 +331,12 @@ class test_read_values_nested_multiple(read_values_nested, NumpyTestCase):
multiple_rows = True
_buffer = NbufferT
+class test_empty_field(NumpyTestCase):
+ def check_assign(self):
+ a = numpy.arange(10, dtype=numpy.float32)
+ a.dtype = [("int", "<0i4"),("float", "<2f4")]
+ assert(a['int'].shape == (5,0))
+ assert(a['float'].shape == (5,2))
if __name__ == "__main__":
NumpyTest().run()