BUG: the sparse_grid function doesn't work. It excludes the origin for some reason