Re: [Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-10 Thread CJ Carey
I agree that this seems more like a scipy feature than a numpy feature. Users with structured matrices often use a sparse matrix format, though the API for using them in solvers could use some work. (I have a work-in-progress PR along those lines here: https://github.com/scipy/scipy/pull/6331) Pe

Re: [Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-10 Thread Ilhan Polat
I've done some benchmarking and it seems that the packed storage comes with a runtime penalty which agrees with a few links I've found online https://blog.debroglie.net/2013/09/01/lapack-and-packed-storage/ http://stackoverflow.com/questions/8941678/lapack-are-operations-on-packed-storage-matrices

Re: [Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-09 Thread Robert Kern
On Mon, Jan 9, 2017 at 7:10 PM, Ilhan Polat wrote: > > Yes, that's precisely the case but when we know the structure we can just choose the appropriate solver anyhow with a little bit of overhead. What I mean is that, to my knowledge, FORTRAN routines for checking for triangularness etc. are absen

Re: [Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-09 Thread Ilhan Polat
Yes, that's precisely the case but when we know the structure we can just choose the appropriate solver anyhow with a little bit of overhead. What I mean is that, to my knowledge, FORTRAN routines for checking for triangularness etc. are absent. On Tue, Jan 10, 2017 at 2:29 AM, Robert Kern wrote:

Re: [Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-09 Thread Robert Kern
On Mon, Jan 9, 2017 at 5:09 PM, Ilhan Polat wrote: > So every test in the polyalgorithm is cheaper than the next one. I'm not exactly sure what might be the best strategy yet hence the question. It's really interesting that LAPACK doesn't have this type of fast checks. In Fortran LAPACK, if you

Re: [Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-09 Thread Ilhan Polat
Indeed, generic is the cheapest discovery including the worst case that only the last off-diagonal element is nonzero, a pseudo code is first remove the diagonals check the remaining parts for nonzero, then check the upper triangle then lower, then morally triangularness from zero structure if any

Re: [Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-09 Thread josef . pktd
On Mon, Jan 9, 2017 at 6:27 AM, Ilhan Polat wrote: > > Note that you're proposing a new scipy feature (right?) on the numpy > list > > > This sounds like a good idea to me. As a former heavy Matlab user I > remember a lot of things to dislike, but "\" behavior was quite nice. > > Correct, I a

Re: [Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-09 Thread Ilhan Polat
> Note that you're proposing a new scipy feature (right?) on the numpy list > This sounds like a good idea to me. As a former heavy Matlab user I remember a lot of things to dislike, but "\" behavior was quite nice. Correct, I am not sure where this might go in. It seemed like a NumPy array o

Re: [Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-09 Thread Ralf Gommers
On Mon, Jan 9, 2017 at 4:17 AM, Ilhan Polat wrote: > > Hi everyone, > > I was stalking the deprecating the numpy.matrix discussion on the other > thread and I wondered maybe the mailing list is a better place for the > discussion about something I've been meaning to ask the dev members. I > thoug

[Numpy-discussion] Fwd: Backslash operator A\b and np/sp.linalg.solve

2017-01-08 Thread Ilhan Polat
Hi everyone, I was stalking the deprecating the numpy.matrix discussion on the other thread and I wondered maybe the mailing list is a better place for the discussion about something I've been meaning to ask the dev members. I thought mailing lists are something we dumped using together with ICQ a