(arr)
| 118 | |
| 119 | |
| 120 | def test_dim_check_fail(arr): |
| 121 | for func in ( |
| 122 | m.index_at, |
| 123 | m.index_at_t, |
| 124 | m.offset_at, |
| 125 | m.offset_at_t, |
| 126 | m.data, |
| 127 | m.data_t, |
| 128 | m.mutate_data, |
| 129 | m.mutate_data_t, |
| 130 | ): |
| 131 | with pytest.raises(IndexError) as excinfo: |
| 132 | func(arr, 1, 2, 3) |
| 133 | assert str(excinfo.value) == "too many indices for an array: 3 (ndim = 2)" |
| 134 | |
| 135 | |
| 136 | @pytest.mark.parametrize( |