Skip to content

Fix assign_reg_io for ndarray input#1226

Open
ethanbb wants to merge 1 commit intoMouseLand:mainfrom
proektlab:assign-reg-io-fix-for-arrays
Open

Fix assign_reg_io for ndarray input#1226
ethanbb wants to merge 1 commit intoMouseLand:mainfrom
proektlab:assign-reg-io-fix-for-arrays

Conversation

@ethanbb
Copy link
Copy Markdown

@ethanbb ethanbb commented Apr 13, 2026

I ran into this when trying to use registration_wrapper by itself in another project. registration_wrapper and its subroutine assign_reg_io are documented to take either BinaryFiles or np.ndarrays, but currently passing an ndarray gives the error "The truth value of an array with more than one element is ambiguous" due to trying to test the truth value of the input directly. This is fixed by changing each check to is None or is not None.

@StephenThornquist
Copy link
Copy Markdown

Wow synchronicity #1227

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.32%. Comparing base (be8830d) to head (12b5123).
⚠️ Report is 228 commits behind head on main.

Files with missing lines Patch % Lines
suite2p/registration/register.py 55.55% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1226      +/-   ##
==========================================
+ Coverage   55.21%   58.32%   +3.10%     
==========================================
  Files          43       47       +4     
  Lines        5055     4434     -621     
==========================================
- Hits         2791     2586     -205     
+ Misses       2264     1848     -416     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

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.

2 participants