81d92544f48857e679b2670107bb8139b02d01d5,skbio/sequence/_sequence.py,BiologicalSequence,__getitem__,#BiologicalSequence#Any#,275

Before Change


        
        try:
            qual = self.quality[i] if self.has_quality() else None
            return self.copy(sequence=self.sequence[i], quality=qual)
        except IndexError:
            raise IndexError(
                "Position %d is out of range for %r." % (i, self))

After Change



        
        // TODO update this method when /ኘ is resolved
        if not (isinstance(i, Integral) or isinstance(i, slice) or
                isinstance(i, list)):
            raise TypeError("Unsupported type of item accessor. Only "
                            "integers, slices, and lists of integers are "
                            "currently supported.")

        try:
            qual = self.quality[i] if self.has_quality() else None

            try:
                seq = self.sequence[i]
            except TypeError:
                seq = [self.sequence[idx] for idx in i]
        except IndexError:
            raise IndexError(
                "Position %r is out of range for %r." % (i, self))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: biocore/scikit-bio
Commit Name: 81d92544f48857e679b2670107bb8139b02d01d5
Time: 2014-09-11
Author: jai.rideout@gmail.com
File Name: skbio/sequence/_sequence.py
Class Name: BiologicalSequence
Method Name: __getitem__


Project Name: PetrochukM/PyTorch-NLP
Commit Name: bb9335bbc981c0541e37a875d79d0ef419008574
Time: 2018-03-25
Author: petrochukm@gmail.com
File Name: torchnlp/text_encoders/subword_encoder.py
Class Name: SubwordEncoder
Method Name: __init__


Project Name: open-mmlab/mmdetection
Commit Name: dd2907ed70a9f29ecbe2fba75de735e96daae3a2
Time: 2018-11-26
Author: chenkaidev@gmail.com
File Name: mmdet/ops/nms/nms_wrapper.py
Class Name:
Method Name: soft_nms