Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FilipDominec opened this issue Oct 9, 2017 · 0 comments
Open

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

FilipDominec opened this issue Oct 9, 2017 · 0 comments
Assignees
Labels

Comments

@FilipDominec
Copy link
Owner

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.

@FilipDominec FilipDominec self-assigned this Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant