ValueError: Incompatible dimensions (3, 2) (3, 1)这问题咋解决啊

问题遇到的现象和发生背景

cvxpy 支持矩阵风格的数学优化模型表示方法
数学模型如下
min = ∣∣Ax−b∣∣ 22

st.
0≤x≤1

输入格式:
第1行输入两个正整数m,n 。 m,n 是矩阵A的行数和列数

第2行输入m个数,表示向量b。
第3行到第m+2行表示矩阵A。

输出格式:
输出最优值时x的值, 小数点后精确1位数。

输入样例:
在这里给出一组输入。例如:

2,3
1,2
1,2,3
4,5,6
输出样例:
在这里给出相应的输出。例如:

0.00 0.00 0.33

问题相关代码,请勿粘贴截图

# Import packages.
import cvxpy as cp
import numpy as np
 
# Generate data.
m , n = input().split(",")

arr1 = input()
arr1 = [int(k) for k in arr1.split(",")]

    
m=int(m)
n=int(n)
line=[[0]*n]*m
for i in range(m):
    line[i] = input().split(",")

    
x = cp.Variable(n)
cost = cp.sum_squares(line @ x - arr1)
prob = cp.Problem(cp.Minimize(cost))
prob.solve()

print(x.value)


运行结果及报错内容

Traceback (most recent call last):
File "a.py", line 20, in
cost = cp.sum_squares(line @ x - arr1)
File "/usr/local/lib/python3.7/dist-packages/cvxpy/expressions/expression.py", line 49, in cast_op
return binary_op(self, other)
File "/usr/local/lib/python3.7/dist-packages/cvxpy/expressions/expression.py", line 618, in rmatmul
return cvxtypes.matmul_expr()(other, self)
File "/usr/local/lib/python3.7/dist-packages/cvxpy/atoms/affine/binary_operators.py", line 50, in init
super(BinaryOperator, self).init(lh_exp, rh_exp)
File "/usr/local/lib/python3.7/dist-packages/cvxpy/atoms/atom.py", line 51, in init
self._shape = self.shape_from_args()
File "/usr/local/lib/python3.7/dist-packages/cvxpy/atoms/affine/binary_operators.py", line 120, in shape_from_args
return u.shape.mul_shapes(self.args[0].shape, self.args[1].shape)
File "/usr/local/lib/python3.7/dist-packages/cvxpy/utilities/shape.py", line 142, in mul_shapes
lh_shape, rh_shape, shape = mul_shapes_promote(lh_shape, rh_shape)
File "/usr/local/lib/python3.7/dist-packages/cvxpy/utilities/shape.py", line 109, in mul_shapes_promote
lh_shape, rh_shape))
ValueError: Incompatible dimensions (3, 2) (3, 1)

我的解答思路和尝试过的方法

后面的输出还没修改,但前面报错,不知道该怎么解决

我想要达到的结果