@testing.for_all_dtypes()
def test_nonzero(self, dtype):
    for xp in (numpy, cupy):
        array = xp.array(self.array, dtype=dtype)
        with pytest.raises(DeprecationWarning):
            xp.nonzero(array)
@testing.for_all_dtypes()
def test_nonzero(self, dtype):
    for xp in (numpy, cupy):
        array = xp.array(self.array, dtype=dtype)
        with pytest.raises(DeprecationWarning):
            xp.nonzero(array)