Warning in angle_between
km3pipe.math.angle_between(v1, v2, axis=0)
returns nan with a warning if v1==v2.
This is due to the float precision of np.inner
:
In [7]: a
Out[7]: array([0.57735027, 0.57735027, 0.57735027])
In [8]: np.inner(a,a)
Out[8]: 1.0000000000000002
which is passed to np.arccos
.
Could be solved with np.clip(-1,1, np.inner(...))
?
Edited by Lukas Maderer