moved Polynomial degree checks to python interface