
'''simple docstring'''







from typing import Any

import numpy as np







def        SCREAMING_SNAKE_CASE__			(     __A			) ->			bool:
	return np.array_equal(__A    ,       matrix.conjugate().T			)







def        SCREAMING_SNAKE_CASE__			(     __A    ,       __A			) ->			Any:
	_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        SCREAMING_SNAKE_CASE__			(     ) ->			None:
	_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()



'''simple docstring'''







import math







def        SCREAMING_SNAKE_CASE__			(     __A    ,       __A			) ->			float:
	if (
	    not isinstance(__A    ,       (int, float)			)
	    or power_factor < -1
	    or power_factor > 1
	):
		raise ValueError('power_factor must be a valid float value between -1 and 1.'			)
	return apparent_power * power_factor







def        SCREAMING_SNAKE_CASE__			(     __A    ,       __A			) ->			float:
	if (
	    not isinstance(__A    ,       (int, float)			)
	    or power_factor < -1
	    or power_factor > 1
	):
		raise ValueError('power_factor must be a valid float value between -1 and 1.'			)
	return apparent_power * math.sqrt(1 - power_factor**2			)


if __name__ == "__main__":
					import doctest

					doctest.testmod()

