[SciPy-dev] All but two tests passing for me

Arnd Baecker arnd.baecker at web.de
Fri Oct 28 04:09:37 CDT 2005


Hi,


On Fri, 28 Oct 2005, Arnd Baecker wrote:

> umpf - pressed send to early ....
>
> Hi Travis
>
> On Thu, 27 Oct 2005, Travis Oliphant wrote:
>
> > Travis Oliphant wrote:
> >
> > >After a fix to PyArray_Correlate all but two tests are passing for me on
> > >a 32-bit platform.
> > >
> > >
> > >
> > Now all tests are passing.
> >
> > I'm sure issues will still be resolved.  But, I'm so pleased, I just had
> > to show everybody :-)
> >
> > ----------------------------------------------------------------------
> > Ran 1127 tests in 85.453s
> >
> > OK
> > <unittest.TextTestRunner object at 0x43807fec>
> >
> > Thanks for all who are helping in the bug-fixing and conversion process.
>
> That is good news!!
>
> I don't want to spoil your party, but I think I have to ;-)
>
> In [3]: scipy.__core_version__
> Out[3]: '0.4.3.1371'
> In [4]: scipy.__scipy_version__
> Out[4]: '0.4.2_1393'
>
> scipy.test(10,verbosity=10)
>
> gives on the opteron
>
>
> ======================================================================
> ERROR: check_integer
> (scipy.io.array_import.test_array_import.test_read_array)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
> "/home/abaecker/BUILDS2/Build_52/inst_scipy_newcore/lib/python2.4/site-packages/scipy/io/tests/test_array_import.py",
> line 62, in check_integer
>     b = io.read_array(fname,atype=N.Int)
>   File
> "/home/abaecker/BUILDS2/Build_52//inst_scipy_newcore/lib/python2.4/site-packages/scipy/io/array_import.py",
> line 359, in read_array
>     raise ValueError, "One of the array types is invalid, k=%d" % k
> ValueError: One of the array types is invalid, k=0
>
>
> This is might be caused by:
>
> compile options:
> '-I/home/abaecker/BUILDS2/Build_52/inst_scipy_newcore/lib/python2.4/site-packages/scipy/base/include
> -I/scr/python/include/python2.4 -c'
> gcc: Lib/io/numpyiomodule.c
> Lib/io/numpyiomodule.c: In function `numpyio_tofile':
> Lib/io/numpyiomodule.c:282: warning: passing arg 1 of pointer to function
> from incompatible pointer type
> Lib/io/numpyiomodule.c: In function `numpyio_convert_objects':
> Lib/io/numpyiomodule.c:743: warning: passing arg 2 of pointer to function
> from incompatible pointer type
> gcc -pthread -shared build/temp.linux-x86_64-2.4/Lib/io/numpyiomodule.o
> -Lbuild/temp.linux-x86_64-2.4 -o
> build/lib.linux-x86_64-2.4/scipy/io/numpyio.so
> building 'scipy.fftpack._fftpack' extension
> compiling C sources

I tried to look into this one. The offending line is:

buffer_size = _PyArray_multiply_list(arr->dimensions + k, arr->nd - k);

and later on

  out = (PyArrayObject *)PyArray_FromDims(RANK(arr), DIMS(arr), int_type);

with the definition:

  #define DIMS(arr) ((arr)->dimensions)

So it might be that arr->dimensions is not of the type
it should be.
So I looked for the definition of arr:

if ((arr = (PyArrayObject *)PyArray_FromDims(1,(int*)&n,out_type)) ==
NULL)
    return NULL;

Is there some int * --> intp * needed ?

Well, I thought this was the lowest hanging fruit  ...
Anyway, I really have to stop doing this now.

Best, Arnd




More information about the Scipy-dev mailing list