Hello all,
I’m trying to run the PyROOT Numba tutorial example but it seems to throw an exception, shown below [1]. I’ve tried both my local ROOT (6.25/01) and the SWAN version 6.24/06, and get the same error. Any clues what might be going on? Here’s the link to the example:
https://root.cern/doc/master/pyroot004__NumbaDeclare_8py.html
Thank you,
Andre
[1]
AttributeError Traceback (most recent call last)
/cvmfs/sft.cern.ch/lcg/views/LCG_101swan/x86_64-centos7-gcc8-opt/lib/ROOT/_numbadeclare.py in get_inner_type(t)
52 try:
—> 53 g = re.match(‘(.)<(.)>’, t).groups(0)
54 return g[1]AttributeError: ‘NoneType’ object has no attribute ‘groups’
During handling of the above exception, another exception occurred:
Exception Traceback (most recent call last)
/tmp/ipykernel_516/1282498792.py in
1 @ROOT.Numba.Declare([‘RVecF’, ‘int’], ‘RVecF’)
----> 2 def pypowarray(x, y):
3 return x**y
4
5 ROOT.gInterpreter.ProcessLine(‘’’/cvmfs/sft.cern.ch/lcg/views/LCG_101swan/x86_64-centos7-gcc8-opt/lib/ROOT/_numbadeclare.py in inner(func, input_types, return_type, name)
125
126 # Jit the given Python callable with numba
→ 127 nb_return_type, nb_input_types = get_numba_signature(input_types, return_type)
128 try:
129 nbjit = nb.jit(nb_return_type(*nb_input_types), nopython=True, inline=‘always’)(func)/cvmfs/sft.cern.ch/lcg/views/LCG_101swan/x86_64-centos7-gcc8-opt/lib/ROOT/_numbadeclare.py in get_numba_signature(input_types, return_type)
110 for t in input_types:
111 if ‘RVec’ in t:
→ 112 nb_input_types.append(get_numba_type(get_inner_type(t))[:])
113 else:
114 nb_input_types.append(get_numba_type(t))/cvmfs/sft.cern.ch/lcg/views/LCG_101swan/x86_64-centos7-gcc8-opt/lib/ROOT/_numbadeclare.py in get_inner_type(t)
54 return g[1]
55 except:
—> 56 raise Exception(‘Failed to extract template argument of type {}’.format(t))
57
58 def get_numba_type(t):Exception: Failed to extract template argument of type RVecF
ROOT Version: 6.24/06 (SWAN LCG 101), 6.25/01 (local)
Platform: CentOS 7 (SWAN), MacOS 12.1 (local)
Compiler: gcc8 (SWAN), clang 12.0.5 (local)