import numpy as np
import ABXpy.distances.metrics.cosine as cosine
a = np.array([[1.17004299, 0.85545695, 1.00981605, 1.16844952, 0.63780457, 0.86987048]])
cosine.cosine_distance(a, a)
I get the following warning:
/home/username/anaconda3/lib/python3.7/site-packages/ABXpy/distances/metrics/cosine.py:25: ComplexWarning: Casting complex values to real discards the imaginary part
d = np.array([[np.float64(np.lib.scimath.arccos(d[0, 0]) / np.pi)]])
I believe its because the inner intermediate d var is slightly higher than 1 because of a float rounding.
Hello, when running:
I get the following warning:
I believe its because the inner intermediate
d
var is slightly higher than 1 because of a float rounding.