stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

`lstsq`: return correct array size

Open perazz opened this issue 1 year ago • 1 comments

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 avatar May 16 '24 17:05 perazz

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

perazz avatar May 18 '24 12:05 perazz