Skip to content

Commit 12e646b

Browse files
author
Leily Rabbani
committed
fixed setup.py for eigen path
1 parent f93173d commit 12e646b

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

setup.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,23 @@
33
from setuptools.command.build_ext import build_ext
44
import sys
55
import setuptools
6+
from sysconfig import get_config_var, get_paths
67

7-
__version__ = '0.0.0'
8-
9-
10-
class get_eigen_include(object):
11-
"""Includes eigen3 path """
128

13-
def __init__(self, user=False):
14-
self.user = user
15-
16-
def __str__(self):
17-
import eigen3
18-
return eigen3.get_include(self.user)
9+
__version__ = '0.0.0'
1910

11+
def get_include(): #TODO
12+
info = get_paths()
13+
Eigen_path = info['include']+'/../eigen3'
14+
return Eigen_path
2015

2116
KR_module = [
2217
Extension(
2318
'KRBalancing',
2419
['src/KRBalancing.cpp'],
2520
include_dirs=[
2621
# Path to eigen3 headers
27-
get_eigen_include(),
28-
get_eigen_include(user=True)
22+
get_include(),
2923
],
3024
language='c++'
3125
),

src/KRBalancing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class kr_balancing{
137137
}//End of the inner 'while'
138138
}
139139
SparseMatrixR get_output(){
140-
std::cout << "export output"<<std::endl;
140+
std::cout << "export output of shape "<< A.cwiseProduct(x*x.transpose()).rows() <<std::endl;
141141
return A.cwiseProduct(x*x.transpose());
142142
}
143143
private:

0 commit comments

Comments
 (0)