Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix writing 3d coordinates #72

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Conversation

thorstenwagner
Copy link
Contributor

Right now, after you threshold a tloc files, the boxmanager crashes when trying to write the to disk (on all formats):


File /opt/user_software/miniconda3_envs/napari-tomotwin/lib/python3.10/site-packages/pandas/core/indexers/utils.py:552, in check_array_indexer(array=Int64Index([    8,    12,   107,   109,   118,  ...    34408],
           dtype='int64', length=992), indexer=<class 'numpy.ndarray'> (34414,) bool)
    550     # GH26658
    551     if len(indexer) != len(array):
--> 552         raise IndexError(
        indexer = <class 'numpy.ndarray'> (34414,) bool
        array = Int64Index([    8,    12,   107,   109,   118,   182,   496,  1719,  1785,
             2549,
            ...
            34320, 34332, 34336, 34340, 34341, 34352, 34378, 34398, 34405,
            34408],
           dtype='int64', length=992)
    553             f"Boolean index has wrong length: "
    554             f"{len(indexer)} instead of {len(array)}"
    555         )
    556 elif is_integer_dtype(dtype):
    557     try:

IndexError: Boolean index has wrong length: 34414 instead of 992

This PR fixes this issue

@thorstenwagner thorstenwagner merged commit 1a7ef92 into main Jan 22, 2024
2 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.

After applying threshold for 3D particles, writing new coordinate files crashes
1 participant