[SciPy-User] Problem with scipy.special.chebyt

Pauli Virtanen pav at iki.fi
Sun Aug 30 10:20:59 EDT 2009


On 2009-08-29, Ivo Maljevic <ivo.maljevic at gmail.com> wrote:
> Don't know if anybody is still interested in this.

In general, we are interested in bugs.

However, this type of crashes in linear algebra routines 
typically do not come from errors in Numpy or Scipy, but from a 
mis-compilation/linking/compiler choice in the build of one of 
the libraries. They are also difficult to reproduce on other 
platforms or Linux distributions.

For example, I cannot reproduce this particular issue on any of 
the machines I have access to.

> I don't even use this function, but since I started with a 
> reproduction of the bug I couldn't let it go. I believe I found 
> a solution that works, at least for me.
>
> /usr/lib64/python/site-packages/scipy/special
>
> I modified orthogonal.py as shown below (the eigenvalue call):
>
> # Scipy imports.
> import numpy as np
> from numpy import all, any, exp, inf, pi, sqrt
> #from numpy.dual import eig
> from scipy.linalg import eig
>
> and the problem went away:
>
>>>> from scipy.special import chebyt
>>>> chebyt(12)(-0.5)
> 0.99999999999985179
>
> I confirmed with Mandrake as well. I do not plan to check and see what are
> the differences between numpy.dual and scipy.linalg, I'm sure
> there are people who know this better.

It very much looks like scipy.linalg is broken on Mandrake. Some 
possible causes: miscompiled ATLAS, etc. I believe this bug is 
quite specific to the release of Mandrake you have, but is 
probably not present on other platforms.

You can try to verify this by checking if

	scipy.linalg.eig

fails. The eig from numpy.dual is an alias for this (when Scipy 
is available).

The best thing to do in any case may be to send a bug report to 
the Mandrake developers.

-- 
Pauli Virtanen





More information about the SciPy-User mailing list