예제 #1
0
def test_CMF_cart2pol_zero():
    polar = CMflow.cart2pol(np.array([[0, 1]]))
    assert np.array_equal(np.round(polar[0], 8),
                          np.round(np.array([1, np.pi / 2]), 8))
예제 #2
0
def test_CMF_cart2pol():
    polar = CMflow.cart2pol(np.array([[1, 1]]))
    assert np.array_equal(np.round(polar[0], 8),
                          np.round(np.array([np.sqrt(2), np.pi / 4]), 8))