ae51454c8dd6a76768d6a87589a80f75b1bfda49,brian2/equations/equations.py,Equations,check_units,#Equations#Any#Any#Any#,678

Before Change


        // Create a mapping with all identifier names to either their actual
        // value (for external identifiers) or their unit (for specifiers)
        unit_namespace = {}
        for name in self.identifiers | self.names:
            if name in specifiers:
                unit_namespace[name] = specifiers[name].unit
            else:
                // This raises an error if the identifier cannot be resolved
                unit_namespace[name] = namespace.resolve(name,
                                                         additional_namespace)

        for var, eq in self._equations.iteritems():
            if eq.eq_type == PARAMETER:
                // no need to check units for parameters
                continue

After Change


        """
        external = frozenset().union(*[expr.identifiers
                                     for _, expr in self.eq_expressions])
        external -= set(specifiers.keys()) 

        resolved_namespace = namespace.resolve_all(external,
                                                   additional_namespace,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: brian-team/brian2
Commit Name: ae51454c8dd6a76768d6a87589a80f75b1bfda49
Time: 2013-05-03
Author: marcel.stimberg@ens.fr
File Name: brian2/equations/equations.py
Class Name: Equations
Method Name: check_units


Project Name: brian-team/brian2
Commit Name: ae51454c8dd6a76768d6a87589a80f75b1bfda49
Time: 2013-05-03
Author: marcel.stimberg@ens.fr
File Name: brian2/equations/equations.py
Class Name: Equations
Method Name: check_units


Project Name: Qiskit/qiskit-aqua
Commit Name: cfa2566a4e464b2ad1c22cf179dd8e0045d1dbb0
Time: 2018-10-01
Author: manoel@us.ibm.com
File Name: qiskit_aqua/quantumalgorithm.py
Class Name: QuantumAlgorithm
Method Name: register_and_get_operational_backends


Project Name: ray-project/ray
Commit Name: f2408b719c991b98ba5dc77db81dc184805b33df
Time: 2020-09-17
Author: weepingwillowben@gmail.com
File Name: rllib/env/pettingzoo_env.py
Class Name: PettingZooEnv
Method Name: step