def test_structs():
 (am, eo) = erfa.apci13(2456165.5, [0.401182685, 1])
 assert (am.shape == (2,))
 assert (am.dtype == erfa.dt_eraASTROM)
 assert (eo.shape == (2,))
 np.testing.assert_allclose(am[0]['pmt'], 12.651337940273786)
 np.testing.assert_allclose(am[0]['v'], [4.2896388971570276e-05, 8.115034002544664e-05, 3.5175551225931444e-05])
 (ri, di) = erfa.atciqd(2.71, 0.174, am[0])
 np.testing.assert_allclose(ri, 2.709994899247599)
 np.testing.assert_allclose(di, 0.17287407209836234)

def test_structs ( ) : ( am , eo ) = erfa . apci13 ( 2456165.5 , [ 0.401182685 , 1 ] ) assert ( am . shape == ( 2 , ) ) assert ( am . dtype == erfa . dt_eraASTROM ) assert ( eo . shape == ( 2 , ) ) np . testing . assert_allclose ( am [ 0 ] [ 'pmt' ] , 12.651337940273786 ) np . testing . assert_allclose ( am [ 0 ] [ 'v' ] , [ 4.2896388971570276e-05 , 8.115034002544664e-05 , 3.5175551225931444e-05 ] ) ( ri , di ) = erfa . atciqd ( 2.71 , 0.174 , am [ 0 ] ) np . testing . assert_allclose ( ri , 2.709994899247599 ) np . testing . assert_allclose ( di , 0.17287407209836234 )
checks producing and consuming of erfa c structs .