Skip to content

Returned sigma might have a different length to bins - #147

Merged
ttricco merged 1 commit into
ttricco:mainfrom
becnealon:main
Jul 27, 2026
Merged

ttricco merged 1 commit into
ttricco:mainfrom
becnealon:main

Conversation

@becnealon

Copy link
Copy Markdown
Contributor

Looking at a particular phantom file and found that the sigma returned from surface_density could have a different length to the number of bins I requested. It seems to occur when some of the bins have zero particles and that entry is silently dropped. I don't know if anyone else has had this problem but it made it difficult to plot because sigma and bins were not indexed in the same way and had differing lengths. Can provide file for testing if needed.

…are zero particles in a bin (otherwise it returns an array of a different length)

@ttricco ttricco left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This occurs with pandas versions 3.0+.

@ttricco
ttricco merged commit de04404 into ttricco:main Jul 27, 2026
1 check 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.

2 participants