Skip to content

Commit

Permalink
Remove overrestricitve check of sparsity on rows/cols
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Louis Barbarant committed Sep 11, 2024
1 parent 264caa0 commit edf98ad
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/fugw/scripts/coarse_to_fine.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,18 +345,6 @@ def compute_sparsity_mask(

sparsity_mask = (N_source @ C_source) @ (N_target @ C_target).T

# Check for any empty row/column in the sparsity mask
rows, cols = sparsity_mask.indices()
if (
len(np.unique(rows)) < sparsity_mask.shape[0]
or len(np.unique(cols)) < sparsity_mask.shape[1]
):
raise ValueError(
"Sparsity mask contains empty rows or columns. "
"Please consider increasing the selection radius "
"or increasing the number of samples."
)

return sparsity_mask


Expand Down

0 comments on commit edf98ad

Please sign in to comment.