Let's consider the following array:
x = np.array(["john", "john", "ellis", "lambert", "john"])
Is there a way to compare every element of the array to the previous and return a boolean array.
In the present example, the result would be [True,False,False,False].
Is there any function (similar as np.diff) to achieve that?
x[1:] == x[:-1]?listfor this...