class_docstr: `LowProFool` attack.
  
  | Paper link: https://arxiv.org/abs/1911.03274
class_docstr_tok: ["`","LowProFool","`","attack",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1911.03274"]
docstr: Function for clipping perturbation vectors to forbid the adversary vectors to go beyond the allowed ranges of
  values.
  
  :param samples: Base design matrix.
  :param perturbations: Perturbations of samples towards being adversarial.
  :return: Clipped perturbation array.
docstr_tok: ["Function","for","clipping","perturbation","vectors","to","forbid","the","adversary","vectors","to","go","beyond","the","allowed","ranges","of","values",".",":","param","samples",":","Base","design","matrix",".",":","param","perturbations",":","Perturbations","of","samples","towards","being","adversarial",".",":","return",":","Clipped","perturbation","array","."]
code: def __apply_clipping(
      self, samples: np.ndarray, perturbations: np.ndarray
  ) -> np.ndarray:
      """
      Function for clipping perturbation vectors to forbid the adversary vectors to go beyond the allowed ranges of
      values.
  
      :param samples: Base design matrix.
      :param perturbations: Perturbations of samples towards being adversarial.
      :return: Clipped perturbation array.
      """
      if self.estimator.clip_values is None:
          return perturbations
  
      mins = self.estimator.clip_values[0]
      maxs = self.estimator.clip_values[1]
  
      np.clip(
          perturbations, mins - samples, maxs - samples, perturbations
      )
      return perturbations
  
imports: import logging
  from typing import Callable, Optional, Union, TYPE_CHECKING
  import numpy
  from scipy.stats import pearsonr
  from tqdm.auto import trange
  from art.attacks.attack import EvasionAttack
  from art.estimators.estimator import LossGradientsMixin
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
label_desc: Use image node_id 5 for calling the LowProFool obj's underlying member method code with example usage: obj.__apply_clipping(samples, perturbations) and returns: perturbations, perturbations