We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
preprocessing.py -> def mask_test_edges(adj): -> def ismember(a, b, tol=5):
The actual function is different from the meaning of the name. why???
Actual function: is same rows (https://www.coder.work/article/2401015) Surface name function: is member
import numpy as np def ismember(a, b, tol=5): rows_close = np.all(np.round(a - b[:, None], tol) == 0, axis=-1) return (np.all(np.any(rows_close, axis=-1), axis=-1) and np.all(np.any(rows_close, axis=0), axis=0)) #[is same rows] a = np.array([[ 6, 7], [ 2, 3], [ 0, 1], [ 4, 5], [ 8, 9]]) b = np.array([[ 0, 1], [ 2, 3], [ 4, 5], [ 6, 7], [ 8, 9]]) print(ismember(a, b)) # >> True #[is member] a1 = np.array([[ 0, 1]]) # shape=(1, 2) print(ismember(a1, b)) # >> False # error a2 = np.array([ 0, 1]) # shape=(2,) print(ismember(a2, b)) # >> False # error
The text was updated successfully, but these errors were encountered:
No branches or pull requests
preprocessing.py -> def mask_test_edges(adj): -> def ismember(a, b, tol=5):
The actual function is different from the meaning of the name. why???
Actual function: is same rows (https://www.coder.work/article/2401015)
Surface name function: is member
The text was updated successfully, but these errors were encountered: