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

Function when_true

python/simulation.py:5480–5485  ·  view source on GitHub ↗

Given zero or more step functions and a condition function `condition` (a function of no arguments), evaluate the step functions whenever `condition` returns `True`.

(cond, *step_funcs)

Source from the content-addressed store, hash-verified

5478
5479
5480def when_true(cond, *step_funcs):
5481 """
5482 Given zero or more step functions and a condition function `condition` (a function of
5483 no arguments), evaluate the step functions whenever `condition` returns `True`.
5484 """
5485 return _when_true_funcs(cond, *step_funcs)
5486
5487
5488def when_false(cond, *step_funcs):

Callers

nothing calls this directly

Calls 1

_when_true_funcsFunction · 0.85

Tested by

no test coverage detected