Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Peculiarity of show() #6

Open
bangxiangyong opened this issue Aug 13, 2020 · 2 comments
Open

Peculiarity of show() #6

bangxiangyong opened this issue Aug 13, 2020 · 2 comments

Comments

@bangxiangyong
Copy link

bangxiangyong commented Aug 13, 2020

I understand that show() is supposed to return all samples by default (-1), but i encounter strangeness. However, when the actual number of entries are supplied, it seems to be fine.

from time_series_buffer import TimeSeriesBuffer
ts_buffer =TimeSeriesBuffer()
ts_buffer.add([[0,10],[1,11],[2,12]])
ts_buffer.show() #not fine
ts_buffer.show(3) #looks good
@mgrub
Copy link
Collaborator

mgrub commented Sep 2, 2020

I will look into that. Thanks for pointing onto this strangeness 👍

@mgrub
Copy link
Collaborator

mgrub commented Sep 2, 2020

Looking into the code and docstring, it seems like the default of show() is show(n_samples=1). So by default only the latest addition to the buffer will be shown. Does this already explain the encountered behaviour?

Would it be more convenient to show all elements by default? (Currently, the idea is to have matching defaults for show() and pop().

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

No branches or pull requests

2 participants