2012/7/24 Virgile Fritsch <[email protected]>:
> Hi list,
>
> I got this error when pulling the last master state on my laptop:
>
>> ~/scikit-learn/sklearn/svm [master] $ nosetests
>> .................................................E....
>> ======================================================================
>> ERROR: Check that primal coef modification are not silently ignored
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 186, in runTest
>>     self.test(*self.arg)
>>   File "/home/virgile/scikit-learn/sklearn/svm/tests/test_svm.py", line
>> 574, in test_immutable_coef_property
>>     assert_raises(RuntimeError, clf.coef_.__setitem__, (0, 0), 0)
>>   File "/usr/lib/python2.7/unittest/case.py", line 465, in assertRaises
>>     callableObj(*args, **kwargs)
>> ValueError: assignment destination is read-only

Why version of numpy are you running? It is possible that recent
versions of numpy have replaced the RuntimeError by a ValueError.

The test should be rewritten to expect one of those 2 exceptions, but
I don't know how to do this with nose, maybe with a tuple:
`(RuntimeError, ValueError)` in the assert_raises call?

https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/tests/test_svm.py#L574

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to