diff options
author | ahaldane <ealloc@gmail.com> | 2017-06-27 20:48:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 20:48:16 -0400 |
commit | 96f146b55cac20ae96cac344cb224c87af87d0a9 (patch) | |
tree | d3a9af7600e90c6735b4705d732da9ca6a4bc27c /numpy/lib/tests/test_recfunctions.py | |
parent | 2b1f7aaf9310d1a0a6dc8b85ae013bd798403afb (diff) | |
parent | 64b0e54ce6ebf6bb16b9305f4d7f22b943c26b84 (diff) | |
download | numpy-96f146b55cac20ae96cac344cb224c87af87d0a9.tar.gz |
Merge pull request #9302 from eric-wieser/fix-fillvalue
BUG: Fix fillvalue
Diffstat (limited to 'numpy/lib/tests/test_recfunctions.py')
-rw-r--r-- | numpy/lib/tests/test_recfunctions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_recfunctions.py b/numpy/lib/tests/test_recfunctions.py index 0940d37b0..e9cfa4993 100644 --- a/numpy/lib/tests/test_recfunctions.py +++ b/numpy/lib/tests/test_recfunctions.py @@ -588,6 +588,16 @@ class TestJoinBy(TestCase): dtype=[('a', int), ('b', int), ('c', int), ('d', int)]) + def test_join_subdtype(self): + # tests the bug in https://stackoverflow.com/q/44769632/102441 + from numpy.lib import recfunctions as rfn + foo = np.array([(1,)], + dtype=[('key', int)]) + bar = np.array([(1, np.array([1,2,3]))], + dtype=[('key', int), ('value', 'uint16', 3)]) + res = join_by('key', foo, bar) + assert_equal(res, bar.view(ma.MaskedArray)) + def test_outer_join(self): a, b = self.a, self.b |