fixed problem with Nx2 numpy arrays in geometrical functions (#2783)