_assert(d == 1 and m == self.d, "points have dimension {}, "
                    "dataset has dimension {}".format(d, self.d))