mirror of
https://github.com/zama-ai/concrete.git
synced 2026-01-14 23:38:10 -05:00
2.6 KiB
2.6 KiB
module concrete.compiler.value_exporter
ValueExporter.
class ValueExporter
A helper class to create Values.
method __init__
__init__(value_exporter: ValueExporter)
Wrap the native C++ object.
Args: value_exporter (_ValueExporter): object to wrap
Raises:
TypeError: if value_exporter is not of type _ValueExporter
method export_scalar
export_scalar(position: int, value: int) → Value
Export scalar.
Args: position (int): position of the argument within the circuit
value (int): scalar to export
Returns: Value: exported scalar
method export_tensor
export_tensor(position: int, values: List[int], shape: List[int]) → Value
Export tensor.
Args: position (int): position of the argument within the circuit
values (List[int]): tensor elements to export
shape (List[int]): tensor shape to export
Returns: Value: exported tensor
method new
new(
keyset: KeySet,
client_parameters: ClientParameters,
circuit_name: str = 'main'
) → ValueExporter
Create a value exporter.