(self, power)
Put a loss to a power.

        Parameters
        ----------
        power : int or float
            Number representing the exponent

        Returns
        -------
        new : Loss
            Instance of a ``Loss`` representing the `self ** power`.
Put a loss to a power.
Put a loss to a power .
def __pow__(self, power):
        """Put a loss to a power.

        Parameters
        ----------
        power : int or float
            Number representing the exponent

        Returns
        -------
        new : Loss
            Instance of a ``Loss`` representing the `self ** power`.
        """
        if isinstance(power, (int, float)):
            new_instance = Loss()
            new_instance._call = MethodType(lambda inst, weights, y: self(weights, y) ** power, new_instance)
            new_instance._repr = MethodType(lambda inst: '({}) ** {}'.format(self.__repr__(), power),
                                            new_instance)

            return new_instance
        else:
            raise TypeError('Unsupported type: {}'.format(type(power)))
def __pow__ ( self , power ) : if isinstance ( power , ( int , float ) ) : new_instance = Loss ( ) new_instance . _call = MethodType ( lambda inst , weights , y : self ( weights , y ) ** power , new_instance ) new_instance . _repr = MethodType ( lambda inst : '({}) ** {}' . format ( self . __repr__ ( ) , power ) , new_instance ) return new_instance else : raise TypeError ( 'Unsupported type: {}' . format ( type ( power ) ) )