Skip to content

Commit

Permalink
Fix resize!()
Browse files Browse the repository at this point in the history
  • Loading branch information
orso82 committed Oct 31, 2024
1 parent fe6a913 commit c564053
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ function Base.resize!(pv::AbstractParametersVector, n::Int)
d = n - length(pv._aop)
if d > 0
for k in 1:d
push!(pv._aop, eltype(pv)())
push!(pv, eltype(pv)())
end
elseif d < 0
for k in 1:-d
pop!(pv._aop)
pop!(pv)
end
end

Expand Down

0 comments on commit c564053

Please sign in to comment.