The language used is Julia and the version is 1.6.3.
I write and execute the code according to the book, but I don't know how to solve it because I got a MethodError.
using Pkg
Pkg.add ("Statistics")
Downloaded and installed the package in .Then
using Statistics
mean([1,2,3,4,5])
MethodError: no method matching mean(::Vector {Int64})
Closeest candidates are:
mean(::Any, !Matched::Any) at c:\Users\~\Julia Study\benkyou1.ipynb:1
That's what happened.
I don't know what the problem is and how to solve it.Thank you for your cooperation.
I don't know what it means, but I reset all the outputs, started VSCode again, and then ran it again, and it worked normally.
© 2024 OneMinuteCode. All rights reserved.