Skip to content

Latest commit

 

History

History
64 lines (30 loc) · 1.61 KB

concrete.fhe.extensions.table.md

File metadata and controls

64 lines (30 loc) · 1.61 KB

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