StingraySoftware / stingray

Anything can happen in the next half hour (including spectral timing made easy)!
https://stingray.science/stingray
MIT License
172 stars 141 forks source link

Avoid copy in memory of memmaps #824

Closed matteobachetti closed 5 months ago

matteobachetti commented 5 months ago

This PR substitutes all calls to np.asarray with np.asanyarray, which passes all subclasses of np.ndarray (as, for example, np.memmap)

Relevant Issue(s)/PR(s)

Resolve #823

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 99.23664% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.49%. Comparing base (342f38e) to head (0e96476).

Files Patch % Lines
stingray/modeling/gpmodeling.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #824 +/- ## ========================================== + Coverage 96.47% 96.49% +0.02% ========================================== Files 45 45 Lines 9135 9138 +3 ========================================== + Hits 8813 8818 +5 + Misses 322 320 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.