You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2020. It is now read-only.
In APLpy I have a pure-python (well with Numpy) implementation of downsample called resample (which I wrote a while ago) and it turns out it can actually be faster than downsample here which is surprising:
In [1]: from imageutils import downsample
In [4]: from aplpy.image_util import resample
In [6]: image = np.random.random((4096,4096))
In [7]: %timeit resample(image, 10)
10 loops, best of 3: 73.6 ms per loop
In [8]: %timeit downsample(image, 10)
10 loops, best of 3: 85.2 ms per loop
I wonder if the order of the looping has something to do with it, or maybe the fact that we're still accessing a Numpy array from Cython.