Skip to content

Commit 9ed48aa

Browse files
ellertguitargeek
authored andcommitted
Fix a numpy test for 32 bit archs
The default dtype used in numpy array is "int". This type has different sizes on 32 and 64 bit architectures. The test tries to use the numpy array as a Long64_t dataframe. On 32 bit architectures this results in an error. This commit explicitly changes the numpy array's dtype to "int64" to match the Long64_t dataframe type on all architectyres. (cherry picked from commit 2ab39c1)
1 parent 4699c27 commit 9ed48aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bindings/pyroot/pythonizations/test/rdataframe_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def test_regression_gh_20291(self):
132132
return
133133
out_path = "dataframe_misc_regression_gh20291.root"
134134
try:
135-
x, y = numpy.array([1, 2, 3]), numpy.array([4, 5, 6])
135+
x, y = numpy.array([1, 2, 3], dtype='int64'), numpy.array([4, 5, 6], dtype='int64')
136136
df = ROOT.RDF.FromNumpy({"x": x, "y": y})
137137

138138
df.Snapshot("tree", out_path)

0 commit comments

Comments
 (0)