(samples_source, samples_target)
| 130 | |
| 131 | |
| 132 | def benchmark_batch(samples_source, samples_target): |
| 133 | start = perf_counter() |
| 134 | M_batch = ot.dist_batch(samples_source, samples_target) |
| 135 | res_batch = ot.solve_batch( |
| 136 | M=M_batch, reg=reg, max_iter=max_iter, tol=tol, reg_type="entropy" |
| 137 | ) |
| 138 | end = perf_counter() |
| 139 | return end - start |
| 140 | |
| 141 | |
| 142 | time_naive = benchmark_naive(samples_source, samples_target) |