You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importnumpyasnpimportABXpy.distances.metrics.cosineascosinea=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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: