[pylucene-dev] samples\LuceneInAction\CategorizerTest.py

Andi Vajda vajda at osafoundation.org
Thu Apr 13 08:51:51 PDT 2006


On Thu, 13 Apr 2006, Yura Smolsky wrote:

> Hello, pylucene-dev.
>
> Windows XP, cygwin, latest PyLucene
> I got error when run
> \samples\LuceneInAction\CategorizerTest.py
>
> E
> ======================================================================
> ERROR: testCategorization (lia.advsearching.CategorizerTest.CategorizerTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "D:\workshop\PyLuceneNewLast\samples\LuceneInAction\lia\advsearching\CategorizerTest.py", line 43, in testCategorization
>    self.getCategory("extreme agile methodology"))
>  File "D:\workshop\PyLuceneNewLast\samples\LuceneInAction\lia\advsearching\CategorizerTest.py", line 88, in getCategory
>    angle = self.computeAngle(words, category, vectorMap)
>  File "D:\workshop\PyLuceneNewLast\samples\LuceneInAction\lia\advsearching\CategorizerTest.py", line 113, in computeAngle
>    return float('nan')
> ValueError: invalid literal for float(): nan

Strange. I can start python and type:

>>> float('nan')
nan
>>> float('NAN')
nan
>>> float('Nan')
nan
>>> float('Nann')
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
ValueError: invalid literal for float(): Nann

Can you ?

Andi..


More information about the pylucene-dev mailing list