Problem using command read_bvec_file


Dear community:

I am trying to use read_bvec_file and I am getting this error:

bvecs_file = ‘grad.bvecs’
bvals_file = ‘grad.bvals’
bvecs = in_file_fmricorr + ‘/’ + bvecs_file

import os
from import Dpy
bvec_data =

NameError: name ‘dipy’ is not defined


Assuming that that’s all valid, you need to import dipy before trying to call Possibly you’ll need to import


I found the solution is

from import read_bvec_file
bvec, bval = read_bvec_file(bvec)

Thanks a lot,