From 00d1d2388f3b21a64ed37b34f1ebefefb422c3e4 Mon Sep 17 00:00:00 2001 From: Jutho Date: Thu, 4 Jan 2024 15:00:23 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Lukas <37111893+lkdvos@users.noreply.github.com> --- src/planar/planaroperations.jl | 2 -- src/planar/preprocessors.jl | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/planar/planaroperations.jl b/src/planar/planaroperations.jl index 1d04b764..ee23bcd7 100644 --- a/src/planar/planaroperations.jl +++ b/src/planar/planaroperations.jl @@ -61,7 +61,6 @@ function planarcontract!(C::AbstractTensorMap{S,N₁,N₂}, codB, domB = codomainind(B), domainind(B) oindA, cindA = pA cindB, oindB = pB - # @show codA, domA, codB, domB, oindA, cindA, oindB, cindB, pAB oindA, cindA, oindB, cindB = reorder_indices(codA, domA, codB, domB, oindA, cindA, oindB, cindB, pAB...) @@ -92,7 +91,6 @@ _cyclicpermute(t::Tuple{}) = () function reorder_indices(codA, domA, codB, domB, oindA, oindB, p1, p2) N₁ = length(oindA) N₂ = length(oindB) - # @show codA, domA, codB, domB, oindA, oindB, p1, p2 @assert length(p1) == N₁ && all(in(p1), 1:N₁) @assert length(p2) == N₂ && all(in(p2), N₁ .+ (1:N₂)) oindA2 = TupleTools.getindices(oindA, p1) diff --git a/src/planar/preprocessors.jl b/src/planar/preprocessors.jl index 00b8ec5b..7f93560f 100644 --- a/src/planar/preprocessors.jl +++ b/src/planar/preprocessors.jl @@ -375,7 +375,7 @@ function _remove_braidingtensors!(ex, indexmap) # ex is guaranteed to be a singl newarg, unchanged = _remove_braidingtensors!(ex.args[3], indexmap) return Expr(:call, :\, ex.args[2], newarg), unchanged else - error("unexpected expression $ex") + throw(ArgumentError("unexpected expression $ex")) end end