Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-29 Thread 'Animesh Shree' via sage-devel
Ok, I will do the same. On Thursday, February 29, 2024 at 12:11:56 AM UTC+5:30 Dima Pasechnik wrote: > On Wed, Feb 28, 2024 at 5:42 PM 'Animesh Shree' via sage-devel < > sage-...@googlegroups.com> wrote: > >> reason scipy factors only square sparse matrices >&

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-28 Thread 'Animesh Shree' via sage-devel
s people to adopt "SuperLU" >> factorisations over >> the classical PLU sparse decomposition - namely, it's more stable. >> Perhaps it should be made the Sage's default for sparse RDF matrices, too. >> By the way, >> https://portal.nersc.gov/project/sparse/

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-28 Thread 'Animesh Shree' via sage-devel
I am currently working for RDF and CDF mainly. I was planning to overload LU function of *sage/matrix/matrix2.pyx* by defining new LU in *sage/matrix/matrix_double_sparce.pyx* . I couldn't understand what is multiprecision version but I guess you are asking for RR or other inexact field.

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-28 Thread 'Animesh Shree' via sage-devel
be made the Sage's default for sparse RDF matrices, too. > By the way, https://portal.nersc.gov/project/sparse/superlu/superlu_ug.pdf > (the manual for the upstream superlu) says it can handle non-square > matrices. > > Dima > > > > > > > > > On Wed, Feb 28

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-28 Thread 'Animesh Shree' via sage-devel
* input) before using the perm_r^(-1) * L * U >>> as perm_r^(-1) * L * U is PLU decomposition of Original_matrix*perm_c >>> >>> https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.SuperLU.html >>> >>> A = Pr^(-1) *L*U * Pc^(-1) # as

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-28 Thread 'Animesh Shree' via sage-devel
(-1) # as told by *Nils Bruin* > or > scipy's splu will not do. > > On Tuesday, February 27, 2024 at 11:57:02 PM UTC+5:30 Dima Pasechnik wrote: > >> >> >> On 27 February 2024 17:25:51 GMT, 'Animesh Shree' via sage-devel < >> sage-...@googlegroups.com&g

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-28 Thread 'Animesh Shree' via sage-devel
t; > On 27 February 2024 17:25:51 GMT, 'Animesh Shree' via sage-devel < > sage-...@googlegroups.com> wrote: > >This works good if input is square and I also checked on your idea of > >padding zeros for non square matrices. > >I am currently concerned about the per

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-27 Thread 'Animesh Shree' via sage-devel
s not permutation matrix. > > On Tuesday, February 27, 2024 at 10:03:25 PM UTC+5:30 Dima Pasechnik wrote: > >> >> >> On 27 February 2024 15:34:20 GMT, 'Animesh Shree' via sage-devel < >> sage-...@googlegroups.com> wrote: >> >I tried scipy which uses superLU

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-27 Thread 'Animesh Shree' via sage-devel
>>> # perm = a.I * a.T >>> a.I*a.T matrix([[-1., -5.], [ 1., 4.]]) >>> the output is not permutation matrix. On Tuesday, February 27, 2024 at 10:03:25 PM UTC+5:30 Dima Pasechnik wrote: > > > On 27 February 2024 15:34:20 GMT, 'Animesh Shree' via

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-27 Thread 'Animesh Shree' via sage-devel
matrix. On Tuesday, February 27, 2024 at 10:03:25 PM UTC+5:30 Dima Pasechnik wrote: > > > On 27 February 2024 15:34:20 GMT, 'Animesh Shree' via sage-devel < > sage-...@googlegroups.com> wrote: > >I tried scipy which uses superLU. We get the result but there is li

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-27 Thread 'Animesh Shree' via sage-devel
I tried scipy which uses superLU. We get the result but there is little bit of issue. --For Dense-- The dense matrix factorization gives this output using permutation matrix sage: a = Matrix(RDF, [[1, 0],[2, 1]], sparse=True) sage: a [1.0 0.0] [2.0 1.0] sage: p,l,u = a.dense_matrix().LU() sage:

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-05 Thread 'Animesh Shree' via sage-devel
I tried to use ctypes pythonapi to extract PyCapsule_New objects using PyCapsule_GetPointer. But got erorr : *ArgumentError: argument 1: TypeError: Don't know how to convert parameter 1* Attaching file

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-02-05 Thread 'Animesh Shree' via sage-devel
The other library that scipy uses is SuperLU : https://portal.nersc.gov/project/sparse/superlu/ for the function scipy.sparse.linalg.splu : https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.splu.html#scipy-sparse-linalg-splu Scipy supports only factorization for square

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-01-29 Thread 'Animesh Shree' via sage-devel
5:30 Dima Pasechnik wrote: > >> On Fri, Jan 19, 2024 at 9:35 AM 'Animesh Shree' via sage-devel >> wrote: >> > >> > I have been looking into sparse matrix LU decomposition issue. >> > >> > In that conversation SuiteSparse is proposed to handle sp

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-01-29 Thread 'Animesh Shree' via sage-devel
: > >> On Fri, Jan 19, 2024 at 9:35 AM 'Animesh Shree' via sage-devel >> wrote: >> > >> > I have been looking into sparse matrix LU decomposition issue. >> > >> > In that conversation SuiteSparse is proposed to handle sparse matrix >>

Re: [sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-01-19 Thread 'Animesh Shree' via sage-devel
Thank You I am looking into it On Friday, January 19, 2024 at 3:43:29 PM UTC+5:30 Dima Pasechnik wrote: > On Fri, Jan 19, 2024 at 9:35 AM 'Animesh Shree' via sage-devel > wrote: > > > > I have been looking into sparse matrix LU decomposition issue. > > > > In

[sage-devel] SuiteSparse and sage and sparse_matrix.LU()

2024-01-19 Thread 'Animesh Shree' via sage-devel
I have been looking into sparse matrix LU decomposition issue . In that conversation SuiteSparse is proposed to handle sparse matrix decomposition. What I could find that it is