docs: def parse_sitesym(symlist, sep=','):
      """Parses a sequence of site symmetries in the form used by
      International Tables and returns corresponding rotation and
      translation arrays.
  
      Example:
  
      >>> symlist = [
      ...     'x,y,z',
      ...     '-y+1/2,x+1/2,z',
      ...     '-y,-x,-z',
      ... ]
      >>> rot, trans = parse_sitesym(symlist)
      >>> rot
      array([[[ 1,  0,  0],
              [ 0,  1,  0],
              [ 0,  0,  1]],
      <BLANKLINE>
             [[ 0, -1,  0],
              [ 1,  0,  0],
              [ 0,  0,  1]],
      <BLANKLINE>
             [[ 0, -1,  0],
              [-1,  0,  0],
              [ 0,  0, -1]]])
      >>> trans
      array([[ 0. ,  0. ,  0. ],
             [ 0.5,  0.5,  0. ],
             [ 0. ,  0. ,  0. ]])
      """
      nsym = len(symlist)
      rot = np.zeros((nsym, 3, 3), dtype='int')
      trans = np.zeros((nsym, 3))
      for i, sym in enumerate(symlist):
          for j, s in enumerate (sym.split(sep)):
              s = s.lower().strip()
              while s:
                  sign = 1
                  if s[0] in '+-':
                      if s[0] == '-':
                          sign = -1
                      s = s[1:]
                  if s[0] in 'xyz':
                      k = ord(s[0]) - ord('x')
                      rot[i, j, k] = sign
                      s = s[1:]
                  elif s[0].isdigit() or s[0] == '.':
                      n = 0
                      while n < len(s) and (s[n].isdigit() or s[n] in '/.'):
                          n += 1
                      t = s[:n]
                      s = s[n:]
                      if '/' in t:
                          q, r = t.split('/')
                          trans[i,j] = float(q)/float(r)
                      else:
                          trans[i,j] = float(t)
                  else:
                      raise SpacegroupValueError(
                          'Error parsing %r. Invalid site symmetry: %s' % 
                          (s, sym))
      return rot, trans