``xy.reshape()`` doesn't change ``xy`` indeed, it's not an inplace op. Should be equivalent, I tested the ``np.any`` line I gave.