(self, weight=1)
Set weights of data instances; create a vector of weights if necessary.
Set weights of data instances; create a vector of weights if necessary.
Set weights of data instances ; create a vector of weights if necessary .
def set_weights(self, weight=1):
        """
        Set weights of data instances; create a vector of weights if necessary.
        """
        if not self.W.shape[-1]:
            self.W = np.empty(len(self))
        self.W[:] = weight
def set_weights ( self , weight = 1 ) : if not self . W . shape [ - 1 ] : self . W = np . empty ( len ( self ) ) self . W [ : ] = weight