mirror of
https://github.com/zama-ai/concrete.git
synced 2026-01-12 22:37:59 -05:00
1.5 KiB
1.5 KiB
module concrete.fhe.extensions.table
Declaration of LookupTable class.
class LookupTable
LookupTable class, to provide a way to do direct table lookups.
method __init__
__init__(table: Any)
method apply
apply(
key: Union[int, integer, bool_, ndarray],
table: ndarray
) → Union[int, integer, ndarray]
Apply lookup table.
Args: key (Union[int, np.integer, np.bool_, np.ndarray]): lookup key
table (np.ndarray): lookup table
Returns: Union[int, np.integer, np.ndarray]: lookup result
Raises:
ValueError: if table cannot be looked up with key