Error in grading. I’m facing a problem with grading for C2_W1_Assignment despite all tests passing, and I have run it before submitting

You apparently have an old version of the notebook. Did you copy it from GitHub or the like?

Here is what the template code for the f_of_omega function looks like in the current version of a clean copy of the notebook:

def f_of_omega(omega, pA, pB):
    ### START CODE HERE ### (~ 1 line of code)
    f = None
    ### END CODE HERE ###
    return f

def L_of_omega(omega, pA, pB):
    return 1/len(f_of_omega(omega, pA, pB)) * np.sum((f_of_omega(omega, pA, pB) - np.mean(f_of_omega(omega, pA, pB)))**2)

In your version each of those functions takes only one argument. Please get a new version of the notebook by following this procedure and work the assignment again. You might be able to salvage some of your work, but maybe not if the changes in the notebook are that radical. Please carefully examine the new version.

1 Like