File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,8 +10,12 @@ function check_and_prepare_eig_cotangents(
1010 if ! iszerotangent (ΔV)
1111 n == size (ΔV, 1 ) || throw (DimensionMismatch ())
1212 length (indV) == size (ΔV, 2 ) || throw (DimensionMismatch ())
13- ΔV₁ = zero (V)
14- ΔV₁[:, indV] = ΔV
13+ if indV == 1 : p
14+ ΔV₁ = copy (ΔV)
15+ else
16+ ΔV₁ = zero (V)
17+ ΔV₁[:, indV] = ΔV
18+ end
1519 VᴴΔV₁ = V' * ΔV₁
1620 if p == n
1721 ΔV₊ = zero! (ΔV₁)
Original file line number Diff line number Diff line change @@ -10,8 +10,12 @@ function check_and_prepare_eigh_cotangents(
1010 if ! iszerotangent (ΔV)
1111 n == size (ΔV, 1 ) || throw (DimensionMismatch ())
1212 length (indV) == size (ΔV, 2 ) || throw (DimensionMismatch ())
13- ΔV₁ = zero (V)
14- ΔV₁[:, indV] = ΔV
13+ if indV == 1 : p
14+ ΔV₁ = copy (ΔV)
15+ else
16+ ΔV₁ = zero (V)
17+ ΔV₁[:, indV] = ΔV
18+ end
1519 VᴴΔV₁ = V' * ΔV₁
1620 if p == n
1721 ΔV₊ = zero! (ΔV₁)
You can’t perform that action at this time.
0 commit comments