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))
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))