Numeric Python, COM and Eigenvalues
Stefano
clubdelpelosuperfluo at yahoo.it
Mon Apr 29 05:09:42 EDT 2002
Mark Hammond <mhammond at skippinet.com.au> wrote in message news:<3CC66B94.3000101 at skippinet.com.au>...
> Stefano wrote:
> > Fernando Pérez <fperez528 at yahoo.com> wrote in message news:<aa1ft2$mn7$2 at peabody.colorado.edu>...
> >
> >>Stefano wrote:
> >>
> >>
> >>>I am working with Numpy and trying to create a COM server.
> >>>I managed to call this server by Excel and get results like Inverse
> >>>matrix or Cholesky decomposition but the server doesn't work as I ask
> >>>for Eigenvalues/vectors (Excel does not respond anymore).
> >>>Has anyone heard of a problem of this kind?
> >>
> >>Well, with zero example code and details provided that's going to be a hard
> >>one to get help on ;)
> >>
> >>Do you know for a fact you're feeding it a diagonalizable matrix? Does numpy
> >>compute the eigenvals/vects nicely if you test it with the same matrix on its
> >>own (not via excel)? Start testing with a symmetric 2x2 real matrix for which
> >>you can hand-compute the eigenvalues trivially, that might tell you where the
> >>problem is.
> >>
> >>Good luck,
> >>
> >>f.
> >
> >
> > I have already tried with a trivial matrix via Shell.
> > The same matrix makes Excel freeze.
>
> Can you send the code for a trivial demo of the problem. If you can get
> a 10 line script that fills a 2x2 matrix and hangs Excel it would help.
>
> Mark.
Mark,
I made not only Excel but also Doubletalk browser hang.
To make Doubletalk hang I wrote:
from Numeric import *
from Linearalgebra import *
a = array(([1,0],[0,1]))
b = eigenvalus(a)
and Doubletalk browser does not respond
Can this help you?
Otherwise, from VBA:
I have posted in the previous message the python COM.
You can make it freeze calling this sub from VBA:
Sub ItHangs()
Dim numpy As Object
Dim matrice(1 To 2, 1 To 2) As Variant
Dim a as Variant
matrice(2, 2) = 1
matrice(1, 1) = 1
Set numpy = CreateObject("PythonNumeric.Utilities")
a = numpy.Eigenvalues(matrice)
Set numpy = Nothing
End Sub
Thanks
Stefano
More information about the Python-list
mailing list