RuntimeWarning: return type not handled in TMath::Power

Hi, I get a strange warning when trying to use TMath.Power in PyROOT. I tried a few other TMath functions but they don’t give the same warning. The warning only comes up the first time I use TMath.Power, after that it is silent. The function returns no value. I am using Python and ROOT from MacPorts on a Mac OS 10.7.5, other version numbers are all in the pasted log below.

Python 2.7.6 (default, Nov 12 2013, 15:55:29) 
Type "copyright", "credits" or "license" for more information.

IPython 1.2.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import ROOT

In [2]: ROOT.gROOT.GetVersion()
Out[2]: '5.34/15'

In [3]: ROOT.TMath.Power(2,3)
/opt/local/bin/ipython:1: RuntimeWarning: return type not handled (using void): long double
  #!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

I’d be very happy to test out other stuff to figure out what’s wrong.

Jean-François

Jean-François,

this is known (Andrea reported this a little while ago). There are two problems here (‘long double’ not handled in the first place, but also it being considered early as it’s not given a lower priority like double is). I’m sitting on a fix while I’m halfway moving to a new test system (too many disjoint tests between PyROOT and PyPy/cppyy, so something had to be done).

Later,
Wim

Thanks for the info. For my purposes it turns out that I’m using TMath::Power in a TFormula, bypassing the problem. For actual PyROOT I’ll stick to the builtin math.pow or numpy for now.

Jean-François

Hi,

clean now, in both -patches and dev.

Cheers,
Wim