[SciPy-user] Re: expm, funm

Nils Wagner nwagner at mecha.uni-stuttgart.de
Thu Mar 7 07:36:30 CST 2002


Travis Oliphant schrieb:
> 
> > Any idea ?
> >
> > Nils
> >
> > Moreover, the matrix functions do not work properly.
> >
> > >>> a = 1.*identity(2)
> > >>> print sinm(a)
> > array_from_pyobj:intent(inout) array must be contiguous and with a
> > proper type and size.
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> >   File
> > "/usr/local/lib/python2.1/site-packages/scipy/linalg/linear_algebra.py",
> > line 777, in sinm
> >     return toreal(-0.5j*(expm(1j*A) - expm(-1j*A)))
> >   File
> > "/usr/local/lib/python2.1/site-packages/scipy/linalg/linear_algebra.py",
> > line 735, in expm
> >     F = solve(D,N)
> >   File
> > "/usr/local/lib/python2.1/site-packages/scipy/linalg/linear_algebra.py",
> > line 122, in solve
> >     results = lapack_routine(a, bt)
> > clapack.error: failed in converting 2nd argument `b' of clapack.zgesv to
> > C/Fortran array
> > >>>
> 
> Unfortunately, I think that the changes to f2py have broken the linalg
> interfaces.   Pearu is working on linalg2 which will replace linalg.
> 
> -Travis
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user

Travis,

Finally, I have used the latest CVS. It turned out all right.

BTW, how can I invoke funm for the computation of an arbitrary matrix
function ?
A small example would be very helpful.

>>> help(funm)
 funm(A, func, disp=1)

Matrix function for arbitrary callable object func.


Moreover I agree to submit algorithms for both sqrtm and logm. 
How can I contribute ?
 
Nils



More information about the SciPy-user mailing list