astropy: TST: New failures in "numpy-dev" job?

I don’t see how these are related to the einsum thingy that is known. Example: https://travis-ci.org/astropy/astropy/jobs/342443502

_________________________________ test__str__ __________________________________
        # non-scalar array angles
        arrangle = Angle(['10.2345d', '-20d'])
>       strarrangle = arrangle.__str__()
astropy/coordinates/tests/test_angles.py:861: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
x = 10.2345
>   return np.array2string(self, formatter={'all': lambda x: x.to_string()})
E   AttributeError: 'numpy.float64' object has no attribute 'to_string'
astropy/coordinates/angles.py:433: AttributeError
_______________________________ test_repr_latex ________________________________
        # and array angles
        arrangle = Angle([1, 2.1], u.deg)
>       rlarrangle = arrangle._repr_latex_()
astropy/coordinates/tests/test_angles.py:880: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
x = 1.0
>   return np.array2string(self, formatter={'all': lambda x: x.to_string(format='latex')})
E   AttributeError: 'numpy.float64' object has no attribute 'to_string'
astropy/coordinates/angles.py:441: AttributeError
______________________ TestTableFunctions.test_mask_array ______________________
        expect = r"\[\('NGC1002',\s+12.3[0-9]*\) \(\'NGC1003\',\s+15.[0-9]+\)\]"
>       assert re.match(expect, str(hdu.data))
E       assert None
E        +  where None = <function match at 0x7f9c2068fe18>("\\[\\('NGC1002',\\s+12.3[0-9]*\\) \\(\\'NGC1003\\',\\s+15.[0-9]+\\)\\]", "[(b'NGC1002', 12.3) (b'NGC1003', 15.2)]")
E        +    where <function match at 0x7f9c2068fe18> = re.match
E        +    and   "[(b'NGC1002', 12.3) (b'NGC1003', 15.2)]" = str(FITS_rec([(b'NGC1002', 12.3), (b'NGC1003', 15.2)],\n         dtype=(numpy.record, [('target', 'S20'), ('V_mag', '>f4')])))
E        +      where FITS_rec([(b'NGC1002', 12.3), (b'NGC1003', 15.2)],\n         dtype=(numpy.record, [('target', 'S20'), ('V_mag', '>f4')])) = <astropy.io.fits.hdu.table.BinTableHDU object at 0x7f9bb7bf6438>.data
astropy/io/fits/tests/test_table.py:860: AssertionError
_____________________ [doctest] docs/coordinates/index.rst _____________________
248 :func:`astropy.coordinates.EarthLocation.get_site_names`.
249 
250 For arbitrary Earth addresses (e.g., not observatory sites), use the
251 `~astropy.coordinates.EarthLocation.of_address` classmethod. Any address passed
252 to this function uses Google maps to retrieve the latitude and longitude and can
253 also (optionally) query Google maps to get the height of the location. As with
254 Google maps, this works with fully specified addresses, location names, city
255 names, and etc.::
256 
257     >>> EarthLocation.of_address('1002 Holy Grail Court, St. Louis, MO')  # doctest: +REMOTE_DATA +FLOAT_CMP
Expected:
    <EarthLocation (-26726.98216371, -4997009.8604809, 3950271.16507911) m>
Got:
    <EarthLocation (-26724.93406367, -4997006.87829221, 3950274.92599205) m>
/tmp/astropy-test-eem6lc45/lib/python3.6/site-packages/docs/coordinates/index.rst:257: DocTestFailure
_________________ [doctest] docs/io/fits/usage/unfamiliar.rst __________________
020 same, i.e. the data is in the ``.data`` attribute and the ``field()`` method
021 is used to refer to the columns and returns a numpy array. When reading the
022 table, Astropy will automatically detect what kind of table it is.
023 
024 ::
025 
026     >>> from astropy.io import fits
027     >>> filename = fits.util.get_testdata_filepath('ascii.fits')
028     >>> hdul = fits.open(filename)
029     >>> hdul[1].data[:1]  # doctest: +FLOAT_CMP
Expected:
    FITS_rec([(10.123, 37)],
             dtype=(numpy.record, {'names':['a','b'], 'formats':['S10','S5'], 'offsets':[0,11], 'itemsize':16}))
Got:
    FITS_rec([(b'.10123E+02', b'   37')],
             dtype=(numpy.record, {'names':['a','b'], 'formats':['S10','S5'], 'offsets':[0,11], 'itemsize':16}))
/tmp/astropy-test-eem6lc45/lib/python3.6/site-packages/docs/io/fits/usage/unfamiliar.rst:29: DocTestFailure

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (13 by maintainers)

Most upvoted comments

Agreed. skip the test for not NUMPY_LT_1_14_1

Ideally, this can be fixed upstream, but since it would be good to be able to work with numpy 1.14.1, a fix from our side in #7234.