docs: def segments_to_numpy(segments):
      """given a list of 4-element tuples, transforms it into a numpy array"""
      segments = numpy.array(segments, dtype=SEGMENT_DATATYPE, ndmin=2)  # each segment in a row
      segments = segments if SEGMENTS_DIRECTION == 0 else numpy.transpose(segments)
      return segments