<s> import numpy as np <EOL> from numpy . testing import assert_allclose <EOL> from menpo . shape import PointCloud , mean_pointcloud , TriMesh <EOL> def test_mean_pointcloud ( ) : <EOL> points = np . array ( [ [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] , <EOL> [ <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> ] ] ) <EOL> pcs = [ PointCloud ( points ) , PointCloud ( points + <NUM_LIT:2> ) ] <EOL> mean_pc = mean_pointcloud ( pcs ) <EOL> assert isinstance ( mean_pc , PointCloud ) <EOL> assert_allclose ( mean_pc . points , points + <NUM_LIT:1> ) <EOL> def test_mean_pointcloud_type ( ) : <EOL> points = np . array ( [ [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] , <EOL> [ <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> ] ] ) <EOL> trilist = np . array ( [ <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> ] ) <EOL> pcs = [ TriMesh ( points , trilist ) , TriMesh ( points + <NUM_LIT:2> , trilist ) ] <EOL> mean_pc = mean_pointcloud ( pcs ) <EOL> assert isinstance ( mean_pc , TriMesh ) <EOL> assert_allclose ( mean_pc . points , points + <NUM_LIT:1> ) </s>
