diff --git a/benchmarks/user/benchmark.py b/benchmarks/user/benchmark.py index 21d5c5664b..a2fdbe4731 100644 --- a/benchmarks/user/benchmark.py +++ b/benchmarks/user/benchmark.py @@ -66,7 +66,7 @@ def run_op(solver, operator, **options): dm = solver.model.dm # Because sometime dm is zero, artificially add a non zero slice if dm.data.min() == 0 and dm.data.max() == 0: - dm.data[..., np.min([25, dm.shape[-1]//4])] = .1 + dm.data[..., np.min([25, dm.shape_global[-1]//4])] = .1 return op(dm, **options) elif operator == "jacobian_adjoint": # I think we want the forward + gradient call, need to merge retvals