Dear instructors, I am struggling to submit my week 3 work as there is an value error in the plot_decision_boundary function. errors states that "x and y must have same first dimension, but have shapes (2,) and (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2)
". could you please help me in this. thank you in advance
Hello @sri_harsha_reddy1,
Please check if the w
and the b
passed into plot_decision_boundary
have the right shape. w
should be an array of length n
, whereas b
should be a scalar. If they do not have the right shape, please check the shapes of the returns from previous exercises.
In each exercise, it mentions about the expected shape and type of the returns, you can run your implemented function and print the returns out to visually inspect if the shapes and types match with the required. Here is an example (highlighted) of the shapes and types requirement for exercise 3:
Raymond