docs: def pad_to_3d(a):
      """Return 1- or 2-dimensional cartesian vectors, converted into a
      3-dimensional representation, with additional dimensional coordinates
      assumed to be zero.
  
      Parameters
      ----------
      a: array, shape (n, d), d < 3
  
      Returns
      -------
      ap: array, shape (n, 3)
      """
      a_pad = np.zeros([len(a), 3], dtype=a.dtype)
      a_pad[:, :a.shape[-1]] = a
      return a_pad