def test_beta_nan(): # Check that nans are passed through properly B = np.array([1, np.nan]) * u.T n = np.array([1, 1]) * u.cm**-3 T = np.array([1, 1]) * u.K out = beta(T, n, B) assert np.isnan(out[1]) assert out[1].unit == u.dimensionless_unscaled
def test_beta_dimensionless(): # Check that beta is dimensionless float(beta(T, n, B))
def time_beta(self): beta(1 * u.eV, 1e20 * u.m**-3, 1 * u.T)