According to the source code, it looks like n should be q^d-1 where q is the cardinality of the field and d is the degree of the polynomial. So the documentation seems to be wrong.