diff --git a/tests/python/common/sampling/test_sampling.py b/tests/python/common/sampling/test_sampling.py index f52ea3c2e5dc..74c2b000ba96 100644 --- a/tests/python/common/sampling/test_sampling.py +++ b/tests/python/common/sampling/test_sampling.py @@ -1774,7 +1774,7 @@ def contain_edge(g, sg, u, v): @pytest.mark.parametrize("dtype", ["int32", "int64"]) def test_global_uniform_negative_sampling(dtype): - warnings.simplefilter("ignore", np.exceptions.ComplexWarning) + warnings.simplefilter("ignore", np.ComplexWarning) g = dgl.graph(([], []), num_nodes=1000).to(F.ctx()) src, dst = dgl.sampling.global_uniform_negative_sampling( g, 2000, False, True