We study the problem of identifying cause and effect over two univariate continuous variables X and Y from a sample of their joint distribu- tion. Our focus lies on the setting where the variance of the noise may be dependent on the cause. We propose to partition the domain of the cause into multiple segments when the noise in- deed is dependent. To this end, we minimize a scale-invariant, penalized regression score, find- ing the optimal partitioning using dynamic pro- gramming. We show under which conditions this allows us to identify the causal direction for the linear setting with heteroscedastic noise, for the non-linear setting with homoscedastic noise, as well as empirically confirm that these results generalize to the non-linear and heteroscedas- tic case. Altogether, the ability to model het- eroscedasticity translates into an improved per- formance in telling cause from effect on a wide range of synthetic and real-world datasets.