#NEWLINE# @ dec . skipif ( ( NumpyVersion ( np . __version__ ) < '1.8.0' ) ) #NEWLINE# def test_sparse_matrix_norms( self ) : #NEWLINE# #INDENT# for sparse_type in self . _sparse_types : #NEWLINE# #INDENT# for M in self . _test_matrices : #NEWLINE# #INDENT# S = sparse_type ( M ) #NEWLINE# assert_allclose ( spnorm ( S ) , npnorm ( M ) ) #NEWLINE# assert_allclose ( spnorm ( S , 'fro' ) , npnorm ( M , 'fro' ) ) #NEWLINE# assert_allclose ( spnorm ( S , np . inf ) , npnorm ( M , np . inf ) ) #NEWLINE# assert_allclose ( spnorm ( S , ( - np . inf ) ) , npnorm ( M , ( - np . inf ) ) ) #NEWLINE# assert_allclose ( spnorm ( S , 1 ) , npnorm ( M , 1 ) ) #NEWLINE# assert_allclose ( spnorm ( S , ( - 1 ) ) , npnorm ( M , ( - 1 ) ) )