Robert Cimrman | 1 Feb 11:48
Picon

Re: scipy.splinalg or bust

Nathan Bell wrote:
> On Jan 31, 2008 9:21 AM, Robert Cimrman <cimrman3 <at> ntc.zcu.cz> wrote:
>> Great! what about allowing the LinearOperator.__init__() to take care of
>> the cases that aslinearoperator() takes care of? Or
>> LinearOperator.fromany()/fromAny() static/class method?
> 
> I considered that approach but decided against it.  I like keeping
> LinearOperator dead simple since it's what end users will have to
> understand if they want to hook up their matrix-like objects to scipy
> solvers.  Currently aslinearoperator() is the part that "knows" about
> scipy/numpy while LinearOperator is just an abstract interface.
> 
> Another practical issue is that LinearOperator needs to be initialized
> with at least two arguments (shape and matvec) while
> aslinearoperator() only accepts one.  The classmethod approach avoids
> this, but I have a (possibly irrational) dislike for classmethods :)
> 
> Scipy users should understand asarray(), so I think aslinearoperator()
> is a fairly natural extension.

Ok, I have nothing against :)

r.
Nils Wagner | 1 Feb 19:46
Picon
Favicon

Status of minres

Hi Nathan,

I just tried to run minres.

from scipy.splinalg.isolve import minres

y = minres.minres(A,b)

Traceback (most recent call last):
   File "test_minres.py", line 9, in ?
     y = minres.minres(A,b)
   File 
"/usr/lib/python2.4/site-packages/scipy/splinalg/isolve/minres.py", 
line 43, in minres
     b = asarray(b).ravel()
NameError: global name 'asarray' is not defined

Nils
Nils Wagner | 1 Feb 20:40
Picon
Favicon

Re: Status of minres

On Fri, 01 Feb 2008 19:46:58 +0100
  "Nils Wagner" <nwagner <at> iam.uni-stuttgart.de> wrote:
> Hi Nathan,
> 
> I just tried to run minres.
> 
> from scipy.splinalg.isolve import minres
> 
> y = minres.minres(A,b)
> 
> Traceback (most recent call last):
>   File "test_minres.py", line 9, in ?
>     y = minres.minres(A,b)
>   File 
> "/usr/lib/python2.4/site-packages/scipy/splinalg/isolve/minres.py", 
> line 43, in minres
>     b = asarray(b).ravel()
> NameError: global name 'asarray' is not defined
> 
> Nils
> 
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev <at> scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev

Please find attached a patch for minres.py

Nils
(Continue reading)

Nathan Bell | 1 Feb 20:54
Picon
Gravatar

Re: Status of minres

On Feb 1, 2008 1:40 PM, Nils Wagner <nwagner <at> iam.uni-stuttgart.de> wrote:
> Please find attached a patch for minres.py

Merged.

You're welcome to test the code, but it's not completely finished yet.
 It should work for sparse matrices, but preconditioning is not yet
implemented and the tol parameter is currently handled differently
than other iterative solvers.

--

-- 
Nathan Bell wnbell <at> gmail.com
http://graphics.cs.uiuc.edu/~wnbell/
Nils Wagner | 1 Feb 21:06
Picon
Favicon

Re: Status of minres

On Fri, 1 Feb 2008 13:54:11 -0600
  "Nathan Bell" <wnbell <at> gmail.com> wrote:
> On Feb 1, 2008 1:40 PM, Nils Wagner 
><nwagner <at> iam.uni-stuttgart.de> wrote:
>> Please find attached a patch for minres.py
> 
> Merged.
> 
> You're welcome to test the code, but it's not completely 
>finished yet.
> It should work for sparse matrices, but preconditioning 
>is not yet
> implemented and the tol parameter is currently handled 
>differently
> than other iterative solvers.
> 

Thank you very much for your prompt reply !
Is it planned to add support for dense matrices ?
AFAIK, gmres, cg, bicg, etc. can handle dense matrices.

Cheers,

             Nils
Nathan Bell | 1 Feb 21:11
Picon
Gravatar

Re: Status of minres

On Feb 1, 2008 2:06 PM, Nils Wagner <nwagner <at> iam.uni-stuttgart.de> wrote:

> Is it planned to add support for dense matrices ?
> AFAIK, gmres, cg, bicg, etc. can handle dense matrices.

Yep, we created LinearOperator/aslinearoperator() to simplify this part.

--

-- 
Nathan Bell wnbell <at> gmail.com
http://graphics.cs.uiuc.edu/~wnbell/
Nils Wagner | 1 Feb 21:47
Picon
Favicon

Re: Status of minres

On Fri, 1 Feb 2008 14:11:22 -0600
  "Nathan Bell" <wnbell <at> gmail.com> wrote:
> On Feb 1, 2008 2:06 PM, Nils Wagner 
><nwagner <at> iam.uni-stuttgart.de> wrote:
> 
>> Is it planned to add support for dense matrices ?
>> AFAIK, gmres, cg, bicg, etc. can handle dense matrices.
> 
> Yep, we created LinearOperator/aslinearoperator() to 
>simplify this part.
> 

Please can you provide a small example illustrating the 
new functionality ?

Thank you in advance.

  Nils
Nils Wagner | 2 Feb 17:54
Picon
Favicon

openopt example mmp_1.py

Hi Dmitrey,

the example mmp_1.py is broken.

/usr/bin/python 
svn/openopt/scikits/openopt/examples/mmp_1.py
starting solver nsmm (license: BSD)  with problem  unnamed
incorrect func index type!
Traceback (most recent call last):
   File "svn/openopt/scikits/openopt/examples/mmp_1.py", 
line 22, in ?
     r = p.solve('nsmm')
   File 
"/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py", 
line 207, in solve
     return runProbSolver(self, solvers, *args, **kwargs)
   File 
"/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/runProbSolver.py", 
line 156, in runProbSolver
     solver(p)
   File 
"/usr/lib/python2.4/site-packages/scikits/openopt/solvers/UkrOpt/nsmm.py", 
line 54, in __solver__
     r2 = p2.solve('ralg')
   File 
"/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py", 
line 207, in solve
     return runProbSolver(self, solvers, *args, **kwargs)
   File 
"/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/runProbSolver.py", 
(Continue reading)

Nathan Bell | 2 Feb 19:20
Picon
Gravatar

Re: Status of minres

On Feb 1, 2008 2:47 PM, Nils Wagner <nwagner <at> iam.uni-stuttgart.de> wrote:
>
> Please can you provide a small example illustrating the
> new functionality ?
>

I've updated the docstrings:
http://projects.scipy.org/scipy/scipy/browser/trunk/scipy/splinalg/interface.py

--

-- 
Nathan Bell wnbell <at> gmail.com
http://graphics.cs.uiuc.edu/~wnbell/
Nils Wagner | 2 Feb 19:41
Picon
Favicon

Re: Status of minres

On Sat, 2 Feb 2008 12:20:21 -0600
  "Nathan Bell" <wnbell <at> gmail.com> wrote:
> On Feb 1, 2008 2:47 PM, Nils Wagner 
><nwagner <at> iam.uni-stuttgart.de> wrote:
>>
>> Please can you provide a small example illustrating the
>> new functionality ?
>>
> 
> I've updated the docstrings:
> http://projects.scipy.org/scipy/scipy/browser/trunk/scipy/splinalg/interface.py
> 

Great ! Thank you very much !
Can you also add an example for using a preconditioner ?

Cheers,

          Nils

Gmane