def test_container_indicator_sphere(self): """ """ array_shape = (3, 3) indices = container_indicator_sphere(array_shape) indices_real = np.asarray([[False, True, False], [ True, True, True], [False, True, False]]) self.assertTrue(np.allclose(indices, indices_real))
def test_find_normalize_matrix(self): """ """ array_shape = (3, 3) indices = container_indicator_sphere(array_shape) nm = find_normalize_matrix(indices) nm_real = np.asarray([[1, 1, 1, 1, 1], [1, 2, 2, 2, 1], [1, 2, 5, 2, 1], [1, 2, 2, 2, 1], [1, 1, 1, 1, 1]]) self.assertTrue(np.allclose(nm, nm_real))