bug fix; solve IndexError: index 0 is out of bounds for axis 0 with size 0
bug fix; solve TypeError: argument of type 'float' is not iterable

https://mediawiki.org/wiki/Special:Code/pywikipedia/11707