ccc913a65e08bc5523eb2490d3177c472b55d094,gpytorch/lazy/sum_batch_lazy_variable.py,SumBatchLazyVariable,__getitem__,#SumBatchLazyVariable#Any#,127

Before Change



    def __getitem__(self, index):
        if self.sum_batch_size is None:
            return super(SumBatchLazyVariable, self).__getitem__(index)

        // Cases for when there"s an inner batch
        else:
            batch_index = index if isinstance(index, int) else index[0]

After Change


            if isinstance(res, LazyVariable):
                return SumBatchLazyVariable(res, sum_batch_size=None)
            else:
                return res.sum(0)

        // Cases for when there"s an inner batch
        else:
            batch_index = index if isinstance(index, int) else index[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: ccc913a65e08bc5523eb2490d3177c472b55d094
Time: 2018-02-01
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/sum_batch_lazy_variable.py
Class Name: SumBatchLazyVariable
Method Name: __getitem__


Project Name: biolab/orange3
Commit Name: cf6b2d3e4c7bbf4aa68b1fc1ba3cfaf1663d48be
Time: 2014-09-12
Author: marko.toplak@gmail.com
File Name: Orange/statistics/contingency.py
Class Name: Continuous
Method Name: __getitem__


Project Name: nltk/nltk
Commit Name: 50777a53f05065b735a824e72ad553f4ffc7a235
Time: 2018-08-16
Author: ilia.kurenkov@gmail.com
File Name: nltk/lm/counter.py
Class Name: NgramCounter
Method Name: __getitem__