cd384495f71d0ae1c137bcac499ebf83e694bfa8,brian2/core/clocks.py,Clock,__init__,#Clock#Any#Any#,39

Before Change


        self._dt = float(dt)
        self._new_dt = None
        Nameable.__init__(self, name=name)
        logger.debug("Created clock {self.name} with dt={self._dt}".format(self=self))

    @check_units(t=second)
    def _set_t_update_dt(self, t=0*second):

After Change


                                 scalar=True)
        self.variables.add_constant("N", unit=Unit(1), value=1)
        self.codeobj_class = None
        CodeRunner.__init__(self, group=self, template="stateupdate",
                            code="""timestep += 1
                                    t = timestep * dt""",
                            user_code="",
                            clock=self, when="after_end",
                            name=None)  // Name as already been set
        self._enable_group_attributes()
        logger.debug("Created clock {name} with dt={dt}".format(name=self.name,
                                                                dt=self.dt))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: brian-team/brian2
Commit Name: cd384495f71d0ae1c137bcac499ebf83e694bfa8
Time: 2015-08-27
Author: marcel.stimberg@inserm.fr
File Name: brian2/core/clocks.py
Class Name: Clock
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: 16246c8a9d84c875208a5e370da87888e799dd96
Time: 2017-11-08
Author: stuhood@twitter.com
File Name: src/python/pants/pantsd/watchman.py
Class Name: Watchman
Method Name: __init__


Project Name: Microsoft/nni
Commit Name: 0b9d6ce6d1cf6515c5b553a61f78cd333bf4700f
Time: 2020-06-29
Author: 27178119+squirrelsc@users.noreply.github.com
File Name: tools/nni_trial_tool/log_utils.py
Class Name: RemoteLogger
Method Name: __init__