From: Sinacam Date: Fri, 5 Aug 2022 12:09:44 +0000 (+0800) Subject: fixed csr_scale resize X-Git-Tag: v245~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82534389a0cc26a52fcb1fc7eabc6863523f43a3;p=liblinear fixed csr_scale resize --- 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))