code: def clean_zeros(a, b, M):
      
      M2 = M[a > 0, :][:, b > 0].copy()  # copy force c style matrix (froemd)
      a2 = a[a > 0]
      b2 = b[b > 0]
      return a2, b2, M2
docs: Remove all components with zeros weights in a and b