#NEWLINE# def cluster( self , x_batch , y_batch ) : #NEWLINE# #INDENT# clusters = self . cluster_func ( x_batch , y_batch ) #NEWLINE# one_hot = numpy . zeros ( ( self . batch , self . k ) ) #NEWLINE# for ( i , cluster ) in enumerate ( clusters ) : #NEWLINE# #INDENT# one_hot [ ( i , cluster ) ] = 1 #NEWLINE# #UNINDENT# return one_hot