070003f70129fd8dd88364df6d2ae64c1d2a35f8,spynnaker/pyNN/models/neural_projections/connectors/fixed_number_post_connector.py,FixedNumberPostConnector,_get_post_neurons,#FixedNumberPostConnector#,28

Before Change


        if self._post_neurons is None:
            n = 0
            while (n < self._post_n):
                permutation = numpy.arange(self._n_post_neurons)
                for i in range(0, self._n_post_neurons - 1):
                    j = int(self._rng.next(
                        n=1, distribution="uniform",
                        parameters=[0, self._n_post_neurons]))
                    (permutation[i], permutation[j]) = (
                        permutation[j], permutation[i])
                n += self._n_post_neurons
                if self._post_neurons is None:
                    self._post_neurons = permutation
                else:
                    self._post_neurons = numpy.append(
                        self._post_neurons, permutation)
            self._post_neurons = self._post_neurons[:self._post_n]

After Change


        // Loop over all the pre neurons
        for m in range(0, self._n_pre_neurons):
            if self._post_neurons[m] is None:
                self._post_neurons[m] = numpy.random.choice(
                    self._n_post_neurons, self._n_post, False)
                self._post_neurons[m].sort()

                // This looks nice but it doesn"t work with PyNN 0.9 ?
//                 n = 0
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: 070003f70129fd8dd88364df6d2ae64c1d2a35f8
Time: 2017-11-24
Author: andrew.gait@manchester.ac.uk
File Name: spynnaker/pyNN/models/neural_projections/connectors/fixed_number_post_connector.py
Class Name: FixedNumberPostConnector
Method Name: _get_post_neurons


Project Name: brainiak/brainiak
Commit Name: 74dae883a6f0bb31f55b8c1bd426a832b429ff4a
Time: 2017-11-09
Author: cellis@princeton.edu
File Name: brainiak/utils/fmrisim.py
Class Name:
Method Name: calc_noise


Project Name: yangyanli/PointCNN
Commit Name: 161b24af716a1e7a3221fce2903544ac1429387d
Time: 2018-06-08
Author: yangyan.lee@gmail.com
File Name: pointfly.py
Class Name:
Method Name: get_indices