I am calling the grad function with the L_of_omega_array and then passing omega_array[i] to the function returned. first time through the loop gets n tuple index out of range (please see below).
Thanks
IndexError Traceback (most recent call last)
File /opt/conda/lib/python3.8/site-packages/jax/core.py:1427, in ShapedArray._len(self, ignored_tracer)
1426 try:
→ 1427 return self.shape[0]
1428 except IndexError as err:IndexError: tuple index out of range
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
Cell In [58], line 23
20 print(“end of loop”)
21 return dLdOmega_array
→ 23 dLdOmega_array = dLdOmega_of_omega_array(omega_array)