MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _stepFunctions

Function _stepFunctions

SLiCAP/SLiCAPexecute.py:1216–1230  ·  view source on GitHub ↗

Substitutes values for step parameters in *function* and returns a list of functions with these substitutions.

(stepDict, function)

Source from the content-addressed store, hash-verified

1214 return instr
1215
1216def _stepFunctions(stepDict, function):
1217 """
1218 Substitutes values for step parameters in *function* and returns a list
1219 of functions with these substitutions.
1220 """
1221 stepVars = list(stepDict.keys())
1222 numSteps = len(stepDict[stepVars[0]])
1223 functions = []
1224 for i in range(numSteps):
1225 newFunction = function
1226 for j in range(len(stepVars)):
1227 newFunction = newFunction.xreplace({stepVars[j]: stepDict[stepVars[j]][i]})
1228 newFunction = sp.sympify(str(sp.N(newFunction)), rational=True)
1229 functions.append(newFunction)
1230 return functions
1231
1232# Functions for converting the MNA matrix and the vecors with independent and
1233# dependent variables into equivalent common-mode and differential-mode variables.

Callers 8

_doNumerFunction · 0.85
_doDenomFunction · 0.85
_doLaplaceFunction · 0.85
_doNoiseFunction · 0.85
_doDCvarFunction · 0.85
_doDCFunction · 0.85
_doSolveFunction · 0.85
_doDCsolveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected