Skip to content

Fix TypeError crash in multiplex_looms from pandas 3.0 string dtype - #2

Merged
JohannesGawron merged 1 commit into
mainfrom
worktree-mighty-sleeping-floyd
Jul 22, 2026
Merged

Fix TypeError crash in multiplex_looms from pandas 3.0 string dtype#2
JohannesGawron merged 1 commit into
mainfrom
worktree-mighty-sleeping-floyd

Conversation

@JohannesGawron

Copy link
Copy Markdown
Collaborator

np.char.split(index, '_') raised "TypeError: string operation on non-string array" because pandas 3.0's default StringDtype (future.infer_string) makes index.astype(str) return an object-dtype ndarray rather than a real numpy unicode array. np.char functions require an actual '<U'/'S' dtype array, so force conversion with np.asarray(..., dtype=str) instead.

Verified on the euler cluster by reproducing the exact failing pooling job (seed_1, pool_3.0, robust=False) directly against the pipeline's conda env: it previously crashed with this exact traceback and now completes successfully, producing all expected output files.

np.char.split(index, '_') raised "TypeError: string operation on
non-string array" because pandas 3.0's default StringDtype
(future.infer_string) makes index.astype(str) return an object-dtype
ndarray rather than a real numpy unicode array. np.char functions
require an actual '<U'/'S' dtype array, so force conversion with
np.asarray(..., dtype=str) instead.

Verified on the euler cluster by reproducing the exact failing
pooling job (seed_1, pool_3.0, robust=False) directly against the
pipeline's conda env: it previously crashed with this exact
traceback and now completes successfully, producing all expected
output files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@JohannesGawron
JohannesGawron merged commit de62224 into main Jul 22, 2026
1 check failed
@JohannesGawron
JohannesGawron deleted the worktree-mighty-sleeping-floyd branch July 22, 2026 14:43
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