[SciPy-User] FAIL: __main__.test_loadtxt(array([('M', 21, 72.0), ('F', 35, 58.0)],

Egill Hauksson ehauksson at gmail.com
Sun Aug 16 15:13:05 EDT 2009


Fernando,

When I run the 2nd script I get one more error -- FAIL: Test basic Cython
sanity --see below.

Thanks
Egill

In [7]: %run adv_2.py
Running tests:
__main__.test_imports('setuptools', None) ... MOD: setuptools, version:
0.6c9-s1
ok
__main__.test_imports('IPython', None) ... MOD: IPython, version: 0.9.1
ok
__main__.test_imports('numpy', None) ... MOD: numpy, version: 1.3.0
ok
__main__.test_imports('scipy', None) ... MOD: scipy, version: 0.8.0.dev5698
ok
__main__.test_imports('scipy.io', None) ... MOD: scipy.io, version: *no
info*
ok
__main__.test_imports('matplotlib', <function validate_mpl at 0xa065cf0>)
...
/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg/matplotlib/__init__.py:818:
UserWarning:  This call to matplotlib.use() has no effect
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  if warn: warnings.warn(_use_error_msg)
MOD: matplotlib, version: 0.98.5.2
ok
__main__.test_imports('pylab', None) ... MOD: pylab, version: *no info*
ok
__main__.test_imports('enthought.mayavi.api', None) ... MOD:
enthought.mayavi.api, version: 3.2.0n2
ok
__main__.test_imports('scipy.weave', None) ... MOD: scipy.weave, version:
0.4.9
ok
__main__.test_imports('sympy', <function validate_sympy at 0xa065d70>) ...
MOD: sympy, version: 0.6.5
ok
__main__.test_imports('Cython', None) ... MOD: Cython, version: *no info*
ok
__main__.test_imports('Cython.Distutils.build_ext', None) ... MOD:
build_ext, version: *no info*
ok
__main__.test_imports('enthought.traits.api', None) ... MOD:
enthought.traits.api, version: 3.1.0n1
ok
__main__.test_imports('enthought.traits.ui.api', None) ... MOD:
enthought.traits.ui.api, version: *no info*
ok
__main__.test_imports(('enthought.traits.ui.wx', 'enthought.traits.ui.qt4'),
None) ... MOD: enthought.traits.ui.wx, version: *no info*
ok
Simple code compilation and execution via scipy's weave ... ok
Test basic Cython sanity ... FAIL
__main__.test_loadtxt(array([[ 0.,  1.], ... ok
__main__.test_loadtxt(array([('M', 21, 72.0), ('F', 35, 58.0)], ... FAIL
__main__.test_loadtxt(array([ 1.,  3.]), array([ 1.,  3.])) ... ok
__main__.test_loadtxt(array([ 2.,  4.]), array([ 2.,  4.])) ... ok
Simple plot generation. ... ok
Plots with math ... ok

======================================================================
FAIL: Test basic Cython sanity
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/nose-0.10.3n1-py2.5.egg/nose/case.py",
line 182, in runTest
    self.test(*self.arg)
  File "adv_2.py", line 183, in test_cython
    validate_cython(None)
  File "adv_2.py", line 82, in validate_cython
    nt.assert_true(cython_version >= min_version, msg)
AssertionError: Cython version (0, 9, 8, 1, 1) found, at least (0, 11, 2)
required

======================================================================
FAIL: __main__.test_loadtxt(array([('M', 21, 72.0), ('F', 35, 58.0)],
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/nose-0.10.3n1-py2.5.egg/nose/case.py",
line 182, in runTest
    self.test(*self.arg)
  File
"/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/testing/utils.py",
line 463, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File
"/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/testing/utils.py",
line 395, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not equal

(mismatch 100.0%)
 x: array([('M', 21, 72.0), ('F', 35, 58.0)],
      dtype=[('gender', '|S1'), ('age', '>i4'), ('weight', '>f4')])
 y: array([('M', 21, 72.0), ('F', 35, 58.0)],
      dtype=[('gender', '|S1'), ('age', '<i4'), ('weight', '<f4')])

----------------------------------------------------------------------
Ran 23 tests in 30.818s

FAILED (failures=2)

Cleanup - removing temp directory: /Users/hauksson/SciPy/tmp-testdata-7pCnbL

***************************************************************************
                           TESTS FINISHED
***************************************************************************

If the printout above did not finish in 'OK' but instead says 'FAILED', copy
and send the *entire* output, including the system information below, for
help.
We'll do our best to assist you.  You can send your message to the Scipy
user
mailing list:

    http://mail.scipy.org/mailman/listinfo/scipy-user

but feel free to also CC directly: Fernando.Perez at berkeley.edu

==================
System information
==================
os.name      : posix
os.uname     : ('Darwin', 'egill-haukssons-powerbook-g4-15.local', '9.7.0',
'Darwin Kernel Version 9.7.0: Tue Mar 31 22:54:29 PDT 2009;
root:xnu-1228.12.14~1/RELEASE_PPC', 'Power Macintosh')
platform     : darwin
platform+    : Darwin-9.7.0-Power_Macintosh-powerpc-32bit
prefix       : /Library/Frameworks/Python.framework/Versions/4.3.0
exec_prefix  : /Library/Frameworks/Python.framework/Versions/4.3.0
executable   :
/Library/Frameworks/Python.framework/Versions/4.3.0/Resources/Python.app/Contents/MacOS/Python
version_info : (2, 5, 4, 'final', 0)
version      : 2.5.4 |EPD_Py25 4.3.0| (r254:67916, May 17 2009, 20:07:12)
[GCC 4.0.1 (Apple Computer, Inc. build 5370)]
==================

In [8]:


On Sun, Aug 16, 2009 at 11:59 AM, Fernando Perez <
Fernando.Perez at berkeley.edu> wrote:

> Hi Egill,
>
> On Sun, Aug 16, 2009 at 10:58 AM, Egill Hauksson<ehauksson at gmail.com>
> wrote:
> > To all,
> >
> > Any ideas -- see below for one FAIL.
> >
> > Thanks
> > Egill
> >
> > In [13]: %run intro.py
> [...]
> > AssertionError:
> > Arrays are not equal
> >
> > (mismatch 100.0%)
> >  x: array([('M', 21, 72.0), ('F', 35, 58.0)],
> >       dtype=[('gender', '|S1'), ('age', '>i4'), ('weight', '>f4')])
> >  y: array([('M', 21, 72.0), ('F', 35, 58.0)],
> >       dtype=[('gender', '|S1'), ('age', '<i4'), ('weight', '<f4')])
>
>
> Ah, don't worry. You must be on a power PC Mac instead of an Intel
> one, and the mismatch is simply in the endianness of the data.  I just
> failed to account for the possibility of a Big Endian chip in the
> tests.
>
> So the failure is just in my test, your setup is OK. Sorry about that!
>
> Cheers,
>
> f
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090816/5e8ccc47/attachment.html>


More information about the SciPy-User mailing list