-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
With Julia nightly, there is a clash of exported symbols:
julia> arr = reshape(1:24, 2, 3, 4);
julia> rank"summary 2"(arr)
WARNING: both JuliennedArrays and Base export "Slices"; uses of it in module JJ must be qualified
ERROR: UndefVarError: Slices not defined
Stacktrace:
[1] enframe(data::Base.ReshapedArray{Int64, 3, UnitRange{Int64}, Tuple{}}, rank::Val{2})
@ JJ ~/.julia/packages/JJ/Qh6eT/src/julienned.jl:22
[2] (::JJ.RankedMonad{typeof(summary), 2})(x::Base.ReshapedArray{Int64, 3, UnitRange{Int64}, Tuple{}})
@ JJ ~/.julia/packages/JJ/Qh6eT/src/ranked.jl:46
[3] top-level scope
@ REPL[6]:1
julia> @eval JJ const Slices = JuliennedArrays.Slices # seems necc on master
JuliennedArrays.Slices
julia> rank"summary 2"(arr)
4-element Vector{String}:
"2×3 view(reshape(::UnitRange{In" ⋯ 35 bytes ⋯ ".OneTo(3), 1) with eltype Int64"
"2×3 view(reshape(::UnitRange{In" ⋯ 35 bytes ⋯ ".OneTo(3), 2) with eltype Int64"
"2×3 view(reshape(::UnitRange{In" ⋯ 35 bytes ⋯ ".OneTo(3), 3) with eltype Int64"
"2×3 view(reshape(::UnitRange{In" ⋯ 35 bytes ⋯ ".OneTo(3), 4) with eltype Int64"
julia> map(summary, eachslice(arr, dims=3))
4-element Vector{String}:
"2×3 view(reshape(::UnitRange{Int64}, 2, 3, 4), :, :, 1) with eltype Int64"
"2×3 view(reshape(::UnitRange{Int64}, 2, 3, 4), :, :, 2) with eltype Int64"
"2×3 view(reshape(::UnitRange{Int64}, 2, 3, 4), :, :, 3) with eltype Int64"
"2×3 view(reshape(::UnitRange{Int64}, 2, 3, 4), :, :, 4) with eltype Int64"This is due to JuliaLang/julia#32310, which makes eachslice more powerful; this should arguably be used instead of JuliennedArrays now.
(You may also wish to watch JuliaLang/julia#43334, which is roughly the other half of JuliennedArrays.)
Metadata
Metadata
Assignees
Labels
No labels