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

Count cic indexes with int64 to prevent overflow #1124

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

AlanPearl
Copy link
Contributor

This PR will provide a solution to the ValueError in galtab issue 6 and does not degrade performance. I'll leave the example test script here, since it is too expensive to include as a unit test:

# NOTE Memory requirement: ~46 GB
import numpy as np
import halotools.mock_observables as htmo

sample = np.zeros((40_000, 3))
htmo.counts_in_cylinders(sample, sample, 1, 1, return_indexes=True, period=100)

@aphearin
Copy link
Contributor

Thanks for the fix @AlanPearl!

@aphearin aphearin merged commit 5512a78 into astropy:master Feb 20, 2025
7 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.

2 participants