Skip to content

Commit

Permalink
Fix import of block_reduce for astropy 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Mar 10, 2022
1 parent 5d8176c commit e8c72f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion aplpy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
from astropy.wcs import WCS
from astropy.wcs.utils import proj_plane_pixel_scales
from astropy.io import fits
from astropy.nddata.utils import block_reduce

try:
from astropy.nddata.blocks import block_reduce
except ImportError: # astropy<5
from astropy.nddata.utils import block_reduce

from astropy.visualization import AsymmetricPercentileInterval
from astropy.visualization.wcsaxes import WCSAxes, WCSAxesSubplot
from astropy.coordinates import ICRS
Expand Down

0 comments on commit e8c72f0

Please sign in to comment.