Problem run Example

I run the example of the documentation,

import concrete.numpy as hnp

def add(x, y):
return x + y

inputset = [(2, 3), (0, 0), (1, 6), (7, 7), (7, 1), (3, 2), (6, 1), (1, 7), (4, 5), (5, 4)]
compiler = hnp.NPFHECompiler(add, {“x”: “encrypted”, “y”: “encrypted”})

print(f"Compiling…")
circuit = compiler.compile_on_inputset(inputset)

examples = [(3, 4), (1, 2), (7, 7), (0, 0)]
for example in examples:
result = circuit.run(*example)
print(f"Evaluation of {’ + '.join(map(str, example))} homomorphically = {result}")

but it show a error

Help me please

1 Like

Hello,

If you are using latest version of concrete-numpy (0.5.0), then you should be using encrypt_run_decrypt instead of run. This has been announced as a breaking change here, and should be already updated in the docs of that same version. Please let me know if there is any example in the docs (for the latest version) that doesn’t reflect that.

1 Like

We just found out that it was the README example that wasn’t updated, so we just fixed that.

1 Like

Thank you very much for your answer