

'linspace' not defined in canopy editor
I can't use the linspace function inside canopy editor and canopy command prompt. although it works inside python console, provided inside the editor.
IT reflects an error of :-
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
C:\Users\kiit1\four_plot.py in <module>()
1 # coding: utf-8
----> 2 x= linspace(-5*pi,5*pi,500)
3 #plot(x,x.'b')
4 plot(x,x,'b')
5 plot(x,-x,'b')
NameError: name 'linspace' is not defined
Python


Problem solved:
Just run your python script like this.
%run -i your_file_name.py
this will work, without showing any error, also for displaying plots use:
show()
15-09-18, 1:25 p.m. sushma
Login to add comment