Skip to content

Commit c48cd76

Browse files
authored
[MRG] Remove redundant abs() (#448)
* Remove redundant abs() * Update RELEASES.md
1 parent 5835016 commit c48cd76

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
- Backend version of `ot.partial` and `ot.smooth` (PR #388)
1818
- Added argument for warmstart of dual potentials in Sinkhorn-based methods in `ot.bregman` (PR #437)
1919
- Add parameters method in `ot.da.SinkhornTransport` (PR #440)
20-
- `ot.dr` now uses the new Pymanopt API and POT is compatible with current
21-
Pymanopt (PR #443)
20+
- `ot.dr` now uses the new Pymanopt API and POT is compatible with current Pymanopt (PR #443)
21+
- Remove the redundant `nx.abs()` at the end of `wasserstein_1d()` (PR #448)
2222

2323
#### Closed issues
2424

ot/lp/solver_1d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def wasserstein_1d(u_values, v_values, u_weights=None, v_weights=None, p=1, requ
129129
diff_quantiles = nx.abs(u_quantiles - v_quantiles)
130130

131131
if p == 1:
132-
return nx.sum(delta * nx.abs(diff_quantiles), axis=0)
132+
return nx.sum(delta * diff_quantiles, axis=0)
133133
return nx.sum(delta * nx.power(diff_quantiles, p), axis=0)
134134

135135

0 commit comments

Comments
 (0)