x = [1 2 3 4 5;
6 7 8 9 10]
data = MLUtils.slidingwindow(x, size=2)
# works as adverised:
MLUtils.getobs(data, 1)
# 2×2 Matrix{Int64}:
# 1 2
# 6 7
MLUtils.getobs(data, 1:2)
# ERROR: MethodError: no method matching getindex(::MLUtils.SlidingWindow{Matrix{Int64}}, ::UnitRange{Int64})
# The function `getindex` exists, but no method is defined for this combination of argument types.
The code only implements a single integer, as far as I could tell.
The doc-string suggests the above ought to have worked: "When indexing the data is accessed as getobs(data, idxs), with idxs an appropriate range of indexes."