Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • $\begingroup$ Thank you very much! this answer is great! One thing: At first, running a copy of the code you posted I got an error in cmd about some "Unexpected indent". I don't know if it's something to do with how text is formatted on stackexchange, but I did fix it! $\endgroup$ Commented Apr 21, 2019 at 2:48
  • $\begingroup$ I was having a little trouble getting the markdown to work here. You have SE, Mathematica, Python, and Windows all needing to escape their notion of special characters. I am glad you found it useful. I will take a look at the post tomorrow to see if I can repeat the error and try to rectify. $\endgroup$ Commented Apr 21, 2019 at 4:00
  • 1
    $\begingroup$ @Ivan I fixed the indentation problem. The "Code Sample" or ctrl-K in SE adds extra preceding spaces in the MMA code string, which causes a problem, because Python is sensitive to indentation. This is an artifact of trying to highlight a MMA code that produces a Python code in SE. $\endgroup$ Commented Apr 21, 2019 at 13:08