diff options
Diffstat (limited to 'python/feast.py')
-rw-r--r-- | python/feast.py | 12 |
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 |