After downloading and installing Statistics and running mean(), MethodError appears.

Asked 4 months ago, Updated 4 months ago, 11 views

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

after running
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.


2022-09-30 14:15

1 Answers

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.

2022-09-30 14:15

If you have any answers or tips

© 2023 OneMinuteCode. All rights reserved.