[Numpy-discussion] stop criterion for an alternating signal