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

TypeError: scipy/linalg/interface.py #65

Closed
solomonvimal opened this issue Mar 9, 2020 · 2 comments
Closed

TypeError: scipy/linalg/interface.py #65

solomonvimal opened this issue Mar 9, 2020 · 2 comments

Comments

@solomonvimal
Copy link

I'm getting an error if I use the fit function for the standard example. I'm using Python3.6 and scipy version 1.1.0.

my_pwlf = pwlf.PiecewiseLinFit(x, y)
res = my_pwlf.fit(2)

The error message is:
`
File "/home/svimal/miniconda3/lib/python3.6/site-packages/scipy/optimize/lbfgsb.py", line 378, in _minimize_lbfgsb
hess_inv = LbfgsInvHessProduct(s[:n_corrs], y[:n_corrs])
File "/home/svimal/miniconda3/lib/python3.6/site-packages/scipy/sparse/linalg/interface.py", line 144, in new
obj = super(LinearOperator, cls).new(cls)

TypeError: super(type, obj): obj must be an instance or subtype of type`

@cjekel
Copy link
Owner

cjekel commented Mar 9, 2020

Does this happen for any x and y data? If so it might be a problem with the lbfgsb in your scipy version.

Can you update scipy to version 1.2.0 and report back?

@solomonvimal
Copy link
Author

@cjekel: Thanks! Yes, updating scipy (from 1.1.0 to 1.4.1) fixed the issue.

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