Update for astropy API change
Merge pull request #362 from ChrisBeaumont/astropy-fix

Fix for astropy API change