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







class  __A				:
 def __init__(   self			:    List[Any]				,   lowerCamelCase			:    str				,   lowerCamelCase			:    Union[str, Any]				,   lowerCamelCase			:    Optional[int]       ):



   """simple docstring"""





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

   __A		:     Optional[int]												=		img
   __A		:     str												=		img.shape[1]
   __A		:     List[Any]												=		img.shape[0]
   __A		:     Optional[Any]												=		dst_width
   __A		:     Optional[int]												=		dst_height

   __A		:     str												=		self.src_w / self.dst_w
   __A		:     Dict												=		self.src_h / self.dst_h

   __A		:     List[Any]												=		(
       np.ones((self.dst_h, self.dst_w, 3)				,   np.uinta       ) * 2_55
   )
 def 		lowercase_(   self			:    int       ):



   """simple docstring"""





   for i in range(self.dst_h       ):
     for j in range(self.dst_w       ):
       __A		:     Dict												=		self.img[self.get_y(lowerCamelCase       )][self.get_x(lowerCamelCase       )]
 def 		lowercase_(   self			:    List[str]				,   lowerCamelCase			:    str       ):



   """simple docstring"""





   return int(self.ratio_x * x       )






 def 		lowercase_(   self			:    List[str]				,   lowerCamelCase			:    List[Any]       ):



   """simple docstring"""





   return int(self.ratio_y * y       )


if __name__ == "__main__":
     A__		,      A__   :		Optional[Any] 		=800, 600
     A__   :		int 		=imread('image_data/lena.jpg', 1)
     A__   :		Any 		=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'''
from __future__ import annotations







def        A_     (						__SCREAMING_SNAKE_CASE						:  list[int] )				->       int:





  """simple docstring"""

  if not nums:
    return 0
  __A		:     List[Any]												=		nums[0]
  __A		:     Union[str, Any]												=		0
  for num in nums[1:]:
    __A							,					__A		:     Union[str, Any]												=		(
        max_excluding + num,
        max(__SCREAMING_SNAKE_CASE			,     __SCREAMING_SNAKE_CASE ),
    )
  return max(__SCREAMING_SNAKE_CASE			,     __SCREAMING_SNAKE_CASE )


if __name__ == "__main__":
     import doctest

     doctest.testmod()



