Update writemoment2.pyx

Fixed error