65102dcc0cca9c1779955c12b523b07d1dc6d5ce,brian2/spatialneuron/spatialneuron.py,SpatialNeuron,spatialneuron_segment,#Any#Any#,471

Before Change


        start, stop, step = item.start, item.stop, item.step
        if step is None:
            step = 1
        if step != 1:
            raise IndexError("Subgroups have to be contiguous")

        if isinstance(start, Quantity):
            if not have_same_dimensions(start, meter) or not have_same_dimensions(stop, meter):
                raise DimensionMismatchError("Start and stop should have units of meter", start, stop)
            // Convert to integers (compartment numbers)

After Change


            indices = neuron.morphology.indices[item]
            start, stop = indices[0], indices[-1] + 1
        elif not isinstance(item, slice) and hasattr(item, "indices"):
            start, stop = to_start_stop(item.indices[:], neuron._N)
        else:
            start, stop = to_start_stop(item, neuron._N)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: brian-team/brian2
Commit Name: 65102dcc0cca9c1779955c12b523b07d1dc6d5ce
Time: 2019-02-13
Author: marcel.stimberg@inserm.fr
File Name: brian2/spatialneuron/spatialneuron.py
Class Name: SpatialNeuron
Method Name: spatialneuron_segment


Project Name: stellargraph/stellargraph
Commit Name: 96eb7f81b7d1b68ab80724e7c6ba743dd96a8ce1
Time: 2019-02-14
Author: habiba.habiba@data61.csiro.au
File Name: stellargraph/mapper/link_mappers.py
Class Name: LinkSequence
Method Name: __getitem__


Project Name: biotite-dev/biotite
Commit Name: 009b79630bcfd78d97b3aa8e910495f9cd8ede7a
Time: 2018-11-19
Author: patrick.kunzm@gmail.com
File Name: src/biotite/sequence/io/fastq/file.py
Class Name: FastqFile
Method Name: __getitem__