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

Bugfix on TsdFrame getitem #382

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

Bugfix on TsdFrame getitem #382

wants to merge 5 commits into from

Conversation

BalzaniEdoardo
Copy link
Collaborator

On TsdFrame of 1 column, this would cause an error:

tsdframe = nap.TsdFrame(t=np.arange(10), d=np.ones((10, 1)))
tsdframe[0]

Since in the getitem it was checking if key[1] is list or array but key is an integer in this case.

Fixed it quickly and added a test for this 1 column tsdframe.

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
pynapple/core/time_series.py 89.82% <100.00%> (+0.05%) ⬆️

@BalzaniEdoardo BalzaniEdoardo marked this pull request as draft December 21, 2024 00:26
@BalzaniEdoardo BalzaniEdoardo marked this pull request as ready for review December 21, 2024 05:18
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.

1 participant