Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Embedding
#1
I don't know if this is the correct forum but,

I am doing some Python Embedding from:
https://docs.python.org/3.6/extending/em...-embedding

I cannot figure out how to pass the keyword rosen from the C/Python API in the nelderMead function argument correctly.

I have tried hard-coding PyUnicode_DecodeFSDefault but it outputs a string into the Python when rosen itself is a type class
from scipy.

from scipy.optimize import minimize, rosen, rosen_der

def nelderMead(func):
    x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
    res = minimize(func, x0, method='Nelder-Mead', tol=1e-6)
    print(res.x)


please advise Huh .
Reply


Messages In This Thread
Python Embedding - by jibarra - Jul-10-2019, 07:23 PM
RE: Python Embedding - by Gribouillis - Jul-11-2019, 05:11 AM
RE: Python Embedding - by jibarra - Jul-11-2019, 01:54 PM
RE: Python Embedding - by Gribouillis - Jul-11-2019, 03:08 PM
RE: Python Embedding - by jibarra - Jul-11-2019, 03:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Embedding python script into html via pyscript pyscript_dude 7 1,454 Apr-16-2023, 11:17 PM
Last Post: pyscript_dude
  C++ python embedding comarius 0 803 Aug-26-2022, 02:01 AM
Last Post: comarius
Question Embedding a python file online Dreary35 0 1,478 Jun-10-2021, 05:05 PM
Last Post: Dreary35
  Embedding python cause crash when use boost::asio multi threading udvatt108 0 1,695 Oct-04-2020, 03:15 PM
Last Post: udvatt108
  Need help merging/embedding duckredbeard 10 3,336 Aug-13-2020, 04:48 AM
Last Post: duckredbeard
  Embedding return in a print statement Tapster 3 2,234 Oct-07-2019, 03:10 PM
Last Post: Tapster
  Calling Extended Embedding Python as shared library jibarra 0 2,189 Jul-19-2019, 05:22 PM
Last Post: jibarra
  More Python Embedding Trouble jibarra 3 2,877 Jul-11-2019, 09:25 PM
Last Post: Gribouillis
  Embedding or adding IDE like "repl" inside Flask app sray 1 2,194 Jul-03-2019, 03:13 PM
Last Post: nilamo
  Embedding Python into a simulator siggi 0 2,170 Apr-24-2019, 07:42 PM
Last Post: siggi

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020