From: popo Date: Wed, 25 Apr 2012 05:32:21 +0000 (+0000) Subject: Fix bug. get_label() returns integer list. model.get_type() is not supported. X-Git-Tag: v191~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38c9dd4e09f38f1c1daa9350cf20f8389023ef6f;p=liblinear Fix bug. get_label() returns integer list. model.get_type() is not supported. --- 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]