All tests passed but assignment filed at ex 4

My code passes all tests but grade is 75% as ex 4 is not graded because of ,unexpected error - * ### Learner Error: Grader timed out

Please try optimizing the efficiency of your solution and submit again. You can also visit the discussion forum to see if your peers have experienced and found resolutions for similar errors, or if course staff have provided prior guidance for these errors… If the error isn’t resolved in 24 hours, please reach out to Coursera through our Help Center.‘’

anyone knows what to do?

Regards :slight_smile:

One possible reason for encountering this error could be the use of an infinite loop in your code.

Did you use any infinite loops in your code?

I don’t think so, my code for ex 4 looks like this # This is organised as a function only for grading purposes.
def dLdOmega_of_omega_array(omega_array):
N = len(omega_array)
dLdOmega_array = np.zeros(N)

for i in range(N):
    ### START CODE HERE ### (~ 2 lines of code)
    dLdOmega = grad(L_of_omega)(omega_array[i])
    dLdOmega_array = dLdOmega_array.at[i].set(dLdOmega)
    ### END CODE HERE ###
    
return dLdOmega_array

dLdOmega_array = dLdOmega_of_omega_array(omega_array)

Please don’t post your solution code here, as this violates the code of conduct.

Instead, you can send me a screenshot of the code in my DM.

I believe the failure of one test case was due to a numerical rounding error, as you were explicitly changing the data type format of the variable f in f_of_omega.

You were supposed to implement the function f_of_omega in one line of code.