chore: fix doc tests after refusing tuples for 1-input function inputsets

- also fix notebooks
This commit is contained in:
Arthur Meyre
2021-12-02 09:11:23 +01:00
parent 48aaed9ee8
commit bc1926903c
3 changed files with 10 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@@ -34,7 +34,7 @@ We also need an inputset. It is to determine the bit-widths of the intermediate
<!--python-test:cont-->
```python
inputset = [(2, 3), (0, 0), (1, 6), (7, 7), (7, 1)]
inputset = [(2, 3), (0, 0), (1, 6), (7, 7), (7, 1), (3, 2), (6, 1), (1, 7), (4, 5), (5, 4)]
```
Finally, we can compile our function to its homomorphic equivalent.

View File

@@ -98,7 +98,7 @@ artifacts = hnp.CompilationArtifacts(pathlib.Path("/tmp/custom/export/path"))
hnp.compile_numpy_function(
lambda x: 100 - (3 * (x + 2)),
{"x": hnp.EncryptedScalar(hnp.UnsignedInteger(3))},
inputset=[(i,) for i in range(2 ** 3)],
inputset=range(2 ** 3),
compilation_artifacts=artifacts,
)
artifacts.export()