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
Python currently does not implicitly convert integer literals to float when using float graph attributes:
g = nk.Graph(1) attr = g.attachNodeAttribute('test', float) attr[0] = 0
--------------------------------------------------------------------------- Exception Traceback (most recent call last) Cell In[4], [line 3](vscode-notebook-cell:?execution_count=4&line=3) [1](vscode-notebook-cell:?execution_count=4&line=1) g = nk.Graph(1) [2](vscode-notebook-cell:?execution_count=4&line=2) attr = g.attachNodeAttribute('test', float) ----> [3](vscode-notebook-cell:?execution_count=4&line=3) attr[0] = 0 File .venv/lib/python3.10/site-packages/networkit/graph.pyx:1372, in networkit.graph.NodeAttribute.__setitem__() Exception: Wrong Attribute type
running the same code with attr[0] = 0. works.
attr[0] = 0.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Python currently does not implicitly convert integer literals to float when using float graph attributes:
running the same code with
attr[0] = 0.
works.The text was updated successfully, but these errors were encountered: