Skip to content

Commit 588941b

Browse files
committed
make ind functions consistent
1 parent 56be3ce commit 588941b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/pullbacks/eig.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ across eigenvectors associated with degenerate eigenvalues), so the correspondin
211211
`ΔV` are projected out.
212212
"""
213213
function remove_eig_gauge_dependence!(
214-
ΔV, D, V, ind = axes(ΔV, 2);
214+
ΔV, D, V, ind = Colon();
215215
degeneracy_atol = MatrixAlgebraKit.default_pullback_gauge_atol(D)
216216
)
217-
length(ind) == size(ΔV, 2) || throw(DimensionMismatch())
218217
indV = axes(V, 2)[ind]
218+
length(indV) == size(ΔV, 2) || throw(DimensionMismatch("Incompatible size of selected `ind` and `ΔV`"))
219219
Vp = view(V, :, indV)
220220
Ddiag = view(diagview(D), indV)
221221
gaugepart = Vp' * ΔV

src/pullbacks/eigh.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,11 @@ across eigenvectors associated with degenerate eigenvalues), so the correspondin
201201
components of `V' * ΔV` are projected out.
202202
"""
203203
function remove_eigh_gauge_dependence!(
204-
ΔV, D, V, ind = axes(ΔV, 2);
204+
ΔV, D, V, ind = Colon();
205205
degeneracy_atol = MatrixAlgebraKit.default_pullback_gauge_atol(D)
206206
)
207-
length(ind) == size(ΔV, 2) || throw(DimensionMismatch())
208207
indV = axes(V, 2)[ind]
208+
length(indV) == size(ΔV, 2) || throw(DimensionMismatch("Incompatible size of selected `ind` and `ΔV`"))
209209
Vp = view(V, :, indV)
210210
Ddiag = view(diagview(D), indV)
211211
gaugepart = project_antihermitian!(Vp' * ΔV)

0 commit comments

Comments
 (0)