e8aff8a890da8670ea8af8783caf3984c4dde558,dipy/align/tests/test_transforms.py,,test_number_of_parameters,#,14

Before Change


    expected_2d = [2, 1, 3, 1, 6]
    expected_3d = [3, 3, 6, 1, 12]

    actual_2d = []
    actual_3d = []
    for transform in transforms:
        t = transform_type[transform]
        actual_2d.append(number_of_parameters(t, 2))
        actual_3d.append(number_of_parameters(t, 3))

    assert_array_equal(actual_2d, expected_2d)
    assert_array_equal(actual_3d, expected_3d)

After Change


                       ("AFFINE", 2) : 6,
                       ("AFFINE", 3) : 12}

    for ttype, transform in regtransforms.iteritems():
        assert_equal(transform.get_number_of_parameters(), expected_params[ttype])


def test_param_to_matrix_2d():
    // Test translation matrix 2D
    transform = regtransforms[("TRANSLATION", 2)]
    dx, dy = np.random.rand(), np.random.rand()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


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


Project Name: inspirehep/magpie
Commit Name: e4488b9b68416439a226b48b74c22ae84c129db1
Time: 2016-02-10
Author: jan.stypka@cern.ch
File Name: magpie/api.py
Class Name:
Method Name: batch_test


Project Name: YerevaNN/mimic3-benchmarks
Commit Name: 3007e9a06ceeea9d3e1cc1b02adf67ab28d8adda
Time: 2018-01-17
Author: harhro@gmail.com
File Name: mimic3models/in_hospital_mortality/utils.py
Class Name:
Method Name: read_chunk