Skip to content

Commit

Permalink
Merge pull request #1142 from zama-ai/fix/ci_notebook
Browse files Browse the repository at this point in the history
fix(frontend): notebook bug due to wrong dtype
  • Loading branch information
aPere3 authored Nov 14, 2024
2 parents 61e6fad + 30ce304 commit c5d1bf7
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions frontends/concrete-python/concrete/fhe/compilation/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,16 @@ def encrypt(
client_circuit = client_program.get_client_circuit(function_name)

exported = [
(None if arg is None else Value(client_circuit.prepare_input(Value_(arg), position)))
(
None
if arg is None
else Value(
client_circuit.prepare_input(
Value_(arg.astype(np.int64) if isinstance(arg, np.ndarray) else arg),
position,
)
)
)
for position, arg in enumerate(ordered_sanitized_args)
]

Expand Down Expand Up @@ -240,7 +249,12 @@ def simulate_encrypt(
(
None
if arg is None
else Value(client_circuit.simulate_prepare_input(Value_(arg), position))
else Value(
client_circuit.simulate_prepare_input(
Value_(arg.astype(np.int64) if isinstance(arg, np.ndarray) else arg),
position,
)
)
)
for position, arg in enumerate(ordered_sanitized_args)
]
Expand Down

0 comments on commit c5d1bf7

Please sign in to comment.