which

which(x)

Return 0-based indices where x is True, like R’s which() but Python-indexed.