From ee1f88f45ec8f15fab9cae3dae97984eaadce67e Mon Sep 17 00:00:00 2001 From: suda-yuga Date: Wed, 25 Jun 2025 21:08:15 +0900 Subject: [PATCH] Replace np.sum(a * b) with np.vdot(a, b) --- lectures/opt_transport.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/opt_transport.md b/lectures/opt_transport.md index e6d1ab348..30dc9ae5c 100644 --- a/lectures/opt_transport.md +++ b/lectures/opt_transport.md @@ -681,7 +681,7 @@ X Sure enough, we have the same solution and the same cost ```{code-cell} ipython3 -total_cost = np.sum(X * C) +total_cost = np.vdot(X, C) total_cost ```