Re: New keyword name for linalg.lu
Ilhan Polat <[email protected]> Mon, 22 May 2023 18:18:25 +0200
| Newsgroups | gmane.comp.python.scientific.devel |
|---|---|
| Message-ID | <CAEBuzr-i5wUVjxaKtmWiPF1GPDdwTEY9obEH6ww52c7gK+nBaQ@mail.gmail.com> |
That breaks practically all LU code out there so we have to keep the array return for quite a while before we attempt deprecating it. On Mon, May 22, 2023 at 3:33 PM Christian Lorentzen <[email protected]> wrote: > Hi > How about returning the most efficient one, probably a 1-dim ndarray and > then providing good examples and/or utility functions for this returned > object/ndarray? This way, the LU function does not get overloaded. > > Best > Christian > > Am 22.05.2023 um 08:58 schrieb Ilhan Polat <[email protected]>: > > > Yes indeed that's something I checked but in sparse case there is no > possibility of full array return due to the size constraints hence, say in > SuperLU, they only have "perm_r" and "perm_c" integer 1D arrays anyways for > row and column permutation indices. Also permutation index is a thing in > combinatorics so I have > > p_as_vector = False/True > return_indices = False/True > > so far that doesn't sound confusing and also not that ugly. > > > On Mon, May 22, 2023 at 8:37 AM Todd Bailey <[email protected]> > wrote: > >> Conceptually this seems related to sparse matrices so I wonder if there >> is some helpful terminology there. Your 1D option would return “column >> indices” for the non-zero entries in each row of the 2D option. >> >> Best, >> Todd >> >> On 21 May 2023, at 16:08, Ilhan Polat <[email protected]> wrote: >> >> [snip] >> >> when >> >> P, L, U = scipy.linalg.lu(A) >> >> is run, currently, P is returning a full 2D array. If A is a tall array >> say, (25, 5) then P is necessarily (25, 25). And it is just a permutaiton >> matrix, a row shuffled np.eye(25). Instead, you can ask with this new >> keyword to return that shuffle pattern. as a 1D array and hence P becomes >> (25, ) array. >> [snip] >> Could you please offer some alternatives even just for inspiration? >> >> Best, >> ilhan >> >> >> >> On Tue, Apr 25, 2023 at 9:34 AM Jake Bowhay <[email protected]> wrote: >> >>> It would be nice to add a quick note to the docs explaining when/which >>> you should use. Currently both state "Compute pivoted LU decomposition of a >>> matrix." which while true isn't very helpful for a user trying to decide >>> which function to pick! >>> _______________________________________________ >>> 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] >>> >> _______________________________________________ >> 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] >> >> >> _______________________________________________ >> 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] >> > _______________________________________________ > 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] > > _______________________________________________ > 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] > _______________________________________________ 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]