We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This would work if A were a normal matrix:
A
julia> A = @SMatrix randn(2,2) 2×2 SMatrix{2, 2, Float64, 4} with indices SOneTo(2)×SOneTo(2): -0.663672 2.31438 0.166198 1.26303 julia> dropdims(mean(A; dims=2); dims=2) ERROR: TypeError: in typeassert, expected Tuple{SOneTo{1}}, got a value of type Tuple{SOneTo{2}} Stacktrace: [1] _dropdims(A::SMatrix{2, 1, Float64, 2}, dims::Tuple{Int64}) @ Base ./abstractarraymath.jl:92 [2] _dropdims(A::SMatrix{2, 1, Float64, 2}, dim::Int64) @ Base ./abstractarraymath.jl:94 [3] dropdims(A::SMatrix{2, 1, Float64, 2}; dims::Int64) @ Base ./abstractarraymath.jl:82 [4] top-level scope @ REPL[26]:1
The text was updated successfully, but these errors were encountered:
I'm running into the same thing:
julia> mm = MArray{Tuple{3,3,1},Float64}(rand(3,3,1)) 3×3×1 MArray{Tuple{3, 3, 1}, Float64, 3, 9} with indices SOneTo(3)×SOneTo(3)×SOneTo(1): [:, :, 1] = 0.0306304 0.0559625 0.409032 0.147117 0.462261 0.614837 0.20505 0.940826 0.937225 julia> dropdims(mm, dims=3) ERROR: TypeError: in typeassert, expected Tuple{SOneTo{3}, SOneTo{1}}, got a value of type Tuple{SOneTo{3}, SOneTo{3}} Stacktrace: [1] _dropdims(A::MArray{Tuple{3, 3, 1}, Float64, 3, 9}, dims::Tuple{Int64}) @ Base ./abstractarraymath.jl:92 [2] _dropdims(A::MArray{Tuple{3, 3, 1}, Float64, 3, 9}, dim::Int64) @ Base ./abstractarraymath.jl:94 [3] dropdims(A::MArray{Tuple{3, 3, 1}, Float64, 3, 9}; dims::Int64) @ Base ./abstractarraymath.jl:82 [4] top-level scope @ REPL[27]:1
Sorry, something went wrong.
No branches or pull requests
This would work if
A
were a normal matrix:The text was updated successfully, but these errors were encountered: