#NEWLINE# def test_vector_norm( self ) : #NEWLINE# #INDENT# v = [ 4.58257569495584 , 4.242640687119285 , 4.58257569495584 ] #NEWLINE# for ( m , a ) in ( ( self . b , 0 ) , ( self . b . T , 1 ) ) : #NEWLINE# #INDENT# for axis in ( a , ( a , ) , ( a - 2 ) , ( ( a - 2 ) , ) ) : #NEWLINE# #INDENT# assert_allclose ( spnorm ( m , 1 , axis = axis ) , [ 7 , 6 , 7 ] ) #NEWLINE# assert_allclose ( spnorm ( m , np . inf , axis = axis ) , [ 4 , 3 , 4 ] ) #NEWLINE# assert_allclose ( spnorm ( m , axis = axis ) , v ) #NEWLINE# assert_allclose ( spnorm ( m , ord = 2 , axis = axis ) , v ) #NEWLINE# assert_allclose ( spnorm ( a , ord = None , axis = axis ) , v )