Skip to content

numpy.float64 object cannot be interpreted as an index #8

Description

@FilipDominec

Simulations in the example_metamaterial_s_parameters/SphereWire_principles terminate with error

Traceback (most recent call last):
  File "../../scatter.py", line 113, in <module>
    eps1=getattr(model, 'mon1eps', 1), eps2=getattr(model, 'mon2eps', 1))               ## enable monitors inside dielectrics
  File "/home/dominecf/python-meep-utils/meep_utils.py", line 902, in get_s_parameters
    Ex1, Hy1, Ex2, Hy2  =  map(lambda x: np.append(x, np.zeros(target_len - len(Ex1))), (Ex1, Hy1, Ex2, Hy2))
  File "/home/dominecf/python-meep-utils/meep_utils.py", line 902, in <lambda>
    Ex1, Hy1, Ex2, Hy2  =  map(lambda x: np.append(x, np.zeros(target_len - len(Ex1))), (Ex1, Hy1, Ex2, Hy2))
TypeError: 'numpy.float64' object cannot be interpreted as an index

However, the FDTD computation finishes correctly, as seen from the plotted E-field curve.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions