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

Minor random fixes #277

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion orangecontrib/network/network/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .base import Network
from .base import Network, DirectedEdges, UndirectedEdges
5 changes: 5 additions & 0 deletions orangecontrib/network/network/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ def as_edges(edges):
self.edges = [as_edges(e) for e in edges]
else:
self.edges = [as_edges(edges)]
if not all(edges.edges.shape[0] == edges.edges.shape[1]
for edges in self.edges):
raise ValueError("Edges must be square matrices")
if not all(edges.edges.shape[0] == len(nodes) for edges in self.edges):
raise ValueError("Number of nodes and edge matrix dimension must match")
self.name = name
self.coordinates = coordinates

Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/network/networks/makeNetworkList.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os
import os
import os.path
import glob

Expand Down
Loading