Declaration of LookupTable
class.
LookupTable class, to provide a way to do direct table lookups.
__init__(table: Any)
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