Closed max-vassili3v closed 1 month ago
This may be more general, no?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.90%. Comparing base (
f659d9f
) to head (e84270d
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@max-vassili3v Can you add this for more general OneElement
? At the very least OneElementVector
.
Implemented for more general OneElements
, I originally excluded the implementation for OneElementVector
since permutedims(::AbstractVector)
uses reshape
which keeps it as a OneElement
Incidentally, the vector case already works on master
, although we perhaps need a specialized method anyway. Perhaps we may define the method in terms of the reshape
, as in Base
. This way, it'll stay consistent.
julia> o = OneElement(1, 1, 2)
2-element OneElement{Int64, 1, Tuple{Int64}, Tuple{Base.OneTo{Int64}}}:
1
⋅
julia> permutedims(o)
1×2 OneElement{Int64, 2, Tuple{Int64, Int64}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}:
1 ⋅
overload permutedims for OneElementMatrix to return OneElement