def distance(self, o):
        if is_sequence(o):
            o = Point3D(o)
        if isinstance(o, Point3D):
            seg_vector = self.p2 - self.p1
            pt_vector = o - self.p1
            t = seg_vector.dot(pt_vector)/self.length**2
            if t >= 1:
                distance = Point3D.distance(self.p2, o)
            elif t <= 0:
                distance = Point3D.distance(self.p1, o)
            else:
                distance = Point3D.distance(
                    self.p1 + Point3D(t*seg_vector.x, t*seg_vector.y,
                                      t*seg_vector.y), o)
            return distance
        raise NotImplementedError()
Full-duplex SPI read and write.  The specified array of bytes will be
dataset/ETHPy150Open sympy/sympy/sympy/geometry/line3d.py/Segment3D.distance--crossover with--dataset/ETHPy150Open adafruit/Adafruit_Python_GPIO/Adafruit_GPIO/SPI.py/SpiDev.transfer