From 06cd0464ab70cb145eb02a667ef9ae4a10e79caa Mon Sep 17 00:00:00 2001 From: Nuno Fachada Date: Fri, 31 Mar 2023 20:27:54 +0100 Subject: [PATCH] Remove impossible to reach code from angle_btw --- pyclugen/helper.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pyclugen/helper.py b/pyclugen/helper.py index f00c9c9..15aa48b 100644 --- a/pyclugen/helper.py +++ b/pyclugen/helper.py @@ -6,7 +6,7 @@ from typing import Callable -from numpy import abs, arctan, argmax, argmin, pi, signbit, sum, zeros +from numpy import abs, arctan, argmax, argmin, sum, zeros from numpy.linalg import norm from numpy.random import Generator from numpy.typing import NDArray @@ -53,14 +53,7 @@ def angle_btw(v1: NDArray, v2: NDArray) -> float: y = u1 - u2 x = u1 + u2 - a0 = 2 * arctan(norm(y) / norm(x)) - - if (not signbit(a0)) or signbit(pi - a0): - return a0 - elif signbit(a0): - return 0.0 - else: - return pi + return 2 * arctan(norm(y) / norm(x)) def clupoints_n_1_template(