Compute forward solution

Hi , i am facing this problem.
*TypingError Traceback (most recent call last)
in
----> 1 fwd = mne.make_forward_solution(raw_fname, trans=trans, src=src, bem=bem,
2 meg=True, eeg=False, mindist=5.0, n_jobs=1,
3 verbose=True)
4 print(fwd)

in make_forward_solution(info, trans, src, bem, meg, eeg, mindist, ignore_ref, n_jobs, verbose)

~\anaconda3\envs\mne\lib\site-packages\mne\forward_make_forward.py in make_forward_solution(failed resolving arguments)
601 ccoils = [compcoils, None]
602 infos = [meg_info, None]
→ 603 megfwd, eegfwd = _compute_forwards(rr, bem, coils, ccoils,
604 infos, coil_types, n_jobs)
605

in _compute_forwards(rr, bem, coils_list, ccoils_list, infos, coil_types, n_jobs, verbose)

~\anaconda3\envs\mne\lib\site-packages\mne\forward_compute_forward.py in _compute_forwards(rr, bem, coils_list, ccoils_list, infos, coil_types, n_jobs, verbose)
916 fwd_data = dict(coils_list=coils_list, ccoils_list=ccoils_list,
917 infos=infos, coil_types=coil_types)
→ 918 _prep_field_computation(rr, bem, fwd_data, n_jobs)
919 Bs = _compute_forwards_meeg(rr, fwd_data, n_jobs)
920 return Bs

in _prep_field_computation(rr, bem, fwd_data, n_jobs, verbose)

~\anaconda3\envs\mne\lib\site-packages\mne\forward_compute_forward.py in _prep_field_computation(rr, bem, fwd_data, n_jobs, verbose)
777 cf = FIFF.FIFFV_COORD_HEAD
778 # multiply solution by “mults” here for simplicity
→ 779 solution = _bem_specify_coils(bem, coils, cf, mults,
780 n_jobs)
781 if compensator is not None:

~\anaconda3\envs\mne\lib\site-packages\mne\forward_compute_forward.py in _bem_specify_coils(failed resolving arguments)
221 for o1, o2, surf, mult in zip(lens[:-1], lens[1:],
222 bem[‘surfs’], bem[‘field_mult’]):
→ 223 coeff = _lin_field_coeff(surf, mult, r, c, w, b, n_jobs)
224 sol[start:stop] += np.dot(coeff, bem[‘solution’][o1:o2])
225 sol *= mults

~\anaconda3\envs\mne\lib\site-packages\mne\forward_compute_forward.py in _lin_field_coeff(surf, mult, rmags, cosmags, ws, bins, n_jobs)
92 parallel, p_fun, _ = parallel_func(_do_lin_field_coeff, n_jobs)
93 nas = np.array_split
—> 94 coeffs = parallel(p_fun(surf[‘rr’], t, tn, ta, rmags, cosmags, ws, bins)
95 for t, tn, ta in zip(nas(surf[‘tris’], n_jobs),
96 nas(surf[‘tri_nn’], n_jobs),

~\anaconda3\envs\mne\lib\site-packages\mne\forward_compute_forward.py in (.0)
92 parallel, p_fun, _ = parallel_func(_do_lin_field_coeff, n_jobs)
93 nas = np.array_split
—> 94 coeffs = parallel(p_fun(surf[‘rr’], t, tn, ta, rmags, cosmags, ws, bins)
95 for t, tn, ta in zip(nas(surf[‘tris’], n_jobs),
96 nas(surf[‘tri_nn’], n_jobs),

~\anaconda3\envs\mne\lib\site-packages\numba\core\dispatcher.py in _compile_for_args(self, *args, **kws)
412 e.patch_message(msg)
413
→ 414 error_rewrite(e, ‘typing’)
415 except errors.UnsupportedError as e:
416 # Something unsupported is present in the user code, add help info

~\anaconda3\envs\mne\lib\site-packages\numba\core\dispatcher.py in error_rewrite(e, issue_type)
355 raise e
356 else:
→ 357 raise e.with_traceback(None)
358
359 argtypes = []

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
non-precise type pyobject
During: typing of argument at C:\Users\Conic\anaconda3\envs\mne\lib\site-packages\mne\forward_compute_forward.py (132)

File “…\anaconda3\envs\mne\lib\site-packages\mne\forward_compute_forward.py”, line 132:
def _do_lin_field_coeff(bem_rr, tris, tn, ta, rmags, cosmags, ws, bins):

“”"
coeff = np.zeros((((bins[-1]) + 1), len(bem_rr)))
^

This error may have been caused by the following argument(s):

  • argument 1: Unsupported array dtype: >i4

This error may have been caused by the following argument(s):

  • argument 1: Unsupported array dtype: >i4

This error may have been caused by the following argument(s):

  • argument 1: Unsupported array dtype: >i4

Hello,

we’ll need more information to help you, as stated in the template when you create a new posting. Let me quote:

  • MNE-Python version: 0.xx.x
  • operating system:

Please also provide relevant code snippets – ideally a minimal working example (MWE). To get the correct formatting, paste your Python code, then select it and click on the Preformatted text toolbar button.

Thanks