class_docstr: Generator of the LaserBeam objects for the LaserBeamAttack purpose
class_docstr_tok: ["Generator","of","the","LaserBeam","objects","for","the","LaserBeamAttack","purpose"]
docstr: Keep received parameters in the tolerance ranges.
  
  :param params: Parameters of the LaserBeam that will be eventually clipped.
  :return: LaserBeam parameters in the desired ranges.
docstr_tok: ["Keep","received","parameters","in","the","tolerance","ranges",".",":","param","params",":","Parameters","of","the","LaserBeam","that","will","be","eventually","clipped",".",":","return",":","LaserBeam","parameters","in","the","desired","ranges","."]
code: def clip(self, params: LaserBeam):
      """
      Keep received parameters in the tolerance ranges.
  
      :param params: Parameters of the LaserBeam that will be eventually clipped.
      :return: LaserBeam parameters in the desired ranges.
      """
      clipped_params = np.clip(
          params.to_numpy(),
          self.min_params.to_numpy(),
          self.max_params.to_numpy(),
      )
      params.wavelength = clipped_params[0]
      params.line.angle = clipped_params[1]
      params.line.bias = clipped_params[2]
      params.width = clipped_params[3]
      return params
  
imports: import logging
  from typing import Callable, List, Optional, Tuple, Union, Any
  import numpy
  from art.attacks.attack import EvasionAttack
  from art.attacks.evasion.laser_attack.algorithms import greedy_search
  from art.attacks.evasion.laser_attack.utils import AdversarialObject, AdvObjectGenerator, DebugInfo, ImageGenerator, Line, wavelength_to_rgb
label_desc: Use image node_id 4 for calling the LaserBeamGenerator obj's underlying member method code with example usage: obj.clip(params) and returns: params