[Mne_analysis] Error nproj = np.sum((S / S[0]) > 1e-2) raised when applying projectors

Scheltienne Mathieu mathieu.scheltienne at epfl.ch
Fri Dec 11 03:57:15 EST 2020
Search archives:

        External Email - Use Caution        

Hi,

I am not using Anaconda which is why I attached the pip list of both system to the first e-mail.
I could not figure out what the problem was and ended up doing a fresh install of python to fix it.

Best, 
Mathieu

		MacOS		Windows
Numpy: 	1.19.4		1.18.0
MKL:				2019.0
MNE:             	0.21.1		0.21.0
Scipy:		1.5.4		1.5.3


On 11.12.20, 09:37, "mne_analysis-bounces at nmr.mgh.harvard.edu on behalf of Alexandre Gramfort" <mne_analysis-bounces at nmr.mgh.harvard.edu on behalf of alexandre.gramfort at inria.fr> wrote:

            External Email - Use Caution        

    Dear Mathieu

    I would do a

    conda list

    on both systems to see how they differ wrt numpy and scipy versions

    Alex

    On Tue, Dec 8, 2020 at 10:16 AM Scheltienne Mathieu
    <mathieu.scheltienne at epfl.ch> wrote:
    >
    >         External Email - Use Caution
    >
    > Dear all,
    >
    >
    >
    > I am using MNE for EEG analysis on my MacBook Pro on both mac OS and Windows (double boot).
    >
    > Today, I could not apply projectors on Windows but I could on mac OS. The error raised on Windows is:
    >
    >
    >
    > C:\Program Files\Python\Python38\lib\site-packages\mne\io\proj.py:641: RuntimeWarning: invalid value encountered in greater
    >
    >     nproj = np.sum((S / S[0]) > 1e-2)
    >
    >
    >
    > The error was raised when doing:
    >
    >
    >
    > raw = mne.io.read_raw_fif(fname, preload=True)
    >
    > raw.set_eeg_reference(ref_channels='average', projection=True) # CAR
    >
    > eog_projs, _ = mne.preprocessing.compute_proj_eog(raw, n_grad=0, n_mag=0, n_eeg=1, reject=None,
    >
    >                                                                                                   no_proj=True, n_jobs=1)
    >
    > raw.add_proj(eog_projs)
    >
    > raw.plot(scalings=DEFAULT_SCALINGS)
    >
    >
    >
    > Note that using only one of the 2 projectors raises the same error; and using raw.apply_proj() does it as well.
    >
    > Same file with same script on mac OS is working fine. Any idea for a solution?
    >
    >
    >
    > Have a nice day,
    >
    > Mathieu Scheltienne
    >
    > _______________________________________________
    > Mne_analysis mailing list
    > Mne_analysis at nmr.mgh.harvard.edu
    > https://secure-web.cisco.com/1w4dicl1ZuiDZoGpQimqrjuofUMsZ6zrKoaHqu1FFcAW2hEaOuQtoUnYYBse0YTLqaULQuX0oauT8X_hc_sxVX7zL9gjlQrm0z8Lsd3NrCWxVgRCSKxpIZPTljMMm24PB4addrICC5CBKuhVyevNS94WlIfcO8A26TNMHZxLRe8bz3EjCUd2robJ448Vsu8JEgLZDUnd38USgSCYMvKrjRSgynDJgaq6jK_Z3RyJv60jd8w9InY7HsnLA0fJXVd59diX-f7ns4lQ5r9uNRl16HQ/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis

    _______________________________________________
    Mne_analysis mailing list
    Mne_analysis at nmr.mgh.harvard.edu
    https://secure-web.cisco.com/10Ugv5z8QNwmM7by6upbUFcrZ2ZjG2e6V1f_O70ubrtOVkSHfEYD4NVP5le9iaqHFSb8RCyaO3HsdERWbR45Z8Q1fLKMrODjyfriW6-cCBJn2j7LYGCFqLLGak0pFxHUKxeNoi-N9WZO3T4kdGTyIcR6tbRuzEvOCELydsCHSXf29fvjHwDHLHqOa6qZJILZLbXQE7_AGwoAcf3QxvxtmJ85OLWqCgn5cGddKOuDQJdHd8_Yeoi1A6wb5Q5QWXfhAqhcsewwyMrp3qXok4p2rsA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis




More information about the Mne_analysis mailing list