Skip to content

FIX Fixes memoryview bug in DistanceMetric #19933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sklearn/neighbors/_dist_metrics.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ cdef class DistanceMetric:
cdef DTYPE_t rdist(self, DTYPE_t* x1, DTYPE_t* x2,
ITYPE_t size) nogil except -1

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

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

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