|
| Did you perhaps use a list (type(p) == type([])) for p?
|
Alex
Using the coefficients in an array instead of a list
was the key in the solution to my problems
Your other suggestions regarding floating p
and the off-by-one error that I had with the
polynomial degr
| In case you are still interested pygsl wraps the GSL solver.
|
|
| from pygsl import poly
|
| pc = poly.poly_complex( 3 )
|
| tmp , rs = pc.solve( ( 2 , 3 , 1 ) )
|
| print rs
|
|
| You get pygsl at http://sourceforge.net/projects/pygsl/
Pierre
Thanks again for the link to the Py
Raymond L. Buvel wrote:
Alex Renelt wrote:
Alex Renelt wrote:
in addition:
I'm writing a class for polynomial manipulation. The generalization
of the above code is:
definitions:
1.) p = array([a_0, a_i, ..., a_n]) represents your polynomial
P(x) = \sum _{i=0} ^n a_i x^i
2.) deg(p) is its degree
3
Cousin Stanley wrote:
Alex
Thanks for posting your generalized numarray
eigenvalue solution
It's been almost 30 years since I've looked at
any characteristic equation, eigenvalue, eignevector
type of processing and at this point I don't recall
many of the particulars
No
Carl Banks wrote:
> If you don't have a great need for speed, you can accomplish this
> easily with the linear algebra module of Numeric/numarray. Suppose
> your quintic polynomial's in the form
>
>a + b*x + c*x**2 + d*x**3 + e*x**4 + x**5
>
> The roots of it are equal to the eigenvalues of
| In case you are still interested pygsl wraps the GSL solver.
|
| from pygsl import poly
|
| pc = poly.poly_complex( 3 )
|
| tmp, rs = pc.solve( ( 2 , 3 , 1 ) )
|
| print rs
|
|
| You get pygsl at http://sourceforge.net/projects/pygsl/
Pierre
I am still interested and have downloa
In case you are still interested pygsl wraps the GSL solver.
from pygsl import poly
pc = poly.poly_complex(3)
tmp, rs = pc.solve((2,3,1))
print rs
You get pygsl at http://sourceforge.net/projects/pygsl/
Pierre
--
http://mail.python.org/mailman/listinfo/python-list
Alex
Thanks for posting your generalized numarray
eigenvalue solution
It's been almost 30 years since I've looked at
any characteristic equation, eigenvalue, eignevector
type of processing and at this point I don't recall
many of the particulars
Not being sure about the
Carl Banks wrote:
> . from Numeric import *
> . from LinearAlgebra import *
> .
> . def quinticroots(p):
> . cm = zeros((5,5),Float32)
> . cm[0,1] = cm[1,2] = cm[2,3] = cm[3,4] = 1.0
> . cm[4,0] = -p[0]
> . cm[4,1] = -p[1]
> . cm[4,2] = -p[2]
> . cm[4,3] = -p[3]
> . cm[
On 2005-02-26, Just <[EMAIL PROTECTED]> wrote:
> While googling for a non-linear equation solver, I found
> Math::Polynomial::Solve in CPAN. It seems a great little module, except
> it's not Python... I'm especially looking for its poly_root()
> functionality (which solves arbitrary polynomials)
Alex Renelt wrote:
Alex Renelt wrote:
in addition:
I'm writing a class for polynomial manipulation. The generalization of
the above code is:
definitions:
1.) p = array([a_0, a_i, ..., a_n]) represents your polynomial
P(x) = \sum _{i=0} ^n a_i x^i
2.) deg(p) is its degree
3.) monic(p) makes P moni
Alex Renelt wrote:
in addition:
I'm writing a class for polynomial manipulation. The generalization of
the above code is:
definitions:
1.) p = array([a_0, a_i, ..., a_n]) represents your polynomial
P(x) = \sum _{i=0} ^n a_i x^i
2.) deg(p) is its degree
3.) monic(p) makes P monic, i.e. monic(p) =
Just wrote:
In article <[EMAIL PROTECTED]>,
"Carl Banks" <[EMAIL PROTECTED]> wrote:
It should be pretty easy to set up a Numeric matrix and call
LinearAlgebra.eigenvalues. For example, here is a simple quintic
solver:
. from Numeric import *
. from LinearAlgebra import *
.
. def quinticroots(p):
In article <[EMAIL PROTECTED]>,
"Carl Banks" <[EMAIL PROTECTED]> wrote:
> Just wrote:
> > While googling for a non-linear equation solver, I found
> > Math::Polynomial::Solve in CPAN. It seems a great little module,
> except
> > it's not Python... I'm especially looking for its poly_root()
> > fu
Just wrote:
> While googling for a non-linear equation solver, I found
> Math::Polynomial::Solve in CPAN. It seems a great little module,
except
> it's not Python... I'm especially looking for its poly_root()
> functionality (which solves arbitrary polynomials). Does anyone know
of
> a Python modul
Just wrote:
(Hm, I had the impression that scipy != Konrad Hinsen's Scientific
module.)
You're probably right :)
I had played with [1], but it "only" calculates one root, and I need all
roots (specifically, for a quintic equation). [2] doesn't seem to be a
solver?
Actually, I was curious whether
In article <[EMAIL PROTECTED]>,
"Raymond L. Buvel" <[EMAIL PROTECTED]> wrote:
> Just wrote:
>
> >
> > SciPy indeed appear to contain a solver, but I'm currently stuck in
> > trying to _get_ it for my platform (OSX). I'm definitely not going to
> > install a Fortran compiler just to evaluate i
Just wrote:
SciPy indeed appear to contain a solver, but I'm currently stuck in
trying to _get_ it for my platform (OSX). I'm definitely not going to
install a Fortran compiler just to evaluate it (even though my name is
not "Ilias" ;-). Also, SciPy is _huge_, so maybe a Python translation of
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (John M. Gamble) wrote:
> >> The
> >> original source for the algorithm used in the module is
> >> from Hiroshi Murakami's Fortran source, and it shouldn't
> >> be too difficult to repeat the translation process to python.
> >
> >Ah ok, I'll try t
In article <[EMAIL PROTECTED]>,
Just <[EMAIL PROTECTED]> wrote:
>
>Heh, how big are the odds you find the author of an arbitrary Perl
>module on c.l.py...
>
Hey, that's why it's called lurking.
>
>Any will do. As I wrote in another post, I'm currently only looking for
>a quintic equation solve
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (John M. Gamble) wrote:
> In article <[EMAIL PROTECTED]>,
> Just <[EMAIL PROTECTED]> wrote:
> >While googling for a non-linear equation solver, I found
> >Math::Polynomial::Solve in CPAN. It seems a great little module, except
>
> Thank you.
>
In article <[EMAIL PROTECTED]>,
Just <[EMAIL PROTECTED]> wrote:
>While googling for a non-linear equation solver, I found
>Math::Polynomial::Solve in CPAN. It seems a great little module, except
Thank you.
>it's not Python...
Sorry about that.
> I'm especially looking for
"Just" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> Does SciPy do what you want? Specifically Scientific.Functions.FindRoot
>> [1] &
>> Scientific.Functions.Polynomial [2]
>> http://starship.python.net/~hinsen/ScientificPython/ScientificPythonManual/Sci
>> entific_9.html
>> [2]
In article <[EMAIL PROTECTED]>,
Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Just wrote:
> > While googling for a non-linear equation solver, I found
> > Math::Polynomial::Solve in CPAN. It seems a great little module, except
> > it's not Python... I'm especially looking for its poly_root()
> > f
Just wrote:
While googling for a non-linear equation solver, I found
Math::Polynomial::Solve in CPAN. It seems a great little module, except
it's not Python... I'm especially looking for its poly_root()
functionality (which solves arbitrary polynomials). Does anyone know of
a Python module/pack
While googling for a non-linear equation solver, I found
Math::Polynomial::Solve in CPAN. It seems a great little module, except
it's not Python... I'm especially looking for its poly_root()
functionality (which solves arbitrary polynomials). Does anyone know of
a Python module/package that imp
26 matches
Mail list logo