[Numpy-discussion] Numpy test failure - How to fix
Matthew Brett
matthew.brett at gmail.com
Sun Jul 8 05:47:11 EDT 2012
Hi,
On Sun, Jul 8, 2012 at 2:36 AM, Ralf Gommers
<ralf.gommers at googlemail.com> wrote:
>
>
> On Fri, Jul 6, 2012 at 1:30 PM, McCully, Dwayne (NIH/NLM/LHC) [C]
> <dmccully at mail.nih.gov> wrote:
>>
>> Hope this is the right list to post this problem! I’m getting two errors
>> when running a numpy (see below).
>>
>> Could someone tell me how to fix this or if the errors are not a concern.
>>
>>
>>
>> Dwayne
>>
>>
>>
>> python -c 'import numpy; numpy.test(verbose=2)'
>>
>>
>>
>> Python 2.7.3
>>
>> Numpy 1.6.2
>>
>> Nose 1.1.2
>>
>> PowerPC
>>
>> Red Hat Linux 64 bit
>
>
> These tests are known to fail on PowerPC, see
> http://projects.scipy.org/numpy/ticket/1664
> https://github.com/numpy/numpy/commit/1b99089
>
> The question is why the above commit is not effective on your system. Could
> you check that? For example, is this not true:
>
> import platform
> "powerpc" in platform.processor()
I get this on OSX PPC:
In [1]: import platform
In [2]: platform.processor()
Out[2]: 'powerpc'
In [3]: platform.machine()
Out[3]: 'Power Macintosh'
and this on Debian Wheezy PPC:
In [1]: import platform
In [2]: platform.processor()
Out[2]: ''
In [3]: platform.machine()
Out[3]: 'ppc'
In my own code I ended up making a one-line function, 'on_powerpc':
https://github.com/nipy/nibabel/blob/master/nibabel/casting.py#L171
def on_powerpc():
return processor() == 'powerpc' or machine().startswith('ppc')
See you,
Matthew
More information about the NumPy-Discussion
mailing list