  We consider the problem of shape restricted nonparametric regression on a
closed set X ?\in R; where it is reasonable to assume the function has no more
than H local extrema interior to X: Following a Bayesian approach we develop a
nonparametric prior over a novel class of local extrema splines. This approach
is shown to be consistent when modeling any continuously differentiable
function within the class of functions considered, and is used to develop
methods for hypothesis testing on the shape of the curve. Sampling algorithms
are developed, and the method is applied in simulation studies and data
examples where the shape of the curve is of interest.
