Skip to content

Commit 4f332bb

Browse files
use checkbounds in getindex(::FiniteMPS, ::Int)
Co-authored-by: Lukas Devos <[email protected]>
1 parent 0f0ba73 commit 4f332bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/states/finitemps.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Base.@propagate_inbounds function Base.getindex(ψ::FiniteMPS, i::Int)
286286
c = ψ.center
287287

288288
@boundscheck begin
289-
(1 <= i <= length(ψ)) || throw(BoundsError, i))
289+
checkbounds, i)
290290
end
291291

292292
if isinteger(c)

0 commit comments

Comments
 (0)