#NEWLINE# def __init__( self , M = None , n_neighbors = 5 , weights = 'uniform' , algorithm = 'auto' , leaf_size = 30 , warn_on_equidistant = True , p = 2 ) : #NEWLINE# #INDENT# super ( ParameterizedKNeighborsClassifier , self ) . __init__ ( n_neighbors = n_neighbors , weights = weights , algorithm = algorithm , leaf_size = leaf_size , warn_on_equidistant = warn_on_equidistant , p = p ) #NEWLINE# self . M = np . array ( p ) #NEWLINE# if ( self . M . shape [ 0 ] != self . M . shape [ 1 ] ) : #NEWLINE# #INDENT# raise ValuError ( ( 'Parameterizing matrix M with dimensions (%d, %d) is not square' % dim ( self . M ) ) )