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

IndexError: Boolean index has wrong length #109

Open
pankajumich opened this issue Sep 26, 2024 · 6 comments
Open

IndexError: Boolean index has wrong length #109

pankajumich opened this issue Sep 26, 2024 · 6 comments

Comments

@pankajumich
Copy link

Hi all,
I am getting the following error when i am trying to save selected particles.

File ~/.local/lib/python3.10/site-packages/pandas/core/indexers/utils.py:539, in check_array_indexer(array=Index([3313, 3314, 3315, 3316, 3317, 3318, 3319,...5, 4866, 4867],
dtype='int64', length=1555), indexer=<class 'numpy.ndarray'> (4868,) bool)
537 # GH26658
538 if len(indexer) != len(array):
--> 539 raise IndexError(
540 f"Boolean index has wrong length: "
541 f"{len(indexer)} instead of {len(array)}"
542 )
543 elif is_integer_dtype(dtype):
544 try:

IndexError: Boolean index has wrong length: 4868 instead of 1555
##################################################
How can i change the length, which seems causing the problem while the saving the coordinates.

Thank you,
Pankaj.

@thorstenwagner
Copy link
Collaborator

Hi Pankaj,

can you describe in more detail what you did because I cant reproduce it? I assumed you opened a tloc file after picking and applied some threshold and now want to save the results. This seems to work for me. Maybe I misunderstood you?

Best
Thorsten

@pankajumich
Copy link
Author

Hi Thorsten,
Thanks for responding.
You got me right, I am trying to save the particles after changing the metric range, but I get the error mentioned in the previously.

Best,
Pankaj.
Screenshot 2024-10-01 at 1 34 10 PM

@thorstenwagner
Copy link
Collaborator

Can you send me the tloc file?

@pankajumich
Copy link
Author

pankajumich commented Oct 7, 2024 via email

@thorstenwagner
Copy link
Collaborator

It seems that the attachment via mail has failed

@pankajumich
Copy link
Author

I am not able to attach the tloc file here.

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

No branches or pull requests

2 participants