From 2bfad937e138f367476d64897334b84dfa51e523 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Tue, 25 Nov 2025 13:03:26 -0500 Subject: [PATCH] Improve code logic of bipermutedims --- Project.toml | 2 +- src/matricize.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index bf89042..b05c4cc 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TensorAlgebra" uuid = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a" authors = ["ITensor developers and contributors"] -version = "0.5.2" +version = "0.5.3" [deps] ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" diff --git a/src/matricize.jl b/src/matricize.jl index 625b508..2e29b4d 100644 --- a/src/matricize.jl +++ b/src/matricize.jl @@ -50,12 +50,12 @@ function bipermutedims!(a_dest::AbstractArray, a_src::AbstractArray, perm1, perm return permuteblockeddims!(a_dest, a_src, perm1, perm2) end function bipermutedims(a::AbstractArray, biperm::AbstractBlockPermutation{2}) - return permuteblockeddims(a, biperm) + return bipermutedims(a, blocks(biperm)...) end function bipermutedims!( a_dest::AbstractArray, a_src::AbstractArray, biperm::AbstractBlockPermutation{2} ) - return permuteblockeddims!(a_dest, a_src, biperm) + return bipermutedims!(a_dest, a_src, blocks(biperm)...) end # Older interface.