Menu

#7 IEvaluator problems

something_wrong
closed-fixed
Core (7)
5
2007-04-05
2006-12-31
Jan Strube
No

Using the IEvaluator with a function on a column fails.
example:
File "/nfs/slac/g/lcd/mc/prj/sw/extern/python2.4/lib/python2.4/site-packages/paida/paida_core/ITuple.py", line 282, in project
histogramFill(evaluatDoubleX())
File "/nfs/slac/g/lcd/mc/prj/sw/extern/python2.4/lib/python2.4/site-packages/paida/paida_core/IEvaluator.py", line 26, in evaluateDouble
return float(eval(self._code, self._globals, {'_row': self._tupleRows[self._tupleObject._rowIndex]}))
File "IEvaluator.py", line 0, in ?
NameError: name 'sqrt' is not defined

In this case I tried to make a new column from existing columns using sqrt.
This is possible in JAIDA and JAS, and it should be possible by just importing everything from math into IEvaluator.
Cheers,
Jan

Discussion

  • Jan Strube

    Jan Strube - 2007-03-29

    Logged In: YES
    user_id=1366327
    Originator: YES

    The following patch fixes this.

    Index: paida/paida_core/IEvaluator.py

    RCS file: /cvsroot/paida/paida/paida/paida_core/IEvaluator.py,v
    retrieving revision 1.6
    diff -r1.6 IEvaluator.py
    2a3
    > from math import *

     
  • Koji Kishimoto

    Koji Kishimoto - 2007-04-05
    • labels: --> Core
    • milestone: --> something_wrong
    • assigned_to: nobody --> korry
    • status: open --> closed-fixed
     
  • Koji Kishimoto

    Koji Kishimoto - 2007-04-05

    Logged In: YES
    user_id=734761
    Originator: NO

    I've fixed and checked new IEvaluator.py file into CVS.
    Thanks, Jan!

     

Log in to post a comment.