stdlib
stdlib copied to clipboard
`lstsq`: return correct array size
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
*GESVinterface
- if also
- Function interface: always return
size(x,1)==n
cc: @jvdp1 @jalvesz @loiseaujc
Thanks a lot @jvdp1. I will wait another couple of days and then merge, if there are no further comments.