def test_outside_sky():
 header = get_pkg_data_contents(u'data/outside_sky.hdr', encoding=u'binary')
 w = wcs.WCS(header)
 assert np.all(np.isnan(w.wcs_pix2world([[100.0, 500.0]], 0)))
 assert np.all(np.isnan(w.wcs_pix2world([[200.0, 200.0]], 0)))
 assert (not np.any(np.isnan(w.wcs_pix2world([[1000.0, 1000.0]], 0))))

def test_outside_sky ( ) : header = get_pkg_data_contents ( u'data/outside_sky.hdr' , encoding = u'binary' ) w = wcs . WCS ( header ) assert np . all ( np . isnan ( w . wcs_pix2world ( [ [ 100.0 , 500.0 ] ] , 0 ) ) ) assert np . all ( np . isnan ( w . wcs_pix2world ( [ [ 200.0 , 200.0 ] ] , 0 ) ) ) assert ( not np . any ( np . isnan ( w . wcs_pix2world ( [ [ 1000.0 , 1000.0 ] ] , 0 ) ) ) )
from github issue #107 .