[SciPy-user] scipy test file error

Pearu Peterson pearu at scipy.org
Sun Mar 6 15:24:23 CST 2005



On Sun, 6 Mar 2005, Leila baghdadi wrote:

> Hi everyone,
>
> I have finally managed to build scipy on Opteron (red hat linux
> enterprise 3),
>
> so I can import it in python with no problems
>
> but when I go to scipy/tests and
>
> try to run any of the tests
>
> python test_common.py

A proper way to run scipy tests is the following:

>>> import scipy
>>> scipy.test()

> the following error appears,
>
> can anyone give me a hint,
>
> File "/usr/lib64/python2.2/unittest.py", line 412, in
> loadTestsFromTestCase
>    self.getTestCaseNames(testCaseClass)))
>  File "test_common.py", line 20, in __init__
>    self.z = rand(100,10,20)
>  File
> "/projects/mice/share/arch/linux64/lib64/python2.2/site-packages/scipy_base/ppimport.py", line 115, in __call__
>    return self._ppimport_attr(*args,**kwds)
>  File
> "/projects/mice/share/arch/linux64/lib64/python2.2/site-packages/scipy/stats/distributions.py", line 82, in rand
>    return random(args)
>  File
> "/projects/mice/share/arch/linux64/lib64/python2.2/site-packages/scipy/stats/distributions.py", line 75, in random
>    return _build_random_array(randfile.sample, (), size)
>  File
> "/projects/mice/share/arch/linux64/lib64/python2.2/site-packages/scipy/stats/distributions.py", line 66, in _build_random_array
>    s.shape = size
> ValueError: total size of new array must be unchanged

What Numeric version are you using? Try upgrading Numeric to the latest.
Also, using Python 2.3 and up is recommended.

Pearu



More information about the SciPy-user mailing list