Skip to content

Commit

Permalink
address Jim's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ianna committed Apr 29, 2022
1 parent 19f92b5 commit 765eb76
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/awkward/_v2/_connect/rdataframe/to_rdataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
import ROOT
import threading

compiler = ROOT.gInterpreter.Declare

def compile(source_code):
with compiler_lock:
return ROOT.gInterpreter.Declare(source_code)


compiler_lock = threading.Lock()
compiler(
compile(
"""
#include <Python.h>
"""
)


def compile(source_code):
with compiler_lock:
return compiler(source_code)


def to_rdataframe(layouts, length, flatlist_as_rvec):
return DataSourceGenerator(length, flatlist_as_rvec=flatlist_as_rvec).data_frame(
layouts
Expand Down Expand Up @@ -59,7 +59,7 @@ def data_frame(self, layouts):
)
self.lookups[key] = ak._v2._lookup.Lookup(layout)
generator = self.generators[key]
generator.generate(compiler)
generator.generate(ROOT.gInterpreter.Declare)

entry_type = generator.entry_type()
if isinstance(generator, ak._v2._connect.cling.NumpyArrayGenerator):
Expand Down

0 comments on commit 765eb76

Please sign in to comment.