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

Problem about calling newton-cg optimization method #22

Open
sycmio opened this issue Jun 14, 2018 · 1 comment
Open

Problem about calling newton-cg optimization method #22

sycmio opened this issue Jun 14, 2018 · 1 comment

Comments

@sycmio
Copy link

sycmio commented Jun 14, 2018

Hello @mattloper ,
Thank you very much for this wonderful tool! I am trying to use chumpy in one of my project, and I met one problem when calling the ch.minimize function with method newton-cg. I dive into the source code of chumpy and found that the problem is caused by function ns_jacfunc in chumpy/optimization.py. To be more concrete, a function 'hstack' is called in this function, but actually it is not defined. I know both numpy and chumpy have hstack, but it seems you didn't import them in this py file. I have also tried to import them, but it didn't help (some other problems occur after it, so I guess you don't want to use np.hstack or ch.hstack here). Do you know how to fix this bug?

Best,
Yongchi

@gdwei
Copy link

gdwei commented Jun 23, 2018

I've met the same problem. But adding 'from optimization_internal import hstack' to chumpy/optimization.py solves my problem. And you can also modify the statement to 'result = sp.hstack(jacs)'

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