You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>using StaticArrays
julia> arr =@MMatrixrand(Int64,4,1)
4×1 MMatrix{4, 1, Int64, 4} with indices SOneTo(4)×SOneTo(1):-1142656121258989149636254653156898121-4641314833637010406-842100514524024656
julia>dropdims(arr, dims=2)
ERROR: TypeError:in typeassert, expected Tuple{SOneTo{1}}, got a value of type Tuple{SOneTo{4}}
Stacktrace:
[1] _dropdims(A::MMatrix{4, 1, Int64, 4}, dims::Tuple{Int64})
@ Base ./abstractarraymath.jl:85
[2] _dropdims(A::MMatrix{4, 1, Int64, 4}, dim::Int64)
@ Base ./abstractarraymath.jl:87
[3] dropdims(A::MMatrix{4, 1, Int64, 4}; dims::Int64)
@ Base ./abstractarraymath.jl:70
[4] top-level scope
@ REPL[3]:1
Jakob Nybo Nissen on Slack:
It looks to me like Base's function is wrong - please make an issue!
Specifically, what happens is that the typeassert in reshape(A, d::typeof(_sub(axes(A), dims))) is not right - it picks up the wrong axes. It works by accident for Base arrays since all axes of Base arrays have the same type
The text was updated successfully, but these errors were encountered:
Minimal example:
Jakob Nybo Nissen on Slack:
The text was updated successfully, but these errors were encountered: