Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Seq.weightedMean returns a function #329

Closed
kevmal opened this issue May 9, 2024 · 0 comments · Fixed by #331
Closed

[BUG] Seq.weightedMean returns a function #329

kevmal opened this issue May 9, 2024 · 0 comments · Fixed by #331
Labels

Comments

@kevmal
Copy link
Contributor

kevmal commented May 9, 2024

The signature for Seq.weightedMean is off. For example:

#r "nuget:FSharp.Stats"
open FSharp.Stats

let values = [1.0; 2.0; 3.0; 4.0; 5.0]
let weights = [1.0;2.0;1.0;2.0;1.0]
Seq.weightedMean weights values

Result:

val values: float list = [1.0; 2.0; 3.0; 4.0; 5.0]
val weights: float list = [1.0; 2.0; 1.0; 2.0; 1.0]
val it: (float -> float)

Expecting a float.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant