def test_orbits(): datasets_2d, specs = three_faces_sheet(zaxis=True) datasets = extrude(datasets_2d) eptm = Epithelium("3faces_3D", datasets, specs) expected_res_cell = datasets["edge"].groupby("srce").apply( lambda df: df["cell"]) expected_res_face = datasets["edge"].groupby("face").apply( lambda df: df["trgt"]) assert_array_equal(expected_res_cell, eptm.get_orbits("srce", "cell")) assert_array_equal(expected_res_face, eptm.get_orbits("face", "trgt"))
def test_orbits(): datasets_2d, specs = three_faces_sheet(zaxis=True) datasets = extrude(datasets_2d) eptm = Epithelium('3faces_3D', datasets, specs) eptm_2d = Epithelium('3faces_2D', datasets_2d, specs) expected_res_cell = datasets['edge'].groupby('srce').apply( lambda df: df['cell']) expected_res_face = datasets['edge'].groupby('face').apply( lambda df: df['trgt']) assert_array_equal(expected_res_cell, eptm.get_orbits('srce', 'cell')) assert_array_equal(expected_res_face, eptm.get_orbits('face', 'trgt'))