示例#1
0
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
示例#2
0
def test_beta_dimensionless():
    # Check that beta is dimensionless
    float(beta(T, n, B))
示例#3
0
 def time_beta(self):
     beta(1 * u.eV, 1e20 * u.m**-3, 1 * u.T)