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

fix float64 series use mean or stdev function result is zero #1689

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

anywhy
Copy link
Contributor

@anywhy anywhy commented Aug 7, 2024

series := types.NewFloat64Series()
	series.PushAndEmit(2)
	series.PushAndEmit(4)
	series.PushAndEmit(6)
	series.PushAndEmit(8)
	series.PushAndEmit(10)

	t.Log(series.SeriesBase.Length())
	t.Log(series.Mean(3))
	t.Log(series.Stdev(3))
}

The result is zero.

@bbgokarma-bot
Copy link

Hi @anywhy,

This is KarmaBot, and we reward your contributions with tokens sent directly to your wallet to support development.

This pull request may get 205 BBG.

To receive BBG tokens, please provide your Polygon (can be Ethereum) address as an issue comment in this pull request, following this format:

polygon:0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B

Once this pull request is merged, your BBG tokens will be transferred to your wallet.

--
If you're interested in our project, feel free to join our Telegram group https://t.me/bbgo_intl

Best,
KarmaBot

@zenixls2
Copy link
Collaborator

can you help adding some unit test cases on this struct?

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 238 BBG

@c9s c9s merged commit baffefa into c9s:main Aug 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants