Skip to content

lstsq: return correct array size #818

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
May 21, 2024
Merged

Conversation

perazz
Copy link
Member

@perazz perazz commented May 16, 2024

Fix #817.

for Ax=b with shape(A) == [m, n]:

  • Subroutine interface: allow size(x,1)>=n.
    • if also size(x,1)>=m: use as temporary storage and do not reallocate
    • otherwise: allocate temporary for *GESV interface
  • Function interface: always return size(x,1)==n

cc: @jvdp1 @jalvesz @loiseaujc

@perazz perazz marked this pull request as ready for review May 16, 2024 18:01
Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thank you

@perazz
Copy link
Member Author

perazz commented May 18, 2024

Thanks a lot @jvdp1. I will wait another couple of days and then merge, if there are no further comments.

@perazz perazz merged commit 5fd9924 into fortran-lang:master May 21, 2024
17 checks passed
@perazz perazz deleted the fix_lstsq_fun branch May 21, 2024 09:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue/Question about the output of lstsq
2 participants