---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-9-a773b3b66008> in <module>
----> 1 rat_flat = calculate_rat_rcwa(flat_struct, size=((400, 0), (0, 400)), orders=10, wavelength=wl,
2 substrate=GaAs)
3 rat_np = calculate_rat_rcwa(np_struct, size=((400, 0), (0, 400)), orders=10, wavelength=wl,
4 substrate=GaAs)
/usr/local/lib/python3.8/site-packages/solcore-5.6.0-py3.8-macosx-10.15-x86_64.egg/solcore/absorption_calculator/rigorous_coupled_wave.py in calculate_rat_rcwa(structure, size, orders, wavelength, theta, phi, pol, substrate)
55 for i, wl in enumerate(wavelength): # set the material values and indices in here
56 S.SetFrequency(1 / wl)
---> 57 update_epsilon(S, stack_OS, shape_mats_OS, wl)
58 S.SetExcitationPlanewave((theta, phi), 0, 1, 0) # p-polarization
59 out_p = rcwa_rat(S, len(stack_OS.get_widths()))
/usr/local/lib/python3.8/site-packages/solcore-5.6.0-py3.8-macosx-10.15-x86_64.egg/solcore/absorption_calculator/rigorous_coupled_wave.py in update_epsilon(S, stack_OS, shape_mats_OS, wl)
144 def update_epsilon(S, stack_OS, shape_mats_OS, wl):
145 for i1 in range(len(stack_OS.get_widths())):
--> 146 S.SetMaterial('layer_' + str(i1 + 1), stack_OS.get_indices(wl)[i1] ** 2)
147 for i1 in range(len(shape_mats_OS.widths)): # initialise the materials needed for all the shapes in S4
148 S.SetMaterial('shape_mat_' + str(i1 + 1), shape_mats_OS.get_indices(wl)[i1 + 1] ** 2)
/usr/local/lib/python3.8/site-packages/solcore-5.6.0-py3.8-macosx-10.15-x86_64.egg/solcore/absorption_calculator/transfer_matrix.py in get_indices(self, wl)
145
146 for i in range(self.num_layers):
--> 147 out.append(self.n_data[i](wl_m) + self.k_data[i](wl_m) * 1.0j)
148
149 # substrate irrelevant if no_back_reflection = True
/usr/local/lib/python3.8/site-packages/solcore-5.6.0-py3.8-macosx-10.15-x86_64.egg/solcore/absorption_calculator/transfer_matrix.py in wrapper(array)
32 @wraps(function)
33 def wrapper(array):
---> 34 return cached_wrapper(tuple(array))
35
36 # copy lru_cache attributes over too
TypeError: 'numpy.float64' object is not iterable