8d74e077e63dac70a6932eb0496a4bb821253f5b,mr/wire_models.py,PowerFluid,_predict,#PowerFluid#Any#Any#,42

Before Change


       under a 90-degree step forcing. 
       Parameters: m, C=K/uB
    def _predict(self, theta, params):
        m, C, theta0, offset = map(np.real_if_close, params)
        return 1/(m-1)*C**m*(np.cos(theta + offset)**(1-m)* \
                             self.F(m, theta + offset) \
                             - np.cos(theta + offset)**(1-m)* \
                             self.F(m, theta0 + offset))

After Change


            "offset = {} > 0 will only lead to tears.").format(offset)
        assert offset > -np.pi/2, (
            "offset = {} < -pi/2 will only lead to tears.").format(offset)
        assert np.cos(theta0 + offset) > 0, "We require cos(theta0 + offset) > 0."
        assert C >= 0, (
            "C = {} < 0 is not physical.").format(C)
        assert m >= 0, (
            "m < 0 is not physical.").format(m)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: soft-matter/trackpy
Commit Name: 8d74e077e63dac70a6932eb0496a4bb821253f5b
Time: 2012-12-05
Author: daniel.b.allan@gmail.com
File Name: mr/wire_models.py
Class Name: PowerFluid
Method Name: _predict


Project Name: pgmpy/pgmpy
Commit Name: 88e39c57186f9ed2ff4b562ecd9ffe468bc46320
Time: 2016-02-19
Author: mail@chrisittner.de
File Name: pgmpy/independencies/Independencies.py
Class Name: IndependenceAssertion
Method Name: __eq__


Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 1273d579c5ce666aaf8ff20942ce83681bf5eb06
Time: 2019-03-13
Author: markus.konrad@wzb.eu
File Name: tests/test_preprocess.py
Class Name:
Method Name: test_tmpreproc_en_apply_custom_filter


Project Name: brilee/MuGo
Commit Name: 06b6715f5c12e9a667c176901a730a896495efc8
Time: 2016-10-10
Author: brian.kihoon.lee@gmail.com
File Name: tests/test_utils.py
Class Name: GoPositionTestCase
Method Name: assertEqualPositions