


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







class     __lowercase    :



		"""simple docstring"""

		def __init__(      self						,	A						,	A						,	A     )   ->      Any:







					'''simple docstring'''







					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  						=   (
					    np.ones((self.dst_h, self.dst_w, 3)						,	np.uinta     ) * 2_55
					)







		def  __A					(      self     )   ->      Optional[int]:







					'''simple docstring'''







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







		def  __A					(      self						,	A     )   ->      Optional[int]:







					'''simple docstring'''







					return int(self.ratio_x * x     )







		def  __A					(      self						,	A     )   ->      Union[str, Any]:







					'''simple docstring'''







					return int(self.ratio_y * y     )


if __name__ == "__main__":
		UpperCAmelCase					:  Any			=						8_00, 6_00
		UpperCAmelCase					:  str			=						imread("image_data/lena.jpg", 1)
		UpperCAmelCase					:  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 			snake_case_   (  SCREAMING_SNAKE_CASE__							,      SCREAMING_SNAKE_CASE__     ):







				"""simple docstring"""





				return int((input_a, input_a).count(0     ) != 0     )







def 			snake_case_   (  ):







				"""simple docstring"""





				assert nand_gate(0							,      0     ) == 1
				assert nand_gate(0							,      1     ) == 1
				assert nand_gate(1							,      0     ) == 1
				assert nand_gate(1							,      1     ) == 0


if __name__ == "__main__":
				print(nand_gate(0, 0))
				print(nand_gate(0, 1))
				print(nand_gate(1, 0))
				print(nand_gate(1, 1))




