

'''simple docstring'''
import numpy as np
from cva import destroyAllWindows, imread, imshow, waitKey







class 							A__    :





  def __init__(		self      :	Tuple							,					_a      :	Any							,					_a      :	int							,					_a      :	int )	->    List[str]:





       '''simple docstring'''






       if dst_width < 0 or dst_height < 0:
            raise ValueError('Destination width/height should be > 0' )

       _SCREAMING_SNAKE_CASE							    =img
       _SCREAMING_SNAKE_CASE							    =img.shape[1]
       _SCREAMING_SNAKE_CASE							    =img.shape[0]
       _SCREAMING_SNAKE_CASE							    =dst_width
       _SCREAMING_SNAKE_CASE							    =dst_height

       _SCREAMING_SNAKE_CASE							    =self.src_w / self.dst_w
       _SCREAMING_SNAKE_CASE							    =self.src_h / self.dst_h

       _SCREAMING_SNAKE_CASE							    =_SCREAMING_SNAKE_CASE							    =(
           np.ones((self.dst_h, self.dst_w, 3)							,					np.uinta ) * 255
       )





  def 						A  (		self      :	Any )	->    Tuple:





       '''simple docstring'''






       for i in range(self.dst_h ):
            for j in range(self.dst_w ):
                 _SCREAMING_SNAKE_CASE							    =self.img[self.get_y(_a )][self.get_x(_a )]





  def 						A  (		self      :	int							,					_a      :	int )	->    int:





       '''simple docstring'''






       return int(self.ratio_x * x )





  def 						A  (		self      :	Dict							,					_a      :	int )	->    int:





       '''simple docstring'''






       return int(self.ratio_y * y )


if __name__ == "__main__":
     lowerCamelCase ,    lowerCamelCase :      Optional[Any]					 =     8_0_0, 6_0_0
     lowerCamelCase :      str					 =     imread("image_data/lena.jpg", 1)
     lowerCamelCase :      Optional[int]					 =     NearestNeighbour(im, dst_w, dst_h)
     n.process()

     imshow(
         f'''Image resized from: {im.shape[1]}x{im.shape[0]} to {dst_w}x{dst_h}''', n.output
     )
     waitKey(0)
     destroyAllWindows()








'''simple docstring'''







def  SCREAMING_SNAKE_CASE_       (UpperCamelCase				,			UpperCamelCase      )      ->       int:
							return abs(UpperCamelCase      ) if a == 0 else greatest_common_divisor(b % a				,			UpperCamelCase      )





def  SCREAMING_SNAKE_CASE_       (UpperCamelCase				,			UpperCamelCase      )      ->       int:
							while y:  # --> when y=0 then loop will terminate and return x as final GCD.
														lowerCamelCase__  ,		lowerCamelCase__					:	Tuple         =       y, x % y
							return abs(UpperCamelCase      )





def  SCREAMING_SNAKE_CASE_       ()      ->       Tuple:
							try:
														lowerCamelCase__					:	Dict         =       input("""Enter two integers separated by comma (,): """      ).split(""","""      )
														lowerCamelCase__					:	Any         =       int(nums[0]      )
														lowerCamelCase__					:	Optional[Any]         =       int(nums[1]      )
														print(
														    f'''greatest_common_divisor({num_a}, {num_a}) = '''
														    f'''{greatest_common_divisor(UpperCamelCase				,			UpperCamelCase      )}'''      )
														print(f'''By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(UpperCamelCase				,			UpperCamelCase      )}'''      )
							except (IndexError, UnboundLocalError, ValueError):
														print("""Wrong input"""      )


if __name__ == "__main__":
			main()

