8000 Merge pull request #4456 from cgohlke/patch-1 · scikit-learn/scikit-learn@b18e7dd · GitHub
[go: up one dir, main page]

Skip to content

Commit b18e7dd

Browse files
committed
Merge pull request #4456 from cgohlke/patch-1
[MRG + 1] Fix signature not compatible with previous declaration
2 parents b28d3bf + 5e50259 commit b18e7dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/neighbors/dist_metrics.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,10 +981,10 @@ cdef class HaversineDistance(DistanceMetric):
981981
return 2 * asin(sqrt(sin_0 * sin_0
982982
+ cos(x1[0]) * cos(x2[0]) * sin_1 * sin_1))
983983

984-
cdef inline DTYPE_t _rdist_to_dist(self, DTYPE_t rdist):
984+
cdef inline DTYPE_t _rdist_to_dist(self, DTYPE_t rdist) except -1:
985985
return 2 * asin(sqrt(rdist))
986986

987-
cdef inline DTYPE_t _dist_to_rdist(self, DTYPE_t dist):
987+
cdef inline DTYPE_t _dist_to_rdist(self, DTYPE_t dist) except -1:
988988
cdef DTYPE_t tmp = sin(0.5 * dist)
989989
return tmp * tmp
990990

0 commit comments

Comments
 (0)
0