Skip to content

fix#601

Merged
gviejo merged 5 commits into
devfrom
fix-jitted-func
May 13, 2026
Merged

fix#601
gviejo merged 5 commits into
devfrom
fix-jitted-func

Conversation

@gviejo

@gviejo gviejo commented May 12, 2026

Copy link
Copy Markdown
Contributor

This pull request improves the robustness of the jitrestrict and jitrestrict_with_count functions by adding explicit handling for empty input arrays, and introduces new tests to ensure correct behavior for these edge cases.

Core logic improvements

  • Added checks in jitrestrict and jitrestrict_with_count (in pynapple/core/_jitted_functions.py) to immediately return empty results when the input time array or epochs are empty, preventing potential errors or unnecessary computation. [1] [2]

Testing enhancements

  • Added new tests in tests/test_jitted.py to verify that jitrestrict and jitrestrict_with_count correctly handle empty time arrays and empty epochs, ensuring these functions return empty outputs as expected in these scenarios.

@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gviejo gviejo merged commit 996cee2 into dev May 13, 2026
23 of 31 checks passed
@gviejo gviejo deleted the fix-jitted-func branch May 13, 2026 16:20
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