From 82534389a0cc26a52fcb1fc7eabc6863523f43a3 Mon Sep 17 00:00:00 2001 From: Sinacam Date: Fri, 5 Aug 2022 20:09:44 +0800 Subject: [PATCH] fixed csr_scale resize --- python/liblinear/commonutil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/liblinear/commonutil.py b/python/liblinear/commonutil.py index 02e64d7..6ec304b 100644 --- a/python/liblinear/commonutil.py +++ b/python/liblinear/commonutil.py @@ -160,8 +160,8 @@ def csr_scale(x, scale_param): if not n == len(coef): print("WARNING: The dimension of scaling parameters and feature number do not match.", file=sys.stderr) - coef = resize(coef, n) - offset = resize(offset, n) + coef = np.resize(coef, n) + offset = np.resize(offset, n) # scaled_x = x * diag(coef) + ones(l, 1) * offset' offset = sparse.csr_matrix(offset.reshape(1, n)) -- 2.40.0