Closed
Description
The following seems to happen randomly on appveyor, at least under 32 bit Python 2.7:
======================================================================
FAIL: Check class_weights resemble sample_weights behavior.
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Python27\lib\site-packages\sklearn\linear_model\tests\test_ridge.py", line 518, in test_class_weight_vs_sample_weight
assert_almost_equal(clf1.coef_, clf2.coef_)
File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line 454, in assert_almost_equal
return assert_array_almost_equal(actual, desired, decimal, err_msg)
File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line 811, in assert_array_almost_equal
header=('Arrays are not almost equal to %d decimals' % decimal))
File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line 644, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 7 decimals
(mismatch 100.0%)
x: array([[ 0.10965375, 0.61707134, -0.50021659, -0.01239003],
[-0.13067805, -1.45138219, 0.45900018, -0.78576024],
[ 0.0210243 , 0.83431085, 0.04121641, 0.79815027]])
y: array([[ 0.13644731, 0.73780242, -0.55678018, 0.12087149],
[-0.06131714, -1.75113362, 0.74417571, -1.64203741],
[-0.07513018, 1.0133312 , -0.18739553, 1.52116592]])
I have never seen this happen on travis so it might be windows-specific. The difference is large so it it probably not a trivial rounding issue.