9ae556a817f4b972d8c3b678db96e712f814470f,brian2/units/fundamentalunits.py,Quantity,__le__,#Quantity#Any#,1219
Before Change
return NotImplemented
def __le__(self, other):
is_scalar = is_scalar_type(other)
if not is_scalar or not np.isinf(other):
fail_for_dimension_mismatch(self, other, "LessThanOrEquals")
if isinstance(other, np.ndarray) or is_scalar:
return np.asarray(self) <= np.asarray(other)
else:
return NotImplemented
def __gt__(self, other):
is_scalar = is_scalar_type(other)
if not is_scalar or not np.isinf(other):
After Change
return self._comparison(other, "LessThan", operator.lt)
def __le__(self, other):
return self._comparison(other, "LessEquals", operator.le)
def __gt__(self, other):
return self._comparison(other, "GreaterThan", operator.gt)
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 20
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: __le__
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: __lt__
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: __eq__
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: __ne__
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: __ge__
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: __gt__