Do you have ideas of what I should try next? Is there anywhere I can put some prints that would help us debug this? Should I switch tatics and instead extract the particle data out and use a KDTree?
Hi Stephen, sorry to reply to my own email, but on second thought I wonder if maybe the variable over_density could be the problem. I'd suggest you try removing all interaction with it; alternatively, you could instead make it a single float that gets updated, rather than a list that goes to array that goes to float. I am slightly concerned that is where the wonkiness could come from. Also try removing your calls to the _mpi_* methods. Also, you do see that you re-assign self.samples during the call to sigma.__init__, yeah? That could be a problem. -Matt