diff --git a/cvxtorch/torch_numerics/affine/upper_tri.py b/cvxtorch/torch_numerics/affine/upper_tri.py index d02b02e..1af51c9 100644 --- a/cvxtorch/torch_numerics/affine/upper_tri.py +++ b/cvxtorch/torch_numerics/affine/upper_tri.py @@ -1,6 +1,7 @@ import torch from cvxpy.expressions.expression import Expression + def torch_numeric(expr: Expression, values: list[torch.Tensor]) -> torch.Tensor: inds = torch.triu_indices(row=values[0].shape[0], col=values[0].shape[1], offset=1) # This can be simplified as `return values[0][*inds]`. However, this doesn't work on <3.11.