File: _k_means_fast.pxd

package info (click to toggle)
scikit-learn 0.23.2-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 21,892 kB
  • sloc: python: 132,020; cpp: 5,765; javascript: 2,201; ansic: 831; makefile: 213; sh: 44
file content (23 lines) | stat: -rw-r--r-- 764 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# cython: language_level=3


from cython cimport floating
cimport numpy as np


cdef floating _euclidean_dense_dense(floating*, floating*, int, bint) nogil

cdef floating _euclidean_sparse_dense(floating[::1], int[::1], floating[::1],
                                      floating, bint) nogil

cpdef void _relocate_empty_clusters_dense(
    np.ndarray[floating, ndim=2, mode='c'], floating[::1], floating[:, ::1],
    floating[:, ::1], floating[::1], int[::1])

cpdef void _relocate_empty_clusters_sparse(
    floating[::1], int[::1], int[::1], floating[::1], floating[:, ::1],
    floating[:, ::1], floating[::1], int[::1])

cdef void _average_centers(floating[:, ::1], floating[::1])

cdef void _center_shift(floating[:, ::1], floating[:, ::1], floating[::1])