cdaf2d14129c272fe1d0a1e9b43e92e03e5c1380,brian2/units/fundamentalunits.py,Quantity,__rsub__,#Quantity#Any#,1369
Before Change
def __rsub__(self, other):
// subtraction with swapped arguments
rsub = lambda a, b: operator.sub(b, a)
return self._binary_operation(other, rsub, fail_for_mismatch=True,
message="Subtraction (R)")
def __isub__(self, other):
return self._binary_operation(other, np.ndarray.__isub__,
fail_for_mismatch=True,
After Change
np.all(other == 0)):
return self.__neg__()
else:
return Quantity(other, copy=False, force_quantity=True).__sub__(self)
def __isub__(self, other):
return self._binary_operation(other, np.ndarray.__isub__,
fail_for_mismatch=True,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: brian-team/brian2
Commit Name: cdaf2d14129c272fe1d0a1e9b43e92e03e5c1380
Time: 2015-08-05
Author: marcel.stimberg@inserm.fr
File Name: brian2/units/fundamentalunits.py
Class Name: Quantity
Method Name: __rsub__
Project Name: brian-team/brian2
Commit Name: d01dab2c5adb57003826ce03bb71c65d70d71d42
Time: 2015-06-11
Author: marcel.stimberg@inserm.fr
File Name: brian2/monitors/spikemonitor.py
Class Name: SpikeMonitor
Method Name: __getitem__
Project Name: brian-team/brian2
Commit Name: fbabf9f5f90954bc9bffc79c822577d8d8fda143
Time: 2015-10-08
Author: marcel.stimberg@ens.fr
File Name: brian2/units/unitsafefunctions.py
Class Name:
Method Name: linspace