#NEWLINE# def test_ovr_coef_( ) : #NEWLINE# #INDENT# for base_classifier in [ SVC ( kernel = 'linear' , random_state = 0 ) , LinearSVC ( random_state = 0 ) ] : #NEWLINE# #INDENT# ovr = OneVsRestClassifier ( base_classifier ) #NEWLINE# for X in [ iris . data , sp . csr_matrix ( iris . data ) ] : #NEWLINE# #INDENT# ovr . fit ( X , iris . target ) #NEWLINE# shape = ovr . coef_ . shape #NEWLINE# assert_equal ( shape [ 0 ] , n_classes ) #NEWLINE# assert_equal ( shape [ 1 ] , iris . data . shape [ 1 ] ) #NEWLINE# assert_equal ( sp . issparse ( ovr . estimators_ [ 0 ] . coef_ ) , sp . issparse ( shape . coef_ ) )