Skip to content

Commit cdd2503

Browse files
committed
Fix compat with older julia
1 parent 59474cc commit cdd2503

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/strategies/basic.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ function MLJTuning.models(
148148
n_particles = tuning.n_particles
149149
if !isnothing(history)
150150
sig = MLJTuning.signature(first(history).measure)
151-
pbest!(state, tuning, map(h -> sig * h.measurement[1], last(history, n_particles)))
151+
pbest!(state, tuning, map(h -> sig * h.measurement[1],
152+
history[end-n_particles+1:end]))
152153
gbest!(state, tuning)
153154
move!(state, tuning)
154155
end

0 commit comments

Comments
 (0)