docs: def check_convergence(newX, oldX, e_rel):
      """Check that the algorithm converges using Langville 2014 criteria
  
      Uses the check from Langville 2014, Section 5, to check if the NMF
      algorithm has converged.
      """
      # Calculate the norm for columns and rows, which can be used for debugging
      # Otherwise skip, since it takes extra processing time
      new_old = newX*oldX
      old2 = oldX**2
      norms = [np.sum(new_old), np.sum(old2)]
      convergent = norms[0] >= (1-e_rel**2)*norms[1]
      return convergent, norms