9ae556a817f4b972d8c3b678db96e712f814470f,brian2/units/fundamentalunits.py,Quantity,__idiv__,#Quantity#Any#,1070

Before Change


        return self.__rdiv__(other)

    def __idiv__(self, other):
        if isinstance(other, np.ndarray) or is_scalar_type(other):
            super(Quantity, self).__idiv__(other)
            self.dim = self.dim / get_dimensions(other)
            return self
        else:
            return NotImplemented

    def __itruediv__(self, other):
        if isinstance(other, np.ndarray) or is_scalar_type(other):
            super(Quantity, self).__itruediv__(other)
            self.dim = self.dim / get_dimensions(other)

After Change


        return self.__rdiv__(other)

    def __idiv__(self, other):
        return self._binary_operation(other, np.ndarray.__idiv__, operator.div, inplace=True)

    def __itruediv__(self, other):
        return self._binary_operation(other, np.ndarray.__itruediv__, operator.div, inplace=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 19

Instances


Project Name: brian-team/brian2
Commit Name: 9ae556a817f4b972d8c3b678db96e712f814470f
Time: 2012-11-29
Author: marcel.stimberg@ens.fr
File Name: brian2/units/fundamentalunits.py
Class Name: Quantity
Method Name: __idiv__


Project Name: brian-team/brian2
Commit Name: 9ae556a817f4b972d8c3b678db96e712f814470f
Time: 2012-11-29
Author: marcel.stimberg@ens.fr
File Name: brian2/units/fundamentalunits.py
Class Name: Quantity
Method Name: __itruediv__


Project Name: brian-team/brian2
Commit Name: 9ae556a817f4b972d8c3b678db96e712f814470f
Time: 2012-11-29
Author: marcel.stimberg@ens.fr
File Name: brian2/units/fundamentalunits.py
Class Name: Quantity
Method Name: __imul__


Project Name: brian-team/brian2
Commit Name: 9ae556a817f4b972d8c3b678db96e712f814470f
Time: 2012-11-29
Author: marcel.stimberg@ens.fr
File Name: brian2/units/fundamentalunits.py
Class Name: Quantity
Method Name: __idiv__