<div dir="ltr"><div>Due their historical evolution, there are certain LAPACK wrappers that are not standardized. Some work with minimum lwork variables instead of their optimal values. Also these routines often return quite big arrays during the lwork queries, to demonstrate :<br></div><div><br></div><div><span style="font-family:monospace,monospace">import scipy.linalg as la<br></span></div><div><span style="font-family:monospace,monospace">la.lapack.dgeqrf(a=np.random.rand(400,400), lwork=-1)</span></div><div><br></div><div>is a workspace size query (via lwork=-1). The current default size is "3*a.shape[0] + 1" hence 1201. However the optimal workspace size is 12800 on my machine. Therefore the mismatch is sometimes quite dramatic especially in some other routines. Notice also that to obtain this number the routine actually returns a 400-long array tau and requires the input matrix to be transferred back and forth. Moreover, they can't be handled via scipy.linalg.lapack._compute_lwork function.<br></div><div><br></div><div>There are a few routines like this and I feel like they should be fixed and I'm willing to. However this means that their output signature is going to change which imply backwards compatibility breaks. I tried to see whether we could deprecate them with new wrappers with modified names, but to be honest, that would create too many duplicates. On the other hand I don't have a feeling of how much break this would mean out there in the wild. <br></div><div><br></div><div>Is this break an acceptable one or not? (well, none is acceptable preferably, but in despair...)<br></div><div><br></div><div></div><div>Any other alternatives, thoughts are most welcome.<br></div><div><br></div><div>best,</div><div>ilhan<br></div></div>