My solution to exercise 4 takes ages to run, and upon submission I am getting grader time out error. One test is also failing due to (it seems) floating point precision issues.

Here is the function in question:

def dLdOmega_of_omega_array(omega_array, pA, pB):
N = len(omega_array)
dLdOmega_array = np.zeros(N)

for i in range(N):
### START CODE HERE ### (~ 2 lines of code)

{Do not post codes that will grade your assignment-Removed by moderator}
### END CODE HERE ###

First of I am sorry for delayed response and as @TMosh stated your def dLdOmega codes are actually correct and he mentioned issue lies with

def f_of_omega(omega, pA, pB):
your code is incorrect here. See the below image where it mentions to calculate f_of_omega there is simple addition operator required and nothing else. It is L_of_omega where array of f_of_omega is done but you have used numpy array to f_of_omega with zip code for a, b, this is not required. Hint: below image first sentence will give you, on how to do the correction