<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clip(self, value):
 """ Clip a value to a bound. Parameters value : scalar or ndarray value to clip Returns ------- scalar or ndarray : of the same shape as value, bit with each element clipped to fall within the specified bounds Example ------- 1.5 2 array([ 1. , 2. , 1.5]) array([ 1. , 3. , 1.5]) """

        if not self.lower and not self.upper:
            return value

        return np.clip(value, self.lower, self.upper)