Skip to content

Commit df80b8e

Browse files
ellertvepadulano
authored andcommitted
Avoid OverflowError from RDF pythonization
Fixes test failures on 32 bit intel ix86. The following tests FAILED: 62 - pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-rdataframe-makenumpy (Failed) python python_runtime_deps 1257 - tutorial-analysis-dataframe-df032_RDFFromNumpy-py (Failed) python_runtime_deps tutorial 1259/1470 Test #1257: tutorial-analysis-dataframe-df032_RDFFromNumpy-py .............................................***Failed 1.14 sec Traceback (most recent call last): File ".../tutorials/analysis/dataframe/df032_RDFFromNumpy.py", line 23, in <module> df = ROOT.RDF.FromNumpy({'x': x, 'y': y}) File ".../redhat-linux-build/lib/ROOT/_facade.py", line 349, in MakeNumpyDataFrameCopy return _MakeNumpyDataFrame(np_dict) File ".../redhat-linux-build/lib/ROOT/_pythonization/_rdataframe.py", line 601, in _MakeNumpyDataFrame return ROOT.Internal.RDF.MakeRVecDataFrame(ROOT.__ROOT_Internal.MakePyDeleter(key), *args) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ OverflowError: Python int too large to convert to C long
1 parent 9810263 commit df80b8e

File tree

1 file changed

+1
-1
lines changed
  • bindings/pyroot/pythonizations/python/ROOT/_pythonization

1 file changed

+1
-1
lines changed

bindings/pyroot/pythonizations/python/ROOT/_pythonization/_rdataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def _ensure_deleter_declared():
584584
585585
namespace __ROOT_Internal {
586586
587-
inline std::function<void()> MakePyDeleter(std::intptr_t ptr) {
587+
inline std::function<void()> MakePyDeleter(std::uintptr_t ptr) {
588588
PyObject *obj = reinterpret_cast<PyObject*>(ptr);
589589
Py_INCREF(obj);
590590
return [obj](){ Py_DECREF(obj); };

0 commit comments

Comments
 (0)