Re: [SciPy-User] FAIL: __main__.test_loadtxt(array([('M', 21, 72.0), ('F', 35, 58.0)],
![](https://secure.gravatar.com/avatar/006908a7e829596c5bc3421f3c3a13c0.jpg?s=120&d=mm&r=g)
Hi Egill, On Sun, Aug 16, 2009 at 10:58 AM, Egill Hauksson<ehauksson@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
![](https://secure.gravatar.com/avatar/05520c5f5a1818ed2d70e0e049886ea3.jpg?s=120&d=mm&r=g)
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@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@berkeley.edu> wrote:
Hi Egill,
On Sun, Aug 16, 2009 at 10:58 AM, Egill Hauksson<ehauksson@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
![](https://secure.gravatar.com/avatar/006908a7e829596c5bc3421f3c3a13c0.jpg?s=120&d=mm&r=g)
Hi Egill, On Sun, Aug 16, 2009 at 12:13 PM, Egill Hauksson<ehauksson@gmail.com> wrote:
Fernando,
When I run the 2nd script I get one more error -- FAIL: Test basic Cython sanity --see below.
======================================================================
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
OK, this one you do need to fix. I'm attaching below the instructions on how to fix this... I'll be offline for a few hours, but let us know if you have any problems, I should be back in the evening. Cheers, f ar tutorial attendees, here are some notes regarding the tutorial requirements. I am sending this to all of you, though some of it may only apply to those attending the advanced track. - If you had troubles with the testing scripts, please note that I've fixed a few small issues. The current versions are (intro, advanced and pycuda-specific): https://cirl.berkeley.edu/fperez/tmp/intro_tut_checklist.py https://cirl.berkeley.edu/fperez/tmp/adv_tut_checklist.py https://cirl.berkeley.edu/fperez/tmp/pycuda_tut_checklist.py - For those of you on OSX, you may need to install Apple's XCode to get a working compiler on your system. XCode is free to download, but it's a very large download and you do need to register in their developer site to access the file. - For those of you using the Enthought Python Distribution (EPD henceforth), and attending the advanced tutorial track, you may need to manually add updated versions of Cython and Sympy, as those included by default are a bit old to demo all the features the speakers want to cover. Below are the instructions for this (if you are attending the introductory tutorials, the default EPD install is sufficient). - If you have a laptop with a CUDA-capable GPU, and you install the necessary requirements, you'll be able to follow the interactive parts of the tutorial. The tutorials page has links to all necessary prerequisites: http://conference.scipy.org/advanced_tutorials ================================================================ Instructions for an EPD-based setup for the advanced tutorials ================================================================ The current version of EPD has most of what you need, except for updated SymPy and Cython. 1. Install sympy 0.6.5, available at: - Source: http://sympy.googlecode.com/files/sympy-0.6.5.tar.gz - Windows installer: http://sympy.googlecode.com/files/sympy-0.6.5.win32.exe 2. Install Cython 0.11.2. On OSX you can do a source build, for Windows, binary installers are available: - Source: http://cython.org/Cython-0.11.2.tar.gz - Windows installer: https://cirl.berkeley.edu/fperez/tmp/Cython-0.11.2.win32-py2.5.exe 3. Then, edit the easy-install.pth file for EPD, located at: - Windows: c:/Python25/Lib/site-packages/easy-install.pth - OSX: /Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/easy-install.pth Comment out the lines that read: ./cython-0.9.8.1.1n1-py2.5-win32.egg ./sympy-0.6.2n2-py2.5.egg By prepending a # mark at the beginning. 4. At this point, the advanced tutorials checklist script: https://cirl.berkeley.edu/fperez/tmp/adv_tut_checklist.py should run to completion without errors, let us know otherwise.
participants (2)
-
Egill Hauksson
-
Fernando Perez