CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
_fast_dict.pxd20 linesDownload Raw Back to utils
1# Authors: The scikit-learn developers
2# SPDX-License-Identifier: BSD-3-Clause
3
4"""
5Uses C++ map containers for fast dict-like behavior with keys being
6integers, and values float.
7"""
8
9from libcpp.map cimport map as cpp_map
10
11from ._typedefs cimport float64_t, intp_t
12
13
14###############################################################################
15# An object to be used in Python
16
17cdef class IntFloatDict:
18    cdef cpp_map[intp_t, float64_t] my_map
19    cdef _to_arrays(self, intp_t [:] keys, float64_t [:] values)
20 
Aluode/PerceptionLabPortable · CoolFace