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

Avoid copy in memory of memmaps #824

Merged
merged 4 commits into from
May 7, 2024
Merged

Conversation

matteobachetti
Copy link
Member

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

Copy link

codecov bot commented May 4, 2024

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 ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matteobachetti matteobachetti changed the title Searchsorted on memmap Avoid copy in memory of memmaps May 4, 2024
Copy link
Collaborator

@mgullik mgullik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @matteobachetti,

I don't see any problem with this. For me it's a go!

@matteobachetti matteobachetti added this pull request to the merge queue May 7, 2024
Merged via the queue into main with commit 379ed3a May 7, 2024
17 checks passed
@matteobachetti matteobachetti deleted the searchsorted_on_memmap branch May 7, 2024 09:10
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.

Some functionality fails with memory mapped input
2 participants