Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*** ValueError: operands could not be broadcast together with shapes (2888,) (216,) #22

Closed
iancharest opened this issue Feb 4, 2021 · 3 comments

Comments

@iancharest
Copy link

f = fracridge(np.concatenate(desw),  np.concatenate(data2), opt['frac'])
np.concatenate(desw).shape
(648, 216)
np.concatenate(data2).shape
(648, 2888)

The error perhaps happens in here?

if X.shape[0] > X.shape[1]:

The next three lines result in ynew being of shape (2888,)

uu, ss, v_t = svd(X.T @ X)
selt = np.sqrt(ss)
ynew = np.diag(1./selt) @ v_t @ (X.T @ y)

this then breaks the line:

ols_coef = (ynew.T / selt).T
@iancharest
Copy link
Author

maybe related to :
df4f363 ?

@arokem
Copy link
Member

arokem commented Feb 4, 2021 via email

@arokem
Copy link
Member

arokem commented Feb 4, 2021

OK. Just released version 1.3.2, so another pip install -U fracridge should set you straight.

Thanks for the poke!

@arokem arokem closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants