Skip to content

Commit

Permalink
[UnitTest] Fix "[UnitTest] AttributeError: module 'numpy' has no attr…
Browse files Browse the repository at this point in the history
…ibute 'ComplexWarning'" in #7766 (#7768)

Co-authored-by: Stanley Yang <[email protected]>
Co-authored-by: Muhammed Fatih BALIN <[email protected]>
  • Loading branch information
3 people authored Sep 4, 2024
1 parent 8fd6c68 commit 48f47d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/python/common/sampling/test_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.ComplexWarning)
warnings.simplefilter("ignore", np.exceptions.ComplexWarning)
g = dgl.graph(([], []), num_nodes=1000).to(F.ctx())
src, dst = dgl.sampling.global_uniform_negative_sampling(
g, 2000, False, True
Expand Down

0 comments on commit 48f47d5

Please sign in to comment.