SyntheticControlMethods icon indicating copy to clipboard operation
SyntheticControlMethods copied to clipboard

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

Open megangrannan opened this issue 4 years ago • 10 comments

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

megangrannan avatar Oct 11 '21 23:10 megangrannan

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

Bougeant avatar Oct 12 '21 22:10 Bougeant

@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.

Bougeant avatar Oct 13 '21 10:10 Bougeant

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.

chaberkern avatar Nov 04 '21 03:11 chaberkern

Is there a practical solution to the problem?

kheilman avatar Nov 09 '21 21:11 kheilman

@kheilman, downgrade to scipy==1.4.1.

Bougeant avatar Nov 11 '21 13:11 Bougeant

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

SongshGeo avatar Feb 07 '22 14:02 SongshGeo

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

edojad avatar Jun 17 '22 18:06 edojad

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

carlosagostini avatar Mar 10 '23 22:03 carlosagostini

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

can someone please help

rahatN-tech avatar Sep 15 '23 06:09 rahatN-tech

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

tiantitn avatar Jan 01 '24 03:01 tiantitn