(self, degrees, random_rate, same_size=False)
:param degrees: 角度，可以是一个数值或者list
        :param ramdon_rate: 随机系数
        :param same_size: 是否保持和原图一样大
        :return:
:param degrees: 角度，可以是一个数值或者list
        :param ramdon_rate: 随机系数
        :param same_size: 是否保持和原图一样大
        :return:
: param degrees : 角度，可以是一个数值或者list : param ramdon_rate : 随机系数 : param same_size : 是否保持和原图一样大 : return :
def __init__(self, degrees, random_rate, same_size=False):
        """
        :param degrees: 角度，可以是一个数值或者list
        :param ramdon_rate: 随机系数
        :param same_size: 是否保持和原图一样大
        :return:
        """
        if isinstance(degrees, numbers.Number):
            if degrees < 0:
                raise ValueError("If degrees is a single number, it must be positive.")
            degrees = (-degrees, degrees)
        elif isinstance(degrees, list) or isinstance(degrees, tuple) or isinstance(degrees, np.ndarray):
            if len(degrees) != 2:
                raise ValueError("If degrees is a sequence, it must be of len 2.")
            degrees = degrees
        else:
            raise Exception('degrees must in Number or list or tuple or np.ndarray')
        self.degrees = degrees
        self.same_size = same_size
        self.random_rate = random_rate
def __init__ ( self , degrees , random_rate , same_size = False ) : if isinstance ( degrees , numbers . Number ) : if degrees < 0 : raise ValueError ( "If degrees is a single number, it must be positive." ) degrees = ( - degrees , degrees ) elif isinstance ( degrees , list ) or isinstance ( degrees , tuple ) or isinstance ( degrees , np . ndarray ) : if len ( degrees ) != 2 : raise ValueError ( "If degrees is a sequence, it must be of len 2." ) degrees = degrees else : raise Exception ( 'degrees must in Number or list or tuple or np.ndarray' ) self . degrees = degrees self . same_size = same_size self . random_rate = random_rate