1
votes

I am currently staring with Julia 1.0.0 under Windows 10. When using a function randperm(n) where n is an integer number, I got an error message:

ERROR: UndefVarError: randperm not defined.

Presumably, I have not loaded a library that contains this function. So, could anyone please tell me which library should I load so that I can use that function? Thank you in advance!

Nha

1
If you're used to the syntax and idioms of v0.6, be aware the core devs are recommending that users work on v0.7 for a month or so, until they get used to all the breaking changes (which all generate descriptive warnings on v0.7, as others have mentioned below). - Colin T Bowers

1 Answers

1
votes

You need to load standard library Random, e.g.:

julia> using Random

julia> randperm(10)
10-element Array{Int64,1}:
  6
  3
  7
 10
  2
  8
  5
  9
  4
  1