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