Skip to content

Commit

Permalink
Fix doc (#36)
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Tauzin <[email protected]>
  • Loading branch information
gtauzin authored May 15, 2020
1 parent a0efb36 commit 46e79b1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions pyflagser/flagio.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def load_unweighted_flag(fname, fmt='csr', dtype=np.bool):
Returns
-------
adjacency_matrix : matrix of shape (n_vertices, n_vertices) and format
adjacency_matrix : matrix of shape (n_vertices, n_vertices) and format \
`fmt`
Adjacency matrix of a directed/undirected unweighted graph. It is
understood as a boolean matrix. Off-diagonal, ``0`` or ``False`` values
Expand All @@ -44,8 +44,8 @@ def load_unweighted_flag(fname, fmt='csr', dtype=np.bool):
References
----------
.. [1] D. Luetgehetmann, "Documentation of the C++ flagser library";
`GitHub: <https://github.com/luetge/flagser/blob/master/docs/\
documentation_flagser.pdf>`_.
`GitHub: luetge/flagser <https://github.com/luetge/flagser/blob/\
master/docs/documentation_flagser.pdf>`_.
"""
with open(fname, 'r') as f:
Expand Down Expand Up @@ -91,7 +91,7 @@ def load_weighted_flag(fname, fmt='csr', dtype=np.float, infinity_value=None):
Returns
-------
adjacency_matrix : matrix of shape (n_vertices, n_vertices) and format
adjacency_matrix : matrix of shape (n_vertices, n_vertices) and format \
`fmt`
Matrix representation of a directed/undirected weighted graph. Diagonal
elements are vertex weights.
Expand All @@ -105,8 +105,8 @@ def load_weighted_flag(fname, fmt='csr', dtype=np.float, infinity_value=None):
References
----------
.. [1] D. Luetgehetmann, "Documentation of the C++ flagser library";
`GitHub: <https://github.com/luetge/flagser/blob/master/docs/\
documentation_flagser.pdf>`_.
`GitHub: luetge/flagser <https://github.com/luetge/flagser/blob/\
master/docs/documentation_flagser.pdf>`_.
"""
# Warn if dtype is bool
Expand Down Expand Up @@ -168,7 +168,7 @@ def save_unweighted_flag(fname, adjacency_matrix):
fname : file, str, or pathlib.Path, required
Filename of extension ``.flag``.
adjacency_matrix : 2d ndarray or scipy.sparse matrix of shape
adjacency_matrix : 2d ndarray or scipy.sparse matrix of shape \
(n_vertices, n_vertices), required
Adjacency matrix of a directed/undirected unweighted graph. It is
understood as a boolean matrix. Off-diagonal, ``0`` or ``False`` values
Expand All @@ -184,8 +184,8 @@ def save_unweighted_flag(fname, adjacency_matrix):
References
----------
.. [1] D. Luetgehetmann, "Documentation of the C++ flagser library";
`GitHub: <https://github.com/luetge/flagser/blob/master/docs/\
documentation_flagser.pdf>`_.
`GitHub: luetge/flagser <https://github.com/luetge/flagser/blob/\
master/docs/documentation_flagser.pdf>`_.
"""
# Extract vertices and edges
Expand All @@ -206,7 +206,7 @@ def save_weighted_flag(fname, adjacency_matrix, max_edge_weight=None):
fname : file, str, or pathlib.Path, required
Filename of extension ``.flag``.
adjacency_matrix : 2d ndarray or scipy.sparse matrix of shape
adjacency_matrix : 2d ndarray or scipy.sparse matrix of shape \
(n_vertices, n_vertices), required
Matrix representation of a directed/undirected weighted graph. Diagonal
elements are vertex weights. The way zero values are handled depends on
Expand All @@ -233,8 +233,8 @@ def save_weighted_flag(fname, adjacency_matrix, max_edge_weight=None):
References
----------
.. [1] D. Luetgehetmann, "Documentation of the C++ flagser library";
`GitHub: <https://github.com/luetge/flagser/blob/master/docs/\
documentation_flagser.pdf>`_.
`GitHub: luetge/flagser <https://github.com/luetge/flagser/blob/\
master/docs/documentation_flagser.pdf>`_.
"""
# Extract vertices and edges weights
Expand Down
12 changes: 6 additions & 6 deletions pyflagser/flagser.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def flagser_unweighted(adjacency_matrix, min_dimension=0, max_dimension=np.inf,
Parameters
----------
adjacency_matrix : 2d ndarray or scipy.sparse matrix of shape
adjacency_matrix : 2d ndarray or scipy.sparse matrix of shape \
(n_vertices, n_vertices), required
Adjacency matrix of a directed/undirected unweighted graph. It is
understood as a boolean matrix. Off-diagonal, ``0`` or ``False`` values
Expand Down Expand Up @@ -70,8 +70,8 @@ def flagser_unweighted(adjacency_matrix, min_dimension=0, max_dimension=np.inf,
References
----------
.. [1] D. Luetgehetmann, "Documentation of the C++ flagser library";
`GitHub: <https://github.com/luetge/flagser/blob/master/docs/\
documentation_flagser.pdf>`_.
`GitHub: luetge/flagser <https://github.com/luetge/flagser/blob/\
master/docs/documentation_flagser.pdf>`_.
"""
# Handle default parameters
Expand Down Expand Up @@ -115,7 +115,7 @@ def flagser_weighted(adjacency_matrix, max_edge_weight=None, min_dimension=0,
Parameters
----------
adjacency_matrix : 2d ndarray or scipy.sparse matrix of shape
adjacency_matrix : 2d ndarray or scipy.sparse matrix of shape \
(n_vertices, n_vertices), required
Matrix representation of a directed/undirected weighted graph. Diagonal
elements are vertex weights. The way zero values are handled depends on
Expand Down Expand Up @@ -202,8 +202,8 @@ def flagser_weighted(adjacency_matrix, max_edge_weight=None, min_dimension=0,
References
----------
.. [1] D. Luetgehetmann, "Documentation of the C++ flagser library";
`GitHub: <https://github.com/luetge/flagser/blob/master/docs/\
documentation_flagser.pdf>`_.
`GitHub: luetge/flagser <https://github.com/luetge/flagser/blob/\
master/docs/documentation_flagser.pdf>`_.
"""
# Handle default parameters
Expand Down

0 comments on commit 46e79b1

Please sign in to comment.