Skip to content

Commit

Permalink
fix bug #91
Browse files Browse the repository at this point in the history
  • Loading branch information
QinbinLi committed Jul 11, 2018
1 parent ee8f806 commit bd0eb35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/thundersvmScikit.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def _dense_fit(self, X, y, solver_type, kernel):
else:
weight_size = len(self.class_weight)
weight_label = (c_int * weight_size)()
weight_label[:] = self.class_weight.keys()
weight_label[:] = list(self.class_weight.keys())
weight = (c_float * weight_size)()
weight[:] = self.class_weight.values()
weight[:] = list(self.class_weight.values())

n_features = (c_int * 1)()
n_classes = (c_int * 1)()
Expand Down Expand Up @@ -198,9 +198,9 @@ def _sparse_fit(self, X, y, solver_type, kernel):
else:
weight_size = len(self.class_weight)
weight_label = (c_int * weight_size)()
weight_label[:] = self.class_weight.keys()
weight_label[:] = list(self.class_weight.keys())
weight = (c_float * weight_size)()
weight[:] = self.class_weight.values()
weight[:] = list(self.class_weight.values())

n_features = (c_int * 1)()
n_classes = (c_int * 1)()
Expand Down

0 comments on commit bd0eb35

Please sign in to comment.