Message Boards Message Boards

Embed wolfram function in python and get returned values in python?

GROUPS:

I want to embed a function in wolfram in python so that I can pass in parameters to wolfram function, which would do the manipulation and return the values back to python

let's say a simple function: gamma = Function [{x}, y = x*x ; y = y*4]

POSTED BY: Sagar Mankari
Answer
2 months ago

Use subprocess with wolframscript to evaluate the stuff and return it as JSON. Use the json module to import that JSON into standard python datastructures.

POSTED BY: b3m2a1 ​ 
Answer
2 months ago

Group Abstract Group Abstract