diff --git a/src/ImageAxes.jl b/src/ImageAxes.jl index dee59d0..26d78c8 100644 --- a/src/ImageAxes.jl +++ b/src/ImageAxes.jl @@ -234,6 +234,8 @@ end Base.parent(S::StreamingContainer) = S.parent Base.indices(S::StreamingContainer) = indices(S.parent) Base.size(S::StreamingContainer) = size(S.parent) +Base.indices(S::StreamingContainer, d) = indices(S.parent, d) +Base.size(S::StreamingContainer, d) = size(S.parent, d) AxisArrays.axes(S::StreamingContainer) = axes(parent(S)) AxisArrays.axisnames(S::StreamingContainer) = axisnames(axes(S)...) diff --git a/test/runtests.jl b/test/runtests.jl index bbe340a..a703007 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -195,6 +195,8 @@ end S = @inferred6(StreamingContainer{Float64}(f!, P, Axis{:time}())) @test @inferred(indices(S)) === (Base.OneTo(3), Base.OneTo(4)) @test @inferred(size(S)) == (3,4) + @test @inferred(indices(S, 2)) === Base.OneTo(4) + @test @inferred(size(S, 1)) === 3 @test @inferred(length(S)) == 12 @test @inferred(axisnames(S)) == (:x, :time) @test @inferred(axisvalues(S)) === (Base.OneTo(3), Base.OneTo(4))