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

Slice bug #182

Open
yongplus opened this issue Mar 11, 2022 · 0 comments
Open

Slice bug #182

yongplus opened this issue Mar 11, 2022 · 0 comments

Comments

@yongplus
Copy link

yongplus commented Mar 11, 2022

I found an issue.

When i called Slice method with two paramenters (j,k) on a Series object, If the value of k just is equal to the Series` length , Then it return empty. I jumped to the file 'github.com\go-gota\gota@v0.12.0\series\series.go' in the gota package source, Try to modified the line if j > k || j < 0 || k >= s.Len() { to if j > k || j < 0 || k > s.Len() {
in the Slice method, Everything is ok.

Method below:
func (s Series) Slice(j, k int) Series

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

No branches or pull requests

1 participant