I’m facing the following TypeError. Please, someone help me out. I have been trying to fix this issue for quite some time now. Although I don’t have that level of expertise in Machine Learning as of now.
It will be really helpful for me.
Course name: Calculus for ML and Data Science
Week 1
Exercise 4 ERROR:
Note: Please remove your code in your posts because it is against the honor code.
The function dLdOmega_of_omega_array should only accept the omega_array input. Thus, kindly remove all the prices_A and prices_B that you added in that cell. In general, you should only edit/replace the lines of code inside the “START CODE HERE” and “END CODE HERE”
Some errors arise because you used jax in Exercise 1. Do not use jax in Exercise 1. Instead, your first 2 lines of prices_A and prices_B should work.
prices_A = …
prices_B = …
In the notebook, you combined those procedures (obtaining data from df and setting to numpy array with float32 dtype) in just 2 lines. Thus, you can either separate those procedures into 4 lines, or keep your original 2 lines then delete the 3rd and 4th lines of code.
It’s still showing that two test cases have failed. But I just went through the code once again and found out that exercise 2 is producing an error while passing arguments to the test function.
Would you please be able to check that once?
Hmm… Your solution notebook looks correct and I can’t seem to recreate the error in Exercise 2 even if I copy your solutions. Can you try restarting your notebook then rerun?