diff --git a/src/arrays.jl b/src/arrays.jl index ac74050e2..bfd06b46f 100644 --- a/src/arrays.jl +++ b/src/arrays.jl @@ -81,6 +81,13 @@ function Base.show(io::IO, aop::ArrayOp) end end +Base.summary(io::IO, aop::ArrayOp) = Base.array_summary(io, aop, shape(aop)) +function Base.showarg(io::IO, aop::ArrayOp, toplevel) + show(io, aop) + toplevel && print(io, "::", typeof(aop)) + return nothing +end + symtype(a::ArrayOp{T}) where {T} = T istree(a::ArrayOp) = true function operation(a::ArrayOp) @@ -208,7 +215,7 @@ function make_shape(output_idx, expr, ranges=Dict()) end mi = matches[i] @assert !isempty(mi) - return get_extents(mi) + return Base.OneTo(length(get_extents(mi))) elseif i isa Integer return Base.OneTo(1) end diff --git a/test/arrays.jl b/test/arrays.jl index 24626a3b6..68c8f6ead 100644 --- a/test/arrays.jl +++ b/test/arrays.jl @@ -408,4 +408,4 @@ end @test_throws BoundsError k[-1] @test_throws BoundsError k[4] -end \ No newline at end of file +end