edmundsj/rcwa

Error grating_optimize

Opened this issue · 0 comments

I tried to run the code grading_optimize.py both on GoogleColab (numpy version 1.21.6) and on my own computer (numpy version 1.21.5) but I obtain this error message

TypeError Traceback (most recent call last)

in
27
28 my_grad = solve_system()
---> 29 print(my_grad(0.5))
30 #plt.plot(results['thickness'], results['RTot'])
31 plt.show()

8 frames

/usr/local/lib/python3.7/dist-packages/autograd/numpy/numpy_boxes.py in getitem(A, idx)
11
12 @primitive
---> 13 def getitem(A, idx): return A[idx]
14
15 # Constants w.r.t float data just pass though

TypeError: 'float' object is not subscriptable

Thank you for solving this issue !