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

Fix neighbors/outgoing/ingoing with weights=False #273

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Mar 20, 2024

Issue

Methods that return neighbours or ingoing or outgoing connections fail if weights=True. This code was obviously never used and never tested.

Network widgets are in dire need of unit tests. :(

Description of changes

A fix would be to add a pair of parentheses (vstack expects a tuple, not multiple arguments).

However, node indices are ints and weights are floats, so we should put them into the same array. Instead, the function now returns a tuple. Since nobody could have used the code, we need not care about backward compatibility.

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd changed the title Fix get neighbors with weights Fix neighbors/outgoing/ingoing with weights=False Mar 20, 2024
@janezd janezd merged commit 6f8308b into biolab:master Mar 22, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant