def test_sqrt_2():
    a = np.array([4, 9])
    assert_almost_equal(nw.sqrt(a), np.array([2, 3]))
Exemple #2
0
def test_sqrt_2():
    a = np.array([4, 9])
    assert_almost_equal(nw.sqrt(a), np.array([2, 3]))
def test_sqrt_1():
    a = np.array([4, 9]) * PhysicalQuantity(1, "m^2")
    assert_almost_equal(nw.sqrt(a).value, np.array([2, 3]))
    assert nw.sqrt(a).unit == PhysicalQuantity(1, "m").unit
Exemple #4
0
def test_sqrt_1():
    a = np.array([4, 9]) * PhysicalQuantity(1, 'm^2')
    assert_almost_equal(nw.sqrt(a).value, np.array([2, 3]))
    assert nw.sqrt(a).unit == PhysicalQuantity(1, 'm').unit