numpy.nansum gives nan when input is []