You can also allow an array of shape (N, 2). Already works with this code.