#NEWLINE# def _pre_compute_svd( self , X , y ) : #NEWLINE# #INDENT# if sparse . issparse ( X ) : #NEWLINE# #INDENT# raise TypeError ( 'SVD not supported for sparse matrices' ) #NEWLINE# #UNINDENT# ( U , s , _ ) = linalg . svd ( X , full_matrices = 0 ) #NEWLINE# v = ( s ** 2 ) #NEWLINE# UT_y = np . dot ( U . T , y ) #NEWLINE# return ( v , U , UT_y )