[NumPy] Fix uses of deprecated multidimensional NumPy indexing with a non-tuple index.
NumPy 1.23 removes support for non-tuple indexing of NumPy arrays (https://numpy.org/devdocs/release/1.23.0-notes.html#expired-deprecations). The workaround is to convert multidimensional indices to a tuple.
@@ -326,7 +326,7 @@ class TestConvUtils(tf.test.TestCase, parameterized.TestCase):
):
p = list(p)
p[d] = slice(None)
- mask[p * 2] = True
+ mask[tuple(p * 2)] = True
mask = np.take(mask, range(0, min(1, input_shape[d])), ndims + d)
