From 38c9dd4e09f38f1c1daa9350cf20f8389023ef6f Mon Sep 17 00:00:00 2001 From: popo Date: Wed, 25 Apr 2012 05:32:21 +0000 Subject: [PATCH] Fix bug. get_label() returns integer list. model.get_type() is not supported. --- python/README | 1 - python/liblinear.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/python/README b/python/README index e856e74..d2ce9e8 100644 --- a/python/README +++ b/python/README @@ -197,7 +197,6 @@ LIBLINEAR shared library: Some interface functions to access LIBLINEAR models are wrapped as members of the class model: - >>> type = model_.get_type() >>> nr_feature = model_.get_nr_feature() >>> nr_class = model_.get_nr_class() >>> class_labels = model_.get_labels() diff --git a/python/liblinear.py b/python/liblinear.py index 890e18a..506f118 100644 --- a/python/liblinear.py +++ b/python/liblinear.py @@ -222,7 +222,7 @@ class model(Structure): def get_labels(self): nr_class = self.get_nr_class() - labels = (c_double * nr_class)() + labels = (c_int * nr_class)() liblinear.get_labels(self, labels) return labels[:nr_class] -- 2.40.0