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

Issue Running Example Code - ValueError: f0 passed has more than 1 dimension. #15

Open
megangrannan opened this issue Oct 11, 2021 · 10 comments

Comments

@megangrannan
Copy link

First of all, THANK YOU for putting together this awesome package with clear documentation!
I am trying to follow along with your example code, and have tried with the german_reunification and proposition 99 data, as well as in the Jupyter binder you posted, and keep getting the same error:
image
image

@Bougeant
Copy link

Same problem here with my own data. f0 is a single element in a nested list (e.g. [[0.1234]]).

@Bougeant
Copy link

@megangrannan This is a problem with scipy==1.7.1. The problem goes away if you use scipy==1.4.1, which is not compatible with Python3.9 though.

@chaberkern
Copy link

I also had this issue. I was running an earlier version of this package on my laptop, but when I moved to my PC to work with this package and installed the latest version, I was getting this f0 error.

@kheilman
Copy link

kheilman commented Nov 9, 2021

Is there a practical solution to the problem?

@Bougeant
Copy link

@kheilman, downgrade to scipy==1.4.1.

@SongshGeo
Copy link

SongshGeo commented Feb 7, 2022

Same problem, here. Tried lower scipy version but it still doesn't work.

@kheilman, downgrade to scipy==1.4.1.

2022-02-07, updated:
Sorry about the above wrong message, it works after downgrade to scipy==1.4.1

huicaikrz added a commit to huicaikrz/SyntheticControlMethods that referenced this issue May 4, 2022
Flatten the loss returned from method total_loss so that the code could run with scipy>=1.5.0
@edojad
Copy link

edojad commented Jun 17, 2022

hi, is there a solution to this type of error? with my version of python I cannot downgrade scipy to 1.4.1..

@carlosagostini
Copy link

I get the following error but my data has same schema is the same than examples:

ValueError: cannot reshape array of size 33909 into shape (65,829)
Screenshot 2023-03-11 at 00 44 07

@rahatN-tech
Copy link

rahatN-tech commented Sep 15, 2023

same issue with me.. with scipy.optimize.minimize using 'trust-constr' method with bounds and non-linear constraints

can someone please help

@tiantitn
Copy link

tiantitn commented Jan 1, 2024

Expect lower scipy version, is there any other solutions? (My python version is 3.9 which is incompatible with scipy1.4.1)

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

9 participants