def get_closest_points(self, mesh):
        """
        Find closest point of this mesh for each point in the other mesh

        :returns:
            :class:`Mesh` object of the same shape as `mesh` with closest
            points from this one at respective indices.
        """
        min_idx = cdist(self.xyz, mesh.xyz).argmin(axis=0)  # lose shape
        if hasattr(mesh, 'shape'):
            min_idx = min_idx.reshape(mesh.shape)
        lons = self.lons.take(min_idx)
        lats = self.lats.take(min_idx)
        deps = self.depths.take(min_idx)
        return Mesh(lons, lats, deps)
def get_closest_points ( self , mesh ) : min_idx = cdist ( self . xyz , mesh . xyz ) . argmin ( axis = 0 ) if hasattr ( mesh , 'shape' ) : min_idx = min_idx . reshape ( mesh . shape ) lons = self . lons . take ( min_idx ) lats = self . lats . take ( min_idx ) deps = self . depths . take ( min_idx ) return Mesh ( lons , lats , deps )
Find closest point of this mesh for each point in the other mesh

        :returns:
            :class:`Mesh` object of the same shape as `mesh` with closest
            points from this one at respective indices.