def test_coil_trans():
 rng = np.random.RandomState(0)
 x = rng.randn(4, 4)
 x[3] = [0, 0, 0, 1]
 assert_allclose(_loc_to_coil_trans(_coil_trans_to_loc(x)), x)
 x = rng.randn(12)
 assert_allclose(_coil_trans_to_loc(_loc_to_coil_trans(x)), x)

def test_coil_trans ( ) : rng = np . random . RandomState ( 0 ) x = rng . randn ( 4 , 4 ) x [ 3 ] = [ 0 , 0 , 0 , 1 ] assert_allclose ( _loc_to_coil_trans ( _coil_trans_to_loc ( x ) ) , x ) x = rng . randn ( 12 ) assert_allclose ( _coil_trans_to_loc ( _loc_to_coil_trans ( x ) ) , x )
test loc<->coil_trans functions .