Hi.
I am new so not sure if I am posting this correctly. As i side note I am finding it very difficult to navigate the discussion forums.
In the WK 2 programming asssignment. I get this error when I try to check my code for estimating total cost. Its says “unfunc bitwise_xor not supported”. I have copied the total error here below.
I think the code is right but it doesn’t seem to work.? Any ideas are appreciated
Thansk
ypeError Traceback (most recent call last)
in
3 initial_b = 1
4
----> 5 cost = compute_cost(x_train, y_train, initial_w, initial_b)
6 print(type(cost))
7 print(f’Cost at initial w: {cost:.3f}')
in compute_cost(x, y, w, b)
28 for i in range(m):
29 y_pred=initial_wx[i]+initial_b
—> 30 cost_est= (y_pred-y[i])^2
31 cost_sum=cost_est+cost_sum
32 total_cost=cost_sum/(2m)
TypeError: ufunc ‘bitwise_xor’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’
/notebooks/C1_W2_Linear_Regression.ipynb