Skip to content

Fix numpy.bool_ crash in find_splice_bubbles - #50

Merged
YalanBi merged 1 commit into
masterfrom
fix/splice-bubble-numpy-bool-index-issue-49
Aug 5, 2026
Merged

Fix numpy.bool_ crash in find_splice_bubbles#50
YalanBi merged 1 commit into
masterfrom
fix/splice-bubble-numpy-bool-index-issue-49

Conversation

@YalanBi

@YalanBi YalanBi commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes alternative_splicing_events/altsplice_test crash with TypeError on real data (numpy.bool_ index) #49: alternative_splicing_events, altsplice_test, and coordination_test crashed with TypeError: tuple indices must be integers or slices, not numpy.bool for real transcriptomes, since comparing numpy int64 exon coordinates yields numpy.bool_, which Python rejects as a sequence index. Fixed by coercing to Python bool at the indexing site.
  • Discovered while re-running the tutorial notebooks against a freshly reconstructed real ENCODE dataset (not a fixture artifact).

Test plan

  • Added regression test reproducing the exact crash with numpy-typed exon coordinates, confirmed it fails without the fix and passes with it
  • Full test suite passes (24/24) in a fresh clone
  • Verified fix against the real reconstructed ENCODE chr8 transcriptome: alternative_splicing_events (1672 events), altsplice_test (690 rows), coordination_test (123 rows) all run cleanly
  • black --check and flake8 clean
  • python -m build + twine check pass
  • CI green across the full matrix

Comparing numpy int64 exon coordinates yields numpy.bool_, which
Python rejects as a tuple/list index. This broke alternative_splicing_
events, altsplice_test, and coordination_test for any real
transcriptome, discovered while re-running the tutorial notebooks
against a freshly reconstructed real dataset.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@YalanBi YalanBi added the bug Something isn't working label Aug 5, 2026
@YalanBi YalanBi self-assigned this Aug 5, 2026
@YalanBi
YalanBi merged commit d2d4e8c into master Aug 5, 2026
20 checks passed
@YalanBi
YalanBi deleted the fix/splice-bubble-numpy-bool-index-issue-49 branch August 5, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alternative_splicing_events/altsplice_test crash with TypeError on real data (numpy.bool_ index)

1 participant