Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ce217db

Browse filesBrowse files
authored
FIX Fixes memory view bug in distance metrics (#19933)
1 parent 9099c79 commit ce217db
Copy full SHA for ce217db

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎sklearn/neighbors/_dist_metrics.pxd

Copy file name to clipboardExpand all lines: sklearn/neighbors/_dist_metrics.pxd
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ cdef class DistanceMetric:
6767
cdef DTYPE_t rdist(self, DTYPE_t* x1, DTYPE_t* x2,
6868
ITYPE_t size) nogil except -1
6969

70-
cdef int pdist(self, DTYPE_t[:, ::1] X, DTYPE_t[:, ::1] D) except -1
70+
cdef int pdist(self, const DTYPE_t[:, ::1] X, DTYPE_t[:, ::1] D) except -1
7171

72-
cdef int cdist(self, DTYPE_t[:, ::1] X, DTYPE_t[:, ::1] Y,
72+
cdef int cdist(self, const DTYPE_t[:, ::1] X, const DTYPE_t[:, ::1] Y,
7373
DTYPE_t[:, ::1] D) except -1
7474

7575
cdef DTYPE_t _rdist_to_dist(self, DTYPE_t rdist) nogil except -1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.