-
Notifications
You must be signed in to change notification settings - Fork 1
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
Enhance qr
function with mode
argument
#114
Conversation
I see the problem but I don't think this is the solution. In the documentation of
I would default to retrieving the thin |
Okay, this also makes sense. In this way we always get |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #114 +/- ##
=======================================
Coverage 0.23% 0.23%
=======================================
Files 14 14
Lines 862 862
=======================================
Hits 2 2
Misses 860 860
☔ View full report in Codecov by Sentry. |
Is the PR ready? |
Yes! |
Summary
Currently, the
qr
decomposition on aTensor
t defaults to the "full" mode, which given a matrix(M, N)
withM>N
we get aQ
matrix with size(M, M)
andR
with size(N, N)
. This is counter-intuitive since these two tensors share a virtual index but they do not have the same dimensions.In this PR we fix this by adding a
mode
argument to theqr
function (which by default is set to:reduced
). Withmode=:reduced
, it will ensure that the dimensions of the virtual index match and withmode=:full
theqr
functions returns the full matrices.Example of usage
This enhancement facilitates more intuitive operations as illustrated below: