aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin <calvin@EESI>2013-03-19 19:40:25 -0400
committerCalvin <calvin@EESI>2013-03-19 19:40:25 -0400
commit311200427caeaee2075c9bbf4ddcc4858ca85dec (patch)
treedec443a3713bf05fd71ff171002abccb6123904e
parent187ef9e49088d89a41a5c242c6e29a8c09a71b33 (diff)
okay it's calling feast now, we just need to debug it
-rw-r--r--python/feast.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/python/feast.py b/python/feast.py
index bc6fc93..4b4ad05 100644
--- a/python/feast.py
+++ b/python/feast.py
@@ -16,10 +16,16 @@ def select(data, labels, n_observations, n_features, n_select, method):
c_n_observations = c_int(n_observations)
c_n_select = c_int(n_select)
c_n_features = c_int(n_features)
- c_data = (c_double * n_observations * n_features)(*data.tolist())
- c_labels = (c_int * len(labels))(*labels)
+ c_labels = (c_double * len(labels))(*labels)
+
+ combined_list = []
+ map(combined_list.extend, data.tolist())
+ c_data = (c_double * len(combined_list))(*combined_list)
+
+
+
# right now just call only JMI, work out the rest later
- libFSToolbox.JMI(c_n_select, c_n_observations, c_n_features, c_data, c_labels, c_output)
+ libFSToolbox.JMI(c_n_select, c_n_observations, c_n_features, repr(c_data), repr(c_labels), repr(c_output))
return selected_features