Skip to content

Commit

Permalink
Fix assignment for deprecated sigmaX_limit and sigmaY_limit parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloqeely committed Mar 18, 2024
1 parent 0cb8de5 commit 9e2eccd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions albumentations/augmentations/blur/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ def __init__(
blur_limit: ScaleIntType = (3, 7),
sigma_x_limit: ScaleFloatType = (0.2, 1.0),
sigma_y_limit: ScaleFloatType = (0.2, 1.0),
sigmaX_limit: ScaleFloatType = (0.2, 1.0), # noqa: N803
sigmaY_limit: ScaleFloatType = (0.2, 1.0), # noqa: N803
sigmaX_limit: Optional[ScaleFloatType] = None, # noqa: N803
sigmaY_limit: Optional[ScaleFloatType] = None, # noqa: N803
rotate_limit: ScaleIntType = 90,
beta_limit: ScaleFloatType = (0.5, 8.0),
noise_limit: ScaleFloatType = (0.9, 1.1),
Expand All @@ -347,11 +347,11 @@ def __init__(
# Handle deprecation of sigmaX_limit and sigmaY_limit
if sigmaX_limit is not None:
warnings.warn("sigmaX_limit is deprecated; use sigma_x_limit instead.", DeprecationWarning)
sigma_x_limit = sigma_x_limit or sigmaX_limit
sigma_x_limit = sigmaX_limit

if sigmaY_limit is not None:
warnings.warn("sigmaY_limit is deprecated; use sigma_y_limit instead.", DeprecationWarning)
sigma_y_limit = sigma_y_limit or sigmaY_limit
sigma_y_limit = sigmaY_limit

self.sigma_x_limit = self.__check_values(to_tuple(sigma_x_limit, 0.0), name="sigma_x_limit")
self.sigma_y_limit = self.__check_values(to_tuple(sigma_y_limit, 0.0), name="sigma_y_limit")
Expand Down

0 comments on commit 9e2eccd

Please sign in to comment.