Skip to content

Commit 83e2d77

Browse files
author
Guillaume Smith
committed
gmpy2 is not compulsory anymore.
1 parent 8269381 commit 83e2d77

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ Or use nose::
2828

2929
nosetests
3030

31+
Note related to gmpy2
32+
---------------------
33+
34+
`gmpy2` is not required to use the library, but is preferred. A pure Python implementation is available but
35+
`gmpy2` drastically improves performances. As indication on a laptop not dedicated to benchmarking, running the example
36+
`examples/federated_learning_with_encryption.py` provided in the library took:
37+
- 4.5s with `gmpy2` installed
38+
- 35.7s without `gmpy2` installed
39+
40+
However, `gmpy2` is a requirement to run the tests.
3141

3242
Code History
3343
------------

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
},
5757
extras_require={
5858
'cli': ['click'],
59-
'examples': ['sklearn']
59+
'examples': ['numpy', 'scipy', 'sklearn']
6060
},
61-
install_requires=['gmpy2'],
62-
tests_require=['numpy', 'click'],
61+
install_requires=[],
62+
tests_require=['click', 'gmpy2', 'numpy'],
6363
test_suite="phe.tests"
6464
)

0 commit comments

Comments
 (0)