You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I write the following small program to ask input numbers from user, and calculate the mean and variance.
using OnlineStats
functioncalculate_average()
o =Series(Mean(), Variance())
println(typeof(o))
i =0whiletrueprintln("Enter number or 'q' to quit:")
input =readline()
if input =="q"breakelse
x =parse(Float64, input)
fit!(o, x)
i +=1println(value(o))
endendendcalculate_average()
But the Julia VS Code extension reports "Possible method call error" at fit!(o, x). It thinks fit! as StatsAPI.fit!, and reports it is a "function with 0 methods"
System information:
OnlineStats: 1.6.3
VS Code: 1.84.2
Julia extension: 1.60.2
Julia: 1.9.4
OS: macOS 14.0
The text was updated successfully, but these errors were encountered:
I often run into a similar issue, and can fix it by explicitly importing the fit! method
using OnlineStats
using OnlineStats: fit!
I think the issue usually comes from using extended methods, i.e. because fit! is imported/owned by StatsBase. Seems to be a general limitation of the VSCode extension.
I write the following small program to ask input numbers from user, and calculate the mean and variance.
But the Julia VS Code extension reports "Possible method call error" at
fit!(o, x)
. It thinksfit!
asStatsAPI.fit!
, and reports it is a "function with 0 methods"System information:
The text was updated successfully, but these errors were encountered: