diff --git a/frontends/concrete-python/concrete/fhe/compilation/client.py b/frontends/concrete-python/concrete/fhe/compilation/client.py index 9b5b3fbc4d..f20aa675e7 100644 --- a/frontends/concrete-python/concrete/fhe/compilation/client.py +++ b/frontends/concrete-python/concrete/fhe/compilation/client.py @@ -294,11 +294,10 @@ def decrypt( decrypted = tuple( client_circuit.process_output( result._inner, position # pylint: disable=protected-access - ) - .to_py_val() - .astype("int64") + ).to_py_val() for position, result in enumerate(flattened_results) ) + decrypted = tuple(d.astype("int64") if isinstance(d, np.ndarray) else d for d in decrypted) return decrypted if len(decrypted) != 1 else decrypted[0] @@ -346,11 +345,10 @@ def simulate_decrypt( decrypted = tuple( client_circuit.simulate_process_output( result._inner, position # pylint: disable=protected-access - ) - .to_py_val() - .astype("int64") + ).to_py_val() for position, result in enumerate(flattened_results) ) + decrypted = tuple(d.astype("int64") if isinstance(d, np.ndarray) else d for d in decrypted) return decrypted if len(decrypted) != 1 else decrypted[0]