Skip to content

Commit cb9560c

Browse files
committed
some pep8 fixes .... but probably more to come
1 parent 9c074c7 commit cb9560c

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

scikits/learn/svm/src/liblinear/_liblinear.c

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scikits/learn/svm/src/liblinear/_liblinear.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cdef extern from "linear.h":
2020
void destroy_param (parameter *)
2121

2222
cdef extern from "liblinear_helper.c":
23-
void copy_w(char *, model *, int,int,int)
23+
void copy_w(char *, model *, int)
2424
parameter *set_parameter (int, double, double, int,
2525
char *, char *)
2626
problem *set_problem (char *, char *, np.npy_intp *, double)
@@ -89,11 +89,11 @@ def train_wrap ( np.ndarray[np.float64_t, ndim=2, mode='c'] X,
8989
if bias > 0: nr_feature = nr_feature + 1
9090
if nr_class == 2:
9191
w = np.empty((1, nr_feature),order='F')
92-
copy_w(w.data, model, nr_feature,0,0)
92+
copy_w(w.data, model, nr_feature)
9393
else:
9494
len_w = (nr_class) * nr_feature
9595
w = np.empty((nr_class, nr_feature),order='F')
96-
copy_w(w.data, model, len_w,nr_class,nr_feature)
96+
copy_w(w.data, model, len_w)
9797

9898
cdef np.ndarray[np.int32_t, ndim=1, mode='c'] label
9999
label = np.empty(nr_class, dtype=np.int32)
@@ -146,11 +146,11 @@ def csr_train_wrap ( int n_features,
146146
if bias > 0: nr_feature = nr_feature + 1
147147
if nr_class == 2:
148148
w = np.empty((1, nr_feature),order='F')
149-
copy_w(w.data, model, nr_feature,0,0)
149+
copy_w(w.data, model, nr_feature)
150150
else:
151151
len_w = (nr_class * nr_feature)
152152
w = np.empty((nr_class, nr_feature),order='F')
153-
copy_w(w.data, model, len_w,nr_class,nr_feature)
153+
copy_w(w.data, model, len_w)
154154

155155
cdef np.ndarray[np.int32_t, ndim=1, mode='c'] label
156156
label = np.empty((nr_class), dtype=np.int32)

scikits/learn/svm/src/liblinear/liblinear_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void cfort(double *data, int len, int l1, int l2)
210210

211211
}
212212

213-
void copy_w(char *data, struct model *model, int len, int l1, int l2)
213+
void copy_w(char *data, struct model *model, int len)
214214
{
215215
memcpy(data, model->w, len * sizeof(double));
216216

0 commit comments

Comments
 (0)