Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,26 @@ Alternatively, you can install the `eif` R package from [here](https://github.co
No extra requirements are needed.
In addition, it also contains means to draw the trees created using the [igraph](http://igraph.org/) library. See the example for tree visualizations.

## Conda Environment instructions for Windows 10

Before creating the conda environment make sure the Microsoft Visual C++ 14.0 build tools is installed.
1. Download the installer from [Visual Studio website](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
2. Select `C++ build tools` from the main menu

Then from the PowerShell
```
(base)> cd eif
(base)> conda env create -f conda_env.yml
(base)> conda acitvate eif-devenv
(eif-devenv)> pip install .
```
(Optional) In case you want to use the Jupyter notebooks:
```
(eif-devenv)> conda install jupyter matplotlib scipy seaborn scikit-learn
(eif-devenv)> cd Notebooks
(eif-devenv)> jupyter notebook
```

## Use

See these notebooks for examples on how to use it
Expand Down
8 changes: 8 additions & 0 deletions conda_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: eif-devenv
channels:
- defaults
- conda-forge
dependencies:
- python==3.7
- cython==0.29.20
- numpy==1.18.5
1 change: 1 addition & 0 deletions eif.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <random>
#include <algorithm>
#include <unordered_set>
#include <string>

#define EULER_CONSTANT 0.5772156649

Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ def read(filename):
return open(os.path.join(prjdir, filename)).read()


if sys.platform.startswith("win"):
compilation_flags = ['/std:c++latest']
else:
compilation_flags = ['-std=c++11', '-Wcpp']

extra_link_args = []
libraries = []
library_dirs = []
Expand All @@ -29,7 +34,7 @@ def read(filename):
ext_modules=[Extension("eif",
sources=["_eif.pyx", "eif.cxx"],
include_dirs=[numpy.get_include()],
extra_compile_args=['-std=c++11', '-Wcpp'],
extra_compile_args=compilation_flags,
language="c++")],
scripts=[],
py_modules=['eif_old', 'version'],
Expand Down