SciPy

numpy.poly1d.order

attribute

poly1d.order

The order or degree of the polynomial