3245eece6e5951f3216d030f7fe3200c4caf3a6f,brian2/groups/neurongroup.py,NeuronGroup,_create_variables,#NeuronGroup#Any#,368

Before Change


        Create the variables dictionary for this `NeuronGroup`, containing
        entries for the equation variables and some standard entries.
        """
        device = get_device()
        // Get the standard variables for all groups
        s = Group._create_variables(self)

        if dtype is None:
            dtype = defaultdict(lambda: brian_prefs["core.default_scalar_dtype"])
        elif isinstance(dtype, np.dtype):
            dtype = defaultdict(lambda: dtype)
        elif not hasattr(dtype, "__getitem__"):
            raise TypeError(("Cannot use type %s as dtype "
                             "specification") % type(dtype))

        // Standard variables always present
        s["_spikespace"] = device.array(owner=self, size=self._N+1,
                                        unit=Unit(1), dtype=np.int32,
                                        constant=False)
        // Add the special variable "i" which can be used to refer to the neuron index
        s["i"] = device.arange(self, self._N, constant=True,
                               read_only=True)
        for eq in self.equations.itervalues():

After Change


                             "specification") % type(dtype))

        // Standard variables always present
        self.variables.add_array("_spikespace", unit=Unit(1), size=self._N+1,
                                 dtype=np.int32, constant=False)
        // Add the special variable "i" which can be used to refer to the neuron index
        self.variables.add_arange("i", size=self._N, constant=True,
                                  read_only=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: brian-team/brian2
Commit Name: 3245eece6e5951f3216d030f7fe3200c4caf3a6f
Time: 2014-01-15
Author: marcel.stimberg@ens.fr
File Name: brian2/groups/neurongroup.py
Class Name: NeuronGroup
Method Name: _create_variables


Project Name: brian-team/brian2
Commit Name: 3245eece6e5951f3216d030f7fe3200c4caf3a6f
Time: 2014-01-15
Author: marcel.stimberg@ens.fr
File Name: brian2/groups/poissongroup.py
Class Name: PoissonGroup
Method Name: __init__


Project Name: brian-team/brian2
Commit Name: 3245eece6e5951f3216d030f7fe3200c4caf3a6f
Time: 2014-01-15
Author: marcel.stimberg@ens.fr
File Name: brian2/monitors/spikemonitor.py
Class Name: SpikeMonitor
Method Name: __init__