ENH: Improve the moments conversion algorithm and the interface