astropy / imageutils

Image processing utilities for Astropy (No longer maintained)
https://imageutils.readthedocs.org/
9 stars 17 forks source link

`extract_array_2d` can give results of different size. #21

Closed hamogu closed 8 years ago

hamogu commented 9 years ago
>>> large_array = np.arange(30).reshape(5,6)
>>> extract_array_2d(large_array, (3, 4), (7, 7))
 array([[65, 66, 67, 68, 69],
       [75, 76, 77, 78, 79],
       [85, 86, 87, 88, 89]])
>>> extract_array_2d(large_array, (3, 4), (0, 0))
array([[0, 1, 2],
       [6, 7, 8]])

It would be useful for me if we had either:

astrofrog commented 9 years ago

@hamogu - can you check that this is still happening in the function that has been merged into astropy?

http://docs.astropy.org/en/latest/api/astropy.nddata.utils.extract_array.html#astropy.nddata.utils.extract_array

hamogu commented 9 years ago

Yes, it does. I'll open it as an astropy issue and also provide a working example (I must have edited the example above and broke it in the process).

astrofrog commented 8 years ago

Looks like this was fixed in https://github.com/astropy/astropy/pull/3727 - @hamogu, feel free to re-open an issue on the astropy repository if not.

hamogu commented 8 years ago

Yes, it's fixed there.