mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-16 07:35:16 -05:00
73 lines
2.1 KiB
Markdown
73 lines
2.1 KiB
Markdown
<!-- markdownlint-disable -->
|
|
|
|
<a href="../../../compilers/concrete-compiler/compiler/lib/Bindings/Python/concrete/fhe/extensions/zeros.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
|
|
|
|
# <kbd>module</kbd> `concrete.fhe.extensions.zeros`
|
|
Declaration of `zeros` and `zero` functions, to simplify creation of encrypted zeros.
|
|
|
|
|
|
---
|
|
|
|
<a href="../../../compilers/concrete-compiler/compiler/lib/Bindings/Python/concrete/fhe/extensions/zeros.py#L14"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
|
|
|
|
## <kbd>function</kbd> `zeros`
|
|
|
|
```python
|
|
zeros(shape: Union[int, Tuple[int, ]]) → Union[ndarray, Tracer]
|
|
```
|
|
|
|
Create an encrypted array of zeros.
|
|
|
|
|
|
|
|
**Args:**
|
|
shape (Tuple[int, ...]): shape of the array
|
|
|
|
|
|
|
|
**Returns:**
|
|
Union[np.ndarray, Tracer]: Tracer that represents the operation during tracing ndarray filled with zeros otherwise
|
|
|
|
|
|
---
|
|
|
|
<a href="../../../compilers/concrete-compiler/compiler/lib/Bindings/Python/concrete/fhe/extensions/zeros.py#L46"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
|
|
|
|
## <kbd>function</kbd> `zero`
|
|
|
|
```python
|
|
zero() → Union[ndarray, Tracer]
|
|
```
|
|
|
|
Create an encrypted scalar with the value of zero.
|
|
|
|
|
|
|
|
**Returns:**
|
|
Union[np.ndarray, Tracer]: Tracer that represents the operation during tracing ndarray with zero otherwise
|
|
|
|
|
|
---
|
|
|
|
<a href="../../../compilers/concrete-compiler/compiler/lib/Bindings/Python/concrete/fhe/extensions/zeros.py#L59"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
|
|
|
|
## <kbd>function</kbd> `zeros_like`
|
|
|
|
```python
|
|
zeros_like(array: Union[ndarray, Tracer]) → Union[ndarray, Tracer]
|
|
```
|
|
|
|
Create an encrypted array of zeros 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 zeros otherwise
|
|
|
|
|