We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90e135d commit e877016Copy full SHA for e877016
simcomplex/abssimcomplex.py
@@ -46,11 +46,11 @@ def betti_number(self, i):
46
else:
47
try:
48
boundop_i_rank = np.linalg.matrix_rank(boundop_i.toarray())
49
- except np.linalg.LinAlgError:
+ except (np.linalg.LinAlgError, ValueError):
50
boundop_i_rank = boundop_i.shape[1]
51
52
boundop_ip1_rank = np.linalg.matrix_rank(boundop_ip1.toarray())
53
54
boundop_ip1_rank = boundop_ip1.shape[1]
55
56
return ((boundop_i.shape[1]-boundop_i_rank)-boundop_ip1_rank)
0 commit comments