New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure on `master` #455

Closed
arokem opened this Issue Oct 31, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@arokem
Member

arokem commented Oct 31, 2014

I've been seeing this one for a few days now:


======================================================================
FAIL: dipy.tracking.tests.test_streamline.test_length
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/arokem/anaconda/envs/py2/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/arokem/source/dipy/dipy/tracking/tests/test_streamline.py", line 326, in test_length
    assert_array_equal(dipystreamline.length(streamlines_readonly), [length_python(s) for s in streamlines_readonly])
  File "/Users/arokem/anaconda/envs/py2/lib/python2.7/site-packages/numpy/testing/utils.py", line 739, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/Users/arokem/anaconda/envs/py2/lib/python2.7/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 66.6666666667%)
 x: array([  8.364852,  99.599576,  98.612801,  99.444139,  97.246859,
        96.281105])
 y: array([  8.364852,  99.599576,  98.612801,  99.444139,  97.246859,
        96.281105])

----------------------------------------------------------------------
Ran 331 tests in 259.492s

Might be a Yosemite upgrade related issue.

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Oct 31, 2014

I see it on stock numpy, OSX 10.9 ...​

@omarocegueda

This comment has been minimized.

Contributor

omarocegueda commented Oct 31, 2014

I see it in Windows 8.1, the differences are of the order of 10^-14. I
think the arrays should not be tested for equality but use:

assert_array_almost_equal(dipystreamline.length(streamlines_readonly),
[length_python(s) for s in streamlines_readonly])

instead...

On Fri, Oct 31, 2014 at 2:39 PM, Matthew Brett notifications@github.com
wrote:

I see it on stock numpy, OSX 10.9 ...​


Reply to this email directly or view it on GitHub
#455 (comment).

"Cada quien es dueño de lo que calla y esclavo de lo que dice"
-Proverbio chino.
"We all are owners of what we keep silent and slaves of what we say"
-Chinese proverb.

http://www.cimat.mx/~omar

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Oct 31, 2014

Yes, that looks reasonable, it's testing two different ways of doing the same calculation.

matthew-brett added a commit that referenced this issue Nov 1, 2014

Merge pull request #456 from matthew-brett/approx-streamline-tests
MRG: relax threshold for failing test + cleanup

Relax threshold for failing test as suggested by Omar.

Closes gh-455.

Clean up some PEP8 formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment