UndefVarError: linspace not defined


#1

New to julia 1.0, I am running some examples and got the following errors, do you have any ideas how to solve this?
Thanks.

‘’’
julia> linspace(0,2*pi,10)
ERROR: UndefVarError: linspace not defined
Stacktrace:
[1] top-level scope at none:0
‘’’


#2

Linspace was deprecated. You should be able to use

range(0,stop=2*pi,length=10)

#3

Worked!
Thank you very much.
BTW, where could I find the information about whether a specific function is deprecated or not?
For “linspace”, I googled a lot before posting here, however I was failed to find any information about this.


#4

If you run the code with Julia v0.7 it will print a deprecation warning.


#5

Even more readable with unicode :slight_smile:

range(0, stop=2π, length=10)