4

Is there a way to convert Mathematica code to run in Python without running a Mathematica kernel in 2019? I have a long complicated code in Mathematica I would like to run in Python. However due to licensing I won't have access to Mathematica for long. The code executes an complex arithmetic procedure, but doesn't use any special functions. The most complicated action it does is take the square root. I know I can always rewrite the code in Python but I would really prefer not to do that.

Thanks

Topology21
  • 41
  • 2
  • 1
    There is no automated way that I am aware of. Have you looked at the free Wolfram Engine for Developers? – Carl Lange Oct 30 '19 at 19:13
  • Yes but longterm it is not a good solution for me. – Topology21 Oct 30 '19 at 19:14
  • 1
    In that case, you will need to rewrite this code in Python. Perhaps you could, if you were being adventurous, use FunctionCompile and transpile the LLVM bytecode, but that sounds like more effort than just spending a day rewriting the code! – Carl Lange Oct 30 '19 at 19:17
  • Alright fine I'll get to it. But if anyone else has another idea feel free to pitch in. – Topology21 Oct 30 '19 at 19:18
  • 1
    I've never used it, but maybe Mathics would work? – Chris K Oct 30 '19 at 20:38
  • 1
    On any rewriting project, I'd recommend that first thing to do is use your existing version to produce test cases (particularly if you are likely to lose access to Mathematica soon). – mikado Oct 30 '19 at 21:26
  • @ChrisK that looks very promising I'll take a look at it thanks. – Topology21 Oct 30 '19 at 22:33

0 Answers0