Adapt to numpy 1.24
This commit is contained in:
parent
635da91690
commit
1801745923
2 changed files with 39 additions and 15 deletions
22
root-avoid-deprecated-numpy.object.patch
Normal file
22
root-avoid-deprecated-numpy.object.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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])
|
||||
Loading…
Add table
Add a link
Reference in a new issue