OK, all the unit tests now pass on a fresh install of Debian Wheezy (which has NumPy 1.6.2), as well as on Ubuntu 11.04 (NumPy 1.5.1).

I've made a new bug-fix release:

package:  http://pypi.python.org/pypi/PyNN/0.7.4
source: https://neuralensemble.org/svn/PyNN/tags/0.7.4 or 
https://neuralensemble.org/svn/PyNN/branches/0.7

Please let me know if there are any problems.

Cheers,

Andrew


On 2 juil. 12, at 23:38, Yaroslav Halchenko wrote:
oki doki -- here is an update -- boiled down all numpy-related issues (I have not looked at the failing mock-related test -- which smells also like a
regression in mock 0.8.0):

1.
NB unittests.test_files.test_NumpyBinaryFile failure seems was gone in
its own course with upgrades of numpy

but I also started to get
= =====================================================================
ERROR: unittests.test_files.test_NumpyBinaryFile
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
   self.test(*self.arg)
File "/tmp/buildd/pynn-0.7.2/test/unittests/test_files.py", line 92, in test_NumpyBinaryFile
   assert_equal(nbf.get_metadata(), metadata)
File "/tmp/buildd/pynn-0.7.2/build/lib.linux-x86_64-2.7/pyNN/ recording/files.py", line 216, in get_metadata
   self.fileobj.seek(0)
ValueError: I/O operation on closed file

here is the report:
http://projects.scipy.org/numpy/ticket/2178#comment:1
and tentative fix
https://github.com/numpy/numpy/pull/328

pynn "workaround" would probably simply to disable that portions
of the test on numpy >= 1.6, and <= (where gets fixed).

agree?

2.

A new one
======================================================================
FAIL: unittests.test_files.test_StandardTextFile_write
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
   self.test(*self.arg)
File "/home/yoh/deb/gits/pkg-exppsy/pynn/test/unittests/ test_files.py", line 57, in test_StandardTextFile_write
   target)
AssertionError: [call('# a = 1\n# b = 9.99\n'),
call('0.0\t2.2999999999999998\n'),
call('1.0\t3.3999999999999999\n'),
call('2.0\t4.2999999999999998\n')] != [(('# a = 1\n# b = 9.99\n',), {}), (('0.0\t2.3\n',), {}), (('1.0\t3.4\n',), {}), (('2.0\t4.3\n',), {})]


which I haven't figured out 100% but

$> python2.7 -c "print repr([(0, 2.3),(1, 3.4),(2, 4.3)])"
[(0, 2.3), (1, 3.4), (2, 4.3)]
$> python2.6 -c "print repr([(0, 2.3),(1, 3.4),(2, 4.3)])"
[(0, 2.2999999999999998), (1, 3.3999999999999999), (2, 4.2999999999999998)]

suggests that it might be just worth not relying on repr of FPs where
either decimal or binary form aren't unambiguous, so please
find/accept/consider attached patch or advise on the alternative resolution

3.
= =====================================================================
FAIL: unittests.test_files.test_NumpyBinaryFile
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
   self.test(*self.arg)
File "/«PKGBUILDDIR»/test/unittests/test_files.py", line 92, in test_NumpyBinaryFile
   assert_equal(nbf.get_metadata(), metadata)
AssertionError: {'a': 1, 'b': 9} != {'a': 1, 'b': 9.99}
- {'a': 1, 'b': 9}
+ {'a': 1, 'b': 9.99}
?               +++

boiled down once again to numpy's regression (fixed upstream in as bisected
e15d0bdd3cc0bc0928e1f4d0b419a2fb3de02af9)

Debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679948
pynn resolution:

is metadata always of 'float' type?  then dtype=(str, float) could be
provided to np.array within NumpyBinaryFile.save to assure correct dtype...

please advise

--
Yaroslav O. Halchenko
Postdoctoral Fellow,   Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik

--
You received this message because you are subscribed to the Google Groups "Neural Ensemble" group. To post to this group, send an email to neuralensem...@googlegroups.com . To unsubscribe from this group, send email to neuralensemble+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/neuralensemble?hl=en-GB .

<0001-BF-test_StandardTextFile_write-test-on-numbers-with-.patch>

--
Dr Andrew Davison
Unité de Neuroscience, Information et Complexité (UNIC)
Institut de Neurobiologie Alfred Fessard
Centre Nationale de la Recherche Scientifique
1, avenue de la Terrasse
91198 Gif sur Yvette
France

Tel: +33 1 69 82 34 51
http://www.andrewdavison.info/








--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to