-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
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
Improve transpose
, adjoint
of vector StridedView
#5
Conversation
I am a bit hesitant about this. This means that |
Oh good point, I hadn't considered that usage of |
I think adding these lines below line 172 would also resolve your issue: function sreshape(a::LinearAlgebra.AdjointAbsVec, newsize::Dims)
return sreshape(conj(StridedView(adjoint(a))), newsize)
end
function sreshape(a::LinearAlgebra.TransposeAbsVec, newsize::Dims)
return sreshape(StridedView(transpose(a)), newsize)
end |
From CI, it seems like I will also have to check what is going on with Aqua.jl ? |
That looks like a good fix, thanks. I can update this PR with that fix and look into the Aqua issue. |
That would be great, it's getting a bit late here to focus and do stuff properly. Feel free to bump the patch version while you are at it, then I can merge tomorrow morning if all lights turn green and immediately register the new version. |
Ok, I changed it over to your fix, updated the tests, and updated to the latest Aqua syntax (I just removed the Looks like the CI needs your approval to run. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5 +/- ##
==========================================
+ Coverage 93.52% 93.67% +0.14%
==========================================
Files 4 4
Lines 170 174 +4
==========================================
+ Hits 159 163 +4
Misses 11 11 ☔ View full report in Codecov by Sentry. |
Hi @Jutho, this makes it so that
transpose
andadjoint
of vectorStridedView
remains aStridedView
.I did this by generalizing
transpose
andadjoint
to support both matrix and vectorStridedView
by callingpermutedims(::StridedView)
, and then making sure that works for vectorStridedView
by callingsreshape
(so this PR also fixespermutedims(::StridedView)
for vectorStridedView
as well). Open to other approaches.