MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / str2number

Function str2number

SLiCAP/SLiCAPmath.py:548–558  ·  view source on GitHub ↗

Returns a number with its value represented by var. :param var: Variable that may represent a number. :type var: str, sympy object, int, float :return: number :rtype: float, int

(var)

Source from the content-addressed store, hash-verified

546 return var
547
548def str2number(var):
549 """
550 Returns a number with its value represented by var.
551
552 :param var: Variable that may represent a number.
553 :type var: str, sympy object, int, float
554
555 :return: number
556 :rtype: float, int
557 """
558 return eval(_replaceScaleFactors(str(var)))
559
560def _checkNumeric(exprList):
561 """

Callers

nothing calls this directly

Calls 1

_replaceScaleFactorsFunction · 0.90

Tested by

no test coverage detected