Files
concrete/docs/dev/api/concrete.fhe.extensions.ones.md
Benoit Chevallier-Mames e37a840e7e docs(compiler): adding API doc
2024-03-13 17:10:00 +01:00

2.0 KiB

module concrete.fhe.extensions.ones

Declaration of ones and one functions, to simplify creation of encrypted ones.


function ones

ones(shape: Union[int, Tuple[int, ]])  Union[ndarray, Tracer]

Create an encrypted array of ones.

Args: shape (Tuple[int, ...]): shape of the array

Returns: Union[np.ndarray, Tracer]: Tracer that respresents the operation during tracing ndarray filled with ones otherwise


function one

one()  Union[ndarray, Tracer]

Create an encrypted scalar with the value of one.

Returns: Union[np.ndarray, Tracer]: Tracer that respresents the operation during tracing ndarray with one otherwise


function ones_like

ones_like(array: Union[ndarray, Tracer])  Union[ndarray, Tracer]

Create an encrypted array of ones with the same shape as another array.

Args: array (Union[np.ndarray, Tracer]): original array

Returns: Union[np.ndarray, Tracer]: Tracer that represent the operation during tracing ndarray filled with ones otherwise