nbara / python-meegkit

🔧🧠 MEEGkit: MEG & EEG processing toolkit in Python
https://nbara.github.io/python-meegkit/
BSD 3-Clause "New" or "Revised" License
183 stars 50 forks source link

[FIX] Null channels cause dss.dss0 to crash #4

Closed paulroujansky closed 4 years ago

paulroujansky commented 4 years ago

Description

When the values of n_chans - 1 channels are set to zero, dss.dss0() returns aValueError: expected square matrix message. This is because the passed input matrix c2 is one-dimensional (because it has 1 feature only, corresponding to the not-null channel).

Proposed fix is to leave it 2-dimensional by removing squeeze().

codecov[bot] commented 4 years ago

Codecov Report

Merging #4 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #4   +/-   ##
=======================================
  Coverage   67.30%   67.30%           
=======================================
  Files          14       14           
  Lines        1838     1838           
=======================================
  Hits         1237     1237           
  Misses        601      601           
Impacted Files Coverage Δ
meegkit/dss.py 76.11% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 485f8be...b656479. Read the comment docs.