Skip to content

dimension error when detrending with higher order polynomial #34

@OleBialas

Description

@OleBialas

I am trying to do a detrending of my raw data in two steps with a linear and a higher order polynomial detrending, like this:

y, _, _ = meegkit.detrend.detrend(x, 1)
y, _, _ = meegkit.detrend.detrend(y, 5)

where x is raw data of shape (289120, 64)
The first detrending works just fine but during the second one I get a ValueError in line 209 of the regress function, saying
that the array c could not be broadcast into the matrix b due to a mismatch in dimensions.
It seems the matrix b has the shape (n_channels, n_channels) while c has the shape (order, 1).

Maybe something has changed in the underlying scipy functions? I am using:

python 3.9.2
numpy 1.20.2
scipy 1.6.2

Thanks for the nice package btw:)
Cheers,
Ole

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions