def test_byteorder():
 mjd = np.array([53000.0, 54000.0])
 big_endian = mjd.astype('>f8')
 little_endian = mjd.astype('<f8')
 time_mjd = Time(mjd, format='mjd')
 time_big = Time(big_endian, format='mjd')
 time_little = Time(little_endian, format='mjd')
 assert np.all((time_big == time_mjd))
 assert np.all((time_little == time_mjd))

def test_byteorder ( ) : mjd = np . array ( [ 53000.0 , 54000.0 ] ) big_endian = mjd . astype ( '>f8' ) little_endian = mjd . astype ( '<f8' ) time_mjd = Time ( mjd , format = 'mjd' ) time_big = Time ( big_endian , format = 'mjd' ) time_little = Time ( little_endian , format = 'mjd' ) assert np . all ( ( time_big == time_mjd ) ) assert np . all ( ( time_little == time_mjd ) )
ensure that bigendian and little-endian both work .