"""simple docstring"""


import numpy as np
from cva import destroyAllWindows, imread, imshow, waitKey






class   __UpperCAmelCase		:

				def __init__( self      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase ):
										if dst_width < 0 or dst_height < 0:
																raise ValueError("Destination width/height should be > 0" )

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

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

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

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

				def 						_a      ( self      ,					_lowerCamelCase ):
										return int(self.ratio_x * x )






				def 						_a      ( self      ,					_lowerCamelCase ):
										return int(self.ratio_y * y )


if __name__ == "__main__":
	a				, a				=800, 600
	a				=imread('image_data/lena.jpg', 1)
	a				=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      lowerCamelCase_					(   __lowerCAmelCase							)				->   int:




						'''simple docstring'''



						if not isinstance(__lowerCAmelCase  ,       __lowerCAmelCase							):
												raise TypeError("only integers accepted as input"							)
						else:
												lowerCamelCase__   =str(abs(__lowerCAmelCase							)							)
												lowerCamelCase__   =[list(__lowerCAmelCase							) for char in range(len(__lowerCAmelCase							)							)]
												for index in range(len(__lowerCAmelCase							)							):
																		num_transpositions[index].pop(__lowerCAmelCase							)
												return max(
												    int("".join(list(__lowerCAmelCase							)							)							) for transposition in num_transpositions							)


if __name__ == "__main__":
	__import__('doctest').testmod()


