Skip to content

Problem about calling newton-cg optimization method #22

Open

Description

@sycmio

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

Activity

  1. gdwei commented on Jun 23, 2018

    @gdwei

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions