#NEWLINE# def get_features( self ) : #NEWLINE# #INDENT# ' Return an nnz x nfeatures matrix containing the features ' #NEWLINE# if ( not hasattr ( self , '_features' ) ) : #NEWLINE# #INDENT# mask_nz = self . input . mask_nz #NEWLINE# mask_nnz = self . input . mask_nnz #NEWLINE# features = np . zeros ( ( mask_nnz , 5 ) , dtype = np . float32 ) #NEWLINE# features [ : , 0 ] = ( self . input . image_irg [ ( mask_nz [ 0 ] , mask_nz [ 1 ] , 0 ) ] / self . params . theta_l ) #NEWLINE# features [ : , 1 ] = ( self . input . image_irg [ ( mask_nz [ 0 ] , mask_nz [ 1 ] , 1 ) ] / self . params . theta_c ) #NEWLINE# features [ : , 2 ] = ( self . input . image_irg [ ( mask_nz [ 0 ] , mask_nz [ 1 ] , 2 ) ] / self . params . theta_c ) #NEWLINE# features [ : , 3 ] = ( mask_nz [ 0 ] / ( self . params . theta_p * self . input . diag ) ) #NEWLINE# features [ : , 4 ] = ( mask_nz [ 1 ] / ( self . params . theta_p * self . input . diag ) ) #NEWLINE# self . _features = features #NEWLINE# self . _features . setflags ( write = False ) #NEWLINE# #UNINDENT# return self . _features