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

Pre-allocate quaternion/pointing arrays #83

Merged
merged 6 commits into from
Jan 5, 2021
Merged

Conversation

ziotom78
Copy link
Member

@ziotom78 ziotom78 commented Jan 4, 2021

This PR add a few optional parameters to the Observation.get_pointings, Observation.get_det2ecl_quaternions, and Observation.get_ecl2det_quaternions method that allow the caller to pre-allocate NumPy arrays, instead of forcing the methods to allocate them on their own. In repeated loops, this might save memory.

This PR preserves full backward compatibility, as the default behavior is still to allocate these NumPy arrays within the methods.

@ziotom78 ziotom78 merged commit 3deef3a into master Jan 5, 2021
@ziotom78 ziotom78 deleted the faster_pointings branch January 5, 2021 15:45
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.

1 participant