



'''simple docstring'''




from cva import destroyAllWindows, imread, imshow, waitKey



def    __lowerCamelCase						(      _lowercase	)   ->    Tuple:
							# getting number of pixels in the image
							UpperCAmelCase  ,  UpperCAmelCase  :	List[Any]							  =	img.shape[0], img.shape[1]

							# converting each pixel's color to its negative
							for i in range(_lowercase	):
														for j in range(_lowercase	):
																					UpperCAmelCase  :	int							  =	[2_5_5, 2_5_5, 2_5_5] - img[i][j]

							return img


if __name__ == "__main__":
							# read original image
							a     :    Optional[int]      						=					imread("""image_data/lena.jpg""", 1)

							# convert to its negative
							a     :    List[str]      						=					convert_to_negative(img)

							# show result image
							imshow("""negative of original image""", img)
							waitKey(0)
							destroyAllWindows()






'''simple docstring'''




from collections.abc import Callable

import numpy as np



def    __lowerCamelCase						(      _lowercase			,       _lowercase			,       _lowercase			,       _lowercase			,       _lowercase	)   ->    np.array:
							UpperCAmelCase  :	Optional[Any]							  =	int(np.ceil((x_end - xa) / step_size	)	)
							UpperCAmelCase  :	str							  =	np.zeros((n + 1,)	)
							UpperCAmelCase  :	Optional[Any]							  =	ya
							UpperCAmelCase  :	Union[str, Any]							  =	xa

							for k in range(_lowercase	):
														UpperCAmelCase  :	Dict							  =	y[k] + step_size * ode_func(_lowercase			,       y[k]	)
														UpperCAmelCase  :	Optional[int]							  =	y[k] + (
														    (step_size / 2) * (ode_func(_lowercase			,       y[k]	) + ode_func(x + step_size			,       _lowercase	))
														)
														x += step_size

							return y


if __name__ == "__main__":
							import doctest

							doctest.testmod()

