Compute the predictions of a linear model: y^=Xw+b, where X is an n×d matrix, w a length-d weight vector and b a scalar bias.
Implement solve(X, w, b).
Returns. Return a NumPy array of n predictions.
Example 1
Input:
solve([[1.0, 2.0], [3.0, 4.0]], [1.0, 1.0], 0.0)
Output:
[3.0, 7.0]
Example 2
Input:
solve([[1.0], [2.0], [3.0]], [2.0], 1.0)
Output:
[3.0, 5.0, 7.0]
No results yet
Run your code to check it against the examples, or submit to run every test.