Skip to content
Snippets Groups Projects
Commit e2d96a7b authored by ferrari's avatar ferrari
Browse files

Improve autocompilation and associated readme

parent c50278c8
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ the GSPR loss function with a second-order polynomial.
Prerequisite
------------
This program uses the following libraries (tested with the following version):
This program uses the following libraries (tested with the following version, but should work with other versions):
* cython 0.29
* numpy 1.21
* scipy 1.7.1
......@@ -17,6 +17,12 @@ This program uses the following libraries (tested with the following version):
* pandas 1.3 (needed only for saving in a non CSV format)
* tqdm 4.62 (optional if you want a progress bar)
`c_corr.pyx` will automaticly be compiled at the first run of `gsrp_tdoa_hyperres.py`.
In case the compilation fail, you can manually compile it with:
```
python cython_setup.py build_ext --inplace
```
Usage
-----
```
......
......@@ -29,7 +29,7 @@ try:
except ModuleNotFoundError:
print(f'{BColors.WARNING}Unable to load c_corr. Attempting to recompile...{BColors.ENDC}')
from subprocess import run
run('python cython_setup.py build_ext --inplace'.split())
run(f"python {os.path.join(os.path.dirname(__file__), 'cython_setup.py')} build_ext --inplace".split())
import c_corr
print(f'{BColors.OKGREEN}Done{BColors.ENDC}')
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment