diff --git a/dreimac/complexprojectivecoords.py b/dreimac/complexprojectivecoords.py index 27f0f0d..936fa83 100644 --- a/dreimac/complexprojectivecoords.py +++ b/dreimac/complexprojectivecoords.py @@ -132,10 +132,13 @@ def get_coordinates( n_edges = delta2.shape[1] objective = np.zeros((n_edges), dtype=int) integrality = np.ones((n_edges), dtype=int) + bounds = scipy.optimize.Bounds() # empty bounds + optimizer_solution = milp( objective, integrality=integrality, constraints=constraints, + bounds=bounds, ) if not optimizer_solution["success"]: diff --git a/dreimac/toroidalcoords.py b/dreimac/toroidalcoords.py index f875baa..7ecef77 100644 --- a/dreimac/toroidalcoords.py +++ b/dreimac/toroidalcoords.py @@ -148,13 +148,14 @@ def get_coordinates( n_edges = delta1.shape[1] objective = np.zeros((n_edges)) integrality = np.ones((n_edges)) + bounds = scipy.optimize.Bounds() # trivial bounds optimizer_solution = milp( objective, integrality=integrality, constraints=constraints, + bounds=bounds, ) - if not optimizer_solution["success"]: raise Exception( "The cohomology class at index " @@ -320,10 +321,7 @@ def _is_one_cocycle( for j in range(i + 1, n_points): if dist_mat[i, j] < threshold: for k in range(j + 1, n_points): - if ( - dist_mat[i, k] < threshold - and dist_mat[j, k] < threshold - ): + if dist_mat[i, k] < threshold and dist_mat[j, k] < threshold: index_ij = combinatorial_number_system_d1_forward( i, j, lookup_table ) @@ -335,9 +333,7 @@ def _is_one_cocycle( ) if ( - cochain[index_ij] - + cochain[index_jk] - - cochain[index_ik] + cochain[index_ij] + cochain[index_jk] - cochain[index_ik] != 0 ): is_cocycle = False