Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warnings generated in test_graphmask_explainer.py and test_laplacian_lambda_max.py #9179

Merged
merged 3 commits into from Apr 11, 2024

Conversation

drivanov
Copy link
Contributor

@drivanov drivanov commented Apr 9, 2024

With this fix, the following warning:

test/explain/algorithm/test_graphmask_explainer.py: 12960 warnings
  /usr/local/lib/python3.10/dist-packages/torch_geometric/explain/algorithm/graphmask_explainer.py:165: DeprecationWarning: `np.math` is a deprecated alias for the standard library `math` module (Deprecated Numpy 1.25). Replace usages of `np.math` with `math`
    beta * np.math.log(-gamma / zeta))


test/transforms/test_laplacian_lambda_max.py::test_laplacian_lambda_max
test/transforms/test_laplacian_lambda_max.py::test_laplacian_lambda_max
test/transforms/test_laplacian_lambda_max.py::test_laplacian_lambda_max
test/transforms/test_laplacian_lambda_max.py::test_laplacian_lambda_max
  /usr/local/lib/python3.10/dist-packages/torch_geometric/transforms/laplacian_lambda_max.py:65: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    data.lambda_max = float(lambda_max.real)

will no longer be generated.

@rusty1s rusty1s changed the title Remove warnings generated in test_graphmask_explainer.py and test_laplacian_lambda_max.py. Remove warnings generated in test_graphmask_explainer.py and test_laplacian_lambda_max.py Apr 11, 2024
@rusty1s rusty1s merged commit c00775d into pyg-team:master Apr 11, 2024
12 of 16 checks passed
@drivanov drivanov deleted the math_warnings branch April 11, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants