Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
matsantoro committed Apr 26, 2021
1 parent 3ab4a9b commit 9a9daaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions graph_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ def biedge_count_per_dimension(conn_matrix: Union[np.ndarray, sp.coo_matrix], re


def biedge_in_simplex(conn_matrix: Union[np.ndarray, sp.csr_matrix], simplex: List[int]):
return np.sum(np.tril(conn_matrix[simplex].T[simplex]))
return np.sum(np.triu(conn_matrix[simplex].T[simplex]))


def biedges_in_simplex_coordinates(conn_matrix: Union[np.ndarray, sp.csr_matrix], simplex: List[int]):
biedges_indices_in_simplex = np.nonzero(np.tril(conn_matrix[simplex].T[simplex]))
biedges_rows_in_matrix = simplex[biedges_indices_in_simplex[0]]
biedges_cols_in_matrix = simplex[biedges_indices_in_simplex[1]]
biedges_rows_in_matrix = simplex[biedges_indices_in_simplex[1]]
biedges_cols_in_matrix = simplex[biedges_indices_in_simplex[0]]
return biedges_rows_in_matrix, biedges_cols_in_matrix

0 comments on commit 9a9daaf

Please sign in to comment.