def test_simplex_index(self): points = [[0, 0, 4], [1, 1, 2], [4, 0, 0]] for point in points: idx = simplex_index(point, 3, 4) assert_array_equal(self.simplex_grid_3_4[idx], point) eq_(simplex_index([1], 1, 1), 0)