Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ venv/
*.egg-info/
*.egg
PyOCN.egg-info/
docs/_build/

# compiled markdown
/readme_files/
Expand All @@ -34,6 +35,8 @@ sandbox.ipynb
*/__pycache__/
*.py[cod]
*.pyo
*.pyc
*.cpython-*.pyc

# C build files/libraries
PyOCN/c_src/*.o
Expand Down
Binary file modified PyOCN/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
24 changes: 12 additions & 12 deletions PyOCN/_flowgrid_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ def from_digraph(G: nx.DiGraph, resolution:float=1, verbose:bool=False, validate
Whether to check the input graph for validity before conversion.
Default True. If false, the user is responsible for ensuring the graph is valid.
For internal use only.
Returns:
p_c_graph: pointer to the created C FlowGrid structure.
Returns
-------
p_c_graph : POINTER
pointer to the created C FlowGrid structure.
"""

if verbose:
Expand Down Expand Up @@ -259,11 +261,10 @@ def validate_digraph(dag:nx.DiGraph, verbose:bool=False) -> bool|str:
"""
Validate the integrity of a FlowGrid.

Parameters:
dag (nx.DiGraph): The directed acyclic graph to validate.

Returns:
either True if valid, or an error message string if invalid.
Parameters
----------
dag : nx.DiGraph
The directed acyclic graph to validate.
"""
try:
p_c_graph = from_digraph(dag, verbose=verbose)
Expand All @@ -277,11 +278,10 @@ def validate_flowgrid(c_graph:_bindings.FlowGrid_C, verbose:bool=False) -> bool|
"""
Validate the integrity of a FlowGrid_C structure.

Parameters:
c_graph (FlowGrid_C): The FlowGrid_C structure to validate.

Returns:
either True if valid, or an error message string if invalid.
Parameters
----------
c_graph : _bindings.FlowGrid_C
The FlowGrid_C structure to validate.
"""
try:
dag = to_digraph(c_graph, verbose=verbose)
Expand Down
Loading