def mu_e(X):
try:<EOL><INDENT>mu_e = old_div(<NUM_LIT>,(<NUM_LIT:1.>+X))<EOL><DEDENT>except TypeError:<EOL><INDENT>X=np.array([X])<EOL>mu_e = old_div(<NUM_LIT>,(<NUM_LIT:1.>+X))<EOL><DEDENT>return mu_e<EOL>
mean molecular weight per free electron, assuming full ionisation, and
approximating mu_i/Z_i ~ 2 for all elements heavier then Helium.

(Kippenhahn & Weigert, Ch 13.1, Eq. 13.8)

Parameters
----------
X : float
    Mass fraction of H.