code: def to_netflux(flux):
      r
      netflux = flux - np.transpose(flux)
      """Set negative fluxes to zero"""
      ind = (netflux < 0.0)
      netflux[ind] = 0.0
      return netflux
docs: r"""Compute the netflux from the gross flux.
  
          f_ij^{+}=max{0, f_ij-f_ji}
          for all pairs i,j
  
      Parameters
      ----------
      flux : (M, M) ndarray
          Matrix of flux values between pairs of states.
  
      Returns
      -------
      netflux : (M, M) ndarray
          Matrix of netflux values between pairs of states.