9622eaf995e8432a8db9b9c43dfe845fb88acdd6,brian2/groups/group.py,Indexing,__call__,#Indexing#Any#Any#,171

Before Change


                    // For linked variables, the index might not have been there
                    // yet at the time of the creation of the indexing object
                    if var_index in self.index_variables:
                        start, stop, step = item.indices(self.index_variables[var_index].size)
                    else:
                        start, stop, step = item.indices(self.group.variables[var_index].size)
                return np.arange(start, stop, step)

After Change


                    // slices never lead to IndexErrors, instead they return an
                    // empty array if they don"t match anything
                    if isinstance(item, slice):
                        return np.array([], dtype=np.int32)
                    else:
                        raise ex
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: brian-team/brian2
Commit Name: 9622eaf995e8432a8db9b9c43dfe845fb88acdd6
Time: 2014-10-30
Author: marcel.stimberg@ens.fr
File Name: brian2/groups/group.py
Class Name: Indexing
Method Name: __call__


Project Name: biolab/orange3
Commit Name: 94423ec358b2c26a289602d1e5a291d1ee5a4f55
Time: 2012-10-17
Author: anze.staric@gmail.com
File Name: Orange/data/domain.py
Class Name: Domain
Method Name: __getitem__


Project Name: prody/ProDy
Commit Name: 486dbc58ed00b645f2d561ede5a06e89b8d1ca78
Time: 2018-03-15
Author: shz66@pitt.edu
File Name: prody/atomic/chain.py
Class Name: Chain
Method Name: __getitem__