'Returns if the given set of nodes is valid or not.'

def raw_valid_fn_vec(self, xyt):

    height = self.traversible.shape[0]
    width = self.traversible.shape[1]
    x = np.round(xyt[:, [0]]).astype(np.int32)
    y = np.round(xyt[:, [1]]).astype(np.int32)
    is_inside = np.all(np.concatenate(((x >= 0), (y >= 0), (x < width), (y < height)), axis=1), axis=1)
    x = np.minimum(np.maximum(x, 0), (width - 1))
    y = np.minimum(np.maximum(y, 0), (height - 1))
    ind = np.ravel_multi_index((y, x), self.traversible.shape)
    is_traversible = self.traversible.ravel()[ind]
    is_valid = np.all(np.concatenate((is_inside[:, np.newaxis], is_traversible), axis=1), axis=1)
    return is_valid
