Accessing a small subset of a large numpy array quickly #3978
Unanswered
iwishiwasaneagle
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to access the surrounding 8 squares from a given x,y of a image. This image is around 5000x4000 pixels large. For smaller images (5x5) my pybind code is much much faster than anything I could do with python. However, for the file that I'm intending on using it's as slow, if not slower than the python. This is leading me to believe that the array is being passed by value rather than reference, or I'm forcing the entire array to be loaded. Any advice? Code below.
Beta Was this translation helpful? Give feedback.
All reactions