[SciPy-user] scipy cvs snapshot problem

Pearu Peterson pearu at scipy.org
Thu Feb 26 02:52:26 CST 2004

On Wed, 25 Feb 2004, Jim Benson wrote:

> I downloaded a cvs snapshot on 2004-02-25 and installed it
> over a previous cvs snapshot (from 2003-12-03). The previous 
> one did pass all scipy.test levels. The recent version
> failed the first test:
> ======================================================================
> FAIL: check_nils_20Feb04 (scipy.linalg.basic.test_basic.test_solve)
> ----------------------------------------------------------------------
> AssertionError:
> Arrays are not almost equal (mismatch 50.0%):
>         Array 1: [[-2.3261187+2.4103813j  2.6175944-0.5570154j]
>  [ 2.9991264-1.7766662j -2.0232508-0.2587063j]]
>         Array 2: [[-2.8831341-0.2072131j  2.6175944-0.5570154j]
>  [ 2.7404201+0.2465847j -2.0232508-0.2587063j]]

> ...am i forgetting something critical?

Yes, you missed recent thread about the corner case where linalg.solve 
could return wrong results. The above test covers this case.
You should certainly update f2py to the latest if somewhere in your 
applications the following conditions may be holding:

  a complex one-dimensional slice of an array is passed to f2py
  generated wrapper.

Actually as far as I am concerned, the origin of this bug lies in 
all versions of Numeric CDOUBLE_to_CDOUBLE,etc functions for
any(!) non-contiguous complex array.
This bug was reported to numpy list years ago, see


but since there was no response or interest to it :(, f2py provided a 
workaround to this problem but missed the above important corner


More information about the SciPy-user mailing list