MCPcopy Index your code
hub / github.com/python/cpython / __truediv__

Method __truediv__

Lib/statistics.py:1407–1413  ·  view source on GitHub ↗

Divide both mu and sigma by a constant. Used for rescaling, perhaps to change measurement units. Sigma is scaled with the absolute value of the constant.

(x1, x2)

Source from the content-addressed store, hash-verified

1405 return NormalDist(x1._mu * x2, x1._sigma * fabs(x2))
1406
1407 def __truediv__(x1, x2):
1408 """Divide both mu and sigma by a constant.
1409
1410 Used for rescaling, perhaps to change measurement units.
1411 Sigma is scaled with the absolute value of the constant.
1412 """
1413 return NormalDist(x1._mu / x2, x1._sigma / fabs(x2))
1414
1415 def __pos__(x1):
1416 "Return a copy of the instance."

Callers

nothing calls this directly

Calls 1

NormalDistClass · 0.85

Tested by

no test coverage detected