mirror of
https://github.com/dmlc/dgl.git
synced 2026-06-04 19:44:23 +08:00
[UnitTest] Fix "[UnitTest] AttributeError: module 'numpy' has no attribute 'ComplexWarning'" in #7766 (#7768)
Co-authored-by: Stanley Yang <stanyang@amazon.com> Co-authored-by: Muhammed Fatih BALIN <m.f.balin@gmail.com>
This commit is contained in:
@@ -1774,7 +1774,7 @@ def test_sample_neighbors_exclude_edges_homoG(dtype, fused):
|
||||
|
||||
@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
|
||||
|
||||
Reference in New Issue
Block a user