MCPcopy Create free account
hub / github.com/NanoComp/meep / data_to_str

Function data_to_str

python/simulation.py:5542–5547  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

5540
5541
5542def data_to_str(d):
5543 if type(d) is complex:
5544 sign = "+" if d.imag >= 0 else ""
5545 return f"{d.real}{sign}{d.imag}i"
5546 else:
5547 return str(d)
5548
5549
5550def display_run_data(sim, data_name, data):

Callers 1

display_run_dataFunction · 0.85

Calls 1

typeFunction · 0.85

Tested by

no test coverage detected