diff options
author | tlacombe <lacombe1993@gmail.com> | 2021-04-12 17:02:34 +0200 |
---|---|---|
committer | tlacombe <lacombe1993@gmail.com> | 2021-04-12 17:02:34 +0200 |
commit | cdab3c9e32923f83d25d2cdf207f3cddbb3f94f6 (patch) | |
tree | 4e0eeb2e38b1b04244dd3c2a6e246c22507de82f /src/python/gudhi | |
parent | 2a11e3651c2d66df8371a9aa1d23dff69ffbc31c (diff) |
handle essential parts test
Diffstat (limited to 'src/python/gudhi')
-rw-r--r-- | src/python/gudhi/wasserstein/wasserstein.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/python/gudhi/wasserstein/wasserstein.py b/src/python/gudhi/wasserstein/wasserstein.py index 2911f826..7cb9d5d9 100644 --- a/src/python/gudhi/wasserstein/wasserstein.py +++ b/src/python/gudhi/wasserstein/wasserstein.py @@ -113,6 +113,7 @@ def _get_essential_parts(a): second_coord_infinite_positive = (a[:,1] == np.inf) first_coord_infinite_negative = (a[:,0] == -np.inf) second_coord_infinite_negative = (a[:,1] == -np.inf) + ess_first_type = np.where(second_coord_finite & first_coord_infinite_negative)[0] # coord (-inf, x) ess_second_type = np.where(first_coord_finite & second_coord_infinite_positive)[0] # coord (x, +inf) ess_third_type = np.where(first_coord_infinite_negative & second_coord_infinite_positive)[0] # coord (-inf, +inf) |