





from typing import Any

import numpy as np





def 						lowerCamelCase__     (     UpperCamelCase__			:       np.ndarray						)			-> str:



							'''simple docstring'''




							return np.array_equal(__a       ,    matrix.conjugate().T						)





def 						lowerCamelCase__     (     UpperCamelCase__			:       np.ndarray       ,    UpperCamelCase__			:       np.ndarray						)			-> int:



							'''simple docstring'''




							_snake_case									=				v.conjugate().T
							_snake_case									=				v_star.dot(__a						)
							assert isinstance(__a       ,    np.ndarray						)
							return (v_star_dot.dot(__a						)) / (v_star.dot(__a						))





def 						lowerCamelCase__     (     )			-> List[str]:



							'''simple docstring'''




							_snake_case									=				np.array([[2, 2 + 1J, 4], [2 - 1J, 3, 1J], [4, -1J, 1]]						)
							_snake_case									=				np.array([[1], [2], [3]]						)
							assert is_hermitian(__a						), F'''{a} is not hermitian.'''
							print(rayleigh_quotient(__a       ,    __a						)						)

							_snake_case									=				np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]						)
							assert is_hermitian(__a						), F'''{a} is not hermitian.'''
							assert rayleigh_quotient(__a       ,    __a						) == float(3						)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					tests()










def 						lowerCamelCase__     (     UpperCamelCase__			:       list[int]       ,    UpperCamelCase__			:       int						)			-> bool:



					'''simple docstring'''




					_snake_case									=				len(UpperCamelCase__						)
					_snake_case									=				[[False] * (required_sum + 1) for _ in range(arr_len + 1						)]

					# for each arr value, a sum of zero(0) can be formed by not taking any element
					# hence True/1
					for i in range(arr_len + 1						):
										_snake_case									=				True

					# sum is not zero and set is empty then false
					for i in range(1       ,    required_sum + 1						):
										_snake_case									=				False

					for i in range(1       ,    arr_len + 1						):
										for j in range(1       ,    required_sum + 1						):
															if arr[i - 1] > j:
																				_snake_case									=				subset[i - 1][j]
															if arr[i - 1] <= j:
																				_snake_case									=				subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

					return subset[arr_len][required_sum]


if __name__ == "__main__":
					import doctest

					doctest.testmod()



