docs: def MPTfile(file_or_path):
      """Opens .mpt files as numpy record arrays
  
      Checks for the correct headings, skips any comments and returns a
      numpy record array object and a list of comments
      """
  
      if isinstance(file_or_path, str):
          mpt_file = open(file_or_path, 'rb')
      else:
          mpt_file = file_or_path
  
      magic = next(mpt_file)
      if magic != b'EC-Lab ASCII FILE\r\n':
          raise ValueError("Bad first line for EC-Lab file: '%s'" % magic)
  
      nb_headers_match = re.match(b'Nb header lines : (\d+)\s*$', next(mpt_file))
      nb_headers = int(nb_headers_match.group(1))
      if nb_headers < 3:
          raise ValueError("Too few header lines: %d" % nb_headers)
  
      ## The 'magic number' line, the 'Nb headers' line and the column headers
      ## make three lines. Every additional line is a comment line.
      comments = [next(mpt_file) for i in range(nb_headers - 3)]
  
      fieldnames = str3(next(mpt_file)).strip().split('\t')
      record_type = np.dtype(list(map(fieldname_to_dtype, fieldnames)))
  
      ## Must be able to parse files where commas are used for decimal points
      converter_dict = dict(((i, comma_converter)
                             for i in range(len(fieldnames))))
      mpt_array = np.loadtxt(mpt_file, dtype=record_type,
                             converters=converter_dict)
  
      return mpt_array, comments