Skip to content

Commit 3852842

Browse files
committed
add square checks
1 parent afcd148 commit 3852842

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/factorizations/matrixalgebrakit.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ for f! in (
3131
:left_polar!, :right_polar!,
3232
)
3333
@eval function MAK.$f!(t::AbstractTensorMap, F, alg::AbstractAlgorithm)
34+
$(f! in (:eig_full!, :eigh_full!) && :(LinearAlgebra.checksquare(t)))
3435
foreachblock(t, F...) do _, (tblock, Fblocks...)
3536
Fblocks′ = $f!(tblock, Fblocks, alg)
3637
# deal with the case where the output is not in-place
@@ -50,6 +51,7 @@ for f! in (
5051
:project_hermitian!, :project_antihermitian!, :project_isometric!,
5152
)
5253
@eval function MAK.$f!(t::AbstractTensorMap, N, alg::AbstractAlgorithm)
54+
$(f! in (:eig_vals!, :eigh_vals!, :project_hermitian!, :project_antihermitian!) && :(LinearAlgebra.checksquare(t)))
5355
foreachblock(t, N) do _, (tblock, Nblock)
5456
Nblock′ = $f!(tblock, Nblock, alg)
5557
# deal with the case where the output is not the same as the input

0 commit comments

Comments
 (0)