@skirpichev @smichr I had actually thought of adding this method to ntheory/modular.py. Should I go ahead?