Skip to content

Commit a79950d

Browse files
authored
Remove redundant abs()
1 parent 5835016 commit a79950d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)