reformat numpy sum