Skip to content

Pre-allocate quaternion/pointing arrays#83

Merged
ziotom78 merged 6 commits intomasterfrom
faster_pointings
Jan 5, 2021
Merged

Pre-allocate quaternion/pointing arrays#83
ziotom78 merged 6 commits intomasterfrom
faster_pointings

Conversation

@ziotom78
Copy link
Copy Markdown
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