5b0238d247d238b768a5729dd7a5fda931bf2fb1,dipy/io/tests/test_io_gradients.py,,test_read_bvals_bvecs,#,13

Before Change


        // These bvecs are saved as one long array:
        new_bvecs2 = np.ravel(bvecs)
        with open("test_bv_file2.npy", "w") as bv_file2:
            print("FILENAME:", bv_file2.name)
            np.save(bv_file2.name, new_bvecs2)
        npt.assert_raises(IOError, read_bvals_bvecs, fbvals, "test_bv_file2.npy")

        // There are less bvecs than bvals:

After Change


        with open(bv_two_volume, "w") as f:
            f.write("0 0 0\n0 0 0\n")
        bval_two_volume = "bval_two_volume.txt"
        with open(bval_two_volume, "w") as f:
            f.write("0\n0\n")
        bval_5, bvecs_5 = read_bvals_bvecs(bval_two_volume,
                                           bv_two_volume)
        npt.assert_array_equal(bvecs_5, np.zeros((2, 3)))
        npt.assert_array_equal(bval_5, np.zeros(2))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: nipy/dipy
Commit Name: 5b0238d247d238b768a5729dd7a5fda931bf2fb1
Time: 2020-10-17
Author: skab12@gmail.com
File Name: dipy/io/tests/test_io_gradients.py
Class Name:
Method Name: test_read_bvals_bvecs


Project Name: nipy/dipy
Commit Name: 3bdea0bba207ecd7e1d841eaaeefd77a3359c7cf
Time: 2019-09-05
Author: garyfallidis@gmail.com
File Name: dipy/viz/tests/test_apps.py
Class Name:
Method Name: test_horizon


Project Name: hachmannlab/chemml
Commit Name: 80d32c6793323bb1a1c0bb55faef8f9b5d30f62a
Time: 2018-10-02
Author: mojtabah@buffalo.edu
File Name: chemml/chem/magpie_python/vassal/geometry/Line.py
Class Name: Line
Method Name: distance