code: def segment_midpoints(self, segments=None):
          
  
          if type(segments) == type(None):
              segments = self.identify_segments()
          points = self.points
  
          mids = (points[segments[:,0]] + points[segments[:,1]]) * 0.5
          mid_xpt, mid_ypt = mids[:,0], mids[:,1]
  
          return mid_xpt, mid_ypt
docs: Identify the midpoints of every line segment in the triangulation.
          If an array of segments of shape (no_of_segments,2) is given,
          then the midpoints of only those segments is returned.
  
          Notes
          -----
           Segments in the array must not be duplicates or the re-triangulation
           will fail. Take care not to miss that (n1,n2) is equivalent to (n2,n1).