计算岭回归权重时出错 - "only integer scalar arrays can be converted to a scalar index"(附图中的公式)公式:ridge regression weight

我试过的代码:

x = np.matmul(np.linalg.inv(np.sum(lambda_param, np.matmul(input_x.T,input_x ))),np.matmul(input_x.T,(output_y)))


return x