Skip to content

Commit 62e29e2

Browse files
authored
Merge pull request #380 from sceptri/master
Fixed bounds of dataset iteration
2 parents 583d5a7 + 79cd258 commit 62e29e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/problem/set.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function get_oop_args(x::DataDrivenDataset{N,W,C}) where {N,W,C}
172172
else
173173
map(copyto!, (X[:, last:s], p, t[last:s]), get_oop_args(x.probs[i])[1:3])
174174
end
175-
last += s
175+
last = s + 1
176176
end
177177
return (X, p, t, U)
178178
end
@@ -187,7 +187,7 @@ function get_implicit_oop_args(x::DataDrivenDataset{N,W,C}) where {N,W,C}
187187
else
188188
map(copyto!, (X[:, last:s], p, t[last:s]), get_implicit_oop_args(x.probs[i])[1:3])
189189
end
190-
last += s
190+
last = s + 1
191191
end
192192
return (X, p, t, U)
193193
end
@@ -201,7 +201,7 @@ function (b::AbstractBasis)(dx::AbstractMatrix, d::DataDrivenDataset)
201201
last = 1
202202
@views for (i,s) in enumerate(cumsum(d.sizes))
203203
b(dx[:, last:s], d.probs[i])
204-
last += s
204+
last = s + 1
205205
end
206206
return
207207
end

0 commit comments

Comments
 (0)