def test_ndarray_mixin(tmpdir): t = table.Table() t['a'] = [1, 2] t['b'] = ['x', 'y'] t['c'] = table.NdarrayMixin([5, 6]) helpers.assert_roundtrip_tree({'table': t}, tmpdir)
'scpm': scpm, 'scpmrv': scpmrv, 'scrv': scrv, 'x': [1, 2] * u.m, 'qdb': [10, 20] * u.dB(u.mW), 'qdex': [4.5, 5.5] * u.dex(u.cm / u.s**2), 'qmag': [21, 22] * u.ABmag, 'lat': coordinates.Latitude([1, 2] * u.deg), 'lon': coordinates.Longitude([1, 2] * u.deg, wrap_angle=180. * u.deg), 'ang': coordinates.Angle([1, 2] * u.deg), 'el': el, 'sr': sr, 'cr': cr, 'sd': sd, 'srd': srd, 'nd': table.NdarrayMixin([1, 2]), 'obj': obj, } time_attrs = [ 'value', 'shape', 'format', 'scale', 'precision', 'in_subfmt', 'out_subfmt', 'location' ] compare_attrs = { 'tm': time_attrs, 'tm2': time_attrs, 'tm3': time_attrs, 'dt': ['shape', 'value', 'format', 'scale'], 'sc': ['ra', 'dec', 'representation_type', 'frame.name'],