(self)
| 927 | assert_equal(res.dtype, expected_dtype) |
| 928 | |
| 929 | def test_subarray_key(self): |
| 930 | a_dtype = np.dtype([('pos', int, 3), ('f', '<f4')]) |
| 931 | a = np.array([([1, 1, 1], np.pi), ([1, 2, 3], 0.0)], dtype=a_dtype) |
| 932 | |
| 933 | b_dtype = np.dtype([('pos', int, 3), ('g', '<f4')]) |
| 934 | b = np.array([([1, 1, 1], 3), ([3, 2, 1], 0.0)], dtype=b_dtype) |
| 935 | |
| 936 | expected_dtype = np.dtype([('pos', int, 3), ('f', '<f4'), ('g', '<f4')]) |
| 937 | expected = np.array([([1, 1, 1], np.pi, 3)], dtype=expected_dtype) |
| 938 | |
| 939 | res = join_by('pos', a, b) |
| 940 | assert_equal(res.dtype, expected_dtype) |
| 941 | assert_equal(res, expected) |
| 942 | |
| 943 | def test_padded_dtype(self): |
| 944 | dt = np.dtype('i1,f4', align=True) |
nothing calls this directly
no test coverage detected