New keyword name for linalg.lu

Ilhan Polat <[email protected]>
Newsgroups gmane.comp.python.scientific.devel
Message-ID <CAEBuzr9DGAp2n-iN1cZ=eeXa_YEpxQtHaCBOiRhpnDssyx0S8g@mail.gmail.com>
Dear all,

In [1], I have proposed a new keyword for scipy.linalg.lu function, with
prospective name "p_indices" as a bool switch.

This will have the effect of having the permutation matrix P in A = P L U
decomposition returned as a vector of indices such as [3, 1, 2, 0] meaning
first and fourth row is swapped. With this you can still compute A through
L[P, :] @ U without allocating a very costly 2D matrix of 1s and 0s. In
tall arrays, say 400x10, the resulting 2D array P is 400x400 and in the
vector form this reduces to 400x1.

Hence, the switch to control this behavior is done by a new keyword and I
don't know if "p_indices" is a nice one (doesn't feel like it). I
considered, return_indices, perm_as_1d, p_as_1d, p_as_vec and bunch more
but either too many underscores or too verbose.

Thus, I'd like to ask for either validation or new ideas. We should maybe
ping the NumPy audience for this too as this has no counterpart in NumPy.

Thanks,
ilhan

[1] : https://github.com/scipy/scipy/pull/18358

_______________________________________________
SciPy-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-dev.python.org/
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.