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

Scheltienne Mathieu mathieu.scheltienne at epfl.ch
Tue Dec 8 08:02:30 EST 2020
Search archives:

        External Email - Use Caution        

Hello,

I am using NumPy 1.18 on Windows and 1.19.4 on mac OS.

Mathieu

From: <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Eric Larson <larson.eric.d at gmail.com>
Reply to: Discussion and support forum for the users of MNE Software <mne_analysis at nmr.mgh.harvard.edu>
Date: Tuesday, 8 December 2020 at 13:40
To: Discussion and support forum for the users of MNE Software <mne_analysis at nmr.mgh.harvard.edu>
Subject: Re: [Mne_analysis] Error nproj = np.sum((S / S[0]) > 1e-2) raised when applying projectors {Disarmed}


        External Email - Use Caution
Are you on NumPy 1.19.4? A Windows update introduced a FPU bug a couple of months ago that they're planning on patching in January I think:

MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://secure-web.cisco.com/19zHayk06q4RbgMwW1UGM09r_gGEF4AlY607C7sOcVVPJ2GFEO5kLxOS09sCU7UgdnUJOjzFF-Ckd0L-NsDfd9Q6OctLjU4hkubOImP81xDSUqMzbd2urKydszZmSMBxn65tuG3lCHab5QNOAm7K117QgbmDD1azG7MFwR2m1n9YDV8OBPvdfp1Qe03dzf64usDHLcG-_rU4DjcvibiI848HGXGlxTHM3KhM8Co6LhpjzGFx1hi4qAn02GTnHmXZh3JlfVB8G5Q8imvCAKZ8xHg/https%3A%2F%2Fdevelopercommunity2.visualstudio.com%2Ft%2Ffmod-after-an-update-to-windows-2004-is-causing-a%2F1207405<https://secure-web.cisco.com/1NjLlYU0SqEFbhBTrJZ2O5foARTRqIBEgpBntWBp2mjVzbU9h6asq-_9ex0SFksZSGn0wQzcuHI3AqUwfC5sLqGKKwyAreNozndtHF3WFtdv7kQEQLuhq6QBo9m3vPPxWaoNas5OvbIQXecGj6XyDC0r-UOSKSoxOCl2SdATSE8WteWwCzli89gP1mp34UKm-0_8R_n-ni7pMIhFeijLMkagyngKiaRLXSNeoBLp03rEpUmw2W6fUNxjp7E_LxxDZXd8_gnTsQEvtzyWxC-3Z0Q/https%3A%2F%2Fdevelopercommunity2.visualstudio.com%2Ft%2Ffmod-after-an-update-to-windows-2004-is-causing-a%2F1207405>

In the meantime, a workaround is to install NumPy 1.19.3 on Windows. There is also a NumPy 1.20 release coming soon that should fix it.

Eric


On Tue, Dec 8, 2020 at 4:06 AM Scheltienne Mathieu <mathieu.scheltienne at epfl.ch<mailto: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<mailto:Mne_analysis at nmr.mgh.harvard.edu>
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://secure-web.cisco.com/19XOqKvVlXo6yd4UT1XF-LYxP8IpFHGKMvPwaBfeqjf22uZYJMk8cwNjP-HUpCU6kyp6KDtz2aQEn3hr1kc-xxEogo0pScsnFalRWzRSL7OrdSSgWo8wIEi4EhCest7dpF1d6dvzFFlYaoxjq2LfW1b5ybi4WriznRU5l2p_2a_qJu_El0MYHf0EdLzxQR5qsj2uNIJ4XVwX-YtU0QP6BnFGXK8Ks2gDTIzL3PJiasn3zXXKXbiCVClm-VvjdHClUcgNkGONYKEl2QLwDEJGMiQ/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis<https://secure-web.cisco.com/14fb4NLvrBcSD9s03BqypslRkU6TnMV0kIaEwie9oY0sk9pXr0veZBzYBBKmVKcBaYmg-5PSf3qOvh2PXGBwld7o0D7gQJvPLfTw7CDod1b_CzzhKtVKAnqHOgjOvpSRiG68HZmkr-VM78jN0o5GmEIx16vfOK-mBuiET0cokp5S0Jy2IR1Hqy-OfzTw_L9irpFR1gCzt85hi6_KGYg4EuMeAOEnfCj6bwBkEpGJXLK8iw0sI_iR3MqI8hRZ40yPpDqRt5-j-gCVojrnEGY32uA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201208/b69bfe6d/attachment-0001.html 


More information about the Mne_analysis mailing list