(self)
| 951 | assert_equal(list(a[1]), [masked, 4]) |
| 952 | |
| 953 | def test_mvoid_print(self): |
| 954 | # Test printing a mvoid |
| 955 | mx = array([(1, 1), (2, 2)], dtype=[('a', int), ('b', int)]) |
| 956 | assert_equal(str(mx[0]), "(1, 1)") |
| 957 | mx['b'][0] = masked |
| 958 | ini_display = masked_print_option._display |
| 959 | masked_print_option.set_display("-X-") |
| 960 | try: |
| 961 | assert_equal(str(mx[0]), "(1, -X-)") |
| 962 | assert_equal(repr(mx[0]), "(1, -X-)") |
| 963 | finally: |
| 964 | masked_print_option.set_display(ini_display) |
| 965 | |
| 966 | # also check if there are object datatypes (see gh-7493) |
| 967 | mx = array([(1,), (2,)], dtype=[('a', 'O')]) |
| 968 | assert_equal(str(mx[0]), "(1,)") |
| 969 | |
| 970 | def test_mvoid_multidim_print(self): |
| 971 |
nothing calls this directly
no test coverage detected