diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-04-25 16:09:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-25 16:09:00 -0700 |
commit | 171a3e5811e43643788c20075be9ba52efb83b81 (patch) | |
tree | 2370d772ffb615bd4494a1c2da5d26a0bb520fd9 /numpy/lib/tests/test_recfunctions.py | |
parent | 0c3d18f57c842047ae23383c2eae46a042faef5d (diff) | |
parent | 58c28d4fd1c54b455d19372f0c838fed5fc71fe4 (diff) | |
download | numpy-171a3e5811e43643788c20075be9ba52efb83b81.tar.gz |
Merge pull request #13334 from eric-wieser/fix-1-field-unstructured
BUG: Fix structured_to_unstructured on single-field types
Diffstat (limited to 'numpy/lib/tests/test_recfunctions.py')
-rw-r--r-- | numpy/lib/tests/test_recfunctions.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_recfunctions.py b/numpy/lib/tests/test_recfunctions.py index 069693613..112678294 100644 --- a/numpy/lib/tests/test_recfunctions.py +++ b/numpy/lib/tests/test_recfunctions.py @@ -214,6 +214,8 @@ class TestRecFunctions(object): dtype=[('x', 'i4'), ('y', 'f4'), ('z', 'f8')]) out = np.mean(structured_to_unstructured(b[['x', 'z']]), axis=-1) assert_equal(out, np.array([ 3. , 5.5, 9. , 11. ])) + out = np.mean(structured_to_unstructured(b[['x']]), axis=-1) + assert_equal(out, np.array([ 1. , 4. , 7. , 10. ])) c = np.arange(20).reshape((4,5)) out = unstructured_to_structured(c, a.dtype) |