-
-
Notifications
You must be signed in to change notification settings - Fork 26.4k
Closed
Labels
Description
it is a fun one:
======================================================================
FAIL: sklearn.cluster.tests.test_spectral.test_spectral_clustering_sparse
----------------------------------------------------------------------
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/scikit-learn-0.12.1/debian/python-sklearn/usr/lib/python2.7/dist-packages/sklearn/cluster/tests/test_spectral.py", line 112, in test_spectral_clustering_sparse
assert_greater(np.mean(labels == [1, 1, 1, 1, 1, 0, 0, 0, 0, 0]), .9)
AssertionError: 0.90000000000000002 not greater than 0.9
not sure how numpy maintains original decimal representation so it gets this, since all hex views are the same:
*In [23]: (0.9).hex()
Out[23]: '0x1.ccccccccccccdp-1'
In [24]: np.float64(0.9).hex()
Out[24]: '0x1.ccccccccccccdp-1'
In [25]: np.float64(0.90000000000000002).hex()
Out[25]: '0x1.ccccccccccccdp-1'
but in any case -- it seems just to be a failing test anyways if they should not be equal