def test_coord_init_array():
 for a in ([u'1 2', u'3 4'], [[u'1', u'2'], [u'3', u'4']], [[1, 2], [3, 4]]):
  sc = SkyCoord(a, unit=u'deg')
  assert allclose((sc.ra - ([1, 3] * u.deg)), (0 * u.deg))
  assert allclose((sc.dec - ([2, 4] * u.deg)), (0 * u.deg))
  sc = SkyCoord(np.array(a), unit=u'deg')
  assert allclose((sc.ra - ([1, 3] * u.deg)), (0 * u.deg))
  assert allclose((sc.dec - ([2, 4] * u.deg)), (0 * u.deg))

def test_coord_init_array ( ) : for a in ( [ u'1 2' , u'3 4' ] , [ [ u'1' , u'2' ] , [ u'3' , u'4' ] ] , [ [ 1 , 2 ] , [ 3 , 4 ] ] ) : sc = SkyCoord ( a , unit = u'deg' ) assert allclose ( ( sc . ra - ( [ 1 , 3 ] * u . deg ) ) , ( 0 * u . deg ) ) assert allclose ( ( sc . dec - ( [ 2 , 4 ] * u . deg ) ) , ( 0 * u . deg ) ) sc = SkyCoord ( np . array ( a ) , unit = u'deg' ) assert allclose ( ( sc . ra - ( [ 1 , 3 ] * u . deg ) ) , ( 0 * u . deg ) ) assert allclose ( ( sc . dec - ( [ 2 , 4 ] * u . deg ) ) , ( 0 * u . deg ) )
input in the form of a list array or numpy array .