root/root-avoid-deprecated-numpy.object.patch
2023-01-30 19:16:25 +01:00

22 lines
1.3 KiB
Diff

From 1e7dc9fcd60133375c3b725d8317fab339c2bf38 Mon Sep 17 00:00:00 2001
From: Vincenzo Eduardo Padulano <v.e.padulano@gmail.com>
Date: Mon, 30 Jan 2023 10:31:29 +0100
Subject: [PATCH] [DF][PyROOT] Avoid deprecated numpy.object
---
.../pythonizations/python/ROOT/_pythonization/_rdataframe.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_rdataframe.py b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_rdataframe.py
index 59cb0cd260dd..01cb08b0365f 100644
--- a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_rdataframe.py
+++ b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_rdataframe.py
@@ -287,7 +287,7 @@ def GetValue(self):
tmp = numpy.asarray(cpp_reference) # This adopts the memory of the C++ object.
self._py_arrays[column] = ndarray(tmp, self._result_ptrs[column])
else:
- tmp = numpy.empty(len(cpp_reference), dtype=numpy.object)
+ tmp = numpy.empty(len(cpp_reference), dtype=object)
for i, x in enumerate(cpp_reference):
tmp[i] = x # This creates only the wrapping of the objects and does not copy.
self._py_arrays[column] = ndarray(tmp, self._result_ptrs[column])