Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a3f58c

Browse files
committed
fixup! DOC Better document implementation
1 parent 100949f commit 6a3f58c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sklearn/metrics/_pairwise_distances_reduction/_middle_term_computer.pyx.tp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ cdef void _middle_term_sparse_sparse_64(
4949
const SPARSE_INDEX_TYPE_t[:] Y_indptr,
5050
ITYPE_t Y_start,
5151
ITYPE_t Y_end,
52-
DTYPE_t * dist_middle_terms,
52+
DTYPE_t * D,
5353
) noexcept nogil:
54-
# This routine assumes that D is a pointer to the first element of a
54+
# This routine assumes that D points to the first element of a
5555
# zeroed buffer of length at least equal to n_X × n_Y, conceptually
5656
# representing a 2-d C-ordered array.
5757
cdef:
@@ -68,7 +68,7 @@ cdef void _middle_term_sparse_sparse_64(
6868
for y_ptr in range(Y_indptr[Y_start+j], Y_indptr[Y_start+j+1]):
6969
y_col = Y_indices[y_ptr]
7070
if x_col == y_col:
71-
dist_middle_terms[k] += -2 * X_data[x_ptr] * Y_data[y_ptr]
71+
D[k] += -2 * X_data[x_ptr] * Y_data[y_ptr]
7272

7373

7474
{{for name_suffix, upcast_to_float64, INPUT_DTYPE_t, INPUT_DTYPE in implementation_specific_values}}

0 commit comments

Comments
 (0)