[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Problem with python source block
From: |
Doyley, Marvin M. |
Subject: |
[O] Problem with python source block |
Date: |
Sat, 26 May 2018 05:06:30 +0000 |
Hi there,
When I run the following code I get an error, does anybody know how to fix this
I am using the latest version of org-mode.
Thanks,
M
#+BEGIN_SRC python :results file
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
x = np.random.rand(100)
y= np.cos(x)
plt.plot(x,y)
plt.savefig('test.png')
return 'test.png'
#+END_SRC
#+RESULTS:
[[file: File "Org SRC", line 8
return 'test.png'
^
SyntaxError: 'return' outside function
]]
- [O] Problem with python source block,
Doyley, Marvin M. <=