Skip to content

fix: use int8 for SWC compartment type to handle type=-1 - #27

Merged
anna-grim merged 1 commit into
mainfrom
fix/swc-type-overflow
Sep 23, 2026
Merged

anna-grim merged 1 commit into
mainfrom
fix/swc-type-overflow

Conversation

@anna-grim

Copy link
Copy Markdown
Collaborator

Some SWC files use compartment type -1, which overflows np.uint8 and raises an OverflowError. Since read_zips silently swallows exceptions, affected zips were dropped entirely, causing the graph to load fewer components than expected.

Changing the dtype to int8 (range -128 to 127) accommodates -1 and all standard SWC compartment codes (1–7).

Some SWC files use compartment type -1, which overflows np.uint8 and
raises an OverflowError. Since read_zips silently swallows exceptions,
affected zips were dropped entirely, causing the graph to load fewer
components than expected.

Changing the dtype to int8 (range -128 to 127) accommodates -1 and
all standard SWC compartment codes (1–7).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@anna-grim
anna-grim merged commit c7a0258 into main Sep 23, 2026
0 of 3 checks passed
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