We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18c3530 commit 3318615Copy full SHA for 3318615
src/fillalgebra.jl
@@ -20,11 +20,11 @@ end
20
21
permutedims(a::AbstractFillMatrix) = fillsimilar(a, reverse(axes(a)))
22
23
-function permutedims(B::AbstractFill, perm)
24
- dimsB = size(B)
25
- ndimsB = length(dimsB)
+Base.@constprop :aggressive function permutedims(B::AbstractFill, perm)
+ dimsB = axes(B)
+ ndimsB = ndims(B)
26
(ndimsB == length(perm) && isperm(perm)) || throw(ArgumentError("no valid permutation of dimensions"))
27
- dimsP = ntuple(i->dimsB[perm[i]], ndimsB)::typeof(dimsB)
+ dimsP = ntuple(i->dimsB[perm[i]], ndimsB)
28
fillsimilar(B, dimsP)
29
end
30
0 commit comments