(theta)
Raises exception if theta is not within 0 and pi
Raises exception if theta is not within 0 and pi
Raises exception if theta is not within 0 and pi
def check_theta_valid(theta):
    """Raises exception if theta is not within 0 and pi"""
    theta = np.asarray(theta)
    if not ((theta >= 0).all() and (theta <= np.pi + 1e-5).all()):
        raise ValueError("THETA is out of range [0,pi]")
def check_theta_valid ( theta ) : theta = np . asarray ( theta ) if not ( ( theta >= 0 ) . all ( ) and ( theta <= np . pi + 1e-5 ) . all ( ) ) : raise ValueError ( "THETA is out of range [0,pi]" )