Skip to content

Commit a42ace5

Browse files
committed
Move function to fix compilation error
1 parent f8db6d9 commit a42ace5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/ITensorsExtensions/src/itensor.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ function make_bosonic(A::ITensor, Linds, Rinds)
8585
return permute(A, ordered_inds)
8686
end
8787

88-
function check_input(::typeof(map_eigvals), f, A, Linds, Rinds)
89-
all(x -> x isa Index, Linds) || error("Left indices must be a collection of Index")
90-
all(x -> x isa Index, Rinds) || error("Right indices must be a collection of Index")
91-
end
92-
9388
function map_eigvals(f::Function, A::ITensor, Linds, Rinds; kws...)
9489
check_input(map_eigvals, f, A, Linds, Rinds)
9590

@@ -119,6 +114,11 @@ function map_eigvals(f::Function, A::ITensor, Linds, Rinds; kws...)
119114
return mapped_A
120115
end
121116

117+
function check_input(::typeof(map_eigvals), f, A, Linds, Rinds)
118+
all(x -> x isa Index, Linds) || error("Left indices must be a collection of Index")
119+
all(x -> x isa Index, Rinds) || error("Right indices must be a collection of Index")
120+
end
121+
122122
# Analagous to `denseblocks`.
123123
# Extract the diagonal entries into a diagonal tensor.
124124
function diagblocks(D::Tensor)

0 commit comments

Comments
 (0)