I am looking at the gfprimdf function in Matlab to generate primitive polynomial. Is there any function similar in python? or does anybody know how to implement this?