New answers tagged

6

PositionIndex[Sign[x - y]] @ -1 {2, 3, 6} Also PositionIndex[UnitStep[x - y]] @ 0 (* thanks: J.M. *) {2, 3, 6} PositionIndex[Negative[x - y]] @ True (* thanks: anderstood *) {2, 3, 6} PositionIndex[Thread[x < y]]@True {2, 3, 6} If you prefer to have {} (rather than Missing["KeyAbsent", _]) as output when no positions satisfy the ...


6

Flatten@Position[Negative[x - y], True] Also possible: Flatten@Position[x - y, _?(# < 0 &)] or, as suggested by J.M., Flatten[Position[x - y, _?Negative]]


6

Flatten @ Position[Less @@@ Transpose[{x, y}], True]


Top 50 recent answers are included