a8330ea0ff7bef4414d4d8d17ced6fbd89526ebd,dipy/align/tests/test_transforms.py,,test_param_to_matrix_2d,#,29

Before Change


    factor = np.random.rand()
    theta = np.array([factor])
    expected = np.array([[factor, 0, 0], [0, factor, 0], [0, 0, 1]])
    actual = np.empty_like(expected)
    param_to_matrix(ttype, dim, theta, actual)
    assert_array_almost_equal(actual, expected)

    // Test affine 2D

After Change



        // Set incorrect number of parameters
        theta = np.zeros(n + 1, dtype=np.float64)
        assert_raises(ValueError, param_to_matrix, t, dim, theta)

def test_param_to_matrix_3d():
    // Test translation matrix 3D
    dim = 3
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: nipy/dipy
Commit Name: a8330ea0ff7bef4414d4d8d17ced6fbd89526ebd
Time: 2015-02-23
Author: jomaroceguedag@gmail.com
File Name: dipy/align/tests/test_transforms.py
Class Name:
Method Name: test_param_to_matrix_2d


Project Name: nipy/dipy
Commit Name: a8330ea0ff7bef4414d4d8d17ced6fbd89526ebd
Time: 2015-02-23
Author: jomaroceguedag@gmail.com
File Name: dipy/align/tests/test_transforms.py
Class Name:
Method Name: test_param_to_matrix_3d


Project Name: nipy/dipy
Commit Name: a8330ea0ff7bef4414d4d8d17ced6fbd89526ebd
Time: 2015-02-23
Author: jomaroceguedag@gmail.com
File Name: dipy/align/tests/test_transforms.py
Class Name:
Method Name: test_get_identity_parameters