scipp.less_equal#
- scipp.less_equal(x, y)#
Element-wise ‘<=’ (less_equal).
Warning: If one or both of the operators have variances (uncertainties) they are ignored silently, i.e., comparison is based exclusively on the values.
- Parameters:
x (VariableLike) – Left input.
y (VariableLike) – Right input.
- Returns:
VariableLike – Booleans that are true where a <= b.
Examples
Compare an array with a scalar:
>>> import scipp as sc >>> x = sc.array(dims=['x'], values=[1.0, 2.0, 3.0], unit='m') >>> sc.less_equal(x, sc.scalar(2.0, unit='m')) <scipp.Variable> (x: 3) bool <no unit> [True, True, False]