base python 1D code